text
stringlengths
2.85k
2.55M
label
class label
11 classes
1 Block Markov Superposition Transmission of BCH Codes with Iterative Erasures-and-Errors arXiv:1708.06081v1 [cs.IT] 21 Aug 2017 Decoders Suihua Cai, Nina Lin, and Xiao Ma, Member, IEEE, Abstract In this paper, we present the block Markov superposition transmission of BCH (BMST-BCH) codes, which can be constructed to obtain a very low error floor. To reduce the implementation complexity, we design a low complexity iterative sliding-window decoding algorithm, in which only binary and/or erasure messages are processed and exchanged between processing units. The error floor can be predicted by a genie-aided lower bound, while the waterfall performance can be analyzed by the density evolution method. To evaluate the error floor of the constructed BMST-BCH codes at a very low bit error rate (BER) region, we propose a fast simulation approach. Numerical results show that, at a target BER of 10−15 , the hard-decision decoding of the BMST-BCH codes with overhead 25% can achieve a net coding gain (NCG) of 10.55 dB. Furthermore, the soft-decision decoding can yield an NCG of 10.74 dB. The construction of BMST-BCH codes is flexible to trade off latency against performance at all overheads of interest and may find applications in optical transport networks as an attractive candidate. Index Terms BCH codes, block Markov superposition transmission (BMST), forward error correction (FEC), iterative decoding, optical communication. This work was supported by the 973 Program (No. 2012CB316100), the NSF of China (No. 91438101), and the NSF of Guangdong (No. 2016A030308008). This paper was presented in part at 2017 IEEE International Symposium on Information Theory. Suihua Cai and Nina Lin are with the School of Electronics and Information Technology, Sun Yat-sen University, Guangzhou 510006, China (e-mail: [email protected], [email protected]). Xiao Ma is with the School of Data and Computer Science and Guangdong Key Laboratory of Information Security Technology, Sun Yat-sen University, Guangzhou 510006, China (e-mail: [email protected]). 2 I. I NTRODUCTION In modern optical transport networks (OTN), forward error correction (FEC) plays a key role in ensuring reliable transmission. Since the first FEC scheme was introduced into optical communications by Grover in 1988 [1], the FEC schemes used in OTN are classified in three generations. The first-generation FEC schemes use conventional hard-decision block codes, such as Hamming codes, Reed-Solomon (RS) codes and Bose-Chaudhuri-Hocquenghem (BCH) codes. For example, the RS [255,239] was recommended for long-haul optical transmission as defined by ITU-T G.709 standard [2]. The performance of this code generation is expected to yield a net coding gain (NCG) of 6 dB at an output BER of 10−12 , which has been successfully used in the 2.5 G transmission system. The second-generation FEC schemes also use the hard-decision decoding (HDD). The concatenated product code structures are used to obtain high NCG at an output BER of 10−15 . The RS codes and the BCH codes are often taken as the component codes, e.g., RS-CSOC (convolutional self-orthogonal code) having an NCG of 8.3 dB [3], RS-BCH product code having an NCG of 8.67 dB, and BCH-BCH product code having an NCG of 9.24 dB [4]. The third-generation FEC schemes use the technique of soft-decision decoding (SDD), of which the block turbo codes (BTC) and the LDPC codes are the two competing classes [5]. Although the error correction capability can be further improved by a soft-decision FEC, it is believed that the hard-decision FEC is the most feasible to implement as 40 G and 100 G transmission systems [6], due to the high processing complexity of codes and the cost of the required Analog-to-Digital (A/D) converters. Recently, new hard-decision FEC schemes are presented, such as the staircase codes [7], the continuous-interleaved codes (CI-BCH) [8] and the braided BCH codes [9]. These codes can be considered as a combination of concatenated product codes and convolutional structured codes [10]. In particular, the staircase code, an elegant extension from a block BCH-BCH product code to its convolutional counterpart, achieves an NCG of 9.41 dB. However, the design of staircase codes is inflexible to adapt the change of frame sizes and overheads. Furthermore, the construction of staircase codes usually requires a large amount of calculation for searching good code parameters either by the extensive software simulations [11] or by density evolution (DE) analysis [12]. 3 In this paper, we use the block Markov superposition transmission (BMST) system [13] to construct high-performing FEC. The performance of the BMST codes can be predicted by a simple genie-aided bound [14], and good BMST codes can be constructed following the general procedure given in [15]. To construct FEC with high rates and achieving very low error probabilities, we use the (possibly shortened) BCH codes as the component codes. Different from BMST systems with other types of component codes, it is difficult for BCH decoders to obtain and handle truly soft information such as log-likelihood ratios. Instead, we introduce an erasure message for decoding failure (not as implemented in [16]) and presented a soft iterative decoding algorithm [17] in which only binary and/or erasure messages are processed and exchanged between proceeding units. In this paper, we further improve the NCG performance with slight increase in complexity by making a three-level decision on the channel output. The main contributions of this paper are as follows. 1) A new type of convolutional BCH codes is proposed, in which short BCH codes are embedded into the BMST system, resulting in BMST-BCH codes. We show by simulation that, by adjusting the Cartesian product order of the component BCH codes and the encoding memory of the BMST system, the construction is flexible to trade off latency against performance. 2) A low complexity soft iterative sliding-window decoding (SWD) algorithm is presented. The algorithm is both hard-decision and soft-decision capable, in which only binary and/or erasure messages are processed and exchanged between processing units. Simulation result shows that, BMST-BCH codes with HDD can achieve comparable NCG performance against the staircase codes, while the BMST-BCH codes with SDD perform even better. 3) Genie-aided lower bound and the DE analysis for the BMST-BCH codes are presented, which are used for predicting and evaluating the error correction capability at a very low BER. To reduce time consumption on the analysis, a fast simulation for BCH codes is also proposed. The rest of this paper is organized as follows. The encoding and decoding scheme of the BMST-BCH codes are introduced in Section II. The genie-aided lower bound and the DE analysis are presented in Section III, where also introduced is the fast simulation method for the BCH codes. Numerical results are presented in Section IV. Finally, Section V summarizes this paper. 4 II. E NCODING AND D ECODING OF BMST-BCH S YSTEMS A. Channel Model In this paper, we consider binary phase-shift keying (BPSK) signalling over additive white Gaussian noise (AWGN) channels. The bits are modulated to X = {+1, −1}. Let Z denotes the received signal with Z = X + W , where W is a normal distributed random variable with mean zero. For ease of implementation, we make a soft decision with three levels.    0, Z > T,    Y = e, −T 6 Z 6 T,      1, Z < −T, (1) where T is a non-negative threshold to be determined, Y represents the soft decision output and the symbol e represents a bit erasure. Hence, the channel model is equivalent to a binary symmetric erasure channels (BSEC) with input alphabet F2 = {0, 1} and output alphabet {0, 1, e}. Such a channel can be characterized by a probability vector (p0 , p1 , pe ), where p0 is the probability of a bit being correctly transmitted, p1 is the probability of bit error and pe is the probability of bit erasure. These parameters can be calculated as 1−T ), σ 1+T ), p1 =Q( σ 1−T 1+T pe =Q( ) − Q( ), σ σ p0 =1 − Q( (2) (3) (4) where σ is the standard deviation of the Gaussian noise, and the Q-function is defined as Z ∞ t2 1 x 1 √ exp(− )dt = erfc( √ ). Q(x) , 2 2 2π 2 x (5) Obviously, different threshold T results in different BSEC. In particular, in the case when T = 0, HDD is implemented and the channel is reduced to a binary symmetric channel (BSC)  with pe = 0 and p1 = Q σ1 . It is not difficult to imagine that extra coding gain can be obtained by selecting a proper value of the threshold. In this paper, following [18], an SNR-dependent threshold T is used, which is calculated numerically according to the mutual information (MI) criterion. For an independent and uniformly distributed information source, the MI of BSEC can be calculated as I(X; Y ) = p0 log p0 +p1 log p1 −(1−pe ) log 1−pe . 2 (6) 5 + + … … u(t) C v(t) D v(t-1) D v(t-2) + + m-1 c(t) m … (t-m+1) D (t-m) v v Fig. 1. The encoding diagram of a BMST-BCH system with memory m. For a given SNR, the parameters p0 , p1 and pe are functions of T . Hence, the threshold T can be optimized by T ∗ = arg max I(X; Y ). T >0 (7) B. Encoding of BMST-BCH Systems Let BCH [n, k, dmin] be a binary systematic BCH code, where n is the code length, k is the code dimension and dmin is the designed distance. By definition, the code rate is R , nk , and the overhead is calculated as n−k . k An erasures-and-errors decoder is assumed to correct both erasures and errors. In the case when the number i of occurrences of errors and the number j of occurrences of erasures satisfy 2i + j < dmin , the erasures-and-errors decoder outputs the transmitted codeword and declares a decoding success. In the other case, the erasures-and-errors decoder may declare a decoding success, corresponding to a miscorrection (an undetected error), or a decoding failure, corresponding to a detected error. Given a positive integer B, we take BCH [n, k, dmin ]B , the B-fold Cartesian product of BCH [n, k, dmin ], as the basic code to build the BMST system. Let u(0) , u(1) , . . . , u(L−1) be L blocks of data to be transmitted, where u(t) ∈ FkB 2 . The encoding algorithm of BMST-BCH with memory m is described in Algorithm 1, see Fig. 1 for reference. Algorithm 1: Encoding of BMST-BCH • Initialization: For t < 0, set v (t) = 0 ∈ FnB 2 . • Iteration: For t = 0, 1, . . . , L − 1, 1) Encode u(t) into v (t) ∈ FnB 2 by performing separately B times the encoding algorithm of the component code BCH [n, k, dmin]; 2) For 0 6 i 6 m, interleave v (t−i) into w (t,i) by the i-th interleaver Πi (randomly generated but fixed); 6 3) Compute c(t) = • Pm i=0 w (t,i) , which is taken as the t-th block of transmission. (t) following Termination: For t = L, L+1, . . . , L+m−1, set u(t) = 0 ∈ FkB 2 and compute c Step Iteration. Remark. The code rate is kL , n(L+m) which is slightly less than that of the basic code. However, the rate loss is negligible for the case when m ≪ L. C. Sliding-window Decoding Algorithm As a special class of BMST codes, BMST-BCH codes can be represented by a normal graph [14], where edges represent variables and vertices (nodes) represent constraints. The iterative SWD algorithm with decoding delay d can be described as a message processing/passing algorithm over a subgraph containing d + 1 layers, where each layer consists of a node of type C , a node of type = , m + 1 nodes of type Π , and a node of type + . See Fig. 2 for reference. The decoding algorithm starts from nodes of type + , which are connected to channels and receive messages z (t) , the noisy versions of c(t) . • Node + : This type of nodes has m + 2 edges, where m + 1 edges are connected to nodes of Π , which carry the messages of w’s, and a half-edge connected to the channel output. To make this simpler, we use the notation for the i-th edge with the input messages xi ∈ {0, 1, e}nB and the output messages zi ∈ {0, 1, e}nB , for 0 6 i 6 m + 1, without distinguishing the two types of edges. We define a binary operator ⊞ on {0, 1, e} as    a ⊕ b, a 6= e and b 6= e, a⊞b=   e, otherwise, (8) where ⊕ represents the addition on F2 . Given the input messages xi , 0 6 i 6 m + 1, the output messages zi are calculated by summing up the corresponding input messages from the other edges, zi,ℓ = j6=i • xj,ℓ , for 0 6 ℓ 6 nB − 1. (9) Node Πi : The node Πi represents the i-th interleaver, which interleaves or de-interleaves the input messages. • Node = : With a slight abuse of notation, we still use xi and zi to denote the input messages and output messages associated with the i-th edge, for 0 6 i 6 m + 1. For convenience, 7 the edge connected to node C is numbered by i = 0. For = → C , the ℓ-th component of the output message z0 is calculated by voting as    0, |{i 6= 0|xi,ℓ = 0}| > |{i 6= 0|xi,ℓ = 1}|,    z0,ℓ = 1, |{i 6= 0|xi,ℓ = 0}| < |{i 6= 0|xi,ℓ = 1}|,      e, otherwise. (10) x0,ℓ if x0,ℓ 6= e, or calculated by voting if x0,ℓ = e. That is,    x0,ℓ , x0,ℓ 6= e,      0, x0,ℓ = e and |{j 6= i|xj,ℓ = 0}| > |{j 6= i|xj,ℓ = 1}|, zi,ℓ =   1, x0,ℓ = e and |{j 6= i|xj,ℓ = 0}| < |{j 6= i|xj,ℓ = 1}|,       e, otherwise. (11) For = → Π , the output messages zi,ℓ , 1 6 i 6 m + 1, 0 6 ℓ 6 nB − 1, are set to be • Node C : Given the messages from node = are available, the node C performs an erasures-and-errors decoding algorithm to compute the extrinsic messages. Specifically, the decoder outputs a codeword if it is successful or a sequence of erasures e = (e, e, . . . , e) otherwise. Remark. For the nodes + and = with m + 2 edges connected, by using the “partial sum” technique presented at Section 5.4 of [19], only 3m binary operations for vectors are needed for each node processing. The decoding algorithm is summarized in Algorithm 2 as follows. Algorithm 2: SWD of BMST-BCH • Global initialization: Set a maximum iteration number Imax > 0. The input messages of half-edges connected to the t-th layer are initialized as the corresponding received messages y (t) ∈ {0, 1, e}nB for 0 6 t 6 d − 1 and the other edges are initialized as message e. • Sliding window: For t = 0, 1, . . . , L − 1, 1) Local initialization: Initialize the input messages of half-edge connected to the (t+d)-th layer as the received messages y (t+d) . 2) Iteration: For I = 1, 2, . . . , Imax , a) Forward recursion: For i = 0, 1, . . . , d, the (t + i)-th layer performs a message processing algorithm scheduled as 8 Fig. 2. The normal graph of a BMST-BCH system with L = 4 and m = 2. + → Π → = → C → = → Π → +. b) Backward recursion: For i = d, d − 1, . . . , 0, the (t + i)-th layer performs a message processing algorithm scheduled as + → Π → = → C → = → Π → +. c) HDD output: If a decoding success at node C is declared, the recovered information is output, or if a decoding failure is declared, the systematic part of the messages from = is output directly. In the latter case, each message e in the systematic part is replaced independently and uniformly at random by either 0 or 1. If the output messages at node C stay unchanged for some iteration I > 1, exit the iteration. 3) Cancelation: Remove the effect of v̂ (t) on all layers by updating the input messages as y (t+i) ← y (t+i) ⊞ ŵ (t,i) , (12) for i = 1, 2, · · · , m. Here we use the notation with a hat sign ( ˆ ) to denote the corresponding estimated messages according to the decoder output. D. Complexity Analysis We will show with numerical examples that both the encoding memory and the decoding delay can be chosen with a small amount to fulfill the performance requirement by choosing properly the component BCH code. For the encoding scheme, as seen in Fig. 1, the binary messages are processed by a basic code encoder, m registers, m + 1 interleavers and m summators. Thus, 9 the encoding complexity has the same scale as the encoding complexity of the component BCH code. For the decoding scheme, as seen in Fig. 2, only simple operations are processed at nodes + and = . Consequently, the computational complexity of message processing at nodes + and = of degree m+2 is much less than the decoding complexity of the component BCH code, roughly O(n2 ) [20]. On the other hand, the B-folds of the component BCH cods are independent of each other, in which parallel operation can be used in the encoding/decoding schemes for the basic codes. As a result, the encoding/decoding complexity of the BMST-BCH codes, when averaged over the data length, is almost linear with that of the component BCH code. III. P ERFORMANCE A NALYSIS To analyze the BER performance of BMST-BCH codes, we present both the genie-aided lower bound and the DE analysis. As we will show by simulation, the DE analysis not only verifies the achievability of the genie-aided lower bound, but also confirms the near-optimality of the choice of the decoding delay d = 2m. To overcome the difficulty caused by the conventional timeconsuming simulations, we propose a fast simulation approach as an essential tool to evaluate the lower bounds and the DE thresholds. A. Fast Simulation Approach for BCH Codes It is typically time-consuming to simulate the performance of a code in the extremely low error region. To overcome this problem, we write the BER as X BER = Pi,j BERi,j , (13) i,j where Pi,j is the probability that the channel introduces i errors and j erasures to the transmitted BCH codeword of length n, and BERi,j is the conditional BER given that these errors and erasures are uniformly distributed. Since the bit errors occurrence are considered independent and identically distributed (i.i.d.), it is not difficult to check that Pi,j has a closed form as    n n − i i j n−i−j , fi,j (p0 , p1 , pe ). (14) p1 pe p0 Pi,j = j i Recalling that the erasures are replaced by random bits in the case of decoding failure, the conditional error probability BERi,j can be written as BERi,j = µi,j + λi,j ( j i + ), n 2n (15) 10 where µi,j is the bit error rate associated with the successful decoding (i.e., the ratio between the number of bit errors of successful decoding and the total number of information bits), and λi,j is the probability of decoding failure. It can be checked that µi,j = 0, λi,j = 0, for 2i + j < dmin. (16) µi,j = 0, λi,j = 1, for j > dmin . (17) For the remaining cases when 2i + j > dmin and j < dmin , µi,j and λi,j can be estimated efficiently with Monte Carlo simulations (described in Algorithm 3) by imposing uniformly at random i errors and j erasures on a codeword. Algorithm 3: Monte Carlo Simulation of µi,j and λi,j for BCH [n, k, dmin] for given (i, j) ∈ {2i + j > dmin, j < dmin} • Initialization: Set a sampling size S. Initialize the counters n1 = 0, n2 = 0. • Iteration: For s = 1, 2, . . . , S, 1) Generate a random vector v ∈ {0, 1, e}n , consisting of n − i − j components of value 0, i components of value 1 and j components of value e in a totally random order. 2) Decode v by the erasures-and-errors decoding algorithm. a) For the case of decoding success, increase the counter n1 by the Hamming weight of the output codeword. b) For the case decoding failure, increase the counter n2 by one. • Output: µi,j ≈ n1 , nS λi,j ≈ n2 . S Remark. It is worth pointing out that, by definition, µi,j , λi,j and BERi,j depend only on the code structure and are independent of the channel parameters. We assume in the sequel that these values are available. B. Genie-aided Lower Bound The genie-aided lower bound is derived by assuming all but one layers (sub-blocks) are perfectly known at the decoder. This is equivalent to assuming that a BCH codeword is transmitted m + 1 times over the BSEC (p0 , p1 , pe ). Hence, after messages processing at node = , the BCH decoder is faced with a BSEC (p̃0 , p̃1 , p̃e ), where   m+1 i−1  XX m + 1 m + 1 − i i j m+1−i−j p0 p1 pe , p̃0 = j i i=1 j=0 (18) 11 p̃1 = m+1 i−1  XX i=1 j=0 and p̃e = m+1 i ⌊(m+1)/2⌋  X i=0   m + 1 − i j i m+1−i−j p0 p1 pe , j m+1 2i   2i i i m+1−2i p pp . i 0 1 e (19) (20) The lower bound of the BMST-BCH system is then calculated according to (13) with Pi,j = fi,j (p̃0 , p̃1 , p̃e ) as expressed in (14). C. Density Evolution DE is a tool to predict the iterative decoding performance of asymptotically long codes in the waterfall region by simulation on the decoding process under a cycle-free graph assumption by tracking how the probability densities of the exchanged messages evolve with iterations.The DE analysis is different from that presented in [21] in the following two aspects. First, an erasure message is allowed and a probability vector (α, β, γ) is used to represent the distribution of the propagating messages in the decoding algorithm, where α is the probability of a bit being correct, β is the probability of bit flipping error and γ is the probability of bit erasure. Second, we will not ignore the case of miscorrection and do not assume the availability of the weight spectrum. For clarity, we take m = 2 as an example to describe the DE analysis algorithm as follows, where a target BER is preset. For a general case with encoding memory m, see Appendix A. Algorithm 4: DE analysis for SWD of BMST-BCH code with m = 2 • Initialization: Set a maximum number of iterations Imax . All messages over the halfedges (connected to the channel) are initialized as (p0 , p1 , pe ), and all the messages over the edges are initialized as (0, 0, 1). • Sliding window: For each window position, the d+1 decoding layers perform iteratively (see below) message processing layer-by-layer according to the schedule, + → = → C → = → +. Iteration: For I = 1, 2, . . . , Imax , 1) Node + : At most 4 edges are connected to a node + in total. For each edge, given the input messages {(αℓ , βℓ , γℓ ), ℓ = 0, 1, 2} from the other edges, the extrinsic output 12 messages can be calculated as αout = α0 α1 α2 + α0 β1 β2 + α1 β2 β0 + α2 β0 β1 , (21) γout = 1 − (1 − γ0 )(1 − γ1 )(1 − γ2 ), (22) βout = 1 − αout − γout . (23) 2) Node = : From = to C , given the input messages {(αℓ , βℓ , γℓ ), ℓ = 0, 1, 2} from the other edges, the extrinsic output messages can be calculated as αout =α0 γ1 γ2 + α1 γ2 γ0 + α2 γ0 γ1 + α0 α1 + α1 α2 + α2 α0 − 2α0 α1 α2 , (24) βout =β0 γ1 γ2 + β1 γ2 γ0 + β2 γ0 γ1 + β0 β1 + β1 β2 + β2 β0 − 2β0 β1 β2 , γout =1 − αout − βout . (25) (26) From = to + , given the input messages {(αℓ , βℓ , γℓ ), ℓ = 0, 1, 2} from the other edges (label the input message from node C with index 0), the extrinsic output messages are given by αout = α0 + γ0 (α1 γ2 + α2 γ1 + α1 α2 ), (27) βout = β0 + γ0 (β1 γ2 + β2 γ1 + β1 β2 ), (28) γout = 1 − αout − βout . (29) 3) Node C : Given the input messages (α, β, γ) from node = , the extrinsic output messages can be calculated as (39) - (42). After Imax iterations, if the estimated BER is no greater than the target BER, a local decoding success is declared, the window position is shifted, and decoding continues. Otherwise, a decoding failure is declared and the window decoding terminates. A complete decoding success is declared for a target BER under an initial channel parameter (p0 , p1 , pe ) if and only if all L layers declare decoding success. A threshold for a target BER is roughly defined as the minimum SNR that guarantees a complete decoding success, which can be found numerically by Algorithm 4. 13 100 BER 10-5 uncoded BPSK HDD, BCH[31,16,7], traditional HDD, BCH[31,16,7], fast HDD, BMST-BCH[31,16,7]160 HDD, DE threshold HDD, lower bound SDD, BCH[31,16,7], traditional SDD, BCH[31,16,7], fast 10-10 10-15 SDD, BMST-BCH[31,16,7] 160 SDD, DE threshold SDD, lower bound 10-20 0 1 2 3 4 5 6 7 8 9 10 Eb /N0 (dB) Fig. 3. Performance of the BMST-BCH system with BCH [31, 16, 7]160 as the basic code. The system encodes with the encoding memory m = 2 and decodes with a decoding delay d = 4 and a maximum iteration Imax = 15. IV. N UMERICAL R ESULTS All the simulations in this section are conducted by assuming BPSK modulation and AWGN channels. As mentioned in Section II, for HDD, the channel is modeled as a BSC, equivalent p to a BSEC with p1 = Q( 2Eb R/N0 ), pe = 0 and p0 = 1 − p1 . In this setting of HDD, the external messages received by the SWD are binary only, while the internal messages processed and exchanged by the SWD can be erasures in the case of decoding failure at some node C . For SDD, the channel is equivalent to a BSEC as described in (2)-(4). A. Effectiveness of Proposed Evaluations In this subsection, a toy example is simulated to show the effectiveness of the proposed evaluation methods. For this end, we take 10−3 ∼ 10−5 as target BERs, at which the fast simulation can be compared with the traditional simulation since both of them are implementable with a reasonable computational resource. Example 1: Consider the BMST-BCH [31, 16, 7]160 code with encoding memory m = 2 and decoding delay d = 4. The simulation results are shown in Fig. 3. We see that the proposed fast simulation approach matches well with the traditional simulation approach for both HDD 14 100 BSEC capacity DE threshold for m=2, d=2 DE threshold for m=2, d=3 DE threshold for m=2, d=4 DE threshold for m=2, d=5 lower bound for m=2 DE threshold for m=3, d=3 DE threshold for m=3, d=4 DE threshold for m=3, d=6 DE threshold for m=3, d=8 lower bound for m=3 DE threshold for m=4, d=4 DE threshold for m=4, d=6 DE threshold for m=4, d=8 DE threshold for m=4, d=10 lower bound for m=4 BER 10-5 10-10 10-15 2 3 4 5 6 7 8 9 10 Eb /N0 (dB) Fig. 4. DE analysis of the BMST-BCH system with BCH [126, 105, 7] as the component code. The system encodes with the encoding memory m = 2, 3, 4 and decodes (SDD) with different decoding delays. and SDD. As expected, the SDD of the BMST-BCH code leads to a lower error floor and a better waterfall when compared with HDD. We also see that the DE threshold coincides with the lower bound in the error floor region, suggesting that the bound is tight. In addition, we observe that the proposed simulation approach can evaluate efficiently the performance around BER of 10−15 . B. Impact of Parameters on Performance In this subsection, we show by numerical results (including simulation, DE analysis and genieaided lower bound) how the performance is affected by the parameters such as the encoding memory m, the decoding delay d, the Cartesian product order B, and the component BCH code. As a general methodology, impacts on performance are investigated by varying some parameters while fixing others. Example 2 (Encoding Memory and Decoding Delay): In this example, the BMST-BCH systems are constructed by using BCH [126, 105, 7] as the component code with varied encoding memory and decoding delay. The genie-aided lower bounds and the DE analysis of SDD are shown in Fig. 4. The curves have similar behavior to other BMST systems [22]. With encoding memory fixed, the DE performance improves as the decoding delay d increases. However, when 15 100 BER 10-5 uncoded BPSK BSC capacity simulation B=100 simulation B=150 simulation B=200 DE threshold lower bound 10-1 10-2 10-10 10-3 4.6 4.7 4.8 10-15 10-20 3.5 4 4.5 5 5.5 6 6.5 7 7.5 8 8.5 9 9.5 Eb /N0 (dB) Fig. 5. Performance of the BMST-BCH system with BCH [660, 550, 23] as the component code. The system encodes with the encoding memory m = 2 and decodes (HDD) with a decoding delay d = 4 and a maximum iteration Imax = 15. d > 2m, the performance improvement is getting saturated as imposed by the genie-aided lower bound, suggesting that the SWD algorithm with decoding delay d = 2m is nearly optimal. Therefore, we set d = 2m in the sequel. We also see that, as predicted by the genie-aided lower bound, the error floor can be lowered down by increasing the encoding memory. Example 3 (Cartesian Product Order): In this example, we take BCH [660, 550, 23] as the component code and fix the encoding memory as two. The simulation results are shown in Fig. 5. We find that the curves are so steep in the waterfall region that we are not able to locate within a reasonable time the required Eb /N0 even for the BER of 10−5 . However, both the genie-aided lower bound and the DE analysis indicate an NCG1 of 10.48 dB. In the finite length regime with B = 100, the NCG is reduced to around 10.25 dB, which is slightly less than 10.41 dB, the NCG of staircase code given in [11] with a similar latency. This minor degradation of performance, however, is rewarded with an easy way to make trade-offs between latency and performance. That is, the performance can be improved further to approach the DE threshold by simply increasing B. Example 4 (Designed Distance of Component BCH Code): In this example, BCH codes 1 Notice that the required Eb /N0 for the uncoded system at the BER of 10−15 is 15.0 dB. 16 100 BSEC capacity BCH [216,180,9] DE threshold for [216,180,9], m=2 lower bound for [216,180,9], m=2 DE threshold for [216,180,9], m=3 lower bound for [216,180,9], m=3 BCH [270,225,11] DE threshold for [270,225,11], m=2 lower bound for [270,225,11], m=2 DE threshold for [270,225,11], m=3 lower bound for [270,225,11], m=3 BCH [324,270,13] DE threshold for [324,270,13], m=2 lower bound for [324,270,13], m=2 BCH [378,315,15] DE threshold for [378,315,15], m=2 lower bound for [378,315,15], m=2 10-5 BER 10-5 10-10 10-10 10-15 4.4 4.6 10-15 10-20 2.5 3 3.5 4 4.5 5 5.5 6 6.5 7 7.5 8 8.5 9 9.5 10 Eb /N0 (dB) Fig. 6. DE analysis of the BMST-BCH system with shortened BCH codes defined over GF(29 ) as the component codes. The system encodes with the encoding memory m = 2, 3 and decodes (SDD) with decoding delay d = 2m. defined over GF(29 ) are shortened to adapt the BMST systems with an overhead of 20%. The simulation results are shown in Fig. 6, where the component codes are shortened BCH codes from [511, 475, 9], [511, 466, 11], [511, 457, 13] and [511, 448, 15]. For m = 2, we see that the lower bound shifts to the left as the designed distance increases, which is consistent with the BCH code performance. From the genie-aided lower bound, we see that encoding memory m = 3 is preferred for [216, 180, 9] and [270, 180, 11] to achieve the target BER of 10−15 . We also see that, with encoding memory fixed, the code has a slightly better DE threshold as the designed distance decreases. Example 5 (Field Size of Component BCH Code): In this example, BCH codes defined over different fields but with the same designed distance of 7 are shortened to adapt the BMST systems with an overhead of 20%. The simulation results are shown in Fig. 7, where the component codes are shortened BCH codes from [127,106,7], [255,231,7] and [511,484,7]. We see that these three systems have similar lower bounds but non-negligible different waterfall performance. The component code over a larger Galois field results in a slightly better lower bound but a worse DE threshold. 17 100 BSEC capacity BCH [126,105,7] DE threshold for [126,105,7], m=4 lower bound for [126,105,7], m=4 BCH [144,120,7] DE threshold for [144,120,7], m=4 lower bound for [144,120,7], m=4 BCH [162,135,7] DE threshold for [162,135,7], m=4 lower bound for [162,135,7], m=4 BER 10-5 10-10 10-15 10-20 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Eb /N0 (dB) Fig. 7. DE analysis of the BMST-BCH system using the shortened BCH codes defined over different fields as the component codes. The system encodes with the encoding memory m = 4 and decodes (SDD) with a decoding delay d = 8. C. Comparison with Staircase Codes Compared with the staircase codes, the BMST-BCH codes are easily configured and efficiently optimized. Given an overhead and a decoding latency, we have the following procedure to search a good code with an extremely low error floor. 1) List as candidates all BCH codes (with moderate code length) that satisfy (after shortening if necessary) the overhead requirement. 2) For each candidate BCH code, select an encoding memory such that the genie-aided lower bound (obtainable by the fast simulation) lies below the target BER in the SNR region around one dB away from the Shannon limit. 3) Take as component the BCH code (along with the selected encoding memory) that has an acceptable waterfall performance (predicted by DE analysis with fast simulation). 4) Calculate the Cartesian product order under the restriction of the decoding latency. Example 6: Following the above construction procedure, we have designed BMST-BCH codes with overheads of 16.7%, 20% and 25% to target the BER of 10−15 with NCGs as high as possible. The simulation results are shown in Fig. 8. Similar to Example 3, the curves are so steep in the waterfall region that we are not able to locate within a reasonable time the required 18 100 uncoded BPSK HDD,DE threshold for [270,216,13], m=3 HDD,BMST-BCH[270,216,13] 188, m=3 HDD,DE threshold for [324,270,13], m=3 HDD,BMST-BCH[324,270,13] 144, m=3 HDD,DE threshold for [378,324,13], m=3 HDD,BMST-BCH[378,324,13] 168, m=3 SDD,DE threshold for [105,84,7], m=4 SDD,BMST-BCH[105,84,7] 375, m=4 SDD,DE threshold for [126,105,7], m=4 SDD,BMST-BCH[126,105,7]288, m=4 SDD,DE threshold for [98,84,5], m=5 SDD,BMST-BCH[98,84,5]412, m=5 10-5 BER 10-1 10-2 10-10 10-3 4.2 4.4 4.6 4.8 10-15 10-20 3.5 4 4.5 5 5.5 6 6.5 7 7.5 8 8.5 9 Eb /N0 (dB) Fig. 8. Performance of the BMST-BCH systems with overheads of 16.7%, 20% and 25%. Eb /N0 even for the BER of 10−5 . As evidenced by Example 1, the NCGs can be estimated by extrapolation based on the simulation results, the lower bounds and the DE analysis. The NCGs are listed in Table I, which also includes the performance of staircase codes reported in [11]. We can see that,with HDD implemented, the BMST-BCH codes with overheads of 16.7%, 20% and 25% have NCGs of 10.32 dB, 10.53 dB and 10.55 dB respectively, which are comparable to those of the staircase codes. With a similar decoding latency, the SDD results in an NCG improvement within 0.2 dB. It is worth pointing out that, indicated by the asymptotic performance predicted by the DE analysis, which means, we can further improve the NCGs by increasing the Cartesian product order B. V. C ONCLUSION We have proposed a new type of convolutional BCH codes by embedding short BCH codes into the BMST system, resulting in the BMST-BCH codes. A soft iterative sliding-window decoding algorithm was also proposed and the NCG performance was analyzed by genie-aided lower bound and DE analysis. The simulation results showed that the BMST-BCH codes can achieve comparable NCG performance against those of the staircase codes at a target BER of 10−15 . 19 TABLE I P ERFORMANCE OF BMST-BCH C ODES OH% 16.7 20 code type latency NCG(dB) staircase 444 528 10.32 (HDD) [378, 324, 13]168 , m = 3 444 528 10.32 (HDD) [98, 84, 5]412 , m = 5 444 136 10.42 (SDD) staircase 326 592 10.41 (HDD) [324, 270, 13]144 , m = 3 326 592 10.53 (HDD) 326 592 10.56 (SDD) staircase 354 375 10.62 (HDD) [270, 216, 13]188 , m = 3 355 320 10.55 (HDD) [105, 84, 7]375 , m = 4 354 375 10.74 (SDD) 288 [126, 105, 7] 25 ,m = 4 A PPENDIX A D ENSITY E VOLUTION FOR A G ENERAL E NCODING M EMORY The encoding memory is m and a target BER is preset. Denote the index set I = {0, 1, . . . , m}, which labels the input edges. Operations on the nodes for density evolution analysis are as follows. 1) Node + : At most m + 2 edges are connected to a node + in total. For each edge, given the input messages {(αℓ , βℓ , γℓ ), ℓ ∈ I} from the other edges, the extrinsic output messages can be calculated as αout = X Y X Y βi A⊆I i∈A |A| is even βout = i∈A A⊆I |A| is odd γout βi Y αj . (30) Y αj . (31) j∈I\A j∈I\A m Y =1− (1 − γj ). j=0 (32) 20 2) Node = : From = to C , given the input messages {(αℓ , βℓ , γℓ ), ℓ ∈ I} from the other edges, the extrinsic output messages can be calculated as Y X Y Y αi βj γℓ , αout = A,B⊆I i∈A A∩B=∅ |A|>|B| βout = X Y αi X Y αi A,B⊆I i∈A A∩B=∅ |A|<|B| γout = (33) j∈B ℓ∈I\(A∪B) Y βj Y βj Y γℓ , Y γℓ . (34) j∈B ℓ∈I\(A∪B) A,B⊆I i∈A A∩B=∅ |A|=|B| (35) j∈B ℓ∈I\(A∪B) From = to + , given the input messages {(αℓ , βℓ , γℓ ), ℓ ∈ I} from the other edges (label the input message from node C with index 0), the output messages are given by X Y Y Y αout =α0 + γ0 αi βq γℓ , A,B⊆I\{0} i∈A A∩B=∅ |A|>|B| βout =β0 + γ0 X Y j∈B ℓ∈I\({0}∪A∪B) αi A,B⊆I\{0} i∈A A∩B=∅ |A|<|B| γout =γ0 X Y αi A,B⊆I\{0} i∈A A∩B=∅ |A|=|B| (36) Y Y βq Y γℓ , (37) j∈B ℓ∈I\({0}∪A∪B) βq Y γℓ . (38) j∈B ℓ∈I\({0}∪A∪B) 3) Node C : Given the input messages (α, β, γ) from node = , the output messages can be calculated as αout = X (1 − µi,j − λi,j )fi,j (α, β, γ), (39) βout = X µi,j fi,j (α, β, γ), (40) γout = X λi,j fi,j (α, β, γ), (41) BER = X [µi,j + λi,j ( i,j i,j i,j i,j j i + )]fi,j (α, β, γ). n 2n (42) R EFERENCES [1] W. D. Grover, “Forward error correction in dispersion-limited lightwave systems,” Journal of Lightwave Technology, vol. 6, no. 5, pp. 643–654, May 1988. 21 [2] S. Gorshe, “A tutorial on ITU-T G. 709 optical transport networks (OTN),” PMC-Sierra white paper, 2010. [3] K. Seki, K. Mikami, M. Baba, A. Katayama, H. Tanaka, Y. Hara, M. Kobayashi, and N. Okada, “Single-chip FEC codec LSI using iterative CSOC decoder for 10 Gb/s long-haul optical transmission systems,” in Proceedings of the IEEE 2002 Custom Integrated Circuits Conference (Cat. No.02CH37285), 2002, pp. 155–158. [4] Forward Error Correction for High Bit-Rate DWDM Submarine Systems, ITU-T Recommendation G.975.1, Feb. 2004. [5] S. Benedetto and G. Bosco, “Channel coding for optical communications,” in Optical Communication Theory and Techniques. Springer, 2005, pp. 63–78. [6] F. Chang, K. Onohara, and T. Mizuochi, “Forward error correction for 100 G transport networks,” IEEE Communications Magazine, vol. 48, no. 3, pp. S48–S55, Mar. 2010. [7] B. P. Smith, A. Farhood, A. Hunt, F. R. Kschischang, and J. Lodge, “Staircase codes: FEC for 100 Gb/s OTN,” Journal of Lightwave Technology, vol. 30, no. 1, pp. 110–117, Jan. 2012. [8] M. Scholten, T. Coe, and J. Dillard, “Continuously-interleaved BCH (CI-BCH) FEC delivers best in class NECG for 40 G and 100 G metro applications,” in 2010 Conference on Optical Fiber Communication (OFC/NFOEC), collocated National Fiber Optic Engineers Conference, Mar. 2010, pp. 1–3. [9] Y. Y. Jian, H. D. Pfister, K. R. Narayanan, R. Rao, and R. Mazahreh, “Iterative hard-decision decoding of braided BCH codes for high-speed optical communication,” in 2013 IEEE Global Communications Conference (GLOBECOM), Dec. 2013, pp. 2376–2381. [10] A. Leven and L. Schmalen, “Status and recent advances on forward error correction technologies for lightwave systems,” Journal of Lightwave Technology, vol. 32, no. 16, pp. 2735–2750, Aug. 2014. [11] L. M. Zhang and F. R. Kschischang, “Staircase codes with 6% to 33% overhead,” Journal of Lightwave Technology, vol. 32, no. 10, pp. 1999–2002, May 2014. [12] C. Häger, A. G. i. Amat, H. D. Pfister, A. Alvarado, F. Brännström, and E. Agrell, “On parameter optimization for staircase codes,” in 2015 Optical Fiber Communications Conference and Exhibition (OFC), Mar. 2015, pp. 1–3. [13] X. Ma, C. Liang, K. Huang, and Q. Zhuang, “Obtaining extra coding gain for short codes by block Markov superposition transmission,” in 2013 IEEE International Symposium on Information Theory, July 2013, pp. 2054–2058. [14] X. Ma, C. Liang, K. Huang, and Q. Zhuang, “Block Markov superposition transmission: Construction of big convolutional codes from short codes,” IEEE Transactions on Information Theory, vol. 61, no. 6, pp. 3150–3163, June 2015. [15] C. Liang, X. Ma, Q. Zhuang, and B. Bai, “Spatial coupling of generator matrices: A general approach to design good codes at a target BER,” IEEE Transactions on Communications, vol. 62, no. 12, pp. 4211–4219, Dec. 2014. [16] G. Bosco, G. Montorsi, and S. Benedetto, “A new algorithm for “hard” iterative decoding of concatenated codes,” IEEE Transactions on Communications, vol. 51, no. 8, pp. 1229–1232, Aug. 2003. [17] N Lin, S. Cai, and X. Ma, “Block Markov superposition transmission of BCH codes with iterative hard-decision decoding,” in 2017 IEEE International Symposium on Information Theory, June 2017, accepted. [18] X. Ma, X. Zhang, H. Yu, and A. Kavčić, “Optimal quantization for soft-decision decoding revisited,” in International Symposium on Information Theory and its Applications,(Xian, China), Oct. 2002, pp. 483–486. [19] W. Ryan and S. Lin, Channel Codes: Classical and Modern. Cambridge University Press, 2009. [20] B. G. Bajoga and W. J. Walbesser, “Decoder complexity for BCH codes,” Proceedings of the Institution of Electrical Engineers, vol. 120, no. 4, pp. 429–431, Apr. 1973. [21] Y. Y. Jian, H. D. Pfister, and K. R. Narayanan, “Approaching capacity at high rates with iterative hard-decision decoding,” in 2012 IEEE International Symposium on Information Theory Proceedings, July 2012, pp. 2696–2700. [22] K. Huang and X. Ma, “Performance analysis of block Markov superposition transmission of short codes,” IEEE Journal on Selected Areas in Communications, vol. 34, no. 2, pp. 362–374, Feb. 2016.
7cs.IT
Elaborating Evaluation-Order Polymorphism Joshua Dunfield arXiv:1504.07680v3 [cs.PL] 11 Sep 2015 University of British Columbia Vancouver, Canada [email protected] Abstract We classify programming languages according to evaluation order: each language fixes one evaluation order as the default, making it transparent to program in that evaluation order, and troublesome to program in the other. This paper develops a type system that is impartial with respect to evaluation order. Evaluation order is implicit in terms, and explicit in types, with by-value and by-name versions of type connectives. A form of intersection type quantifies over evaluation orders, describing code that is agnostic over (that is, polymorphic in) evaluation order. By allowing such generic code, programs can express the by-value and by-name versions of a computation without code duplication. We also formulate a type system that only has by-value connectives, plus a type that generalizes the difference between by-value and by-name connectives: it is either a suspension (by name) or a “no-op” (by value). We show a straightforward encoding of the impartial type system into the more economical one. Then we define an elaboration from the economical language to a call-by-value semantics, and prove that elaborating a well-typed source program, where evaluation order is implicit, produces a well-typed target program where evaluation order is explicit. We also prove a simulation between evaluation of the target program and reductions (either byvalue or by-name) in the source program. Finally, we prove that typing, elaboration, and evaluation are faithful to the type annotations given in the source program: if the programmer only writes by-value types, no by-name reductions can occur at run time. Categories and Subject Descriptors F.3.3 [Mathematical Logic and Formal Languages]: Studies of Program Constructs—Type structure Keywords evaluation order, intersection types, polymorphism 1. Introduction It is customary to distinguish languages according to how they pass function arguments. We tend to treat this as a basic taxonomic distinction: for example, OCaml is a call-by-value language, while Haskell is call-by-need. Yet this taxonomy has been dubious from the start: Algol-60, in which arguments were call-by-name by default, also supported call-by-value. For the λ-calculus, Plotkin (1975) showed how to use administrative reductions to translate a This is a corrected version of a paper that appeared at ICFP 2015. Copyright c 2015 Joshua Dunfield cbv program into one that behaves equivalently under cbn evaluation, and vice versa. Thus, one can write a call-by-name program in a call-by-value language, and a call-by-value program in a callby-name language, but at the price of administrative burdens: creating and forcing thunks (to simulate call-by-name), or using special strict forms of function application, binding, etc. (to simulate callby-value). But programmers rarely want to encode an entire program into a different evaluation order. Rather, the issue is how to use the other evaluation order in part of a program. For example, game search can be expressed elegantly using a lazy tree, but in an ordinary call-by-value language one must explicitly create and force thunks. Conversely, a big advantage of call-by-value semantics is the relative ease of reasoning about cost (time and space); to recover some of this ease of reasoning, languages that are not call-by-value often have strict versions of function application and strictness annotations on types. An impartial type system. For any given language, the language designers’ favourite evaluation order is the linguistically unmarked case. Programmers are not forced to use that order, but must do extra work to use another, even in languages with mechanisms specifically designed to mitigate these burdens, such as a lazy keyword (Wadler et al. 1998). The first step we’ll take in this paper is to stop playing favourites: our source language allows each evaluation order to be used as easily as the other. Our impartial type system includes by-value and V N by-name versions of function types (→, →), product types (∗V , N V N ∗ ), sum types (+ , + ) and recursive types (µV , µN ). Using bidirectional typing, which distinguishes checking and inference, we can use information found in the types of functions to determine whether an unmarked λ or application should be interpreted as call-by-name or call-by-value. What if we want to define the same operation over both evaluation orders, say compose, or append (that is, for strict and lazy lists)? Must we write two identical versions, with nearly-identical type annotations? No: We can use polymorphism based on intersection types. The abstruse reputation of intersection types is belied by a straightforward formulation as implicit products (Dunfield 2014), a notion also used by Chen et al. (2014) to express polymorphism over a finite set of levels (though without using the word “intersection”). In these papers’ type systems, elaboration takes a polymorphic source program and produces a target program explicitly specifying necessary, but tedious, constructs. For Dunfield (2014), the extra constructs introduce and eliminate the products that were implicit in the source language; for Chen et al. (2014), the extra constructs support a dynamic dependency graph for efficient incremental computation. In this paper, we express the intersection type ∧ as a universal a quantifier over evaluation orders. For example, the type Da. int → N V int corresponds to (int → int) ∧ (int → int). Thus, we can type code that is generic over evaluation orders. Datatype defini- 1 (256) 2015/9/15 Contributions. This paper makes the following contributions: Source language (e) Impartial type system (§2) We define an impartial source language and type system that are equally suited to call-by-value and call-by-name. Using a type Da. τ that quantifies over evaluation orders a, programmers can define data structures and functions that are generic over evaluation order. The type system is bidirectional, alternating between checking an expression against a known type (derived from a type annotation) and synthesizing a type from an expression. Economical Target language (M) type system V Cbv type system V V V →∗ + µ →∗+µ →∗+µ N N N N V◮ N◮ →∗ + µ U (thunk) ∀ D er ase types ∀D ∀ ⇐ ⇐ e ⇒τ e ⇒S er(e) : S M:A elaborate encode types standard cbv cbv + cbn evaluation evaluation (≥ 0 steps) (≥ 0 steps) e′ : S elaborate (§3) Shifting to a call-by-value perspective, we abstract out the suspensions implicit in the by-name connectives, yielding a smaller economical type system, also suitable for a (nonimpartial) source language. We show that programs well-typed in the impartial type system remain well-typed in the economical type system. Evaluation order remains implicit in terms, and is specified only in type annotations, using the suspension point ǫ◮S. W:A Figure 1. Encoding and elaboration tions, expressed as recursive/sum types, can also be polymorphic in evaluation order; for example, operations on binary search trees can be written just once. Much of the theory in this paper follows smoothly from existing work on intersection types, particularly Dunfield (2014). However, since we only consider intersections equivalent to the quantified type Da. A, our intersected types have parametric structure: they differ only in the evaluation orders decorating the connectives. This limitation, a cousin of the refinement restriction in datasort refinement systems (Freeman and Pfenning 1991; Davies 2005), avoids the need for a merge construct (Reynolds 1996; Dunfield 2014) and the issues that arise from it. A simple, fine-grained type system. The source language just described meets our goal of impartiality, but the large number of connectives yields a slightly unwieldy type system. Fortunately, we can refine this system by abstracting out the differences between the by-name and by-value versions of each connective. That is, each by-name connective corresponds to a by-value connective with N suspensions (thunks) added: the by-name function type S1 → S2 corresponds to (U S1 ) → S2 where → is by-value, whereas V S1 → S2 is simply S1 → S2 . Here, U S1 is a thunk type— essentially 1 → S1 . We realize this difference through a connective ǫ◮S, read “ǫ suspend S”, where N◮S corresponds to U S and V◮S is equivalent to S. This gives an economical type system with call-by-value versions of the usual connectives (→, ∗, +, µ), plus ǫ◮S. This type system is biased towards call-by-value (with callby-name being “marked”), but we can easily encode the impartial ǫ connectives: S1 → S2 becomes (ǫ◮S1 ) → S2 , the sum type ǫ S1 + S2 becomes ǫ◮(S1 + S2 ), etc. Another advantage of this type system is that, in combination with polymorphism, it is simple to define variants of data structures that mix different evaluation orders. For example, a single list definition can encompass lists with strict “next pointers” (so that “walking” the list is guaranteed linear time) and lazy elements (so that examining the element may not be constant time), as well as lists with lazy “next pointers” and strict contents (so that “walking” the list is not guaranteed linear—but once a cons cell has been produced, its element can be accessed in constant time). Having arrived at this economical type system for source programs, in which evaluation order is implicit in terms, we develop an elaboration that produces a target program in which evaluation order is explicit: thunks are explicitly created and forced, and multiple versions of functions—by-value and by-name—are generated and selected explicitly. (§5) We give elaboration typing rules from the economical type system into target programs with fully explicit evaluation order. We prove that, given a well-typed source program, the result of the translation is well-typed in a call-by-value target language (Section 4). (§6) We prove that the target program behaves like the source program: when the target takes a step from M to M ′ , the source program that elaborated to M takes some number of steps, yielding an expression that elaborates to M ′ . We also prove that if a program is typed (in the economical type system) without by-name suspensions, the source program can take only “byvalue steps” possible in a cbv semantics. This result exploits a kind of subformula property of the bidirectional type system. Finally, we prove that if a program is impartially typed without using by-value connectives, it can be economically typed without by-name suspensions. Figure 1 shows the structure of our approach. Extended version with appendices. Proofs omitted from the main paper for space reasons can be found in Dunfield (2015). 2. Source Language and Impartial Type System Program variables x Source expressions e ::= () | x | u | λx. e | e1 @ e2 | fix u. e | Λα. e | e[τ] | (e:τ) | (e1 , e2 ) | projk e | injk e | case(e, x1 .e1 , x2 .e2 ) Figure 2. Impartial source language syntax Evaluation order vars. Evaluation orders Type variables Valuenesses Source types Source typing contexts a ǫ ::= V | N | a α ϕ ::= val | ⊤ ǫ τ ::= 1 | α | ∀α. τ | Da. τ | τ1 → τ2 ǫ ǫ ǫ | τ1 ∗ τ2 | τ1 + τ2 | µ α. τ γ ::= · | γ, x ϕ ⇒ τ | γ, u ⊤ ⇒ τ | γ, a evalorder | γ, α type Figure 3. Impartial types for the source language In our source language (Figure 2), expressions e are the unit value (), variables x, abstraction λx. e, application e1 @ e2 , fixed points fix u. e with fixed point variables u, pairs and projections, 2 (257) 2015/9/15 and sums injk e with conditionals case(e, x1 .e1 , x2 .e2 ) (shorthand for case e of inj1 x1 ⇒ e1 | inj2 x2 ⇒ e2 ). Both of our type systems for this source language—the impartial type system in this section, and the economical type system of Section 3—have features not evident from the source syntax: polymorphism over evaluation orders, and recursive types. elimination rule replaces a with a particular evaluation order ǫ: γ, a evalorder ⊢ e : τ γ ⊢ e : Da. τ γ ⊢ e : Da. τ γ ⊢ ǫ evalorder γ ⊢ e : [ǫ/a]τ These straightforward rules have a couple of issues: • Whether a program diverges can depend on whether it is run 2.1 Values under call-by-value, or call-by-name. The simply-typed λcalculus has the same typing rules for call-by-value and callby-name, because those rules cannot distinguish programs that return something from programs that diverge. Since we want to elaborate to call-by-value or call-by-name depending on which type appeared, evaluation depends on the particular typing derivation. Suppose that evaluation of e2 diverges, and that f is bound to (λx. e1 ). Then whether f @ e2 diverges depends V N on whether the type of f has → or →. The above rules allow a compiler to make either choice. Polymorphism in the form of D aggravates the problem: it is tempting to infer for f the a principal type Da. · · · → · · · ; the compiler can then choose how to instantiate a at each of f’s call sites. Allowing such code is one of this paper’s goals, but only when the programmer knows that either evaluation order is sensible and has written an appropriate type annotation or module signature. We resolve this through bidirectional typing, which ensures that quantifiers are introduced only via type annotation (a kind of subformula property). Internal details of the typing derivation still affect elaboration, and thus evaluation, but the internal details will be consistent with programmers’ expressed intent. If we wanted a standard call-by-value language, we would give a grammar for values, and use values to define the operational semantics (and to impose a value restriction on polymorphism introduction). But we want an impartial language, which means that a function argument x is a value only if the function is being typed under call-by-value. That is, when checking (λx. e) against V type (τ → τ), the variable x should be considered a value (it will be replaced with a value at run time), but when checking against N (τ → τ), it should not be considered a value (it could be replaced with a non-value at run time). Since “valueness” depends on typing, our typing judgments will have to carry information about whether an expression should be considered a value. We will also use valueness to impose a value restriction on polymorphism over evaluation orders, as well as polymorphism over types; see Section 2.5. In contrast, our operational semantics for the source language (Section 2.4), which permits two flavours (by-value and by-name) of reductions, will use a standard syntactic definition of values in the by-value reductions. 2.2 An Impartial Type System In terms of evaluation order, the expressions in Figure 2 are a blank slate. You can imagine them as having whichever evaluation order you prefer. You can write down the typing rules for functions, pairs and sums, and you will get the same rules regardless of which evaluation order you chose. This is the conceptual foundation for many functional languages: start with the simply-typed λ-calculus, choose an evaluation order, and build up the language from there.1 Our goal here is to allow different evaluation orders to be mixed. As a first approximation, we can try to put evaluation orders in the type system simply by decorating all the connectives. For example, in place of the standard →-introduction rule γ, x : τ1 ⊢ e : τ2 γ ⊢ (λx. e) : (τ1 → τ2 ) we can decorate → with an evaluation order ǫ (either V or N): γ, x : τ1 ⊢ e : τ2 ǫ γ ⊢ (λx. e) : (τ1 → τ2 ) Products ∗, sums +, and recursive types µ follow similarly. We add a universal quantifier Da. τ over evaluation orders2 . Its rules follow the usual type-assignment rules for ∀: the introduction rule is parametric over an arbitrary evaluation order a, and the 1 The choice need not be easy. The first call-by-name language, Algol 60, also supported call-by-value. It seems that call-by-value was the language committee’s preferred default, but Peter Naur, the editor of the Algol 60 report, independently reversed that decision—which he said was merely one of a “few matters of detail” (Wexelblat 1981, p. 112). A committee member, F.L. Bauer, said this showed that Naur “had absorbed the Holy Ghost after the Paris meeting. . . there was nothing one could do. . . it was to be swallowed for the sake of loyalty.” (Wexelblat 1981, p. 130). 2 The Cyrillic letter D, transliterated into English as D, bears some resemblance to an A (and thus to ∀); more interestingly, it is the first letter of the Russian word da (da). Many non-Russian speakers know that this word means “yes”, but another meaning is “and”, connecting it to intersection types. • If we extend the language with effects, we may need a value restriction in certain rules. For example, mutable references will break type safety unless we add a value restriction to the introduction rules for ∀ and D. A traditional value restriction (Wright 1995) would simply require changing e to v in the introduction rules, where v is a class of syntactic values. In our setting, whether a variable x is a value depends on typing, so a value restriction is less straightforward. We resolve this by extending the typing judgment with information about whether the expression is a value. Bidirectional typing. We can refine the traditional typing judgment into checking and synthesis judgments. In the checking judgment e ⇐ τ, we already know that e should have type τ, and are checking that e is consistent with this knowledge. In the synthesis judgment e ⇒ τ, we extract τ from e itself (perhaps directly from a type annotation), or from assumptions available in a typing context. The use of bidirectional typing (Pierce and Turner 2000; Dunfield and Krishnaswami 2013) is often motivated by the need to typecheck programs that use features Damas-Milner inference cannot handle, such as indexed and refinement types (Xi 1998; Davies and Pfenning 2000; Dunfield and Pfenning 2004) and higher-rank polymorphism. But decidability is not our motivation for using bidirectional typing. Rather, we want typing to remain predictable even though evaluation order is implicit. By following the approach of Dunfield and Pfenning (2004), in which “introduction forms check, elimination forms synthesize”, we ensure that the evaluation orders in typing match what programmers intended: a type connective with a V or N evaluation order can be introduced only by a checking judgment. Since the types in checking judgments are derived from type annotations, they match the programmer’s expressed intent. Programmers must write annotations on expressions that are redexes: in (λx. e) @ e2 , the λ needs an annotation, because λx. e is an introduction form in an elimination position: [ ] @ e2 . In contrast, f @ (λx. e2 ) needs no annotation, though the type of 3 (258) 2015/9/15 f must be derived (if indirectly) from an annotation. Recursive functions fix u. λx. e “reduce” to their unfolding, so they also need annotations. Valueness. Whether an expression is a value may depend on typing, so we put a valueness in the typing judgments: e val ⇒ S (or e val ⇐ S) means that e at type S is definitely a value, while e ⊤ ⇒ S (or e ⊤ ⇐ S) means that e at type S is not known to be a value. In the style of abstract interpretation, we have a partial order ⊑ such that val ⊑ ⊤. Then the join ϕ1 ⊔ ϕ2 is val when ϕ1 = ϕ2 = val, and ⊤ otherwise. g Since valueness is just a projection of ǫ, we could formulate the system without it, using ǫ to mark judgments as denoting values (V) or possible nonvalues (N). But that seems prone to confusion: is N ⇐ saying the expression is “by name” in some sense? Types and typing contexts. In Figure 3 we show the grammar for evaluation orders ǫ, which are either by-value (V), by-name (N), or an evaluation order variable a. We have the unit type 1, type variables α, ordinary parametric polymorphism ∀α. τ, evaluation ǫ order polymorphism Da. τ, functions τ1 → τ2 , products τ1 ∗ǫ τ2 , ǫ ǫ sums τ1 + τ2 , and recursive types µ α. τ. A source typing context γ consists of variable declarations x ϕ ⇒ τ denoting that x has type τ with valueness ϕ, fixedpoint variable declarations u ⊤ ⇒ τ (fixed-point variables are never values), evaluation-order variable declarations a evalorder, and type variable declarations α type. Impartial typing judgments. Figure 4 shows the bidirectional rules for impartial typing. The judgment forms are γ ⊢I e ϕ ⇐ τ, meaning that e checks against τ (with valueness ϕ), and γ ⊢I e ϕ ⇒ τ, meaning that e synthesizes type τ. The “I” on the turnstile stands for “impartial”. Connective-independent rules. Rules Ivar and Ifixvar simply use assumptions stored in γ. Rule Ifix checks a fixed point fix u. e against type τ by introducing the assumption u ⊤ ⇒ τ and checking e against τ; its premise has valueness ϕ because even if e is a value, fix u. e is not (⊤ in the conclusion). Rule Isub says that if e synthesizes τ then e checks against τ. For example, in the (ill-advised) fixed point expression fix u. u, the premise of Ifix tries to check u against τ, but Ifixvar derives a synthesis judgment, not a checking judgment; Isub bridges the gap. Rule Ianno also mediates between synthesis and checking, in the opposite direction: if we can check an expression e against an annotated type τ, then (e:τ) synthesizes τ. Introductions and eliminations. The rest of the rules are linked to type connectives. For easy reference, the figure shows each connective to the left of its introduction and elimination rules. We follow the recipe of Dunfield and Pfenning (2004): introduction rules check, and elimination rules synthesize. This recipe yields the smallest sensible set of rules, omitting some rules that are not absolutely necessary but can be useful in practice. For example, our rules never synthesize a type for an unannotated pair, because the pair is an introduction form. Rule I+Elim follows the recipe, despite having a checking judgment in its conclusion: the connective being eliminated, +ǫ , is synthesized (in the first premise). Consistent with the usual definition of syntactic values, I→Intro’s conclusion has val, while I→Elim’s conclusion has ⊤. In rule I→Elim, the first premise has the connective to eliminate, so the first premise synthesizes (τ1 +ǫ τ2 ). This provides the type τ1 , so the second premise is a checking judgment; it also provides τ2 , so the conclusion synthesizes. Products. Rule I∗Intro types a value if and only if both e1 and e2 are typed as values, so its conclusion has valueness ϕ1 ⊔ ϕ2 . Sums. Rule I+Introk is straightforward. In rule I+Elim, the assumptions added to γ in the branches say that x1 and x2 are values (val), because our by-name sum type is “by-name” on the outside. This point should become more clear when we see the translation of types into the economical system. Recursive types. Rules IµIntro and IµElim have the same e in the premise and conclusion, without explicit “roll” and “unroll” constructs. In a non-bidirectional type inference system, this would be awkward since the expression doesn’t give direct clues about when to apply these rules. In this bidirectional system, the type tells us to apply IµIntro (since its conclusion is a checking judgment). Knowing when to apply IµElim is more subtle: we should try to apply it whenever we need to synthesize some other type connective. For instance, the first premise of I+Elim needs a +, so if we synthesize a µ-type we should apply IµElim in the hope of exposing a +. The lack of explicit [un]rolls suggests that these are not isorecursive but equi-recursive types (Pierce 2002, chapter 20). However, we don’t semantically equate a recursive type with its unfolding, so perhaps they should be called implicitly iso-recursive. Note that an implementation would need to check that the type under the µ is guarded by a type connective that does have explicit constructs, to rule out types like µǫ α. α, which is its own unfolding and could make the typechecker run in circles. Explicit type polymorphism. In contrast to recursive types, we explicitly introduce and eliminate type polymorphism via the expressions Λα. e and M[τ]. This guarantees that a ∀ can be instantiated with a type containing a particular evaluation order if and only if such a type appears in the source program. Principality. Suppose γ ⊢I e1 ϕ ⇒ Da. τ1 → τ2 . Then, for any ǫ, we can derive γ ⊢I e1 @ e2 ⊤ ⇒ [ǫ/a]τ2 . But we can’t use IDIntro to derive the type Da ′ . [a ′ /a]τ2 , because e1 @ e2 . The only sense in which this expression has a principal type is if we have an evaluation-order variable in γ that we can substitute for a. 2.3 Programming with Polymorphic Evaluation Order Lists and streams. The impartial type system can express lists and (potentially terminating) streams in a single declaration:  type List a α = µa β. 1 +a (α ∗a β)  Choosing a = V yields µV β. 1 +V (α ∗V β) , which is the type of  lists of elements α. Choosing a = N yields µN β. 1 +N (α ∗N β) , which is the type of streams that may end—essentially, lazy lists. Since evaluation order is implicit in source expressions, we can write operations on List a α that work for lists and streams: ǫ Functions. Rule I→Intro introduces the type τ1 → τ2 . Its premise adds an assumption x valueness(ǫ) ⇒ τ1 , where valueness(ǫ) is val if ǫ = V, and ⊤ if ǫ is N or is an evaluation-order variable a. This rule thereby encompasses both variables that will be substituted with values (valueness(ǫ) = val) and variables that might be substituted with non-values (valueness(ǫ) = ⊤). Applying a ǫ function of type τ1 → τ2 yields something of type τ2 regardless of ǫ, so I→Elim ignores ǫ. V V V map : Da. ∀α. (α → β) → (List a α) → (List a β) = Λα. fix map. λf. λxs. case(xs, x1 .inj1 (), x2 .inj2 (f @ (proj1 x2 ), map @ f @ (proj2 x2 ))) This sugar-free syntax bristles; in an implementation with conveniences like pattern-matching on tuples and named constructors, we could write 4 (259) 2015/9/15 valueness(ǫ) = ϕ Evaluation order ǫ maps to valueness ϕ valueness(V) = val valueness(N) = ⊤ valueness(a) = ⊤ γ ⊢I e ϕ ⇐ τ Source expression e checks against impartial type τ γ ⊢I e ϕ ⇒ τ Source expression e synthesizes impartial type τ (x ϕ ⇒ τ) ∈ γ Ivar γ ⊢I x ϕ ⇒ τ γ, a evalorder ⊢I e val ⇐ τ IDIntro γ ⊢I e val ⇐ Da. τ D ǫ → γ, u ⊤ ⇒ τ ⊢I e ϕ ⇐ τ Ifix γ ⊢I (fix u. e) ⊤ ⇐ τ γ, (x valueness(ǫ) ⇒ τ1 ) ⊢I e ϕ ⇐ τ2 ǫ γ ⊢I (λx. e) val ⇐ (τ1 → τ2 ) + 1 γ ⊢I e ϕ ⇐ τ Ianno γ ⊢I (e:τ) ϕ ⇒ τ γ ⊢I () val ⇐ 1 I1Intro γ ⊢I e ϕ ⇒ Da. τ γ ⊢ ǫ evalorder IDElim γ ⊢I e ϕ ⇒ [ǫ/a]τ γ ⊢I e1 I→Intro γ ⊢I e2 ϕ2 ⇐ τ2 γ ⊢I e1 ϕ1 ⇐ τ1 I∗Intro γ ⊢I (e1 , e2 ) ϕ1 ⊔ϕ2 ⇐ (τ1 ∗ǫ τ2 ) ǫ γ ⊢I e ϕ ⇒ τ Isub γ ⊢I e ϕ ⇐ τ γ ⊢I e ϕ ⇒ ∀α. τ γ ⊢ τ ′ type I∀Elim ′ γ ⊢I e[τ ] ϕ ⇒ [τ ′ /α]τ γ, α type ⊢I e val ⇐ τ I∀Intro γ ⊢I Λα. e val ⇐ ∀α. τ ∀ ∗ǫ (u ⊤ ⇒ τ) ∈ γ Ifixvar γ ⊢I u ⊤ ⇒ τ ǫ (τ1 → τ2 ) γ ⊢I e2 γ ⊢I (e1 @ e2 ) ⊤ ⇒ τ2 ϕ1 ⇒ ϕ2 ⇐ τ1 I→Elim γ ⊢I e ϕ ⇒ (τ1 ∗ǫ τ2 ) I∗Elimk γ ⊢I (projk e) ⊤ ⇒ τk γ, (x1 val ⇒ τ1 ) ⊢I e1 ϕ1 ⇐ τ γ ⊢I e ϕ0 ⇒ (τ1 +ǫ τ2 ) γ ⊢I e ϕ ⇐ τk γ, (x2 val ⇒ τ2 ) ⊢I e2 ϕ2 ⇐ τ I+Introk I+Elim γ ⊢I (injk e) ϕ ⇐ (τ1 +ǫ τ2 ) γ ⊢I case(e, x1 .e1 , x2 .e2 ) ⊤ ⇐ τ  ǫ   γ ⊢I e ϕ ⇒ µǫ α. τ ǫ γ ⊢I e ϕ ⇐ (µ α. τ) α τ IµIntro    IµElim ǫ γ ⊢I e ⊤ ⇒ (µǫ α. τ) α τ γ ⊢I e ϕ ⇐ µ α. τ µ Figure 4. Impartial bidirectional typing for the source language V V Variations in being odd and even. The Standard ML type of “streams in odd style” (Wadler et al. 1998, Fig. 1), given by V map f xs : Da. ∀α. (α → β) → (List a α) → (List a β) = case xs of Nil ⇒ Nil | Cons(hd, tl) ⇒ Cons(f hd, map f tl) datatype α stream = Nil | Cons of α * α stream susp Note that, except for the type, this is standard code for map. Even this small example raises interesting questions: • Must all the connectives in List have a? No. Putting a on either the µ or the + and writing V on the other connectives is enough to get stream behaviour when a is instantiated with N: the only reason to eliminate (unroll) the µ is to eliminate (case on) the +; marking either connective will suspend the underlying computation. Marking both µ and + induces a suspension of a suspension, where forcing the outer suspension immediately forces the inner one; one of the suspensions is superfluous.  Note that marking only ∗ with a, that is, µV β. 1 +V (α ∗a β) , yields an “odd” data structure (Wadler et al. 1998), one that is not entirely lazy: we know immediately—without forcing a thunk—which injection we have (i.e. whether we have Nil or Cons). where α stream susp is the type of a thunk that yields an α stream, can berepresented as the impartial type µV β. 1 +V (α ∗V (µN γ. β)) . Note the slightly awkward (µN γ. β), in which γ doesn’t occur; we can’t simply write µN β. on the outside, because that would suspend the entire sum. (In the economical type system in Section 3, it’s easy to put the suspension in either position.) This type differs  subtly from another “odd” stream type, µV β. 1 +V (α ∗a β) , which corresponds to the SML type datatype α stream = Nil | Cons of ( α * α stream ) susp Here, the contents α are under the suspension; given a value of this type, we immediately know whether we have Nil or Cons, but we must force a thunk to see what the value is, which will also reveal whether the tail is Nil or Cons. We can also encode “streams in even style” (Wadler et al. 1998, Fig. 2): The SML declarations • What evaluation orders should we use in the type of map? We V used by-value (→), but we could use the same evaluation order a a a as the list: Da. ∀α. (α → β) → (List a α) → (List a β). This essentially gives “ML-ish” behaviour when a = V, and “Haskell-ish” behaviour when a = N. The type system, however, permits other variants—even the outlandishly generic a a a 4 2 1 (List a5 β) (List a3 α) → β) → Da1 , a2 , a3 , a4 , a5 . ∀α.(α → We leave deeper investigation of these questions to future work: our purpose, in this paper, is to develop the type systems that make such questions matter. datatype α stream_ = Nil_ | Cons_ of α * α stream withtype α stream = α stream_ susp  correspond to µN β. 1 +V (α ∗V β)) , with the N on µ playing the role of the withtype declaration. Wadler et al. (1998) note that “streams in odd style” can be encoded with ease in SML, while “streams in even style” can be encoded with difficulty (see their Figure 2). In the impartial type system, both encodings are straightforward, and we would only need to write one (polymorphic) version of each of their functions over streams. 5 (260) 2015/9/15 Source values v ::= () | λx. e | (v1 , v2 ) | injk v Figure 5. The definitions of v, CV and RV , taken together, are standard for call-by-value; the definitions of CN and RN are standard for call-by-name. The peculiarity is that can behave either by value (rule SrcStepCtxV) or by name (rule SrcStepCtxN). By-value eval. contexts CV ::= [ ] By-name eval. contexts CN ! cf. Erratum page 14 e We assume that the expressions being reduced have been erased (Figure 6), so we omit a rule for reducing annotations. Alternatives are discussed in Section 6.1. 2.5 Value Restriction Our calculus excludes effects such as mutable references; however, to allow it to serve as a basis for larger languages, we impose a value restriction on certain introduction rules. Without this restriction, the system would be unsound in the presence of mutable references. Following Wright (1995), the rule I∀Intro requires that its subject be a value, as in Standard ML (Milner et al. 1997). A similar value restriction is needed for intersection types (Davies and Pfenning 2000). The following example shows the need for the restriction on D: a let r : ref (Da. τ → τ) = ref f in r := g; h(!r) e ′ Source expression e steps to e ′ e′ SrcStepCtxV CV [e ′ ] e CV [e] e e | CV @ e2 | v1 @ CV | (CV , e2 ) | (v1 , CV ) | projk CV | injk CV | case(CV , x1 .e1 , x2 .e2 ) ::= [ ] | CN @ e2 | e1 @ CN | (CN , e2 ) | (e1 , CN ) | projk CN | injk CN | case(CN , x1 .e1 , x2 .e2 ) RV RV RN e′ e′ e CN [e] e′ SrcStepCtxN CN [e ′ ] RN e reduces to e ′ by value e reduces to e ′ by name (λx. e1 ) @ v2 RV [v2 /x]e1 (λx. e1 ) @ e2 RN [e2 /x]e1    (fix u. e) RV (fix u. e)ue (fix u. e) RN (fix u. e) u e projk (v1 , v2 ) RV vk projk (e1 , e2 ) RN ek case(injk v, x1 .e1 , x2 .e2 ) RV [v/xk ]ek case(injk e, x1 .e1 , x2 .e2 ) RN [e/xk ]ek βVreduce βNreduce fixVreduce fixNreduce projVreduce projNreduce caseVreduce caseNreduce a Figure 5. Source reduction er(e) = e ′ Source expression e erases to e ′ er( Λα. e ) = er(e) er( e[S] ) = er(e) er( (e:S) ) = er(e) er(()) = () er(x) = x er(e1 @ e2 ) = er(e1 ) @ er(e2 ) etc. Figure 6. Erasing types from source expressions Here, only µ is polymorphic in a, to suppress redundant thunks. 2.4 Operational Semantics for the Source Language A source expression takes a step if a subterm in evaluation position can be reduced. We want to model by-value computation and by-name computation, so we define the source stepping relation usings two notions of evaluation position and two notions of reduction. A by-value evaluation context CV is an expression with a hole [ ], where CV [e] is the expression with e in place of the [ ]. If e reduces by value to e ′ , written e RV e ′ , then CV [e] CV [e ′ ]. For ′ ′ example, if e2 RV e2 then v1 @ e2 v1 @ e2 , because v1 @ [ ] is a by-value evaluation context. cf. Erratum page 14 V V 2.6 Subtyping and η-Expansion Binary trees. As with lists, we can define evaluation-orderpolymorphic trees:  type Tree a α = µa β. 1 +V (α ∗V β ∗V β) ! N Assume we have f : Da. τ→τ and g : τ → τ and h : (τ→τ) → τ. By a version of IDIntro that doesn’t require its subject to be a a value, we have r : Da. ref (τ → τ). By IDElim with N for a, N we have r : ref (τ → τ), making the assignment r := g wellV typed. However, by IDElim with V for a, we have r : ref (τ → τ). V It follows that the dereference !r has type τ → τ, so !r can be passed to h. But !r = g is actually call-by-name. If h = λx. x(e2 ), we should be able to assume that e2 will be evaluated exactly once, but x = g is call-by-name, violating this assumption. If we think of D as an intersection type, so that r has type N V (τ → τ) ∧ (τ → τ), the example and argument closely follow Davies and Pfenning (2000) and, in turn, Wright (1995). (For union types, a similar problem arises, which can be solved by a dual solution—restricting the union-elimination rule to evaluation contexts (Dunfield and Pfenning 2003).) Dually, CN [e] CN [e ′ ] if e RN e ′ . Every by-value context is a by-name context, and every pair related by RV is also related by RN , but the converses do not hold. For instance, e1 @ [ ] is a CN but not a CV , and proj2 (e1 , e2 ) RN e2 , but proj2 (e1 , e2 ) reduces by value only when e1 and e2 are values. Values, by-value evaluation contexts CV , by-name evaluation contexts CN , and the relations , RV and RN are defined in Systems with intersection types often include subtyping. The strength of subtyping in intersection type systems varies, from syntactic approaches that emphasize simplicity (e.g. Dunfield and Pfenning (2003)) to semantic approaches that emphasize completeness (e.g. Frisch et al. (2002)). Generally, subtyping—at minimum—allows intersections to be transparently eliminated even at higher rank (that is, to the left of an arrow), so that the following function application is well-typed:  f : (τ1 ∧ τ1′ ) → τ2 → τ3 , g : (τ1 → τ2 ) ⊢ f g : τ3 Through a subsumption rule, g : (τ1 → τ2 ) checks against type (τ1 ∧ τ1′ ) → τ2 , because a function that accepts all values of type τ1 should also accept all values that have type τ1 and type τ1′ . Using the analogy between intersection and D, in our impartial type system, we might expect to derive  V a V N V f : (Da. τ1 →τ1 )→τ2 → τ3 , g : (τ1 →τ1 ) → τ2 ⊢ f g : τ3  a V Here, f asks for a function of type Da. τ1 →τ1 ) → τ2 , which N V works on all evaluation orders; but g’s type (τ1 → τ1 ) → τ2 says that g calls its argument only by name. For simplicity, this paper excludes subtyping: our type system does not permit this derivation. But it would be possible to define a subtyping system, and incorporate subtyping into the subsumption rule Isub—either by treating D similarly to ∀ (Dunfield and Krishnaswami 2013), or by treating D as an intersection type (Dunfield 6 (261) 2015/9/15 and Pfenning 2003). A simple subtyping system could be derived from the typing rules that are stationary—where the premises type the same expression as the conclusion (Leivant 1986). For example, IDElim corresponds to Γ ⊢ ǫ evalorder ≤D-L EFT Γ ⊢ (Da. τ) ≤ [ǫ/a]τ which depends on the ǫ in ǫ◮S: if we introduce the type N◮S, then e will be elaborated to a thunk, which is a value; if we are eliminating N◮S, the elaboration of e will have the form force · · · , which (like function application) is not a value. 3.1 Translating to Economical Types Alternatively, η-expansion can substitute for subtyping: even without subtyping and a subsumption rule, we can derive  a f : (Da. τ1 →τ1 ) → τ2 → τ3 , N g : (τ1 → τ1 ) → τ2 ⊢ f (λx. g x) : τ3 This idea, developed by Barendregt et al. (1983), can be automated; see, for example, Dunfield (2014). To relate economical types to impartial types, we define a type translation ⌊τ⌋ = S that inserts suspension points (Figure 7). Given an impartially-typed source program e of type τ, we can show that ⌊e⌋ has the economical type ⌊τ⌋ (Theorem 1). Some parts of the translation are straightforward. Functions ǫ τ1 → τ2 are translated to (ǫ◮⌊τ1 ⌋) → ⌊τ2 ⌋ because when ǫ = N, we get the expected type (N◮⌊τ1 ⌋) → ⌊τ2 ⌋ of a call-by-name function. We are less constrained in how to translate other connectives: • We could translate τ1 +ǫ τ2 to (ǫ◮⌊τ1 ⌋) + (ǫ◮⌊τ2 ⌋). But then 3. Economical Type System 1 +N 1—presumably intended as a non-strict boolean type— would be translated to (N◮1) + (N◮1), which exposes which injection was used (whether the boolean is true or false) without forcing the (spurious) thunk around the unit value. Thus, we instead place the thunk around the entire sum, so that 1 +N 1 translates to N◮(1 + 1). ⌊τ⌋ = S Impartial type τ translates to economical type S ⌊1⌋ ǫ ⌊τ1 → τ2 ⌋ ⌊τ1 +ǫ τ2 ⌋ ⌊τ1 ∗ǫ τ2 ⌋ = 1 ⌊Da. τ⌋  ⌊µǫ α. τ⌋ = ǫ◮ ⌊τ1 ⌋ → ⌊τ2 ⌋ ⌊∀α. τ⌋ = ǫ◮ (⌊τ1 ⌋+ ⌊τ2 ⌋)  ⌊α⌋ = ǫ◮ ⌊τ1 ⌋ ∗ ǫ◮ ⌊τ2 ⌋ = = = = Da. ⌊τ⌋ µα. ǫ◮ ⌊τ⌋ ∀α. ⌊τ⌋ α • We could translate τ1 ∗ǫ τ2 to ǫ◮(⌊τ1 ⌋ ∗ ⌊τ2 ⌋)—which corre- sponds to how we decided to translate sum types. Instead, we translate it to (ǫ◮⌊τ1 ⌋) ∗ (ǫ◮⌊τ2 ⌋), so that, when ǫ = N, we get a pair of thunks; accessing one component of the pair (by forcing its thunk) won’t cause the other component to be forced. ⌊γ⌋ = Γ Impartial context γ translates to economical context Γ ⌊γ, a evalorder⌋ = ⌊γ⌋, a evalorder ⌊·⌋ = · ⌊γ, α type⌋ = ⌊γ⌋, α type ⌊γ, x val ⇒ τ⌋ = ⌊γ⌋, x : V◮⌊τ⌋ ⌊γ, u ⊤ ⇒ τ⌋ = ⌊γ⌋, u : ⌊τ⌋ ⌊γ, x ⊤ ⇒ τ⌋ = ⌊γ⌋, x : N◮⌊τ⌋ ⌊e⌋ = e ′ • Finally, in translating µǫ α. τ, we could put a suspension on each occurrence of α in τ, rather than a single suspension on the outside of τ. Since τ is often a sum type, writing +ǫ already puts a thunk on τ; we don’t need a thunk around a thunk. But by the same token, suspensions around the occurrences of α can also lead to double thunks: translating the type of lazy natural numbers µN α. (1+N α) would give µα. N◮(1+N◮α) , which expands to N◮ 1 + N◮N◮(1 + . . . ) . Expression e with τ-annotations translates to expression e ′ with S-annotations ⌊(e:τ)⌋ = (⌊e⌋: ⌊τ⌋ ) ⌊e[τ]⌋ = ⌊e⌋[ ⌊τ⌋ ] ⌊e1 @ e2 ⌋ = ⌊e1 ⌋ @ ⌊e2 ⌋ etc. Figure 7. Type translation into the economical language The impartial type system directly generalizes a call-by-value system and a call-by-name system, but the profusion of connectives is unwieldy, and impartiality doesn’t fit a standard operational semantics. Instead of elaborating the impartial system into our target language, we pause to develop an economical type system whose standard connectives (→, ∗, +, µ) are by-value, but with a suspension point ǫ◮S to provide by-name behaviour. This intermediate system yields a straightforward elaboration. It also constitutes an alternative source language that, while biased towards call-byvalue, conveniently allows call-by-name and evaluation-order polymorphism. In the grammar in Figure 8, the economical types S are obtained from the impartial types τ by dropping all the ǫ decorations and adding a connective ǫ◮S (read “ǫ suspend S”). When ǫ is V, this connective is a no-op: elaborating e at type V◮S and at type S yield the same term. But when ǫ is N, elaborating e at type N◮S is like elaborating e at type 1 → S. In economical typing contexts Γ , variables x denote values, so we replace the assumption form x ϕ ⇒ τ with x : S. Similarly, we replace u ⊤ ⇒ τ with u : S. Dropping ǫ decorations means that—apart from the valueness annotations—most of the economical rules in Figure 8 look fairly standard. The only new rules are for suspension points ǫ◮, halfway down Figure 8. It would be nice to have only two rules (an introduction and an elimination), but we need to track whether e is a value, The rationales for our translation of products and recursive types are less clear than the rationale for sum types; it’s possible that different encodings would be preferred in practice. The above translation does allow programmers to use the alternative encodings, though awkwardly. For example, a two-thunk variant of τ1 ∗ǫ τ2 can be obtained by writing (µǫ β. τ1 ) ∗V (µǫ β. τ2 ), where β doesn’t occur; the only purpose of µ here is to insert a suspension. (This suggests a kind of ill-founded argument for our chosen translation of µ: it enables us to insert suspensions, albeit awkwardly.) 3.2 Programming with Economical Types We can translate the list/stream example from Section 2.3 to the economical system:  type List a α = µβ. a◮ 1 + (α ∗ β) The body of map is the same; only the type annotation is different. map : Da. ∀α. (α → β) → (List a α) → (List a β) = Λα. fix map. λf. λxs. case(xs, x1 .inj1 (), x2 .inj2 (f @ (proj1 x2 ), map @ f @ (proj2 x2 ))) V The above type for map corresponds to the impartial type with →. At the end of Section 2.3, we gave a very generic type for map, which we can translate to the economical system: Da1 , a2 , a3 , a4 , a5 .   ∀α. a2 ◮ (a1 ◮α) → β → a4 ◮(List a3 α) → (List a5 β) 7 (262) 2015/9/15 Economical types S ::= 1 | α | ∀α. S | Da. S | ǫ◮S | S1 → S2 | S1 ∗ S2 | S1 + S2 | µα. S Econ. typing contexts Γ ::= · | Γ, x : S | Γ, u : S | Γ, a evalorder | Γ, α type Econ. source expressions e ::= . . . | Λα. e | e[ S ] | (e: S ) Γ ⊢E e ϕ ⇐ S Source expression e checks against economical type S Γ ⊢E e ϕ ⇒ S Source expression e synthesizes economical type S (x : S) ∈ Γ Evar Γ ⊢E x val ⇒ S ∀ (u : S) ∈ Γ Efixvar Γ ⊢E u ⊤ ⇒ S Γ, α type ⊢E e val ⇐ S E∀Intro Γ ⊢E Λα. e val ⇐ ∀α. S Γ ⊢E e ϕ ⇐ S E◮Intro Γ ⊢E e ϕ ⇐ ǫ◮S Γ ⊢E e val ⇐ N◮S ǫ◮ + 1 Γ ⊢E e ϕ ⇐ S Eanno Γ ⊢E (e:S) ϕ ⇒ S Γ ⊢E () val ⇐ 1 E1Intro Γ ⊢E e ϕ ⇒ Da. S Γ ⊢ ǫ evalorder EDElim Γ ⊢E e ϕ ⇒ [ǫ/a]S Γ ⊢E e ϕ ⇒ V◮S E◮ElimV Γ ⊢E e ϕ ⇒ S Γ, x : S1 ⊢E e ϕ ⇐ S2 E→Intro Γ ⊢E (λx. e) val ⇐ (S1 → S2 ) ∗ Γ ⊢E e ϕ ⇒ S Esub Γ ⊢E e ϕ ⇐ S Γ ⊢E e ϕ ⇒ ∀α. S Γ ⊢ S ′ type E∀Elim ′ Γ ⊢E e[S ] ϕ ⇒ [S ′ /α]S Γ, a evalorder ⊢E e val ⇐ S EDIntro Γ ⊢E e val ⇐ Da. S D → Γ, u : S ⊢E e ϕ ⇐ S Efix Γ ⊢E (fix u. e) ⊤ ⇐ S Γ ⊢E e1 Γ ⊢E e ϕ ⇒ ǫ◮S E◮Elimǫ Γ ⊢E e ⊤ ⇒ S (S1 → S2 ) Γ ⊢E e2 Γ ⊢E (e1 @ e2 ) ⊤ ⇒ S2 ϕ1 ⇒ Γ ⊢E e1 ϕ1 ⇐ S1 Γ ⊢E e2 ϕ2 ⇐ S2 E∗Intro Γ ⊢E (e1 , e2 ) ϕ1 ⊔ϕ2 ⇐ (S1 ∗ S2 ) ϕ2 ⇐ E→Elim Γ ⊢E e ϕ ⇒ (S1 ∗ S2 ) E∗Elimk Γ ⊢E (projk e) ⊤ ⇒ Sk Γ, x1 : S1 ⊢E e1 Γ, x2 : S2 ⊢E e2 Γ ⊢E e ϕ0 ⇒ (S1 + S2 ) Γ ⊢E case(e, x1 .e1 , x2 .e2 ) ⊤ ⇐ S Γ ⊢E e ϕ ⇐ S k E+Introk Γ ⊢E (injk e) ϕ ⇐ (S1 + S2 )    Γ ⊢E e ϕ ⇐ (µα. S) α S EµIntro Γ ⊢E e ϕ ⇐ µα. S S1 ϕ1 ⇐ ϕ2 ⇐ S S E+Elim Γ ⊢E e ϕ ⇒ µα. S    EµElim Γ ⊢E e ⊤ ⇒ (µα. S) α S µ Figure 8. Economical bidirectional typing This type might not look economical, but makes redundant suspensions more evident: List a3 α is µ· · ·. a3 ◮ · · · , so the suspension controlled by a4 is never useful, showing that a4 is unnecessary. Target terms M ::= () | x | λx. M | M1 M2 | u | fix u. M | Λ__. M | M[__] | thunk M | force M | (M1, M2 ) | projk M | injk M | case(M, x1 .M1 , x2 .M2 ) | roll M | unroll M Values W ::= () | x | λx. M | Λ__. M | thunk M | (W1, W2 ) | injk W | roll W Valuables Ṽ ::= () | x | λx. M | Λ__. Ṽ | Ṽ[__] | thunk M | (Ṽ1, Ṽ2 ) | projk Ṽ | injk Ṽ | roll Ṽ | unroll Ṽ 3.3 Economizing The main result of this section is that impartial typing derivations can be transformed into economical typing derivations. The proof (Dunfield 2015, Appendix B.3) relies on a lemma that converts typing assumptions with V◮S ′ to assumptions with S ′ . Theorem 1 (Economizing). (1) If γ ⊢I e ϕ ⇒ τ then ⌊γ⌋ ⊢E ⌊e⌋ ϕ ⇒ ⌊τ⌋. (2) If γ ⊢I e ϕ ⇐ τ then ⌊γ⌋ ⊢E ⌊e⌋ ϕ ⇐ ⌊τ⌋. Eval. contexts C ::= [ ] | C @ M2 | W1 @ C | C[__] | force C | (C, M2 ) | (W1, C) | projk C | injk C | case(C, x1 .M1 , x2 .M2 ) | roll C | unroll C Target types A, B ::= 1 | α | ∀α. A | A1 → A2 | U A1 | A1 ∗ A2 | A1 + A2 | µα. A Typing contexts G ::= · | G, x : A | G, α type 4. Target Language Our target language (Figure 9) has by-value →, ∗, + and µ connectives, ∀, and a U connective (for thunks). The ∀ connective has explicit introduction and elimination forms Λ__. M and M[__]. This “type-free” style is a compromise between having no explicit forms for ∀ and having explicit forms that contain types (Λα. M and A[M]). Having no explicit forms would complicate some proofs; including the types would mean that target terms contain types, giving a misleading impression that operational behaviour is influenced by types. The target language also has an explicit introduction form roll M and elimination form unroll M for µ types. As with ∀, we distinguish thunks to simplify some proofs: Source expressions typed with the N◮ connective are elaborated to thunk M, rather than to a λ with an unused bound variable. Figure 9. Syntax of the target language Dually, eliminating N◮ results in a target term force M, rather than to M(). 4.1 Typing Rules Figure 10 shows the typing rules for our target language. These are standard except for the T∀Intro rule and the rules for thunks: 8 (263) 2015/9/15 Target term M G ⊢T M : A has target type A (x : A) ∈ G Tvar G ⊢T x : A ∀ M 7→ M ′ Target term M steps (by-value) to target term M ′ T1Intro G ⊢T M1 : A → B G, x : A ⊢T M : B G ⊢T M2 : A T→Intro T→Elim G ⊢T (λx. M) : A→B G ⊢T (M1 M2 ) : B U G⊢ M 7→R M ′ StepContext C[M] 7→ C[M ′ ] (u : A) ∈ G G, u : A ⊢T e : A Tfixvar Tfix G ⊢T u : A G ⊢T (fix u. e) : A G ⊢T M : ∀α. A G, α type ⊢T Ṽ : A G ⊢ A ′ type T∀Intro T∀Elim G ⊢T Λ__. Ṽ : ∀α. A G ⊢T M[__] : [A ′ /α]A → ∗ G ⊢T () : 1 G ⊢T M : B TUIntro thunk M : U B T G ⊢T M1 : U B TUElim G ⊢T force M1 : B M 7→R M ′ Target redex M reduces (by-value) to M ′ (λx. M) @ W 7→R [W/x]M βReduce force (thunk M) 7→R M forceReduce    (fix u. M) 7→R (fix u. M) u M fixReduce (Λ__. M)[__] 7→R M tyappReduce projk ((W1, W2 )) 7→R Wk projReduce case(injk W, x1 .M1 , x2 .M2 ) 7→R [W/xk ]Mk caseReduce unroll (roll W) 7→R W unrollReduce Figure 11. Target language operational semantics G ⊢T M1 : A1 G ⊢T M : A1 ∗A2 G ⊢T M2 : A2 T∗Intro T∗Elimk G ⊢T (M1,M2 ) : A1 ∗A2 G ⊢T projk M : Ak G ⊢T M : Ak T+Introk T injk M : A1 +A2 +G ⊢ µ G ⊢T M : A1 +A2 G, x1 :A1 ⊢T M1 : A G, x2 :A2 ⊢T M2 : A G ⊢T case(M, x1 .M1 , x2 .M2 ) : A |S| = A Economical type S elaborates to target type A |1| |S1 → S2 | |S1 + S2 | |α| |∀α. S| T+Elim G ⊢T M : [µα. A/α]A G ⊢T M : µα. A TµIntro TµElim G ⊢T roll M : µα. A G ⊢T unroll M : [µα. A/α]A |Γ | = G = = = = = 1 |S1 | → |S2 | |S1 | + |S2 | α ∀α. |S| Valuability restriction. Though we omit mutable references from the target language, we want the type system to accommodate them. Using the standard syntactic value restriction (Wright 1995) would spoil this language as a target for our elaboration: when source typing uses elab∀Intro, it requires that the source expression be a value (not syntactically, but according to the source typing derivation). Yet if that source value is typed using elabDElim, it will elaborate to a projection, which is not a syntactic value. So we use a valuability restriction in T∀Intro. A target term is a valuable Ṽ if it is a value (e.g. λx. M) or is a projection, injection, roll or unroll of something that is valuable (Figure 9). Later, we’ll prove that if a source expression is a value (according to the source typing derivation), its elaboration is valuable (Lemma 6). Thunks. We give thunk M the type U B for “thUnk B” (if M has type B); force M eliminates this connective. 4.2 Operational Semantics The target operational semantics has two relations: M 7→R M ′ , read “M reduces to M ′ ”, and M 7→ M ′ , read “M steps to M ′ ”. The latter has only one rule, StepContext, which says that C[M] 7→ C[M ′ ] if M 7→R M ′ , where C is an evaluation context (Figure 9). The rules for 7→R (Figure 11) reduce a λ applied to a value; a force of a thunk; a fixed point; a type application; a projection of a pair of values; a case over an injected value; and an unroll of a rolled value. Apart from force (thunk M), which we can view as strange syntax for (λx. M)(), this is all standard: these definitions use values W, not valuables Ṽ. 4.3 Type Safety Lemma 2 (Valuability). If Ṽ 7→ M ′ or Ṽ 7→R M ′ then M ′ is valuable, that is, there exists Ṽ ′ = M ′ . Lemma 3 (Substitution). If G, x : A ′ , G ′ ⊢T M : A and G ⊢T W : A ′ then G, G ′ ⊢T [W/x]M : A. = = = = |S| U |S| |[V/a]S| ∗ |[N/a]S| µα. |S| Economical typing context Γ elaborates to target typing context G |·| = · |Γ, α type| = |Γ |, α type |Γ, a evalorder| undefined Figure 10. Target language type system |V◮S| |N◮S| |Da. S| |µα. S| |Γ, x : S| = |Γ |, x : |S| |Γ, u : S| = |Γ |, u : |S| Figure 12. Translation from economical types to target types Theorem 4 (Type safety). If · ⊢T M : A then either M is a value, or M 7→ M ′ and G ⊢T M ′ : A. Proof. By induction on the derivation of G ⊢T M : A, using Lemma 3 and standard inversion lemmas, which we omit. 5. Elaboration Now we extend the economical typing judgment with an output M, a target term: Γ ⊢ e ϕ : S ֒→ M. The target term M should be well-typed using the typing rules in Figure 10, but what type should it have? We answer this question by defining another translation on types. This function, defined by a function |S| = A, translates an economical source type S to a target type A. We will show that if e ϕ : S ֒→ M then M : A, where A = |S|; this is Theorem 10. Our translation follows a similar approach to Dunfield (2014). However, that system had general intersection types A1 ∧ A2 , where A1 and A2 don’t necessarily have the same structure. In contrast, we have Da. A which corresponds to ([V/a]A) ∧ ([N/a]A). We also differ in having recursive types; since these are explicitly rolled (or folded) and unrolled in our target language, our rules elabµIntro and elabµElim add these constructs. Not bidirectional. We want to relate the operational behaviour of a source expression to the operational behaviour of its elaboration. Since our source operational semantics is over type-erased source expressions, it will be convenient for elaboration to work on erased source expressions. Without type annotations, we can collapse the bidirectional judgments into a single judgment (with “:” in place of ⇐/⇒); this obviates the need for elaboration versions of Esub and Eanno, which merely switch between ⇐ and ⇒. 9 (264) 2015/9/15 Γ ⊢ e ϕ : S ֒→ M Erased source expression e elaborates at type S to target term M (x : S) ∈ Γ elabvar Γ ⊢ x val : S ֒→ x ∀ D + Γ ⊢ e val : [V/a]S ֒→ M1 Γ ⊢ e val : [N/a]S ֒→ M2 elabDIntro Γ ⊢ e val : (Da. S) ֒→ (M1, M2 ) elab1Intro Γ ⊢ e ϕ : (Da. S) ֒→ M elabDElim Γ ⊢ e ϕ : [V/a]S ֒→ (proj1 M) Γ ⊢ e ϕ : [N/a]S ֒→ (proj2 M) Γ ⊢ e ϕ : V◮S ֒→ M Γ ⊢ e ϕ : N◮S ֒→ M elab◮ElimV elab◮ElimN Γ ⊢ e ϕ : S ֒→ M Γ ⊢ e ⊤ : S ֒→ (force M) Γ, x : S1 ⊢ e ϕ : S2 ֒→ M elab→Intro Γ ⊢ (λx. e) val : (S1 → S2 ) ֒→ λx. M ∗ Γ ⊢ () val : 1 ֒→ () Γ ⊢ e ϕ : ∀α. S ֒→ M Γ ⊢ S ′ type elab∀Elim ′ Γ ⊢ e ϕ : [S /α]S ֒→ M[__] Γ, α type ⊢ e val : S ֒→ M elab∀Intro Γ ⊢ e val : ∀α. S ֒→ Λ__. M Γ ⊢ e ϕ : S ֒→ M elab◮Intro Γ ⊢ e ϕ : V◮S ֒→ M Γ ⊢ e val : N◮S ֒→ (thunk M) ǫ◮ → (u : S) ∈ Γ Γ, u : S ⊢ e ϕ : S ֒→ M elabfixvar elabfix Γ ⊢ u ⊤ : S ֒→ u Γ ⊢ (fix u. e) ⊤ : S ֒→ (fix u. M) Γ ⊢ e1 ϕ1 : Γ ⊢ e2 ϕ2 : S2 ֒→ M2 Γ ⊢ e1 ϕ1 : S1 ֒→ M1 elab∗Intro Γ ⊢ (e1 , e2 ) ϕ1 ⊔ϕ2 : (S1 ∗ S2 ) ֒→ (M1, M2 ) Γ ⊢ e ϕ : Sk ֒→ M elab+Introk Γ ⊢ (injk e) ϕ : (S1 + S2 ) ֒→ (injk M)   Γ ⊢ e ϕ : (µα. S)/α S ֒→ M elabµIntro Γ ⊢ e ϕ : µα. S ֒→ (roll M) (S1 → S2 ) ֒→ M1 Γ ⊢ e2 ϕ2 : S1 ֒→ M2 elab→Elim Γ ⊢ (e1 @ e2 ) ⊤ : S2 ֒→ (M1 M2 ) Γ ⊢ e ϕ : (S1 ∗ S2 ) ֒→ M elab∗Elimk Γ ⊢ (projk e) ⊤ : Sk ֒→ (projk M) Γ, x1 : S1 ⊢ e1 ϕ1 : S ֒→ M1 Γ ⊢ e ϕ0 : (S1 + S2 ) ֒→ M0 Γ, x2 : S2 ⊢ e2 ϕ2 : S ֒→ M2 elab+Elim Γ ⊢ case(e, x1 .e1 , x2 .e2 ) ⊤ : S ֒→ case(M0 , x1 .M1 , x2 .M2 ) Γ ⊢ e ϕ : µα. S ֒→ M   elabµElim Γ ⊢ e ⊤ : (µα. S)/α S ֒→ (unroll M) µ Figure 13. Elaboration Elaboration rules. We are elaborating the economical type system, which has by-value connectives, into the target type system, which also has by-value connectives. Most of the elaboration rules just map source constructs into the corresponding target constructs; for example, elabvar elaborates x to x, and elab→Intro elaborates λx. e to λx. M where e elaborates to M. Elaborating ∀. Rule elab∀Intro elaborates e (which is typeerased and thus has no explicit source construct) to the target type abstraction Λ__. M; rule elab∀Elim elaborates to a target type application M[__]. Elaborating D. Rule elabDIntro elaborates an e at type Da. S to a pair with the elaborations of e at type [V/a]S and at [N/a]S. Note that unlike the corresponding rule EDIntro in the non-elaborating economical type system, which introduces a variable a into Γ and types e parametrically, elabDIntro substitutes concrete evaluation orders V and N for a. Consequently, the Γ in the elaboration judgment never contains a evalorder declarations. Rule elabDElim elaborates to the appropriate projection. Elaborating ◮. Rule elab◮Intro has two conclusions. The first conclusion elaborates at type V◮S as if elaborating at type S. The second conclusion elaborates at N◮S to a thunk. Correspondingly, rule elab◮ElimV ignores the V suspension, and rule elab◮ElimN forces the thunk introduced via elab◮Intro. 5.1 Elaboration Type Soundness The main result of this section (Theorem 10) is that, given a nonelaborating economical typing derivation Γ ⊢E e ϕ ⇐ S, we can derive Γ ⊢ er(e) ϕ ′ : S ֒→ M such that the target term M is welltyped. The erasure function er(e), defined in Figure 6, removes type annotations, type abstractions, and type applications. It will be useful to relate various notions of valueness. First, if e elaborates to a syntactic target value W, then the elaboration rules deem e to be a (source) value. Lemma 5. If Γ ⊢ e ϕ : S ֒→ W then ϕ = val. Second, if e is a value according to the source typing rules, its elaboration M is valuable (but not necessarily a syntactic target value). Lemma 6 (Elaboration valuability). If Γ ⊢ e val : S ֒→ M then M is valuable, that is, there exists Ṽ such that M = Ṽ. Several substitution lemmas are required. The first is for the non-elaborating economical type system; we’ll use it in the EDIntro case of the main proof to remove a evalorder declarations. Lemma 7 (Substitution—Evaluation orders). (1) If Γ, a evalorder, Γ ′ ⊢ S type and Γ ⊢ ǫ evalorder then Γ, [ǫ/a]Γ ′ ⊢ [ǫ/a]S type. (2) If D derives Γ, a evalorder, Γ ′ ⊢E e ϕ ⇐ S and Γ ⊢ ǫ evalorder then D ′ derives Γ, [ǫ/a]Γ ′ ⊢E e ϕ ⇐ [ǫ/a]S where D ′ is not larger than D. (3) If D derives Γ, a evalorder, Γ ′ ⊢E e ϕ ⇒ S and Γ ⊢ ǫ evalorder, then D ′ derives Γ, [ǫ/a]Γ ′ ⊢E e ϕ ⇒ [ǫ/a]S where D ′ is not larger than D. Next, we show that an expression e1 can be substituted for a variable x, provided e1 elaborates to a target value W. Lemma 8 (Expression substitution). (1) If Γ ⊢ e1 ϕ1 : S1 ֒→ W and Γ, x : S1 , Γ ′ ⊢ e2 ϕ2 : S ֒→ M then Γ, Γ ′ ⊢ [e1 /x]e2 ϕ2 : S ֒→ [W/x]M. (2) If Γ ⊢ fix u. e1 ⊤ : S1 ֒→ fix u. M1 and Γ, u : S1 ,Γ ′ ⊢ e2 ϕ2: S֒→ M    then Γ, Γ ′ ⊢ (fix u. e1 ) u e2 ϕ2 : S ֒→ (fix u. M1 ) u M. 10 (265) 2015/9/15 Lemma 9 (Type translation well-formedness). If Γ ⊢ S type then |Γ | ⊢ |S| type. We can now state the main result of this section: Theorem 10 (Elaboration type soundness). If Γ ⊢E e ϕ ⇐ S or Γ ⊢E e ϕ ⇒ S where Γ ⊢ S type and Γ contains no a evalorder declarations then there exists M such that Γ ⊢ er(e) ϕ ′ : S ֒→ M where ϕ ′ ⊑ ϕ and |Γ | ⊢T M : |S|. The proof is in Dunfield (2015, Appendix B.5). In this theorem, the resulting elaboration judgment has a valueness ϕ ′ that can be more precise than the valueness ϕ in the non-elaborating judgment. Suppose that, inside a derivation of a evalorder ⊢E e val ⇐ S, we have a evalorder ⊢E e ′ val ⇐ a◮S ′ E◮Elimǫ a evalorder ⊢E e ′ ⊤ ⇐ S ′ The valueness in the conclusion must be ⊤, because we might substitute N for a, which is elaborated to a force, which is not a value. Now suppose we substitute V for a. We need to construct an elaboration derivation, and the only rule that works is elab◮ElimV : This says e ′ is a value (val), where the original (parametric) economical typing judgment had ⊤: Substituting a concrete object (here, V) for a variable a increases information, refining ⊤ (“I cannot prove this is a value”) into val. In the introduction rules, substituting N for a can replace ⊤ with val, because we know we’re elaborating to a thunk, which is a value. (1) An impartial type τ is N-free iff (i) for each ǫ appearing in S, the evaluation order ǫ is V; and (ii) τ has no D quantifiers. (2) A judgment γ ⊢I e ϕ ⇐ τ or γ ⊢I e ϕ ⇒ τ is N-free iff: (a) γ has no a evalorder declarations; (b) in each declaration x ϕ ⇒ τ in γ, the valueness ϕ is val and the type τ is N-free; (c) all types appearing in e are N-free; and (d) τ is N-free. (1) An economical type S is N-free iff (i) for each ǫ◮S0 appearing in S, the evaluation order ǫ is V; and (ii) S has no D quantifiers. (2) A judgment Γ ⊢E e ϕ ⇐ S or Γ ⊢E e ϕ ⇒ S is N-free iff: (a) Γ has no a evalorder declarations; (b) all types S ′ in Γ are N-free; (c) all types appearing in e are N-free; and (d) S is N-free. Definition 3 (N-freeness—target). A target term M is N-free iff it contains no thunk and force constructs. 6.3 Lemmas for Consistency 6. Consistency Our main result in this section, Theorem 15, says that if e elaborates to a target term M, and M steps (zero or more times) to a target value W, then e steps (zero or more times) to some e ′ that elaborates to W. The source language stepping relation (Figure 5) allows both by-value and (more permissive) by-name reductions, raising the concern that a call-by-value program might elaborate to a callby-name target program, that is, one taking steps that correspond to by-name reductions in the source program. So we strengthen the statement, showing that if M is completely free of by-name constructs, then all the steps taken in the source program are by-value. That still leaves the possibility that we messed up our elaboration rules, such that a call-by-value source program elaborates to an M that contains by-name constructs. So we prove (Theorem 18) that if the source program is completely free of by-name constructs, its elaboration M is also free of by-name constructs. Similarly, we prove (Theorem 17) that creating an economical typing derivation from an impartial typing derivation preserves N-freeness. Proofs can be found in Dunfield (2015, Appendix B.6). 6.1 Source-Side Consistency? A source expression typed by name won’t get stuck if a by-value reduction is chosen, but it may diverge instead of terminating. N Suppose we have typed (λx. x) against τ → τ. Taking only a byname reduction, we have [(fix u. u)/x]() = () using βNreduce However, if we “contradict” the typing derivation by taking byvalue reductions, we diverge: (λx. ())(fix u. u) 6.2 Defining N-Freeness Definition 1 (N-freeness—impartial). Definition 2 (N-freeness—economical). · ⊢ e ′ val : V◮S ′ ֒→ M elab◮ElimV · ⊢ e ′ val : S ′ ֒→ M (λx. ())(fix u. u) To get a source type safety result that is both direct (without appealing to elaboration and target reductions) and useful, we’d need to give a semantics of “reduction with respect to a typing derivation”, or else reduction of a typing derivation. Such a semantics would support reasoning about local transformations of source programs. It should also lead to a converse of the consistency result in this section: if a source expression reduces with respect to a typing derivation, and that typing derivation corresponds to an elaboration derivation, then the target program obtained by elaboration can be correspondingly reduced.  (λx. ()) [(fix u. u)/u]u using fixVreduce = (λx. ())(fix u. u) ... We’re used to type safety being “up to” nontermination in the sense that we either get a value or diverge, without getting stuck, but this is worse: divergence depends on which reductions are chosen. An inversion lemma allows types of the form V◮ . . . V◮S, a generalization needed for the elab◮ElimV case; when we use the lemma in the consistency proof, the type is not headed by V◮: Lemma 11 (Inversion). Given · ⊢ e ϕ : |V◮ .{z . . V◮} S ֒→ M: 0 or more (0) If M = (λx. M0 ) and S = (S1 → S2 ) then e = (λx. e0 ) and ·, x : S1 ⊢ e0 ϕ ′ : S2 ֒→ M0 . (1) If M = (W1, W2 ) and S = (Da. S0 ) then · ⊢ e ϕ : [V/a]S0 ֒→ W1 and · ⊢ e ϕ : [N/a]S0 ֒→ W2 . (2) If M = thunk M0 and S = N◮S0 then · ⊢ e ϕ ′ : S0 ֒→ M0 . Parts (3)–(6), for ∀, +, µ and ∗, are stated in the appendix. Previously, we showed that if a source expression elaborates to a target value, source typing says the expression is a value (ϕ = val); here, we show that if a source expression elaborates to a target value that is N-free (ruling out thunk M produced by the second conclusion of elab◮Intro), then e is a syntactic value. Lemma 12 (Syntactic values). If Γ ⊢ e val : S ֒→ W and W is N-free then e is a syntactic value. The next lemma just says that the 7→ relation doesn’t produce thunks and forces out of thin air. Lemma 13 (Stepping preserves N-freeness). If M is N-free and M 7→ M ′ then M ′ is N-free. The proof is by cases on the derivation of M 7→ M ′ , using the fact that if M0 and M1 are N-free, then [M0 /x]M1 is N-free. 6.4 Consistency Results Theorem 14 (Consistency). If · ⊢ e ϕ : S ֒→ M and M 7→ M ′ then there exists e ′ such that e ∗ e ′ and · ⊢ e ′ ϕ ′ : S ֒→ M ′ and ϕ ′ ⊑ ϕ. Moreover: (1) If ϕ = val then e ′ = e. (2) If M is N-free then e ∗ e ′ can be derived without using SrcStepCtxN. 11 (266) 2015/9/15 Result (1), under “moreover”, amounts to saying that values don’t step. Result (2) stops us from lazily sneaking in uses of SrcStepCtxN instead of showing that, given N-free M, we can always find a by-value evaluation context for use in SrcStepCtxV. Theorem 15 (Multi-step consistency). If · ⊢ e ϕ : S ֒→ M and M 7→∗ W then there exists e ′ such that e ∗ e ′ and · ⊢ e ′ val : S ֒→ W. Moreover, if M is N-free then we can derive e ∗ e ′ without using SrcStepCtxN. 6.5 Preservation of N-Freeness Lemma 16. If Γ ⊢E e ϕ ⇒ S and S is not N-free then it is not the case that both Γ and e are N-free. Theorem 17 (Economizing preserves N-freeness). If γ ⊢I e ϕ ⇐ τ (resp. ⇒) where the judgment is N-free (Definition 1 (2)) then ⌊γ⌋ ⊢E ⌊e⌋ ϕ ⇐ ⌊τ⌋ (resp. ⇒) where this judgment is N-free (Definition 2 (2)). Theorem 18 (Elaboration preserves N-freeness). If Γ ⊢E e ϕ ⇐ S (or ⇒) where the judgment is N-free (Definition 2 (2)) then Γ ⊢ er(e) ϕ : S ֒→ M such that M is N-free. 7. Related Work History of evaluation order. In the λ-calculus, normal-order (leftmost-outermost) reduction seems to have preceded anything resembling call-by-value, but Bernays (1936) suggested requiring that the term being substituted in a reduction be in normal form. In programming languages, Algol-60 originated call-by-name and also provided call-by-value (Naur et al. 1960, 4.7.3); while the decision to make the former the default is debatable, direct support for two evaluation orders made Algol-60 an improvement on many of its successors. Plotkin (1975) related cbv and cbn to the λ-calculus, and developed translations between them. Call-by-need or lazy evaluation was developed in the 1970s with the goal of doing as little computational work as possible, under which we can include the unbounded work of not terminating (Wadsworth 1971; Henderson and Morris 1976; Friedman and Wise 1976). Laziness in call-by-value languages. Type-based support for selective lazy evaluation has been developed for cbv languages, including Standard ML (Wadler et al. 1998) and Java (Warth 2007). These approaches allow programmers to conveniently switch to another evaluation order, but don’t allow polymorphism over evaluation orders. Like our economical type system, these approaches are biased towards one evaluation order. General coercions. General approaches to typed coercions were explored by Breazu-Tannen et al. (1991) and Barthe (1996). Swamy et al. (2009) developed a general typed coercion system for a simply-typed calculus, giving thunks as an example. In addition to annotations on all λ arguments, their system requires thunks (but not forces) to be written explicitly. Intersection types. While this paper avoids the notation of intersection types, the quantifier D is essentially an intersection type of a very specific form. Theories of intersection types were originally developed by Coppo et al. (1981), among others; Hindley (1992) gives a useful introduction and survey. Intersections entered programming languages—as opposed to λ-calculus—when Reynolds (1996) put them at the heart of the Forsythe language. Subsequently—Reynolds’s paper describes ideas he developed in the 1980s—Freeman and Pfenning (1991) started a line of research on refinement intersections, where both parts of an intersection must refine the same base type (essentially, the same ML type). The D intersection in this paper mixes features of general intersection and refinement intersection: the V and N instantiations have close-to-identical structure, but cbv and cbn functions aren’t refinements of some “order-agnostic” base type. Our approach is descended mainly from the system of Dunfield (2014), which elaborates (general) intersection and union types into ordinary product and sum types. We differ in not having a source-level ‘merge’ construct e1 ,, e2 , where the type system can select either e1 or e2 , ignoring the other component. Since e1 and e2 are not prevented from having the same type, the type system may elaborate either expression, resulting in unpredictable behaviour. In our type systems, we can think of @ in the source language as a merge ( @V ,, @N ), but the components have incompatible types. Moreover, the components must behave the same apart from evaluation order (evoking a standard property of systems of refinement intersection). Alternative target languages. The impartial type system for our source language suggests that we should consider targeting an impartial, but more explicit, target language. In an untyped setting, Asperti (1990) developed a calculus with call-by-value and call-byname λ-abstractions; function application is disambiguated at run time. In a typed setting, call-by-push-value (Levy 1999) systematically distinguishes values and computations; it has a thunk type U (whence our notation) but also a dual, “lift” F, which constructs a computation out of a value type. Early in the development of this paper, we tried to elaborate directly from the impartial type system to cbpv, without success. Levy’s elegant pair of translations from cbv and from cbn don’t seem to fit together easily; our feeling is that a combined translation would be either complicated, or prone to generating many redundant forces and thunks. Zeilberger (2009) defined a polarized type system with positive and negative forms of each standard connective. In that system, ↓ and ↑ connectives alternate between polarities, akin to U and F in call-by-push-value. Zeilberger’s system has a symmetric function type, rather than the asymmetric function type found in cbpv. We guess that a translation into this system would have similar issues as with call-by-push-value. 8. Future Work This paper develops type systems with multiple evaluation orders and polymorphism over evaluation orders, opening up the design space. More work is needed to realize these ideas in practice. Implicit polymorphism. We made type polymorphism explicit, to prevent the type system from guessing evaluation orders. A practical system should find polymorphic instances without guessing, perhaps based on existential type variables (Dunfield and Krishnaswami 2013). We could also try to use some form of (lexically scoped?) default evaluation order. Such a default could also be useful for deciding whether some language features, such as letexpressions, should be by-value or by-name. Exponential expansion. Our rules elaborate a function typed with n D quantifiers into 2n instantiations. Only experience can demonstrate whether this is a problem in practice, but we have reasons to be optimistic. First, we need the right point of comparison. The alternative to elaborating map into, say, 8 instantiations is to write 8 copies of map by hand. Viewed this way, elaboration maintains the size of the target program, while allowing an exponentially shorter source program! (This is the flipside of a sleight-of-hand from complexity theory, where you can make an algorithm look faster by inflating the input: Given an algorithm that takes 2n time, where n is the number of bits in the input integer, we can get a purportedly polynomial algorithm by encoding the input in unary.) Second, a compiler could analyze the source program and generate only the instances actually used, similar to monomorphization of ∀-polymorphism in MLton (mlton.org). 12 (267) 2015/9/15 Other evaluation orders. Our particular choice of evaluation orders is not especially practical: the major competitor to call-byvalue is call-by-need, not call-by-name. We chose call-by-name for simplicity (for example, in the source reduction rules), but many of our techniques should be directly applicable to call-by-need: elaboration would produce thunks in much the same way, just for a different dynamic semantics. Moreover, our approach could be extended to more than two evaluation orders, using an n-way intersection that elaborates to an n-tuple. One could also take “order” very literally, and support left-toright and right-to-left call-by-value. For low-level reasons, OCaml uses the former when compiling to native code, and the latter when compiling to bytecode. Being able to specify order of evaluation via type annotations could be useful when porting code from Standard ML (which uses left-to-right call-by-value). Program design. We also haven’t addressed questions about when to use what evaluation order. Such questions seem to have been lightly studied, perhaps because of social factors: a programmer may choose a strict language because they tend to solve problems that don’t need laziness—which is self-reinforcing, because laziness is less convenient in a strict language. However, Chang (2014) developed tools, based on both static analysis and dynamic profiling, that suggest where laziness is likely to be helpful. Existential quantification. By analogy to union types (Dunfield 2014), an existential quantifier would elaborate to a sum type. For a example, the sum tag on a function of type ∃a. τ → τ would indicate, at run time, whether the function was by-value or byname. This might resemble a typed version of the calculus of Asperti (1990). Acknowledgments The ICFP reviewers made suggestions and asked questions that have (I believe) improved the paper. The Max Planck Institute for Software Systems supported the early stages of this work. Dmitry Chistikov suggested the symbol D. References A. Asperti. Integrating strict and lazy evaluation: the λsl -calculus. In Programming Language Implementation and Logic Programming, volume 456 of LNCS, pages 238–254. Springer, 1990. H. Barendregt, M. Coppo, and M. Dezani-Ciancaglini. A filter lambda model and the completeness of type assignment. J. Symbolic Logic, 48(4):931–940, 1983. G. Barthe. Implicit coercions in type systems. In Proc. TYPES ’95, volume 1158 of LNCS, pages 1–15, 1996. P. Bernays. Review of “Some Properties of Conversion” by Alonzo Church and J.B. Rosser. J. Symbolic Logic, 1:74–75, 1936. V. Breazu-Tannen, T. Coquand, C. A. Gunter, and A. Scedrov. Inheritance as implicit coercion. Information and Computation, 93(1):172–221, 1991. S. Chang. On the Relationship Between Laziness and Strictness. PhD thesis, Northeastern University, 2014. Y. Chen, J. Dunfield, M. A. Hammer, and U. A. Acar. Implicit self-adjusting computation for purely functional programs. J. Functional Programming, 24(1):56–112, 2014. M. Coppo, M. Dezani-Ciancaglini, and B. Venneri. Functional characters of solvable terms. Zeitschrift f. math. Logik und Grundlagen d. Math., 27:45–58, 1981. R. Davies. Practical Refinement-Type Checking. PhD thesis, Carnegie Mellon University, 2005. CMU-CS-05-110. R. Davies and F. Pfenning. Intersection types and computational effects. In ICFP, pages 198–208, 2000. J. Dunfield. Elaborating intersection and union types. J. Functional Programming, 24(2–3):133–165, 2014. J. Dunfield. Elaborating evaluation-order polymorphism, 2015. Extended version with appendices. arXiv:1504.07680 [cs.PL]. J. Dunfield and N. R. Krishnaswami. Complete and easy bidirectional typechecking for higher-rank polymorphism. In ICFP, 2013. arXiv:1306.6032 [cs.PL]. J. Dunfield and F. Pfenning. Type assignment for intersections and unions in call-by-value languages. In FoSSaCS, pages 250–266, 2003. J. Dunfield and F. Pfenning. Tridirectional typechecking. In Principles of Programming Languages, pages 281–292, 2004. T. Freeman and F. Pfenning. Refinement types for ML. In PLDI, pages 268–277, 1991. D. P. Friedman and D. S. Wise. CONS should not evaluate its arguments. In ICALP, pages 257–284. Edinburgh Univ. Press, 1976. A. Frisch, G. Castagna, and V. Benzaken. Semantic subtyping. In Logic in Computer Science, 2002. P. Henderson and J. H. Morris, Jr. A lazy evaluator. In Principles of Programming Languages, pages 95–103. ACM, 1976. J. R. Hindley. Types with intersection: An introduction. Formal Aspects of Computing, 4:470–486, 1992. D. Leivant. Typing and computational properties of lambda expressions. Theoretical Computer Science, 44(0):51–68, 1986. P. B. Levy. Call-by-push-value: A subsuming paradigm. In Typed Lambda Calculi and Applications, pages 228–243. Springer, 1999. R. Milner, M. Tofte, R. Harper, and D. MacQueen. The Definition of Standard ML (Revised). MIT Press, 1997. P. Naur et al. Report on the algorithmic language ALGOL 60. Comm. ACM, 3(5):299–314, 1960. B. C. Pierce. Types and Programming Languages. MIT Press, 2002. B. C. Pierce and D. N. Turner. Local type inference. ACM Trans. Prog. Lang. Systems, 22:1–44, 2000. G. Plotkin. Call-by-name, call-by-value, and the lambda calculus. Theoretical Computer Science, 1:125–159, 1975. J. C. Reynolds. Design of the programming language Forsythe. Technical Report CMU-CS-96-146, Carnegie Mellon University, 1996. N. Swamy, M. Hicks, and G. M. Bierman. A theory of typed coercions and its applications. In ICFP, pages 329–340, 2009. P. Wadler, W. Taha, and D. MacQueen. How to add laziness to a strict language without even being odd. In Workshop on Standard ML, 1998. http://homepages.inf.ed.ac.uk/ wadler/papers/lazyinstrict/lazyinstrict.ps. C. Wadsworth. Semantics and Pragmatics of the lambda-Calculus. PhD thesis, University of Oxford, 1971. A. Warth. LazyJ: Seamless lazy evaluation in Java. In FOOL, 2007. foolwood07.cs.uchicago.edu/program/warth.pdf. R. L. Wexelblat, editor. History of Programming Languages I. ACM, 1981. A. K. Wright. Simple imperative polymorphism. Lisp and Symbolic Computation, 8(4):343–355, 1995. H. Xi. Dependent Types in Practical Programming. PhD thesis, Carnegie Mellon University, 1998. N. Zeilberger. The Logical Basis of Evaluation Order and PatternMatching. PhD thesis, Carnegie Mellon University, 2009. CMUCS-09-122. 13 (268) 2015/9/15 Erratum: Call-by-name evaluation contexts Corrected in arXiv version 3. What is the mistake? The definition of by-name evaluation contexts in Figure 5 is wrong; it manages to define a peculiarly eager evaluation context that can evaluate a function’s argument before the function has been evaluated, and evaluate inside a pair. In addition to not being call-by-name, this is awfully nondeterministic. By-name eval. contexts CN ::= [ ] | CN @ e2 | e1 @ CN | (CN , e2 ) | (e1 , CN ) | projk CN | injk CN | case(CN , x1 .e1 , x2 .e2 ) The fix is to omit the three boxed alternatives in the grammar. By-name eval. contexts CN ::= [ ] | CN @ e2 | projk CN | injk CN | case(CN , x1 .e1 , x2 .e2 ) The discussion in Section 2.4, marked with a red box, notes that “e1 @ [ ] is a CN but not a CV ”, which matches the (wrong) definition; however, since the definition is wrong, the claim that “the definitions of CN and RN are standard for call-by-name” is utterly wrong. What are its consequences? Few (apart from embarrassment). The consistency result is only a simulation, not a bisimulation. None of the metatheory goes from a source reduction to a target reduction; that is, no claims have the form “given some e e ′ , where e is related to M, produce some M ′ such that ′ M 7→ M ”. In fact, one could add any kind of garbage to the definition of CN , and the metatheory wouldn’t change. Erratum: Uppercase, lowercase Corrected in arXiv version 3. In the published version, the “judgment boxes” heading the rules had Γ instead of γ. Similarly, Theorem 17 had ⌊Γ ⌋ instead of ⌊γ⌋. As these are minor mistakes, they are not highlighted in the text. 14 (269) 2015/9/15 Supplemental material for “Elaborating Evaluation-Order Polymorphism” This section of the extended version (Dunfield 2015) contains the (straightforward) rules for type well-formedness (Appendix A), proofs about economical typing that belong to Section 3 (Appendix B.3), proofs about elaboration typing that belong to Section 5 (Appendix B.5), and consistency proofs that belong to Section 6 (Appendix B.6). A. Type Well-formedness γ ⊢ ǫ evalorder Evaluation order ǫ is well-formed (a evalorder) ∈ γ γ ⊢ a evalorder γ ⊢ V evalorder γ ⊢ N evalorder γ ⊢ τ type Impartial type τ is well-formed (α type) ∈ γ γ ⊢ α type γ ⊢ 1 type γ, α type ⊢ τ type γ ⊢ (∀α. τ) type γ, a evalorder ⊢ τ type γ ⊢ (Da. τ) type γ ⊢ τ1 type γ ⊢ τ2 type γ ⊢ ǫ evalorder ǫ γ ⊢ (τ1 → τ2 ) type γ ⊢ (τ1 ∗ǫ τ2 ) type γ ⊢ (τ1 +ǫ τ2 ) type γ ⊢ ǫ evalorder γ, α type ⊢ τ type γ ⊢ (µǫ α. τ) type Figure 14. Type well-formedness in the impartial type system Γ ⊢ ǫ evalorder Evaluation order ǫ is well-formed (a evalorder) ∈ Γ Γ ⊢ a evalorder Γ ⊢ V evalorder Γ ⊢ N evalorder Γ ⊢ S type Economical type S is well-formed (α type) ∈ Γ Γ ⊢ α type Γ ⊢ 1 type Γ ⊢ ǫ evalorder Γ ⊢ S type Γ ⊢ (ǫ◮S) type Γ, α type ⊢ S type Γ ⊢ (∀α. S) type Γ, a evalorder ⊢ S type Γ ⊢ (Da. S) type Γ ⊢ S1 type Γ ⊢ S2 type Γ ⊢ (S1 → S2 ) type Γ ⊢ (S1 ∗ S2 ) type Γ ⊢ (S1 + S2 ) type Γ, α type ⊢ S type Γ ⊢ (µα. S) type Figure 15. Type well-formedness in the economical type system G ⊢ A type Target type A is well-formed G ⊢ 1 type G ⊢ A type G ⊢ (U A) type (α type) ∈ G G ⊢ α type G ⊢ A1 type G ⊢ A2 type G ⊢ (A1 → A2 ) type G ⊢ (A1 ∗ A2 ) type G ⊢ (A1 + A2 ) type G, α type ⊢ A type G ⊢ (∀α. A) type G, α type ⊢ A type G ⊢ (µα. A) type Figure 16. Type well-formedness in the target type system B. Proofs Notation We present some proofs in a line-by-line style, with the justification for each claim in the rightmost column. We highlight with Z what we needed to show; this is most useful when trying to prove statements with several conclusions, like “if. . . then Q1 and Q2 and Q3”, where we might derive Q2 early (say, directly from the induction hypothesis) but need several more steps to show Q1 and Q3. 15 2015/9/15 B.3 Economical Type System Lemma 19 (Suspension Points). (1) If Γ, x val ⇒ V◮S ′ , Γ ′ ⊢E e ϕ ⇐ S then Γ, x val ⇒ S ′ , Γ ′ ⊢E e ϕ ⇐ S. (2) If Γ, x val ⇒ V◮S ′ , Γ ′ ⊢E e ϕ ⇒ S then Γ, x val ⇒ S ′ , Γ ′ ⊢E e ϕ ⇒ S. Proof. By mutual induction on the given derivation. The Evar case uses E◮Intro (first conclusion). Lemma 20 (Economizing (Types)). If γ ⊢ τ type then ⌊γ⌋ ⊢ ⌊τ⌋ type. Proof. By induction on the derivation of γ ⊢ τ type (Fig. 14). Lemma 21 (Economizing (Eval. Order)). If γ ⊢ ǫ evalorder then ⌊γ⌋ ⊢ ǫ evalorder. Proof. By a straightforward induction on γ. Theorem 1 (Economizing). (1) If γ ⊢I e ϕ ⇒ τ then ⌊γ⌋ ⊢E ⌊e⌋ ϕ ⇒ ⌊τ⌋. (2) If γ ⊢I e ϕ ⇐ τ then ⌊γ⌋ ⊢E ⌊e⌋ ϕ ⇐ ⌊τ⌋. Proof. By induction on the given derivation. • Case γ, (x valueness(ǫ) ⇒ τ1 ) ⊢I e0 ϕ⇐ τ2 I→Intro ǫ γ ⊢I (λx. e0 ) val ⇐ (τ1 → τ2 ) γ, x valueness(ǫ) ⇒ τ1 ⌊γ, x valueness(ǫ) ⇒ τ1 ⌋ ⌊γ⌋, x : (ǫ◮⌊τ1 ⌋) ⌊γ⌋ Z ⌊γ⌋ • Case γ ⊢I e1 e0 ϕ ⇐ τ2 ⌊e0 ⌋ ϕ ⇐ ⌊τ2 ⌋ ⌊e0 ⌋ ϕ ⇐ ⌊τ2 ⌋ (λx. ⌊e0 ⌋) val ⇐ (ǫ◮⌊τ1 ⌋) → ⌊τ2 ⌋ ǫ ⌊λx. e0 ⌋ val ⇐ ⌊τ1 → τ2 ⌋ ǫ (τ1 → τ) γ ⊢I e2 γ ⊢I (e1 @ e2 ) ⊤ ⇒ τ ϕ1 ⇒ γ ⊢I e1 ⊢I ⊢E ⊢E ⊢E ⊢E ϕ1 ⇒ ϕ2 ⇐ ǫ (τ1 → τ) ǫ ⌊γ⌋ ⊢E ⌊e1 ⌋ ϕ1 ⇒ ⌊τ1 → τ⌋ ⌊γ⌋ ⊢E ⌊e1 ⌋ ϕ1 ⇒ (ǫ◮⌊τ1 ⌋) → ⌊τ⌋ γ ⊢I e2 ϕ2 ⇐ τ1 ⌊γ⌋ ⊢E ⌊e2 ⌋ ϕ2 ⇐ ⌊τ1 ⌋ ⌊γ⌋ ⊢E ⌊e2 ⌋ ϕ2′ ⇐ ǫ◮⌊τ1 ⌋ Z ⌊γ⌋ ⊢E ⌊e1 @ e2 ⌋ ⊤ ⇒ ⌊τ⌋ τ1 Subderivation By i.h. By def. of ⌊−⌋ By E→Intro By def. of ⌊−⌋ I→Elim Subderivation By i.h. By def. of ⌊−⌋ Subderivation By i.h. By E◮Intro By E→Elim and def. of ⌊−⌋ • Case γ ⊢I () val ⇐ 1 I1Intro ⌊γ⌋ ⊢E () val ⇐ 1 Z ⌊γ⌋ ⊢E ⌊()⌋ val ⇐ ⌊1⌋ • Case By E1Intro By def. of ⌊−⌋ γ, α type ⊢I e0 val ⇐ τ0 I∀Intro γ ⊢I Λα. e0 val ⇐ ∀α. τ0 16 2015/9/15 Z • Case γ, α type ⊢I e0 val ⇐ τ0 ⊢E ⌊e0 ⌋ val ⇐ ⌊τ0 ⌋ ⊢E ⌊e0 ⌋ val ⇐ ⌊τ0 ⌋ ⊢E Λα. ⌊e0 ⌋ val ⇐ ∀α. ⌊τ0 ⌋ ⊢E ⌊Λα. e0 ⌋ val ⇐ ⌊∀α. τ0 ⌋ ⌊γ, α type⌋ ⌊γ⌋, α type ⌊γ⌋ ⌊γ⌋ γ ⊢I e0 ϕ⇒ ∀α. τ0 γ ⊢ τ ′ type ′ Subderivation By i.h. By def. of ⌊−⌋ By E∀Intro By def. of ⌊−⌋ I∀Elim γ ⊢I e0 [τ ] ϕ ⇒ [τ ′ /α]τ0 γ ⊢I e0 ϕ ⇒ ∀α. τ0 ⌊γ⌋ ⊢E ⌊e0 ⌋ ϕ ⇒ ⌊∀α. τ0 ⌋ ⌊γ⌋ ⊢E ⌊e0 ⌋ ϕ ⇒ ∀α. ⌊τ0 ⌋ γ ⊢ τ ′ type ⌊γ⌋ ⊢ ⌊τ ′ ⌋ type ⌊γ⌋ ⊢E ⌊e0 ⌋[⌊τ ′ ⌋] ϕ ⇒ [⌊τ ′ ⌋/α]⌊τ0 ⌋ Z ⌊γ⌋ ⊢E ⌊e0 [τ ′ ]⌋ ϕ ⇒ ⌊[τ ′ /α]τ0 ⌋ Subderivation By i.h. By def. of ⌊−⌋ Subderivation By Lemma 20 By E∀Elim By properties of ⌊−⌋ and substitution • Case γ, a evalorder ⊢I e val ⇐ τ0 IDIntro γ ⊢I e val ⇐ Da. τ0 γ, a evalorder ⊢I e val ⇐ τ0 ⌊γ, a evalorder⌋ ⊢E ⌊e⌋ val ⇐ ⌊τ0 ⌋ ⌊γ⌋, a evalorder ⊢E ⌊e⌋ val ⇐ ⌊τ0 ⌋ ⌊γ⌋ ⊢E ⌊e⌋ val ⇐ Da. ⌊τ0 ⌋ Z ⌊γ⌋ ⊢E ⌊e⌋ val ⇐ ⌊Da. τ0 ⌋ • Case γ ⊢I e ϕ ⇒ Da. τ0 γ ⊢ ǫ evalorder IDElim γ ⊢I e ϕ ⇒ [ǫ/a]τ0 γ ⊢I e ϕ ⇒ Da. τ0 Subderivation By i.h. ⌊γ⌋ ⊢E ⌊e⌋ ϕ ⇒ ⌊Da. τ0 ⌋ γ ⊢ ǫ evalorder ⌊γ⌋ ⊢ ǫ evalorder Subderivation By Lemma 21 ⌊γ⌋ ⊢E ⌊e⌋ ϕ ⇒ [ǫ/a]⌊τ0 ⌋ Z ⌊γ⌋ ⊢E ⌊e⌋ ϕ ⇒ ⌊[ǫ/a]τ0 ⌋ • Case Subderivation By i.h. By def. of ⌊−⌋ By EDIntro By def. of ⌊−⌋ By EDElim By properties of ⌊−⌋ and substitution (x ϕ ⇒ τ) ∈ γ Ivar γ ⊢I x ϕ ⇒ τ (x ϕ ⇒ τ) ∈ γ Premise We distinguish cases of ϕ: If ϕ = val, then: (x : V◮⌊τ⌋) ∈ ⌊γ⌋ ⌊γ⌋ ⊢E x val ⇒ V◮⌊τ⌋ Z ⌊γ⌋ ⊢E x val ⇒ ⌊τ⌋ By def. of ⌊−⌋ By Evar By E◮ElimV If ϕ = ⊤, then: (x : N◮⌊τ⌋) ∈ ⌊γ⌋ ⌊γ⌋ ⊢E x val ⇒ N◮⌊τ⌋ Z ⌊γ⌋ ⊢E x ⊤ ⇒ ⌊τ⌋ By def. of ⌊−⌋ By Evar By E◮Elimǫ • Case (u ⊤ ⇒ τ) ∈ γ Ifixvar γ ⊢I u ⊤ ⇒ τ (u : ⌊τ⌋) ∈ ⌊γ⌋ Z ⌊γ⌋ ⊢E u ⊤ ⇒ ⌊τ⌋ By def. of ⌊−⌋ By Efixvar 17 2015/9/15 • Case Z γ, u ⊤ ⇒ τ ⊢I e0 ϕ ′ ⇐ τ Ifix γ ⊢I (fix u. e0 ) ⊤ ⇐ τ ⌊γ, u ⊤ ⇒ τ⌋ ⊢E e0 ϕ ⇐ ⌊τ⌋ ⌊γ⌋, u : ⌊τ⌋ ⊢E e0 ϕ ⇐ ⌊τ⌋ ⌊γ⌋ ⊢E (fix u. e0 ) ⊤ ⇐ ⌊τ⌋ By i.h. By def. of ⌊−⌋ By Efix • Case γ ⊢I e ϕ ⇒ τ Isub γ ⊢I e ϕ ⇐ τ By i.h. and Esub. • Case γ ⊢I e0 ϕ ⇐ τ Ianno γ ⊢I (e0 :τ) ϕ ⇒ τ By i.h. and Eanno. • Case γ ⊢I e2 ϕ2 ⇐ τ2 γ ⊢I e1 ϕ1 ⇐ τ1 I∗Intro γ ⊢I (e1 , e2 ) ϕ1 ⊔ϕ2 ⇐ (τ1 ∗ǫ τ2 ) γ ⊢I e1 ϕ1 ⇐ τ1 ⌊γ⌋ ⊢E ⌊e1 ⌋ ϕ1 ⇐ ⌊τ1 ⌋ ⌊γ⌋ ⊢E ⌊e1 ⌋ ϕ1 ⇐ ǫ◮⌊τ1 ⌋ Subderivation By i.h. By E◮Intro ⌊γ⌋ ⊢E ⌊e2 ⌋ ϕ2 ⇐ ǫ◮⌊τ2 ⌋ Similar ⌊γ⌋ ⊢E (⌊e1 ⌋, ⌊e2 ⌋) ϕ1 ⊔ϕ2 ⇐ (ǫ◮⌊τ1 ⌋) ∗ (ǫ◮⌊τ2 ⌋) Z ⌊γ⌋ ⊢E ⌊(e1 , e2 )⌋ ϕ1 ⊔ϕ2 ⇐ ⌊τ1 ∗ǫ τ2 ⌋ • Case γ ⊢I e0 ϕ ⇒ (τ1 ∗ǫ τ2 ) I∗Elimk γ ⊢I (projk e0 ) ⊤ ⇒ τk γ ⊢I e0 ϕ ⇒ (τ1 ∗ǫ τ2 ) ⌊γ⌋ ⊢E ⌊e0 ⌋ ϕ ⇒ ⌊τ1 ∗ǫ τ2 ⌋ ⌊γ⌋ ⊢E ⌊e0 ⌋ ϕ ⇒ (ǫ◮⌊τ1 ⌋) ∗ (ǫ◮⌊τ2 ⌋) ⌊γ⌋ ⊢E (projk ⌊e0 ⌋) ⊤ ⇒ (ǫ◮⌊τk ⌋) Z ⌊γ⌋ ⊢E ⌊projk e0 ⌋ ⊤ ⇒ ⌊τk ⌋ • Case By E∗Intro By def. of ⌊−⌋ Subderivation By i.h. By def. of ⌊−⌋ By E∗Elimk By E◮Elimǫ and def. of ⌊−⌋ γ ⊢I e0 ϕ ⇐ τk I+Introk γ ⊢I (injk e0 ) ϕ ⇐ (τ1 +ǫ τ2 ) γ ⊢I e0 ϕ ⇐ τk ⌊γ⌋ ⊢E ⌊e0 ⌋ ϕ ⇐ ⌊τk ⌋ ⌊γ⌋ ⊢E (injk ⌊e0 ⌋) ϕ ⇐ ⌊τ1 ⌋ + ⌊τ2 ⌋ ⌊γ⌋ ⊢E (injk ⌊e0 ⌋) ϕ ⇐ ǫ◮(⌊τ1 ⌋ + ⌊τ2 ⌋) Z ⌊γ⌋ ⊢E ⌊injk e0 ⌋ ϕ ⇐ ⌊τ1 ⌋ + ⌊τ2 ⌋ • Case γ ⊢I e0 Subderivation By i.h. By E+Introk By E◮Intro (first conclusion) By def. of ⌊−⌋ γ, x1 val ⇒ τ1 ⊢I e1 ǫ ⇒ (τ + τ ) γ, x2 val ⇒ τ2 ⊢I e2 ϕ0 1 2 γ ⊢I case(e0 , x1 .e1 , x2 .e2 ) ⊤ ⇐ τ τ ⇐ τ ϕ2 ϕ1 ⇐ 18 I+Elim 2015/9/15 γ ⊢I e0 ϕ0 ⇒ (τ1 +ǫ τ2 ) ⌊γ⌋ ⊢E ⌊e0 ⌋ ϕ0 ⇒ ⌊τ1 +ǫ τ2 ⌋ ⌊γ⌋ ⊢E ⌊e0 ⌋ ϕ0 ⇒ ǫ◮(⌊τ1 ⌋ + ⌊τ2 ⌋) ⌊γ⌋ ⊢E ⌊e0 ⌋ ⊤ ⇒ (⌊τ1 ⌋ + ⌊τ2 ⌋) Subderivation By i.h. By def. of ⌊−⌋ By E◮Elimǫ γ, x1 val ⇒ τ1 ⊢I e1 ϕ1 ⇒ τ ⌊γ⌋, x1 : V◮⌊τ1 ⌋ ⊢E ⌊e1 ⌋ ϕ1 ⇒ ⌊τ⌋ ⌊γ⌋, x1 : ⌊τ1 ⌋ ⊢E ⌊e1 ⌋ ϕ1 ⇒ ⌊τ⌋ Subderivation By i.h. and def. of ⌊−⌋ By Lemma 19 ⌊γ⌋, x2 : ⌊τ2 ⌋ ⊢E ⌊e2 ⌋ ϕ2 ⇒ ⌊τ⌋ ⌊γ⌋ ⊢E ⌊case(e0 , x1 .e1 , x2 .e2 )⌋ ⊤ ⇒ ⌊τ⌋ Z • Case Similarly    γ ⊢I e ϕ ⇐ (µǫ α. τ0 ) α τ0 IµIntro γ ⊢I e ϕ ⇐ µǫ α. τ0   γ ⊢I e ϕ ⇐ (µǫ α. τ0 )/α τ0  ǫ  ⌊γ⌋ ⊢E ⌊e⌋ ϕ ⇐ ⌊ (µ α. τ0 )/α τ0 ⌋  ǫ  ⌊γ⌋ ⊢E ⌊e⌋ ϕ ⇐ ⌊µ α. τ0 ⌋/α ⌊τ0 ⌋   ⌊γ⌋ ⊢E ⌊e⌋ ϕ ⇐ (µα. ǫ◮⌊τ0 ⌋) /α ⌊τ0 ⌋ ⌊γ⌋ ⊢E ⌊e⌋ ϕ ⇐ µα. ǫ◮⌊τ0 ⌋ Z ⌊γ⌋ ⊢E ⌊e⌋ ϕ ⇐ ⌊µǫ α. τ0 ⌋ • Case By E+Elim Subderivation By i.h. By a property of substitution/⌊−⌋ By def. of ⌊−⌋ By EµIntro By def. of ⌊−⌋ γ ⊢I e ϕ0 ⇒ µǫ α. τ0   IµElim γ ⊢I e ⊤ ⇒ (µǫ α. τ0 )/α τ0 γ ⊢I e ϕ0 ⇒ µǫ α. τ0 ⌊γ⌋ ⊢E ⌊e⌋ ϕ0 ⇒ ⌊µǫ α. τ0 ⌋ ⌊γ⌋ ⊢E ⌊e⌋ ϕ0 ⇒ µα. ǫ◮⌊τ0 ⌋   ⌊γ⌋ ⊢E ⌊e⌋ ⊤ ⇒ (µα. ǫ◮⌊τ0 ⌋) / α ǫ◮⌊τ0 ⌋   ⌊γ⌋ ⊢E ⌊e⌋ ⊤ ⇒ ⌊µǫ α. τ0 ⌋ / α ǫ◮⌊τ0 ⌋  ǫ  ⌊γ⌋ ⊢E ⌊e⌋ ⊤ ⇒ ǫ◮ ⌊µ α. τ0 ⌋ / α ⌊τ0 ⌋ ⌊γ⌋ ⊢E ⌊e⌋ ⊤ ⇒ [⌊µǫ α. τ0 ⌋ / α] ⌊τ0 ⌋   Z ⌊γ⌋ ⊢E ⌊e⌋ ⊤ ⇒ ⌊ (µǫ α. τ0 )/α τ0 ⌋ Subderivation By i.h. By def. of ⌊−⌋ By EµElim By def. of ⌊−⌋ By a property of substitution By E◮Elimǫ By a property of substitution/⌊−⌋ B.5 Elaboration Lemma 5. If Γ ⊢ e ϕ : S ֒→ W then ϕ = val. Proof. By induction on the given derivation. For any rule whose conclusion has val, we already have our result. This takes care of elab1Intro, elab∀Intro, elabDIntro, the second conclusion of elab◮Intro, elabvar, and elab→Intro. Rules whose conclusions have target terms that can never be a value are impossible, which takes care of elab∀Elim, elabDElim, elab◮ElimN , elabfixvar, elabfix, elab→Elim, elab∗Elimk , elab+Elim, and elabµElim. We are left with: • Case elab◮Intro (first conclusion): • Case elab∗Intro: The result follows by i.h. and elab◮Intro. We have W = (W1, W2 ). By i.h. twice, ϕ1 = val and ϕ2 = val. Applying elab∗Intro gives the result (using val ⊔ val = val). • Cases elab◮ElimV , elab+Introk , elabµIntro: The result follows by i.h. and applying the same rule. Lemma 6 (Elaboration valuability). If Γ ⊢ e val : S ֒→ M then M is valuable, that is, there exists Ṽ such that M = Ṽ. Proof. By induction on the given derivation. • Cases elabvar, elab1Intro, elab→Intro: Immediate. • Cases elab◮Intro (N conclusion), elab◮ElimN , elabfix, elabfixvar, elab→Elim, elab∗Elimk , elab+Elim, elabµElim: Impossible: these rules cannot elaborate values. 19 2015/9/15 By i.h., M1 and M2 are valuable; therefore (M1, M2 ) is valuable. By i.h., M0 is valuable; therefore proj1 M0 and proj2 M0 are valuable. Case elab∗Intro: Similar to the elabDIntro case. Cases elab∀Intro, elab∀Elim: By i.h., M0 is valuable; therefore Λ__. M0 and M[__]0 are valuable. Cases elab◮Intro (V conclusion), elab◮ElimV : By i.h. Case elab+Introk : By i.h., M0 is valuable; therefore injk M0 is valuable. Case elabµIntro: By i.h., M0 is valuable; therefore roll M0 is valuable. • Case elabDIntro: • Case elabDElim: • • • • • Lemma 7 (Substitution—Evaluation orders). (1) If Γ, a evalorder, Γ ′ ⊢ S type and Γ ⊢ ǫ evalorder then Γ, [ǫ/a]Γ ′ ⊢ [ǫ/a]S type. (2) If D derives Γ, a evalorder, Γ ′ ⊢E e ϕ ⇐ S and Γ ⊢ ǫ evalorder then D ′ derives Γ, [ǫ/a]Γ ′ ⊢E e ϕ ⇐ [ǫ/a]S where D ′ is not larger than D. (3) If D derives Γ, a evalorder, Γ ′ ⊢E e ϕ ⇒ S and Γ ⊢ ǫ evalorder, then D ′ derives Γ, [ǫ/a]Γ ′ ⊢E e ϕ ⇒ [ǫ/a]S where D ′ is not larger than D. Proof. Part (1): By induction on the first derivation. Part (1) does not depend on the other parts. Parts (2) and (3): By induction on the given derivation, using part (1): • Case E∀Intro: • Case By i.h. and E∀Intro. Γ, a evalorder, Γ ′ ⊢E e ϕ ⇒ ∀α. S0 Γ, a evalorder, Γ ′ ⊢ S ′ type Γ, a evalorder, Γ ′ ⊢E e ϕ ⇒ [S ′ /α]S0 Γ, a evalorder, Γ ′ ⊢E Γ, [ǫ/a]Γ ′ ⊢E Γ, [ǫ/a]Γ ′ ⊢E Γ, a evalorder, Γ ′ ⊢ Γ, [ǫ/a]Γ ′ ⊢ Γ, [ǫ/a]Γ ′ ⊢E Z Γ, [ǫ/a]Γ ′ ⊢E • Case e ϕ ⇒ ∀α. S0 e ϕ ⇒ [ǫ/a](∀α. S0 ) e ϕ ⇒ ∀α. [ǫ/a]S0 S′ [ǫ/a]S ′   e ϕ ⇒ [ǫ/a]S ′ /α [ǫ/a]S0 e ϕ ⇒ [ǫ/a][S ′ /α]S0 (x : S) ∈ (Γ, a evalorder, Γ ′ ) E∀Elim Subderivation By i.h. By def. of subst. Subderivation By part (1) By E∀Elim By def. of subst. Evar Γ, a evalorder, Γ ′ ⊢E x val ⇒ S Follows from the definition of substitution on contexts. • Case Efixvar: Similar to the Evar case. The remaining cases are straightforward, using the i.h. and properties of substitution. Lemma 22 (Type substitution). (1) If Γ ⊢ S ′ type and Γ, α type ⊢ S type then Γ ⊢ [S ′ /α]S type. (2) If Γ ⊢ S ′ type and Γ, α type ⊢ e ϕ : S ֒→ M then Γ ⊢ e ϕ : [S ′ /α]S ֒→ M. Proof. In each part, by induction on the second derivation. In part (2), the elab∀Elim case uses part (1). Lemma 8 (Expression substitution). (1) If Γ ⊢ e1 ϕ1 : S1 ֒→ W and Γ, x : S1 , Γ ′ ⊢ e2 ϕ2 : S ֒→ M then Γ, Γ ′ ⊢ [e1 /x]e2 ϕ2 : S ֒→ [W/x]M. (2) If Γ ⊢ fix u. e1 ⊤ : S1 ֒→ fix u. M1 and Γ, u : S1 ,Γ ′ ⊢ e2 ϕ2: S ֒→ M    then Γ, Γ ′ ⊢ (fix u. e1 ) u e2 ϕ2 : S ֒→ (fix u. M1 ) u M. Proof. Part (1): By induction on the given derivation. In the elabvar case, use Lemma 5 to get Γ ⊢ e1 Γ, Γ ′ ⊢ e1 val : S1 ֒→ W, which is Γ, Γ ′ ⊢ [e1 /x]x val : S ֒→ [W/x]M. Part (2): By induction on the given derivation. Note that in the elabfixvar case, ϕ2 = ⊤. 20 val : S1 ֒→ W. By weakening, 2015/9/15 Theorem 10 (Elaboration type soundness). If Γ ⊢E e ϕ ⇐ S or Γ ⊢E e ϕ ⇒ S where Γ ⊢ S type and Γ contains no a evalorder declarations then there exists M such that Γ ⊢ er(e) ϕ ′ : S ֒→ M where ϕ ′ ⊑ ϕ and |Γ | ⊢T M : |S|. Proof. By induction on the size of the given derivation. If ϕ ′ = ϕ, we often don’t bother to state ϕ ⊑ ϕ explicitly. • Case (x : S) ∈ Γ Evar Γ ⊢E x val ⇒ S (x : S) ∈ Γ Z Γ ⊢ er(x) ϕ : S ֒→ x (x : |S|) ∈ |Γ | Z |Γ | ⊢T x : |S| • Case Efixvar: • Case Similar to the Evar case. Γ, u : S ⊢E e0 ϕ0 ⇐ S Efix Γ ⊢E (fix u. e0 ) ⊤ ⇐ S Γ, u : S ⊢E Γ, u : S ⊢ |Γ, u : S| ⊢T |Γ |, u : |S| ⊢T Z Z • Case e0 ϕ0 ⇐ S er(e0 ) ϕ0′ : S ֒→ M0 M0 : |S| M0 : |S| Subderivation By i.h. ′′ By def. of |−| Γ, u : S ⊢ er(e0 ) ⊤ : S ֒→ fix u. M0 |Γ | ⊢T (fix u. M0 ) : |S| By elabfix By Tfix Γ ⊢E e ϕ ⇒ S Esub Γ ⊢E e ϕ ⇐ S Γ ⊢E e ϕ ⇒ S Z Γ ⊢ er(e) ϕ ′ : S ֒→ M Z ϕ′ ⊑ ϕ Z |Γ | ⊢T M : |S| • Case Premise By elabvar By def. of |−| By Tvar Subderivation By i.h. ′′ ′′ Γ ⊢E e0 ϕ ⇐ S Eanno Γ ⊢E (e0 :S) ϕ ⇒ S Γ ⊢E e0 ϕ ⇐ S Γ ⊢ er(e0 ) ϕ ′ : S ֒→ M Z ϕ′ ⊑ ϕ Z |Γ | ⊢T M : |S| Z Γ ⊢ er((e0 :S)) ϕ ′ : S ֒→ M Subderivation By i.h. ′′ ′′ By def. of er(−) • Case Γ ⊢E () val ⇐ 1 E1Intro Γ ⊢ er(()) ϕ : 1 ֒→ () |Γ | ⊢T () : 1 Z |Γ | ⊢T () : |1| Z • Case By elab1Intro By T1Intro By def. of |−| Γ, a evalorder ⊢E e val ⇐ S0 EDIntro Γ ⊢E e val ⇐ Da. S0 21 2015/9/15 Z Z • Case Γ, a ⊢E e val ⇐ S0 Γ ⊢E e val ⇐ [V/a]S0 Γ ⊢ er(e) val : [V/a]S0 ֒→ MV |Γ | ⊢T MV : |[V/a]S0 | Subd. By Lemma 7 (2) By i.h. Γ ⊢E e val ⇐ [N/a]S0 Γ ⊢ er(e) val : [N/a]S0 ֒→ MN |Γ | ⊢T MN : |[N/a]S0 | By Lemma 7 (2) By i.h. Γ ⊢ er(e) val : Da. S0 ֒→ (MV, MN ) |Γ | ⊢T (MV, MN ) : |S1 | ∗ |S2 | |Γ | ⊢T (MV, MN ) : |Da. S0 | By elabDIntro By T∗Intro By def. of |−| ′′ ′′ Γ ⊢E e ϕ ⇒ Da. S0 Γ ⊢ ǫ evalorder EDElim Γ ⊢E e ϕ ⇒ [ǫ/a]S0 Γ ⊢ er(e) ϕ ′ : Da. S0 ֒→ M0 Z ϕ′ ⊑ ϕ |Γ | ⊢T M0 : |[V/a]S0 | ∗ |[N/a]S0 | By i.h. ′′ ′′ If ǫ = V then: Z Γ ⊢ er(e) ϕ ′ : [V/a]S0 ֒→ proj1 M0 Z |Γ | ⊢T proj1 M0 : |[V/a]S0 | By elabDElim By T∗Elim1 Otherwise, ǫ 6= V. It is given that Γ contains no a-declarations, and we also have Γ ⊢ ǫ evalorder. It follows that ǫ cannot be a variable a. Therefore ǫ = N. Z Γ ⊢ er(e) ϕ ′ : [N/a]S0 ֒→ proj2 M0 Z |Γ | ⊢T proj2 M0 : |[N/a]S0 | • Case By elabDElim By T∗Elim2 Γ ⊢E e ϕ ⇐ S0 E◮Intro (first conclusion) Γ ⊢E e ϕ ⇐ ǫ◮S0 Γ ⊢E e ϕ ⇐ S0 Γ ⊢ er(e) ϕ ′ : S0 ֒→ M0 ϕ′ ⊑ ϕ |Γ | ⊢T M0 : |S0 | Subderivation By i.h. ′′ ′′ By similar reasoning as in the EDElim case, either ǫ = V or ǫ = N. If ǫ = V: |S0 | = |V◮S0 | Let M = M0 . Z Γ ⊢ er(e) ϕ ′ : V◮S0 ֒→ M Z ϕ′ ⊑ ϕ Z |Γ | ⊢T M : |V◮S0 | By def. of |−| By elab◮Intro (first conclusion) Above By above equality If ǫ = N: U |S0 | = |N◮S0 | Let M = thunk M0 . Z Γ ⊢ er(e) val : N◮S0 ֒→ thunk M0 Z val ⊑ ϕ |Γ | ⊢T thunk M0 : U |S0 | Z |Γ | ⊢T M : |N◮S0 | • Case By def. of |−| By elab◮Intro (second conclusion) By def. of ⊑ By T→Intro By above equalities Γ ⊢E e ϕ ′ ⇐ S0 E◮Intro (second conclusion) Γ ⊢E e val ⇐ N◮S0 22 2015/9/15 Γ ⊢E e ϕ ′ ⇐ S0 Γ ⊢ er(e) ϕ ′ : S0 ֒→ M0 ϕ′ ⊑ ϕ |Γ | ⊢T M0 : |S0 | U |S0 | = |N◮S0 | Let M = thunk M0 . Z Γ ⊢ er(e) val : N◮S0 ֒→ thunk M0 Z val ⊑ ϕ |Γ | ⊢T thunk M0 : U |S0 | Z |Γ | ⊢T M : |N◮S0 | • Case Subderivation By i.h. ′′ ′′ By def. of |−| By elab◮Intro (second conclusion) By def. of ⊑ By T→Intro By above equalities Γ ⊢E e ϕ ⇒ V◮S E◮ElimV Γ ⊢E e ϕ ⇒ S Γ ⊢E e ϕ ⇒ V◮S Γ ⊢ er(e) ϕ ′ : V◮S ֒→ M0 Z ϕ′ ⊑ ϕ |Γ | ⊢T M0 : |V◮S| |V◮S| = |S| Let M = M0 . Z Γ ⊢ er(e) ϕ ′ : S ֒→ M Z |Γ | ⊢T M : |S| Subderivation By i.h. ′′ ′′ By def. of |−| By elab◮ElimV By above equalities • Case Γ ⊢E e ϕ ′ ⇒ ǫ◮S E◮Elimǫ Γ ⊢E e ⊤ ⇒ S By similar reasoning as in the EDElim case, either ǫ = V or ǫ = N. If ǫ = V, follow the E◮ElimV case above. If ǫ = N: Subderivation Γ ⊢E e ϕ ′ ⇒ N◮S Γ ⊢ er(e) ϕ ′′ : N◮S ֒→ M0 By i.h. ′′ |Γ | ⊢T M0 : |N◮S| |N◮S| = U |S| By def. of |−| Let M = (force M0 ). Z Γ ⊢ er(e) ⊤ : S ֒→ force M0 By elab◮ElimN Z ⊤ ⊑⊤ By def. of ⊑ |Γ | ⊢T M0 : U |S| Above (|N◮S| = U |S|) Z |Γ | ⊢T force M0 : |S| By TUElim • Case Γ ⊢E e2 ϕ2 ⇐ S2 Γ ⊢E e1 ϕ1 ⇐ S1 E∗Intro Γ ⊢E (e1 , e2 ) ϕ1 ⊔ϕ2 ⇐ (S1 ∗ S2 ) Γ ⊢ er(e1 ) ϕ : S1 ֒→ M1 ϕ1′ ⊑ ϕ1 |Γ | ⊢T M1 : |S1 | By i.h. Γ ⊢ er(e2 ) ϕ : S2 ֒→ M2 ϕ2′ ⊑ ϕ2 |Γ | ⊢T M2 : |S2 | By i.h. ′′ ′′ ′′ ′′ Z Γ ⊢ (er(e1 ), er(e2 )) ϕ1′ ⊔ϕ2′ : (S1 ∗ S2 ) ֒→ (M1, M2 ) Z ϕ1′ ⊔ ϕ2′ ⊑ ϕ1 ⊔ ϕ2 |Γ | ⊢T (M1, M2 ) : |S1 | ∗ |S2 | Z |Γ | ⊢T (M1, M2 ) : |S1 ∗ S2 | 23 By elab∗Intro ϕ1′ ⊑ ϕ1 and ϕ2′ ⊑ ϕ2 By T∗Intro By def. of |−| 2015/9/15 • Case Γ ⊢E e0 ϕ0 ⇒ (S1 ∗ S2 ) E∗Elimk Γ ⊢E (projk e0 ) ⊤ ⇒ Sk Γ ⊢ er(e0 ) ϕ0′ : (S1 ∗ S2 ) ֒→ M0 |Γ | ⊢T M0 : |S1 ∗ S2 | |Γ | ⊢T M0 : |S1 | ∗ |S2 | By i.h. ′′ By def. of |−| Z Γ ⊢ (projk er(e0 )) ⊤ : Sk ֒→ (projk M0 ) Z |Γ | ⊢T (projk M0 ) : |Sk | • Case By elab∗Elimk By T∗Elimk Γ, x : S1 ⊢E e0 ϕ0 ⇐ S2 E→Intro Γ ⊢E (λx. e0 ) val ⇐ (S1 → S2 ) Γ, x : S1 ⊢ er(e0 ) ϕ0′ : S2 ֒→ M0 |Γ, x : S1 | ⊢T M0 : |S2 | By i.h. ′′ |Γ, x : S1 | = (|Γ |, x : |S1 |) Z By def. of |−| Γ, x : S1 ⊢ er(e0 ) ϕ0′ : S2 ֒→ M0 Γ ⊢ (λx. e0 ) val : (S1 → S2 ) ֒→ (λx. M0 ) Above By elab→Intro |Γ |, x : |S1 | ⊢T M0 : |S2 | |Γ |, x : |S1 | ⊢T (λx. M0 ) : |S1 | → |S2 | Z |Γ |, x : |S1 | ⊢T (λx. M0 ) : |S1 → S2 | • Case Γ ⊢E e1 (S1 → S) Γ ⊢E e2 Γ ⊢E (e1 @ e2 ) ⊤ ⇒ S ϕ1 ⇒ Above By T→Intro By def. of |−| ϕ2 ⇐ S1 Γ ⊢ er(e1 ) ϕ1′ : (S ′ → S) ֒→ M1 |Γ | ⊢T M1 : |S ′ → S| |Γ | ⊢T M1 : |S ′ | → |S| By i.h. ′′ By def. of |−| Γ ⊢ er(e2 ) ϕ2′ : S ′ ֒→ M2 |Γ | ⊢T M2 : |S ′ | Z Γ ⊢ er(e1 @ e2 ) ⊤ : (S ′ → S) ֒→ (M1 M2 ) Z |Γ | ⊢T (M1 M2 ) : |S| • Case Z • Case By i.h. ′′ By elab→Elim By T→Elim Γ, α type ⊢E e0 val ⇐ S0 E∀Intro Γ ⊢E Λα. e0 val ⇐ ∀α. S0 Γ, α type ⊢E Γ, α type ⊢ |Γ, α type| ⊢T |Γ |, α type ⊢T Z E→Elim e0 val ⇐ S0 er(e0 ) val : S0 ֒→ M0 M0 : |S0 | M0 : |S0 | Subderivation By i.h. ′′ By def. of |−| Γ ⊢ er(e0 ) val : ∀α. S0 ֒→ Λ__. M0 Γ ⊢ er(Λα. e0 ) val : ∀α. S0 ֒→ Λ__. M0 |Γ | ⊢T Λ__. M0 : ∀α. |S0 | |Γ | ⊢T Λ__. M0 : |∀α. S0 | Γ ⊢E e0 ϕ⇒ ∀α. S0 Γ ⊢ S ′ type Γ ⊢E e0 [S ′ ] ϕ ⇒ [S ′ /α]S0 By elab∀Intro By def. of er(−) By T∀Intro By def. of subst. E∀Elim 24 2015/9/15 Z Γ ⊢E e0 ϕ ⇒ ∀α. S0 Γ ⊢ er(e0 ) ϕ ′ : ∀α. S0 ֒→ M0 ϕ′ ⊑ ϕ |Γ | ⊢T M0 : |∀α. S0 | Γ Γ Γ |Γ | Z ⊢ ⊢ ⊢ ⊢ |Γ | ⊢T |Γ | ⊢T  ′  |S |/α |S0 | = Z |Γ | ⊢T • Case Subderivation By i.h. ′′ ′′ S ′ type er(e0 ) ϕ ′ : [S ′ /α]S0 ֒→ M0 [__] er(e0 [S ′ ]) ϕ ′ : [S ′ /α]S0 ֒→ M0 [__] |S ′ | Subderivation By elab∀Elim By def. of er(−) By Lemma 9 M0 : ∀α. |S0 |   M0 [__] : |S ′ |/α |S0 | |[S ′ /α]S0 | M0 [__] : |[S ′ /α]S0 | By def. of |−| By T∀Elim From def. of subst. By above equality Γ ⊢E e0 ϕ ⇐ Sk E+Introk Γ ⊢E (injk e0 ) ϕ ⇐ (S1 + S2 ) Γ ⊢E e0 ϕ ⇐ Sk Γ ⊢ er(e0 ) ϕ ′ : Sk ֒→ M0 Z ϕ′ ⊑ ϕ |Γ | ⊢T M0 : |Sk | Z Γ ⊢ injk er(e0 ) ϕ ′ : (S1 + S2 ) ֒→ injk M0 |Γ | ⊢T injk M0 : |S1 | + |S2 | Z |Γ | ⊢T injk M0 : |S1 + S2 | • Case Γ ⊢E e0 Γ, x1 : S1 ⊢E e1 (S1 + S2 ) Γ, x2 : S2 ⊢E e2 Γ ⊢E case(e0 , x1 .e1 , x2 .e2 ) ⊤ ⇐ S ϕ0 ⇒ Γ ⊢E Γ ⊢ |Γ | ⊢T |Γ | ⊢T Γ, x1 : S1 ⊢E Γ, x1 : S1 ⊢ |Γ, x1 : S1 | ⊢T |Γ |, x1 : |S1 | ⊢T e0 ϕ0 ⇒ S1 + S2 er(e0 ) ϕ0′ : (S1 + S2 ) ֒→ M0 M0 : |S1 + S2 | M0 : |S1 | + |S2 | e1 ϕ1 ⇐ S er(e1 ) ϕ1′ : S ֒→ M1 M1 : |S| M1 : |S| Γ, x2 : S2 ⊢ er(e2 ) ϕ2′ : S ֒→ M2 |Γ |, x2 : |S2 | ⊢T M2 : |S| Subderivation By i.h. ′′ ′′ By elab+Introk By T+Introk By def. of |−| ϕ1 ⇐ ϕ2 ⇐ S S E+Elim Subderivation By i.h. ′′ By def. of |−| Subderivation By i.h. ′′ By def. of |−| Similar to above ′′ Z Γ ⊢ er(case(e0 , x1 .e1 , x2 .e2 )) ⊤ : S ֒→ case(M0 , x1 .M1 , x2 .M2 ) Z |Γ | ⊢T case(M0 , x1 .M1 , x2 .M2 ) : |S| • Case By elab+Elim By T+Elim    Γ ⊢E e ϕ ⇐ (µα. S0 ) α S0 EµIntro Γ ⊢E e ϕ ⇐ µα. S0 25 2015/9/15   Γ ⊢E e ϕ ⇐ (µα. S0 )/α S0   Γ ⊢ er(e) ϕ ′ : (µα. S0 )/α S0 ֒→ M0 Z ϕ′ ⊑ ϕ   |Γ | ⊢T M0 : | (µα. S0 )/α S0 | Z Γ ⊢ er(e) ϕ ′ : (µα. S0 ) ֒→ (roll M0 )     | (µα. S0 )/α S0 | = |µα. S0 |/α |S0 |   |Γ | ⊢T M0 : |µα. S0 |/α |S0 | |Γ | ⊢T (roll M0 ) : µα. |S0 | Z |Γ | ⊢T (roll M0 ) : |µα. S0 | Subderivation By i.h. ′′ ′′ By elabµIntro From def. of |−| By above equality By TµIntro By def. of subst. • Case Γ ⊢E e ϕ ⇒ µα. S0    EµElim Γ ⊢E e ⊤ ⇒ (µα. S0 ) α S0 Broadly similar to the EµIntro case. B.6 Consistency Lemma 11 (Inversion). Given · ⊢ e ϕ : |V◮ .{z . . V◮} S ֒→ M: 0 or more (0) If M = (λx. M0 ) and S = (S1 → S2 ) then e = (λx. e0 ) and ·, x : S1 ⊢ e0 ϕ ′ : S2 ֒→ M0 . (1) If M = (W1, W2 ) and S = (Da. S0 ) then · ⊢ e ϕ : [V/a]S0 ֒→ W1 and · ⊢ e ϕ : [N/a]S0 ֒→ W2 . (2) If M = thunk M0 and S = N◮S0 then · ⊢ e ϕ ′ : S0 ֒→ M0 . (3) If M = Λ__. M0 and S = (∀α. S0 ) then ·, α type ⊢ e val : S0 ֒→ M0 . (4) If M = (injk W) and S = (S1 + S2 ) then e = (injk e ′ ) and · ⊢ e ′ ϕ : Sk ֒→ W. (5) If M = (roll W) S0 )  and S = (µα.  then · ⊢ e ϕ : (µα. S0 )/α S0 ֒→ W. (6) If M = (W1, W2 ) and S = (S1 ∗ S2 ) then · ⊢ e1 ϕ1 : S1 ֒→ W1 and · ⊢ e2 ϕ2 : S2 ֒→ W2 where e = (e1 , e2 ) and ϕ = ϕ1 ⊔ ϕ2 . Proof. By induction on the given derivation. For some rules, the proof cases are the same for all parts: • Cases elab◮Intro (V conclusion), elab◮ElimV : The result follows by i.h. In the elab◮Intro case, we apply the i.h. with one less V◮; in the elab◮ElimV case, we have one more V◮. For part (0): • Case elab→Intro: The subderivation gives the result. For part (1): • Case elabDIntro: The subderivations give the result. For part (2): • Case elab◮Intro (N conclusion): The subderivation gives the result. For part (3): • Case elab∀Intro: The subderivation gives the result. For part (4): • Case elab+Introk : The subderivation gives the result. 26 2015/9/15 For part (5): • Case elabµIntro: The subderivation gives the result. For part (6): • Case elab∗Intro: The subderivations give the result. All other cases are impossible: either M has the wrong form, or S has the wrong form. Lemma 12 (Syntactic values). If Γ ⊢ e val : S ֒→ W and W is N-free then e is a syntactic value. Proof. By induction on the given derivation. • Cases elab1Intro, elabvar, elab→Intro: Immediate: the rule requires that e is a syntactic value. • Cases elab◮ElimN , elabfixvar, elabfix, elab→Elim, elab∗Elimk , elab+Elim: Impossible: these rules require that val be ⊤. • Case elab◮Intro (N-conclusion): Impossible: thunk M0 is not N-free. • Case elabµElim: Impossible: unroll M0 is not a value W. • Cases elab∀Intro, elab∀Elim, elab◮Intro (V-conclusion), elab◮ElimV : Apply the i.h. to the subderivation. • Cases elab∗Intro, elab+Introk , elabµIntro: Apply the i.h. to the subderivation(s). Apply the i.h. to the Γ ⊢ e val : [W/a]S0 ֒→ W1 subderivation. Imposible: W must be a projection, but projections are not values. • Case elabDIntro: • Case elabDElim: Theorem 14 (Consistency). If · ⊢ e ϕ : S ֒→ M and M 7→ M ′ then there exists e ′ such that e ∗ e ′ and · ⊢ e ′ ϕ ′ : S ֒→ M ′ and ϕ ′ ⊑ ϕ. Moreover: (1) If ϕ = val then e ′ = e. (2) If M is N-free then e ∗ e ′ can be derived without using SrcStepCtxN. Proof. By induction on the derivation of · ⊢ e ϕ : S ֒→ M. • Cases elabvar, elabfixvar: • Case ·, u : S ⊢ e0 Impossible, because the typing context is empty. ϕ: S ֒→ M0 · ⊢ (fix u. e0 ) ⊤ : S ֒→ (fix u. M0 ) ·, u : S ⊢ (fix u. M0 ) 7→ M′ = Z (fix u. e0 ) Z (1)Z (2)Z e0 ϕ : S ֒→ M0 M′    (fix u. M0 ) u M0    (fix u. e0 ) u e0 elabfix Subderivation Given By inversion on rule fixReduce By fixVreduce and SrcStepCtxV · ⊢ (fix u. e0 ) ⊤ : S ֒→ (fix u. M0 ) ·, u : S ⊢ e0 ϕ : S ֒→ M0       · ⊢ (fix u. e0 ) u e0 ϕ : S ֒→ (fix u. M0 ) u M0 (holds vacuously) Derivation does not use SrcStepCtxN Given Subderivation By Lemma 8 (2) ϕ=⊤ • Case · ⊢ () val : 1 ֒→ () elab1Intro Impossible, since M = () but () 7→ M ′ is not derivable. • Case ·, x : S1 ⊢ e0 ϕ: S2 ֒→ M0 elab→Intro · ⊢ (λx. e0 ) val : (S1 → S2 ) ֒→ λx. M0 Impossible, since M = λx. M0 but (λx. M0 ) 7→ M ′ is not derivable. 27 2015/9/15 • Case (S1 → S) ֒→ M1 S1 ֒→ M2 elab→Elim · ⊢ (e1 @ e2 ) ⊤ : S ֒→ (M1 M2 ) First, note that ϕ = ⊤ so “moreover” part (1) is vacuously satisfied. We have (M1 M2 ) 7→ M ′ . By inversion on StepContext, M = (M1 M2 ) = C [M0 ] and M ′ = C [M0′ ]. From (M1 M2 ) = C [M0 ] and the definition of C , either C = [ ], or C = (C1 M2 ), or C = (M1 C2 ) with M1 a value. · ⊢ e1 · ⊢ e2 ϕ1 : ϕ2 : If C = [ ], then M = M0 and M ′ = M0′ . By inversion on βReduce with (M1 M2 ) 7→R M ′ , we have M1 = (λx. Mbody) and M2 = W and M ′ = [W/x]Mbody. If M1 M2 is not N-free, then: · ⊢ e1 ϕ1 : (S1 → S) ֒→ (λx. Mbody) e1 = (λx. ebody) ·, x : S1 ⊢ ebody ϕ ′′ : S ֒→ Mbody ′′ · ⊢ e2 ϕ2 : S1 ֒→ W · ⊢ [e2 /x]ebody ϕ ′ : S ֒→ [W/x]Mbody ϕ′ ⊑ ϕ Z Z Z Subderivation By Lemma 11 (0) (λx. ebody) @ e2 (λx. ebody) @ e2 RN ∗ Subderivation (M2 = W) By Lemma 8 (1) ′′ [e2 /x]ebody [e2 /x]ebody By βNreduce By SrcStepCtxN If M1 M2 is N-free, then: · ⊢ e1 ϕ : (S1 → S) ֒→ (λx. Mbody) e1 = (λx. ebody) ·, x : S1 ⊢ ebody ϕ ′′ : S ֒→ Mbody ϕ2 : S1 ֒→ W S1 ֒→ W W is N-free · ⊢ v val : S1 ֒→ W Z · ⊢ [v/x]ebody ϕ ′ : S ֒→ [W/x]Mbody Z ϕ′ ⊑ ϕ (λx. ebody) @ v RN [v/x]ebody Z (λx. ebody) @ v ∗ [v/x]ebody · ⊢ e2 · ⊢ e2 val : Subderivation By Lemma 11 (0) ′′ Subderivation (M2 = W) By Lemma 5 M1 W is N-free By Lemma 12 By Lemma 8 (1) ′′ By βVreduce By SrcStepCtxV If C = (C1 M2 ), then: M1 M2 → 7 M′ C1 [MR ] M2 → 7 C1 [MR′ ] M2 | {z } | {z } M1 Given By inversion on rule StepContext M1′ MR 7→R MR′ C1 [MR ] 7→ C1 [MR′ ] M1 7→ M1′ · ⊢ e1 e1 ∗ ϕ1 : (S1 → S) ֒→ M1 Subderivation By i.h. ϕ1′ : (S1 → S) ֒→ M1′ ′′ ′ e1 · ⊢ e1′ ∗ By inversion on rule StepContext By StepContext By known equalities ′ Z e1 @ e2 e1 @ e2 Z · ⊢ e1′ @ e2 ′ ⊤ : S ֒→ M1 M2 By SrcStepCtxV By elab→Elim If M is N-free, then M1 is N-free and the i.h. is sufficient for “moreover” part (2). If C = (M1 C2 ) where M1 is a value, then we have M2 7→ M2′ . If M is not N-free, then: 28 2015/9/15 ϕ2 : S1 ֒→ M2 e2′ · ⊢ e2′ ϕ2′ : S1 ֒→ M2′ Z e1 @ e2 ∗ e1 @ e2′ Z · ⊢ e1 @ e2′ ⊤ : S ֒→ M1 M2′ · ⊢ e2 ∗ e2 Subderivation By i.h. ′′ By SrcStepCtxN By elab→Elim If M is N-free, then: · ⊢ e1 · ⊢ e1 ϕ1 : (S1 → S) ֒→ M1 : (S 1 → S) ֒→ M1 val e1 = v1 · ⊢ e2 ϕ2 : S1 ֒→ M2 e2 ∗ e2′ · ⊢ e2′ ϕ2′ : S1 ֒→ M2′ Z v1 @ e2 ∗ v1 @ e2′ Z · ⊢ v1 @ e2′ ⊤ : (S1 → S) ֒→ M1′ M2 • Case · ⊢ e val : [V/a]S0 ֒→ M1 · ⊢ e val : [N/a]S0 ֒→ M2 · ⊢ e val : (Da. S0 ) ֒→ (M1, M2 ) Subderivation By Lemma 5 By Lemma 12 Subderivation By i.h. ′′ By SrcStepCtxV By elab→Elim elabDIntro By inversion on (M1, M2 ) 7→ M ′ , either M ′ = (M1′ , M2 ) and M1 7→ M1′ , or M ′ = (M1, M2 ) and M2 7→ M2′ . In the first case: · ⊢ e val : [V/a]S0 ֒→ M1 M1 → 7 M1′ · ⊢ e val : [V/a]S0 ֒→ M1′ Z Z D :: (1)Z (2)Z Subderivation Above By i.h. (ϕ = val so e ′ = e) · ⊢ e val : [N/a]S0 ֒→ M2 Subderivation · ⊢ e val : (Da. S0 ) ֒→ (M1′ , M2 ) By elabDIntro e ∗e e′ = e D does not use SrcStepCtxN Above Zero steps in e ∗ e The second case is similar. • Case · ⊢ e ϕ : (Da. S0 ) ֒→ M0 · ⊢ e ϕ : [V/a]S0 ֒→ (proj1 M0 ) · ⊢ e ϕ : [N/a]S0 ֒→ (proj2 M0 ) elabDElim First conclusion: (proj1 M0 ) 7→ M ′ Given Either M ′ = proj1 M0′ where M0 7→ M0′ , or M ′ = W1 and M0 = (W1, W2 ). In the first case: · ⊢ e ϕ : (Da. S0 ) ֒→ M0 M0 7→ M0′ · ⊢ e ′ ϕ : (Da. S0 ) ֒→ M0′ Z D :: e ∗ e ′ (1)Z If ϕ = val then e = e ′ If M0 is N-free then D does not use SrcStepCtxN (2)Z If (proj1 M0 ) is N-free then D does not use SrcStepCtxN Z · ⊢ e ′ ϕ : [V/a]S0 ֒→ M0′ Subderivation Above By i.h. ′′ ′′ ′′ Definition of N-free By elabDElim In the second case: 29 2015/9/15 Z (1)Z Z (2)Z · ⊢ e ϕ : (Da. S0 ) ֒→ (W1, W2 ) · ⊢ e ϕ : [V/a]S0 ֒→ W1 proj1 (W1, W2 ) 7→ W1 Let e ′ = e. D :: e ∗ e ′ D does not use SrcStepCtxN Subderivation By Lemma 11 (1) Given e′ = e Zero steps in e ∗ e′ Second conclusion: Either M ′ = proj2 M0′ where M0 7→ M0′ , or M ′ = W1 and M0 = (W1, W2 ). In the first case: similar to the first subcase of the [V/a] part above. In the second case: similar to the second subcase of the [V/a] part above. • Case ·, α ⊢ e val : S ֒→ M · ⊢ e val : ∀α. S ֒→ Λ__. M elab∀Intro This case is impossible, because (Λ__. M) 7→ M ′ is not derivable. • Case · ⊢ e ϕ : ∀α. S0 ֒→ M0 · ⊢ S ′ type · ⊢ e ϕ : [S ′ /α]S0 ֒→ M0 [__] elab∀Elim (M0 [__]) → 7 M′ M0 = (Λ__. M ′ ) · ⊢ e ϕ : ∀α. S0 ֒→ M0 · ⊢ e ϕ : ∀α. S0 ֒→ (Λ__. M ′ ) ·, α type ⊢ e ϕ : S0 ֒→ M ′ Z · ⊢ e ϕ : [S ′ /α]S0 ֒→ M ′ Z e ∗e Given By inversion Subderivation By above equality By Lemma 11 (3) By Lemma 22 Zero steps “Moreover” parts (1) and (2) are immediately satisfied, because e ′ = e. • Case · ⊢ e ϕ : S0 ֒→ M0 · ⊢ e ϕ : V◮S0 ֒→ M0 · ⊢ e val : N◮S0 ֒→ thunk M0 elab◮Intro The second conclusion is not possible, because (thunk M0 ) 7→ M ′ is not derivable. For the first conclusion: We have M0 = M. · ⊢ e ϕ : S0 ֒→ M Subderivation Z D :: e ∗ e ′ By i.h. ′′ · ⊢ e ′ ϕ ′ : S0 ֒→ M ′ ′ ′′ Z ϕ ⊑ϕ ′′ (1)Z If ϕ = val then e = e ′ ′′ (2)Z If M is N-free then D does not use SrcStepCtxN Z · ⊢ e ′ ϕ ′ : V◮S0 ֒→ M ′ By elab◮Intro • Case · ⊢ e ϕ : V◮S ֒→ M · ⊢ e ϕ : S ֒→ M elab◮ElimV By i.h. and elab◮ElimV . • Case · ⊢ e ϕ0 : N◮S ֒→ M0 · ⊢ e ⊤ : S ֒→ (force M0 ) elab◮ElimN We have (force M0 ) 7→ M ′ . If M0 7→ M0′ , use the i.h. and then apply elab◮ElimN . Otherwise, M0 = thunk M ′ . Z Z · ⊢ e ϕ0 : N◮S ֒→ thunk M ′ · ⊢ e ϕ0′ : S ֒→ M ′ ϕ0′ ⊑ ⊤ Subderivation By Lemma 11 (2) By def. of ⊑ Z e ∗e (1)Z (holds vacuously) (2)Z Derivation does not use SrcStepCtxN Zero steps ϕ=⊤ Zero steps 30 2015/9/15 • Case · ⊢ e1 ϕ: S1 ֒→ M1 · ⊢ e2 ϕ: S2 ֒→ M2 elab∗Intro · ⊢ (e1 , e2 ) ϕ : (S1 ∗ S2 ) ֒→ (M1, M2 ) Apply the i.h. to the appropriate subderivation, then apply elab∗Intro and SrcStepCtxV. “Moreover” part (1): If ϕ = val, the i.h. shows that e1′ = e1 (or e2′ = e2 if M2 7→ M2′ ); thus, (e1′ , e2 ) = (e1 , e2 ) (or (e1 , e2′ ) = (e1 , e2 )). “Moreover” part (2): If (M1, M2 ) is N-free, then M1 and M2 are N-free, and the i.h. shows that D0 :: ek ∗ ek′ does not use SrcStepCtxN. Therefore (e1 , e2 ) ∗ . . . does not use SrcStepCtxN. • Case · ⊢ e0 ϕ0 : (S1 ∗ S2 ) ֒→ M0 · ⊢ (projk e0 ) ⊤ : Sk ֒→ (projk M0 ) elab∗Elimk We have (projk M0 ) 7→ M ′ . If M0 7→ M0′ then use the i.h. and apply elab∗Elimk . Otherwise, M0 = (W1, W2 ) and M ′ = Wk . If M is not N-free, we can use projNreduce: · ⊢ ek ϕk : Sk ֒→ Wk e0 = (e1 , e2 ) Z Z projk (e1 , e2 ) ek By Lemma 11 (6) ′′ By projNreduce “Moreover” part (2): M is not N-free. If M is N-free, we have the obligation not to use projNreduce. Z · · · · · ⊢ ⊢ ⊢ ⊢ ⊢ e0 ϕ0 : (S1 ∗ S2 ) ֒→ (W1, W2 ) e0 val : (S1 ∗ S2 ) ֒→ (W1, W2 ) v val : (S1 ∗ S2 ) ֒→ (W1, W2 ) (v1 , v2 ) val : (S1 ∗ S2 ) ֒→ (W1, W2 ) vk val : Sk ֒→ Wk Z projk (v1 , v2 ) ∗ vk Subderivation By Lemma 5 By Lemma 12 By Lemma 11 (6) ′′ By projVreduce and SrcStepCtxV “Moreover” part (2): we did not use SrcStepCtxN. “Moreover” part (1): ϕ = ⊤. • Case ϕ: Sk ֒→ M0 elab+Introk · ⊢ (injk e0 ) ϕ : (S1 + S2 ) ֒→ (injk M0 ) · ⊢ e0 (injk M0 ) → 7 M′ ′ M = (injk M0′ ) and M0 7→ M0′ · ⊢ e0 ϕ : Sk ֒→ M0 · ⊢ e0′ ϕ ′ : Sk ֒→ M0′ Z ϕ′ ⊑ ϕ e0 ∗ e0′ Z (injk e0 ) ∗ (injk e0′ ) Z · ⊢ (injk e0′ ) ϕ ′ : (S1 + S2 ) ֒→ (injk M0′ ) Given By inversion Subderivation By i.h. ′′ ′′ By elab+Introk “Moreover” part (1) follows from the i.h. “Moreover” part (2) follows from the i.h.: If injk M0 is N-free, then M0 is N-free; if e0 can derive (injk e0 ) ∗ (injk e0′ ) without SrcStepCtxN. ∗ e0′ does not use SrcStepCtxN, we • Case ·, x1 : S1 ⊢ e1 ϕ1 : S ֒→ M1 (S1 + S2 ) ֒→ M0 ·, x2 : S2 ⊢ e2 ϕ2 : S ֒→ M2 elab+Elim · ⊢ case(e0 , x1 .e1 , x2 .e2 ) ⊤ : S ֒→ case(M0 , x1 .M1 , x2 .M2 ) First note that “Moreover” part (1) is vacuously satisfied, since ϕ = ⊤. We have case(M0 , x1 .M1 , x2 .M2 ) 7→ M ′ . Either (1) M0 7→ M0′ and M ′ = case(M0′ , x1 .M1 , x2 .M2 ) or (2) M0 = (injk W) and M ′ = [W/xk ]Mk . For (1), apply the i.h. to · ⊢ e0 ϕ : (S1 + S2 ) ֒→ M0 and apply elab+Elim. “Moreover” part (2) follows from the i.h. For (2) if M is not N-free, we can use SrcStepCtxN: · ⊢ e0 ϕ0 : 31 2015/9/15 · ⊢ e0 ϕ0 : (S1 + S2 ) ֒→ (injk W) e0 = injk e0′ · ⊢ e0′ ϕ0′ : Sk ֒→ W ·, xk : Sk ⊢ ek ϕk : S ֒→ Mk Z · ⊢ [e0′ /xk ]ek ϕk′ : S ֒→ [W/xk ]Mk Subderivation By Lemma 8 (1) e0 = injk e0′ ′ case(injk e0 , x1 .e1 , x2 .e2 ) RN [e0 /xk ]ek ∗ ′ Z case(e0 , x1 .e1 , x2 .e2 ) [e0 /xk ]ek Above By caseNreduce By SrcStepCtxN ′ Subderivation By Lemma 11 (4) ′′ For (2) if M is N-free, we can show · ⊢ [e0′ /xk ]ek ϕk′ : S ֒→ [W/xk ]Mk as in the case when M is not N-free, but we have an obligation (“Moreover” part (2)) not to use caseNreduce. · ⊢ e0 · ⊢ e0 ϕ0 : val : (S1 + S2 ) ֒→ injk W (S1 + S2 ) ֒→ injk W e0 = v · ⊢ v val : (S1 + S2 ) ֒→ injk W v0 = injk v0′ Z e [v0′ /x]ek • Case   · ⊢ e ϕ : (µα. S0 )/α S0 ֒→ M0 · ⊢ e ϕ : µα. S0 ֒→ (roll M0 ) Subderivation By Lemma 5 By Lemma 12 By above equality By Lemma 11 (4) By caseVreduce and SrcStepCtxV elabµIntro By inversion, M0 → 7 M0′ and M ′ = (roll M0′ ).   · ⊢ e ϕ : (µα. S0 )/α S0 ֒→ M0 Subderivation   · ⊢ e ′ ϕ : (µα. S0 )/α S0 ֒→ M0′ By i.h. ′′ Z e ∗ e′ ′ ′ Z · ⊢ e ϕ : µα. S0 ֒→ (roll M0 ) By elabµIntro “Moreover” parts (1) and (2) follow from the i.h. • Case · ⊢ e ϕ0 : µα. S0 ֒→ M0   · ⊢ e ⊤ : (µα. S0 )/α S0 ֒→ (unroll M0 ) elabµElim We have (unroll M0 ) 7→ M ′ . Either (1) M ′ = (unroll M0′ ) and M0 7→ M0′ or (2) M0 = (roll W) and M ′ = W. If (1), similar to the elabµIntro case. If (2): · ⊢ e ϕ0 : µα. S0 ֒→ (roll W) Subderivation   Z · ⊢ e ′ ϕ ′ : (µα. S0 )/α S0 ֒→ W By Lemma 11 (5) ′′ Z e ∗ e′ “Moreover” part (1) is vacuously satisfied; part (2) follows from the i.h. Theorem 15 (Multi-step consistency). If · ⊢ e ϕ : S ֒→ M and M 7→∗ W then there exists e ′ such that e can derive e ∗ e ′ without using SrcStepCtxN. ∗ e ′ and · ⊢ e ′ val : S ֒→ W. Moreover, if M is N-free then we Proof. By induction on the derivation of M 7→∗ W. If M = W then let e ′ be e. By Lemma 5, · ⊢ e ′ val : S ֒→ W. The source expression e steps to itself in zero steps, so e ∗ e, i.e. e ∗ e ′ . We did not use SrcStepCtxN. Otherwise, we have M 7→ M ′ and M ′ 7→∗ W for some M ′ . By Theorem 14, · ⊢ e1 ϕ : S ֒→ M ′ , where e ∗ e1 ; also, if M is N-free, then Theorem 14 showed that we did not use SrcStepCtxN. If M is N-free, then by Lemma 13, M ′ is N-free. By i.h., there exists e ′ such that e1 ∗ e ′ and · ⊢ e ′ val : S ֒→ W. It follows that e ∗ e ′ . If a source type, economical typing judgment, or target term is not N-free, we say it is N-tainted. Lemma 16. If Γ ⊢E e ϕ ⇒ S and S is not N-free then it is not the case that both Γ and e are N-free. Proof. By induction on the given derivation. If S ′ is not N-free, then e = e0 [S ′ ] is not N-free. Otherwise, we have that S = [S ′ /α]S0 is not N-free; since S ′ is N-free, S0 must not be N-free, which lets us apply the i.h., giving the resut. • Case E∀Elim: 32 2015/9/15 • Cases EDElim, E◮ElimV , E◮Elimǫ : The i.h. gives the result. • Cases Evar, Efixvar: The type S appears in Γ , so Γ is N-tainted. • Case Eanno: The type S appears in e = (e0 :S), so e is N-tainted. • Case E→Elim: If S is N-tainted then S1 → S is N-tainted, and the result follows by i.h. • Cases E∗Elim, EµElim: Similar to the E→Elim case. Theorem 17 (Economizing preserves N-freeness). If γ ⊢I e ϕ ⇐ τ (resp. ⇒) where the judgment is N-free (Definition 1 (2)) then ⌊γ⌋ ⊢E ⌊e⌋ is N-free (Definition 2 (2)). ϕ⇐ ⌊τ⌋ (resp. ⇒) where this judgment Proof. By induction on the given derivation. We can simply follow the proof of Theorem 1, observing that if the given impartial ǫ judgment is N-free, the resulting economical judgment is N-free. For example, in the I→Intro case, we have τ = (τ1 → τ2 ). Since we know that τ is N-free, ǫ = V, so the translation of τ is V◮⌊τ1 ⌋ → ⌊τ2 ⌋, which is N-free. Note that Definition 1 (2)(b) bars x ⊤ ⇒ τ declarations—which would result in x : N◮ · · · —from γ. Theorem 18 (Elaboration preserves N-freeness). If Γ ⊢E e ϕ ⇐ S (or ⇒) where the judgment is N-free (Definition 2 (2)) then Γ ⊢ er(e) ϕ : S ֒→ M such that M is N-free. Proof. By induction on the given derivation. • Case E1Intro: • Case EDIntro: • Case EDElim: • • • • • • • Apply elab1Intro. Impossible: S = Da. S0 , which is not N-free (Definition 2 (1)(ii)). We have Γ ⊢E e ϕ ⇒ Da. S0 , where S = [S ′ /a]S0 . By Definition 2 (1)(ii), the type Da. S0 is N-tainted. So, by Lemma 16, at least one of Γ and e is N-tainted. But it was given that the judgment Γ ⊢E e ϕ ⇒ S is N-free, which means that Γ and e are N-free. We have a contradiction: this case is impossible. Case E◮Intro (first conclusion): Use the i.h. and apply rule elab◮Intro (first conclusion). Case E◮Intro (second conclusion): Impossible: S = N◮S0 , which is not N-free. Case E◮ElimV : Use the i.h. and apply rule elab◮ElimV . Case E◮Elimǫ : We have Γ ⊢E e ϕ ⇒ ǫ◮S. If ǫ = V then use the i.h., apply rule elab◮ElimV . Otherwise, ǫ◮S is not N-free. As in the EDElim case, we can use Lemma 16 to reach a contradiction. Cases Evar, Efixvar, Efix, E∀Intro, E∀Elim, E→Intro, E→Elim, E∗Elim, E+Introk , E+Elim, EµIntro, EµElim: Use the i.h. on all subderivations (if any) and apply the corresponding elaboration rule, e.g. in the Efix case, apply elabfix. Cases Esub, Eanno: Use the i.h. Case E∗Intro: Use the i.h. on each subderivation, and apply elab∗Intro. 33 2015/9/15
6cs.PL
arXiv:1601.01103v1 [math.AC] 6 Jan 2016 WEAK DIMENSION OF FP-INJECTIVE MODULES OVER CHAIN RINGS FRANÇOIS COUCHOT Abstract. It is proven that the weak dimension of each FP-injective module over a chain ring which is either Archimedean or not semicoherent is less or equal to 2. This implies that the projective dimension of any countably generated FP-injective module over an Archimedean chain ring is less or equal to 3. By [7, Theorem 1], for any module G over a commutative arithmetical ring R the weak dimension of G is 0, 1, 2 or ∞. In this paper we consider the weak dimension of almost FP-injective modules over a chain ring. This class of modules contains the one of FP-injective modules and these two classes coincide if and only if the ring is coherent. If G is an almost FP-injective module over a chain ring R then its weak dimension is possibly infinite only if R is semicoherent and not coherent. In the other cases the weak dimension of G is at most 2. Moreover this dimension is not equal to 1 if R is not an integral domain. Theorem 15 summarizes main results of this paper. We complete this short paper by considering almost FP-injective modules over local fqp-rings. This class of rings was introduced in [1] by Abuhlail, Jarrar and Kabbaj. It contains the one of arithmetical rings. It is shown the weak dimension of G is infinite if G is an almost FP-injective module over a local fqp-ring which is not a chain ring (see Theorem 23). All rings in this paper are unitary and commutative. A ring R is said to be a chain ring1 if its lattice of ideals is totally ordered by inclusion. Chain rings are also called valuation rings (see [9]). If M is an R-module, we denote by w.d.(M ) its weak dimension and p.d.(M ) its projective dimension. Recall that w.d.(M ) ≤ n if TorR n+1 (M, N ) = 0 for each R-module N . For any ring R, its global weak dimension w.gl.d(R) is the supremum of w.d.(M ) where M ranges over all (finitely presented cyclic) R-modules. Its finitistic weak dimension f.w.d.(R) is the supremum of w.d.(M ) where M ranges over all R-modules of finite weak dimension. A ring is called coherent if all its finitely generated ideals are finitely presented. As in [14], a ring R is said to be semicoherent if HomR (E, F ) is a submodule of a flat R-module for any pair of injective R-modules E, F . A ring R is said to be IF (semi-regular in [14]) if each injective R-module is flat. If R is a chain ring, we denote by P its maximal ideal, Z its subset of zerodivisors which is a prime ideal and Q(= RZ ) its fraction ring. If x is an element of a module M over a ring R, we denote by (0 : x) the annihilator ideal of x and by E(M ) the injective hull of M . 2010 Mathematics Subject Classification. 13F30, 13C11, 13E05. Key words and phrases. chain ring, injective module, FP-injective module, weak dimension. 1we prefer “chain ring ” to “valuation ring” to avoid confusion with “Manis valuation ring”. 1 2 FRANÇOIS COUCHOT Some preliminary results are needed to prove Theorem 15 which is the main result of this paper. Proposition 1. [7, Proposition 4]. Let R be a chain ring. The following conditions are equivalent: (1) R is semicoherent; (2) Q is an IF-ring; (3) Q is coherent; (4) either Z = 0 or Z is not flat; (5) E(Q/Qa) is flat for each nonzero element a of Z; (6) there exists 0 6= a ∈ Z such that (0 : a) is finitely generated over Q. An exact sequence of R-modules 0 → F → E → G → 0 is pure if it remains exact when tensoring it with any R-module. Then, we say that F is a pure submodule of E. When E is flat, it is well known that G is flat if and only if F is a pure submodule of E. An R-module E is FP-injective if Ext1R (F, E) = 0 for any finitely presented R-module F . We recall that a module E is FP-injective if and only if it is a pure submodule of every overmodule. We define a module G to be almost FP-injective if there exist a FP-injective module E and a pure submodule D such that G ∼ = E/D. By [15, 35.9] the following theorem holds: Theorem 2. A ring R is coherent if and only if each almost FP-injective R-module is FP-injective. Proposition 3. For any ring R the following conditions are equivalent: (1) R is self FP-injective; (2) each flat R-module is almost FP-injective. Proof. (1) ⇒ (2). Each flat module G is of the form F/K where F is free and K is a pure submodule of F . Since F is FP-injective then G is almost FP-injective. (2) ⇒ (1). We use the fact that R is projective to show that R is a direct summand of a FP-injective module.  v Proposition 4. Let R be a ring and 0 → L − → M → N → 0 a pure exact sequence of R-modules. Then w.d.(M ) = max(w.d.(L), w.d.(N )). Proof. Let m = w.d.(M ) and let G be an R-module. We consider the following flat resolution of G: up u u 1 2 F0 → G → 0. F1 −→ Fp −→ Fp−1 . . . F2 −→ For each positive integer p let Gp be the image of up . We have the following exact sequence: idG ⊗v m R TorR 1 (Gm , M ) → Tor1 (Gm , N ) → Gm ⊗R L −−−−−→ Gm ⊗R M. R ∼ Since TorR 1 (Gm , M ) = Torm+1 (G, M ) = 0 and idGm ⊗ v is a monomorphism we R ∼ TorR (Gm , N ) = 0. So, w.d.(N ) ≤ m. Now it is easy deduce that Torm+1 (G, N ) = 1 to show first, that w.d.(L) ≤ m too, and then, if q = max(w.d.(L), w.d.(N )), that TorR  q+1 (G, M ) = 0 for each R-module G. Hence m = q. Proposition 5. Let R be a chain ring. Then: (1) w.d.(R/Z) = ∞ if R is semicoherent and Z 6= 0; (2) w.d.(R/Z) = 1 if R is not semicoherent. WEAK DIMENSION OF FP-INJECTIVE MODULES 3 Proof. We consider the following exact sequence: 0 → R/Z → Q/Z → Q/R → 0. If R 6= Q then w.d.(Q/R) = 1. (1). By [4, Propositions 8 and 14] applied to Q and Proposition 1 w.d.(Q/Z) = ∞. By using the previous exact sequence when R 6= Q we get w.d.(R/Z) = ∞. (2). By Proposition 1 w.d.(Q/Z) = 1. When R 6= Q we conclude by using the previous exact sequence.  Proposition 6. Let R be a chain ring. If R is IF, let H = E(R/rR) where 0 6= r ∈ P . If R is not IF, let x ∈ E(R/Z) such that Z = (0 : x) and H = E(R/Z)/Rx. Then: (1) H is FP-injective; (2) for each 0 6= r ∈ R there exists h ∈ H such that (0 : h) = Rr; (3) w.d.(H) = ∞ if R is semicoherent and R 6= Q; (4) w.d.(H) = 2 if R is not semicoherent. Proof. (1). When R 6= Q, H is FP-injective by [4, Proposition 6]. If R = Q is not IF then H ∼ = E(R/rR) for each 0 6= r ∈ P by [4, Proposition 14]. (2). Let 0 6= r ∈ R. Then (0 : r) ⊆ Z = (0 : x). From the injectivity of E(R/Z) we deduce that there exists y ∈ E(R/Z) such that x = ry. Now, if we put h = y + Rx it is easy to check that (0 : h) = (Rx : y) = Rr. (3) and (4). By [4, Proposition 8] E(R/Z) is flat. We use the exact sequence 0 → R/Z → E(R/Z) → H → 0 and Proposition 5 to conclude.  The following proposition is a slight modification of [4, Proposition 9]. Proposition 7. Let R be a chain ring and G an injective module. Then there exists a pure exact sequence: 0 → K → I → G → 0, such that I is a direct sum of submodules isomorphic to R or H. Proof. There exist a set Λ and an epimorphism ϕ : L = RΛ → G. We put ∆ = HomR (H, G) and ρ : H (∆) → G the morphism defined by the elements of ∆. Thus ψ and ρ induce an epimorphism φ : I = R(Λ) ⊕ H (∆) → G. Since, for every r ∈ P, r 6= 0, each morphism g : R/Rr → G can be extended to H → G, we deduce that K = ker φ is a pure submodule of I.  Lemma 8. Let G be an almost FP-injective module over a chain ring R. Then for any x ∈ G and a ∈ R such that (0 : a) ⊂ (0 : x) there exists y ∈ G such that x = ay. Proof. We have G = E/D where E is a FP-injective module and D a pure submodule. Let e ∈ E such that x = e + D. Let b ∈ (0 : x) \ (0 : a). Then be ∈ D. So, we have b(e − d) = 0 for some d ∈ D. Whence (0 : a) ⊂ Rb ⊆ (0 : e − d). From the FP-injectivity of E we deduce that e − d = az for some z ∈ E. Hence x = ay where y = z + D.  Let M be a non-zero module over a ring R. We set: M♯ = {s ∈ R | ∃0 6= x ∈ M such that sx = 0} and M ♯ = {s ∈ R | sM ⊂ M }. Then R \ M♯ and R \ M ♯ are multiplicative subsets of R. If M is a module over a chain ring R then M♯ and M ♯ are prime ideals called respectively the bottom prime ideal and the top prime ideal associated with M . Proposition 9. Let G be a module over a chain ring R. Then: 4 FRANÇOIS COUCHOT (1) (2) (3) (4) G♯ ⊆ Z if G is flat; G♯ ⊆ Z if G is almost FP-injective; G♯ ⊆ Z ∩ G♯ if G is FP-injective. So, G is a module over RG♯ ; G is flat and FP-injective if G is almost FP-injective and G♯ ∪ G♯ ⊂ Z. In this case G♯ ⊆ G♯ . Proof. (1). Let a ∈ G♯ . There exists 0 6= x ∈ G such that ax = 0. The flatness of G implies that x ∈ (0 : a)G. So, (0 : a) 6= 0 and a ∈ Z. (2). Let s ∈ R \ Z. Then for each x ∈ G, 0 = (0 : s) ⊆ (0 : x). If G is FP-injective then x = sy for some y ∈ G. If G is almost FP-injective then it is factor of a FP-injective module, so, the multiplication by s in G is surjective. (3). Let a ∈ R \ G♯ and x ∈ G. Let b ∈ (0 : a). Then abx = 0, whence bx = 0. So, (0 : a) ⊆ (0 : x). It follows that x = ay for some y ∈ G since G is FP-injective. Hence a ∈ / G♯ . (4). Let 0 → X → E → G → 0 be a pure exact sequence where E is FP-injective, and L = G♯ ∪ G♯ . Then 0 → XL → EL → G → 0 is a pure exact sequence and by [5, Theorem 3] EL is FP-injective. By [4, Theorem 11] RL is an IF-ring. Hence G is FP-injective and flat.  Example 10. Let D be a valuation domain. Assume that D contains a non-zero prime ideal L 6= P and let 0 6= a ∈ L. By [7, Example 11 and Corollary 9] R = D/aDL is semicoherent and not coherent. Since R is not self FP-injective then ER (R/P ) is not flat by [3, Proposition 2.4]. Example 11. Let R be a semicoherent chain ring which is not coherent and G an FP-injective module which is not flat. Then GZ is almost FP-injective over R but not over Q, and (GZ )♯ ∪ (GZ )♯ = Z. Proof. Let G′ be the kernel of the canonical homomorphism G → GZ . By Proposition 9 the multiplication in G and G/G′ by any s ∈ R \ Z is surjective. So, GZ ∼ = G/G′ . For each s ∈ P \Z we put G(s) = G/(0 :G s). Then G(s) is FP-injective G . because it is isomorphic to G. Since G′ = ∪s∈P \Z (0 :G s) then GZ ∼ = lim −→s∈P \Z (s) By [15, 33.9(2)] GZ is factor of the FP-injective module ⊕s∈P \Z G(s) modulo a pure submodule. Hence GZ is almost FP-injective over R. Since Q is IF and GZ is not FP-injective by [5, Theorem 3], from Theorem 2 we deduce that GZ is not almost FP-injective over Q. We complete the proof by using Proposition 9(4).  The following lemma is a consequence of [10, Lemma 3] and [13, Proposition 1.3]. Lemma 12. Let R be a chain ring for which Z = P , and A an ideal of R. Then A ⊂ (0 : (0 : A)) if and only if P is faithful and there exists t ∈ R such that A = tP and (0 : (0 : A)) = tR. Proposition 13. Let R be a chain ring for which Z 6= 0. Then w.d.(G) 6= 1 for any almost FP-injective R-module G. Proof. By way of contradiction assume there exists an almost FP-injective Rmodule G with w.d.(G) = 1. There exists an exact sequence 0 → K → F → G → 0 which is not pure, where F is free and K is flat. First we assume that R = Q, whence P = Z. So there exist b ∈ R and x ∈ F such that bx ∈ K \ bK. We put B = (K : x). From b ∈ B we deduce that (0 : B) ⊆ (0 : b). We investigate the following cases: WEAK DIMENSION OF FP-INJECTIVE MODULES 5 1. (0 : B) ⊂ (0 : b). Let a ∈ (0 : b) \ (0 : B). Then (0 : a) ⊂ (0 : (0 : B)). If P is not faithful then (0 : a) ⊂ B by Lemma 12. If P is faithful then B 6= (0 : (0 : B)) if B = P t for some t ∈ R. But, in this case (0 : a) is not of the form P s for some s ∈ R. So, (0 : a) ⊂ B. By Lemma 8 there exist y ∈ F and z ∈ K such that x = ay + z. It follows that bx = bz ∈ bK. Whence a contradiction. 2.1. (0 : B) = (0 : b) ⊂ P . Let r ∈ P \ (0 : b). Then (0 : r) ⊂ Rb. Let 0 6= c ∈ (0 : r). There exists t ∈ P such that c = tb. So, (0 : b) ⊂ (0 : c). If cx ∈ cK, then tbx = tby for some y ∈ K. Since K is flat we get that (bx − by) ∈ (0 : t)K ⊆ bK (c = bt 6= 0 implies that (0 : t) ⊂ bR), whence bx ∈ bK, a contradiction. Hence cx ∈ / cK. So, if we replace b with c we get the case 1. 2.2.1. (0 : B) = (0 : b) = P = bR. Since b2 = 0 we have b(bx) = 0. The flatness of K implies that bx ∈ bK, a contradiction. 2.2.2. (0 : B) = (0 : b) = P 6= bR. Let c ∈ P \ bR. Then cx ∈ / K and there exists s ∈ P such that b = sc. We have (K : cx) = Rs 6= Rb. So, if scx ∈ / sK we get the case 2.1 by replacing b with s and x with cx. Suppose that scx ∈ sK. We get s(cx − y) = 0 for some y ∈ K. The flatness of F implies that (cx − y) ∈ (0 : s)F ⊂ cF . Whence y = c(x + z) for some z ∈ F . If y = cv for some v ∈ K then bx = sy = scv = bv ∈ bK. This is false. Hence c(x + z) ∈ K \ cK and (0 : (K : x + z)) ⊆ (0 : c) ⊂ Rs ⊂ P . So, we get either the case 1 or the case 2.1 by replacing x with (x + z) and b with c. Now, we assume that R 6= Q. First, we show that GZ is flat. Since K and F are flat then so are KZ and FZ . If Q is coherent, then KZ is FP-injective. So, it is a pure submodule of FZ and consequently GZ is flat. If Q is not coherent, then Z is flat, and by using [5, Theorem 3] it is easy to show that GZ is almost FP-injective. Since w.d.(GZ ) ≤ 1, from above we deduce that GZ is flat. Let G′ be the kernel of the canonical homomorphism G → GZ . As in the proof of Proposition 9 we have GZ ∼ = G/G′ . So, G′ is a pure submodule of G. For each x ∈ G′ there exists s ∈ P \ Z such that sx = 0. Hence G′ is a module over R/Z. But if 0 6= a ∈ Z, (0 : a) ⊆ Z ⊂ (0 : x) for any x ∈ G′ . By Lemma 8 x = ay for some y ∈ G, and since G′ is a pure submodule, we may assume that y ∈ G′ . Hence G′ = 0, G ∼ = GZ and G is flat.  Example 14. Let D be a valuation domain. Let 0 6= a ∈ P . By [4, Theorem 11] R = D/aD is an IF-ring. Now it is possible to state and to prove our main result. Theorem 15. For any almost FP-injective module G over a chain ring R: (1) w.d.(G) = 0 if R is an IF-ring; (2) if R is a valuation domain which is not a field then: (a) w.d.(G) = 0 if G♯ = 0 (G is torsionfree); (b) w.d.(G) = 1 if G♯ 6= 0; (3) if R is semicoherent but not coherent then; (a) w.d.(G) = ∞ if Z ⊂ G♯ ; (b) w.d.(G) = 0 if G♯ ∪ G♯ ⊂ Z; (c) if G♯ ∪G♯ = Z either w.d.(G) = 0 if G is FP-injective or w.d.(G) = ∞ if G is not FP-injective; 6 FRANÇOIS COUCHOT (4) if R (a) (b) (c) is not semicoherent then Z ⊗R G is flat and almost FP-injective, and: w.d.(G) = 2 if Z ⊂ G♯ ; w.d.(G) = 0 if G♯ ∪ G♯ ⊂ Z; if G♯ ∪ G♯ = Z either w.d.(G) = 0 or w.d.(G) = 2. More precisely G is flat if and only if, for any 0 6= x ∈ G, (0 : x) is not of the form Qa for some 0 6= a ∈ Z. Proof. (1). Since R is IF then G is FP-injective and flat. (2). It is an immediate consequence of the fact that w.gl.d(R) = 1. (3). From [7, Theorem 2] which asserts that f.w.d.(R) = 1 in this case, we deduce that w.d.(G) < ∞ ⇒ w.d.(G) ≤ 1 and by Proposition 13 w.d.(G) = 0. We use Proposition 9 to complete the proof. (Example 11 shows there exist almost FP-injective modules G which are not FP-injective, with Z = G♯ ∪ G♯ ). (4). First we assume that G is injective. By Proposition 7 there exists a pure exact sequence: 0 → K → I → G → 0, such that I is a direct sum of submodules isomorphic to R or H. If I is flat then so is G. We may assume that G is not flat. It follows that w.d.(I) = 2 by Proposition 6. By Proposition 4 w.d.(G) ≤ 2. Then, we assume that G is FP-injective. So, G is a pure submodule of its injective hull E. Again, by Proposition 4, w.d.(G) ≤ 2. If G is almost FP-injective then G ∼ = E/D where E is FP-injective and D a pure submodule. We again use Proposition 4 to get w.d.(G) ≤ 2. We use Propositions 9 and 13 to complete the proof of (a), (b) and the first assertion of (c). Let 0 6= x ∈ G and A = (0 : x). Since G is a Q-module A is an ideal of Q. Suppose that A is not a non-zero principal ideal of Q and let 0 6= r ∈ A. Then rQ ⊂ A. It follows that (0 : A) ⊂ (0 : r). Let b ∈ (0 : r) \ (0 : A). Since Q is not coherent there exists a ∈ (0 : r) \ Qb. Then (0 : a) ⊂ (0 : b) ⊆ A by Lemma 12. By Lemma 8 there exists y ∈ G such that x = ay, whence x ∈ (0 : r)G. Now suppose that A = Qr for some 0 6= r ∈ Z. If a ∈ (0 : r) then rQ ⊂ (0 : a), whence x ∈ / aG. So, x ∈ / (0 : r)G. This completes the proof of (c). It remains to prove the first assertion. By [7, Theorem 2] Z ⊗Z G is flat. It is easy to check that Z is a Q-module, whence so is Z ⊗R G. Since Q is self FP-injective we conclude that Z ⊗R G is almost FP-injective by Proposition 3.  We say that a chain ring is Archimedean if its maximal ideal is the only nonzero prime ideal. Corollary 16. For any almost FP-injective module G over an Archimedean chain ring R: (1) w.d.(G) = 0 if R is an IF-ring; (2) w.d.(G) ≤ 1 if R is a valuation domain; (3) either w.d.(G) = 2 or w.d.(G) = 0 if R is not coherent. More precisely G is flat if and only if, for any 0 6= x ∈ G (0 : x) is not of the form Ra for some 0 6= a ∈ P . Moreover P ⊗R G is flat and almost FP-injective. Let us observe that w.d.(G) ≤ 2 for any almost FP-injective module G over an Archimedean chain ring. Example 17. Let D be an Archimedean valuation domain. Let 0 6= a ∈ P . Then D/aD is Archimedean and it is IF by Example 14. Corollary 18. Let R be an Archimedean chain ring. For any almost FP-injective R-module G which is either countably generated or uniserial: WEAK DIMENSION OF FP-INJECTIVE MODULES 7 (1) p.d.(G) ≤ 1 if R is an IF-ring; (2) p.d.(G) ≤ 2 if R is a valuation domain; (3) p.d.(G) ≤ 3 and p.d.(P ⊗R G) ≤ 1 if R is not coherent. Proof. By [6, Proposition 16] each uniserial module (ideal) is countably generated. So, this corollary is a consequence of Corollary 16 and [12, Lemmas 1 and 2].  Remark 19. If R is an Archimedean valuation domain then w.d.(G) ≤ 1 and p.d.(G) ≤ 2 for any R-module G. Let R be a ring, M an R-module. A R-module V is M -projective if the natural homomorphism HomR (V, M ) → HomR (V, M/X) is surjective for every submodule X of M . We say that V is quasi-projective if V is V -projective. A ring R is said to be an fqp-ring if every finitely generated ideal of R is quasi-projective. The following theorem can be proven by using [1, Lemmas 3.8, 3.12 and 4.5]. Theorem 20. [8, Theorem 4.1]. Let R a local ring and N its nilradical. Then R is a fqp-ring if and only if either R is a chain ring or R/N is a valuation domain and N is a divisible torsionfree R/N -module. Lemma 21. Let R be a local ring and P its maximal ideal. Assume that (0 : P ) 6= 0. If R is a FP-injective module then (0 : P ) is a simple module. Proof. Let 0 6= a ∈ (0 : P ). By [11, Corollary 2.5 ] Ra = (0 : (0 : a)). But (0 : a) = P . So, Ra = (0 : P ).  Example 22. Let D be a valuation domain which is not a field and E a non-zero divisible torsionfree D-module which is not uniserial. Then R = D ∝ E the trivial extension of D by E is a local fqp-ring which is not a chain ring by [8, Corollary 4.3(2)]. Theorem 23. For any non-zero almost FP-injective module G over a local fqp-ring R which is not a chain ring, w.d.(G) = ∞. Proof. By [8, Proposition 5.2] f.w.d.(R) ≤ 1. If N is the nilradical of R then its quotient ring Q is RN and this ring is primary. First assume that R = Q. Then each flat module is free and f.w.d.(R) = 0 by [2, Theorems P and 6.3]. If G is free, it follows that R is FP-injective. By Lemma 21 this is possible only if N is simple, whence R is a chain ring. Hence w.d.(G) = ∞. Now assume that R 6= Q and w.d.(G) ≤ 1. Then w.d.(GN ) ≤ 1. Since f.w.d.(Q) = 0 it follows that GN is flat. As in the proof of Proposition 13, with the same notations we show that GN ∼ = G/G′ and G′ is a module over R/N . But if 0 6= a ∈ N , (0 : a) = N ⊂ (0 : x) for any x ∈ G′ . As in the proof of Lemma 8 we show that x = ay for some y ∈ G. Since G′ is a pure submodule, we may assume that y ∈ G′ . Hence G′ = 0, G ∼ = GN and G is flat. We use the first part of the proof to conclude.  References [1] J. Abuhlail, V. Jarrar, and S. Kabbaj. Commutative rings in which every finitely generated ideal is quasi-projective. J. Pure Appl. Algebra, 215:2504–2511, (2011). [2] H. Bass. Finitistic dimension and a homological generalization of semi-primary rings. Trans. Amer. Math. Soc., 95:466–488, (1960). [3] F. Couchot. Exemples d’anneaux auto fp-injectifs. Comm. Algebra, 10(4):339–360, (1982). 8 FRANÇOIS COUCHOT [4] F. Couchot. Injective modules and fp-injective modules over valuation rings. J. Algebra, 267:359–376, (2003). [5] F. Couchot. Localization of injective modules over valuations rings. Proc. Amer. Math. Soc., 134(4):1013–1017, (2006). [6] F. Couchot. Pure-injective hulls of modules over valuation rings. J. Pure Appl. Algebra, 207:63–76, (2006). [7] F. Couchot. Finitistic weak dimension of commutative arithmetical rings. Arabian J. Math., 1(1):63–67, (2012). [8] F. Couchot. Trivial ring extensions of Gaussian rings and fqp-rings. Comm. Algebra, 43(7):2863–2874, (2015). [9] L. Fuchs and L. Salce. Modules over valuation domains, volume 97 of Lecture Notes in Pure an Appl. Math. Marcel Dekker, New York, (1985). [10] D.T. Gill. Almost maximal valuation rings. J. London Math. Soc., 4:140–146, (1971). [11] S. Jain. Flatness and FP-injectivity. Proc. Amer. Math. Soc., 41(2):437–442, (1973). [12] C.U. Jensen. Homological dimensions of rings with countably generated ideals. Math. Scand., 18:97–105, (1966). [13] G.B. Klatt and L.S. Levy. Pre-self injectives rings. Trans. Amer. Math. Soc., 137:407–419, (1969). [14] E. Matlis. Commutative semicoherent and semiregular rings. J. Algebra, 95(2):343–372, (1985). [15] R. Wisbauer. Foundations of Module and Ring Theory. (1991). Université de Caen Basse-Normandie, CNRS UMR 6139 LMNO, F-14032 Caen, France E-mail address: [email protected]
0math.AC
ON THE 2-LINEARITY OF THE FREE GROUP arXiv:1606.06444v1 [math.RT] 21 Jun 2016 ANTHONY M. LICATA 1. Introduction Let Γ be a group, and D a category. A weak action of Γ on D is a map ψ : Γ −→ Aut(D), g 7→ ψg , from Γ to the auto-equivalences of D, such that for all h, g ∈ Γ, ψg ψh ∼ = ψgh . In a genuine action of Γ, one also specifies isomorphisms αg,h : ψg ψh → ψgh and requires them to satisfy an associativity constraint. Though the entirety of this paper is concerned only with a single weak action, the one we consider can be made genuine, and it is worth noting from the outset the importance of genuine actions. If k is a field and the category D is enriched in finite dimensional k-vector spaces, we say that ψ is a 2-representation of Γ. Let [Aut(D)] denote the group of isomorphism classes of auto-equivalences of D. Given a weak action of Γ on D, the induced map [ψ] : Γ −→ [Aut(D)] is a group homomorphism. It often happens in examples that the category D is also triangulated, with Γ acting by triangulated auto-equivalences. We can then restrict even more and ask that the triangulated category D be finitely-generated, which means that there are finitely many objects of D with the property that the smallest full triangulated subcategory containing all of them is D itself. We then arrive at the following definition. Definition 1. A group Γ is 2-linear if Γ admits a 2-representation ψ on a finitely-generated k-linear triangulated category such that the associated group homomorphism [ψ] is injective. This notion of a 2-linear group is analogous to the notion of a linear group, which is one that embeds into the group of invertible endomorphisms of a finite-dimensional k-vector space. In the last twenty years a number of explicit examples of 2-representations of groups on triangulated categories have appeared in representation theory, symplectic and algebraic geometry, and mathematical physics. Often in these examples, however, it is the triangulated category that is of interest, with the group and its 2-representation appearing mainly as organizing objects. Moreover, despite the existence of interesting examples, the class of 2linear groups remains somewhat understudied as a chapter of combinatorial and geometric group theory. For example, almost nothing is known at present about the group theoretic consequences of 2-linearity, and it is not at all clear how different the classes of 2-linear and linear groups are from one another. Nevertheless, it appears that the class of 2-linear groups is very rich. In particular, the following groups are either known or conjectured to be 2-linear. • Coxeter groups and their braid groups. Coxeter groups themselves are 2-linear 1 while their groups are known to be 2-linear in some important special cases [9, 15, 1The 2-linearity of a Coxeter group W of simply-laced type follows, for example, from work of FrenkelKhovanov-Schiffmann [12]. The underlying triangulated category in the FKS 2-representation is a category of matrix factorizations over a non-commutative zigzag algebra. The Grothendieck group of this 1 16, 18, 20, 26]. In [25], Rouquier conjectures that the 2-representation of an arbitrary Artin-Tits braid group on the homotopy category of Soergel bimodules is faithful. • Mapping class groups of surfaces. The theory of bordered Floer-homology of LipshitzOszvath-Thurston provides faithful 2-representations of mapping class groups of surfaces with boundary [22]. As far as we are aware, it is an open problem to show that the mapping class groups of closed surfaces are 2-linear. The question of grouptheoretic consequences of 2-linearity was first posed by Lipshitz-Oszvath-Thurston. • Fundamental groups of complexified hyperplane arrangements. Many of the organizing functors (twisting, shuffling, wall-crossing, cross-walling,...) of geometric representation theory and symplectic-algebraic geometry produce 2-representations of these fundamental groups. Of particular interest here are the 2-representations of fundamental groups on the derived category of category O for a symplectic resolution [5, 7, 8, 23]. It is an open question to determine when these 2-representations are faithful. The n-strand Artin braid group Bn is perhaps the best studied example from the point of view of 2-linearity, and Bn appears as an entry in each of the three classes described above. The existing literature on 2-representations of Bn also motivates the interest in studying explicit faithful 2-representations in detail. For the first non-trivial example of a representation of Bn on a vector space – the Burau representation – is not faithful except for small n. Moreover, although the group Bn is known to be linear by work of Bigelow and Krammer [6, 19], studying Bn via the Bigelow-Krammer representation is difficult. On the other hand, the first non-trivial example of a 2-representation of Bn – the categorification of the Burau representation – is already faithful, as was shown first by Khovanov-Seidel [18] and, for n = 3, Rouquier-Zimmermann [26]. Moreover, much of the rich mathematics related to the braid group is readily visible from the lens of this first faithful 2-representation. (See, for example, [18, 28, 26, 9, 3], each of which contains a explanation of how some structure of interest in the study of the braid group appears in the categorified Burau representation.) The goal of the current paper is to define and study what we feel is a basic and prototypical example of a faithful 2-representation of a group. We construct a faithful 2-representation of the free group Fn and explore how some of the structure of Fn appears from the homological algebra of this 2-representation. Our underlying category D is the homotopy category of b where k is a field of characteristic 0. projective modules over a finite dimensional k-algebra A, This algebra, which is an example of a zigzag algebra, is the Koszul dual of the preprojective algebra of the doubled complete graph (see Section 4.1.) Our main result, which establishes the 2-linearity of Fn , is the following. Theorem 1.1. The action of Fn on D is faithful. b has n indecomposable projective modules P1 , . . . , Pn , and the SeidelThe zigzag algebra A Thomas spherical twists in these objects define the action of the standard generators of σ1 , . . . , σn of Fn . If spherical objects E1 , E2 have no morphisms between them, then the associated spherical twists ΦE1 and ΦE2 will commute; when there is a one-dimensional space of morphisms between them, on the other hand, the spherical twists will braid. Thus, if the spherical twists in objects P1 , . . . , Pn are to generate a free action of Fn , the dimensions 2-representation is the reflection representation of W , which is known to be faithful. One can give a similar construction for other Coxeter groups using matrix factorizations of Soergel bimodules. 2 of morphism spaces between each pair of the generating spherical objects must be at least 2. b is constructed so that dim Hom(Pi , Pj ) = 2 for all i, j = 1, . . . , n. From this Our algebra A point of view, our main result Theorem 1.1 below is somewhat analogous to a theorem of Keating [17], who proves that if L and L′ are two non-quasi-isomorphic Lagrangian spheres in a symplectic manifold M with dim Hom(L, L′ ) = 2 in the Fukaya category of M, then the Dehn twists in L and L′ generate a free froup of rank 2 inside the symplectomorphism group of M. Our proof of Theorem 1.1 is by ping pong. After establishing Theorem 1.1, we devote the remaining sections to describing how other structure of interest in the mathematics of the free b For instance, we describe group appears in the representation theory of the zigzag algebra A. is how two different monoids in Fn arise as stabilizers of “non-negative” subcategories of the category D. These non-negative subcategories, in turn, arise from non-negative gradings b – the oe-grading – gives rise to a on the zigzag algebra. For example, one grading on A oe oe subcategory D≥0 ⊂ D with the property that g ∈ Fn preserves D≥0 if and only if g is in the standard positive monoid generated by σ1 , . . . , σn . This particular grading is used crucially b – the ~o-grading – gives rise to in our ping pong proof of Theorem 1.1. Another grading on A ~ o ~ o ~ o a different subcategory D≥0 with the property that g(D≥0 ) ⊂ D≥0 if and only if g is in the + dual positive monoid Fn of Fn defined by Bessis in [4]. In fact, the ping pong construction used in the proof Theorem 1.1, which uses the baric structure determined by the oe-grading, has a dual analog which uses the ~o-grading and the Bessis monoid. The appearance of the Bessis monoid in relation to the ~o-grading hints at a close relationship between the ~o-graded b and the topology of the punctured disk (whose fundamental group representation theory of A is the free group). This relationship is partially explored in Section 6 (see, for example, Proposition 6.4). The categories D≥0 (e o) and D≥0 (~o) are both the non-negative parts of baric structures in the sense of Achar-Treumann [1]. At the end of the paper we use the compatability of monoids and baric structures to give homological interpretations of the standard and Bessis dual word-length metrics on Fn in Theorems 7.1 and 7.2. These theorems equate the relevant word length of g ∈ Fn with the associated “baric spread” of g in its action on D. b the Koszul path-length grading, gives rise to a t-structure (D ≥0 , D ≤0 ). A third grading on A, Just as for the baric subcategory D≥0 (e o), a group element g ∈ Fn preserves the subcategory ≥0 D if and only if g is in the standard positive monoid. However, the metric on the free group determined by this t structure is different than the metrics defined by baric structures, and the little bit we know about it is mentioned at the end of the paper. It would be interesting to give a combinatorial description, without direct reference to the category D, of this exotic metric. b and the action of Fn on the homotopy category The construction of the zigzag algebra A b modules is very similar to a number of earlier constructions of braid and of projective A Artin-Tits group actions on representation categories of quivers [14, 18, 25, 26]. Analogs of some aspects of this paper should exist for arbitrary Artin-Tits braid groups, and we plan to write about special cases of spherical and right-angled Artin-Tits groups in [21] and [20], respectively. In the remainder of the introduction we give a more detailed explanation of the contents of the paper. 3 1.1. Contents. In Section 2 we collect some information about the free group to be used later, including the definition of reflections in Fn , the Bessis monoid Fn+ , and the Hurwitz action of Bn on reduced expressions for the Coxeter element γ = σ1 . . . σn . In Section 3, we recall Klein’s ping pong lemma and state a dual ping pong lemma using the Bessis monoid Fn+ . The point of both of these lemmas is to formulate conditions which guarantee that an action of Fn on a set is free. A notable point about the dual ping pong lemma is that it only requires studying the positive Bessis monoid Fn+ and not the entire free group. Our formulation of dual ping pong using Fn+ is motivated by a similar formulation for the positive monoid of the braid group Bn used by Krammer in [19]. b introduce several gradings on In Section 4 we begin by defining the zigzag algebra A, b it, and discuss some basic properties of the homotopy category of (graded) projective A modules. We then define the relevant baric and t-structures on this triangulated category. Finally, the 2-representation Ψ : Fn → Aut(D) is defined in Section 4.8. The proof of Theorem 1.1 is given in Section 5, and it is by ping pong. Crucial in the construction is the non-negative oe-grading of the zigzag algebra arising from a specific orientation õ of the doubled complete graph; this grading induces a baric structure on D, and we use the slices of this baric structure to construct the non-empty disjoint sets required for the application of the ping pong lemma. As a consequence, we obtain a homological realization of the standard word-length metric on Fn , which we formulate at the end of the paper in Theorem 7.1. In Section 6, we revisit the relationship between the free group and the category D from the point of view of the ~o-grading of the zigzag algebra and the associated baric structure on D. Here the appearance of the free group as the fundamental group of the punctured disk becomes important. The main result here is Proposition 6.6, which plays dual ping pong using complexes of projective modules. (Since they are not needed for the proof of Theorem 1.1, a few of the proofs in Section 6 are sketched rather than written out completely.) A corollary of Proposition 6.6 is that we obtain a homological realization of the word-length metric in the simple Bessis generators of Fn ; the precise statement is written in Theorem 7.2. An important part of the setup for dual pingpong is the Hurwitz action of the braid group Bn on reduced reflection expressions for γ = σ1 . . . σn and a parallel action of Bn on spherical collections in D (see Section 6.1). The action of Bn on spherical collections in D is similar to (and motivated by) constructions of Bridgeland in [10]. The final subsection of the paper constructs the exotic metric on Fn , explains the little bit we know about it, and poses the question of describing it combinatorially. 1.2. Acknowledgements. We would like to thank Hoel Queffelec for a number of helpful conversations about this paper and our related ongoing collaboration, and the referee for a number of helpful comments. This paper was written for the proceedings of the conference on Categorification in Algebra, Geometry and Physics, held in Corsica in May, 2015 in honor of the 60th birthday of Christian Blanchet. We thank the organizers of that conference for the opportunity to speak about this work there, and the editors of this conference proceedings for their patience. 4 x4 x3 x0 x2 x1 Figure 1. The standard coordinate system for Fn . 2. The Free group In this section we collect some information about the free group. We recall the definitions of reflections in Fn , the positive monoid Fn+ ⊂ Fn defined by Bessis [4], and the Hurwitz action of the n-strand Artin braid group Bn on reduced reflection expressions for the Coxeter element γ = σ1 . . . σn . 2.1. The positive monoid of Bessis. Our presentation in this section closely follows that of [4], and we refer the reader there for further information regarding the positive monoid and quasi-Garside structure of Fn . We fix n + 1 distinct points x0 , x1 , . . . , xn ∈ C, and set Fn := π1 (C − {x1 , . . . , xn }, x0 ). It is convenient to choose x0 = −1, and xi for i 6= 0 purely imaginary, with −1 < im(x1 ) < · · · < im(xn ) < 1, so that the points {x1 , . . . , xn } lie on a vertical line segment inside the unit disc. The unit circle itself, traversed counterclockwise starting at x0 = −1, defines an element γ ∈ Fn . We refer to γ as a Coxeter element of Fn , since it’s image in the Coxeter group Wn = Fn /hσi2 i is a Coxeter element of Wn . In terms of the standard generators σ1 , . . . , σn , we have γ = σ1 σ2 . . . σn . A connecting path is a continuous map f : [0, 1] → C such that f (0) = x0 , f (1) = xi for some i = 1, . . . , n, and t 6= 1 =⇒ f (t) ∈ / {x1 , . . . , xn }. Given a connecting path f , we may assign an element rf ∈ Fn as follows: begin at f (0) = x0 , travel close to f (1) via the connecting path, make a counterclockwise turn around a small circle centred at f (1), and then return to x0 by traversing f backwards. A γ-reflection of Fn is an element r ∈ Fn such that there is a connecting path f such that r = rf . For example, the standard generators σ1 , . . . , σn of Fn are γ-reflections, and the corresponding connecting paths are drawn in Figure 1. (Note that the inverses σ1−1 , . . . , σn−1 are not γ-reflections.) Another connecting path f given in Figure 2; it corresponds to the γ-reflection g −1 σ2 g, with g = σ3−1 σ4 σ3 σ2 σ1 . We denote by Fn+ the Bessis monoid, which is the submonoid of Fn generated by the γ-reflections. The Bessis monoid Fn+ has a divisibility partial ordering: for f, g ∈ Fn+ , f ≤ g ⇐⇒ ∃g ∈ Fn+ , f h = g. 5 x4 x3 x0 x2 x1 Figure 2. The γ-reflection (σ1−1 σ2−1 σ3−1 σ4−1 σ3 )σ2 (σ3−1 σ4 σ3 σ2 σ1 ) In fact, there exists h ∈ Fn+ with f h = g if and only if there exists h′ ∈ Fn+ with h′ f = g, so the partial order defined above does not depend on the choice of left or right-divisibility. If f ≤ g, we say that f divides g. A slightly larger generating set for Fn+ , which includes the γ-reflections and which plays a prominent role later, is the interval in the Bessis monoid between 1 and the Coxeter element. We denote this set by Be+ : Be+ := {g ∈ Fn+ : 1 ≤ g ≤ γ}. We refer to elements of Be+ as simple Bessis elements of Fn+ . A crucial property of the Bessis monoid Fn+ is that it is a lattice, that is, has greatest common divisors and least common multiples. In particular, for any element g ∈ Fn+ , there exists a unique left factor lf (g) ∈ Be+ such that • the left factor lf (g) divides g, and • for all simple Bessis elements x ∈ Be+ , if x divides g, then x divides lf (g). The corresponding left-greedy normal form of g ∈ Fn+ is defined to be the unique expression for g as a product g = y1 y2 . . . yk + with yi ∈ Be and yi = lf (yi yi+1 . . . yk ) for all i = 1, . . . , k. 2.2. The Hurwitz action of Bn on reduced reflection expressions of γ = σ1 . . . σn . For any (g1 , . . . , gn ) ∈ Fn×n , set τi (g1 , . . . , gn ) = (g1 , . . . , gi−1, gi gi+1 gi−1 , gi , gi+2 , . . . , gn ). This defines the Hurwitz action of the n-strand Artin braid group Bn on Fn×n . We are interested in the Bn action on n-tuples of γ-reflections whose product is the Coxeter element γ. Definition 2. A length k reflection expression for γ is a k-tuple (r1 , . . . , rk ) of γ-reflections whose product r1 . . . rk = γ. Since k = n is the minimal possible length of a reflection expression for γ, we refer to a length n reflection expression for γ as a minimal length reflection expression. We denote by Red(γ) the set of minimal length reflection expressions for γ. The following theorem is then due to Artin [2], and we refer to [4] for a proof. 6 Theorem 2.1. The Hurwitz action of the Artin braid group Bn on Red(γ) is simple and transitive. 3. Ping pong and dual ping pong In this section we recall the version of the ping pong lemma which we will use to prove the faithfulness Theorem 1.1 in Section 5. We also make use of the Bessis monoid Fn+ to formulate a dual ping pong lemma, which we will use later in Section 6. 3.1. Ping pong. The following lemma, versions of which are ubiquitous in combinatorial and geometric group theory, is usually attributed to Klein. Lemma 3.1. Fix n ≥ 2. Let Y be a set, and let g1 , . . . , gn : Y → Y be bijections. Let X1+ , . . . , Xn+ , X1− , . . . Xn− be subsets of Y , and denote by X ⊂ Y their union. Suppose that • the subsets X1+ , . . . , Xn+ , X1− , . . . Xn− are pairwise disjoint; • there exist points y1 , . . . , yn ∈ Y \ X such that for j 6= i, gi±1 (yj ) ∈ Xi± , and • x ∈ X \ Xi∓ − =⇒ gi (x) ∈ Xi± . Then the group homomorphism Fn → {Bijections g : Y → Y }, σi 7→ gi is injective. Proof. Let σ = σiǫkk . . . σiǫ11 be a reduced word in Fn , so that no σi is adjacent to a σi−1 , and let g = giǫkk . . . giǫ11 be the image of σ under the homomorphism σi 7→ gi . We must show that g is not the identity map 1Y . If we can find a point y ∈ Y such that giǫ11 (y) ∈ Xiǫ11 , then it follows from the assumptions of the lemma that g(y) ∈ Xiǫkk . So if we can find a y such that giǫ11 (y) ∈ Xiǫ11 but y ∈ / Xiǫkk , we will have g(y) 6= y. Now the assumption on the points yj ∈ Y \ X guarantees that for j 6= i1 , g(yj ) 6= yj . Thus that g 6= 1.  3.2. Dual Ping pong. The Bessis monoid Fn+ has the pleasant feature that any element β ∈ Fn can be written β = α1−1 α2 , where α1 , α2 ∈ Fn+ are in the positive Bessis monoid. This implies the following. Lemma 3.2. Suppose that ψ : Fn → {Bijections g : Y → Y } is an action of Fn on a set Y which distinguishes elements of the Bessis monoid Fn+ . Then ψ is injective. Proof. Suppose that ψ(β) = 1Y for some β ∈ Fn . Writing β = α1−1 α2 with α1 , α2 ∈ Fn+ , we see that ψ(α2 ) = ψ(α1 ). But by assumption, ψ distinguishes elements of Fn+ , so that α1 = α2 . Thus β = 1.  7 Lemma 3.2 shows that one can reduce the question of whether or not an action of the free group is faithful to a question about whether or not the action distinguishes elements of the Bessis monoid. As a result, a “dual” analogue of the ping pong Lemma 3.1 can be formulated using only the simple Bessis elements Be+ = {w : 1 ≤ w ≤ γ} . More precisely, we have the following, which we refer to as a dual ping pong lemma for the free group. Lemma 3.3. Let Y be a set, and let ψ : Fn −→ {Bijections g : Y → Y } be an action. Denote by ψβ the image of an element β ∈ Fn under this homomorphism. Suppose that there exist non-empty disjoint subsets {Xw }w∈Be+ of Y , such that for all simple Bessis elements u, w ∈ Be+ , ψu (Xw ) ⊂ Xlf (uw) . Then the group homomorphism ψ is injective. Proof. Suppose that β ∈ Fn+ . Let β = u1 . . . uk be the left greedy normal form of β. We will show that the left factor u1 of β is determined by the bijection ψβ . Once we show this, it follows by induction that the entire left greedy normal form of β can be read off from the bijection ψβ ; in particular, ψ will distinguish elements of the Bessis monoid Fn+ , and the statement then follows from Lemma 3.2. To see that u1 is determined by the bijection ψβ , choose x ∈ Xuk , where uk is the rightmost term in the left greedy normal form of β. By the assumptions of the lemma, we have ψβ (x) ∈ Xu1 , so that ψβ determines u1 .  Remark 1. One can also show that in checking the condition ψu (Xw ) ⊂ Xlf (uw) for all simple Bessis elements u, w ∈ Be+ , it suffices to check that ψt (Xw ) ⊂ Xlf (tw) for all w ∈ Be+ and t a γ-reflection. 4. A 2-representation the free group The goal of this section is to define a 2-representation of Fn . The underlying category of the 2-representation will be the homotopy category of projective modules over a finite b The algebra A b is itself a quotient of the the path algebra of a quiver, dimensional algebra A. so we begin by introducing the required quiver notation. 4.1. Quivers associated to the doubled complete graph. Let Q denote the doubled complete graph on n vertices. We number the vertices of Q by the integers 1, 2, . . . , n. In the doubled complete graph, for any pair of distinct vertices i, j there are two (unoriented) edges between i and j. To distinguish these two edges from each other, we will name one of them the x-edge from i to j and the other the y edge from i to j. The graph Q for n = 4 is depicted below. 8 4 1 3 2 b We now fix a field k of characteristic 0. For a quiver X, we 4.2. The zigzag algebra A. denote by Path(X) the path algebra over k. b be the Ginzburg double of Q: in the quiver Q, b each unoriented edge of Q has been Let Q replaced by two oriented edges, one in each direction; thus, for each i 6= j there are now four oriented edges between i and j, two of them pointing i → j and two pointing j → i. In addition, we put a loop, labeled z, at each vertex. For each pair of vertices i, j with i < j, we label the edges from i → j by x and y, and the edges pointed j → i by x∗ and y ∗ . The b for n = 3, with its edge labels, is drawn below. quiver Q 9 y z x 1 3 x* z y* y y x x x* y* x* y* 2 z The main algebra of interest here is a finite-dimensional quotient of the path algebra b of the Ginzburg quiver Q. b The length 0 path at vertex i in Pathk (Q) b is denoted Pathk(Q) b When regarded as elements of the path by ei , and this path is an idempotent in Pathk (Q). b by their labels. So, for example, the algebra, we somewhat abusively refer to edges of Q four edges connecting vertices 1 and 2 will be referred to as x, x∗ , y and y ∗, as will the four edges connecting vertices 2 and 3, while each of the loops will be denoted by z. As a result, in order for a string of letters in the alphabet {x, y, x∗ , y ∗, z} to give a well-defined path, we should specify the starting and ending vertices of the path. We define b = Pathk (Q)/I, b A b generated by where I is the two-sided ideal in Pathk(Q) • all length two paths which start and end at distinct vertices; • the following linear combinations of length two paths which start and end at the same vertex: ei a∗ bei − δa,b ei zei , a, b ∈ {x, y, x∗ , y ∗}. In the last relation it is understood that x∗ ∗ = x and y ∗∗ = y. A few words about these relations: first, note that as a consequence of the second relation b as a quotient of the path algebra of the quiver without we could have presented the algebra A using the loops z at all: for example, the loop e1 ze1 at vertex 1 is equal to the length 2 path e1 xx∗ e1 starting and ending at vertex 1 and passing through vertex 3; second, since all of 10 the length two relations involving a path i → j → k do not depend on the middle vertex j, we have also omitted notation for this middle vertex in the relations above. Finally, a special case of the last relation says that a length two path of the form ei x∗ yei starting and ending at vertex i – regardless of which other vertex it travels through – is zero. (Similarly, the length two paths ei xy ∗ ei , ei yx∗ ei and ei y ∗ xei are zero.) The loop ei zei at vertex i is non-zero, but it follows from relations that any path through i which involves both z and b another edge in the quiver must be equal to zero in A. The case n = 1 is slightly degenerate, since when n = 1 there are no edges in Q; our b∼ convention when n = 1 is to set A = k[z]/z 2 . By analogy with the case of simply-laced b the zigzag algebra of Q. quivers considered in [14], we call the algebra A b (Essentially, the The following lemma is immediate from the definition of the algebra A. b were chosen so that the lemma below would hold.) relations in A Lemma 4.1. For i < j: and b j = spank{x, y} ∼ ei Ae = k2 , b i = spank {x∗ , y ∗} ∼ ej Ae = k2 , b i = spank {ei , z} ∼ ei Ae = k2 . b is a finite-dimensional k-algebra of dimension 2n2 . In particular, A b module Pi = Ae b i is indecomposable and projective, and the n modules {Pi }n The left A i=1 form a complete collection of pairwise distinct isomorphism classes of indecomposable prob modules. From Lemma 4.1, we see that the endomorphism algebra of Pi is jective left A given by bi∼ EndAb(Pi , Pi ) ∼ = k[z]/z 2 , = ei Ae b j are also two-dimensional vector spaces While all the other hom spaces HomAb(Pi , Pj ) ∼ = ei Ae with a distinguished basis. b In the sections to come we will consider several different non-negative 4.3. Gradings on A. b Of primary importance are gradings on A. • the path length grading, given by setting degpath (ei ) = 0, degpath (z) = 2, degpath (x) = degpath (x∗ ) = degpath (y) = degpath (y ∗) = 1; • the orientation grading dego corresponding to an orientation o of the graph Q. A choice of orientation o of Q is a choice of head and tail for each edge of Q, and choosing such an orientation gives us a quiver Qo . The quiver Qo gives rise to a b by setting, for i < j, grading on A ( 1, if the x edge of Q between i and j goes from i → j in Qo ; dego (x) = 0, otherwise. ( 1, if the y edge of Q between i and j goes from i → j in Qo ; dego (y) = 0, otherwise. dego (x∗ ) = 1 − dego (x); 11 dego (y ∗) = 1 − dego (y). dego (z) = 1. b For an orientation o of Q, let These all non-negative integral gradings on the algebra A. ∨ b for various gradings can be o be the opposite orientation. The degree 0 subalgebras of A described as follows. b is semi• When endowed with the path-length grading, the degree 0 subalgebra of A n simple and isomorphic to k = spank {e1 , . . . , en }. b is isomor• When endowed with the o-orientation grading, the degree 0 subalgebra of A phic to the quotient of the path algebra Pathk(Qo∨ ) by the two-sided ideal generated by all length two paths in Qo∨ . We introduce special notation for the two specific orientations that will play an important role later: • Let oe denote the orientation of Q obtained by orienting one edge (the x edge) between i and j as an arrow i → j and orienting the other edge (the y edge) of Q as an arrow e = Qoe the associated quiver, given by endowing Q with the j → i. We denote by Q e for n = 4 is drawn below. orientation oe. The quiver Q 4 x y* x y* x 1 x 3 y* y* x x y* y* 2 e as a sub The edge labels on the above quiver specify the natural embedding of Q b In the zigzag algebra A, b the edges of the Ginzburg quiver of the Ginzburg double Q. 12 b which are in the image of this embedding (the x and y ∗ edges) will have oedouble Q b whereas the dual edges (x∗ and y) will have oe-degree degree 1 in the zigzag algebra A, 0. • Let ~o denote the orientation of Q such that, for i < j, both edges between i and j ~ = Q~o has no oriented cycles). The are oriented to point i → j (thus the quiver Q ~ for n = 4 is drawn below. quiver Q 4 y x y x x 1 y x 3 y x x y y 2 ~ as a sub quiver of The edge labels on the above quiver specify the embedding of Q b In the zigzag algebra A, b the edges of the Ginzburg double the Ginzburg double Q. b which are in the image of this embedding (the x and y edges) will have ~o-degree Q 1, whereas the dual edges (x∗ and y ∗ ) will have ~o-degree 0. 4.4. Categories of complexes. We denote by D the homotopy category of bounded comb plexes of finitely-generated projective A-modules. An object of D is a bounded complex of finitely generated projective modules Y = (Y m , ∂ m ), ∂ m : Y m → Y m+1 , ∂ m+1 ◦ ∂ m = 0. b module maps f i : X i → Y i intertwining the A morphism f from X to Y is a collection of A differentials. Two maps f, g : X → Y are equal in D if they are homotopic when regarded as maps of chain complexes. We let [k] denote the auto-equivalence of D which shifts a complex k degrees to the left: Y [k]m = Y k+m , ∂Y [k] = (−1)k ∂Y . The pair (D, [1]) is a finitely-generated, k-linear triangulated category. 13 Given a map of complexes f : X → Y , the cone of f is the complex X[1] ⊕ Y with the differential ∂(x, y) = (−∂X (x), f (x) + ∂Y (y)). b with one of the non-negative gradings defined earlier, in In the sequel we will often endow A which case we will be interested in the homotopy category of bounded complexes of finitelyb generated projective graded A-modules. Since different gradings will be used in different sections, we will state explicitly at the beginning of each section which grading we are considering. Abusing notation slightly, we will still use D to denote the homotopy category of bounded complexes of finitely-generated graded modules in each of these sections; [k] always denotes a shift in homological degree; we will always denote by hki the shift in the relevant internal grading. 4.5. Minimal complexes. Let Y ∈ D be an indecomposable complex, so that Y ∼ = Y1 ⊕ Y2 ∈ D =⇒ Y1 ∼ = 0 or Y2 ∼ = 0. Let Ỹ be a representative of Y in the k-linear category of bounded complexes of projective b modules. In other words, Ỹ is a bounded complex of A b modules which is homotopy equivA alent to Y , but not necessarily isomorphic to Y as a chain complex. We say that Ỹ is a minimal complex for Y if Ỹ is indecomposable in the additive category of bounded complexes b modules. In particular, if Ỹ is a minimal complex for Y , then when regarded of projective A b modules, Ỹ has no contractible summands. Moreover, the chain as a complex of projective A b groups of a minimal complex are themselves determined up to isomorphism as projective A modules. We thus refer to Ỹ as the minimal complex of Y , with the understanding that the chain groups of Ỹ are only determined up to isomorphism. When Y is not necessarily indecomposable, the minimal complex of Y is defined to be the direct sum of the minimal complexes of the indecomposable summands of Y . As every complex Y is homotopy equivalent to a minimal complex, in some arguments it will be convenient to study Y by assuming it is already minimal. 4.6. Slicing complexes. The goal of this section is to briefly describe two ways to use a b to “slice” objects of D into homogeneous pieces. The first way, which is very grading on A well known, is via a bounded t-structure. We assume some familiarity with the notion of a t-structure here, and refer the reader to [13] for further information. For now, it suffices to note that a bounded t-structure on D defines a collection of abelian subcategories {D k }k∈Z . The subcategory D 0 is called the heart of the t-structure, and a bounded t-structure on D is determined by its heart. Moreover, a collection of full k-linear subcategories {D k }k∈Z determines a t-structure provided the following conditions hold: (a) for all k ∈ Z, D k [1] = D k+1, (b) if X ∈ D k and Y ∈ D l with k > l, then HomD (X, Y ) = 0, and (c) for every nonzero object E ∈ D there are integers m < n and a collection of triangles 0 E(m) cc● // ● ● ● ● E(m + 1) ss ss s ss yy s s Y (m + 1) ee❑ ❑ // ❑ ❑ E(m + 2) ss ss s ss yy s s ❑ Y (m + 2) 14 // ... // E(n − 1) bb❋ // ❋ ❋ ❋ E(n) E ⑦⑦ ⑦⑦ ⑦  ⑦ ⑦ Y (n) with Y (k) ∈ D k for all k. We will refer to the terms Y (k) appearing above as the t-slices of the object E. b gives rise to a bounded t-structure on the hoA non-negative grading on the algebra A b modules D whose heart is the category of linear complexes of motopy category of graded A projectives. By definition, a linear complexes of projective modules is a complex Y ∈ D such that the term Y k in homological degree k is a direct sum of projective modules ⊕Pj hki, so that the homological degree matches the internal grading shift on the nose. Thus gradings b give rise to t-structures, and hence to “slicings” of complexes of graded projective A b on A modules. We refer the reader to [24] for a detailed discussion of linear complexes of projective modules over finite dimensional non-negatively-graded algebras. Besides using t-structures, there is another somewhat simpler way to slice an object of D into homogeneous pieces, which is to ignore the homological degree completely and slice b the minimal complex of E using only an internal grading on A-modules. The resulting decomposition of can be formalised in the language of baric structures, introduced by Achar and Treumann in [1]. In more detail, fix an orientation o of Q and let D denote the homotopy category of b b is endowed with the o-grading defined in Section complexes of o-graded A-modules, where A 4.3. For k ∈ Z, let Dk denote the full subcategory of D consisting of complexes Y = (Y m , ∂ m ) such that, in the minimal complex of Y , the chain groups are direct sums of projective modules whose internal grading shift is exactly k in every homological degree: Ym ∼ = ⊕i P ⊕ni hki for all m ∈ Z. i The subcategories {Dk } define a baric structure in the sense of [1]. Since the baric structures b we consider are essentially just gradings on projective A-modules, rather than give the full abstract definition of a baric structure on a triangulated category here, we prefer to simply note that the subcategories {Dk } defined above satisfy the following properties (all of which b follow directly from properties of the non-negative grading on A): (a) for all k ∈ Z, Dk [1] = Dk , (b) if X ∈ Dk and Y ∈ Dl with k > l, then HomD (X, Y ) = 0, and (c) for every non-zero object E ∈ D there are integers m < n and a collection of triangles 0 E(m) cc● // ● ● ● ● E(m + 1) s ss ss s s yy s s Y (m + 1) ee❑ ❑ // ❑ ❑ E(m + 2) s ss ss s s yy s s ❑ Y (m + 2) // ... // E(n − 1) bb❋ // ❋ ❋ ❋ Y (n) with Y (k) ∈ Dk for all k. b as the o-baric structure We refer to the subcategories {Dk } induced from the o-grading on A on D, and to the objects Y (k) ∈ Dk appearing above as the o-baric slices of the object E. Given an interval [k, l] ⊂ Z, we set D[k,l] to be the full subcategory of D consisting of those complexes Y whose non-zero baric slices live in Dm for k ≤ m ≤ l. Similarly, D [k,l] is the full subcategory of D whose non-zero t-slices live in D m for k ≤ m ≤ l. The subcategories D≤k , D≥k , D ≤k , D ≥k are defined similarly. We have chosen to use the same notation Y (k) for both baric slices and for t-slices; with the exception of a brief point in the last section of paper we will on make use of baric slices, 15 E(n) E ⑦⑦ ⑦⑦ ⑦  ⑦ ⑦ and in any case it will always be made clear in each section which structures – baric or t – we are considering. Despite some similarity in the properties shared by baric and t-structures, there are important differences between the two notions. For instance, in a t-structure, the heart D 0 is an abelian subcategory of the triangulated category D, and this subcategory is not preserved by the homological shift [1]; by contrast, the baric heart D0 will not in general be an abelian subcategory of D, though in the cases we consider it will be closed under homological shifts. 4.7. Top and bottom slices. Fix an orientation o of D, and let Y ∈ D. Using the o-baric slices {Y (k)}k∈Z , we may define integers φ+ (Y ) by φ+ (Y ) = sup{k ∈ Z : Y (k) 6= 0} and φ− (Y ) by φ− (Y ) = inf {k ∈ Z : Y (k) 6= 0}. b As the minimal complex of Y is a bounded complex of finitely-generated graded A-modules, the chain groups of the minimal complex are all supported in finitely many o-degrees, so that slices Y (k) will be non-zero for only finitely many k. We may also define complexes Y (φ+ ) and Y (φ− ) – the top and bottom slices of Y – by Y (φ+ ) := Y (φ+ (Y )), Y (φ− ) := Y (φ− (Y )). These top and bottom slices will play an essential role in the ping pong and dual ping pong constructions in latter sections. 4.8. The functors Σi . In this section we define our main object of interest, the 2-representation Ψ : Fn −→ Aut(D). b A) b bimodules Define homomorphisms fi , gi , 1 ≤ i ≤ n of (A, b i ⊗k ei A b −→ A, b fi : Ae by b −→ Ae b i ⊗k ei A b gi : A fi : ei ⊗ ei 7→ ei , X gi : 1 7→ z ⊗ ei + ei ⊗ z + x ⊗ x∗ + x∗ ⊗ x + y ⊗ y ∗ + y ∗ ⊗ y, where z denotes the loop at i and the sum is over all x, x∗ , y, y ∗ edges out of vertex i. b A) b bimodules Let Σi denote the two-term complex of (A, gi b− b i ⊗k ei A, b Σi := A → Ae b sitting in homological degree 0. Let Σ−1 denote the two-term complex of with the term A i b A) bimodules (A, fi b i ⊗k ei A b− b → A, Σ−1 := Ae i b sitting in homological degree 0. The functors with the term A Y 7→ Σi ⊗Ab Y, Y 7→ Σ−1 b Y, i ⊗A are endofunctors of D; we somewhat abusively denote these endofunctors by Σi , Σ−1 i , too. The proof of the following proposition follows exactly as in Proposition 2.4 of [18] (see also [14]). 16 Proposition 4.2. For each i = 1, . . . , n, the functors Σi and Σ−1 are mutually inverse i equivalences of D, i.e., there are functor isomorphisms ∼ −1 ∼ Σi Σ−1 i = 1D = Σi Σi . Thus the assignment Ψ : Fn −→ Aut(D), σi 7→ Σi , σi−1 7→ Σ−1 i , is a (weak) 2-representation of the free group Fn . An important point which emerges in the proof of the above proposition is that the functor isomorphisms ∼ −1 ∼ Σi Σ−1 i = 1D = Σi Σi will not hold if D is replaced by the additive category of complexes of finitely-generated b projective A-modules; these isomorphisms only hold after passing to the homotopy category. b When we regard A as a graded algebra, the bimodule map gi used in the definition of the auto-equivalence Σi is not a map of degree 0, but rather a map of degree 1 for the o-grading for an orientation o and a map of degree 2 for the path-length grading. Thus, in order to define auto-equivalences of the homotopy category of graded modules, we need to add a b as a grading shift to one of the bimodules used in the definition of Σi . When we consider A graded algebra with the o-grading coming from an orientation, the auto-equivalence Σi will be defined as tensoring with the complex gi b i ⊗k ei A)h1i, b b− → (Ae A b as a graded algebra with the path-length grading, Σi will be given while when we consider A by tensoring with gi b i ⊗k ei A)h2i. b b− → (Ae A With these additional grading shifts, the statement of Proposition 4.2 also holds when Σi and b Σ−1 i are regarded as endofunctors of the homotopy category of graded projective A modules. We record here basic example calculations of the complexes Σi (Pj ), taking into account the different possible gradings. b with the symmetric oe grading and let Pi denote the oe-graded projective • If we endow A b module with ei sitting in oe-degree 0, then for i 6= j, A  Σi (Pj ) ∼ = Pj → Pi h1i ⊕ Pi and Σi (Pi ) ∼ = Pi h1i[−1]. b with the ordered ~o-grading and now let Pi denote the ~o-graded pro• If we endow A b module with ei sitting in degree 0, then jective A Σi (Pi ) ∼ = Pi h1i[−1]; for i > j, for i < j,  Σi (Pj ) ∼ = Pj → Pi h1i ⊕ Pi h1i ;  Σi (Pj ) ∼ = Pj → Pi ⊕ Pi . 17 b with the path-length grading and let Pi denote the path-graded pro• If we endow A b jective A module with ei sitting in degree 0, then we have  Σi (Pj ) ∼ = Pi h2i[−1] = Pj → Pi h1i ⊕ Pi h1i and Σi (Pi ) ∼ for all i 6= j. b 5. 2-linearity via ping pong and the oe-grading on A In this section, we prove Theorem 1.1, which says that the group homomorphism ψ : Fn −→ [Aut(D)] is injective. In the entirety of this section, we endow all algebras, modules, and complexes with the oe-grading determined by the symmetric orientation oe on the doubled complete graph Q. In particular, in this section D will denote the homotopy category of bounded complexes b modules. The main ingredients in the proof of Theorem 1.1 are the of projective oe-graded A symmetric orientation oe, the top and bottom oe-baric slices Y (φ+ ), Y (φ− ) of Y ∈ D defined in Section 4.6, and the ping pong Lemma 3.1. 5.1. The sets Xi± . For i ∈ I, we set Pi = M Pi [k]. k∈Z Thus, for m ∈ Z, the projective module Pi hmi is the direct sum of all possible shifts of Pi which lie in the subcategory Dm for the oe baric structure on D. Technically, the module Pi is not an object of D, as it is not homotopy equivalent to a bounded complex of finitelygenerated modules. Nevertheless, the summands of Pi are all objects of D, and for Y ∈ D, the hom space M Hom(Y, Pi [k]) Hom(Y, Pi ) = k∈Z is a well-defined finite-dimensional vector space. The following is the key definition in the proof of Theorem 1.1. For i = 1, . . . , n, we define subsets Xi+ and Xi− of objects of D by declaring that (1) Xi+ consists of those indecomposable complexes Y such that • the top slice Y (φ+ ) is isomorphic to a direct sum of shifts of Pi ; • Hom(Y, Pj hφ− (Y )i) = 0 ⇐⇒ j = i; − (2) Xi consists of those indecomposable complexes Y such that • The bottom slice Y (φ− ) is isomorphic to a direct sum of shifts of Pi ; • Hom(Pj hφ+ (Y )i, Y ) = 0 ⇐⇒ j = i. We now check that the sets Xi± and the points zi = Pi satisfy the assumptions of the ping pong Lemma 3.1. Proposition 5.1. We have the following: ± (1) for all j 6= i, Σ±1 i (Pj ) ∈ Xi ; (2) the sets X1− , . . . , Xn− , X1+ , . . . , Xn+ are pairwise disjoint; (3) for all i 6= j, Y ∈ Xj− =⇒ Σi (Y ) ∈ Xi+ ; − (4) for all i 6= j, Y ∈ Xj+ =⇒ Σ−1 i (Y ) ∈ Xi ; (5) for all i, j, Y ∈ Xj+ =⇒ Σi (Y ) ∈ Xi+ ; 18 − (6) for all i, j, Y ∈ Xj− =⇒ Σ−1 i (Y ) ∈ Xi Proof. The fact that Σi (Pj ) ∈ Xi+ when j 6= i follows by direct computation, as  Σi (Pj ) ∼ = Pj → Pi h1i ⊕ Pi , and the properties required for membership in Xi+ are easily checked for this complex. − Similarly, when j 6= i, it is straightforward to see that Σ−1 i (Pj ) ∈ Xi . It is also clear from the definition of the sets Xi+ that Xi+ ∩ Xj+ = ∅ when i 6= j, since the top slice of a complex in Xi+ is a sum of shifts of Pi and the top slice of a complex in Xj+ is a sum of shifts of Pj . Similarly, Xi− ∩ Xj− = ∅ when i 6= j. We now show that Xi+ ∩ Xj− = ∅. To see this, note that by definition complexes in Xk− have a shift of Pk as a direct summand in the bottom oe-baric slice. Thus it suffices to note that if Y ∈ Xi+ , then the bottom slice Y (φ− ) does not have any direct summands isomorphic to a shift of Pk for any k = 1, . . . , n. For suppose that Y (φ− ) has a direct summand N ∼ = Pk hφ− (Y )i, which for simplicity we assume is in homological degree 0. Since Hom(Pk hφ− (Y )i, Pi hφ− (Y )i) ∼ = Hom(Pk , Pi ) 6= 0, it follows that Hom(Y, Pi hφ− (Y )i) 6= 0, too. To see this, let 0 6= f ∈ Hom(Y, Pi hφ− (Y )i) be the map on N is given by a oe-degree 0 edge of the quiver, extended by 0 to all of Y . (The restriction of f to N is a scalar multiple of either an x∗ , a y, or an ei , depending on whether i < k, i > k, or i = k.) Let f ∗ ∈ Hom(Pi hφ− (Y ) − 1i, Y ) denote the dual morphism (either an x, a y ∗, or a z) from Pi hφ− (Y )i into the summand N. Since f ◦ f ∗ = z ∈ Hom(Pi hφ− (Y ) − 1i, Pi hφ− (Y )i) is nonzero, it follows that f 6= 0. But this implies that Y ∈ / Xi+ . Thus we have shown that the sets X1− , . . . , Xn− , X1+ , . . . , Xn+ are pairwise disjoint. This completes the proof of (1) and (2). We now show statement (5): Y ∈ Xj+ =⇒ Σi (Y ) ∈ Xi+ . To see that Σi (Y )(φ+ ) is isomorphic to a sum of shifts of Pi , it suffices to note that φ+ (Σi (Y )) > φ+ (Y ), as the only complex that can appear as an oe-baric slice of Σi (Y ) in a level greater than φ+ (Y ) is a direct sum of shifts of Pi . To show φ+ (Σi (Y )) > φ+ (Y ), note that by assumption Y (φ+ ) is isomorphic to a direct sum of shifts of Pj . Let Mj be such a summand, which for simplicity we assume lives in homological degree 0. Now Hom(Pi hφ+ (Y )i, Pj hφ+ (Y )i) ∼ = Hom(Pi , Pj ) is clearly non-zero, and if 0 6= f ∈ Hom(Pi hφ+ (Y )i, Pj hφ+ (Y )i), the map f ′ : Pi hφ+ (Y )i → Y which maps into Mj via f cannot be homotopic to 0. It follows that Hom(Pi hφ+ (Y )i, Y ) 6= 0, and by adjunction Hom(Pi hφ+ (Y ) + 1i[−1], Σi (Y )) ∼ = Hom(Pi hφ+ (Y )i, Y ) 6= 0, 19 too. This shows that φ+ (Σi (Y )) > φ+ (Y ), so that the top level of Σi (Y ) is isomorphic to a direct sum of shifts of Pi . We must now show that Σi (Y ) satisfies the second requirement for membership in Xi+ , namely, that Hom(Σi (Y ), Pk hφ− (Σi (Y ))i = 0 ⇐⇒ k = i. To this end, note that Hom(Y, Pj hφ− (Y )i) = 0 by assumption. Thus the bottom slice Y (φ− ) does not have a summand of the form Pk hφ− (Y )i for any k. In particular, we have φ− (Σi (Y )) = φ− (Y ), since these two numbers would be different precisely when the bottom slice of Y is a direct sum of shifts of Pi . Since φ− (Σi (Y )) = φ− (Y ), we must show that Hom(Σi (Y ), Pk hφ− (Y )i = 0 ⇐⇒ k = i. For this we check the cases k = i and k 6= i separately. • For k = i, we have Hom(Σi (Y ), Pi hφ− (Y )i = Hom(Y, Σ−1 i Pi hφ− (Y )i) = Hom(Y, Pi hφ− (Y ) − 1i) = 0, since there are no nonzero maps from Y to any complex in D<φ− (Y ) . • Now suppose k 6= i. We need to show that Hom(Σi (Y ), Pk hφ− (Y )i) 6= 0. We have Hom(Σi (Y ), Pk hφ− (Y )i ∼ = Hom(Y, Σ−1 (Pk )hφ− (Y )i) ∼ = Hom(Y, (Pi h−1i⊕Pi → Pk )hφ− (Y )i). i b There are no non-zero A-module maps – much less chain maps – from the minimal complex of Y to the lowest term Pi h−1 + φ− (Y )i above; from this we see that Hom(Σi (Y ), Pk hφ− (Y )i ∼ = Hom(Y, (Pi → Pk )hφ− (Y )i), so we must show that the right hand side is non-zero. We do this by finding an explicit non-zero element in this hom space. We consider the the minimal complex of the bottom slice Y (φ− ) of Y:  Y (φ− ) = . . . Ys−1 → Ys → 0 → . . . , so that Ys is the rightmost non-zero term in the minimal complex of the bottom slice. Suppose first that the chain group Ys has a summand Ml ∼ = Pl hφ− (Y )i with l 6= i, ′ ∼ and write Ys = Ml ⊕ Ys . Let f be a degree 0 morphism (either an x∗ or y) from Ml to Pi hφ− (Y )i. We extend f by 0 to a map on chain groups: Ys−2 Ys−1 ∂s−1 0 0 0 h1 0 ∂s Ml ⊕ Ys′ h2 f ⊕0 Pi hφ− (Y )i d 0 0 0 Pk hφ− (Y )i 0 Since the differential d above is of oe-baric degree 0 and is an x∗ or a y, the relations in b imply that the composition of d ◦ f is zero; by the same reasoning, the the algebra A composition f ◦ ∂s−1 = 0. Thus the map f may be regarded a well-defined element of Hom(Y, (Pi → Pk )hφ− (Y )i). But, as Ys is the rightmost term in the bottom slice of the minimal complex, there is no possible homotopy h = (h1 , h2 ) between f and the 0 map. Thus in this case Hom(Y, (Pi → Pk )hφ− (Y )i) 6= 0. 20 On the other hand, suppose that Ys ∼ = Pi⊕m hφ− (Y )i. We choose a single summand from Ys and denote it by Ni , so that Ys ∼ = Ni ⊕ Ys′ . Let g be the degree 0 map from Ni to Pk hφ− (Y )i (so g is either an x∗ or a y). This g extends to a chain map from Y to (Pi → Pk )hφ− (Y )i, which we claim cannot be homotopic to 0. Ys−2 Ys−1 ∂s−1 h=h′ ⊕h′′ 0 0 Pi hφ− (Y )i Ni ⊕ Ys′ d ∂s 0 0 g⊕0 Pk hφ− (Y )i 0 0 0 0 To see this, note first that the only possible components to use for a homotopy h = (h′ , h′′ ) must be scalar multiples of the oe-degree 0 idempotent ei . Now, Ys′ is b modules whose matrix isomorphic to a direct sum of Pi hφ− (Y )i’s, h′′ is a map of A entries are scalar multiples of the idempotent ei , and the differential d satisfies d ◦ ei = d 6= 0. From this we see that d ◦ h′′ = 0 =⇒ h′′ = 0. But once h′′ = 0, the homotopy relations imply that we must have h′ ◦ ∂s−1 = 0, too. Thus the composition of ∂s−1 with the projection Ys → Ni must be 0, and Ni is a direct summand of the bottom slice Y (φ(−)) of Y in the homotopy category. But, as we have observed earlier, if Y ∈ Xj+ , then the bottom slice of Y cannot have any summands isomorphic to Pk hφ− (Y )i for any k. Thus we conclude that the homotopy h cannot exist, and therefore that Hom(Y, (Pi → Pk )hφ− (Y )i) 6= 0. This concludes the check of (5). We now show (3), namely, that Y ∈ Xj− and j 6= i implies Σi (Y ) ∈ Xi+ . As before, in order to show that the top slice of Σi (Y ) is a direct sum of shifts of Pi , it suffices to note that φ+ (Σi (Y )) > φ+ (Y ). Since Hom(Pi hφ+ (Y ) + 1i, Σi (Y )) ∼ = Hom(Pi hφ+ (Y )i, Y ) 6= 0 by assumption, we must have φ+ (Σi (Y )) > φ+ (Y ). What remains is to show that Hom(Σi (Y ), Pk hφ− (Σi (Y )i) = 0 ⇐⇒ k = i. But this is clear: by assumption Y (φ− ) is isomorphic to a direct sum of shifts of Pj , and it follows immediately (e.g. from the example computations in Section 4.8) that Σi (Y )(φ− ) is isomorphic to a direct sum of shifts of the complex (Pj → Pi ). Since maps from Σi (Y ) to objects of D≤φ− (Σi (Y )) are determined completely by maps out of the bottom slice Σi (Y )(φ− ), it follows that Hom(Σi (Y ), Pk hφ− (Σi (Y )i) is isomorphic to a direct sum of hom spaces of the form Hom((Pj → Pi )hφ− (Σi (Y )i, Pk hφ− (Σi (Y )i) ∼ = Hom((Pj → Pi ), Pk ) b that the hom space on the But now one can see directly using the relations in the algebra A right is zero if and only if k = i. The remaining claims (4) and (6) in the proposition now follow by symmetric arguments.  As a corollary, we obtain Theorem 1.1 from the introduction. 21 Corollary 5.2. The group homomorphism ψ : Fn −→ [Aut(D)] from the free group to the isomorphism classes of auto-equivalences of D, is injective. b We have proven that Fn acts faithfully on the homotopy category of graded projective A modules, where the grading is the one induced by the oe orientation of Q. Of course, one may ask about the faithfulness of the Fn action on the homotopy category of graded modules for one of our other gradings, or about the faithfulness of the action on the homotopy category of ungraded projective modules. In fact Corollary 5.2 implies that Fn acts faithfully on all of these different triangulated categories. The main point is that while not all complexes b A) b bimodules have graded lifts, the minimal complexes of ungraded (A, b A) b of ungraded (A, bimodules of the form Ψg do all have canonical graded lifts, at least for the gradings we are b as a complex considering. From this, one can show directly that if Ψg is homotopic to A of ungraded bimodules, then there must actually exist an graded homotopy between Ψg b Thus faithfulness on the homotopy category of oe-graded projective modules implies and A. faithfulness on the homotopy category of ungraded projective modules (and therefore on the homotopy category of graded projective modules for any of our other gradings.) b and dual ping pong 6. The Bessis monoid, the ~o-grading on A, In this section we describe the relationship between the Bessis monoid Fn+ of Fn and the triangulated category D. The basic ingredients are the 2-representation Ψ and the ~o-grading b on the zigzag algebra A. To begin, we explain how the Hurwitz action of the Artin braid group Bn appears naturally from the point of view of the 2-representation Ψ. Our description is very similar to the well-known appearance of Bn in the theory of exceptional sequences of representations of quivers [11]. Actions of Bn on spherical collections in triangulated categories have also been considered before, see for example [10] and references therein. Our main goal here is to directly relate these kinds of actions to the Hurwitz action of Bn on reduced reflection expressions of γ = σ1 . . . σn . In this section the grading shift h•i will denote a shift in the ~o-grading coming from the orientation ~o of Q, and D will denote the homotopy category of bounded complexes of finitely-generated ~o-graded projective modules. Given Y ∈ D, Y (k) will denote the ~o-baric slice of Y . 6.1. The Hurwitz action of the braid group on spherical collections. One special feature of complexes in D of the form Ψg (Pi ) is that their endomorphism algebras are isomorphic to k[z]/z 2 , the homology ring of the sphere. For this reason, we refer to these objects as spherical. 2If E ∼ = Ψg Σk Ψ−1 = Ψg (Pk ) is spherical, we denote by ΦE ∼ g the associated spherical twist, which is an auto-equivalence of D. 2The terms spherical object and spherical twist are due to Seidel-Thomas [27], who define a spherical object to be an object E such that ⊕k Hom(E, E[k]) is isomorphic to the homology ring of a sphere. The notion of spherical object we use here is quadratic dual to theirs. In particular, if we choose to work instead b these simple modules will be spherical with the corresponding simple modules over the quadratic dual of A, in the original sense of Seidel-Thomas. 22 A spherical collection in D is a collection {E1 , E2 , . . . , En } of finitely-many spherical objects Ei . The auto-equivalence group of D acts on the set of spherical collections, with an auto-equivalence Φ acting by Φ · {E1 , . . . , En } = {Φ(E1 ), . . . , Φ(En )}. It is sometimes convenient to fix an order (E1 , E2 , . . . , En ) on the objects in a spherical collection; after doing so the Artin braid group Bn then acts on the set of spherical collections, where the action of the generator τi ∈ Bn is defined by τi (E1 , . . . , Ei , Ei+1 , . . . , En ) = (E1 , . . . , ΦEi (Ei+1 ), Ei . . . , En ). (See, for example, [10]). We denote the set of ordered spherical collections in D by OD , and, in anticipation of Lemma 6.2, we refer to this Bn action as the Hurwitz action of the braid group on OD . An interesting question is to describe the orbits of Bn on ordered spherical collections in D; in particular, it is desirable to find orbits where the Bn action is free. It is also desirable to find conditions on the morphism spaces between objects in a collection which are preserved by the Hurwitz action. This motivates the following definition. Definition 3. An ~o-spherical collection in D is an n-tuple (E1 , E2 , . . . , En ) such that • each Ei is spherical; • each Ei ∈ D0 , where D0 denotes the heart of the ~o-baric structure on D (see Section 4.6); • for i < j and l ∈ Z, Hom(Ei , Ej hki[l]) 6= 0 =⇒ k = 1; • for i > j and l ∈ Z, Hom(Ei , Ej hki[l]) 6= 0 =⇒ k = 0; The basic example of an ~o-spherical collection is (P1 , P2 , . . . , Pn ). The proof of the following lemma is almost immediate from the definitions. Lemma 6.1. The Hurwitz action of Bn preserves the set of ~o-spherical collections. ~ o Let OD (Ψγ ) denote the set of ~o-spherical collections (E1 , . . . , En ) such that the composition of their spherical twists is given by the action of the Coxeter element ΦE1 . . . ΦEn ∼ = Ψγ ∈ Aut(D). Recall that Red(γ) denotes the set of reduced γ-reflection expressions for γ ∈ Fn . A comparison of the definition of the Hurwitz action on ~o-spherical collections to that of the Hurwitz action on reduced γ-reflection expressions for γ yields the following. 23 Lemma 6.2. The assignment (σ1 , . . . , σn ) 7→ (P1 , . . . , Pn ) extends uniquely to a map ~ o f : Red(γ) −→ OD (Ψγ ) which intertwines the Bn actions. If f : (t1 , . . . , tn ) 7→ (E1 , . . . , En ), then for all k = 1, . . . , n the auto-equivalence Ψtk is isomorphic to the spherical twist ΦEk . Proposition 6.3. The Hurwitz action of the braid group Bn on the orbit of the spherical collection (P1 , . . . , Pn ) is free. Thus the assignment (σ1 , . . . , σn ) 7→ (P1 , . . . , Pn ) extends uniquely to an isomorphism of sets with a Bn action. Proof. Let 1 6= β ∈ Bn , and suppose that β(P1 , . . . , Pn ) = (E1 , . . . , En ). We must show that for some i, Ei is not isomorphic to Pi . To see this, consider the Hurwitz action of Bn on the reduced γ-reflection expressions for γ, and let β(σ1 , . . . , σn ) = (t1 , . . . , tn ). In particular, in the 2-representation Ψ, the reflection ti acts by the spherical twist ΦEi . By Artin’s Theorem 2.1 (t1 , . . . , tn ) = (σ1 , . . . , σn ) ⇐⇒ β = 1. Thus, if β 6= 1, at least one of the reflections ti is not equal to σi . Now, by Theorem 1.1, it follows that the spherical twists ΦEi and ΦPi = Σi are not isomorphic, and thus Ei is not isomorphic to Pi .  6.2. Reflection complexes. Let t ∈ Fn+ be a γ-reflection. To t we may associate a complex Ct whose associated twist is t. We call Ct the reflection complex associated to t, and in this section we study the basic properties of reflection complexes. The most important point is that there is a close connection between the morphism spaces between reflection complexes and the topology of the punctured disc. The basic features of this connection will be summarized in Proposition 6.4 below. Let β ∈ Bn be a braid such that β · (σ1 , . . . , σn ) = (t, x2 , . . . , xn ), where Bn acts on n-tuples of γ-reflections via the Hurwitz action. Similarly, there exists a complex Ct with β · (P1 , . . . , Pn ) = (Ct , Cx2 , . . . , Cxn ). The complex Ct is well defined independent of the choice of β ∈ Bn used to obtain an n-tuple of the form (t, x2 , . . . , xn ). The complex Ct , which we call the reflection complex associated to t, lives in the heart D0 of the ~o-baric structure on D. As an example, let t be the γ-reflection σ1 σ2 σ1−1 . The associated reflection complex is ∗ ∗ x ⊕y Cσ1 σ2 σ1−1 ∼ = Σ1 (P2 ) ∼ = P2 −−−→ P1⊕2 ). An alternative description of the reflection complex Ct is as follows: any γ-reflection t may be written as t = gσi g −1 for some g ∈ Fn and some i = 1, . . . , n, with g determined uniquely up to multiplication on the right by a power of σi . The complex Ψg (Pi ) will agree up to a grading and homological shift with the reflection complex Ct defined above, where the “up to a shift” is a result of the ambiguity in the choice of g. The advantage of our first definition above is that it uses the Hurwitz action to fix this choice of g uniformly for all γ-reflections. 24 However, for some statements it seems more natural to allow for an “up to shift” ambiguity in the definition of Ct . In particular, for t a γ-reflection, we define a complex Ct by M Ct [k]. Ct = k∈Z Thus Ct is the direct sum of all homological shifts of Ct which live in the ~o-baric heart D0 . Note that changing the definition of Ct by homological shift does not change the object Ct . The complexes Ct are not objects of D, though the summands of Ct are. In particular, for any Y ∈ D, the space Hom(Y, Ct ) is a well-defined finite dimensional k-vector space. In the statement of the Proposition 6.4 below, we find it convenient to introduce the . notation = by writing, for complexes Y and B, . ∼ B[m]. Y = B ⇐⇒ there exists an integer m such that Y = When we have fixed a direct sum decomposition B ∼ = B1 ⊕ · · · ⊕ Bk , we will also write . Y = B1 ⊕· · ·⊕Bk ⇐⇒ there exist integers m1 , . . . , mk such that Y ∼ = B1 [m1 ]⊕· · ·⊕Bk [mk ]. In the special case Cσi ∼ = Pi , we follow the notation of Section 5 and write Pi := Cσi (though we remind the reader again that in this section the module Pi is endowed with its ~o-grading, while in Section 5 the notations Pi and Pi were used to denote oe-graded objects). Proposition 6.4. Let t and u be γ-reflections. The following are equivalent: (1) tu ∈ Be+ is a simple Bessis element; (2) tut−1 is a γ-reflection; (3) u−1tu is a γ-reflection; (4) The connecting paths ft and fu have isotopic representatives in the unit disc which intersect only at the base point x0 , and such that in a sufficiently small neighbourhood of x0 , the curve ft lies below fu . (5) Hom(Cu , Ct hki) = 0 for k 6= 0. (6) Hom(Ct , Cu hki) = 0 for k 6= 1. (7) Ψt (Cu ) ∼ = Ctut−1 ∈ D0 ; ∼ (C ) (8) Ψ−1 t = Cu−1 tu ∈ D0 ; u (9) Ψu (Ct ) ∈ D[0,1] with ~o-baric slices . . Ψu (Ct )(φ+ ) = ⊕ri=1 Cu h1i and Ψu (Ct )(φ− ) = Ct ; (10) Ψ−1 o-baric slices t (Cu ) ∈ D[−1,0] with ~ . r . −1 Ψ−1 t (Cu )(φ− ) = ⊕i=1 Ct h−1i and Ψt (Cu )(φ+ ) = Cu ; Proof. We only give a sketch of the proof here (see also [20]). The equivalence of the first four claims is immediate from Bessis’ work [4], and does not involve the 2-representation Ψ. The equivalence of the remaining statements with each other and with items (1), (2), (3), (4) can be shown using the Hurwitz action on the set of ~o-spherical collections. ~ o (Ψγ ) For example, we show the equivalence of (1) and (5). Recall that if (Ct1 , . . . , Ctn ) ∈ OD is a ~o-spherical collection of reflection complexes corresponding to a minimal length reflection expression γ = t1 t2 . . . tn , then it follows from the definition of a ~o-spherical collection that for i < j Hom(Cti , Ctj hki) 6= 0 =⇒ k = 1, 25 while for for i > j Hom(Cti , Ctj hki) 6= 0 =⇒ k = 0. Now suppose that tu is a simple Bessis element, and (t, u, x1 . . . xn−2 ) be a minimal length γ-reflection expression for the Coxeter element γ. Then there is some braid β ∈ Bn such that β(P1 , P2 , . . . , Pn ) ∼ = (Ct , Cu , . . . , Cxn−2 ). Since the Bn action preserves the set of ~o-spherical collections, it follows that Hom(Cu , Ct hki) = 0 for k 6= 0, giving (5). To prove the converse statement (5) =⇒ (1), for concreteness we will assume that t = σ1 , so that Ct = P1 and Ct = P1 . (The case of more general t can be reduced to this one using the Hurwitz action, although one can also give a more direct proof along the lines indicated below for the case Ct = P1 .) So we now suppose that Hom(Cu , P1 hki) = 0 for k 6= 0. We claim that Cu is in the full triangulated subcategory generated by {P2 , . . . , Pn }; that is, we claim that no shifts of P1 appear in the chain groups of the minimal complex of Cu . For suppose that a shift of P1 appears somewhere in the minimal complex of Cu ; let us denote such a summand of the chain group of the minimal complex of Cu by N1 , which for convenience we assume appears in homological degree 0. The boundary map of the minimal complex of Cu does not involve any non-zero scalar multiples of the map e1 : P1 → P1 , as any appearance of e1 would result in a contractible summand of Cu . But the the only ~o-degree 0 maps out of N1 are scalar multiples of e1 , and all components of the differential in the minimal complex of Cu are of ~o-degree 0. From this it follows that N1 must be in the kernel of the boundary map of the minimal complex of Cu . Now, let ι : P1 → Cu be the map which sends P1 to N1 isomorphically via e1 . Since N1 is in the kernel of the boundary map of the minimal complex of Cu , ι is a chain map and defines an element of Hom(P1 , Cu ). Let zN1 : Cu → P1 h1i be the map which restricts to multiplication by the loop z : N1 → P1 h1i and which is 0 on all other summands of the chain group of the minimal complex of Cu . This, too, is a chain map, and composition zN1 ◦ ι = z : P1 → P1 h1i is clearly non-zero in the homotopy category; hence zN1 is non-zero in the homotopy category, too. Thus Hom(Cu , P1 h1i) 6= 0, contradicting the assumption of (5). We conclude that if Hom(Cu , P1 hki) = 0 for all k 6= 0, then Cu must be in the full triangulated subcategory generated by P2 , . . . , Pn . Now an inductive argument using the Hurwitz action implies that if a reflection complex Cu lies in the full triangulated subcategory generated by P2 , . . . , Pn , then in fact the reflection u is a divisor of γ ′ = σ2 . . . σn . Thus σ1 u divides σ1 γ ′ = γ, so that σ1 u = tu is a simple Bessis element, giving (1). The equivalence of (6) with (1) is given analogously. The equivalence of each of (7) − (10) ±1 with (5), (6) is obtained directly using the definition of the auto-equivalences Ψ±1 t , Ψu .  26 The transitivity Hurwitz action of Bn on ~o-spherical collections in the orbit of (P1 , . . . , Pn ) has some further important consequences for morphism spaces between reflection complexes. For example, we have the following lemma, whose proof we leave as an exercise for the interested reader. (One such proof is by induction on the length of the braid β ∈ B2 ∼ =Z needed to obtain r as a component of β(t, u) under the Hurwitz action.) Lemma 6.5. Let t, u be γ-reflections with tu ∈ Be+ a Bessis simple element. Suppose that Hom(Ct , Y ) = Hom(Cu , Y ) = 0. Then for any γ-reflection r dividing tu, Hom(Cr , Y ) = 0. Similarly, if Hom(Y, Ct ) = Hom(Y, Cu ) = 0, then for any γ-reflection r dividing tu, Hom(Y, Cr ) = 0. 6.3. Dual ping pong. In this section we define the sets required for dual ping pong, as formulated in Lemma 3.2. We remind the reader that in this section h•i denotes a shift in the ~o-grading, while Dk , D≥k , D≤k , etc. denote the subcategories of D defined in Section 4.6 using the ~o-baric structure. For w ∈ Be+ a simple Bessis element, set Xw = {Y ∈ D≥0 : Hom(Y, Ct ) = 0 ⇐⇒ t divides w} We now show that the Xw satisfy the requirements for dual ping pong, as formulated in Lemma 3.3. Proposition 6.6. The sets {Xw }w∈Be+ are all non-empty and pairwise disjoint. For u a γ-reflection and w ∈ Be+ , Ψu (Xw ) ⊂ Xlf (uw) . Proof. We first show the sets Xw are all non-empty. For w 6= γ ∈ Be+ , write γ = (w ∨ )w, and let M Yw = Cx . x a γ-reflection dividing w ∨ monoid Fn+ is that, for t A basic property of the Bessis a γ-reflection, xt ∈ Be+ for all x dividing w ∨ if and only if t divides w. Thus it follows from from Proposition 6.4 that Hom(Yw , Ct ) = 0 if and only if xt ∈ Be+ if and only if t divides w; this shows that Yw ∈ Xw , so that Xw 6= ∅. Since D>0 ⊂ Xγ , the set Xγ is clearly non-empty, too. The fact that Xw ∩ Xy = ∅ when w 6= y is clear from the definition, since if Y ∈ Xw , then w is the least common multiple of the set {t | Hom(Y, Ct ) = 0}, and thus Y determines w. We now show that Ψu (Xw ) ⊂ Xlf (uw) . Let a = lf (uw), and write uw = ab = ua′ b, with a′ b = w. Let Y ∈ Xw . We must now show that Ψu Y ∈ Xa , that is, we must show that Hom(Ψu Y, Ct ) = 0 ⇐⇒ t divides a. Suppose first that t divides a. One possibility is that t = u, in which case Hom(Ψu Y, Cu ) ∼ = Hom(Y, Ψ−1 Cu ) ∼ = Hom(Y, Cu h−1i). u 27 As Y ∈ D≥0 , the summands of Cu h−1i are in D<0 , and Hom(D≥0 , D<0 ) = 0, we have that Hom(Y, Cu h−1i) = 0. Next, suppose that t divides a′ . Since t divides w and Y ∈ Xw , we know that Hom(Y, Ct ) = 0. Also, as ua′ ∈ Be+ is a simple Bessis element and ut divides ua′ , we know that ut ∈ Be+ , too. Now, by Proposition 6.4 (10), we have that Ψ−1 u Ct is isomorphic to a mapping cone of a direct sum of Cu h−1i’s mapping to Ct . Since the Cu h−1i terms of Ψ−1 u Ct live in D<0 , it follows that for Z ∈ D≥0 , if Hom(Z, Ct ) = 0 then Hom(Z, Ψ−1 u Ct ) = 0. Taking Z = Y , we then have Hom(Y, Ct ) = 0 =⇒ Hom(Ψu Y, Ct ) ∼ = Hom(Y, Ψ−1 u Ct ) = 0. Thus Hom(Ψu Y, Ct ) = 0 for t = u and also for t dividing a′ . Now Lemma 6.5 shows that Hom(Ψu Y, Ct ) = 0 for any t dividing ua′ = a = lf (uw). We now show the converse statement: Hom(Ψu Y, Ct ) = 0 =⇒ t divides a. Let a′′ be the least common multiple of {t | Hom(Ψu Y, Ct ) = 0}. Since u is in this set, u divides a′′ , and we may write a′′ = ua′′′ for a simple Bessis element a′′′ . If we show that a′′′ divides w, then since ua′′′ = a′′ , it will follow that a′′ divides a = lf (uw). To see that a′′′ divides w, suppose that t is a γ-reflection dividing a′′′ . We claim that Hom(Y, Ct ) = 0. As before, we know that if Hom(Y, Ψ−1 u Ct ) = 0 then Hom(Y, Ct ) = 0. Since Hom(Ψu Y, Ct ) ∼ = Hom(Y, Ψ−1 u Ct ) = 0, and Y ∈ Xw , we conclude then t divides w. Since t was an arbitrary factor of a′′′ , it follows that a′′′ divides w, and a′′ = ua′′′ divides a = lf (uw), as desired.  Remark 2. The statements Proposition 6.6 above together with the dual ping pong Lemma 3.3 together imply the faithfulness of the Fn action on D, so it might appear as though we have given a second independent proof of Theorem 1.1. However, in preparation for Proposition 6.6, we used Theorem 1.1 to prove that the Hurwitz action of Bn on ~o-spherical collections is free. Nevertheless, one can give a proof of Proposition 6.6 which does not use Theorem 1.1 (by, for example, proving the freeness of the Hurwitz action on ~o-spherical collections directly) and so in principle one can prove Theorem 1.1 using either ping pong or dual ping pong. We give a dual ping pong faithfulness proof in setting of categorical actions of ADE spherical Artin-Tits groups in [21]. 28 7. Metrics on Fn from homological algebra Let o be an orientation of Q, and {Dk } the associated o-baric structure of D, as defined in Section 4.6. For any auto-equivalence β of D we may define a closed interval [φ− (β), φ+ (β)] ⊂ Z as the smallest interval such that (1) Ψβ (D0 ) ⊂ D[φ− (β),φ+ (β)] . There is no a priori reason to consider only o-baric structure on D for such a definition, and one could (and should) consider instead t-structures, co-t structures, Bridgeland slicings or co-slicings, etc. In favourable situations, the length of this interval will give a metric on the auto-equivalence group of D. It would be interesting to study the resulting metrics on the free group coming from categorical structures on D more systematically, and we certainly have not done that here. However, the ping pong and dual ping pong constructions considered in Sections 5 and 6 allow us to at least give a combinatorial description of the metrics arising from the oe- and ~o-baric structures on D. We collect the relevant statements in two theorems below. The proofs of these theorems are very similar to the proofs of Propositions 5.1 and 6.6, and as a result we omit the details. (In fact, the easiest way to prove these statements is via an examination of the ping pong and dual ping pong games constructed in Propositions 5.1 and 6.6. We also refer also [21],[20], where we prove analogous metric statements for spherical and right-angled Artin-Tits groups.) For the first statement, we consider the symmetric orientation oe, which was used in Section 5 for our construction of ping pong and proof of Theorem 1.1. Thus the integers φ+ (β) and φ− (β) are determined by the interval in (1), where Dk are given by the oe-baric structure on D. Theorem 7.1. For n ≥ 2 and all β ∈ Fn , φ− (β) ≤ 0 and φ+ (β) ≥ 0. Furthermore, • φ+ (β) is equal to the number of positive generators from the set {σ1 , . . . , σn } in a reduced expression β = σiǫ11 . . . σiǫrr , ǫi ∈ ±1; • −φ− (β) is equal to the number of negative generators from the set {σ1−1 , . . . , σn−1 } in a reduced expression β = σiǫ11 . . . σiǫrr , ǫi ∈ ±1; • the oe-baric spread loe(β) = φ+ (β) − φ− (β) is equal to the word length of β in the standard generators {σi±1 } of Fn . We now replace the symmetric orientation oe on Q by the ordered orientation ~o on Q; the b was used in Section 6 for dual ping pong. Thus in the following theorem, ~o-grading on A the integers φ+ (β) and φ− (β) are defined by the interval in (1), where now Dk are given by the ~o-baric structure on D. Theorem 7.2. For any β ∈ Fn , we have the following: • If φ+ (β) ≥ 0, then φ+ (β) is equal to the number of positive simple Bessis elements w ∈ Be+ in any minimal length expression β = wiǫ11 . . . wiǫrr , ǫi ∈ ±1 for β as a word in the generating set (Be+ )±1 . 29 • If φ+ (β) ≤ 0, then β ∈ (Fn+ )−1 is in the negative Bessis monoid. Moverover, in this case −φ+ (β) is equal to the number of γ −1 ’s in any minimal length expression β = wiǫ11 . . . wiǫrr , ǫi ∈ ±1 for β as a word in the generating set (Be+ )±1 . • If φ− (β) ≤ 0, then −φ− (β) is equal to the number of negative simple Bessis elements w −1 in any minimal length expression β = wiǫ11 . . . wiǫrr , ǫi ∈ ±1 for β as a word in the generating set (Be+ )±1 . • If φ− (β) ≥ 0, then β ∈ Fn+ is in the positive Bessis monoid. Moreover, in this case φ− (β) is equal to the number of γ’s in any minimal length expression β = wiǫ11 . . . wiǫrr , ǫi ∈ ±1 for β as a word in the generating set (Be+ )±1 . • Let φ∗+ (β) = max{φ+ (β), 0} and φ∗− (β) = min{φ− (β), 0}, so that φ∗+ (β) ≥ 0 and φ∗− (β) ≤ 0. The ~o-baric spread l~o (β) = φ∗+ (β) − φ∗− (β) is equal to the word length of β in the generating set (Be+ )±1 of simple Bessis elements and their inverses. Thus Theorems 7.1 and 7.2 give homological constructions of the standard and dual wordlength metrics on Fn . 7.1. The exotic metric on Fn . We close by defining a distinguished homological metric on the free group arising from the faithful 2-representation Ψ. Recall that the triangulated category D has a distinguished t-structure {D k } whose heart D 0 is the abelian category of b b we consider linear complexes of graded projective A-modules, where here the grading on A is the grading by path-length (see Section 4.3). Just as for the baric structures considered in the previous section, this t-structure gives rise to a metric on Fn , and a basic problem is to describe it combinatorially. In more detail, for β ∈ Fn , define [φ− (β), φ+ (β)] ⊂ Z to be the smallest interval such that Ψβ (D 0 ) ⊂ D [φ− (β),φ+ (β)] . It is not difficult to see that for n ≥ 2 and any β ∈ Fn , −∞ < ψ− (β) ≤ 0 and 0 ≤ φ+ (β) < ∞. Using the injectivity of the 2-representation Ψ, one can also show the following. Proposition 7.3. The function d : Fn × Fn −→ Z ≥0 defined by dexotic (α, β) = φ+ (β −1 α) − φ− (β −1 α) is a (left-invariant) metric on Fn , n ≥ 2. The triangle inequality and the symmetry of dexotic in the arguments α and β both follow immediately from the definitions; the non-trivial point is to prove that if dexotic (α, β) = 0 then α = β. 30 Thus, to prove Proposition 7.1, one must show that (2) β(D 0) ⊂ D 0 ⇐⇒ β = 1. This is in principle a slightly stronger condition than the faithfulness of the action of Fn on D. However, the faithfulness of the action of Fn on D implies that for β 6= 1, the complex of b A) b bimodules defining Ψβ is not homotopic to the (A, b A) b bimodule A. b Now, by examining (A, the chain groups of the (minimal complexes of) the top and bottom slices of Ψβ , one can show that there is either a projective module Pj such that the top t-slice of Ψβ (Pj ) is in D >0 or a projective module Pj such that the bottom t-slice of Ψβ (Pj ) is in D <0 . From this it follows that Ψβ (⊕nj=1 Pj ) ∈ D 0 ⇐⇒ β = 1, which implies statement (2). We refer to the metric dexotic as the exotic metric on Fn , and pose the following problem. Problem 7.4. Give a combinatorial description of the exotic metric on Fn . If β is an element of the standard positive monoid, so that a minimal expression for β in the generators {σi±1 } uses only positive generators {σi }, then one can show that d(β, 1) is equal to the length of β with respect to the generating set of canonical positive lifts from the associated universal Coxeter group Wn = Fn /hσi2 i. We denote by dCox the word-length metric on Fn whose length one elements are these positive lifts and their inverses. Thus, for n = 2, the free group elements α with dCox (α) = 1 are σ1 , σ2 , σ1 σ2 , σ2 σ1 , σ1 σ2 σ1 , σ2 σ1 σ2 , σ1 σ2 σ1 σ2 , . . . and their inverses. In fact, when n = 2 one can show that for all α, β ∈ F2 , dexotic (α, β) = dCox (α, β). This solves Problem 7.4 when n = 2. When n > 2, the situation appears to be more subtle. While we always have dexotic (α, β) ≤ dCox (α, β), typically we will not have equality (though we will have equality when β −1 α is in the standard positive monoid.) For example, in F3 , if α = σ2 σ1 and β = σ1 σ3 σ1−1 , then dCox (α, β) = 3, but dexotic (α, β) = 2. In fact we have no reason to expect that dexotic is a word-length metric when n > 2. References 1. Pramod N. Achar and David Treumann, Baric structures on triangulated categories and coherent sheaves, Int. Math. Res. Not. IMRN (2011), no. 16, 3688–3743. MR 2824842 (2012h:14034) 2. E. Artin, Theory of braids, Ann. of Math. (2) 48 (1947), 101–126. MR 0019087 (8,367a) 3. John A. Baldwin and J. Elisenda Grigsby, Categorified invariants and the braid group, Proc. Amer. Math. Soc. 143 (2015), no. 7, 2801–2814. MR 3336606 4. David Bessis, A dual braid monoid for the free group, J. Algebra 302 (2006), no. 1, 55–69. MR 2236594 (2007i:20061) 5. R. Bezrukavnikov and I. Losev, Etingof conjecture for quantized quiver varieties, arXiv:1309.1716. 31 6. Stephen J. Bigelow, Braid groups are linear, J. Amer. Math. Soc. 14 (2001), no. 2, 471–486 (electronic). MR 1815219 (2002a:20043) 7. T. Braden, A. Licata, N. Proudfoot, and B. Webster, Quantizations of conical symplectic resolutions ii: category o and symplectic duality, arXiv:1407.0964. 8. T. Braden, N. Proudfoot, and B. Webster, Quantizations of conical symplectic resolutions i: local and global structure, arXiv:1208.3863. 9. Christopher Brav and Hugh Thomas, Braid groups and Kleinian singularities, Math. Ann. 351 (2011), no. 4, 1005–1017. MR 2854121 (2012k:14020) 10. Tom Bridgeland, t-structures on some local Calabi-Yau varieties, J. Algebra 289 (2005), no. 2, 453–483. MR 2142382 (2006a:14067) 11. William Crawley-Boevey, Exceptional sequences of representations of quivers [ MR1206935 (94c:16017)], Representations of algebras (Ottawa, ON, 1992), CMS Conf. Proc., vol. 14, Amer. Math. Soc., Providence, RI, 1993, pp. 117–124. MR 1265279 12. Igor Frenkel, Mikhail Khovanov, and Olivier Schiffmann, Homological realization of Nakajima varieties and Weyl group actions, Compos. Math. 141 (2005), no. 6, 1479–1503. MR 2188446 (2006h:17013) 13. Sergei I. Gelfand and Yuri I. Manin, Methods of homological algebra, second ed., Springer Monographs in Mathematics, Springer-Verlag, Berlin, 2003. MR 1950475 (2003m:18001) 14. Ruth Stella Huerfano and Mikhail Khovanov, A category for the adjoint representation, J. Algebra 246 (2001), no. 2, 514–542. MR 1872113 (2003a:17016) 15. Akira Ishii, Kazushi Ueda, and Hokuto Uehara, Stability conditions on An -singularities, J. Differential Geom. 84 (2010), no. 1, 87–126. MR 2629510 (2011f:14027) 16. Lars T. Jensen, The 2-braid group and garside normal form, arXiv:1505.05353. 17. Ailsa M. Keating, Dehn twists and free subgroups of symplectic mapping class groups, J. Topol. 7 (2014), no. 2, 436–474. MR 3217627 18. Mikhail Khovanov and Paul Seidel, Quivers, Floer cohomology, and braid group actions, J. Amer. Math. Soc. 15 (2002), no. 1, 203–271. MR 1862802 (2003d:53155) 19. Daan Krammer, Braid groups are linear, Ann. of Math. (2) 155 (2002), no. 1, 131–156. MR 1888796 (2003c:20040) 20. A. Licata, 2-representations of right-angled Artin groups, in preparation. 21. A. Licata and H. Queffelec, 2-representations of ADE braid groups and Garside structures, in preparation. 22. Robert Lipshitz, Peter S. Ozsváth, and Dylan P. Thurston, A faithful linear-categorical action of the mapping class group of a surface with boundary, J. Eur. Math. Soc. (JEMS) 15 (2013), no. 4, 1279–1307. MR 3055762 23. I. Losev, On categories o for quantized symplectic resolutions, arXiv:1502.00595. 24. Volodymyr Mazorchuk, Serge Ovsienko, and Catharina Stroppel, Quadratic duals, Koszul dual functors, and applications, Trans. Amer. Math. Soc. 361 (2009), no. 3, 1129–1172. MR 2457393 (2010c:16029) 25. Raphaël Rouquier, Categorification of sl2 and braid groups, Trends in representation theory of algebras and related topics, Contemp. Math., vol. 406, Amer. Math. Soc., Providence, RI, 2006, pp. 137–167. MR 2258045 (2008f:17011) 26. Raphaël Rouquier and Alexander Zimmermann, Picard groups for derived module categories, Proc. London Math. Soc. (3) 87 (2003), no. 1, 197–225. MR 1978574 (2004h:16003) 27. Paul Seidel and Richard Thomas, Braid group actions on derived categories of coherent sheaves, Duke Math. J. 108 (2001), no. 1, 37–108. MR 1831820 (2002e:14030) 28. R. P. Thomas, Stability conditions and the braid group, Comm. Anal. Geom. 14 (2006), no. 1, 135–161. MR 2230573 Mathematical Sciences Institute; Australian National University; Canberra, Australia E-mail address: [email protected] 32
4math.GR
Aerial Spectral Super-Resolution using Conditional Adversarial Networks Aneesh Rangnekar Nilay Mokashi Emmett Ientilucci Christopher Kanan Matthew Hoffman Rochester Institute of Technology arXiv:1712.08690v1 [cs.CV] 23 Dec 2017 {aneesh.rangnekar, nilaymokashi}@mail.rit.edu, [email protected], {kanan, mjhsma}@rit.edu Abstract Inferring spectral signatures from ground based natural images has acquired a lot of interest in applied deep learning. In contrast to the spectra of ground based images, aerial spectral images have low spatial resolution and suffer from higher noise interference. In this paper, we train a conditional adversarial network to learn an inverse mapping from a trichromatic space to 31 spectral bands within 400 to 700 nm. The network is trained on AeroCampus, a first of its kind aerial hyperspectral dataset. AeroCampus consists of high spatial resolution color images and low spatial resolution hyperspectral images (HSI). Color images synthesized from 31 spectral bands are used to train our network. With a baseline root mean square error of 2.48 on the synthesized RGB test data, we show that it is possible to generate spectral signatures in aerial imagery. Hyperspectral Data RGB Data 1. Introduction Almost all consumer cameras available today function by converting the light spectrum to match the trichromaticity of the human eyes (as Red, Green and Blue channels). This is effective for presenting information to humans, but it ignores much of the visible spectrum. Hyperspectral images (HSI) and multispectral images (MSI), on the other hand, capture additional frequencies of the spectrum and often measure spectra with greater fidelity. This additional information can be used for many applications, including precision agriculture [20], food quality analysis [26] and aerial object tracking [28]. Typically, MSI have 4 - 10 channels spread over a large bandpass, and HSI have 30 - 600 channels with finer spectral resolution. MSI and HSI data can enable discrimination tasks where RGB will fail due to the increased spectral resolution. However, MSI and HSI data have drawbacks: (1) MSI and HSI cameras are very expensive, and (2) HSI and MSI have a significantly lower spatial and temporal resolution than RGB cameras (Fig. 1). As a result, the use of spectral imagery has been limited to domains where these RGB Data Network Spectral Data Figure 1: Top. RGB cameras provide high spatial resolution while hyperspectral cameras have low-spatial resolution that makes tasks significantly difficult. Bottom. In our approach, we infer a many channeled spectral image from an RGB image and to do this, we use conditional adversarial generative networks. The outcome is an image with both high spatial resolution and high spectral resolution. drawbacks are mitigated. Given the high hardware costs of flying an HSI sensor, we explore the possibility of learning RGB to HSI mappings in low resolution spectral imagery and then applying those mappings to high resolution spatial RGB imagery to obtain images with both high spatial and high spectral resolution. 1 Spectral super-resolution SSR algorithms attempt to infer additional spectral bands in the 400 nm – 700 nm range from an RGB and low resolution HSI images at an interval of 10 nm. Recently, SSR algorithms using deep learning [6, 3, 30] have been proposed that attempt to solve this problem in natural images. These methods bypass the need for a low resolution HSI input by learning RGB to Spectral mappings from a large sample of natural images [4]. Recently, generative adversarial networks (GAN) [7] and its variants have shown tremendous success in being able to generate realistic looking images by learning a generative model of the data. Conditional GANs are similar to conventional GANs, except that they learn the output distribution as a function of noise and the input, thus making them suitable for text-to-image [33] and image-to-image [11] translation purposes. This paper makes three major contributions: • We show that conditional GANs can learn the target distribution for 31 spectral bands from low spatial resolution RGB images. • We describe a new aerial spectral dataset called AeroCampus that contains a wide variety of objects, including, but not limited to, cars, roads, trees, and buildings. • We demonstrate that our conditional GAN achieves an effective root mean square error (RMSE) on AeroCampus of less than 3.0. We then use our model on RGB images with high spatial resolution to obtain images with both high spatial and high spectral resolution. 2. Related work SSR is closely related to hyperspectral superresolution [16, 2, 5]. Hyperspectral super-resolution involves inferring a high resolution HSI from two inputs: a low resolution HSI and a high resolution image (typically RGB). SSR is a harder task because it does not have access to the low resolution HSI, which can be expensive to obtain. Nguyen et al. [21] used a radial basis function (RBF) that leverages RGB white-balancing to recover the mapping from color to spectral reflectance values. They have two key assumptions that make their approach too restrictive: (1) They assume the color matching function of the camera is known beforehand and, (2) that the scene has been illuminated by an uniform illumination. Their method includes stages for recovering two things - the object reflectance and, the scene illumination and is very dependent on the assumptions for training the RBF network. Arad and Ben-Shahar [4] proposed learning a sparse dictionary of hyperspectral signature priors and their corresponding RGB projections. They then used a many-to-one mapping technique for estimating hyperspectral signatures in the test image, while using all other images in the dataset for learning the dictionary. This approach yielded better results in domainspecific subsets than the complete set uniformly since the Figure 2: Geometrically corrected AeroCampus aerial flight line over Rochester Institute of Technology’s university campus. The image is segmented such that the right portion, shaded green, is used for testing while the left portion, shaded blue, is used for training. dictionary has access to a lot similar naturally-occurring pixel instances in the training data and can be optimized for the target subset. Similar to Arad and Ben-Shahar, Aeschbacher et al. [1] adapted the A+ method [27] to the spectral reconstruction domain to achieve significantly better results without the need for online learning of the RBGHSI dictionary (Arad and Ben-Shahar’s approach was inspired by the works of Zeyde et al. [32]). However, these approaches tackle the mapping problem on a pixel level and fail to take advantage of area around the pixel that would possibly yield better information for predicting signatures, for example - if a particular color ‘blue’ to be spectrally up-sampled, does it belong to the blue car or the sky? The above approaches fail to use this spatial information. A number of papers that use applied deep learning for SSR have been published this year. Galliani et al. [6] proposed the use of the Tiramisu architecture [12], a fully convolutional version of DenseNet [9]. They modified the network to a regression based problem by replacing SoftmaxCross Entropy loss for class segmentation with the Euclidean loss and established the first state-of-the-art results in the field. Xiong et al. proposed to use spectral interpolation techniques to first up-sample the RGB image in the channel space to a desired spectral resolution and then use CNNs to enhance the up-sampled spectral image. Similar to our work, Alvarez-Gila et al. [3] recently used a pix2pix [11] image-to-image translation framework for SSR using GANs on natural images. A key point in applied deep learning methods being: unlike dictionary based algorithms which require information about the camera’s color matching functions, these methods do not rely on this information. 3. AeroCampus RGB and HSI Data Sets The AeroCampus data set (see Fig. 2) was generated by flying two types of camera systems over Rochester Institute of Technology’s university campus on August 8th, 2017. The systems were flown simultaneously in a Cessna aircraft. The first camera system consisted of an 80 megapixel (MP), RGB, framing-type silicon sensor while the second system consisted a visible/near infrared (VNIR) hyperspectral Headwall Photonics Micro Hyperspec E-Series CMOS sensor. The entire data collection took place over the span of a couple hours where the sky was completely free of cloud cover, with the exception of the last couple flight lines at the end of the day. The wavelength range for the 80 MP sensor was 400 to 700nm with typical band centers around 450, 550, and 650nm and full-width-half-max (FWHM) values ranging from 60-90nm. The hyperspectral sensor provided spectral data in the range of 397 to 1003nm, divided into 372 spectral bands. The ground sample distance (GSD) is completely dependent on flying altitude. The aircraft was flown over the campus at altitude of approximately 5,000 feet, yielding an effective GSD for the RGB data of about 5cm and 40cm for the hyperspectral imagery. Both data sets were ortho-rectified based on survey grade GPS. That is, camera distortion was removed along with uniform scaling and re-sampling using a nearest neighbor approach so as to preserve radiometric fidelity. The RGB data was ortho-rectified onto the Shuttle Radar Topography Mission (SRTM) v4.1 Digital Elevation Model (DEM) while the HSI was rectified onto a flat plane at the average terrain height of the flight line (i.e., a low resolution DEM). Both data sets were calibrated to spectral radiance in units of W m−2 sr−1 µm−1 . To preserve the integrity of the training and testing data, we only use one of the six flight lines collected to record our results. There was significant overlap between the other flight lines and hence, the one with the largest spatial extent was chosen to obtain a considerable split in the dataset (Fig. 2). (a) Blue Car (ICVL [4]) (b) Balloons (CAVE [31]) Figure 3: Left: Unique objects that occur only once in the spectral datasets and hence make it difficult to infer their signatures. Comparison to other datasets. To the best of our knowledge, AeroCampus is the first of its kind as an aerial spectral dataset. The closest contender would be the Kaggle DSTL Satellite Imagery Dataset with a 8 band multispectral channel between 400 nm to 1040nm. Not having an uniform pre-defined split also causes a problem when it comes to validating the current state of the art methods over newly proposed models. For the ICVL dataset [4], Galliani et al. [6] used a 50% global split of the available images and randomly sampled a set of 64 × 64 image patches for training the Tiramisu network. At test time, they constructed the spectral signatures of a given image by tiling 64×64 patches with eight pixel overlap to avoid boundary artifacts. For the same dataset, Alvarez-Gila et al. [3] train their network by using a different global split and report their results, making it difficult to validate other approaches due to the lack of uniformly accepted data splits. For AeroCampus, we follow a simple split (Fig. 2): we use 60 % of the data as training and the remaining 40 % as testing. This is done to ensure that there is enough spectral variety present in the dataset with respect to key areas of classes like cars, roads, vegetation and buildings. 4. AeroGAN for Aerial SSR Problem statement. As shown in Fig. 1, we define our under-constrained problem as follows: Given a three band (RGB) image, is it possible to learn up-sampling in the spectral domain to regress information for 31 bands between 400 nm - 700 nm? To this end, we experiment with a conventional encoder-decoder network and extend the capacity by modeling the task as a target distribution learning problem. 4.1. CNN Framework Analysis The network architecture for aerial SSR is constrained by the following requirements: (1) It should be able to process low resolution features very well due to the nature of the data, (2) it should be able to propagate information to all layers of the network so that valuable information is not lost during sampling operations and, (3) it should be able to make the most out of limited data samples. For our model, we use a variant of the UNet [22] framework since it has been known to operate well on low resolution medical imagery and limited data samples. The network is modified to solve a regression problem by replacing the last softmax layer with a ReLU activation which then gets forwarded to another convolution layer for predicting the band values. The skip connections from encoder to decoder layers ensure conveyance of trivial but useful information whose positioning remains consistent at the output end as well, ensuring all possible information has been utilized to its maximum. Following popular approaches in spatial superresolution, we use LeakyReLUs in the encoder side Generator Real RGB Fake Spectral Discriminator Real Spectral Discriminator Real or fake pair? Conv + Normalization + LeakyReLU Transposed Conv + Normalization + ReLU Conv + Activation [Output] Conv + LeakyReLU Real or fake pair? Figure 4: Overall representation of the network. The generator consists of an UNet architecture with 6 up down transitions followed by a 31 band 1 × 1 convolution layer and sigmoid activation to predict the output. The discriminator is then used to determine which pair of RGB and Spectral images is real and fake. and normal ReLUs in the decoder side to avoid facing vanishing gradients. The last obtained set of filters is then given to a 31 channel 1 × 1 convolution layer [18] to obtain the final set of 31 bands. The intuition behind using 1 × 1 filter here is two fold: it forces the network to learn dimensionality reduction on the 64 channel space and at the same time, gives each of the pixel location its own distinct signature since the filters do not concern themselves with correlation in the spatial feature map space, but rather look at variation in the temporal feature map space. We regress the values for the bands between 0 and 1 and found this to be important for achieving a more stable flow in predictions generated by the network. Dropout is applied to all but the last two layers of the CNN to ensure smooth gradient flow through the network while trying to minimize the loss. It is worth mentioning that both, FC-DenseNet (used in [6]) and UNet failed to obtain a good representation of the mapping using conventional loss functions, possibly due to an insufficient number of training samples. proposed in [19], have been used widely for generating realistic looking synthetic images [14, 33, 17, 11]. To overcome the difficulty of dealing with pixel-wise MSE loss, Johnson et al. [14] and Ledig et al. [17] used similar loss functions that were based on the activations of the feature maps in the VGG [24] network layers. There exists no such network in the spectral domain that can help minimize the activations at feature map levels to improve the quality of the generated samples. The functioning of our GAN is inspired by the image to image translation framework of Isola et al. in [11]. Similar to the their paper where the task is to regress 2/3 channels depending on the problem, we formulate our objective for regressing 31 spectral bands as follows: Lrgb2si = Ergb,si∼pdata (rgb,si) [log D(rgb, si)] +Ergb∼pdata (rgb) [log (1 − D(rgb, G(rgb))] G∗ = arg min max LcGAN (G, D) + λLother (G) G 4.2. cGAN Framework Analysis While using pixel-wise L1/ MSE loss works for regressing for optimal values of the spectral bands, we further improved the network by turning the problem to a target distribution learning task. Conditional GANs, first D (1) (2) where the generator (G) tries to minimize the objective LcGAN (G, D) while the adversarial discriminator (D) tries to maximize it. The other loss in Eqn. 1 is an additional term imposed on the generator, which is now tasked with not only fooling the discriminator but also being as close to the ground truth output image as possible. This is accomplished by using Lother as a L1 loss, after having tested with L2 loss and similarity index based losses like SSIM [29]. L2 loss has been the most popular for pixel-wise reconstruction and though it is effective in low frequency content restoration, it suppresses most of the high frequency detail, which is undesirable given the lack of high frequency content available in the first place. Isola et al. [11] proposed to trade-off the L2 loss by using L1 loss for correcting low frequency components while using the PatchGAN discriminator to deal with high frequency components by penalizing structural integrity at the patch level. PatchGAN is described in [11] as the size of the discriminator’s receptive field to determine whether that portion of the sample is real or fake. For instance, a 1 × 1 receptive field will bias its opinion only on the pixel values individually while a 16 × 16 receptive field will determine if the 16 × 16 region in the image rendered is real or fake and then average all the scores. This architecture works in our favor since the PatchGAN layers assess spectral data similarity inherently without the need to mention any separate loss function. On the generator side, λ is set to 100 in Eqn. 2 with L1 loss to normalize it’s contribution in the overall loss function. We found that the best results were obtained (Table 1, Fig. 7) by setting the discriminator’s receptive field to 70 × 70. Receptive Field of the Discriminator 1×1 16 × 16 34 × 34 70 × 70 AeroCampus RMSE PSNR (dB) 4.23 3.36 3.56 2.48 -0.2422 -0.0659 0.1728 2.0417 Table 1: Average root mean square error (RMSE) and peak signal to noise ratio (PSNR) scores for different receptive fields used for the discriminator, evaluated on the test dataset using synthesized RGB patches as inputs to the generator. 5. Experiments and Results Data Preparation. Finding the right alignment between RGB and HSI imagery captured at different altitudes is quite a task when it comes to problems such as SSR. Following the work of other researchers [4, 6, 5], we synthesize the RGB images from the hyperspectral data using the standard camera sensitivity functions for the Canon 1D Mark III as collected by Jiang et al. [13]. This eliminates the process of establishing accurate spatial correspondence that would have been needed in the original scenario. Camera sensitivity functions give a mapping for the image sensor’s relative efficiency of light conversion against the wavelengths. They are used to find correspondences between the radiance in the actual scene and the RGB digital counts generated. In our case, the original hyperspectral scene contains images taken with 372 narrow filters, each separated by about 1 nm. Using ENVI (Exelis Visual Information Solutions, Boulder, Colorado), we first convert this data to 31 bands separated by 10 nm and ranging from 400 nm to 700 nm to form our hyperspectral cube. Using the camera sensitivity function at the corresponding 31 wavelengths, we then synthesize the RGB images. All images are normalized between 0 to 1 before being fed into the networks. 5.1. Settings Implementation details. We used PyTorch for all our implementations. All models were initialized with HeUniform [8] and a dropout of 50% was applied to avoid overfitting and as a replacement for noise in adversarial networks. For optimization, we used Adam [15] with a learning rate of 2e− 3, gradually decreasing to 2e− 4 halfway through the epochs. We found these to be the optimum parameters for all our results. All GANs were trained for 50 epochs to achieve optimal results. All max pooling and up-sampling layers were replaced with strided convolutions and transposed convolutions layers respectively. Inspired by Galliani et al. [6], we replaced all transposed convolutions with subpixel up-sampling [23], but did not achieve significant improvement. Thus transposed convolutions are retained in all our models. Error metrics. We use two error metrics for judging the performance of our network: Root Mean Square Error (RMSE) and Peak Signal to Noise Ratio (PSNR). To avoid any discrepancy in the future, it is worth mentioning that the RMSE is computed on a 8-bit range by converting the corresponding values between [0 − 255] (following approaches in [4, 6]) while the PSNR is measured in the [0 − 1] range. 5.2. Results Fig. 5 shows a set of different scenarios from the test data that were analyzed. The first row is a set of 4 different scenes from the test dataset at 64 × 64 resolution, namely: running track, baseball field, vegetation and parking lot. The scenes are picked such that the former two objects have never been seen by the network and the latter two are some permutation of instances in the training data. The network is able to generate significant band resemblances in all cases, thus proving the viability of our method. Secondly, since the network is fully convolutional, we also test a scenario where it has to infer information in a 256 × 256 resolution patch (Fig. 7). We sample a set of four points as shown Fig. 6 and analyze the plots for the three discriminator windows: 16 × 16, 34 × 34, and 70 × 70. From Fig. 7, we observe that none of the models pre- Tree 9 Ground Truth 16x16 D 34x34 D 70x70 D 8 7 Digital Count 6 5 4 3 2 1 400 450 500 550 600 650 700 Wavelength (nm) Asphalt 26 Ground Truth 16x16 D 34x34 D 70x70 D 24 22 Digital Count Figure 5: Figures showing performance of 70 × 70 UNet GAN for the synthesized RGB aerial capture. The first row corresponds to the ground truth while the second row are the model predictions at 420 nm, 550 nm and 620 nm. The networks learns to predict spectral information well, even for cases it has not seen in the training data (running-track and baseball field). 20 18 16 14 12 400 450 500 550 600 650 700 Wavelength (nm) Car 32 Ground Truth 16x16 D 34x34 D 70x70 D 30 28 Digital Count 26 24 22 20 18 16 14 400 450 500 550 600 650 700 Wavelength (nm) Building 40 Ground Truth 16x16 D 34x34 D 70x70 D 35 30 Digital Count Figure 6: Set of points sampled for comparing the spectral distributions in Fig. 7 25 20 dicted the bump observed at 400 - 420 nm range in case of the tree sample. This bump has been caused mostly due to high signal to noise ratio at the sensor end and hence can be treated as noise, which the networks managed to ignore. The inference for car, building and asphalt also looks smooth, and even though the 70 × 70 discriminator does not get the right magnitude levels, the spectra constructed has similar key points for unique object identification, which is close to solving the reconstruction task. Proof of concept. The main aim of this study is to figure out if neural networks can learn spectral pattern distributions that could be applied to high resolution RGB images for getting best of both. For validation, we sample a set 15 10 400 450 500 550 600 650 700 Wavelength (nm) Figure 7: An analysis of different spectra sampled from the image (a). The four rests of points correspond to: (1) Tree, (2) Asphalt (road), (3) Car and, (4) Building. The values between the bands have been interpolated by B-spline transform and normalized between [0 − 255] for analysis. Predicted Spectra 90 Vegetations Red car Green car White car Asphalt 80 70 Digital Count 60 50 40 30 20 10 0 400 450 500 550 600 650 700 Wavelength (nm) Figure 8: A 256 × 256 patch sampled from the high resolution RGB image collection towards predicting hyperspectral signatures. A set of 5 points were sampled to assess the performance of the model. of patches from the RGB images that were collected and present a proof of concept (Fig. 8) towards aerial SSR. As observed, the network managed to obtain significant spectral traits: (1) a bump in higher end of the spectrum for the red car and, (2) a peak in green corresponding to the vegetation patch. This shows that it is indeed possible for neural networks to observe information over time and possibly learn a pattern, provided enough samples are present for training. 5.3. Discussion In this section, we discuss other network architectures that were tried and also the limitations of using SSR with aerial imagery. Other networks. Two additional network architectures were tested with to reduce the under-constrained problem space: (1) a 31-channel GAN architecture similar to [25], where each band gets its own set of convolution layers before being concatenated for calculating reconstruction loss; and (2) an architecture inspired by [33] in which two consecutive GANs learn to first generate an image at a lower resolution (64 × 64) and then upscale to a higher resolution (256 × 256). In our case, we used two different GANs to first spectrally up-sample to 11 bands and then predict the remaining 20. However, we found both these networks to be more unstable than the simpler one. We believe the cause for this to possibly be the fact that it is more easier to learn an entire spectral distribution range than learning it split by split since there can be overlaps between objects of different Figure 9: Spectral predictions from the 70 × 70 GAN for each of the points sampled in Fig. 8. The network has managed to capture traits corresponding to the areas under consideration for most pixels, while confusing between green car (3) and asphalt (5) due to similar RGB combinations. Interestingly, the ground truth values for both the patches are similar with differences in the infrared spectrum, thus in a way proving the network has learnt correctly. categories in particular spectral ranges. We are continuing to develop these models. Areas of development. SSR has its own set of limitations that cannot be resolved irrespective of the methods used. For example, one of the main motivations for this paper is to determine if an applied learning can be used instead of expensive hyperspectral cameras to predict light signatures in the hyperspectral space. While it is possible to model spectral signatures between 400nm - 700nm, it is next to impossible to model infrared and beyond signatures since they are not a function of just the RGB values. Here, we present two “solvable” limitations: Water and Shadows. Water does not have its own hyperspectral signature and instead takes over the signature of the sediments present in it - the signatures for clear water and turbid water would be distinctly apart. Detecting shadows has been known to be a problem in spectral imaging [10] since they also do not exhibit an unique spectral signature. The question posed here is simple - given a vast amount of data, is it possible to have a network learn how water and shadows work and affect the spectral signatures of objects under consideration? To this end, we sample a 256 × 256 patch from another flight line (Fig. 10) that contains asphalt (road) under two different circumstances: sunlight and shadows. The corresponding spectral prediction is shown in Fig. 11 where we observe that the network managed to have a similar spectral Sunlight Digital Count 35 Ground Truth Prediction 30 25 20 15 400 450 500 550 600 650 700 Wavelength (nm) Shadow 14 Ground Truth Prediction Figure 10: A 256 × 256 patch sampled from another flight line during occlusion by clouds. Two sets of road patches are sampled from this image: one under sunlight and the other under shadows. signature to the sunlight patch with a decrease in magnitude. This could be of importance in tasks where knowing the presence of shadows is required. Digital Count 12 10 8 6 4 2 400 450 500 550 600 650 700 Wavelength (nm) Figure 11: Plot showing ground truth and predicted spectral bands for patches sampled in Fig. 10. As seen, the spectral prediction for the sunlight patch (1) is pretty accurate, while the network struggles to obtain the right level of magnitude for shadow patch (2). 6. Conclusion In this paper, we trained a conditional adversarial network to determine the 31 band visible spectra of a aerial color image. Our network is based on the Image-to-Image Translation framework which we extend to predict 31 band values. We show that the network learns to extract features for determining an object’s spectra despite high noise interference in the spectral bands. Experimental results show a RMSE of 2.48, which shows that the network is successfully recovering the spectral signatures of a color image. Furthermore, we introduce two modeling complexities: water and shadows and release the AeroCampus dataset for other researchers to use. 7. Acknowledgments This work was supported by the Dynamic Data Driven Applications Systems Program, Air Force Office of Scientific Research, under Grant FA9550-11-1-0348. We thank the NVIDIA Corporation for the generous donation of the Titan X Pascal that was used in this research. References [1] J. Aeschbacher, J. Wu, R. Timofte, D. CVL, and E. ITET. In defense of shallow learned spectral reconstruction from rgb images. In Proceedings of the IEEE International Conference on Computer Vision Workshops, 2017. 2 [2] N. Akhtar, F. Shafait, and A. Mian. Hierarchical beta process with gaussian process prior for hyperspectral image super resolution. In European Conference on Computer Vision, pages 103–120. Springer, 2016. 2 [3] A. Alvarez-Gila, J. van de Weijer, and E. Garrote. Adversarial networks for spatial context-aware spectral image reconstruction from rgb. 2017. 2, 3 [4] B. Arad and O. Ben-Shahar. Sparse recovery of hyperspectral signal from natural rgb images. In European Conference on Computer Vision, pages 19–34. Springer, 2016. 2, 3, 5 [5] R. Dian, L. Fang, and S. Li. Hyperspectral image superresolution via non-local sparse tensor factorization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5344–5353, 2017. 2, 5 [6] S. Galliani, C. Lanaras, D. Marmanis, E. Baltsavias, and K. Schindler. Learned spectral super-resolution. arXiv preprint arXiv:1703.09470, 2017. 2, 3, 4, 5 [7] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. In Advances in neural information processing systems, pages 2672–2680, 2014. 2 [8] K. He, X. Zhang, S. Ren, and J. Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] classification. In Proceedings of the IEEE International Conference on Computer Vision, pages 1026–1034, 2015. 5 G. Huang, Z. Liu, L. van der Maaten, and K. Q. Weinberger. Densely connected convolutional networks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. 2 W. Huang and M. Bu. Detecting shadows in high-resolution remote-sensing images of urban areas using spectral and spatial features. International Journal of Remote Sensing, 36(24):6224–6244, 2015. 7 P. Isola, J.-Y. Zhu, T. Zhou, and A. A. Efros. Image-to-image translation with conditional adversarial networks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. 2, 4, 5 S. Jégou, M. Drozdzal, D. Vazquez, A. Romero, and Y. Bengio. The one hundred layers tiramisu: Fully convolutional densenets for semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), pages 1175–1183. IEEE, 2017. 2 J. Jiang, D. Liu, J. Gu, and S. Süsstrunk. What is the space of spectral sensitivity functions for digital color cameras? In Applications of Computer Vision (WACV), 2013 IEEE Workshop on, pages 168–179. IEEE, 2013. 5 J. Johnson, A. Alahi, and L. Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In European Conference on Computer Vision, pages 694–711. Springer, 2016. 4 D. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 5 C. Lanaras, E. Baltsavias, and K. Schindler. Hyperspectral super-resolution by coupled spectral unmixing. In Proceedings of the IEEE International Conference on Computer Vision, pages 3586–3594, 2015. 2 C. Ledig, L. Theis, F. Huszár, J. Caballero, A. Cunningham, A. Acosta, A. Aitken, A. Tejani, J. Totz, Z. Wang, et al. Photo-realistic single image super-resolution using a generative adversarial network. arXiv preprint arXiv:1609.04802, 2016. 4 M. Lin, Q. Chen, and S. Yan. Network in network. arXiv preprint arXiv:1312.4400, 2013. 4 M. Mirza and S. Osindero. Conditional generative adversarial nets. arXiv preprint arXiv:1411.1784, 2014. 4 D. J. Mulla. Twenty five years of remote sensing in precision agriculture: Key advances and remaining knowledge gaps. Biosystems engineering, 114(4):358–371, 2013. 1 R. M. Nguyen, D. K. Prasad, and M. S. Brown. Trainingbased spectral reconstruction from a single rgb image. In European Conference on Computer Vision, pages 186–201. Springer, 2014. 2 O. Ronneberger, P. Fischer, and T. Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 234–241. Springer, 2015. 3 W. Shi, J. Caballero, F. Huszár, J. Totz, A. P. Aitken, R. Bishop, D. Rueckert, and Z. Wang. Real-time single image and video super-resolution using an efficient sub-pixel [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] convolutional neural network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1874–1883, 2016. 5 K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 4 P. L. Suárez, A. D. Sappa, and B. X. Vintimilla. Infrared image colorization based on a triplet dcgan architecture. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), pages 212–217. IEEE, 2017. 7 D. Sun. Computer vision technology for food quality evaluation. Academic Press, 2016. 1 R. Timofte, V. De Smet, and L. Van Gool. A+: Adjusted anchored neighborhood regression for fast super-resolution. In Asian Conference on Computer Vision, pages 111–126. Springer, 2014. 2 B. Uzkent, A. Rangnekar, and M. J. Hoffman. Aerial vehicle tracking by adaptive fusion of hyperspectral likelihood maps. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), pages 233– 242. IEEE, 2017. 1 Z. Wang, A. C. Bovik, H. R. Sheikh, and E. P. Simoncelli. Image quality assessment: from error visibility to structural similarity. IEEE transactions on image processing, 13(4):600–612, 2004. 5 Z. Xiong, Z. Shi, H. Li, L. Wang, D. Liu, and F. Wu. Hscnn: Cnn-based hyperspectral image recovery from spectrally undersampled projections. In Proceedings of the IEEE International Conference on Computer Vision Workshops, 2017. 2 F. Yasuma, T. Mitsunaga, D. Iso, and S. K. Nayar. Generalized assorted pixel camera: postcapture control of resolution, dynamic range, and spectrum. IEEE transactions on image processing, 19(9):2241–2253, 2010. 3 R. Zeyde, M. Elad, and M. Protter. On single image scale-up using sparse-representations. In International Conference on Curves and Surfaces, pages 711–730. Springer, 2010. 2 H. Zhang, T. Xu, H. Li, S. Zhang, X. Huang, X. Wang, and D. Metaxas. Stackgan: Text to photo-realistic image synthesis with stacked generative adversarial networks. arXiv preprint arXiv:1612.03242, 2016. 2, 4, 7
1cs.CV
A Magnus theorem for some amalgamated products arXiv:1701.04441v1 [math.GR] 16 Jan 2017 Carsten Feldkamp January 18, 2017 Abstract A group G possesses the Magnus property if for every two elements u, v ∈ G with the same normal closure, u is conjugate in G to v or v −1 . We prove the Magnus property for some amalgamated products including the fundamental group of a closed non-orientable surface of genus 3. This answers a question of O. Bogopolski and K. Sviridov, who obtained the analogous result for genus g > 3. 1 Introduction A group G possesses the Magnus property if for every two elements u, v ∈ G with the same normal closure, u is conjugate in G to v or v −1 . The Magnus property was named after W. Magnus who proved the so-called Freiheitssatz (see Theorem 4.1) and the Magnus property for free groups [Mag30]. Since then, many mathematicians proved or disproved the Freiheitssatz and the Magnus property for certain classes of groups (see e.g. [Bog05], [BS08], [Edj89], [How81], [How04]). Let π1 (Sg+ ), respectively π1 (Sg− ), be the fundamental group of the compact orientable, respectively non-orientable, surface of genus g. The Magnus property of π1 (Sg+ ) for all g was proved independently by O. Bogopolski [Bog05] (by using algebraic methods) and by J. Howie [How04] (by using topological methods). As observed in [Bog05], there is a third, model theoretic method: two groups G1 , G2 are called elementarily equivalent if their elementary theories coincide: Elem(G1 ) = Elem(G2 ), see [CG05]. It is easy to show that elementarily equivalent groups either both possess the Magnus property, or both do not possess it. Since the groups π1 (Sg+ ) for g > 2 and π1 (Sg− ) for g > 4 are elementarily equivalent to the free group on two generators, all these groups possess the Magnus property. In [BS08], O. Bogopolski and K. Sviridov proved the following theorem: Theorem 1.1. [BS08, Main Theorem] Let G = ha, b, y1 , . . . , ye | [a, b]uvi, where e > 2, u, v are non-trivial reduced words in letters y1 , . . . , ye , and u, v have no common letters. Let r, s ∈ G be two elements with the same normal closures. Then r is conjugate to s or s−1 . As a corollary of that theorem ([BS08, Corollary 1.3]), they showed the Magnus property of π1 (Sg− ) for g > 4. Since the Magnus property trivially holds for genus 1 and 2, the authors asked, whether it 1 also holds for the fundamental group of the non-orientable surface of genus 3. With our Main Theorem, that proves the Magnus property for a slightly larger subclass of one-relator groups than in Theorem 1.1, we answer this question positively. The difficulty with genus g = 3 is essential since it is well known that the group π1 (S3− ) = hx, y, z | x2 y 2 z 2 i is not even existentially equivalent to a free group Fn on n generators. However, in large parts, our proof follows the proof of the Main Theorem in [BS08]. Main Theorem 1.2. Let G = ha, b, y1 , . . . , yn | [a, b]ui, where n ∈ N and u is a non-trivial reduced word in the letters y1 , . . . , yn . Then G possesses the Magnus property. e = ha, b, c | [a, b]c2 i defined by Using the isomorphism ϕ between π1 (S3− ) = hx, y, z | x2 y 2 z 2 i and H ϕ(x) = ca−1 , ϕ(y) = b−1 c−1 and ϕ(z) = cbcac−1 , we get the following corollary. Corollary 1.3. The group π1 (S3− ) possesses the Magnus property. In the proof of Theorem 1.1, the authors of [BS08] used an automorphism of G with certain convenient properties. This automorphism is in general absent for the group given in our Main Theorem. For example, it is absent for the group π1 (S3− ). So we introduce an additional tool which we call α- and ω-limits (see Section 3). Together with the results of [BS08, Bog05, How04] Corollary 1.3 implies the following. Corollary 1.4. The fundamental groups of all compact surfaces possess the Magnus property. We will start the proof of our main theorem by recapitulating the notation of [BS08, Section 3] with some small alterations. In Section 3 we introduce α- and ω-limits, α-ω-length || · ||α,ω and suitable elements. In Section 4 we give the proof for the case, where the α-ω-length of suitable elements is positive (the consideration of this case is close to that in [BS08]). In Section 5 we complete the proof in the remaining case. 2 Reduction to a new group and left/right bases We denote the normal closure of an element g in a group G by hhgiiG and the exponent sum of an element g ∈ G in a letter x by gx . Note that this sum is well-defined if all relations of G considered as words of a free group have exponent sum 0 in x. Our main theorem can be deduced from the following proposition in the same way as in the Main Theorem of [BS08] from [BS08, Proposition 2.1]. Therefore we leave this argumentation out. Proposition 2.1. Let H = hx, b, y1 , . . . , yn | [xk , b]ui, where k, n ≥ 1 and u is a non-trivial reduced word in the letters y1 , . . . , yn . Further, let r, s ∈ H\{1} with rx = 0. Then hhriiH = hhsiiH implies that r is conjugate to s or s−1 . We briefly summarise the concept of left and right bases from [BS08]. For a given group G and an element g ∈ G we denote by gi the element x−i gxi for i ∈ Z. 2 Let H be as in Proposition 2.1. We consider the homomorphism ϕ : H → Z which sends x to 1 and b, y1 , y2 , . . . , yn to 0. For each i ∈ Z let Yi = {bi , y1,i , y2,i , . . . , yn,i }, where yj,i := x−i yj xi . Using the rewriting process of Reidemeister-Schreier, we obtain that the kernel N of ϕ has the presentation N =h [ Yi | bi ui = bi+k (i ∈ Z) i. i∈Z The group N is the free product of the free groups Gi = hYi | i (i ∈ Z) with amalgamation, where Gi and Gi+k are amalgamated over a cyclic group Zi+k that is generated by bi ui in Gi and by bi+k in Gi+k . This gives N = Nt ∗ · · · ∗ Nt+k−1 for all t ∈ Z, where Nl = . . . ∗ Zl−k Gl−k ∗ Gl ∗ Gl+k Zl Zl+k ∗ Zl+2k ... for l ∈ Z. Proposition 2.2. For every i ∈ Z, the group N is free with basis B(i) = {bi , bi+1 , . . . , bi+k−1 } ∪ {ym,j | 1 6 m 6 n, j ∈ Z}. Proof. Since N = Ni ∗ · · · ∗ Ni+k−1 , it suffices to show that each Nl has the basis Bl := {bl } ∪ {ym,l+tk | 1 6 m 6 n, t ∈ Z}. We have Nl = S Nl,p , where Nl,p = Gl−pk p∈N ∗ Zl−(p−1)k . . . ∗ Gl ∗ . . . Zl Zl+k ∗ Zl+pk Gl+pk . Using Tietze trans- formations, one can show that Nl,p is free with basis Bl,p := {bl } ∪ {ym,l+tk | 1 6 m 6 n, −p 6 t 6 p}. S Bl,p . Since Bl,p ⊂ Bl,p+1 , the group Nl is free with basis Bl = p∈N Notation. Let Gi,j = hGi , Gi+1 . . . , Gj i, Gi,∞ = hGl | l > ii and G−∞,i = hGl | l 6 ii for all i, j ∈ Z with i 6 j. Further, we use the b-left basis B + (i) b-right basis B − (i) := := {bi , bi+1 , . . . , bi+k−1 } ∪ {bi−k+1 , bi−k+2 , . . . , bi } ∪ {ym,j | 1 6 m 6 n, j > i} of Gi,∞ and the {ym,j | 1 6 m 6 n, j 6 i} of G−∞,i . Remark 2.3. Let r ∈ N be written as a word in the letters bj , ym,j (1 6 m 6 n, j ∈ Z). For an arbitrary i ∈ Z we describe how to rewrite r in the basis B + (i). First, replace each letter bj of r by bj−k uj−k , if j > i + k − 1, and by bj+k uj−1 , if j < i, and reduce. If the resulting word contains bj that do not belong to B + (i), we repeat this procedure. After finitely many steps, we will obtain the desired form of r. Analogously, we can rewrite r in the basis B − (i). 3 α- and ω-limits We keep using the notation introduced in Section 2. An arbitrary element r ∈ N \ {1} can be written in −1 −1 −1 −1 many ways as a reduced word in letters bi , ym,i . For example, b0 u0 u−1 1 b1 = bk bk+1 = b2k uk uk+1 b2k+1 . We give an algorithm which finds a word r∗ representing r such that the smallest index of letters used 3 in r∗ is maximum possible. We call such index the α-limit of r and denote it by αr . In other words, αr is the largest index such that r is an element of Gαr ,∞ . The following algorithm rewrites an arbitrary word r ∈ N \ {1} into the presentation r∗ of r written in basis B + (αr ) (see Lemma 3.2). For a word r in the alphabet {bi | i ∈ Z} ∪ {ym,i | 1 6 m 6 n, i ∈ Z}, let min(r) denote the minimal index of letters of r. Algorithm 3.1. Let r ∈ N \{1}. Suppose that r is given as a finite word in letters bi , bi+1 , . . . and ym,i , ym,i+1 , . . . (1 6 m 6 n). In particular, r ∈ Gi,∞ . Let r[0] be the reduced word representing r in basis B + (i). Increasing i if necessary, we may assume that i = min(r[0]). (1) Let r[1] be the word obtained from r[0] by replacement of each occurrence of the letter bi by bi+k u−1 followed by free reduction. Then r[1] presents r in the following basis of Gi,∞ : i {bi+1 , bi+2 , . . . , bi+k } ∪ {ym,l | 1 6 m 6 n, i 6 l}. (⋆) (1a) If r[1] does not contain a letter ym,i (1 6 m 6 n), we reset r[0] := r[1], i := min(r[1]), and go back to (1). Clearly, the new i is larger than the old one. (1b) If r[1] contains a letter ym,i (1 6 m 6 n), the algorithm ends with r∗ = r[0] and αr = i. Lemma 3.2. The output r∗ of Algorithm 3.1 coincides with the word representing r in Basis B + (αr ), where αr is the α-limit of r. Proof. We shall prove that the algorithm ends and that the integer assigned to αr by the algorithm is really the α-limit of r. The algorithm ends since the length of r[0] decreases with each iteration of (1) which does not terminate the algorithm. This can be verified in the following way: If we arrive in (1a), then the word r[1] does not contain a letter ym,i (1 6 m 6 n). Recall that r[1] was obtained from r[0] by replacing all bi with bi+k u−1 and reducing the resulting word. The fact that there is no letter ym,i (1 6 m 6 n) left i in r[1] means that each bi in r[0] occurred in a subword of the form bi ui . Therefore r[1] is shorter than r[0]. Finally, we show that r is not an element of Gi+1,∞ , where i as in (1b). Observe that Gi,∞ = Gi+1,∞ ∗ hym,i | 1 6 m 6 ni. By (1b), r, written in basis (⋆), uses a letter ym,i (1 6 m 6 n). Therefore r ∈ / Gi+1,∞ and αr = i. Corollary 3.3. Let r be an element from N \{1} given as a word in some b-left basis. Starting Algorithm 3.1 with r, we either get the same presentation or a presentation of shorter length. Proof. In the proof of Lemma 3.2, we already showed that the length of r[0] in Algorithm 3.1 decreases with each iteration of (1) which does not terminate the algorithm. Moreover, the last iteration of Algorithm 3.1 does not change the current presentation r[0]. 4 Analogously, we can find a presentation r∗ of a word r ∈ N \{1} such that the largest used index of letters in r∗ is minimum possible. We call this index ω-limit of r and denote it by ωr . In other words, ωr is the smallest index such that r is an element of G−∞,ωr . The algorithm to find r∗ can be received from Algorithm 3.1 by “mirroring” this algorithm using the b-right basis of G−∞,i and replacements of bi by bi−k ui−k . We define the α-ω-length of r by ||r||α,ω := ωr − αr + 1. Note that the α-ω-length of a non-trivial element can be non-positive. Examples. −1 −1 (i) Let r = b−2 u−2 y1,0 b4 u−1 1 and k = 3. To determine αr , we write r = b−2 u−2 y1,0 b4 u1 = b1 y1,0 b4 u1 and get αr = 0. For ωr we have r = b−2 u−2 y1,0 b4 u−1 = b−2 u−2 y1,0 b1 u1 u−1 = b−2 u−2 y1,0 b1 1 1 = b−2 u−2 y1,0 b−2 u−2 . Thus, ωr = 0 and ||r||α,ω = 1. Note that r ∈ / Gαr ,ωr = G0 . (ii) Let r = b5 b−1 and k = 4. Clearly, αr = 5. To determine ωr , we write r = b5 b6−1 = b5 u2−1 b−1 6 2 −1 −1 = b1 u1 u2−1 b2−1 = b1 u1 u−1 2 u−2 b−2 . Thus, ωr = 2 and ||r||α,ω = −2. Lemma 3.4. Let r ∈ N . Then αri+j = αri + j and ωri+j = ωri + j for all i, j ∈ Z. In particular, ||ri ||α,ω = ||rj ||α,ω for all i, j ∈ Z. Proof. Indeed, ri+j can be obtained from ri by increasing the (second) indices of all letters by j. Notation. Let r ∈ N . For the following two lemmata, let r(i) be the presentation of r written in basis B(i). Lemma 3.5. Let r ∈ N \{1}. The following statements are equivalent: (1) For some i ∈ Z, the word r(i) begins with a positive power of a b-letter. (2) For all i ∈ Z, the word r(i) begins with a positive power of a b-letter. Proof. The word r(i + 1) can be obtained from r(i), by replacement of each occurrence of bi in r(i) by bi+k u−1 followed by free reduction. The new letter bi+k does not lie in {bi , . . . , bi+k−1 }. That prevents i cancellation between b-letters in r(i+1). Therefore r(i) starts with a positive exponent of a b-letter if and only if r(i + 1) starts with a positive exponent of a b-letter. This proves the equivalence (1) ⇔ (2). Corollary 3.6. For every r ∈ N \{1} there exists a conjugate re of r such that re(i) is cyclically reduced for each i ∈ Z. Proof. Using conjugation, we may assume that r(0) is cyclically reduced. If r(0) contains only y-letters, we are done with the element re represented by r(0). Suppose that r(0) contains a b-letter. Let re be the element represented by a cyclic permutation of r(0) which either starts with a positive power of a b-letter, or ends with a negative power of a b-letter (but not both). By Lemma 3.5, this re has the desired property. Definition 3.7. Let r ∈ N \{1}. Any element re as in Lemma 3.6 is called suitable conjugate for r. 5 −1 ′ Remark 3.8. (dual structure of N ) Denote b′i := b−i u−i , ym,i := ym,−i (1 6 m 6 n) and G′i := G−i . ′ We call the elements b′i , ym,i (1 6 m 6 n) dual to bi , ym,i (1 6 m 6 n) and the subgroup G′i dual to ′−1 (1 6 m 6 n), Gi . Expressing b-letters and y-letters via their dual, we obtain bi = b′−i u′−i , ym,i = ym,−i ′−1 where u′−j (j ∈ Z) is the word obtained from uj by replacing each letter ym,j with ym,−j . That justifies the terminology. Observe that the old relations bi ui = bi+k (i ∈ Z) can be rewritten in dual letters as b′i u′i = b′i+k ′ (i ∈ Z). Thus, the relations preserve their form. Moreover, we have G′i = hb′i , ym,i | 1 6 m 6 ni that repeats the form Gi = hbi , ym,i | 1 6 m 6 ni. Other dual objects can be defined analogously: For example, G′i,∞ := hG′i , G′i+1 . . . i = G−∞,−i and G′−∞,i := h. . . , G′i−1 , G′i i = G−i,∞ . We use the following bases of N (i ∈ Z): ′ B(i)′ = {b′i , b′i+1 , . . . , b′i+k−1 } ∪ {ym,j | 1 6 m 6 n, j ∈ Z}. along with the b′ -left basis B + (i)′ := {b′i , b′i+1 , . . . , b′i+k−1 } b′ -right basis B − (i)′ := {b′i−k+1 , b′i−k+2 , . . . , b′i } ∪ ∪ ′ {ym,j | 1 6 m 6 n, j > i} of G′i,∞ and the ′ {ym,j | 1 6 m 6 n, j 6 i} of G′−∞,i . For r ∈ N \ {1}, let α′r be the largest index i such that r is an element of G′i,∞ and let ωr′ be the smallest index i such that r is an element of G′−∞,i . We denote ||r||α′ ,ω′ := ωr′ − α′r + 1. Lemma 3.9. For any non-trivial r ∈ N the following statements are valid. (1) We have α′r = −ωr , ωr′ = −αr , and ||r||α′ ,ω′ = ||r||α,ω . (2) Suppose that r written in a basis B(i) is cyclically reduced and begins with a positive power of a b-letter. Then r written in the basis B(−i − k + 1)′ is cyclically reduced and begins with a positive power of a b′ -letter. ′−1 Proof. Both statements can be verified straightforward by using the relations bi = b′−i u′−i , ym,i = ym,−i (1 6 m 6 n). 4 Proof of Proposition 2.1 for re with positive α-ω-length 4.1 Properties of re with positive α-ω-length We use the following version of Magnus’ Freiheitssatz: Theorem 4.1 (Magnus’ Freiheitssatz (cf. [Mag30])). Let F be a free group on a basis X, and let g be a cyclically reduced word in F with respect to X, containing a letter x ∈ X. Then the subgroup generated by X\{x} is naturally embedded into the group F/hhgiiF . By abuse of notation, we write A/hhaii instead of A/hhaiiA , where A is a group and a ∈ A. 6 Corollary 4.2. Let re ∈ N be a suitable element. Then we get the embeddings Gαre +1,∞ ֒→ N/hhe r ii and G−∞,ωre −1 ֒→ N/hhe r ii. Proof. By the definition of α-limits, re written in basis B + (αre) contains at least one letter in Yαre , and by Definition 3.7, the suitable element re is cyclically reduced in this basis. We extend B + (αre) to a free basis of N by adding the letters {ym,i | 1 6 m 6 n, i < αre}. The presentation of re will not change by that. Now, Gαre +1,∞ ֒→ N/hhe r ii follows immediately from Theorem 4.1. The other embedding follows analogously. Lemma 4.3. Suppose that r ∈ N satisfies ||r||α,ω > 1. Then r, written in the basis B + (αr ) of Gαr ,∞ , contains at least one letter ym,l with l > ωr . Proof. By assumption, αr 6 ωr . To the contrary, suppose that r ∈ hbαr , bαr +1 , . . . , bαr +k−1 , ym,αr , ym,αr +1 , . . . , ym,ωr −1 | 1 6 m 6 ni. Then, using relations bi = bi−k ui−k , we obtain r ∈ hbαr −k , . . . , bαr −1 , ym,αr −k , ym,αr −k+1 , . . . , ym,ωr −1 | 1 6 m 6 ni. Hence r ∈ G−∞,ωr −1 . A contradiction. 4.2 The structure of some quotients of N This section and the next one are very similar to [BS08, Section 4 and 5], but due to some important changes we cannot skip them. Our aim in this subsection is to present N/hhrei , rei+1 , . . . , rej ii as an amalgamated product. We denote wi = bi ui . Lemma 4.4. Let re ∈ N be a suitable element with ||e r ||α,ω > 1, and let i, j be two integers with i 6 j. We denote s = αrej and t = ωrej − 1. Then we have: (1) N/hhrei , rei+1 , . . . , rej ii ∼ ri , rei+1 , . . . , rej−1 ii = G−∞,t /hhe ∗ Gs,t Gs,∞ /hhe rj ii. wt−k+1 = bt+1 , ... wt = bt+k (2) Gs+1,∞ naturally embeds into N/hhe ri , rei+1 , . . . , rej ii. Before we give a formal proof, we consider an illustrated example. This will help to visualise a lot of technical details in the formulation of lemma. Example. Let k = 4. We consider the element re = re0 = b4 y2,1 y1,3 b0 u0 and the integers i = −1 and j = 2. 7 Algorithm 3.1 applied to re gives αre0 = 1. Its “mirrored” version gives ωre0 = 3. In particular, ||e r ||α,ω = 3. Furthermore, we have s = αre2 = 3 and t = ωre2 − 1 = 4. Then Lemma 4.4 (1) says that N/hhe r−1 , re0 , re1 , re2 ii ∼ r−1 , re0 , re1 ii = G−∞,4 /hhe G3,∞ /hhe r2 ii. ∗ G3,4 w1 w2 w3 w4 = = = = b5 , b6 b7 , b8 In Figure 1, the word re0 = re is pictured by the (partially dashed) line crossing the blocks G0 , . . . , G4 since re uses letters with indices from the segment [0, 4]. We can represent re by the word b4 y2,1 y1,3 b4 that uses letters with indices from the segment [1, 4], and we can represent re by the word b0 u0 y2,1 y1,3 b0 u0 that uses letters with indices from the segment [0, 3]. To visualise the fact that αre0 = 1 and ωre0 = 3, we draw a continuous line crossing the blocks G1 , G2 , G3 . Figure 1: Illustration to Lemma 4.4 for k = 4, re = b4 y2,1 y1,3 b0 u0 , i = −1, and j = 2 Proof. First, we prove that (1) implies (2). By Corollary 4.2, we have Gs+1,∞ ֒→ Gs,∞ /hhe rj ii, and if (1) holds, then we have Gs,∞ /hhe rj ii ֒→ N/hhe ri , rei+1 , . . . , rej ii. The composition of these two embeddings gives (2). Now we prove (1) for fixed i by induction on j. Base of induction. For j = i we shall show N/hhe rj ii ∼ = G−∞,t ∗ Gs,t wt−k+1 = bt+1 , ... wt = bt+k It suffices to show the following claim. 8 Gs,∞ /hhe rj ii. (4.1) Claim. Let P be the subgroup of N generated by Gs,t ∪ {bt+1 , . . . , bt+k }. Then (a) P embeds into G−∞,t and Gs,∞ /hhe rj ii. (b) The abstract amalgamated product in the right side of (4.1) is canonically isomorphic to N/hhe rj ii. Proof of the claim. (a) Clearly, P embeds into G−∞,t . So, we show that P embeds into Gs,∞ /hhe rj ii. Note that P = hYs ∪· · ·∪Yt ∪{bt+1 , . . . , bt+k }i = hbs , bs+1 , . . . , bs+k−1 , ym,s , ym,s+1 , . . . , ym,t | 1 6 m 6 ni. Thus, the group P is generated by the set {bs , bs+1 , . . . , bs+k−1 , ym,s , ym,s+1 , . . . , ym,t | 1 6 m 6 n}. (4.2) This set is a part of the free basis B + (s) of Gs,∞ . By Definition 3.7, rej written in B + (s) is cyclically reduced. Further, by statement (1) of Lemma 4.3, the element rej written in B + (s) contains at least one letter ym,ℓ with 1 6 m 6 n and ℓ > t + 1. In particular, this letter does not lie in the set (4.2). By Magnus’ Freiheitssatz (Theorem 4.1), P embeds into Gs,∞ /hhe rj ii. Now, the amalgamated product in (4.1) is well defined. It is easy to check that the groups written in (4.1) are isomorphic by finding a common presentation. This completes the base of induction. Inductive step i, j → i, j + 1. We need to show the formula, where s = αrej and t = ωrej − 1: N/hhe ri , rei+1 . . . , rej+1 ii ∼ ri , rei+1 , . . . , rej ii = G−∞,t+1 /hhe ∗ Gs+1,t+1 Gs+1,∞ /hhe rj+1 ii. (4.3) wt−k+2 = bt+2 , ... wt+1 = bt+k+1 Let P be the subgroup of N generated by Gs+1,t+1 and the set {bt+2 , bt+3 , . . . , bt+k+1 }. First, we prove that P canonically embeds into both factors. As above P embeds into Gs+1,∞ /hhe rj+1 ii. So we show that P embeds into G−∞,t+1 /hhe ri , rei+1 , . . . , rej ii using the following commutative diagram: by (2)   / Gs+1,∞  P _ ❯ ❯ ❯ ❯ ❯ ❯ ❯ ❯ ❯ ❯ ❯ ❯ϕ ❯  G−∞,t+1 / N/hhe ri , rei+1 , . . . , rej ii O ❯ ❯ ❯ ❯ ❯ ❯ ❯ ❯ ❯* ? / G−∞,t+1 /hhe ri , rei+1 , . . . , rej ii Let ϕ be the composition of the canonical embedding of the subgroup P into G−∞,t+1 and the canonical homomorphism from G−∞,t+1 to the factor group G−∞,t+1 /hhe ri , rei+1 , . . . , rej ii. It remains to prove that ϕ is an embedding. Considering P as a subgroup of Gs+1,∞ and using statement (2) for i, j (recall that (1) implies (2)), we have an embedding of P into N/hhe ri , rei+1 , . . . , rej ii. Since the diagram is commutative, ϕ : P → G−∞,t+1 /hhe ri , rei+1 , . . . , rej ii is an embedding. Again, it is easy to check that the groups in (4.3) are isomorphic. Finally, we need a “mirrored” version of Lemma 4.4: 9 Lemma 4.5. Let re ∈ N be a suitable element with ||e r ||α,ω > 1, and let i, j be two integers with i 6 j. We denote s = αrei + 1 and t = ωrei . Then we have: (1) N/hhrei , rei+1 , . . . , rej ii ∼ ri ii = G−∞,t /hhe ∗ Gs,t Gs,∞ /hhe ri+1 , rei+1 , . . . , rej ii. ws−k = bs , ... ws−1 = bs+k−1 (2) G−∞,t−1 naturally embeds into N/hhe ri , rei+1 , . . . , rej ii. Proof. Due to the dual structure noticed in Remark 3.8, the statements of Corollary 4.2, Lemma 4.3 and Lemma 4.4 also hold for the dual objects. By rewriting the dual version of Lemma 4.4 with the help of Lemma 3.9, we get the desired statement. 4.3 Conclusion of the proof for re with positive α-ω-length By assumption of Proposition 2.1, we have two elements r, s ∈ H with the same normal closure and rx = 0. Thus, r, s are elements of N . By Lemma 3.6, we can choose conjugates re, se of r, s such that re and se are suitable elements. Normal closures are invariant under conjugation. So, without loss off generality, we can replace r, s by re, se. In this section we assume ||e r ||α,ω > 1. Since the normal closures of re and se in H are equal, the normal closures of R := {e ri | i ∈ Z} and S := {e si | i ∈ Z} in N are equal. In particular, se0 is trivial in N/hhRii. Thus, there are indices i, j ∈ Z such that se0 is trivial in N/hhe ri , rei+1 , . . . , rej ii. We choose a pair i, j with this property and j − i minimal. By Lemma 4.4 (1), we have rj ii ri , rei+1 , . . . , rej−1 ii ∗ Gαrej ,∞ /hhe N/hhe ri , rei+1 , . . . , rej ii ∼ = G−∞,ωrej −1 /hhe A (4.4) for some subgroup A. Lemma 4.6. Suppose that ||e r ||α,ω > 1. Then (1) ωes0 > ωrej > ωrei , (2) αes0 6 αrei 6 αrej , (3) ||e s||α,ω > ||e r ||α,ω . Proof. (1) We prove ωes0 > ωrej . Suppose the contrary. Then se0 ∈ G−∞,ωrej −1 . Since se0 is trivial in N/hhe ri , rei+1 , . . . , rej ii, it is also trivial in the left factor of the amalgamated product (4.4). There- fore, se0 is trivial in N/hhe ri , rei+1 , . . . , rej−1 ii. This contradicts the minimality of j − i. The inequality ωrej > ωrei follows by Lemma 3.4 since j > i. Inequalities (2) can be proved analogously with the help of Lemma 4.5 (1). Inequality (3) follows straightforward from (1) and (2). Since ||e s||α,ω > ||e r ||α,ω > 1, we have ||e r ||α,ω > ||e s||α,ω by symmetry and therefore ||e s||α,ω = ||e r ||α,ω . By Lemma 3.4, this is equivalent to ||e s0 ||α,ω = ||e ri ||α,ω . This and the first two statements of Lemma 4.6 imply that αes0 = αrei = αrej , and ωrej = ωrei = ωes0 , in particular, j = i. Therefore, se0 is trivial in N/hhe ri ii, and the index i is determined by αes0 = αrei . One can prove in the same way that rei is trivial in N/hhe s0 ii. 10 Thus, hhe s0 iiN = hhe ri iiN . From Section 2 we know that N is a free group. So by Theorem 4.1, se0 is conjugate to rei±1 in N . Finally, re is conjugate to se±1 in H, and the proof of Proposition 2.1 in the case ||e r ||α,ω > 1 is completed. 5 Proof of Proposition 2.1 for re with non-positive α-ω-length 5.1 Properties of re with non-positive α-ω-length Lemma 5.1. Let r be an element in N with ||r||α,ω < 1. Then the reduced word representing r in basis B + (αr ) contains only bi ’s. Proof. We have ωr < αr . By definition, r ∈ G−∞,ωr and r ∈ Gαr ,∞ . • Let r− be the reduced word representing r in the basis B − (ωr ) of G−∞,ωr . Recall that B − (ωr ) = {bi | i ∈ I} ∪ {ym,ℓ | 1 6 m 6 n, ℓ 6 ωr }, where I = {ωr − k + 1, . . . , ωr }. • Let r+ be the reduced word representing r in the basis B + (αr ) of Gαr ,∞ . Recall that B + (αr ) = {bj | j ∈ J} ∪ {ym,ℓ | 1 6 m 6 n, ℓ > αr }, where J = {αr , . . . , αr + k − 1}. For each i ∈ I, there is a unique j ∈ J such that j ≡ i mod k. Then r+ can be obtained from r− by −1 −1 replacements of all letters bi by bj uj−k uj−2k . . . u−1 followed by reduction (see Remark 2.3). The second i indices of y-letters appearing in these replacements lie in the interval (−∞, max J − k] = (−∞, αr − 1]. The second indices of y-letters of r− lie in the interval (−∞, ωr ] ⊆ (−∞, αr − 1]. Therefore, the second indices of y-letters of r+ (if exist) lie in (−∞, αr − 1]. Hence, r+ does not have y-letters. 5.2 Conclusion of the proof for re with non-positive α-ω-length As in Section 4.3, we can replace the elements r, s ∈ N from Proposition 2.1 by suitable elements re, se. In this section, we consider the case ||e r ||α,ω < 1. Assuming ||e s||α,ω > 1, we immediately get a contradiction by applying Lemma 4.6 with reversed roles of re and se. Thus, we have ||e s||α,ω < 1. By Lemma 5.1, there are presentations of re and se in N which use only bi , i ∈ Z. So by means of the relations bi = x−i bxi , we get presentations of re and se as elements in H = hx, b, y1 , . . . , yn | [xk , b]ui that only use x and b. e where H e is the subgroup of H generated by x and b. We have the presentations Thus, re, se ∈ H, e = hx, bi ∼ e H = F2 and H = H 11 ∗ [xk ,b]=u−1 hym | 1 6 m 6 ni, (5.1) where F2 is the free group in two generators and the isomorphism to F2 follows from the Magnus’ Freiheitssatz. e let ((h)) be the normal closure of h in H e and let hhhii be the normal closure Convention. For h ∈ H, of h in H. e → H/((e e r )). There are two cases: Consider the canonical homomorphism ι : H Case 1. [xk , b]p ∈ / ((e r )) for all p > 1. e → H/((e e r )) is an embedding. We identify the subgroup h[xk , b]i of H e with its In this case ι |h[xk ,b]i : H e r )). Then image in H/((e H/hhe r ii e r )) = hx, b, y1 , . . . , yn | [xk , b]u, rei = H/((e ∗ [xk ,b]=u−1 e r )) ∗ Fn . hym | 1 6 m 6 ni = H/((e Z Case 2. [xk , b]p ∈ ((e r )) for some p > 1. We choose the smallest p with this property. Using Tietze transformations, we write: H/hhe r ii = = hx, b, y1 , . . . , yn | [xk , b]u, re i = hx, b, y1 , . . . , yn | [xk , b]u, re, [xk , b]−p i e r )) hx, b, y1 , . . . , yn | [xk , b]u, re, up i = H/((e ∗ [xk ,b]=u−1 hy1 , . . . , yn | up i. e r )) ֒→ H/hhe Thus, in both cases, we have the embedding H/((e r ii. e of H. Further, se is trivial in H/hhe We already know that se is an element of the subgroup H r ii since e r )) ֒→ H/hhe e r )). By hhe r ii = hhe sii. Now, we use the embedding H/((e r ii to conclude that se is trivial in H/((e e s)), and we get ((e symmetry, re is trivial in H/((e r )) = ((e s)). e is isomorphic to the free group of rank 2, and this group As we have seen in (5.1), the group H e and since H e ֒→ H, the possesses the Magnus property (cf. [Mag30]). Hence, re is conjugate to se±1 in H, element re is conjugate to se±1 in H. Acknowledgements. This work is based on my M.Sc. thesis, Heinrich Heine Universität Düsseldorf, 2015. I would like to express my special thanks to my supervisor Professor Oleg Bogopolski for the subject proposal and the support during and after the preparation of my M.Sc. thesis. I also want to thank Professor Benjamin Klopsch for his editorial help. References [Bog05] O. Bogopolski. A surface group analogue of a theorem of Magnus. In Geometric Methods in Group Theory, pages 59–69. Contemp. Math., Bd. 372, Amer. Math. Soc., Providence, Rl, 2005. [BS08] O. Bogopolski and K. Sviridov. A Magnus theorem for some one-relator groups. Geometry & Topology Monographs, 14:63–73, 2008. 12 [CG05] C. Champetier and V. Guirardel. Limit groups as limits of free groups: compactifying the set of free groups. Israel Journal of Mathematics, 146(1), 2005. [Edj89] M. Edjvet. A Magnus theorem for free products of locally indicable groups. Glasgow Mathematical Journal, 31:383–387, 1989. [How81] J. Howie. On pairs of 2-complexes and systems of equations over groups. Journal für die reine und angewandte Mathematik, 324:165–174, 1981. [How04] J. Howie. Some results on one-relator surface groups. Boletı́n de la Sociedad Matemática Mexicana, 10(3):255–262, 2004. [Mag30] W. Magnus. Über diskontinuierliche Gruppen mit einer definierenden Relation. (Freiheitssatz). Journal für die reine und angewandte Mathematik (Crelles Journal), 163:141–165, 1930. 13
4math.GR
Distributed Computing Made Secure: A New Cycle Cover Theorem∗ arXiv:1712.01139v2 [cs.DS] 23 Feb 2018 Merav Parter Eylon Yogev† Abstract In the area of distributed graph algorithms a number of network’s entities with local views solve some computational task by exchanging messages with their neighbors. Quite unfortunately, an inherent property of most existing distributed algorithms is that throughout the course of their execution, the nodes get to learn not only their own output but rather learn quite a lot on the inputs or outputs of many other entities. This leakage of information might be a major obstacle in settings where the output (or input) of network’s individual is a private information (e.g., distributed networks of selfish agents, decentralized digital currency such as Bitcoin, voting systems). While being quite an unfamiliar notion in the classical distributed setting, the notion of secure multi-party computation (MPC) is one of the main themes in the Cryptographic community. Yet despite all extensive work in the area, no existing algorithm fits the framework of classical distributed models in which there are no assumptions on the graph topologies and only messages of bounded size are sent on the edges in each round. In this paper, we introduce a new framework for secure distributed graph algorithms and provide the first general compiler that takes any “natural” non-secure distributed algorithm e · D · poly(∆)) rounds that runs in r rounds, and turns it into a secure algorithm that runs in O(r where ∆ is the maximum degree in the graph and D is its diameter. We also show that this is nearly (existentially) optimal for any round-by-round compiler for bounded degree graphs. The main technical part of our compiler is based on a new cycle cover theorem: We show that the edges of every bridgeless graph G of diameter D can be covered by a collection of cycles e e such that each cycle is of length O(D) and each edge of the graph G appears in O(1) many cycles. ∗ Department of Computer Science and Applied Mathematics, Weizmann Institute of Science, Rehovot 76100, Israel. Emails: {merav.parter,eylon.yogev}@weizmann.ac.il. † Supported in part by grants from the Israel Science Foundation grant no. 950/16. Contents 1 Introduction 1.1 Our Approach and Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.1.1 From Security Requirements to Graph Structures . . . . . . . . . . . . . . . . 1.1.2 Secure Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 2 4 2 Our Techniques 2.1 Low Congestion Cycle Covers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 From Low Congestion Covers to Secure Simulation . . . . . . . . . . . . . . . . . . . 5 5 8 3 Preliminaries and Model 10 3.1 Distributed Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.2 Cryptography with Perfect Privacy . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4 Low-Congestion Covers 4.1 Cycle Cover . . . . . . . . . . . . 4.1.1 Covering Non-Tree Edges 4.1.2 Covering Tree Edges . . . 4.2 Private Neighborhood Trees . . . . . . . . . . . . . . . 5 Secure Simulation via Low-Congestion 5.1 Our Framework . . . . . . . . . . . . . 5.2 Secure Simulation of a Single Round . 5.3 The Final Secure Algorithm . . . . . . . . . . 13 13 13 19 27 Covers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 30 31 33 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Distributed Computation of Low Congestion Covers 6.1 Cycle Cover . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1.1 Distributed Algorithm for Covering Non-Tree Edges 6.1.2 Analysis of Algorithm DistNonTreeCover . . . . . . . 6.1.3 Distributed Algorithm for Covering Tree Edges . . . 6.2 Additional Low Congestion Covers . . . . . . . . . . . . . . 6.3 Pre-processing for Improved Cover Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 35 36 41 45 47 48 7 Discussion and Future Work 48 A Balanced Partitioning of a Tree 53 B Missing Details for Algorithm DistCycleCover 53 2 1 Introduction In distributed graph algorithms (or network algorithms) a number of individual entities are connected via a potentially large network. Starting with the breakthrough by Awerbuch et al. [AGLP89], and the seminal work of Linial [Lin92], Peleg [Pel00] and Naor and Stockmeyer [NS95], the area of distributed graph algorithm is growing rapidly. Recently, it receives considerably more theoretical and practical attention motivated by the spread of multi-core computers, cloud computing, and distributed databases. We consider the standard synchronous message passing model where in each round O(log n) bits can be transmitted over every edge where n is the number of entities (the CONGEST model). The common principle underlying all distributed algorithms (regardless of the model specification) is that the input of the algorithm is given in a distributed format, and consequently the goal of each vertex is to compute its own part of the output, e.g., whether it is a member of a computed maximal independent set, its own color in a valid coloring of the graph, its incident edges in the minimum spanning tree, or its chosen edge for a maximal matching solution. In most distributed algorithms, throughout execution, vertices learn much more than merely their own output but rather collect additional information on the input or output of (potentially) many other vertices in the network. This seems inherent in many distributed algorithms, as the output of one node is used in the computation of another. For instance, most randomized coloring (or MIS) algorithms [Lub86, BE13, BEPS16, HSS16, Gha16, CPS17] are based on the vertices exchanging their current color with their neighbors in order to decide whether they are legally colored. In cases where the data is sensitive or private, these algorithms may raise security concerns. To exemplify this point, consider a voting task for a distributed network, where the goal is to elect the candidate with most votes in the network. This is a rather simple distributed task: construct a BFS tree and let the nodes send the votes from the leaves to the root where each intermediate node sends to its parent in the tree, the sum of all votes for each candidate. While the output goal has been achieved, privacy has been compromised as intermediate nodes learn more information regarding the votes of their subtrees. As privacy in election processes is a fundamental property of any “democratic system”, it is desirable to design a secure distributed voting algorithm, in which information of other nodes’ votes do not get revealed throughout the course of execution. Additional motivation for secure distributed computation are settings that involve private medical data, networks of selfish agents with private utility functions or even decentralized digital currency such as the Bitcoin. Whereas much effort in recent years has been devoted to improving the round complexities of various distributed algorithms, e.g., coloring, MIS, Lovász Local lemma [Suo13, BEK14, FHK16, BEPS16, Gha16, CPS17, CHL+ 17] and many more, the challenge of making these algorithms secure – was left behind. To this point, we have no distributed algorithms for general graphs in the standard CONGEST model that are secure and efficient compared to their non-secure counterparts. While being a rather virgin objective in the distributed graph algorithm setting, the notion of secure multi-party computation (MPC) is one of the main themes in the Cryptographic community. The goal of an MPC protocol is to allow parties to jointly compute a function of their inputs without revealing any about their input except the output of the function. There has been tremendous work on MPC protocols, from general feasibility results [Yao82, GMW87, BGW88, CCD88] to efficient protocols for specific functionalities [BNP08, BLO16]. Despite the large progress, almost all prior protocols require a private channel between every two nodes in the network in order to secure 1 compute the desired function. This, of course, defeats the whole purpose of distributed computing. Only a handful of works have considered a general graph interaction patterns [HLP11, HIJ+ 16, GGG+ 14, BGI+ 14], or locality of MPC protocols [BGT13, CCG+ 14, BIPW17]. Unfortunately, they all have many major drawbacks: they rely on heavy computational assumptions (e.g., obfuscation), they assume a trusted setup phase (which is often not reusable), they require many rounds of interaction, they do not obey bandwidth limitations and they assume specific interaction patterns (e.g., star topology). Despite some common interests, up to this point, both areas of distributed graph algorithms and secure multi-party computation have been developed in almost total isolation, each in its own community with different requirements and goals in mind. The distributed area puts most emphasis on locality, while the study of MPC focuses mostly on security. In this paper, we aim towards bridging this gap and combine the goods from both worlds, by tackling the following question: How to design distributed algorithms that are both efficient (in terms of round and bandwidth complexity) and secure (where nothing is learned but the desired output)? One tedious way to attack this challenge is to go through the most popular distributed problems (e.g., coloring, MIS, matching) and design a secure distributed algorithm for each of them one by one. Much more desirable, however, is to have a general recipe for adding security to existing algorithms, while incurring a small overhead in the round complexity. Towards this end, we introduce the first general compiler that can take any (possibly insecure) distributed algorithm to one that has perfect security (a notion that will be explained next). The compiled algorithm respects the same bandwidth limitations, relies on no setup phase nor on any computational assumption and works for (almost) any graph, while paying an overhead in the number of rounds, to the extent that it is almost existentially needed. This quite general and powerful framework is made possible due to fascinating connections between “secure cryptographic definitions” and natural combinatorial graph properties. Most notably is the cycle cover of a graph. While cycle covers have been studied in the literature, e.g., the wellknown double cycle cover conjecture by Szekeresand and Seymour [JT92]; the Chinese postman problem by Edmond [EJ73], none of the known results satisfy our requires. Instead, we prove a new theorem regarding cycle covers with low congestion which we foresee being of independent interest and exploited in future work. 1.1 Our Approach and Results 1.1.1 From Security Requirements to Graph Structures We demonstrate our approach with a simple example. Let G be an n-vertex graph. Suppose that each vertex u has an input xu and that each pair of neighbors u, v in the graph (with inputs xu , xv ) wishes to compute a function f (xu , xv ) securely, i.e., each party should learn the output f (xu , xv ) but “nothing more” (the precise notion of security will be later elaborated). Kushilevitz [Kus89] showed that almost all (non-trivial) functions cannot be computed between u and v with this notion of privacy, and this was generalized for weaker notions of (information theoretic) privacy as well [FJS14]. To circumvent these barriers, Feige, Kilian and Naor [FKN94] (later generalized by [IK97]) suggested a “minimal model” called PSM1 where a third party, s, aids 1 The term PSM stands for Private Simultaneous Messages. 2 the computation. In the model, u and v share private randomness (not known to s) and each sends a single message to s which depends on its own input and the shared randomness. This allows s to compute the output f (x, y) while learning nothing more. In this paper we introduce Distributed PSM protocols which generalize the standard two party PSM protocols to general graphs. To provide secure communication between neighboring nodes u, v, we need to find a third node s in the graph so that both u and v can communicate with s without seeing each other’s messages. This requirement translates into covering the edge (u, v) with a cycle containing the edge. The number of rounds of the protocol (e.g., sending messages on the cycle to w) is proportional to the length of the cycle. Furthermore, as we wish to run such a protocol for all edges of the graph simultaneously, we need to cover all edges in the graph while having each individual edge participating in a small number of cycles (this is desirable since the bandwidth is limited). Low Congestion Covers. These requirements motivate the genuine definition of (d, c)-cover C which is a collection of cycles of length at most d such that each edge appears at least once and at most c many times on each of the cycles (the congestion of the cover). Given a (d, c)-cycle cover, we can have all vertices of the graph compute a function f (xu , xv ) for every edge in the e + c) rounds2 (in the CONGEST models). A-priori, it is not clear that graph simultaneously in O(d cycle covers that enjoy both low congestion and short lengths even exist, nor if it is possible to efficiently find them. Perhaps quite surprisingly, we prove the following theorem regarding cycle e is the “Big O” cover. Throughout, we will have an n-vertex graph G and use the notation O notation that hides polylog(n) factors. Theorem 1 (Low Congestion Cycle Cover). Every 2-edge connected graph with diameter D has a e e (d, c)-cycle cover where d = O(D) and c = O(1). That is, the edges of G can be covered by cycles such that each cycle is of length at most d and each edge participates in at most c cycles. We note that this theorem is existentially tight, in the sense that the Θ(D) factor is necessary (consider a cycle graph). Although several variants of cycle cover problems have been considered in the literature, none of them fit our objective of having both short cycles and small congestion. For instance the k-cycle cover problem aims to minimize only the congestion, i.e., restricting each edge to appear on at most k cycles while allowing arbitrary long cycles. On the other hand, in the minimum cycle cover problem that objective is minimize the total length of all cycles in the cover (i.e., instead of minimizing the length of the longest cycle as in our setting) [Fan97]. In order to use these covers in our compiler, we build them once, in a prepossessing step, e + D · ∆) rounds and show that the covers of Theorem 1 can be constructed distributively in O(n (see Lemma 7 and corollary 3). Alternatively, in Section 6 we also provide a much more efficient distributed construction on the expense of having somewhat worse bounds in the quality of the output covers. Theorem 2 (Distributed Low Congestion Cycle Cover). For every 2-edge connected graph G with e 1/ ·D), O(n e  )) diameter D and every  ∈ [0, 1], there is a distributed algorithm that constructs a (O(4 e 1/ · D + n ) rounds. cycle cover in O(4 Our low congestion cycle cover turns out to be a building block for constructing another, more complex, covers which we need in our final secure compiler. We call this building block a private 2 e notation hides polylog(n) factors where n is the number of vertices in the graph. The O(·) 3 neighborhood trees. Roughly speaking, the private neighborhood tree collection of a biconnected graph G = (V, E) is a collection of n trees, one per node ui , where each tree T (ui ) ⊆ G \ {ui } contains all the neighbors of ui but do not contain ui . Intuitively, the private neighborhood trees allow all neighbors Γ(ui ) of all nodes ui to exchange a secret without ui . Note that these covers exists if and only if the graph is 2-vertex connected3 . Similarly to low-congestion cycle covers, we define (d, c)-private neighborhood trees in which each tree T (ui ) has depth at most d and each edge e + c) rounds. belongs to at most c many trees. This allows us to use all trees simultaneously in O(d Theorem 3 (Private Neighborhood Trees). Every biconnected graph with diameter D and maxie e mum degree ∆, has a (d, c)-private neighborhood trees for d = O(D · ∆) and c = O(D). Finally, this covering structures can be constructed also distributively by extending the constructions of low-congestion cycle covers (see Lemma 6 in Section 6). 1.1.2 Secure Simulation The Security Notion. With this graph framework in mind, we return to our original goal of constructing secure distributed algorithms. We want to design an algorithm in which every node u learns its desired output but does not learn anything else about the inputs and outputs of the rest of the nodes in the graph. In our framework, the topology of the graph is not considered private and is not protected by our security notion. While there are many possible ways to define this kind of privacy, we use the strongest possible notion of perfect privacy which is information theoretic and relies and no computation assumptions. This notion uses the existence of an (unbounded) simulator, with the following intuition: a node learns nothing, except its own output y, from the messages it receives throughout the execution of the algorithm, if a simulator can produce the same output while receiving only y and the graph G. We achieve security in what is known as the “semi-honest” model, where the adversary, acting as one of the nodes in the graph, is not allowed to deviate from the prescribed protocol, but can run arbitrary computation given all the messages it received. Moreover, we assume that the adversary does no collude with other nodes in the graph. It is possible to extend the security notion to include these notions, more on this is discussed at Section 7. The General Compiler. In a distributed algorithm, every node has a state and in each round, it updates its state by applying a local function f that depends on the messages it has received from its immediate neighbors. Theorems 1 and 3 provide the required graph framework for computing this function f in a secure and efficient manner (using a distributed PSM) for all nodes in the graph simultaneously. The communication complexity of the secure protocol depends on the computational complexity of the function f . In almost all distributed algorithms, the local update function f can be computed in polynomial time and as a result the communication overhead of the secure protocol is negligible. We call this family of functions natural and for simplicity of presentation we state our results for natural distributed algorithms. Finally, we can state our main result: any natural distributed algorithm can be compiled to an equivalent one (that is one that has the same output for each node) that is secure. Theorem 4 (Secure Simulation). Let G be a 2-vertex connected n-vertex graph with diameter D and maximal degree ∆. Let A be a natural distributed algorithm that runs on G in r rounds. Then, A 3 A graph G = (V, E) is 2-vertex connected if for all u ∈ V the graph G0 = (V \ {u}, E) is connected. 4 e can be transformed to an equivalent algorithm A0 with perfect privacy which runs in O(rD ·poly(∆)) e rounds, using O(n + D · ∆) rounds of pre-processing. We note that our compiler works for any distributed algorithm rather than only on natural ones. The number of rounds will be proportional to the space complexity of the algorithm (an explicit statement for any algorithm can be√ found in Remark 1). Moreover, to avoid the preprocessing step, √ e · 2 log n · D · poly(∆)) one can use Theorem 2 with  = 1/ log n, to get a secure simulation with O(r rounds (with no preprocessing). We observe that the barrier of [Kus89] can be extended to a cycle graph, which shows that the linear dependency in D in the round complexity of our compiler is existentially unavoidable. Our results are summarized in Figure 1. Applications for Known Distributed Algorithms. Theorem 4 enables us to compile almost all of the known distributed algorithms to a secure version of them, examples include computing majority of votes as well as many other examples which we briefly mention next. It is worth noting that deterministic algorithms for problems in which the nodes do not have any input cannot be made secure by our approach since these algorithms only depend on the graph topology which we do not try to hide. Our compiler is meaningful for algorithms where the nodes have input or for randomized algorithms which define a distribution over the output of the nodes. For instance, whereas the deterministic coloring algorithms cannot be made secure, the randomized coloring algorithms (see e.g., [BE13]) which sample a random legal coloring of the graph can be made secure. Specifically, we get a distributed algorithm that (legally) colors a graph (or computes a legal configuration, in general), while the information that each node learns at the end is as if a centralized entity ran the algorithm for the entire network, and revealed each node’s output privately (i.e., revealing v the final color of v). MIS, Coloring, Matching and More. Our approach captures global (e.g., MST) as well as many local problems [NS95]. The MIS algorithm of Luby [Lub86] along with our compiler yields e O(D · poly(∆)) secure algorithm according to the notion described above. Slight variations of this algorithm also gives the O(log n)-round (∆ + 1)-coloring algorithm (e.g., Algorithm 19 of [BE13]). Combining it with our compiler we get a secure (∆ + 1)-coloring4 algorithm with round complexity e · poly(∆)). Using the Matching algorithm of Israeli and Itai [II86] we get an O(D e · poly(∆)) of O(D secure maximal matching algorithm. Finally, another example comes from distributed algorithms for the Lovász local lemma (LLL) which receives a lot of attention recently [BFH+ 16, FG17, CP17] for the class of bounded degree graphs. Using [CPS17], most of these (non-secure) algorithms for e defective coloring, frugal coloring, and list vertex-coloring can be made secure within O(D) rounds. 2 Our Techniques 2.1 Low Congestion Cycle Covers We give an overview of our low congestion cycle cover of Theorem 1. Let G = (V, E) be a 2-edge connected n-vertex graph with diameter D. We begin by observing that all but 2n of the edges in the graph can be covered by edge-disjoint cycles of length at most log n. Since the girth of any graph with at least 2n edges is log n, we can repeatedly add a short cycle (up to length log n) to the collection and remove it from the graph. The main challenge is in covering these last 2n edges, 4 We observe that Algorithm 19 of [BE13] can implemented with O(log ∆) memory. 5 Cycle Cover (Theorem 1) Private-Neighborhood-Trees (Theorem 3) Secure Distributed Algorithm (Theorem 4) Figure 1: An illustrated summary of our results. as these edges might be arbitrary with potentially a large diameter. The remaining 2n are covered as follows. We construct a BFS tree T in the graph G. All the remaining uncovered edges in the graph are either tree edges or non-tree edges. Our cover consists of two procedures, where the first constructs a low congestion cycle cover for the non-tree edges and the second covers the tree edges. Covering the Non-Tree Edges. Let E 0 be the set of uncovered non-tree edges. The main difficulty in covering E 0 stems from the fact that the diameter5 of G \ T might be large (e.g., Ω(n)). Hence, to cover the edges of E 0 by short cycles, one must use the edges of T . A naı̈ve approach is to cover every edge e = (u, v) in E 0 by taking its fundamental cycle in T (i.e., using the u-v path in T ). Although this yields short cycles, the congestion on the tree edges might become Ω(n). The key challenge is to use the edges of T (as we indeed have to) in a way that cycles enjoy the small e diameter of the graph while not overloading any tree edge more than O(1) times. Our approach is based on using the tree T edges only for the purpose of connecting nodes that are somewhat close to each other, and thus the path between them should not occupy too many edges of the tree. To realize this approach, we define a specific way of partitioning the nodes of the tree T to blocks according to E 0 . In a very rough manner, a block would consist of a set of nodes that have few incident edges in E 0 . To define these blocks, we number the nodes based on postorder traversal in T and partition them into blocks containing nodes with consecutive numbering. The density of a block B is the number of edge in E 0 with one endpoint in B. The blocks are partitioned such that no block has large density (at most some constant), and moreover, the number of blocks is not too large (say, at most n/8). The only exception is a block containing a single node, in such a case its density can be unbounded (i.e., even Ω(n)). The end goal is to connect nodes by their tree path only if they reside in the same block. We then consider the contracted graph obtained by contracting all nodes in a given block into 5 The graph G \ T might be disconnected, when referring to its diameter, we refer to the maximum diameter in each connected component of G \ T . 6 one supernode and connecting two supernodes B1 and B2 , if there is an edge in E 0 whose one endpoint is in B1 , and the other endpoint is in B2 . This graph is in fact a multigraph, that might contain self-loops or multi-edges. The key idea is that the contracted graph contains only n0 = n/8 nodes, and hence we can reuse the girth approach from before, and repeatedly find short cycles (length log n0 ) in it until we are left with at most 2n0 = n/4 edges. These cycles are translated to cycles in the origin graph G by using the tree paths π(u, v, T ) between nodes u, v belonging to the same supernode (block). Our key insight is that eventhough paths between two nodes in a block might be long, we show that every tree edge is “used” by at most two blocks. That is, for each edge e of the tree, there are at most 2 blocks such that the tree path π(u, v) of nodes u, v in the block passes through e. (If a block has only a single node, then it will use no tree edges.) Since the blocks have constant density, we are able to bound the congestion on the edge e. The translation of cycles in the contracted graph to cycles in the original graph yields O(D log n)-length cycles in the original graph where every edge belongs to O(1) cycles. The above step already covered all but 2n0 = n/4 edges. We continue this process log n times until all edges of E 0 are covered, and thus get a log n factor in the congestion. We note that while producing short cycles of small congestion that cover all the non-tree edges with low congestion, these cycles might be non-simple. To handle that, we add an additional “cleanup” step (procedure SimplifyCycles) which takes the output collection of non-simple cycles and produces a collection of simple ones. In this process, some of the edges in the non-simple cycles might be omitted, however, we prove that only tree edges might get omitted and all non-tree edges remain covered by the simple cycles. This concludes the high level idea of covering the non-tree edges. We note the our blocking definition is quite useful also for distributed implementations. The reason is that although the blocks are not independent, in the sense that the tree path connecting two nodes in a given block pass through other blocks, this independence is very limited. The fact that each tree edge is used in the tree paths for only two blocks allows us also the work distributively on many blocks simultaneously (see Section 6). Covering the Tree Edges. Covering the tree edges turns out to be the harder case where new ideas are required. Specifically, whereas in the non-tree edge our goal is to find cycles that use the tree edge as rarely as possible, here we aim to find cycles that cover all edges in the tree, but still avoiding a particular tree edge from participating in too many cycles. The algorithm for covering the tree edges is recursive, where in each step we split the tree into two edge disjoint subtrees T1 , T2 that are balanced in terms of number of edges. To perform a recursive step, we would like to break the problem into two independent subproblems, one that covers the edges of T1 and the other that covers the edges of T2 . However, observe that there might be edges (u, v) ∈ T1 where the only cycle that covers them6 passes through T2 (and vice versa). For every such node u ∈ T1 , let s(u) be the first node in T2 that appears on the fundamental cycle of the edge (u, v). To cover these tree edges, we employ two procedures, one on T1 and the other on T2 that together form the desired cycles (for an illustration, see Figures 9 and 11). First, we mark all nodes u ∈ T1 such that their s(u) is in T2 . Then, we use an Algorithm called TreeEdgeDisjointPath (see Lemma 4.3.2 [Pel00]) which solves the following problem: given a rooted tree T and a set of 2k marked nodes M ⊆ V (T ) for k ≤ n/2, find a matching of these vertices hui , uj i into pairs such that the tree paths π(ui , uj , T ) connecting the matched pairs are edge-disjoint. 6 Recall that the graph G is two edge connected. 7 We employ Algorithm TreeEdgeDisjointPath on T1 with the marked nodes as described above. Then for every pair ui , uj ∈ T1 that got matched by Algorithm TreeEdgeDisjointPath, we add a virtual edge between s(ui ) and s(uj ) in T2 . Since this virtual edge is a non-tree edge with both endpoints in T2 , we have translated the dependency between T1 and T2 to covering a non-tree edge. At that point, we can simply use Algorithm NonTreeCover on the tree T2 and the non-virtual edges. This computes a cycle collection which covers all virtual edges (s(ui ), s(uj )). In the final step, we replace each virtual edge (s(ui ), s(uj )) with the edge disjoint tree path hui , uj i and the paths between ui and s(ui ) (as well as the path connecting uj and s(uj )). This above description is simplified and avoids many details and complications that we had to address in the full algorithm. For instance, in our algorithm, a given tree edge might be responsible for the covering of up to Θ(D) many tree edges. This prevents us from using the edge disjoint paths of Algorithm TreeEdgeDisjointPath in a naı̈ve manner. In particular, our algorithm has to avoid the multiple appearance of a given tree edge on the same cycle as in such a case, when making the cycle simple that tree edge might get omitted and will no longer be covered. See Section 4.1 for the precise details of the proof, and see Figure 2 for a summary of our algorithm. Algorithm CycleCover(G = (V, E)) 1. While there is a cycle of uncovered edges of length at most log n, add it to C. 2. Construct a BFS tree T of G. e ⊆ E be the subset of all uncovered non-tree edges. 3. Let E 4. Repeat log n times: e (a) Partition the nodes of T with block density b with respect to E. e for t ≤ log n such that for all i ∈ [t−1], (b) While there are t edges (u1 , v1 ), . . . , (ut , vt ) ∈ E vi and ui+1 are in the same block and vt and u1 are in the same block (with respect to the partitioning B): Add the cycle u1 → v1 → π(v1 , u2 ) → v2 → π(v2 , u3 ) → v3 → . . . → vt → u1 to C. 5. C ← C ∪ TreeEdgeCover(T ) (see Figure 12). 6. Output SimplifyCycles(C). Figure 2: Procedure for covering non-tree edges. 2.2 From Low Congestion Covers to Secure Simulation Consider an r-round distributed algorithm A. In a broad view, A can be considered as a collection of r functions f1 , . . . , fr . At round i, a node u holds a state σi and needs to update its state according to a function fi that depends on σi and the state of its immediate neighbors. We assume that the final state σr is the final output of the algorithm for node u. Our goal is to simulate this process of computing σ1 , σ2 , . . . , σr , however, in an oblivious way without knowing any σi except the last one σr which contains the final output. Thus, we will have 8 the node u hold an “encrypted” state, σ bi , instead of the actual state σi . This encryption uses a a random mask R such that σ bi ⊕ R = σi . The key R will be chosen by an arbitrary neighbor v. The neighbors of u, in turn, hold an encrypted version of messages they would send u in order for him to compute the next state. The key for this encryption is chosen by u itself. Thus, the information required in order to compute the function fi is now spread out among u and its neighbors. Define a related function fi0 to be a function that gets an encrypted state of u and its neighbors and the corresponding keys. Then the function decrypts the states, computes fi and finally re-encrypts the new state using a new encryption key. Our goal is to enable u to compute the function fi0 that depends on its neighbors while learning but the output. Actually, we need all nodes u ∈ V to be able to compute fi0 simultaneously. To achieve this, we use a PSM protocol where u is the server and its neighbors are the parties. The first step of a PSM protocol, is for all parties to share private common randomness (not known to u). This is exactly the reason for introducing the notion of private neighborhood trees. Using these trees, each neighborhood can communicate privately, and moreover, this can be done for all nodes simultaneously (with independent randomness for each neighborhood), with low congestion on the edges. The number of rounds is proportional to the depth of the private trees. Our secure compiler works round by round, where all nodes in the graph apply the PSM protocol for every round of the original algorithm A. After securely simulating all the rounds of A, each node holds an encrypted version of the last state, which contains nothing but the desired output. The neighbors of each node u send it the encryption key (keys used solely for the last encryption), this allows u to decrypt and obtain the final output of the algorithm. As a result, each node u sees only perfectly encrypted states along the whole duration of the algorithm, where it proceeds from one state to the other using the PSM protocol. The security of the PSM protocol ensures that it learns nothing but the next encrypted state. A summary of the algorithm for a single node u is given in Figure 3. The description of the simulation of algorithm A with respect to u. 1. For each round i = 1 . . . r do: (a) u holds the encrypted state σbi . (b) A neighbor v of u samples new encryption keys. (c) Run a distributed PSM protocol for with server u to compute the next state of u: i. u sends its state σbi to a neighbor v 0 6= v. ii. Neighbors use the private neighborhood trees to exchange a private random string. iii. u learns its new encrypted state σ bi+1 . 2. v sends sends the final encryption key to u. 3. Using this key, u computes its final output σr . Figure 3: A schematic overview of the simulated algorithm. 9 3 Preliminaries and Model Unless stated otherwise, the logarithms in this paper are base 2. For a distribution D we denote by x ← D an element chosen from D uniformly at random. For an integer n ∈ N we denote by [n] the set {1, . . . , n}. We denote by Un the uniform distribution over n-bit strings. For two distributions (or random variables) X, Y we write X ≡ Y if they are identical distributions. That is, for any x it holds that Pr[X = x] = Pr[Y = x]. Graph Notations. For a tree T ⊆ G, let T (z) be the subtree of T rooted at z, and let π(u, v, T ) be the tree path between u and v, when T is clear from the context, we may omit it and simply write π(u, v). The fundamental cycle Ce,T of an edge e = (u, v) ∈ / T is the cycle formed by taking e and the tree path between u and v in T0 , i.e., Ce,T = e ◦ π(u, v, T ). For u, v ∈ G, let dist(u, v, G) be the length (in edges) of the shortest u − v path in G. For every integer i ≥ 1, let Γi (u, G) = {v | distG (u, v) ≤ i}. When i = 1, we simply write Γ(u, G). Let deg(u, G) = |Γ(u, G)| be the degree of u in G. For a subset of edges E 0 ⊆ E(G), let deg(u, E 0 ) = |{v : (u,P v) ∈ E 0 }| be the 0 0 number of edges incident to u in E . For a subset of nodes U , let deg(U, E ) = u∈U deg(u, E 0 ). For a u1 -u2 path P1 and an u2 -u3 path, the path P1 ◦ P2 is the concatenation of the two paths. For a subset of vertices Si ⊆ V (G), let G[Si ] be the induced subgraph on Si . Fact 1. [Moore Bound, [Bol04]] Every n-vertex graph G = (V, E) with at least 2n1+1/k edges has a cycle of length at most 2k. 3.1 Distributed Algorithms The Communication Model. We use a standard message passing model, the CONGEST model [Pel00], where the execution proceeds in synchronous rounds and in each round, each node can send a message of size O(log n) to each of its neighbors. In this model, local computation is done for free at each node and the primary complexity measure is the number of communication rounds. Each node holds a processor with a unique and arbitrary ID of O(log n) bits. Throughout, we make an extensive use of the following useful tool, which is based on the random delay approach of [LMR94]. Theorem 5 ([Gha15, Theorem 1.3]). Let G be a graph and let A1 , . . . , Am be m distributed algorithms in the CONGESTmodel, where each algorithm takes at most d rounds, and where for each edge of G, at most c messages need to go through it, in total over all these algorithms. Then, there is a randomized distributed algorithm (using only private randomness) that, with high probability, produces a schedule that runs all the algorithms in O(c + d · log n) rounds, after O(d log2 n) rounds of pre-computation. A Distributed Algorithm. Consider an n-vertex graph G with maximal degree ∆. We model a distributed algorithm A that works in r rounds as describing r functions f1 , . . . , fr as follows. Let u be a node in the graph with input xu and neighbors v1 , . . . , v∆ . At any round i, the memory of a node u consists of a state, denoted by σi and ∆ messages mv1 →u . . . , mv∆ →u that were received in the previous round. Initially, we set σ0 to contained only the input xu of u and its ID and initialize all messages to ⊥. At round i the node u updates its state to σi+1 according to its previous state σi and the message from the previous round, and prepares ∆ messages to send mu→v1 , . . . , mu→v∆ . To ease notation (and without loss of generality) we assume that each state contains the ID of the node u, 10 thus, we can focus on a single update function fi for every round that works for all nodes. The function fi gets the state σi and messages mv1 →u . . . , mv∆ →u , and randomness si and outputs the next state and outgoing message: (σi , mu→v1 , . . . , mu→v∆ ) ← f (σi−1 , mv1 →u , . . . , mv∆ →u , si ). At the end of the r rounds, each node u has a state σr and a final output of the algorithm. Without loss of generality, we assume that σr is the final output of the algorithm (we can always modify fr accordingly). Natural Distributed Algorithms. We define a family of distributed algorithms which we call natural, which captures almost all known distributed algorithms. A natural distributed algorithm has two restrictions for any round i: (1) the size the state is bounded by |σi | ≤ ∆ · polylog(n), and (2) the function fi is computable in polynomial time. The input for fi is the state σi and at most ∆ message each of length log n. Thus, the input length m for fi is bounded by m ≤ ∆ · polylog(n), and the running time should be polynomial in this input length. We introduce this family of algorithms mainly for simplifying the presentation of our main result. For these algorithms, our main statement can be described with minimal overhead. However, our results are general and work for any algorithm, with appropriate dependency on the size of the state and the running time the function fi (i.e., the internal computation time at each node u in round i). Notations. We introduce some notations: For an algorithm A, graph G, input X = {xv }v∈G we denote by Au (G, X) the random variable of the output of node u while performing algorithm A on the graph G with inputs X (recall that A might be randomized and thus the output is a random variable and not a value). Denote by A(G, X) = {Au (G, X)}u∈G the collection of outputs (in some canonical ordering). Let ViewA u (G, X) be a random variable of the viewpoint of u in the running of the algorithm A. This includes messages sent to u, its memory and random coins during all rounds of the algorithm. Secure Distributed Computation. Let A be a distributed algorithm. Informally, we say that A0 computes A (or simulates A) in a secure manner of A if when running the algorithm A0 every node u learns the final output σr of A but “nothing more”. This notion is captured by the existence of a simulator and is defined below. Definition 1 (Perfect Privacy). Let A be a distributed (possibly randomized) algorithm, that works in r rounds. We say that an algorithm A0 computes A with perfect privacy if for every graph G, every u ∈ G and it holds that: 1. Correctness: For every input X = {xv }v∈V : A(G, X) ≡ A0 (G, X). 2. Perfect Privacy: There exists a randomized algorithm (simulator) Sim such that for every input X = {xv }v∈V it holds that 0 ViewuA (G, X) ≡ Sim(G, xu , Au (G, X)). This security definition is known as the “semi-honest” model, where the adversary, acting a one of the nodes in the graph, is not allowed to deviate from the prescribed protocol, but can run arbitrary computation given all the messages it received. Moreover, we assume that the adversary does no collude with other nodes in the graph. It is possible to extend the security notion to include these notions, more on this is discussed at Section 7. 11 3.2 Cryptography with Perfect Privacy One of the main cryptographic tools we use is a specific protocol for secure multiparty computation that has perfect privacy. Feige Kilian and Naor [FKN94] suggested a model where two players having inputs x and y wish to compute a function f (x, y) in a secure manner. They achieve this by each sending a single message to a third party that is able to compute the output of the function f from these messages, but learn nothing else about the inputs x and y. For the protocol to work, the two parties need to share private randomness that is not known to the third party. This model was later generalized to multi-players and is called the Private Simultaneous Messages Model [IK97], which we formally describe next. Definition 2 (The PSM model). Let f : ({0, 1}m )k → {0, 1}m be a k variant function. A PSM protocol for f consists of a pair of algorithms (PSM.Enc, PSM.Dec) where PSM.Enc : {0, 1}m × {0, 1}r → {0, 1}t and PSM.Dec : ({0, 1}t )k → {0, 1}m such that • For any X = (x1 , . . . , xk ) it holds that: Pr R∈{0,1}r [PSM.Dec(PSM.Enc(x1 , R), . . . , PSM.Enc(xk , R)) = f (x1 , . . . , xk )] = 1. • There exists a randomized algorithm (simulator) Sim such that for X = x1 , . . . , xk and for R sampled from {0, 1}r , it holds that {PSM.Enc(xi , R)}i∈[k] ≡ Sim(f (x1 , . . . , xk )). The communication complexity of the PSM protocol is the encoding length t and the randomness complexity of the protocol is defined to be |R| = r. Theorem 6 (Follows from [IK97]). For every function f : ({0, 1}m )k → {0, 1}` that is computable by an s = s(m, k)-space TM there is an efficient perfectly secure PSM protocol whose communication complexity and randomness complexity are O(km` · 22s ). We describe two additional tools that we will use, secret sharing and one-time-pad encryption. Definition 3 (Secret Sharing). Let x ∈ {0, 1}n be a message. We say L x is secret shared to k shares by choosing k random strings x1 , . . . , xk ∈ {0, 1}n conditioned on x = kj=1 xj . Each xj is called a share, and notice that the joint distribution of any k − 1 shares is uniform over ({0, 1}n )k−1 . Definition 4 (One-Time-Pad Encryption). Let x ∈ {0, 1}n be a message. A one-time pad is an extremely simple encryption scheme that has information theoretic security. For a random key K ∈ {0, 1}n the “encryption” of x according to K is x b = x ⊕ K. It is easy to see that the encrypted message x b (without the key) is distributed as a uniform random string. To decrypt x b using the key K we simply compute x = x b ⊕ K. The key K might be references as the encryption key or decryption key. Paper Organization. In Section 4 we describe the centralized constructions of our low-congestion covers. We start by showing the construction of cycle covers (in Section 4.1). We then use the cycle cover construction to compute private neighborhood trees in Section 4.2. Section 5 describes the secure simulation which generalizes PSM to general graphs. Finally, Section 6 considers the distributed construction of our low congestion covers. 12 4 4.1 Low-Congestion Covers Cycle Cover We give the formal definition of a cycle cover and prove our main theorem regarding low-congestion cycle covers. Intuitively, a cycle cover is a collection is cycles in the graph such that each edge is covered by at least one cycle from the collection. We care about two main parameters regarding the cycle cover that we wish to minimize: (1) cycle length: the maximal length of a cycle and (2) edge congestion: the maximal number of cycles an edge participates in. Definition 5 (Low-Congestion Cycle Cover). For a given graph G = (V, E), a (d, c) low-congestion cycle cover C of G is a collection of cycles that cover all edges of G such that each cycle C ∈ C is of length at most O(d) and each edge appears in at most O(c) cycles in C. That is, for every e ∈ E it holds that 1 ≤ |{C ∈ C : e ∈ C}| ≤ O(c). We also consider partial covers, that cover only a subset of edges E 0 . We say that a cycle cover C is a (d, c) cycle cover for E 0 ⊆ E, if all cycles are of length at most D, each edge of E 0 appears in at least one of the cycles of C, and no edge in E(G) appears in more than c cycles in C. That is, in this restricted definition, the covering is with respect to the subset of edges E 0 , however, the congestion limitation is with respect to all graph edges. The main contribution of this section is an existential result regarding cycle covers with low congestion. Namely, we show that any graph that is 2-edge connected has a cycle cover where each cycle is at most the diameter of the graph (up to log n factors) and each edge is covered by O(log n) cycles. Moreover, the proof is actually constructive, and yields a polynomial time algorithm that computes such a cycle cover. Theorem 1. For every n-vertex graph G with diameter D that is 2-edge connected, there exists a (d, c)-cycle cover with d = O(D log n) and c = O(log3 n). The construction of a (d, c)-cycle cover C starts by constructing a BFS tree T . The algorithm has two sub-procedures: the first computes a cycle collection C1 for covering the non-tree edges E1 = E(G)\E(T ), the second computes a cycle collection C2 for covering the tree edges E2 = E(T ). We describe each cover separately. The pseudo-code for the algorithm is given in Figure 4. The algorithm uses two procedures, NonTreeCover and TreeCover which are given in Section 4.1.1 and Section 4.1.2 respectively. 4.1.1 Covering Non-Tree Edges Covering the non-tree edge mainly uses the fact that while the graph many edges, then the girth is small. Specifically, using Fact 1, with k = log n we get that the girth of a graph with at least 2n edges is at most 2 log n. Hence, as long as that the graph has at least 2n edges, a cycle of length 2 log n can be found. We get that all but 2n edges in G are covered by edge-disjoint cycles of length 2 log n. In this subsection, we show that the set of edges E1 , i.e., the set of non-tree edges can be covered by a (D log n, O(1))-cycle cover denoted C1 . Actually, what we show is slightly more general: if the tree is of depth D(T ) the length of the cycles is at most O(D(T ) log n). Lemma 1 will be useful for covering the tree-edges as well and is used again in see next subsection (Section 4.1.2). 13 Algorithm CycleCover(G = (V, E)) 1. Construct a BFS tree T of G (with respect to edge set E). 2. Let E1 = E(G) \ E(T ) be all non-tree edges, and let E2 = E(T ) be all tree edges. 3. C1 ← NonTreeCover(T, E1 ). 4. C2 ← TreeCover(T, E2 ) 5. Output C1 ∪ C2 . Figure 4: Centralized algorithm for finding a cycle cover of a graph G. Lemma 1. Let G = (V, E) be a n-vertex graph, let T ⊆ G be a tree of depth D(T ). Then, there exists a (D(T ) log n, log n)-cycle cover C1 for the edges of E(G) \ E(T ). An additional useful property of the cover C1 is that despite the fact that the length of the cycles in C1 is O(D log n), each cycle is used to cover O(log n) edges. Lemma 2. Each cycle in C1 is used to cover O(log n) edges in E(G) \ E(T ). The rest of this subsection is devoted to the proof of Lemma 1. A key component in the proof is a partitioning of the nodes of the tree T into blocks. The partitioning is based on a numbering of the nodes from 1 to n and grouping nodes with consecutive numbers into blocks under certain restrictions. We define a numbering of the nodes N : V (T ) → [|V (T )|] by traversing the nodes of the tree in post order. That is, we let N (u) = i if u is the ith node traversed. Using this mapping, we proceed to defining a partitioning of the nodes into blocks and show some of their useful properties. For a block B of nodes and a subset of non-tree edges E 0 ⊆ E1 , the notation deg(B, E 0 ) is the number of edges in E 0 that have an endpoint in the set B. We call this the density of block B with respect to E 0 . For a subset of edges E 0 , and a density bound b (which will be set to a constant), an (E 0 , b)-partitioning B is a partitioning of the nodes of the graph into blocks that satisfies the following properties: 1. Every block consists of a consecutive subset of nodes (w.r.t. their N (·) numbering). 2. If a block B has density deg(B, E 0 ) > b then B consists of a single node. 3. The total number of blocks is at most 4|E 0 |/b. Claim 1. For any b and E 0 , there exists an (E 0 , b)-partitioning partitioning of the nodes of T satisfying the above properties. Proof. This partitioning can be constructed by a greedy algorithm that traverses nodes of T in increasing order of their numbering N (·) and groups them into blocks while the density of the 14 Algorithm Partition(T, E 0 ) 1. Let B be an empty partition, and let B be an empty block. 2. Traverse the nodes of T in post-order, and for each node u do: (a) If deg(B ∪ {u}, E 0 ) ≤ b add u to B. (b) Otherwise, add the block B to B and initialize a new block B = {u}. 3. Output B. Figure 5: Partitioning procedure. block does not exceed b (see Figure 5 for the precise procedure). Indeed, properties 1 and 2 are satisfied directly by the construction. For property 3, let t be the number of blocks B with deg(B, E 0 ) ≤ b/2. By the construction, we know that for any such block B the block B 0 that comes after B satisfies deg(B, E 0 ) + deg(B 0 , E 0 ) > b. Let B1 , . . . , B` be the final partitioning. Then, we have t pairs of blocks that have density at least b and the rest of the (` − t/2) blocks that have density at least b/2. Formally, we have ` X deg(Bi , E 0 ) > tb + (` − t/2)b/2 = `b/2. i=1 On the other hand, since it is a partitioning of E 0 we have that we get that `b/2 ≤ 2|E 0 | and therefore ` ≤ 4|E 0 |/b as required. P` i=1 deg(Bi , E 0) = 2|E 0 |. Thus, Our algorithm for covering the edges of E1 = E(G) \ E(T ) makes use of this block partitioning with b = 16. For any two nodes u, v ∈ V (T ), we use the notation π(u, v, T ) (or simply π(u, v)) to denote the unique simple path in the tree T from u to v. The algorithm begins with an empty collection C and then performs log n iterations where each iteration works as follows: Let E 0 ⊆ E1 be the set of uncovered edges (initially E 0 = E1 ). Then, we partition the nodes of T with respect to E 0 and density parameter b. Finally, we search for cycles of length at most log n between the blocks. If such a cycle exists, we map it to a cycle in G by connecting nodes u, v within a block by the path π(u, v) in the tree T . This way a cycle of length log n between the blocks translates to a cycle of length D(T ) log n in the original graph G. Denote the resulting collection by C. We note that the cycles C might not be simple. This might happen if and only if the tree paths π(vi , ui+1 ) and π(vj , uj+1 ) intersect for some j ∈ [t]. Notice that the if an edge appears more than once in a cycle, then it must be a tree edge. Thus, we can transform any non-simple cycle C into a collection of simple cycles that cover all edges that appeared only once in C (the formal procedure is given at Figure 7). Since these cycle are constructed to cover only non-tree edges, we get that this transformation did not hurt the cover of E1 . The formal description of the algorithm is given in Figure 6. We move to the analysis of the algorithm, and show that it yields the desired cycle cover. That is, we show three things: that every cycle has length at most O(D(T ) log n), that each edge is covered by at most O(log n) cycles, and that each edge has at least one cycle covering it. 15 Algorithm NonTreeEdgeCover(T, E1 ) 1. Initialize a cover C as an empty set. 2. Repeat log |E1 | times: (a) Let E 0 ⊆ E1 be the subset of all uncovered edges. (b) Construct an (E 0 , b)-partitioning B of the nodes of T . (c) While there are t edges (u1 , v1 ), . . . , (ut , vt ) ∈ E 0 for t ≤ log n such that for all i ∈ [t−1], vi and ui+1 are in the same block and vt and u1 are in the same block (with respect to the partitioning B): Add the cycle u1 → v1 → π(v1 , u2 ) → v2 → π(v2 , u3 ) → v3 → . . . → vt → u1 to C. 3. Compute C 0 ← SimplifyCycles(C) and output C 0 . Figure 6: Procedure for covering non-tree edges. Algorithm SimplifyCycles(C) 1. While there is a cycle C ∈ C with a vertex w ∈ C that appears more than once: (a) Remove C from C. (b) Let C = v1 → · · · → vk and define vk+i = vi . (c) Let i1 , . . . , i` be such that vij = w for all j ∈ [`], and let i`+1 = i1 . (d) For all j ∈ [`] let Cj = vij → vij +1 · · · → vij+1 , and if |Cj | ≥ 3, add Cj to C. 2. Output C. Figure 7: Procedure making all cycles in C simple. Cycle Length. The bound of the cycle length follows directly from the construction. The cycles added to the collection are of the form u1 → v1 → π(v1 , u2 ) → v2 → π(v2 , u3 ) → v3 → . . . → vt → u1 , where each π(vi , ui+1 ) are paths in the tree T and thus are of length at most 2D(T ). Notice that the simplification process of the cycles can only make the cycles shorter. Since t ≤ log n we get that the cycle lengths are bounded by O(D(T ) log n). Congestion. To bound the congestion of the cycle cover we exploit the structure of the partitioning, and the fact that each block in the partition has a low density. We begin by showing that by the post-order numbering, all nodes in a given subtree have a continuous range of numbers. For every z ∈ V (T ), let minN (z) be the minimal number of a node in the subtree of T rooted by z. That is, minN (z) = minu∈Tz N (u) and similarly let maxN (z) = maxu∈Tz N (u). Claim 2. For every z ∈ V (T ) and for every u ∈ G it holds that (1) maxN (z) = N (z) and (2) N (u) ∈ [minN (z), maxN (z)] iff u ∈ Tz . Proof. The proof is by induction on the depth of Tz . For the base case, we consider the leaf nodes 16 z, and hence Tz with 0-depth, the claim holds vacuously. Assume that the claim holds for nodes in level i + 1 and consider now a node z in level i. Let vi,1 , . . . , vi,` be the children of z ordered from left to right. By the post-order traversal, the root vi,j is the last vertex visited in Tvi,j and hence N (vi,j ) = maxN (vi,j ). Since the traversal of Tvi,j starts right after finishing the traversal of Tvi,j−1 for every j ≥ 2, it holds that minN (vi,j ) = N (vi,j−1 ) + 1. Using the induction assumption for vi,j , we get that all the nodes in Tz \ {z} have numbering in the range [minN (vi,1 ), maxN (vi,` ] and any other node not in Tz is not in this range. Finally, N (z) = N (vi,` ) + 1 and so the claim holds. The cycles in the cover we compute are composed of paths π(u, v) for two nodes u and v in the same block. Thus, to bound the congestion on an edge e ∈ T we need to bound the number of blocks such that there contains u, v in that block such that π(u, v) passes through e. The next claim shows that every edge in the tree is effected by at most 2 blocks. Claim 3. Let e ∈ T be a tree edge and define B(e) = {B ∈ B | ∃u, v ∈ B s.t. e ∈ π(u, v)}. Then, |B(e)| ≤ 2 for every e ∈ T . Proof. Let e = (w, z) where w is closer to the root in T , and let u, v be two nodes in the same block B such that e ∈ π(u, v). Let ` be the LCA of u and v in T (it might be that ` ∈ {u, v}), then the tree path between u and v can be written as π(u, v) = π(u, `) ◦ π(`, v). Without loss of generality, assume that e ∈ π(`, v). This implies that v ∈ Tz but u ∈ / Tz . Hence, the block of u and v intersects the nodes of Tz . Each block consists of a consecutive set of nodes, and by Claim 2 also Tz consists of a consecutive set of nodes with numbering in the range [minN (z), maxN (z)], thus there are at most two such blocks that intersect e = (w, z), i.e., blocks B that contains both a vertex y with N (y) ∈ [minN (z), maxN (z)] and a vertex y 0 with N (y 0 ) ∈ / [minN (z), maxN (z)], and the claim follows. Finally, we use the above claims to bound the congestion. Consider any tree edge e = (w, z) where w is closer to the root than z. Let Tz be the subtree of T rooted at z. Fix an iteration i of the algorithm. We characterize all cycles in C that go through this edge. For any cycle that passes through e there must be a block B and two nodes u, v ∈ B such that e ∈ π(u, v). By Claim 3, we know that there are that at each iteration of the algorithm, there are at most two such blocks B that can affect the congestion of e. Moreover, we claim that each such block has density at most b. Otherwise it would be a block containing a single node, say u, and thus the path π(u, u) = u is empty and cannot contain the edge e. For each edge in E 0 we construct a single cycle in C, and thus for each one of the two blocks that affect e the number of pairs u, v such that e ∈ π(u, v) is bounded by b/2 (each pair u, v has two edges in the block B and we know that the total number of edges is bounded by b). To summarize the above, we get that for each iteration, that are at most 2 blocks that can contribute to the congestion of an edge e: one block that intersects Tz but has also nodes smaller than minN (z) and one block that intersects Tz but has also nodes larger than maxN (z). Each of these two blocks can increase the congestion of e by at most b/2. Since there are at most log n iterations, we can bound the total congestion by b log n. Notice that if an edge appears k times in a cycle, then this congestion bound counts all k appearances. Thus, after the simplification of the cycles, the congestion remains unchanged. Cover. We show that each edge in E1 was covered by some cycle and that each cycle is used to cover O(log n) edges in E1 . We begin by showing cover for the cycles before the simplification procedure, and then show that the cover remains after this procedure. The idea is that at each iteration of the 17 algorithm, the number of uncovered edges is reduced by half. Therefore, the log |E1 | = O(log n) iterations should suffice for covering all edges of E1 . In each iteration we partition the nodes into blocks, and we search for cycles between the blocks. The point is that if the number of edges is large, then we considering the blocks as nodes in a new virtual graph, this graph has a large number of edges and thus must have a short cycle. At each iteration, the blocks become larger which make the virtual have less nodes and the number of edges is larger relative to the small number of nodes. In what follows, we formalize the intuition given above. Let Ei0 be the set E 0 at the ith iteration of the algorithm. Consider the iteration i with the set of uncovered edge set Ei0 . Our goal is to 0 show that Ei+1 ≤ 1/2Ei0 . By having log |E1 | iterations, last set will be empty. Let Bi be the partitioning performed at iteration i with respect to the edge set Ei0 . Define a e in which each block Bj ∈ Bi is represented by a node vej , and there is an edge (e super-graph G vj , vej 0 ) 0 0 e in G if there is an edge in Ei between some node u in Bj and a node u in Bj 0 , i.e., e ⇐⇒ Ei0 ∩ (Bj × Bj 0 ) 6= ∅. (e vj , vej 0 ) ∈ E(G) e which we denote by ni , is the number of See Figure 8 for an illustration. The number of nodes in G, 𝐵2 𝐵3 𝐵3 𝐵2 𝐵1 𝐵1 𝐵4 𝐵4 Figure 8: Left: Schematic illustration of the block partitioning in the tree T . Dashed edges are those that remain to be covered after employing Alg. LocalCover, where each two blocks are connected e Right: A triangle in the by exactly one edge. Each dashed edge corresponds to super-edges in G. e super-graph G. blocks in the partition and is bounded by ni ≤ 4|Ei0 |/b. Let B(u) be the block of the node u. The algorithm finds cycles of the form u1 → v1 → π(v1 , u2 ) → v2 → π(v2 , u3 ) → v3 → . . . → vt → u1 , e In general, any cycle of which is equivalent to finding the cycle B(u1 ), . . . , B(ut ) in the graph G. e length t in G is mapped to a cycle in G of length at most t · D(T ). Then, the algorithm adds the e At the end of cycle to C and removes the edges of the cycle (thus removing them also from G). e has no cycles of length at most log n. At this point, the next set of edges iteration i the graph G 0 e By Fact 1 (and recalling that b = 16) we get that if G e does not Ei+1 is exactly the edges left in G. have any cycles of length at most log n then we get the following bound on the number of edges: 0 Ei+1 ≤ 2ni = 8|Ei0 |/b = |Ei0 |/2. 18 Thus, all will be covered by a cycle C before the simplification process. We show that the simplification procedure of the cycle maintains the cover requirement. This stems from the fact that any edge that appears more than once in a cycle, might be dropped but is not the edge for which this cycle was constructed to cover. That is, for each non-tree edge, we construct a cycle that covers it. By the construction of the cycles, if a cycle is not simple it must be because of a tree edge. It is left to show that this process only drops edges that appear more than once: Claim 4. Let C be a cycle and let C 0 ← SimplifyCycles(C). Then, for every edge e ∈ C that appears at most once in C there is a cycle C 0 ∈ C 0 such that e ∈ C 0 . Proof. The procedure SimplifyCycles works in iterations where in each iteration it chooses a vertex w that appears more than once in C and partitions the cycle C to consecutive parts, C1 , . . . , C` . All edges in C appear in some Cj . However, Cj might not be a proper cycle since it might be the case that |Cj | ≤ 2. Thus, we show that in an edge e ∈ C appeared at most once in a cycle C then it will appear in Cj for some j where |Cj | ≥ 3. We show that this holds for any iteration and thus will hold at the end of the process. We assume without loss of generality that no vertex has two consecutive appearances. Denote e = (v2 , v3 ) and let C = v1 → v2 → v3 → . . . vk for k ≥ 3. Since e does not appear again in C we know that v1 , v2 , v3 are distinct. Thus, if k = 3 then C will not be split again and the claim follows. Therefore, assume that k ≥ 4. Since e does not appear again in C we know that v2 , v3 , v4 are distinct (it might be the case that v1 = v4 ). Thus, we know that |{v1 , v2 , v3 , v4 }| ≥ 3. Any subsequence begins and ends at the same vertex and thus the subsequence Cj that contains e must contains all of v1 , v2 , v3 , v3 and thus |Cj | ≥ 3, and the claim follows. Finally, we turn to prove Lemma 2. The lemma follows by noting that each cycle in C1 contains at most O(log n) non-tree edges. To see this, observe that each cycle computed in the contracted block graph has length O(log n). Translating these cycles into cycles in G introduces only tree edges. We therefore have that each cycle is used to cover O(log n) non-tree edges. 4.1.2 Covering Tree Edges Finally, we present Algorithm TreeCover that computes a cycle cover for the tree edges. The algorithm is recursive and uses Algorithm NonTreeCover as a black-box. Formally, we show: Lemma 3. For every n-vertex graph G and a tree T ⊆ G of depth D, there exists a (D log n, log3 n) cycle cover C3 for the edges of T . We begin with some notation. Throughout, when referring to a tree edge (u, v) ∈ T , the node u is closer to the root of T than v. Let E(T ) = {e1 , . . . , en−1 } be an ordering of the edges of T in non-decreasing distance from the root. For every tree edge e ∈ T , define the swap edge of e by e0 = Swap(e) to be an arbitrary edge in G that restores the connectivity of T \ {e}. Since the graph G is 2-edge connected such an edge Swap(e) is guaranteed to exist for every e ∈ T . Let e = (u, v) and (u0 , v 0 ) = Swap(e), we denote u by p(v) (since u is the parent of v in the tree) and v 0 by s(v), where s(v) is the endpoint of Swap(e) that do not belong to T (u0 ) (i.e., the subtree T rooted at u). Define the v-s(v) path Pe = π(v, u0 ) ◦ Swap(e). For an illustration see Figure 9. 19 For the tree T , we construct a subset of tree edges denoted by I(T ) that we are able to cover. These edges are independent in the sense that their Pe paths are “almost” edge disjoint (as will be shown next). The subset I(T ) is constructed by going through the edges of T in non-decreasing distance from the root. At any point, we add e to I(T ) only if it is not covered by the Pe0 paths of the e0 edges already added. Claim 5. The subset I(T ) satisfies the following properties: • For every e ∈ E(T ), there exists e0 ∈ I(T ) such that e ∈ e0 ◦ Pe0 . • For every e, e0 ∈ I(T ) such that e 6= e0 it holds that Pe and Pe0 have no tree edge in common (no edge of T is in both paths). • For every swap edge (z, w), there exists at most two paths Pe , Pe0 for e, e0 ∈ I(T ) such that one passes through (z, w) and the other through (w, z). That is, each swap edge appears at most twice on the Pe paths, once in each direction. Proof. The first property follows directly from the construction. Next, we show that they share no tree edge in common. Assume that there is a common edge (z, w) ∈ Pe ∩ Pe0 ∩ E(T ). Then, both e, e0 must be on the path from root to z on the tree and hence e0 ∈ Pe , leading to contradiction. For the third property, assume towards constriction that both Pe and Pe0 use the same swap edge in the same direction. Again it implies that both e, e0 are on the path from the root to z on T . Our cycle cover for the I(T ) edges will be shown to cover all the edges of the tree T . This is because the cycle that we construct to cover an edge e ∈ I(T ) necessarily contains Pe . Algorithm TreeCover uses the following procedure TreeEdgeDisjointPath, usually used in the context of distributed routing. Key Tool: Route Disjoint Matching. Algorithm TreeEdgeDisjointPath solves the following problem defined by Peleg (see Lemma 4.3.2 [Pel00]): given a rooted tree T and a set of 2k marked nodes M ⊆ V (T ) for k ≤ n/2, the goal is to find (by a distributed algorithm) a matching of these vertices hwi , wj i into pairs such that the tree paths π(wi , wj , T ) connecting the matched pairs are edge-disjoint. This matching can be computed distributively in O(Diam(T )) rounds by working from the leaf nodes towards the root. In each round a node u that received information on more ` ≥ 2 unmarked nodes in its subtree, match all but at most one into pairs and upcast to its parent the ID of at most one unmarked node in its subtree. It is easy to see that all tree paths between matched nodes are indeed edge disjoint. We are now ready to explain the cycle cover construction of the tree edges E(T ). Description of Algorithm TreeCover. We restrict attention for covering the edges of I(T ). The tree edges I(T ) will be covered in a specific manner that covers also the edges of E(T ) \ I(T ). The e = {(v, s(v)) : (p(v), v) ∈ I(T )} and key idea is to define a collection of (virtual) non-tree edges E covering these non-tree edges by enforcing the cycle that covers the non-tree edge (v, s(v)) to covers the edges e = (p(v), v) as well as the path Pe . Since every edge e0 ∈ T appears on one of the e ◦ Pe paths, this will guarantee that all tree edges are covered. Algorithm TreeCover is recursive and has O(log n) levels of recursion. In each independent level of the recursion we need to solve the following sub-problem: Given a tree T 0 , cover by cycles the edges of I(T 0 ) along with their Pe paths. The key idea is to subdivide this problem into two 20 independent and balanced subproblems. To do that, the tree T 0 gets partitioned7 into two balanced edge disjoint subtrees T10 and T20 , where |T10 |, |T20 | ≤ 2/3 · |T 0 | and E(T10 ) ∪ E(T20 ) = E(T 0 ). Some of the tree edges in T 0 are covered by applying a procedure that computes cycles using the edges of T 0 , and the remaining ones will be covered recursively in either T10 or T20 . Specifically, the edges of I(T 0 ) are partitioned into 4 types depending on the position of their swap edges. Let 0 Ex,y = {(u, v) ∈ E(Tx0 ) ∩ I(T 0 ) | v ∈ V (Tx0 ) and s(v) ∈ V (Ty0 ) \ V (Tx0 )}, for every x, y ∈ {1, 2}. 0 , E0 The algorithm computes a cycle cover C1,2 (resp., C2,1 ) for covering the edges of E1,2 2,1 respec0 0 tively. The remaining edges E11 and E22 are covered recursively by applying the algorithm on T10 and T20 respectively. See Fig. 9 for an illustration. 0 . The edges E 0 We now describe how to compute the cycle cover C1,2 for the edges of E1,2 2,1 are 0 0 0 covered analogously (i.e., by switching the roles of T1 and T2 ). Recall that the tree edges E1,2 are 0 0 those edges (p(v), v) such v ∈ T1 and s(v) ∈ T2 . The procedure works in O(log n) phases, each 0 , C 0 and C 0 which together covers at least half of the phase i computes three cycle collections Ci,1 i,2 i,3 0 yet uncovered edges of E1,2 (as will be shown in analysis). 0 . We Consider the ith phase where we are given the set of yet uncovered edges Xi ⊆ E1,2 first mark all the vertices v with (p(v), v) ∈ Xi . Let Mi be this set of marked nodes. For ease of description, assume that Mi is even, otherwise, we omit one of the marked vertices w (from Mi ) and take care of its edge (p(w), w) in later phases. We apply Algorithm TreeEdgeDisjointPath(T10 , Mi ) (see Lemma 4.3.2 [Pel00]) which matches the marked vertices Mi into pairs Σ = {hv1 , v2 i | v1 , v2 ∈ Mi } such that for each pair σ = hv1 , v2 i there is a tree path π(σ) = π(v1 , v2 , T10 ) and all the tree paths π(σ), π(σ 0 ) are edge disjoint for every σ, σ 0 ∈ Σ. Let Xi00 = {e = (p(v), v) ∈ Xi : ∃v 0 and hv, v 0 i ∈ Σ, s.t. e ∈ π(v, v 0 , T10 )} be the set of edges in Xi that appear on the collection of edge disjoint paths {π(σ), σ ∈ Σ}. Our goal is to cover all edges in Ei00 = Xi00 ∪ {Pe | e ∈ Xi00 } by cycles Ci . To make sure that all edges Ei00 are covered, we have to be careful that each such edge appears on a given cycle exactly once. Towards this end, we define a directed conflict graph GΣ whose vertex set are the pairs of Σ, and there is an arc (σ 0 , σ) ∈ A(GΣ ) where σ = hv1 , v2 i, σ = hv10 , v20 i, if at least one of the following cases holds: Case (I) e = (p(v1 ), v1 ) on π(v1 , v2 , T10 ) and the path π 0 = π(v10 , v20 , T10 ) intersects the edges of Pe ; Case (II) e0 = (p(v2 ), v2 ) on π(v1 , v2 , T10 ) and the path π 0 intersects the edges of Pe0 . Intuitively, a cycle that contains both π 0 and Pe is not simple and in particular might not cover all edges on Pe . Since the goal of the pair σ = hv1 , v2 i is to cover all edges on Pe (for e ∈ π(v1 , v2 , T10 )), the pair σ 0 “interferes” with σ. In the analysis section (Claim 6), we show that the outdegree in the graph GΣ is bounded by 1 and hence we can color GΣ with 3 colors. This allows us to partition Σ into three color classes Σ1 , Σ2 and Σ3 . Each color class Σj is an independent set in GΣ and thus it is “safe” to cover all these pairs by cycles together. We then compute a cycle cover Ci,j , for each j ∈ {1, 2, 3}. The collection of all these cycles will be shown to cover the edges Ei00 . To compute Ci,j for j = {1, 2, 3}, for each matched pair hv1 , v2 i ∈ Σj , we add to T20 a virtual edge eb between s(v1 ) and s(v2 ). Let bi,j = {(s(v1 ), s(v2 )) | hv1 , v2 i ∈ Σj }. E We cover these virtual non-tree edges by cycles using Algorithm NonTreeCover on the tree T20 bi,j . Let C 00 be the output O(D log n, log n) cycle cover of Algorithm with the non-tree edges E i,j 7 This partitioning procedure is described in Appendix A. We note that this partitioning maintains the layering structure of T 0 . 21 0 ). The output cycles of C 00 are not yet cycles in G as they consists of two NonTreeCover(T20 , Ei,j i,j bi,j and the edges E e = {(v, s(v)) | (p(v), v) ∈ I(T )}. First, types of virtual edges: the edges in E 00 00 0 e by replacing each of the virtual edges we translate each cycle C ∈ Ci,j into a cycle C in G ∪ E bi,j in C 00 with the path P (b eb = (s(v1 ), s(v2 )) ∈ E e) = (s(v1 ), v1 ) ◦ π(v1 , v2 , T10 ) ◦ (v2 , s(v2 )). Then, we e in C 0 by the v-s(v) path Pe for e = (p(v), v). This results in replace each virtual edge (v, s(v)) ∈ E cycles Ci,j in G. Finally, let Ci = Ci,1 ∪ Ci,2 ∪ Ci,3 and define Xi+1 = Xi \ Xi00 to be the set of edges e ∈ Xi that are not covered by the paths of Σ. If in the last phase ` = O(log n), the set of marked nodes M` is odd, we omit one of the marked nodes w ∈ M` , and cover its tree edge e = (p(w), w) by taking the fundamental cycle of the S swap edge Swap(e) into the cycle collection. The final cycle 0 0 . This completes collection for E1,2 is given by C1,2 = `i=1 Ci . The same is done for the edges E2,1 the description of the algorithm. The final collection of cycles is denoted by C3 . See Figure 12 for the full description of the algorithm. See Figures 9 to 11 and for illustration. 𝑝(𝑣) 𝑣 𝑣′ 𝑒 𝑃𝑒 𝑒′ 𝑠(𝑣) 𝑇1′ 𝑇2′ 𝑠(𝑣2 ) 𝑠(𝑣′2 ) 𝑠(𝑣′1 ) 𝑣4 𝑝(𝑣1 ) 𝑠(𝑣1 ) 𝑣5 𝑠(𝑣4 ) 𝑣1 𝑠(𝑣5 ) 𝑣2 𝑣′1 𝑣3 𝑣′2 𝑠(𝑣3 ) Figure 9: Left: Illustration the swap edge e0 = Swap(e) and the path Pe for an edge e ∈ T . For each tree edge e = (u, v) ∈ T , we add the auxiliary edge (v, s(v)). Right: The tree T 0 is partitioned into e two balanced trees T10 and T20 . The root vertex in this example belongs to both trees. The edges E 0 0 0 are partitioned into four sets: E1,1 (e.g., the edge (p(v3 ), v3 )), E2,2 (e.g., the edge (p(v4 ), v4 )), E1,2 0 0 (e.g., the edge (p(v1 ), v1 )), E2,1 (e.g., the edge (p(v5 ), v5 )). The algorithm covers the edges of E1,2 0 by using Algorithm TreeEdgeDisjointPath to compute a matching and edge disjoint paths in T1 . See the tree paths between v1 and v2 and v10 and v20 . Based on this matching, we add virtual edges between vertices of T20 , for example the edges (s(v1 ), s(v2 )) and (s(v10 ), s(v20 )) shown in dashed. The algorithm then applies Algorithm NonTreeCover to cover these non-tree edges in T20 . We analyze the TreeCover algorithm and show that it finds short cycles, with low congestion and that every edge of T is covered. Short Cycles. By construction, each cycle that we compute using Algorithm NonTreeCover con22 𝑇2′ 𝑇1′ 𝑠(𝑣2 ) 𝑠(𝑣1 ) 𝑝(𝑣1 ) 𝑠(𝑣2 ) 𝑣2 𝑣1 𝑠(𝑣1 ) 𝑃𝑒1 𝑃𝑒1 𝑠(𝑣1 ) 𝑒1 𝑃𝑒2 𝑒2 𝑠(𝑣2 ) 00 by an Figure 10: Illustration of replacing a single virtual edge (s(v1 ), s(v2 )) in a cycle C 00 ∈ Ci,j s(v1 )-s(v2 ) path in G. 𝑣5 𝑒5 𝑠(𝑣3 ) 𝑃𝑒5 𝑠(𝑣4 ) 𝑠(𝑣2 ) 𝑠(𝑣1 ) 𝑠(𝑣5 ) 𝑠(𝑣5 ) 𝑠(𝑣6 ) 𝜋(𝑣1 , 𝑣2 ) 𝑣1 𝑃𝑒 1 𝑒1 𝑒2 𝑣2 𝑃𝑒2 𝑠(𝑣1 ) 𝑠(𝑣2 ) 𝑣6 𝑃𝑒6 𝑠(𝑣6 ) 𝑠(𝑣4 ) 𝑠(𝑣3 ) 𝑃𝑒3 𝑃𝑒4 𝑣3 𝑣4 Figure 11: Translating virtual cycles into cycles in G. Each cycle contains O(log n) virtual edges which are are replaced by (almost) edge disjoint paths in G. Note that each edge on ei ◦ Pei appears exactly once since the Pe paths are tree-edge disjoint and the pairs σ = huj , vj i in Σi,j do not interfere with each other. bi,j . The algorithm replaces each non-tree edge eb = (v1 , v2 ) sists of at most O(log n) non-tree edges E by an v1 -v2 path in G of length O(D). This is done in two steps. First, eb = (v1 , v2 ) is replaced by 23 Algorithm TreeCover(T 0 ) 1. If |T 0 | = 1 then output empty collection. 2. Let C be an empty collection. 3. Partition T 0 into balanced T10 ∪ T20 . 4. Let E 0 be an empty set. 5. For every (u, v) ∈ T let (u0 , v 0 ) = Swap((u, v)) and add a virtual edge (v, v 0 ) to E 0 . 6. For i = 1, ..., O(log n): (a) Let Mi be all active nodes v ∈ V (T10 ) s.t. Swap(v) ∈ V (T2 )}. (b) Apply TreeEdgeDisjointPath(T10 , Mi ) and let Σ = {hv1 , v2 i} be the collection of matched pairs. (c) Partition Σ into 3 independent sets Σ1 , Σ2 and Σ3 . (d) For every j ∈ {1, 2, 3} compute a cycle cover Ci,j as follows: bi,j . i. For every pair hv1 , v2 i in Σj add a virtual edge (s(v1 ), s(v2 )) to E 00 00 bi,j ). ii. C ← C ∪ NonTreeCover(T2 , E i,j i,j 00 to cycles C iii. Translate Ci,j i,j in G. (e) Let Ci = Ci,1 ∪ Ci,2 ∪ Ci,3 . S 7. C1 = i Ci . 8. Repeat where T10 and T20 are switched. 9. Add to C the output of TreeCover(T10 ) ∪ TreeCover(T20 ). 10. Output SimplifyCycles(C ∪ C1 ). Figure 12: Procedure for covering tree edges. e Then, each (v, s(v)) edge is replaced by a path Peb = (v1 , s(v1 )) ◦ π(v1 , v2 , T ) ◦ (v2 , s(v2 )) in G ∪ E. the path P(p(v),v) in G, which is also of length O(D). Hence, overall the translated path v1 -v2 path in G has length O(D). Since there are O(log n) virtual edges that are replaced on a given cycle, the cycles of G has length O(D log n). Cover. We start with some auxiliary property used in our algorithm. 0 . The outdegree Claim 6. Consider the graph GΣ constructed when considering the edges in E1,2 of each pair σ 0 = hv10 , v20 i ∈ Σ in GΣ is at most 1. Therefore, GΣ can be colored in 3 colors. Proof. Let σ = hv1 , v2 i be such that σ 0 interferes with σ (i.e., (σ 0 , σ) ∈ A(GΣ )). Without loss of generality, let e = (p(v1 ), v1 ) be such that e ∈ π(v1 , v2 , T10 ) and π(v10 , v20 , T10 ) intersects the edges of Pe . 24 We first claim that this implies that e appears above the LCA of v10 and v20 in T10 , and hence by the properties of our partitioning, also in T . Assume towards contradiction otherwise, since e ◦ Pe is a path on T (where e is closer to the root) and since Pe intersects π(v10 , v20 , T10 ), it implies that e ∈ π(v10 , v20 , T10 ). Since the vertex v1 is marked, we get a contradiction that v10 got matched with v20 as the algorithm would have matched v1 with one of them. In particular, we would get that the paths π(σ) and π(σ 0 ) are not edge disjoint, as both contain e. Hence, we prove that e is above the LCA of v10 and v20 . Next, assume towards contradiction that there is another pair σ 00 = hv100 , v200 i ∈ Σ such that σ 0 interferes with σ 00 . Without loss of generality, let v100 be such that e00 = (p(v100 ), v100 ) in on π(v100 , v200 , T10 ) and Pe00 intersects with π(v10 , v20 , T10 ). This implies that e00 is also above the LCA of v10 and v20 in T10 . Since one of the edges of Pe00 is on π(v10 , v20 , T10 ) it must be that either e00 on Pe or vice verca, in contradiction that e, e00 ∈ I(T ). We now claim that each edge e ∈ T is covered. By the definition of I(T ) ⊆ E(T ), it is sufficient to show that: Claim 7. For every edge e ∈ I(T ), there exists a cycle C ∈ C3 such that e ◦ Pe ⊆ C. We now consider a specific tree edge e = (p(v), v). First, note that since (v, s(v)) is a non-tree edge, there must be some recursive call with the tree T 0 such that v ∈ T10 and s(v) ∈ T20 where T10 0 . We show and T20 are the balanced partitioning of T 0 . At that point, (v, s(v)) is an edge in E1,2 0 that in the ` = O(log n) phases of the algorithm for covering the E1,2 , there is a phase in which e = (p(v), v) is covered. 0 Claim 8. (I) For every e = (p(v), v) ∈ E1,2 except at most one edge e∗ , there is a phase ie where Algorithm TreeEdgeDisjointPath matched v with some v 0 such that e ∈ π(v, v 0 ). (II) Each edge e 6= e∗ is covered by the cycles computed in phase ie . Proof. Consider phase i where we need to cover the edges of Xi . Recall, that the algorithm marks the set of nodes v with (p(v), v) ∈ Xi , resulting in the set Mi . Let Σ be the output pairs of Algorithm TreeEdgeDisjointPath(T10 , Mi ). We first show that at least half of the edges in Xi are covered by the paths of Σ. If Mi is odd, we omit one of the marked nodes and then apply Algorithm TreeEdgeDisjointPath to match the pairs in the even-sized set Mi . The key observation is that for every matched pair hv1 , v2 i, it holds that either (p(v1 ), v1 ) or (p(v2 ), v2 ) is on π(v1 , v2 , T10 ) (or both). Hence, at least half of the edges of Xi are on the edge disjoint paths π(v1 , v2 , T10 ). We therefore get that after ` = c log n phases, we are left with |M` | = O(1) at that point if |M` | is odd, we omit one vertex v ∗ such that e∗ = (p(v ∗ ), v ∗ ). Claim (I) follows. We now consider (II) , let e = (p(v), v) and consider phase i = ie in which e ∈ π(v, v 0 , T10 ) where v 0 is the matched pair of v. We show that all the edges of e ◦ Pe are covered by the cycles Ci computed in that phase. By definition, hv, v 0 i belongs to Σ. By Claim 6, GΣ can be colored by 3 colors, let Σj ⊆ Σ be the color class that contains hv, v 0 i. We will show that there exists a cycle C in Ci,j that covers each edge e00 ∈ e ◦ Pe exactly once. 00 to Recall that the algorithm applies Algorithm NonTreeCover which computes a cycle cover Ci,j bi,j in T 0 . Also, (s(v), s(v 0 )) ∈ E bi,j . cover all the virtual edges E 2 00 00 Let C be the (simple) cycle in Ci,j that covers the virtual edge (s(v), s(v 0 )). In this cycle 00 C we have two types of edges: edges in T20 and virtual edges (s(v1 ), s(v2 )). First, we transform 25 C 00 into a cycle C 0 in which each virtual edge eb = (s(v1 ), s(v2 )) is replaced by a path P (b e) = 0 0 (s(v1 ), v1 ) ◦ π(v1 , v2 , T1 ) ◦ (v2 , s(v2 )). Next, we transform C into C ⊆ G by replacing each edge e in C 00 by the v1 -s(v1 ) path Pe for e1 = (p(v1 ), v1 ). (v1 , s(v1 )) ∈ E 1 We now claim that the final cycle C ⊆ G, contains each of the edges e ◦ Pe exactly once, hence even if C is not simple, making it simple still guarantees that e ◦ Pe remain covered. Since T10 and T20 are edge disjoint, we need to restrict attention only two types of T10 paths that got inserted to C: (I) the edge disjoint paths Πi,j = {π(v1 , v2 , T10 ) | hv1 , v2 i ∈ Σj } and (II) the v 0 -s(v 0 ) paths Pe0 for every edge e0 = (p(v 0 ), v 0 ) (appears on C 0 ). We first claim that there is exactly one path π(v1 , v2 , T10 ) ∈ Πi,j that contains the edge e = (p(v), v). By the selection of phase i, e ∈ π(v, v 0 , T10 ) where v 0 is the pair of v. Since all paths Πi,j are edge disjoint, no other path contains e. Next, we claim that there is no path π ∈ Πi,j that passes through an edge e0 ∈ Pe . Since e = (p(v), v) ∈ π(v, v 0 , T10 ) and all edges on Pe are below e on T 8 , the path π(v, v 0 , T10 ) does not contain any e0 ∈ Pe . In addition, since all pairs in Σj are independent in GΣ , there is no path in π(σ 0 ) ∈ Πi,j that intersects Pe (as in such a case, σ interferes with hv, v 0 i). We get that e appears exactly once on Πi,j and no edge from Pe appears on Πi,j . Finally, we consider the second type of paths in T10 , namely, the Pe0 paths. By construction, every e0 ∈ Xi is in I(T ) and hence that Pe0 and Pe share no tree edge. We get that when replacing the edge (v, s(v)) with Pe all edges e0 ∈ Pe appears and non of the tree edges on Pe co-appear on some other Pe00 . All together, each edge on e ◦ Pe appears on the cycle C exactly once. This completes the cover property. Since the edge e∗ is covered by taking the fundamental cycle of its swap edge, we get that all 0 0 edges of E1,2 are covered. Since each edge (v, s(v)) belongs to one of these E1,2 sets, the cover property is satisfied. Congestion. A very convenient property of our partitioning of T 0 into two trees T10 and T20 is that this partitioning is closed for LCAs. In particular, for j ∈ {1, 2} then if u, v ∈ Tj0 , the LCA of u, v in T 0 is also in Tj0 . Note that this is in contrast to blocks of Section 4.1.1 that are not closed to LCAs. We begin by proving by induction on i = {1, . . . , O(log n)} that all the trees T 0 , T 00 ... considered in the same recursion level i are edge disjoint. In the first level, the claim holds vacuously as there is only the initial tree T . Assume it holds up to level i and consider level i + 1. As each tree Tj in level i − 1 is partitioned into two edge disjoint trees in level i + 1, the claim holds. Note that each edge e = (v, s(v)) is considered exactly once, i.e., in one recursion call on T 0 = T10 ∪ T20 where without loss of generality, v ∈ T10 and s(v) ∈ T20 \ T10 . By Claim 8, there is at 0 , which we cover by taking the fundamental cycle of Swap(e∗ ) in T . most one edge e∗ ∈ E1,2 We first show that the congestion in the collection of all the cycles added in this way is bounded by O(log n). To see this, we consider one level i of the recursion and show that each edge appears on at most 2 of the fundamental cycles Fi added in that level. Consider an edge e∗ that is covered in this way in level i of the recursion. That is the fundamental cycle of Swap(e∗ ) given by π(v ∗ , s(v ∗ )) ∪ Pe∗ was added to Fi . Let T 0 be such that T 0 = T10 ∪ T20 and e∗ = (p(v ∗ ), v ∗ ) is such that v ∗ ∈ T10 and s(v ∗ ) ∈ T20 . Since both v and s(v) are in T 0 , the tree path π(v ∗ , s(v ∗ )) ⊆ T 0 . As all other trees T 00 6= T 0 in level i of the recursion are edge disjoint, they do not have any edge in common with π(v ∗ , s(v ∗ )). For the tree T 0 , there are at most two fundamental cycles that we add. 0 0 . Since e∗ ∈ I(T ), and each One for covering an edge in E1,2 and one for covering an edge in E2,1 8 Since our partitioning into T10 , T20 maintains the layering structure of T , it also holds that Pe is below e on T10 . 26 edge appears on at most two paths Pe , Pe0 for e, e0 ∈ I(T ), overall each edge appears at most twice on each of the cycles in Fi (once in each direction of the edge) and over all the O(log n) of the recursion, the congestion due to these cycles is O(log n). It remains to bound the congestion of all cycles obtained by translating the cycles computed using Algorithm TreeCover. We do that by showing that the cycle collection Ci computed in phase i 0 is an O(D log n, log n) cover. Since there are O(log n) phases and O(log n) to cover the edges of E1,2 levels of recursion, overall it gives an O(D log n, log3 n) cover. Since all trees considered in a given recursion level are edge disjoint, we consider one of them: 0 T . We now focus on phase i of Algorithm TreeCover(T 0 ). In particular, we consider the output 00 for j ∈ {1, 2, 3} computed by Algorithm NonTreeCover for the edges E b1,2 and T 0 . Each cycles Ci,j 2 0 00 edge e ∈ T2 appears on O(log n) cycles of Ci,j . Each virtual edge eb = (s(v1 ), s(v2 )) is replaced by an e Let C 0 be the cycles in G∪ E e s(v1 )-s(v2 ) path P (b e) = (s(v1 ), v1 )◦π(v1 , v2 , T10 )◦(s(v1 ), v1 ) in G∪ E. i,j 00 by replacing the edges of e b1,2 with the paths P (b e Note that every obtained from Ci,j b∈ E e) in G ∪ E. b1,2 . The edges (s(v1 ), v1 ) of E e gets two paths P (b e) and P (b e0 ) are edge disjoint for every eb, eb0 ∈ E 0 used only in tree T in that recursion level. Hence, each edge (v1 , s(v1 )) appears on O(log n) cycles e Since the paths π(v1 , v2 , T 0 ) are edge disjoint, each edge e0 ∈ π(v1 , v2 , T 0 ) appears on C 0 in G ∪ E. 1 1 e (i.e., on the cycles translated from C 00 ∈ C 00 that contains the at most O(log n) cycles C 0 in G ∪ E i,j e appears on edge eb = (s(v1 ), s(v2 ))). Up to this point we get that each virtual edge (v, s(v)) ∈ E 0 . Finally, when replacing (v, s(v)) with the paths P O(log n) cycles of Ci,j (p(v),v) , the congestion in G is increased by factor of at most 2 as every two path Pe and Pe0 for e, e0 ∈ I(T ), are nearly edge disjoint (each edge (z, w) appears on at most twice of these paths, one time in each direction). We get that the cycle collection Ci is an O(D log n, log n) cover, as desired. 4.2 Private Neighborhood Trees We introduce the notion of Private Neighborhood Trees in which the graph G is decomposed into overlapping trees T (u1 ), . . . , T (un ) such that each tree T (ui ) contains the neighbors of ui in G but does not contain ui . Hence, T (ui ) provides the neighbors of ui a way to communicate privately without their root ui . The goal is to compute a collection of trees (or clusters) with small overlap and small diameter. Thus, we are interested in the existence of a low-congestion private neighborhood trees. Definition 6 (Private Neighborhood Trees). Let G = (V = {u1 , . . . , un }, E) be an biconnected graph. The private neighborhood trees N of G is a collection of n subtrees T (u1 ), . . . , T (un ) in G such that for every i ∈ {1, . . . , n} it holds that Γ(ui ) \ {ui } ⊆ T (ui ), but ui ∈ / T (ui ). An (d, c) private neighborhood trees N satisfies: 1. Diam(T (ui )) = O(d) for every i ∈ {1, . . . , n}, 2. Every edge e ∈ E appears in at most O(c) trees. Note that since the graph is biconnected, all nodes of Γ(u) are indeed connected in G \ {u} for every node u. The main challenge is in showing that all n trees can be both of small diameter and with small overlap. Theorem 3 (Private Trees). For every biconnected graph G with maximum degree ∆ and diameter D, there exists a (d, c) private trees with d = O(D · ∆ · log n) and c = O(D · log ∆ · log3 n). 27 In fact we show that given a construction of (d, c) cycle cover C, we can construct an (d · ∆, c · D · log ∆) private neighborhood trees N . In particular, using our construction of (D log n, log3 n) cycle cover C yields the desired bound. The construction of the private neighborhood trees N consists of ` = O(log ∆) phases. In each phase, we compute an (D log n, log3 n) cycle cover in some auxiliary graph using Theorem 1. We start by having for each node u an empty forest F0 (u) = (Γ(u, G), ∅) consisting only of u’s neighbors. Then in each phase, we add edges to these forests so that the number of connected components (containing the neighbors Γ(u, G)) is reduced by factor 2. After O(log ∆) phases, we will have for every u ∈ V , a tree T (u) in G \ {u} that spans all neighbors Γ(u, G). We need some notation. Let C0 be a cycle cover of G. For every i ∈ {0, . . . , `}, let CCi (u) be the number of connected components in the forest Fi (u). In particular, CC0 (u) = deg(u). In each phase i ≥ 1, we are given a collection of forests Ni−1 = {Fi−1 (u1 ), . . . , Fi−1 (un )} such that (I) Fi−1 (uj ) ⊆ G \ {uj }, (II) Γ(uj ) ⊆ V (Fi−1 (uj )) and (III) Fi−1 (uj ) has CCi−1 (uj ) ≤ deg(uj )/2i−1 connected components. The goal of phase i is to add edges to each Fi−1 (uj ) in order to reduce the number of connected components by factor 2. The algorithm uses the current e i which contains the edges of G and some collection of forests Ni−1 to define an auxiliary graph G e i a set of k = CCi−1 (u) virtual additional virtual nodes and edges. For every u ∈ V , we add to G nodes u e1 , . . . , u ek . We connect u to each of its virtual copies u ej and in addition connect the j th virtual copy u ej is connected to all the neighbors of u (in Γ(u, G)) that belong to the j th connected component in the forest Fi−1 (u) ∈ Ni−1 . This is done for every u ∈ G. The final auxiliary graph e i has O(m) nodes, O(m) edges and diameter at most 2D. Note that each edge of G e i has one real G endpoint (i.e., node of G) and one virtual endpoint. Next, the algorithm uses Algorithm CycleCover e i . To map these virtual cycles to real to compute an (D log n, log3 n) cycle cover Cei for the edges of G cycles Ci in G, we simply replace a virtual node u ej with the real node u. As the virtual neighbors of u, namely, u ej , are connected to the neighbors of u, this indeed defines legal cycles in G. Define Gi (u) = Fi−1 (u) ∪ {C | C ∈ Ci and (u, v) ∈ C} \ {u} and let Fi (u) ⊆ Gi (u) be a forest that spans all the neighbors of u. This forest can be computed, for instance, by running a BFS from a neighbor u in each connected component of Gi (u). This completes the description of phase i. The final private tree collection is given by N = {F` (u1 ), . . . , F` (un )}. We now turn to analyze this construction and prove Theorem 3. Small Diameter Trees. We begin by showing that the diameter of each tree T (ui ) is bounded by O(∆D · log n). Note that this bound is existentially tight (up to logarithmic factors) as there are graphs G with diameter D and there is a node u with degree ∆ such that the diameter of G \ {u} is O(∆D). Claim 9. For every i ∈ {0, . . . , log ∆} and for every u ∈ V the number of connected components satisfies CCi (u) ≤ ∆/2i . Proof. The lemma is shown by induction on i. The case of i = 0 holds vacuously. Assume that the ei claim holds up to i − 1 and consider phase i. By construction, for each u, the auxiliary graph G contains CCi−1 (u) virtual nodes u ej that are connected to u. e i covers all these virtual (u, u The cycle cover Cei for G ej ) by virtual cycles, each such cycle e i are connected to neighbors of connects two virtual nodes. Since every two virtual nodes of u in G u that belong to different components in Gi−1 (u), every cycle that connects two virtual neighbors is mapped into a cycle that connects two of u’s neighbors that belong to a different connected 28 component in phase Gi−1 (u). Hence, the number of connected components in the forest Fi (u) has been decreased by factor at least 2 compared to that of Fi−1 (u). Claim 10. The diameter of each tree T (ui ) ∈ N is O(∆ · D · log n). Proof. We first claim that the diameter of each component in the forest Fi (u) is bounded by O(∆ · D · log n) for every u ∈ V and every i ∈ {1, . . . , `}. To see this, note that the forest Fi (u) is formed by collection of O(D log n)-length cycles that connect u’s neighbors. Hence, when removing u, we get paths of length O(D log n). Consider the process where in each phase i, every two u’sneighbors that are connected by a cycle in Ci are connected by a single “edge”. By the Proof of Claim 9, after ` = O(log ∆) phases, we get a connected tree with deg(u) nodes, and hence of “diameter” deg(u). Since each edge corresponds to a path of length O(D log n) in G, we get that the final diameter of F` (u) is O(deg(u) · D · log n). Congestion. Claim 11. Each edge e appears on O(D log3 n) different subgraphs T (ui ) ∈ N . We first show that the cycles Ci computed in G have congestion O(log3 n) for every i ∈ {1, . . . , `}. e i have congestion of O(log3 n). Consider the mapping of cycles Clearly, the cycles Cei computed in G e i to a cycles Ci in G. Edges of the type (u, u Cei in G ej ) are replaced by (u, u) and hence there is no real edge in the cycle. Edges of the type (e uj , w) are replaced by (u, w). Since there is only one virtual node of u that connects to w, and since (e uj , w) appears in O(log3 n) many cycles, also (u, w) 3 appears in O(log n) many cycles (i.e., this conversion does not increase the congestion). Note that the cycle C of each edge (u, v) joins the Gi subgraphs of at most D nodes since in our construction a cycle C might cover up to D edges. (Recall that in Algorithm TreeCover a cycle that covers an a tree edge e, also covers up to D edges on the path Pe ). In addition, each edge e0 appears on different cycles in Ci . We now claim that each edge e appears on O(i log3 n · D) graphs Gi (u). For i = 1, this holds as the cycle C of an edge (u, v) joins the subgraphs G1 (x) and G1 (y) for every edge (x, y) that is covered by C. Assume it holds up to i − 1 and consider phase i. In phase i, we add to the Gi (u) graphs the edges of Ci . Again, each cycle C 0 of an edge (u, v) joins D graphs Gi (x), Gi (y) for every (x, y) that is covered by C 0 . Hence each edge e appears on O(D · log3 n) of the subgraphs Gi (uj ) \ Gi−1 (uj ). By induction assumption, each e appears on (i − 1) log3 n · D graphs Gi−1 (uj ) and hence overall each edge e appears on O(i log3 n) graphs Gi (uj ). Therefore we get that each edge appears on O(log ∆ · log3 n · D) trees in N . 5 Secure Simulation via Low-Congestion Covers In this section we describe how to transform any distributed algorithm A to a new algorithm A0 which has the same functionality as A (i.e., the output for every node u in A is the same as in A0 ) but has perfect privacy (as is defined in Definition 1). Towards this end, we assume that the combinatorial structures required are already computed (in a preprocessing stage), namely, a private neighborhood tree in the graph. The output of the preprocessing stage is given in a distributed manner. The (distributed) output of the private neighborhood trees for each node u, is such that each vertex v knows its parent in the private neighborhood tree of u (if such exists). 29 Theorem 4. Let G be an n-vertex graph with diameter D and maximal degree ∆. Let A be a natural distributed algorithm that works on G in r rounds. Then, A can be transformed to an equivalent e algorithm A0 with perfect privacy which runs in O(rD·poly(∆)) rounds (after a preprocessing stage). As a preparation for our secure simulation, we provide the following convenient view of distributed algorithm. 5.1 Our Framework We treat the distributed r-round algorithm A from the view point of some fixed node u, as a collection of r functions f1 , . . . , fr as follows. Let Γ(u) = {v1 , . . . , vk }. At any round i, the memory of u consists of a state, denoted by σi and ∆ messages mv1 →u . . . , mv∆ →u that were received in the previous round (in the degree of the node is less than ∆ the rest of the messages are empty). Initially, we set σ0 to be a fixed string and initialize all messages to NULL. At round i the node u updates its state to σi+1 according to its previous state σi and the messages that it got in the previous round. It then prepares k messages to send mu→v1 , . . . , mu→v∆ . To ease notation (and without loss of generality) we assume that each state contains the ID of the node u. Thus, we can focus on a single update function fi for every round that works for all nodes. The function fi gets the state σi , the messages mv1 →u . . . , mv∆ →u , and the randomness s. The output of fi is the next state σi+1 , and at most k outgoing messages: (σi , mu→v1 , . . . , mu→v∆ ) ← fi (σi−1 , mv1 →u , . . . , mv∆ →u , s). Our compiler works round-by-round where each round i is replaced by a collection of rounds that “securely” compute fi , in a manner that will be explained next. The complexity of our algorithm depends exponentially on the space complexity of the functions fi . Thus, we proceed by transforming the original algorithm A to one in which each fi can be computed in logarithmic space, while slightly increasing the number of rounds. Claim 12. Any natural distributed algorithm A the runs in r rounds can be transformed to a new algorithm Ab with the same output such that Ab is computable in logarithmic space using r0 = r · poly(∆ + log n) rounds. Proof. Let t be the running time of the function fi . Then, fi can be computed with a circuit of at most t gates. Note that since A is natural, it holds that t ≤ poly(∆, log n). Instead of letting u computing fi in round i, we replace the ith round by t rounds where each round computes only a single gate of the function fi . These new rounds will have no communication at all, but are used merely for computing fi with a small amount of memory. Let g1 , . . . , gt be the gates of the function fi in a computable order where gt is the output of the function. We define a new state σi0 of the form σ 0 = (σi , g1 , . . . , gt ), where σi is the original state, and gj is the value of the jth gate. Initially, g1 , . . . , gt are set to ⊥. Then, for all j ∈ [t] we define the function fij (σi , g1 , . . . , gj−1 , ⊥, . . . , ⊥) = (σi , g1 , . . . , gj−1 , gj , ⊥, . . . , ⊥). In the jth round we compute fij , until the final gt is computed. Note that fij can be computed with logarithmic space, and since t ≤ poly(∆, log n) we can compute fij with space O(log ∆ + b where log log n). As a result, the r-round algorithm A is replaced by an rt-round algorithm A, 0 t ≤ poly(∆, log n). That is, we have that r ≤ poly(∆, log n). 30 As we will see, our compiler will have an overhead of poly(∆, log n) in the round complexity and hence the overhead of Claim 12 is insignificant. Thus, we will assume that the distributed algorithm A satisfies that all its functions fi are computable in logarithmic space (i.e., we assume that the algorithm is already after the above transformation). 5.2 Secure Simulation of a Single Round In the algorithm A each node u computes the function fi in each round i. In our secure algorithm A0 we want to simulate this computation, however, on encrypted data, such that u does not get to learn the true output of fi in any of the rounds except for the last one. When we say “encrypted” data, we mean a “one-time-pad” (see Definition 4). That is, we merely refer to a process where we the data is masked by XORing it with a random string R. Then, R is called the encryption (and also decryption) key. Using this notion, we define a related function fi0 that, intuitively, simulates fi on encrypted data, by getting encrypted state and messages as input, decrypting them, then computing fi and finally encrypting the output with a new key. We simulate every round of the original algorithm A by a PSM protocol for the function fi0 . The Secure Function fi0 . The function fi0 gets the following inputs (encrypted elements will be denoted by the b· notation): 1. An encrypted state σ bi−1 and encrypted messages {m b vj →u }∆ j=1 . 2. The decryption key Rσi−1 of the state σ bi−1 and the decryption keys {Rvj →u }∆ j for the messages ∆ {m b vj →u }j=1 . 3. Shares for randomness {Rsj }∆ j=1 for the function fi . 4. Encryption keys for encrypting the new state Rσi and messages {Ru→vj }∆ j=1 . The function fi0 decrypts the state and messages and runs the function fi (using randomness L j s = Rs ) to get the new state σi and the outgoing messages mu→v1 , . . . , mu→v∆ . Then, it encrypts the new state and messages using the encryption keys. In total, the function fi0 has O(∆) input bits. The precise description of fi0 is given in Figure 13. Recall that in the PSM model, we have k parties p1 , . . . , pk and a server s, where it was assumed that (PI) all parties have private shared randomness (not known to s) and (PII) that each of party has a private communication channel to the server. Our goal is to compute fi0 securely by implementing a PSM protocol for all nodes in the graph simultaneously. We call this implementation a distributed PSM algorithm. The distributed PSM algorithm securely computes fi0 by simulating the PSM protocol for fi0 , treating u as the server and its immediate neighborhood as the parties. Since each party is an immediate neighbor of the server, (PII) is provided easily. Our main efforts is in providing (PI). Towards that goal, we define the notion of private neighborhood trees which provides us the communication backbone for implementing this distributed PSM protocol in general graph topologies for all nodes simultaneously. The private neighborhood tree collection consists of n trees, a tree Tu for every u, that spans all the neighbors of u (i.e., the parties) without going through u, i.e., Tu ⊆ G \ {u}. Using this tree, all the parties can compute shared private random bits R which are not known to u. For 31 The description of the function fi0 .  ∆ Input: An encrypted state σ bi−1 , encrypted messages m b vj →u j=1 , keys for decrypting the input n o∆   ∆ ∆ Rσi−1 , Rvj →u j , randomness Rsj and keys for encrypting the output Rσi , Ru→vj j=1 . j=1 Run: 1. Compute σi−1 ← σ bi−1 ⊕ Rσi−1 and s ← L j ∆ j=1 Rs  . 2. For j = 1 . . . ∆: compute mvj →u ← m b vj →u ⊕ Rvj →u . 3. Run σi , mu→v1 , . . . , mu→v∆ ← f (σi−1 , mv1 →u , . . . , mv∆ →u , s). 4. Compute σbi ← σi ⊕ Rσi . 5. For j = 1 . . . ∆: compute m b u→vj ← mu→vj ⊕ Ru→vj . 6. Output σbi , m b u→v1 , . . . , m b u→v∆ . Figure 13: The function fi0 . a single node u, this can be done in O(Diam(Tu ) + |R|) rounds, where Diam(Tu ) is the diameter of the tree and R is the number of random bits. Clearly, our objective is to have trees Tu with small diameter. Furthermore, as we wish to implement this kind of communication in all n trees, Tu1 , . . . , Tun simultaneously, a second objective is to have small overlap between the trees. That is, we would like each edge e to appear only on a small number of trees Tu (as on each of these trees, the edge is required to pass through different random bits). These two objectives are encapsulated in our notion of private-neighborhood-trees. The final algorithm A0i (u) for securely computing fi0 is described in Figure 14. The algorithm A0i (u) for securely computing fi0 . Input: Each node v ∈ Γ(u) has input xv ∈ {0, 1}m . 1. Let Tu be the tree spanning Γ(u) in G \ {u} and let w be the root. 2. w chooses a random string R and sends it to Γ(u) using the tree Tu . 3. Each node v ∈ Γ(u) computes Mv = PSM.Enc(fi0 , xv , R) and sends it to u.  4. u computes y = PSM.Dec fi0 , {Mv }v∈Γ(u) . Figure 14: The description of the distributed PSM algorithm of node u for securely computing the function fi0 . In what follows analyze the security and round complexity of Algorithm A0i . Round Complexity. Let f : {0, 1}m·|Γ(u)| → {0, 1}` be a function with |Γ(u)| ≤ ∆ inputs, where each input is of length m bits. The communication complexity of the PSM protocol depends on the input and output length of the function and also on the memory required to compute f . Suppose 32 that f is computable by an s-space TM. Then, by Theorem 6 the communication complexity (and randomness complexity) of the protocol is at most O(∆m` · 22s ). In the first phase of the protocol, the root w sends a collection of random bits R to Γ(u) using the private neighborhood trees, where |R| = O(∆ · m · ` · 22s ). By Theorem 3, the diameter of e e the tree is at most O(D∆) and each edge belongs to O(D) different trees. Therefore, there are e total of O(D · |R|) many bits that need to go through a single edge when sending the information on all trees simultaneously. Using the random delay approach of Theorem 5, this can be done in e e · D · m · ` · 22s ) rounds. This is summarized by the following Lemma: O(D∆ + D · |R|) = O(∆ Lemma 4. Let f : ({0, 1}m )∆ → {0, 1}` be a function over ∆ inputs where each is of length at most m and that is computable by a s-space TM. Then, there is a distributed algorithm A0i (u) (in the CONGEST model) with perfect privacy where each node u outputs f evaluated on Γ(u). The e · D · m · ` · 22s ). round complexity of A0i (u) is O(∆ 5.3 The Final Secure Algorithm Using the function fi0 , we define the algorithm A0u for computing the next state and messages of the node u. We describe the algorithm for any u in the graph and at the end we show that all the algorithms {A0u }u∈G can be run simultaneously with low congestion. The algorithm A0u involves running the distributed algorithm A0i (u) for each round i ∈ {1, . . . , r}. The secure simulation of round i starts by letting the root of each tree Tu (i.e., the tree connecting the neighbors of u in G \ {u}) sample a key Rσi for encrypting the new state of u. Moreover, each neighbor vj of u samples a share of the randomness Rsj used to evaluate the function fi , and a key Ru→vj for encrypting the message sent from u to vj . Then they run A0i (u) algorithm with u as the server and Γ(u) as the parties for computing the function fi0 (see Figure 14). The node u has the encrypted state and message, the neighbors of u have the (encryption and decryption) keys for the current state, the next state and the sent messages, and moreover the randomness for evaluating fi0 . At the end of the protocol, u computes the output of fi0 which is the encrypted output of the function fi . After the final round, u holds an encryption of the final state σbr which contains only the output of the original algorithm A. At this point, the neighbors of u send it the decryption key for this last state, u decrypts its state and outputs the decrypted state. Initially, the state σ0 is a fixed string which is not encrypted, and the all encryption keys for this round are assumed to be 0. This description is summarized in Figure 15. Finally, we show that the protocol is correct and secure. Correctness. The correctness follows directly from the construction. Consider a node u in the graph. Originally, u computes the sequence of states σ0 , . . . , σr where σr contained the final output of the algorithm. In the compiled algorithm A0 , for each round i of A and every node u the subalgorithm A0i (u) computes σbi , where σbi = σi ⊕ Rσi where v1 holds Rσi . Thus, after the last round, u has σbr and v1 has Rσr . Finally, u computes σ br ⊕ Rσr = σr and outputs σr as required. Round Complexity. We compute the number of rounds of the algorithm for any natural algorithm A. The algorithm consists of r0 = r · poly(∆ + log n) iterations. In each iteration, every vertex u implements algorithm A0i for the function fi0 (there are other operations in the iteration but they are negligible). We know that fi can be computed in s-space where s = O(log ∆ + log log n), and thus we can bound the size of each input to fi0 by poly(∆) · polylog(n). Indeed, the state has this bound by the definition of a natural algorithm, and thus also the encrypted state (which has the 33 The description of the algorithm A0u . 1. Let v1 , v2 , . . . , v∆ be some arbitrary ordering on Γ(u). 2. For each round i = 1 . . . r do: (a) u sends σ bi−1 to neighbor v2 . (b) Each neighbor vj of u samples Rsj at random (and stores it). (c) v1 chooses Rσi at random (and stores it). (d) Run the Ai (u) algorithm for fi0 with server u and parties Γ(u) where: i. v1 has an inputs Rσi−1 and Rσi and v2 has input σ bi−1 . ii. In addition, each neighbor vj of u has input Ru→vj , Rsj . b u→v∆ ). iii. u learns the final output of the algorithm (σbi , m b u→v1 , . . . , m 3. v1 sends Rσr to u. 4. u computes σr = σ br ⊕ Rσr and outputs σr . Figure 15: The description of the Algorithm A0u . We assume that in “round 0” all keys are initialized to 0. That is, we let Rσ0 = 0, and initially set Rvj →u = 0 for all j ∈ [∆]. exact same size), the messages and encryption keys for the messages have length at most log n, and the randomness shares are of size at most the running time of fi which is at most 2s where s is the space of fi and thus the bound holds. The output length shares the same bound as well. Since fi can be computed in s-space where s = O(log ∆ + log log n), we observe that fi0 can be computed in s-space as well. This includes running fi is a “lazy” manner. That is, whenever the TM for computing fi asks to read a the ith bit of the input, we generate the this bit by performing the appropriate XOR operations for the ith bit of the input elements. The memory required for this is only storing indexes of the input which is log(∆ · poly(log n)) bits and thus s bits suffice. e Then, by Lemma 4 we get that algorithm A0i (u) for fi0 runs in O(D · poly(∆)) rounds, and e the total number of rounds of our algorithm is O(rD · poly(∆)). In particular, if the degree ∆ is e bounded by polylog(n) then we get O(rD) number of rounds. Remark 1 (Round complexity for non-natural algorithms). If A is not a “natural” algorithm then we can bound the number of rounds with dependency on the time complexity of the algorithm. If each function fi (the local computation of the nodes) can be computed by a circuit of size t then the e number of rounds of the compiled algorithm is bounded by O(rDt · poly(∆)). Security. We begin by describing the security of a single sub-protocol A0u for any node u in the graph. The algorithm A0u has many nodes involved, and we begin by showing how to simulate the messages of u. Fix an iteration i, and consider the all the messages sent to u by the PSM protocol in A0i (u) denoted by {Mv }v∈G , and let σbi , m b u→v1 , . . . , m b u→v∆ be the output of the protocol. By the security of the PSM protocol, there is a simulator Sim such that the following two distributions are equal: {Mv }v∈G ≡ Sim(σbi , m b u→v1 , . . . , m b u→v∆ ). 34 b u→v∆ are encrypted by keys that are never sent to u we have that from Since σbi and m b u→v1 , . . . , m b u→v∆ are uniformly random. Thus, the viewpoint of u the distribution of σbi and of m b u→v1 , . . . , m we can run the simulator with a random string R of the same length and have b u→v∆ ) ≡ Sim(R). Sim(σbi , m b u→v1 , . . . , m While this concludes the simulator for u, we need to show a simulator for other nodes that participate in the protocol. Consider the neighbors of u. The neighbor v1 has the encryption key for the state, and v2 has the encrypted state. Since they never exchange this information, each of them gets a uniformly random string. In addition to their own input, the neighbors have the shared randomness for the PSM protocol. All these elements are uniform random strings which can be simulated by a simulator Sim by sampling a random string of the same length. To conclude, the privacy of A0i (u) follows from the perfect privacy of PSM protocol we use. The PSM security guarantees a perfect simulator for the server’s viewpoint, and it is easy to construct a simulator for all other parties in the protocol as they only receive random messages. While the PSM was proven secure in a stand alone setting, in our protocol we have a composition of many instances of the protocol. Fortunately, it was shown in [KLR10] that any protocol that is perfectly secure and has a black-box non-rewinding simulator, is also secure under universal composability, that is, security is guaranteed to hold when many arbitrary protocols are performed concurrently with the secure protocol. We observe that the PSM has a simple simulator that is black-box and non-rewinding, and thus we can apply the result of [KLR10]. This is since the simulator of the PSM protocol is an algorithm that runs the protocol on an arbitrary message that agrees with the output of the function. 6 Distributed Computation of Low Congestion Covers In this section, we describe the distributed algorithms for constructing the low-congestion covering structures. We start by describing the construction of low-congestion cycle cover. 6.1 Cycle Cover We describe Algorithm DistCycleCover which constructs a low congestion cycle cover in the distributed setting. The output of the algorithm is defined as follows: the endpoints of every edge e = (u, v) know all the identifiers of all the edges that are covered by the cycles that go through e. Theorem 2. For every 2-edge connected n-node graph G = (V, E) with diameter D and maximum e 1/ · degree ∆, Algorithm DistCycleCover computes a (41/ · D · log ∆, n log2 n) cycle cover C in O(4 D + n ) rounds for every  ∈ (0, 1). We start by claiming that up to logarithmic factors in the round complexity and in the quality of our cycle cover, it is sufficient to restrict attention to graphs with maximum degree 5. Lemma 5. Let A0 be an algorithm that computes a (d, c) cycle cover for every N -node graph G0 with maximum degree 5 within f (N, d, c, Diam(G)) rounds. Then, there exists an algorithm A that computes a (d log ∆, c) cycle cover for every n-node graph G = (V, E) with maximum degree ∆, within f (|E|, d log ∆, c, Diam(G) · log ∆) rounds. 35 Proof. The 2-edge connected graph G can be transformed to a graph G0 with bounded degree 5 in the following manner: For every node u with degree ` = deg(u), we add in G0 , 2` − 1 many copies u b1 , . . . , u b2`−1 that are connected as follows. The node u is the root of a binary tree Tbu of depth log(deg(u)) and with the leaf nodes u b1 , . . . , u b` which correspond to the Γ(u, G) nodes. That is, each th leaf node u bj corresponds to the j neighbor of u. In addition, all these leaf nodes are connected via a path. The leaf nodes of different trees are connected as follows: the leaf node u bj in Tbu that th corresponds to the j neighbor v ∈ Γ(u, G) is connected to the corresponding copy of u in Tbv , namely, vbi . Overall we get a 2-edge connected graph with Θ(|E(G)|) nodes and Θ(|E(G)|) edges, has maximum degree 5 and is of diameter Θ(log ∆ · Diam(G)). Any round of an algorithm for G0 can be simulated by a single round in the graph G. In addition, any cycle computed in G0 can be easily translated into a cycle in G without increasing the congestion by replacing each virtual copy u bj with the node u. Given Lemma 5, we can assume without loss of generality, that G has maximum degree O(1). As in the centralized construction, we start by constructing a BFS tree T . We first cover all the non-tree edges E 0 using Algorithm DistNonTreeCover, and then cover the tree edges E(T ), using Algorithm DistTreeCover. Since we already assume that we work on bounded degree graphs (by paying an extra factor of log ∆ in the length of the cycles), there is no need for the preliminary step that computes short edge disjoint cycles of length O(log n). 6.1.1 Distributed Algorithm for Covering Non-Tree Edges In this subsection we describe Algorithm DistNonTreeCover that constructs an (21/ · D, n2 ) cycle cover C1 for the non tree edges. We next describe two basic procedures used by algorithm and then describe how to used them to compute the cover. Tool (I): Computing an Hierarchy of Block Partitioning. We are given a BFS tree T , a subset of non-tree edges E 0 and an input parameter  ∈ [0, 1]. Computing the cycle cover is based upon constructing a hierarchy of (E 0 , bi ) block partitioning where bi = m/ni· for every i ∈ {0, . . . , `} where ` = c · d1/e. As in Section 4.1, every block consists of a subset of nodes with consecutive postorder traversal numbering. To see how we can compute the postorder numbering distributively, see Appendix B. We now define the hierarchical block partitioning and then explain how to compute it in a distributed manner. The 0-level of the hierarchy consists of one block containing all nodes. In the ith -level of the hierarchy, each (i − 1)-level block is subdivided into n sub-blocks, each with bounded density of bi = m/ni· . This subdivision is done greedily, going through the nodes in the block from the lowest numbered node to the highest and grouping them into blocks of capacity bi . Just like in the centralized setting, each block either consists of a single node with at least bi edges in E 0 or with a block of bounded density O(bi ). Turning to the distributed implementation, we consider the i-phase for i ≥ 1, where we are given the (i − 1)-level of the partitioning Bi−1,1 , . . . , Bi−1,` such that each node know the ID of the (i − 1)level block Bi,j to which it belongs and the LCA of its block in T (knowing the LCA is important for communicating in the tree TBi−1,j ). Equipped with that knowledge, we now describe how to compute the ith -level of the partitioning. We will work on each block separately but simultaneously. That is, in phase i, we run (simultaneously) a collection of ` algorithms, one per (i − 1)-level block Bi−1,j . From this point on, we focus on one such (i − 1)-block B = Bi−1,j and describe Algorithm PartitionSingleBlock which partitions B into O(n ) blocks, each with bounded density bi . 36 The output of this algorithm is that each node u knows the block IDs and the LCAs of all its blocks in each of O(1/) levels of the hierarchy. Throughout, the density of a subset S ⊆ V is the number of edges in E 0 that have at least one endpoint in S. We say that a block in level i is full if its density is at least bi . We need some notation. Almost all our computation forSa block B are restricted to the subtree in T that connects all B nodes, namely, the subtree TB = u∈B π(u, `, T ) where ` is the LCA of B in T . Note that V (TB ) is not necessarily B, that is, TB might contain nodes that belong to different blocks than B. For u ∈ B, bi (u) is the ID of the i-level block of u. For u ∈ TB (which might not necessarily be in B), let maxB (u) be the node of maximum ID in TB (u) ∩ B (if u ∈ B, then maxB (u) = u). Finally, let b∗i (u) be the i-level block ID of maxB (u). We work from the leaf nodes of TB up the root (i.e., the LCA of B-nodes). Letting DB be the diameter of the tree TB , at step j ≥ 0, we assume that all nodes u in layers DB − j of TB hold the following information: • the block ID b∗i (u), • the LCA of the block b∗i (u), • the density of the block b∗i (u), • the number of i-level blocks in TB (u) ∩ B 9 . These values are trivially computed for all leaf nodes in level DB of TB . We now show how to compute this information in level DB −(j +1). All nodes in layer D −j send their block information to their parents in TB . Consider now a parent u (in layer DB − (j + 1)) and its children in TB ∩ B: v1 , . . . , vk , ordered from left to right. The node u looks for a maximal sequence of children (from left to right) each with only one i-level block in their subtree TB (vp ) ∩ B. For any such maximal sequence, it merges these i-level blocks greedily, by filling up blocks as long as the density of the block is below bi . Once all mergings of i-level blocks of u’s children is done, u can obtain all desired information. If u ∈ B, and the last i-level block of its rightmost child is not completely full (i.e., its density is below bi ), then u joins that block, and otherwise, it opens a new block and the ID of the block is simply the ID of u. Hence, it is easy to see that u has all the required information as it can easily get the density of the block to which it belongs and compute the number of block in TB (u) ∩ B. This completes the description of phase i. After DB rounds of working bottom up on TB , we start working top-down. Here, there is no need to work layer by layer, but rather each node u that just merged the blocks of its children into a full block (with density at least bi ), sends all the information about that block (ID, LCA which is node u) to all its relevant children (whose block got merged) and this information propagates down their tree TB (vp ). Since we only merge subtrees that contain a single i-level block, there is no congestion in propagating the information of the full block down the tree. This completes the description of Algorithm PartitionSingleBlock. We analyze the partitioning algorithm and show: Claim 13. Algorithm PartitionSingleBlock partitions an (i−1)-block Bi−1,j into O(n ) i-level blocks. Proof. Let B 0 = Bi−1,j and T 0 = TB 0 be the subtree of T connecting all nodes of B 0 . Let D0 be the P depth of T 0 . For node u ∈ T 0 , let d(u, B 0 ) = v∈(T 0 (u)∩B 0 ) deg(v, E 0 ). 9 In fact it is sufficient to know if there is exactly one block in TB (u) or more. 37 The blocks are defined bottom up on T 0 . We will claim by induction on the number of round r ≥ 0, that for each node u ∈ V (T 0 ) in layer D0 − r (in T 0 ) the following holds: If T 0 (u) ∩ B 0 (the subtree of u in T 0 ) has more than one block of level i , then for any i-level block in T 0 (u) with density less than bi , either the i-level block before it or after it in T 0 (u) ∩ B 0 has density at least bi . As a result, we will get that that the number of i-level blocks in T (u) ∩ B 0 is at most d(u, B 0 )/bi . Applying this to the root of T 0 (the LCA of the nodes of B 0 ), we get that there are at most deg(B 0 , E 0 )/bi . Since B 0 is a block in level i − 1, we get that deg(B 0 , E 0 ) ≤ m/n·(i−1) and hence, there are at most n i-level blocks. For r = 0, the claim holds vacuously. Assume that it holds up to round r and consider round r + 1. Let u be a node in layer D0 − r + 1 and let v1 , . . . , v` be its children that belongs to B 0 in layer D − r. First, consider all vj with at least two i-level blocks and such that their last block has density less than bi . By induction, we know that each such low-density block has a block of density at least bi before it. All vj with a single i-level block in T 0 (vj ) ∩ B 0 are merged until there is at most one low-density block. We note that if in T 0 (vj ), there are at least two i-level blocks, it implies that either the block right before the block of vj has density of at least b, or that vj ∈ B 0 and deg(vj , E 0 ) ≥ b). Finally, if the i-level block of v` has low-density, u ∈ B 0 and deg(u, E 0 ) ≤ bi , then the number of low-density blocks is not increased and hence the claim holds by induction assumption. We turn to bound the round complexity of the hierarchical partitioning. Claim 14. The hierarchical block partitioning can be computed in O(D) rounds. The algorithm for computing the hierarchical block partitioning has O(1/) steps, where in each step i, we run Algorithm PartitionSingleBlock for each (i − 1)-level block Bi−1,j simultaneously. It is easy to a single application of Algorithm PartitionSingleBlock for one block Bi−1,j in level i − 1 takes O(D) rounds. The next lemma proves Claim 14 by showing that since Algorithm PartitionSingleBlock only communicates on the tree edges TBi−1,j , we can run this algorithm for all the blocks in level i − 1 simultaneously (at the cost of increasing the number of rounds by factor 2). The next lemma is quite general and will be useful later, since most of the computation that we do for blocks B uses only the tree edges TB . Claim 15. Consider the collection of blocks in the i level of the partitioning: B1 , . . . , Bk and A1 , . . . , Ak be a set of algorithms, each takes at most R rounds, and sends messages only on the edges of TBj respectively. Then, all algorithms A1 , . . . , Ak for each of the blocks can run simultaneously in 2R rounds, in the CONGEST model. Proof. By Claim 3, each edge e = (x, y) can appear in at most 2 different blocks Bi , Bj . Hence, the congestion when working on all blocks simultaneously is increased by factor of at most 2 when compared to working on a single block. Tool (II): Edge Disjoint Matching inside a Block. Our next tool uses again Algorithm S TreeEdgeDisjointPath from [Pel00] (see Lemma 4.3.2 within). Recall that TBi = u∈Bi π(`i , u) is the subtree of T that connects all nodes of Bi where ` is the LCA of the nodes in Bi . In the Block Matching Problem we are given a block Bi in the partitioning, a subset of marked nodes Mi ⊆ Bi and a spanning tree T . The goal is to match nodes in Mi (but at most one) into pairs, such that the (unique) tree path in TBi between each pair are all edge disjoint. The distributed output of the 38 problem is that each edge on the path Px,y between a matching pair hx, yi for x, y ∈ Mi knows the endpoints of the path, namely, x and y, and in addition, each node on the path knows the next hops towards x and y respectively. Algorithm DistBlockMatching works in O(Depth(T )) rounds. In the first phase which works from the leafs up, it computes the matching and in the second phase, the edges of the paths between the matched nodes are getting marked. We start by explaining the first phase. We keep the invariant that in round Depth(T ) − i, every node u at layer i in TBi , keeps at most one ID of a node in Mi which is not yet matched. In every round i ≥ 0, each node v sends the ID of at most one unmatched node in TBi (v) to its parent u. A node u in layer Depth(T ) − i + 1 that received more than one ID of marked nodes in Mi , arbitrary match all but at most one of the received nodes into pairs. In D rounds, all (but at most one) nodes of Mi get matched. In the second phase, for every matched pair hx, yi, we mark the edges on its path Px,y . Let v be the node that matched x and y in the first phase. We now let v send this matching outcome back to its children from which it got these IDs (i.e., it sends the pair hx, yi to its children that send it x or y). A node receiving this pair continues to send it to its children who sent it x or y. This message backtracks until it gets to x and y. It is easy to see that all this informed edges (that got an hx, yi message) are precisely the edges on the x − y path in T . Moreover, all these computed paths are edge disjoint and the messages containing the matching result traverses only the edges belonging to the path between the matched pair. If the number of nodes in Mi is not even, then the last unmatched node is matched to an arbitrary (already matched) node. This increases the congestion on the path edges by at most 1. By using Claim 15 we have: Claim 16. (I) The Block Matching problem can be solved in O(Depth(T )) rounds. (II) The Block Matching problem can be solved for all blocks simultaneously in O(Depth(T )) rounds. (III) On each edge e ∈ G, O(1) messages are sent on e in total (throughout the entire execution). Algorithm DistNonTreeCover. As in our centralized construction, we first consider the non-tree edges E 0 = E(G) \ E(T ) and construct a cycle cover C1 for these edges. We begin with an high level description. The algorithm has ` = c · d1/e phases. During each e are added to the set of edges E 0 that we wish to cover. For clarity, in phase, some virtual edges E our description we treat the virtual edges as standard edges in G. Informally speaking, whenever the algorithm adds a virtual edge between two nodes u and v, it implies that the algorithm has already computed an u-v path, and the virtual edge (u, v) indicates the need for computing another u-v path so that we will endup with a cycle. In other words, adding a virtual edge means that we deffer the closure of the cycle to the future iterations. These cycles get completed only at a point where the congestion (or overlap) between cycles can be bounded. ei of virtual edges that In phase i, we are given the set of non-tree edges E 0 in G and a subset E ei should be covered by cycles. The algorithm assumes at that phase that all the edges in E 0 ∪ E between nodes belonging to different j-level blocks for some j ≤ i − 1 are already taken care of ei (in a way that becomes clear later). It then restricts attention to cover the edges (u, v) in E 0 ∪ E between nodes u and v that belong to the same block in all first (i − 1)-levels of the hierarchy, but belong to different blocks in level i. To handle these edges we will have n2 applications of Algorithm DistBlockMatching for each pair of i level blocks Bx and By which belong to the same block in level i−1. The subset of marked nodes in each application of Algorithm DistBlockMatching ei that connect these pair of blocks. Based on the output matching depends on the edges in E 0 ∪ E of Algorithm DistBlockMatching, the algorithm defines a new set of virtual edges which are internal 39 e` are between nodes to the i-level blocks. After ` = c · d1/e phases, the remaining edges in E 0 ∪ E that belong to the same `-level block. As will be shown in the analysis section, at that point the e` that have both endpoint in the same `-level block is O(1). Hence, total number of edges E 0 ∪ E the algorithm covers these remaining edges by taking their fundamental cycles in T . We explain the procedure in more details. The algorithm starts by computing ` = c·d1/e levels of block hierarchies (with respect to the input E 0 of non-tree edges). By letting all nodes exchange their information on their ` blocks with their neighbors, all nodes know which of the E 0 -edges should be considered in a given phase i. (The knowledge about the virtual edges is acquired at the e1 = ∅ be the (empty) set of virtual edges of phase 1. point of their creation). Initially, let E We now focus on phase i ≥ 1 and on one particular (i − 1)-level block B that is partitioned (in level i of the hierarchy) into k = dn e blocks B = {B1 , . . . , Bk }. We assume that we have in addition ei and that each of the endpoints of a virtual edge in E ei knows to E 0 a collection of virtual edges E 0 e about its second endpoint. Let Ei = E ∪ Ei . The goal of each block Bx ∈ B at that phase is to take ei whose second endpoint is in By for every By ∈ B \ Bx . To take care care of all its edges in E 0 ∪ E of these k different types of edges, we run (in Bx ) k applications of Algorithm DistBlockMatching simultaneously. Consider a pair of blocks Bx , By ∈ B, and let Ex,y be the edges in Ei with one endpoint in Bx and one endpoint in By . We divide Ex,y into two subsets. Let Vx,y ⊆ Bx be the nodes in Bx that 1 be the subset of edges in E have at least two incident edges in Ex,y and let Ex,y x,y incident to the 1 nodes of Vx,y . The set of these Ex,y edges are handled locally with a single round of communication. We let each node u ∈ Vx,y , compute an arbitrary matching between its Ex,y -neighbors in By . We ei+1 . To do that, we then connect each of the matched pairs by a virtual edge to be added to E simply let each u ∈ Vx,y send to each of its Ex,y -neighbors in By the ID of their matched node (indicating to them their new virtual edge to this node). 2 = E 1 From now on, we restrict attention to the set of Ex,y x,y \ Ex,y edges, in which each node in Bx has exactly one incident edge in Ex,y . Here we cannot decide locally which virtual edges (between By nodes) should be added. Alternatively, we define a subset of marked nodes Mx,y ⊆ Bx as the nodes in Bx that have exactly one incident edge in Ex,y . Case (I): |Mx,y | = 1. The algorithm covers the single edge between Bx and By in Ex,y by taking its fundamental cycle in T and add it to C1 . Case (II): |Mx,y | ≥ 2. First, if |Mx,y | is odd, the root of TBx picks one edge (u, v) in Ex,y incident to node in Mx,y , add the fundamental cycle of that edge to the cycle cover C1 (i.e., by marking the cycle edges) and omit u from Mx,y . From now on, assume that |Mx,y | is even. The algorithm then applies Algorithm DistBlockMatching on Bx with the marked nodes Mx,y . This algorithm matches the nodes of Mx,y into pairs and mark the edge disjoint paths between these paired nodes on TBx . This pairing of nodes in Mx,y is now used to define the set of virtual edges between nodes of By . In particular, let ha, bi be a matched pair in Mx,y and let (a, a0 ), (b, b0 ) ∈ Ex,y where a0 , b0 ∈ By . The algorithm will connect a0 and b0 in By by a virtual edge to be added to ei+1 . Recall that Algorithm DistBlockMatching computes an edge disjoint path π(a, b, TBx ). If E (a, a0 ), (b, b0 ) are true edges in G it is easy to see how to inform a0 about its virtual endpoint b0 and vice versa. In such a case, we also send the information of the edges (a, a0 ) and (b, b0 ) on the path Wa0 ,b0 = (a0 , a) ◦ π(a, b, TBx ) ◦ π(b, b0 ). This way the edges on the path Pa0 ,b0 of every virtual edge (a0 , b0 ) added know the G-edges that this path (which will become later a cycle) covers. In case where one of the edges (a, a0 ), (b, b0 ) is virtual, say the edge (a, a0 ), the algorithm sends this information using the a-a0 walk Wa,a0 computed in previous phases. These walks are shown to have 40 length at most O(21/ · D) and overlap of O(n ) and hence this information passing on these walks can be done efficiently of all virtual edges simultaneously using the random delay approach. These details are further explained in Appendix B. For an illustration see Figure 17. Overall, for each Bx ∈ B, we run simultaneously10 k applications of Algorithm DistBlockMatching with different subsets of marked nodes Mx,y for every By ∈ B. At the end of all these applications, there are new virtual edges connecting nodes that belong to the same block By . For each such virtual edge, we have computed a path in G between its endpoints. This completes the description of phase i ≤ `. e` such that u and v belong to the In the last phase `, we consider all edges e = (u, v) in E 0 ∪ E same `-level block. We connect these virtual edge endpoints by taking their paths in T . Since each e` already has a walk Wu,v which is shown to be of length O(21/ D), we virtual edge (a, b) ∈ E 0 ∪ E get a cycle Pu,v ◦ π(u, v, T ) which is added to the cycle collection. This cycle is not yet simple but by letting all edges on the cycle learn all the edges of the cycle (using the random delay approach), the cycle can be made simple locally (by internal computation at each node of the cycle) using the centralized algorithm of Section 4.1. In Claim 21 we show that making the cycle simple does not violate the covering property. Further implementation Details are provided in Appendix B. This completes the description of the main algorithm for covering non-tree edges. Let C1 be the output cycle collection. 𝐵𝑥 𝐵𝑦 𝑣′ 𝑢 Figure 16: Dealing with nodes with more than one endpoint in a different block. The node u locally matched its neighbors in By which defines a new set of virtual edges to be covered. 6.1.2 Analysis of Algorithm DistNonTreeCover Congestion and Dilation Analysis. We start by showing that each edge appears on O(1/ · n2 ) cycles. Recall that bi (u) is the i-level block of u and that ` = c · d1/e. For every i = {1, . . . , `} and u ∈ V , let Ei (u) = {(u, v) ∈ Ei | bi−1 (u) = bi−1 (v)} be the set of all u edges in Ei that are internal to its (i − 1)-level block. Note that Algorithm DistNonTreeCover, in phase i, considers only edges S belonging to u Ei (u). Claim 17. The number of edges in E` that have both endpoints in a given `-level block B is O(1). 10 When saying simultaneously we mean using the random delay approach. 41 𝑢′ 𝑣′ 𝑢 𝑣 𝑥′ 𝑦′ 𝑥 𝑦 Figure 17: Illustration of the hierarchical block partitioning and the addition of virtual edges. Top: In phase 1, we have n blocks. Zoom into two blocks B1 and B2 . The pair hu, vi got matched in B1 and hence the virtual edge is added in B2 . Bottom: In phase 2, we consider only internal edges in 2-level blocks. Zoom into B10 and B20 which were part of the same block in level 1. The matched pair hx, yi has two virtual edges to x0 and y 0 respectively and define a new virtual edge between x0 and y 0 . This define a path Px0 ,y0 obtained by concatenating the path Px,x0 , Py,y0 and π(x, y, TB10 ) computed in the tree of B10 . Proof. For every i = {1, . . . , `} and u ∈ V , let degi (u) = |Ei (u)|. We now claim that degi (u) ≥ degi+1 (u) for every i = {1, . . . , `}. To see this, observe that each edge (u, v) ∈ Ei (u) \ Ei+1 (u) (i.e., in this case, bi−1 (u) = bi−1 (v) but bi (u) 6= bi (v)) leads to the introduction of at most one virtual edge (u, v 0 ) ∈ Ei+1 (u) \ Ei (u) where bi (u) = bi (v 0 ). In addition, all the virtual edges added to Ei+1 (u) \ Ei (u) are due to edges in Ei (u) \ Ei+1 (u). Combining these two observations, we get that degi+1 (u) ≤ degi (u). We therefore have that for every u ∈ V , deg1 (u) ≥ deg` (u). By definition E1 (u) = {(u, v) | (u, v) ∈ E 0 } and hence deg1 (u) = deg(u, E 0 ). Let B 0 be an (` −P 1) level block such that B ⊆ B 0 . By the 0 construction of the (` − 1) level P block B , we get that u∈B 0 deg` (u) ≤ b`−1 = O(1). In particular, 0 since B ⊆ B , it also holds that u∈B deg` (u) = O(1), since deg` (u) is the number of u edges in E` whose second endpoint is in the same (` − 1)-level block, it also holds that number of u edges that have both endpoints in its `-level block is bounded by O(1). Let Ci0 be the collection of fundamental cycles added at phase i. Recall that we cover an edge e ∈ Ei by its fundamental cycle in T if the edge e is the only edge in that set the connects two brother blocks Bx and By . Claim 18. Every edge appears on at most O(n2 ) cycles in Ci0 . Proof. Let B1 , . . . , Bk be the collection of all (i − 1)-level blocks. We now consider a particular block Bj which is partitioned into Bj,1 , . . . , Bj,` blocks in level i where ` = O(n ). For such Bj we 42 add at most O(`2 ) fundamental cycles to Ci0 (one per pair of blocks in Bj,1 , . . . , Bj,` ). Note that all these cycles are edges in TBj . By Claim 3, every edge e appears on at the trees of at most two (i − 1)-blocks, hence overall each edge appears in O(n2 ) cycles. We now turn to consider cycles that are computed using the addition of the virtual edges. Claim 19. For each virtual edge (u, v) added in phase i, the algorithm computes a u-v walk Wu,v of length at most 2i · D. In addition, this walk “covers” O(2i ) edges in E 0 . Proof. Both claims are shown by induction on i. For i = 1, when adding a virtual edge (u, v), we have two edges (u, u0 ) and (v, v 0 ) in E 0 such that u, v (resp., u0 , v 0 ) are in the same 1-level block. Using Algorithm DistBlockMatching, we have marked the tree path between u0 and v 0 and hence we have a path Wu,v = (u, u0 ) ◦ π(u0 , v 0 , T ) ◦ (v 0 , v). Clearly, |Wu,v | ≤ 2D + 2. This path covers exactly two edges (u, u0 ) and (v, v 0 ) which proves the claims for the induction base. Assume that the claims hold up to phase i−1 and consider phase i. Here, when adding a virtual edge (u, v) in phase i, same story holds as in the induction phase only that the two edges (u, u0 ) and (v, v 0 ) might be virtual edges that were added in previous phases. The u-v walk is given by Wu,v = Wu,u0 ◦ π(u0 , v 0 , T ) ◦ Wv0 ,v where Wu,u0 , Wv0 ,v is either an edge in G or a walk computed in previous phases. Using the induction assumption, we get that the length of the walk Wu,v at most 2 · 2i−1 · D + 2D ≤ 2i · D. In addition, if (u, u0 ) is a virtual edge, then by induction assumption, Wu,u0 covers at most 2i−1 edges in E 0 and same goes to Wv,v0 . If (u, u0 ) is an edge in E 0 than it covers only itself (same for (v, v 0 )). Overall the walk Wu,v covers 2i edges. The claim follows. Let Wi = {Wu,v | (u, v) ∈ Ei+1 \ Ei } be the collection of all u-v walks between all virtual edges S (u, v) added in phase i. Let W = `i=1 Wi be the collection of all these walks. Claim 20. For every i, each edge e ∈ G appears at most O(i · n ) in total on all walks of Wi (this takes into account the multiple appearance of the edge on the same walk). Hence, overall, each edge e appears O((1/)2 · n ) time on all walks of W. Proof. Recall that we add a virtual edge (u, v) in phase i ≥ 1 for u, v ∈ By , in case where there are edges (u, u0 ), (v, v 0 ) in Ei such that u0 , v 0 are in Bx and Bx and By are brothers (i.e., belong to the same block in level i − 1). Note that for i ≥ 2, the edges (u, u0 ), (v, v 0 ) might be virtual. In any case, we have have u-v walk Wu,v = Wu,u0 ◦ π(u0 , v 0 , T ) ◦ Wv0 ,v where in phase 1, Wu,u0 , Wv,v0 are simply the edges (u, u0 ) and (v, v 0 ). We prove the claim by induction on i. For the base of the induction, consider i = 1. In this case, all walks Wu,v for the virtual edges added at phase 1 are in fact paths. Thus, we only need to bound the number of an edge e on different such paths. Since we have n applications of Algorithm PartitionSingleBlock in each 1-level block, and using Claim 15, we get that each edge e appears on O(n ) different paths in W1 . Assume that the claim holds up to phase i − 1 and consider phase i. Here, we can apply the induction assumption for Wu,u0 and Wv0 ,v (it is sufficient to consider the case where (u, u0 ), (v, v 0 ) are virtual edges added in previous phases, as this is the interesting case). The walk Wu,v has two types of segments: (I) walks connecting virtual edges that were added in phase j ≤ i − 1, namely, Wu,u0 , Wv,v0 and (II) tree segment π(u, v). By the same reasoning as in the base of the induction, each edge e can appear on at most O(n ) tree paths π(u, v) for every virtual edge (u, v) added in phase i. By the induction assumption, each edge e appears at most (i − 1)n times on the collection of walks in Wj for j ≤ i − 1. Hence, overall an edge e appears i · n many time on the walks of Wi . The claim holds. 43 We therefore have: Corollary 1. Every edge appears on O(n2 ) cycles in the final cycle collection. Each cycle has length O(21/ · D) and covers O(21/ ) many non-tree edges. Covering Analysis of Algorithm DistNonTreeCover. Note that the cycles computed are not necessarily simple. We next claim that they can be made simple without loosing the covering property. Recall that in each phase i, for every virtual edge (u, v) added in phase i we compute a walk Wu,v in G. Claim 21. For every virtual edge (u, v), any edge that appears more than once on the walk Wu,v is a T -edge. Proof. The proof is shown by induction on the phase number i. For i = 1, there exists two edges (u, u0 ) and (v, v 0 ) in E 0 such that u, v (resp., u0 , v 0 ) are in the same 1-level block and u0 , v 0 have been paired in their block by Algorithm DistBlockMatching. In this case, Wu,v = (u, u0 ) ◦ π(u0 , v 0 , T ) ◦ (v 0 , v) which is in fact a path!. Assume that the claim holds up to phase i − 1 and consider phase i. For any virtual edge (u, v) added in phase i, there exists two edges (u, u0 ) and (v, v 0 ) in Ei such that u, v (resp., u0 , v 0 ) are in the same i-level block and u0 , v 0 have been paired in their block by Algorithm DistBlockMatching. The only difference to the induction base is that now the edges (u, u0 ) and (v, v 0 ) might be virtual edges added in some phase j ≤ i − 1. In either case Wu,u0 is either an edge (u, u0 ) are of walk for which the induction assumption can be applied. The walk Wu,v = Wu,u0 ◦ π(u0 , v 0 , T ) ◦ Wv0 ,v adds a tree segment π(u0 , v 0 , T ) to the existing walks Wu,u0 , Wv0 ,v . Hence, it can only increase the appearance of the tree edges. Combining with the induction assumption, the claim holds. Claim 22. Every edge e0 ∈ E 0 is covered by the cycles of Algorithm DistNonTreeCover. Proof. By Claim 21, it remains to show that for every edge e0 ∈ E 0 , there is a walk Wu,v such that e0 appears on it. Let e0 = (x, y) and define i to be the first index such that x and y belong to different i-level block. The edge e0 is then considered in phase i of the algorithm. If the algorithm did not cover e0 by taking its fundamental cycle, it implies that i is not the last phase and necessarily some virtual edge was added due to e0 = (w, z). By construction, e0 connects two nodes in the same i-level block and hence will be handled in phase j ≥ i + 1 and in addition, (x, y) appears on the walk Ww,z . We can continue with the argument with the virtual edge (w, z) which is handled only at later phase j, claiming that the edge (x, y) appears when another virtual edge (w0 , z 0 ) is added when considering (w, z) and hence (x, y) appears on the walk Ww0 ,z 0 . This continues until we get to a point where the fundamental cycle of some virtual edge (a, b) such that (x, y) ∈ Wa,b is added and at that point, Claim 21 guarantees that when making the cycle Wa,b ◦ π(a, b, T ) simple the edge (x, y) is covered. Recall that indeed in the last phase ` we handle all remaining edges (also the virtual onces) by taking their fundamental cycles. The claim follows. Round Complexity of Algorithm DistNonTreeCover. e Claim 23. Algorithm DistTreeCover has round complexity O(1/ · (21/ D + n2 )) 44 Proof. By Claim 14, the hierarchical block partitioning can be computed in O(d) rounds. The algorithm has O(1/) phases. We show that each phase can be implemented can in O(21/ D + n ) rounds. We have O(n ) applications of Algorithm DistBlockMatching in each block Bx . Using the random delay approach and Claim 16 all the O(n ) applications in a given block Bx can be done e  + D) rounds. Using Claim 15, this can be done for all blocks in O(n e  + D) rounds as in O(n well. We next bound the number of rounds required to form the virtual edges (a0 , b0 ) and exchange information about the G edges that are covered by the Wa0 ,b0 path. By Claims 19 and 20, using e 2 + 21/ D) rounds. Finally, once the cycles are the random delay approach it can be done in O(n computed, using the random delay approach again, all edges can learn all the cycles that go through e 2 + 21/ D) round and locally make them simple. it in O(n 6.1.3 Distributed Algorithm for Covering Tree Edges We turn to consider the remaining tree edges E(T ). Algorithm DistTreeCover essentially mimics the centralized construction of Section 4.1. Recall that p(v) is the parent of v in the BFS tree T . A non-tree edge e0 = (u0 , v 0 ) is a swap edge for the tree edge e = (p(v), v) if e ∈ π(u0 , v 0 ), let s(v) = v 0 by the endpoint of e0 that is not in T (v). By using the algorithm of Section 4.1 in [GP16], we can make every node v know s(v) in O(D) rounds. A key part in the algorithm of Section 4.1 is the definition of the path Pe = π(v, u0 ) ◦ (u0 , s(v)) for every tree edge e = (p(v), v). By computing swap edges using Section 4.1 in [GP16] all the edges of each Pe get marked. Computing the set I(T ) ⊆ E(T ). We next describe how to compute a maximal collection of tree edges I = {ei } whose paths Pei are edge disjoint and in addition for each edge ej ∈ E(T ) \ I there exists an edge ei ∈ T 0 such that ej ∈ Pei . To achieve this, we start working on the root towards the leaf. In every round i ∈ {1, . . . , D}, we consider only active edges in layer i in T . Initially, all edges are active. An edge becomes inactive in a given round if it receives an inactivation message in any previous round. Each active edge in layer i, say ej , initiates an inactivation message on its path Pej . An inactivation message of an edge ej propagates on the path Pej round by round, making all the corresponding edges on it to become inactive. Note that the paths Pej and Pej 0 for two edges ej and ej 0 in the same layer of the BFS tree, are edge disjoint and hence inactivation messages from different edges on the same layer do not interfere each other. We get that an edge in layer i active in round i only if it did not receive any prior inactivation message from any of its BFS ancestors. In addition, any edge that receives an inactivation message necessarily appears on a path of an active edge. It is easy to see that within D rounds, all active edges I on T satisfy the desired properties (i.e., their Pei paths cover the remaining T edges and these paths are edge disjoint). Distributed Implementation of Algorithm TreeCover. First, we mark all the edges on the Pe paths for every e ∈ I(T ). As every node v with e = (p(v), v) know its swap edge, it can send information along Pe and mark the edges on the path. Since each edge appears on the most two Pe paths, this can be done simultaneously for all e ∈ I(T ). From this point on we follow the steps of Algorithm TreeCover. The partitioning of Appendix A can be done in O(D) rounds as it only required nodes to count the number of nodes in their subtree. We define the ID of each tree T10 , T20 to be the maximum edge ID in the tree (as the trees are edge disjoint, this is indeed an identifier for the tree). By passing information on the Pe paths, each node v can learn the tree ID of its swap endpoint s(v). This allows to partition the edges of T 0 45 0 into Ex,y for x, y ∈ {1, 2}. Consider now the ith phase in the computation of cycle cover C1,2 for 0 . the edges E1,2 Applying Algorithm TreeEdgeDisjointPath can be done in O(D) round. At the end, each node vj knows its matched pair vj0 and the edges on the tree path π(vj , vj0 , T10 ) are marked. Let Σ be the matched pairs. We now the virtual conflict graph GΣ . Each pair hvj , vj0 i ∈ Σ is simulated by the node of higher ID, say, vj . We say that vj is the leader of the pair hvj , vj0 i ∈ Σ. Next, each node v that got matched with v 0 activates the edges on its path Pe ∩ E(T10 ) for e = (p(v), v). Since the π edges of the matched pairs are marked as well, every edge e0 ∈ π(vk , vk0 , T10 ) that belongs to an active path Pe sends the ID of the edge e to the leader of the pair hvk , vk0 i. By Claim 6, every pair σ 0 interferes with at most one other pair and hence there is no congestion and a single message is sent along the edge-disjoint paths π(vj , vj0 , T10 ) for every hvj , vj0 i ∈ Σ. Overall, we get the the construction of the virtual graph can be done in O(D) rounds. We next claim that all leaders of two neighboring pairs σ, σ 0 ∈ GΣ can exchange O(log n) bits of information using O(D) rounds. Hence, any r-round algorithm for the graph GΣ can be simulated in T10 in O(r · D) rounds. To see this, consider two neighbors σ = hx, yi, σ 0 = hx0 , y 0 i where σ 0 interferes σ. Without loss of generality, assume that the leader x0 of σ 0 wants to send a message to the leader x of σ. First, x0 sends the message on the path π(x0 , y 0 , T10 ). The edge e0 ∈ π(x0 , y 0 , T10 )∩Pe for e = (p(x), x) that receives this message sends it to the leader x along the path Pe . Since we only send messages along edge disjoint paths, there is no congestion and can be done in O(D) rounds. Since the graph GΣ has arboricity O(1), it can be colored with O(1) colors and O(log n) rounds using the algorithm of [BE10]. By the above, simulating this algorithm in G takes O(D log n) rounds. We then consider each color class at a time where at step j we consider Σi,j . For every σ = hx, yi, x sends the ID of s(y) to s(x) along the Pe path for e = (p(x), x). In the same manner, y sends the ID of s(x) to s(y). This allows each node in T20 know its virtual edge. At that point we run Algorithm DistNonTreeCover to cover the virtual edges. Each virtual edge is later replaced with a true path in G in a straightforward manner. Analysis of Algorithm DistTreeCover. Claim 24. Algorithm DistTreeCover computes a (21/ D, n log2 n) cycle cover C2 for the tree edges E(T ) and has round complexity of O(21/ D · n · log2 n). Proof. The correctness follows the same line of arguments as in the centralized construction (see the Analysis of Section 4.1.2), only the here we use Algorithm DistNonTreeCover. Each cycle computed by Algorithm DistNonTreeCover has length O(21/ D) and the cycle covers O(21/ ) non-tree edges. In our case, each non-tree edge is virtual and replaced by a path of length O(D) hence the final cycle has still length O(21/ D). With respect to congestion, we have O(log n) levels of recursion and in each level when working on the subtree T 0 we have O(log n) applications of Algorithm DistNonTreeCover which computes cycles with congestion O(n ). The total congestion is then bounded by O(n · log2 n). We proceed with round complexity. The algorithm has O(log n) levels of recursion. In each level we work on edge disjoint trees simultaneously. Consider a tree T 0 . The partitioning into T10 , T20 takes O(D) rounds. We now have O(log n) phases. We show that each phase takes O(21/ D · n ) rounds, which is the round complexity of Algorithm DistNonTreeCover. In particular, In phase i we have the following procedures. Applying Algorithm TreeEdgeDisjointPath in T10 , T20 takes O(D) rounds. The computation of the conflict graph GΣ takes O(D) rounds as well and coloring it using the coloring algorithm for low-arboricity graphs of [BE10] takes O(D log n) rounds. Then we apply 46 e 1/ ·D +n2 ) rounds. Translating the cycles into cycles Algorithm DistNonTreeCover which takes O(2 e 1/ · D + n2 ) rounds. e 1/ · D + n2 ) rounds. Overall, we have O(2 in G takes O(2 Theorem 2 follows by combining Lemma 5 and Claims 23 and 24. 6.2 Additional Low Congestion Covers Private Neighborhood Trees. We now show how to use the distributed construction of cycle covers to construct private neighborhood trees. The distribute output format of private neighborhood trees N is that each node u knows its parent in the spanning tree T (v) ∈ N for every v ∈V. e 1/ · ∆ · D + n · D)-round algorithm that computes an (41/ · D · ∆ · Lemma 6. There exists an O(4 2  log ∆, n · D · log n · log ∆) private neighborhood trees. Proof. We start by running Algorithm DistCycleCover which computes a (d, c) cycle cover C for e + c) rounds, we can make each edge (u, v) d = O(41/ · D) and c = O(n · log2 n). By using O(d know the edges of all the cycles it belongs to in C. We mimic the centralized reduction to cycle cover. In this reduction, we have O(log ∆) applications of Algorithm DistCycleCover on some virtual graph. Since a node v knows the cycles of its edges, it knows which virtual edges it should add in phase i. Simulating the virtual graph can be done with no extra congestion in G. In each phase i, we compute (d, c) cycle cover Ci in G obtained by computing the cycle cover in a virtual graph. By the same argument as in Claim 11, translating these cycles to cycles in G does not increase e + c) rounds, each edge e can learn all the edges on the cycles that pass the congestion. Using O(d through it appears in Ci . At the last phase ` = O(log ∆), the graph G` (uj ) consists of O(log ∆ · ∆) cycles. In particular, G` (uj ) = ` [ {C ∈ Ci | (uj , v) ∈ C, v ∈ Γ(uj , v)}. i=1 By the same argument of Claim 11, each edge e appears on O(log ∆ · log2 n · n · D) different subgraphs G` (uj ) for uj ∈ V . The diameter of each subgraph can G` (uj ) can be clearly bounded by the number of nodes it contained which is O(41/ · log ∆ · ∆ · D). Since each edge e knows all cycles it appears on11 , it also knows all the graphs G` (uj ) to which it belongs. Computing a e 1/ ∆·D) rounds. Using the standard random delay spanning tree in G` (ui )\{ui } can be done in O(4 approach, and using the fact that each edge appears on O(log ∆ · log2 n · n · D), all the spanning e 1/ · ∆ · D + n · D) rounds. trees in G` (uj ) \ {uj } can be construct simultaneously in O(4 By combining our general compiler Theorem 4 with our distributed low-congestion cover of Lemma 6, we get: Corollary 2 (Distributed PSM with no pre-processing). Let G be a 2-vertex connected n-vertex graph with diameter D and maximal degree ∆. Let A be a natural distributed algorithm that runs on G in r rounds. Then, A can be transformed to an equivalent algorithm A0 with perfect privacy √ e · 2 log n · D · poly(∆)) which runs in O(r 11 We say that an edge (u, v) knows a piece of information, if at least one of the edge endpoints know that. 47 6.3 Pre-processing for Improved Cover Structures We next show how the covers of Theorems 1 and 3 with existentially optimal bounds can be e + D · ∆) rounds in the distributed setting. This pre-processing step should constructed using O(n be done only once and any general compiler that will run in the network in the future will be able to use it (i.e., these structures should be computed once for a given network). Lemma 7. For every 2-edge connected n-vertex graph a (D log n, log3 n) cycle cover can be come puted distributively in O(n) rounds of pre-processing. Proof. Compute a BFS tree T and consider the set of non-tree edges E 0 . Let E0 = E 0 . As long that number of edges Ei to be covered in E 0 is at least O(logc n · n), we do as follows in phase i. Let ∆i = |Ei |/n. We partition the edges of Ei into `i = ∆i /(c · log n) edge-disjoint subgraphs by letting each edge in Ei pick a number in [1, `i ] uniformly at random. We have that w.h.p. each subgraph Ei,j contains Θ(n log n) edges of Ei . At the point, we work on each subgraph Ei,j independently. We compute a BFS tree Ti,j in each Ei,j (using only communication on Ei,j edges). We then collect all edges of Ei,j to the root by pipelining these edges on Ti,j . At that point, each root of Ti,j can partition all but 2n edges of Ei,j into edge disjoint cycles of length O(log n). The root also pass these cycle information to the relevant edges using the communication on Ti,j . Note that since the Ei,j subgraphs are disjoint, this can be done simultaneously for all subgraphs Ei,j . At the end of that phase, we are left with 2n · `i = O(|Ei |/ log n) uncovered edges Ei+1 to be handled in the next phase. Overall, after O(log n/ log log n) phases, we are left with O(n log n) uncovered edges. At the point, we can pipeline these edges to the root of the BFS tree, along with the n − 1 edges of the BFS tree and let the root compute it locally as explained in Section 4.1. The lemma follows. Combining this with Lemma 6 we get: Corollary 3. For every biconnected n-vertex graph G = (V, E) with diameter D and maximum degree ∆, an O(D·∆·log n, D·log3 n·log ∆) private neighborhood tree collection N can be constructed e + D · ∆) rounds. using O(n 7 Discussion and Future Work In this paper we introduce a new framework for secure distributed graph algorithms. We present the construction of a general compiler that can turn any natural non-secure distributed algorithm to e · ∆). There are many remaining a secure one, while increasing the round complexity by factor O(D interesting research directions. First, we note that our protocols are secure against an adversary that controls a single node in the graph. To see this, consider an adversary that gets both σ bi and Rσi , decrypts the state and learn additional information. e e An additional research direction involves the distribution computation of (O(D), O(1)) cycle e 1/ · covers in sublinear number of rounds. Our current efficient distributed algorithm obtains (O(4 e  )) cycle covers in O(41/ · D + n ) rounds. We note that computing (O(D), e e D), O(n O(1)) cycle covers boils into the following problem: Given a graph G = (V, E) compute (in the CONGEST model) a maximal collection of edge disjoint O(log n)-length cycles. 48 Note that in the LOCAL model, this problem is easy, and the main challenges comes from the bandwidth limitations of the CONGEST model. Acknowledgments We thank Benny Applebaum, Uri Feige, Moni Naor and David Peleg for fruitful discussions concerning the nature of distributed algorithms, cycle covers and secure protocols. References [ABCP96] Baruch Awerbuch, Bonnie Berger, Lenore Cowen, and David Peleg. Fast distributed network decompositions and covers. Journal of Parallel and Distributed Computing, 39(2):105–114, 1996. [ABCP98] Baruch Awerbuch, Bonnie Berger, Lenore Cowen, and David Peleg. Near-linear time construction of sparse neighborhood covers. SIAM Journal on Computing, 28(1):263– 277, 1998. [AGLP89] Baruch Awerbuch, Andrew V. Goldberg, Michael Luby, and Serge A. Plotkin. Network decomposition and locality in distributed computation. In 30th Annual Symposium on Foundations of Computer Science, Research Triangle Park, North Carolina, USA, 30 October - 1 November 1989, pages 364–369, 1989. [BE10] Leonid Barenboim and Michael Elkin. Sublogarithmic distributed mis algorithm for sparse graphs using nash-williams decomposition. Distributed Computing, 22(5-6):363– 379, 2010. [BE13] Leonid Barenboim and Michael Elkin. Distributed graph coloring: Fundamentals and recent developments. Synthesis Lectures on Distributed Computing Theory, 4(1):1–171, 2013. [BEK14] Leonid Barenboim, Michael Elkin, and Fabian Kuhn. Distributed (δ+1)-coloring in linear (in δ) time. SIAM Journal on Computing, 43(1):72–95, 2014. [BEPS16] Leonid Barenboim, Michael Elkin, Seth Pettie, and Johannes Schneider. The locality of distributed symmetry breaking. Journal of the ACM (JACM), 63(3):20, 2016. [BFH+ 16] Sebastian Brandt, Orr Fischer, Juho Hirvonen, Barbara Keller, Tuomo Lempiäinen, Joel Rybicki, Jukka Suomela, and Jara Uitto. A lower bound for the distributed lovász local lemma. In Proceedings of the forty-eighth annual ACM symposium on Theory of Computing, pages 479–488. ACM, 2016. [BGI+ 14] Amos Beimel, Ariel Gabizon, Yuval Ishai, Eyal Kushilevitz, Sigurd Meldgaard, and Anat Paskin-Cherniavsky. Non-interactive secure multiparty computation. In Advances in Cryptology - CRYPTO 2014 - 34th Annual Cryptology Conference, Santa Barbara, CA, USA, August 17-21, 2014, Proceedings, Part II, pages 387–404, 2014. 49 [BGT13] Elette Boyle, Shafi Goldwasser, and Stefano Tessaro. Communication locality in secure multi-party computation - how to run sublinear algorithms in a distributed setting. In Theory of Cryptography - 10th Theory of Cryptography Conference, TCC 2013, Tokyo, Japan, March 3-6, 2013. Proceedings, pages 356–376, 2013. [BGW88] Michael Ben-Or, Shafi Goldwasser, and Avi Wigderson. Completeness theorems for non-cryptographic fault-tolerant distributed computation (extended abstract). In Proceedings of the 20th Annual ACM Symposium on Theory of Computing, May 2-4, 1988, Chicago, Illinois, USA, pages 1–10, 1988. [BIPW17] Elette Boyle, Yuval Ishai, Rafael Pass, and Mary Wootters. Can we access a database both locally and privately? In Theory of Cryptography - 15th International Conference, TCC 2017, Baltimore, MD, USA, November 12-15, 2017, Proceedings, Part II, pages 662–693, 2017. [BLO16] Aner Ben-Efraim, Yehuda Lindell, and Eran Omri. Optimizing semi-honest secure multiparty computation for the internet. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, Vienna, Austria, October 2428, 2016, pages 578–590, 2016. [BNP08] Assaf Ben-David, Noam Nisan, and Benny Pinkas. FairplayMP: a system for secure multi-party computation. In Proceedings of the 2008 ACM Conference on Computer and Communications Security, CCS 2008, Alexandria, Virginia, USA, October 27-31, 2008, pages 257–266, 2008. [Bol04] Béla Bollobás. Extremal graph theory. Courier Corporation, 2004. [CCD88] David Chaum, Claude Crépeau, and Ivan Damgård. Multiparty unconditionally secure protocols (extended abstract). In Proceedings of the 20th Annual ACM Symposium on Theory of Computing, May 2-4, 1988, Chicago, Illinois, USA, pages 11–19, 1988. [CCG+ 14] Nishanth Chandran, Wutichai Chongchitmate, Juan A. Garay, Shafi Goldwasser, Rafail Ostrovsky, and Vassilis Zikas. Optimally resilient and adaptively secure multi-party computation with low communication locality. IACR Cryptology ePrint Archive, 2014:615, 2014. [CHL+ 17] Yi-Jun Chang, Qizheng He, Wenzheng Li, Seth Pettie, and Jara Uitto. The complexity of distributed edge coloring with small palettes. arXiv preprint arXiv:1708.04290, 2017. [CP17] Yi-Jun Chang and Seth Pettie. A time hierarchy theorem for the local model. FOCS, 2017. [CPS17] Kai-Min Chung, Seth Pettie, and Hsin-Hao Su. Distributed algorithms for the lovász local lemma and graph coloring. Distributed Computing, 30(4):261–280, 2017. [EJ73] Jack Edmonds and Ellis L Johnson. Matching, euler tours and the chinese postman. Mathematical programming, 5(1):88–124, 1973. 50 [EN17] Michael Elkin and Ofer Neiman. Efficient algorithms for constructing very sparse spanners and emulators. In Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 652–669. Society for Industrial and Applied Mathematics, 2017. [Fan97] Genghua Fan. Minimum cycle covers of graphs. Journal of Graph Theory, 25(3):229– 242, 1997. [FG17] Manuela Fischer and Mohsen Ghaffari. Sublogarithmic distributed algorithms for lovász local lemma, and the complexity hierarchy. In 31st International Symposium on Distributed Computing, DISC 2017, October 16-20, 2017, Vienna, Austria, pages 18:1– 18:16, 2017. [FHK16] Pierre Fraigniaud, Marc Heinrich, and Adrian Kosowski. Local conflict coloring. In Foundations of Computer Science (FOCS), 2016 IEEE 57th Annual Symposium on, pages 625–634. IEEE, 2016. [FJS14] Joan Feigenbaum, Aaron D. Jaggard, and Michael Schapira. Approximate privacy: Foundations and quantification. ACM Trans. Algorithms, 10(3):11:1–11:38, 2014. [FKN94] Uriel Feige, Joe Kilian, and Moni Naor. A minimal model for secure computation (extended abstract). In STOC, 1994. [GGG+ 14] Shafi Goldwasser, S. Dov Gordon, Vipul Goyal, Abhishek Jain, Jonathan Katz, FengHao Liu, Amit Sahai, Elaine Shi, and Hong-Sheng Zhou. Multi-input functional encryption. In Advances in Cryptology - EUROCRYPT, pages 578–602, 2014. [Gha15] Mohsen Ghaffari. Near-optimal scheduling of distributed algorithms. In Proceedings of the 2015 ACM Symposium on Principles of Distributed Computing, PODC, pages 3–12, 2015. [Gha16] Mohsen Ghaffari. An improved distributed algorithm for maximal independent set. In Proceedings of the Twenty-Seventh Annual ACM-SIAM Symposium on Discrete Algorithms, pages 270–277. Society for Industrial and Applied Mathematics, 2016. [GMW87] Oded Goldreich, Silvio Micali, and Avi Wigderson. How to play any mental game or A completeness theorem for protocols with honest majority. In Proceedings of the 19th Annual ACM Symposium on Theory of Computing, 1987, New York, New York, USA, pages 218–229, 1987. [GP16] Mohsen Ghaffari and Merav Parter. Near-optimal distributed algorithms for faulttolerant tree structures. In Proceedings of the 28th ACM Symposium on Parallelism in Algorithms and Architectures, pages 387–396. ACM, 2016. [HIJ+ 16] Shai Halevi, Yuval Ishai, Abhishek Jain, Eyal Kushilevitz, and Tal Rabin. Secure multiparty computation with general interaction patterns. In ITCS, pages 157–168, 2016. 51 [HLP11] Shai Halevi, Yehuda Lindell, and Benny Pinkas. Secure computation on the web: Computing without simultaneous interaction. In Advances in Cryptology - CRYPTO 2011 - 31st Annual Cryptology Conference, Santa Barbara, CA, USA, August 14-18, 2011. Proceedings, pages 132–150, 2011. [HSS16] David G Harris, Johannes Schneider, and Hsin-Hao Su. Distributed (+ 1)-coloring in sublogarithmic rounds. In Proceedings of the 48th Annual ACM SIGACT Symposium on Theory of Computing, pages 465–478. ACM, 2016. [II86] Amos Israeli and Alon Itai. A fast and simple randomized parallel algorithm for maximal matching. Information Processing Letters, 22(2):77–80, 1986. [IK97] Yuval Ishai and Eyal Kushilevitz. Private simultaneous messages protocols with applications. In Fifth Israel Symposium on Theory of Computing and Systems, ISTCS 1997, Ramat-Gan, Israel, June 17-19, 1997, Proceedings, pages 174–184, 1997. [JT92] Ury Jamshy and Michael Tarsi. Short cycle covers and the cycle double cover conjecture. Journal of Combinatorial Theory, Series B, 56(2):197–204, 1992. [KLR10] Eyal Kushilevitz, Yehuda Lindell, and Tal Rabin. Information-theoretically secure protocols and security under composition. SIAM J. Comput., 39(5):2090–2112, 2010. [Kus89] Eyal Kushilevitz. Privacy and communication complexity. In 30th Annual Symposium on Foundations of Computer Science, Research Triangle Park, North Carolina, USA, 30 October - 1 November 1989, pages 416–421. IEEE Computer Society, 1989. [Lin92] Nathan Linial. Locality in distributed graph algorithms. SIAM Journal on Computing, 21(1):193–201, 1992. [LMR94] Frank Thomson Leighton, Bruce M Maggs, and Satish B Rao. Packet routing and job-shop scheduling ino (congestion+ dilation) steps. Combinatorica, 14(2):167–186, 1994. [Lub86] Michael Luby. A simple parallel algorithm for the maximal independent set problem. SIAM journal on computing, 15(4):1036–1053, 1986. [NS95] Moni Naor and Larry Stockmeyer. What can be computed locally? SIAM Journal on Computing, 24(6):1259–1277, 1995. [Pel00] David Peleg. Distributed Computing: A Locality-sensitive Approach. SIAM, 2000. [Suo13] Jukka Suomela. Survey of local algorithms. ACM Computing Surveys (CSUR), 45(2):24, 2013. [Yao82] Andrew Chi-Chih Yao. Protocols for secure computations (extended abstract). In 23rd Annual Symposium on Foundations of Computer Science, Chicago, Illinois, USA, 3-5 November 1982, pages 160–164, 1982. 52 A Balanced Partitioning of a Tree We show that every rooted tree T can be partitioned into two edge-disjoint rooted trees T1 and T2 such that (I) E(T1 ) ∪ E(T2 ) = E(T ) and (II) V (T1 ), V (T2 ) ≤ 2/3 · N where N = |T |. In addition, this partitioning maintains the layering structure of T as will be described later. To compute this partitioning, define the weight w(v) of each vertex v in T to be the number of vertices in its subtree T (v). First, consider the case, where there is a vertex v ∗ with weight w(v ∗ ) ∈ [1/3N, 2/3N ]. In such a case, define T1 = Tv∗ and T2 = T \ E(T (v ∗ )). By definition, both T1 and T2 are trees, all edges of T are covered and |T1 |, |T2 | ∈ [1/3N, 2/3N ]. Else, if no such balanced vertex exists, there must be a vertex v ∗ such that w(v ∗ ) ≥ 2/3N but for each of its children in T , ui , it holds that w(ui ) ≤ 1/3N . In such a case, we consider the children of v ∗ from left to right u1 , . . . , uk and sum up their weights until we get to a value in P`the range [1/3N, 2/3N ]. Formally, let ` ∈ {1, . . . , k} be the minimal index satisfying that w(ui ) ∈ [1/3N, 2/3N ]. Since each w(ui ) ≤ 1/3N , such an index ` exists. We then set T1 = S S`i=1 (T (ui ) ∪ {(ui , v ∗ )}) and T2 = T \ `i=1 V (T (ui )). By construction, all edges of T are covered i=1 by T1 and T2 . In addition, by definition, |T1 | ∈ [1/3N, 2/3N ] and hence also T2 ∈ [1/3N, 2/3N ]. Finally, we pick the roots r1 , r2 of T1 , T2 (respectively) to be the vertices the are close-most to the root r in T . We then get for u, v ∈ T1 , that if u is closer to the root than v in T , then also u is closer to the root r1 than v in T1 . B Missing Details for Algorithm DistCycleCover Postorder Numbering on a Tree. Given a BFS tree T , We now show a procedure which assigns the vertices numbers N : V → [1, n] according to a postorder traversal on T in O(D) rounds. Each node u first computes the number of vertices in T (u). This can be done in O(D) rounds by working from the leafs up. At the end, each node also knows the number of nodes in the subtree of each of its children. For a range of integers R = [i, j], let max(R) = j and min(R) = i. By working from root to leaf nodes, each vertex u computes a range R(u), indicating the bucket of post-order numbers given to its vertices in T (u). Let R(s) = [1, n]. Given that a vertex v has received its range R(v), it sends to its children their ranges in the following manner. Let u1 , . . . , u` be the children of v ordered from left to right. Then R(u1 ) = [min(R(v)), min(R(v)) + |T (u1 )| − 1] and for every i ≥ 1, R(ui ) = [max(R(ui−1 )) + 1, max(R(ui−1 )) + |T (ui )|]. This proceeds for O(D) rounds, at the end every u knows R(u). Now, each node u, sets its own number N (u) = max(R(ui )). Since by this numbering, each vertex has the maximum number in its subtree, it is indeed a postorder numbering. Sending Information on Virtual Edges. For every virtual edge (a, a0 ) added in phase i ≥ 1, we show in the analysis section, that there is a precomputed a-a0 walk Wa,a0 in G of length O(2i · D). We assume that in phase i, all the edges on the walk of virtual edge added in phase j ≤ i − 1, are already marked and that each such edge on the walk knows the endpoint of the virtual edges and the edges in G that this walk should cover. The analysis shows that in the virtual edges added in phase i − 1 are important of O(2i−1 ) edges in G. Assume that it is given for all virtual edges added in phase j ≤ i − 1, we now show how the algorithm provides these properties for the virtual edges added in phase i. Assume that both edges (a, a0 ) and (b, b0 ) incident to the matched pair ha, bi are virtual. Then, we send the information on 53 the walks π(a, b, TBx ), Wa,a0 and Wb,b0 . This allows the endpoints of virtual edge a0 , b0 to learn about each other. In addition, by passing the identifiers of the 2i−1 edges that are supposed to be covered by the walks Wa,a0 and Wb,b0 , all the nodes on the new walk Wa0 ,b0 = Wa0 ,a ◦ π(a, b, TBx ) ◦ Wb,b0 can get this information. This is done on for all the virtual edges added in phase i simultaneously using the random delay approach. In the analysis section we show that the length of the walks Wa,a0 is bounded by O(21/ D) and each edge appears on O(n2 ) many paths. Thus using the random delay approach, this can be done in O(21/ · D + n2 ) rounds. Marking Edges on Cycles and Making Them Simple. We first make every edge e (i.e., the endpoints of the edge) know the set of edges that are covered by the cycles that go through e. To do that, the endpoints of the virtual edges keep information of the covered edge endpoints. In phase 1, this is easily obtained since the endpoint of the virtual edges are also the vertices whose two edges should be covered by the cycle. Assuming that this information is kept up to phase i − 1, in phase i, when adding the virtual edge u − v, the combined information traverses through the edge disjoint path π(u, v) computed on the tree of the block. We next make every edge e know all the edges of the cycles that go through e. Since each edge appears on n cycles and the length of the cycles is O(21/ · D), using standard random delay e 2 + 21/ · D) rounds. Once each edge e sees the entire cycle, it techniques, it can be done in O(n can locally correct it to be simple as described in Section 4.1. 54
8cs.DS
arXiv:1703.04410v2 [math.CO] 26 Feb 2018 REFLEXIVE POLYTOPES ARISING FROM PERFECT GRAPHS TAKAYUKI HIBI AND AKIYOSHI TSUCHIYA Abstract. Reflexive polytopes form one of the distinguished classes of lattice polytopes. Especially reflexive polytopes which possess the integer decomposition property are of interest. In the present paper, by virtue of the algebraic technique on Grönbner bases, a new class of reflexive polytopes which possess the integer decomposition property and which arise from perfect graphs will be presented. Furthermore, the Ehrhart δ-polynomials of these polytopes will be studied. Background The reflexive polytope is one of the keywords belonging to the current trends on the research of convex polytopes. In fact, many authors have studied reflexive polytopes from viewpoints of combinatorics, commutative algebra and algebraic geometry. It is known that reflexive polytopes correspond to Gorenstein toric Fano varieties, and they are related with mirror symmetry (see, e.g., [2, 5]). In each dimension there exist only finitely many reflexive polytopes up to unimodular equivalence ([17]) and all of them are known up to dimension 4 ([16]). Moreover, every lattice polytope is a face of a reflexive polytope ([7]). We are especially interested in reflexive polytopes with the integer decomposition property, where the integer decomposition property is particularly important in the theory and application of integer programing [23, §22.10]. A lattice polytope which possesses the integer decomposition property is normal and very ample. These properties play important roles in algebraic geometry. Hence to find new classes of reflexive polytopes with the integer decomposition property is one of the most important problem. For example, the following classes of reflexive polytopes with the integer decomposition property are known: • Centrally symmetric configurations ([20]). • Reflexive polytopes arising from the order polytopes and the chain polytopes of finite partially ordered sets ([11, 13, 14, 15]). • Reflexive polytopes arising from the stable sets polytopes of perfect graphs ([21]). 2010 Mathematics Subject Classification. 13P10, 52B20. Key words and phrases. reflexive polytope, integer decomposition property, perfect graph, Ehrhart δ-polynomial, Gröbner basis. 1 Following the previous work [21] the present paper discusses a new class of reflexive polytopes which possess the integer decomposition property and which arise from perfect graphs. Acknowledgment. The authors would like to thank anonymous referees for reading the manuscript carefully. The second author is partially supported by Grant-in-Aid for JSPS Fellows 16J01549. 1. Perfect graphs and reflexive polytopes Recall that a lattice polytope is a convex polytope all of whose vertices have integer coordinates. We say that a lattice polytope P ⊂ Rd of dimension d is reflexive if the origin of Rd belongs to the interior of P and if the dual polytope P ∨ = {x ∈ Rd : hx, yi ≤ 1, ∀y ∈ P} is again a lattice polytope. Here hx, yi is the canonical inner product of Rd . A lattice polytope P ⊂ Rd possesses the integer decomposition property if, for each integer n ≥ 1 and for each a ∈ nP ∩ Zd , where nP = {na : a ∈ P}, there exist a1 , . . . , an belonging to P ∩ Zd with a = a1 + · · · + an . Let G be a finite simple graph on the vertex set [d] = {1, . . . , d} and E(G) the set of edges of G. (A finite graph G is called simple if G possesses no loop and no multiple edge.) A subset W ⊂ [d] is called stable if, for all i and j belonging to W with i 6= j, one has {i, j} 6∈ E(G). We remark that a stable set is often called an independent set. A clique of G is a subset W ⊂ [d] which is a stable set of the complementary graph G of G. The chromatic number of G is the smallest integer t ≥ 1 for which there exist stable set W1 , . . . , Wt of G with [d] = W1 ∪ · · · ∪ Wt . A finite simple graph G is said to be perfect ([4]) if, for any induced subgraph H of G including G itself, the chromatic number of H is equal to the maximal cardinality of cliques of H. The complementary graph of a perfect graph is perfect ([4]). Let e1 , . . . , ed denote the standard coordinate unit vectors of Rd . Given a subset P W ⊂ [d], we may associate ρ(W ) = j∈W ej ∈ Rd . In particular ρ(∅) is the origin 0d of Rd . Let S(G) denote the set of stable sets of G. One has ∅ ∈ S(G) and {i} ∈ S(G) for each i ∈ [d]. The stable set polytope QG ⊂ Rd of G is the (0, 1)-polytope which is the convex hull of {ρ(W ) : W ∈ S(G)} in Rd . One has dim QG = d. Given lattice polytopes P ⊂ Rd and Q ⊂ Rd of dimension d, we introduce the lattice polytopes Γ(P, Q) ⊂ Rd and Ω(P, Q) ⊂ Rd+1 with Γ(P, Q) = conv{P ∪ (−Q)}, Ω(P, Q) = conv{(P × {1}) ∪ (−Q × {−1})}. It is natural to ask when Γ(QG1 , QG2 ) is reflexive and when Ω(QG1 , QG2 ) is reflexive, where G1 and G2 are finite simple graphs on [d]. The former is completely solved by [21] and the later is studied in this paper. In fact, 2 Theorem 1.1. Let G1 and G2 be finite simple graphs on [d]. (a) ([21]) The following conditions are equivalent: (i) The lattice polytope Γ(QG1 , QG2 ) is reflexive; (ii) The lattice polytope Γ(QG1 , QG2 ) is reflexive and possesses the integer decomposition property; (iii) Both G1 and G2 are perfect. (b) The following conditions are equivalent: (i) The lattice polytope Ω(QG1 , QG2 ) possesses the integer decomposition property; (ii) The lattice polytope Ω(QG1 , QG2 ) is reflexive and possesses the integer decomposition property; (iii) Both G1 and G2 are perfect. A proof of part (b) will be achieved in Section 2. It would, of course, be of interest to find a complete characterization for Ω(QG1 , QG2 ) to be reflexive. For a finite simple graph G on [d], Ω(QG , QG ) is called the Hansen polytope H(G) of G. This polytope possesses nice properties (e.g., centrally symmetric and 2-level) and is studied in [6, 22]. Especially, in [6], it is shown that if G is perfect, then H(G) is reflexive. Theorem 1.1 (b) says that G is perfect if and only if the Hansen polytope H(G) possesses the integer decomposition property. If G1 and G2 are not perfect, Γ(QG1 , QG2 ) may not possess the integer decomposition property (Examples 4.1 and 4.2). Furthermore, if G1 and G2 are not perfect, Ω(QG1 , QG2 ) may not be reflexive (Examples 4.2 and 4.3). We now turn to the discussion of Ehrhart δ-polynomials of Γ(QG1 , QG2 ) and Ω(QG1 , QG2 ). Let, in general, P ⊂ Rd be a lattice polytope of dimension d. The Ehrhart δ-polynomial of P is the polynomial # " ∞ X | nP ∩ Zd | λn δ(P, λ) = (1 − λ)d+1 1 + n=1 in λ. Each coefficient of δ(P, λ) is a nonnegative integer and the degree of δ(P, λ) is at most d. In addition δ(P, 1) coincides with the normalized volume of P, denoted by vol(P). Refer the reader to [9, Part II] for the detailed information about Ehrhart δpolynomials. Moreover, in [1], the Ehrhart theory for stable set polytopes is studied. b on The suspension of a finite simple graph G on [d] is the finite simple graph G b = E(G) ∪ {{i, d + 1} : i ∈ [d]}. We obtain the following theorem. [d + 1] with E(G) Theorem 1.2. Let G1 and G2 be finite perfect simple graphs on [d]. Then one has δ(Ω(QG1 , QG2 ), λ) = δ(Γ(QGc1 , QGc2 ), λ) = (1 + λ)δ(Γ(QG1 , QG2 ), λ). Thus in particular vol(Ω(QG1 , QG2 )) = vol(Γ(QGc1 , QGc2 )) = 2 · vol(Γ(QG1 , QG2 )). 3 A proof of Theorem 1.2 will be given in Section 3. Even though the Ehrhart δ-polynomial of Ω(QG1 , QG2 ) coincides with that of Γ(QGc1 , QGc2 ), Ω(QG1 , QG2 ) may not be unimodularly equivalent to Γ(QGc1 , QGc2 ) (Example 4.4). 2. Squarefree Gröbner basis In this section, we prove Theorem 1.1 by using the theory of Gröbner bases and toric ideals. At first, we recall basic materials and notation on toric ideals. Let ±1 K[t±1 , s] = K[t±1 1 , . . . , td , s] denote the Laurent polynomial ring in d + 1 variables over a field K. For an integer vector a = [a1 , . . . , ad ]⊤ ∈ Zd , the transpose of [a1 , . . . , ad ], ta s is the Laurent monomial ta11 · · · tadd s ∈ K[t±1 , s]. Given an integer d × n matrix A = [a1 , . . . , an ], where aj = [a1j , . . . , adj ]⊤ is the jth column of A, then we define the toric ring K[A] of A as follows: K[A] = K[ta1 s, . . . , tan s] ⊂ K[t±1 , s]. Let K[x] = K[x1 , . . . , xn ] be the polynomial ring in n variables over K and define the surjective ring homomorphism π : K[x] → K[A] by setting π(xj ) = taj s for j = 1, . . . , n. The toric ideal of A is the kernel IA of π. Let < be a monomial order on K[x] and in< (IA ) the initial ideal of IA with respect to <. The initial ideal in< (IA ) is called squarefree if in< (IA ) is generated by squarefree monomials. The reverse lexicographic order on K[x] induced by the ordering xn <rev · · · <rev x1 is the total order <rev on the set of monomials in the variables x1 , x2 , . . . , xn Pn P by setting xa11 xa22 · · · xann <rev xb11 xb22 · · · xbnn if either (i) ni=1 ai < i=1 bi , or (ii) Pn Pn i=1 ai = i=1 bi and the rightmost nonzero component of the vector (b1 − a1 , b2 − a2 , . . . , bn − an ) is negative. A reverse lexicographic order is also called a graded reverse lexicographic order. Please refer [10, Chapters 1 and 5] for more details on Gröbner bases and toric ideals. Let Zd≥0 denote the set of integer column vectors [a1 , . . . , ad ]⊤ with each ai ≥ 0, and let Zd×n ≥0 denote the set of d × n integer matrices (aij ) 1≤i≤d with each aij ≥ 0. 1≤j≤n d×m In [21], the concept that A ∈ Zd×n are of of harmony is introduced. ≥0 and B ∈ Z≥0 (+) (+) For an integer vector a = [a1 , . . . , ad ]⊤ ∈ Zd , let a(+) = [a1 , . . . , ad ]⊤ , a(−) = (−) (−) (+) (−) [a1 , . . . , ad ]⊤ ∈ Zd≥0 where ai = max{0, ai } and ai = max{0, −ai }. Note that d×m a = a(+) − a(−) holds in general. Given A ∈ Zd×n such that the zero ≥0 and B ∈ Z≥0 ⊤ d vector 0d = [0, . . . , 0] ∈ Z is a column in each of A and B, we say that A and B are of harmony if the following condition is satisfied: Let a be a column of A and b that of B. Let c = a − b ∈ Zd . If c = c(+) − c(−) , then c(+) is a column vector of A and c(−) is a column vector of B. Now we prove the following theorem. d×m Theorem 2.1. Let A = [a1 , . . . , an ] ∈ Zd×n ≥0 and B = [b1 , . . . , bm ] ∈ Z≥0 , where an = bm = 0d ∈ Zd , be of harmony. Let K[x] = K[x1 , . . . , xn ] and K[y] = K[y1 , . . . , ym ] be the polynomial rings over a field K. Suppose that in<A (IA ) ⊂ K[x] 4 and in<B (IB ) ⊂ K[y] are squarefree with respect to reverse lexicographic orders <A on K[x] and <B on K[y] respectively satisfying the condition that • xi <A xj if for each 1 ≤ k ≤ d aki ≤ akj . • xn is the smallest variable with respect to <A . • ym is the smallest variable with respect to <B . Let [−B, A]∗ denote the (d + 1) × (n + m + 1) integer matrix   −b1 · · · −bm a1 · · · an 0d . −1 · · · −1 1 · · · 1 0 Then the toric ideal I[−B,A]∗ of [−B, A]∗ possesses a squarefree initial ideal with respect to a reverse lexicographic order whose smallest variable corresponds to the column 0d+1 ∈ Zd+1 of [−B, A]∗ . Proof. Let I[−B,A]∗ ⊂ K[x, y, z] = K[x1 , . . . , xn , y1 , . . . , ym , z] be the toric ideal of [−B, A]∗ defined by the kernel of ±1 π ∗ : K[x, y, z] → K[[−B, A]∗ ] ⊂ K[t±1 1 , . . . , td+1 , s] with π ∗ (z) = s, π ∗ (xi ) = tai td+1 s for i = 1, . . . , n and π ∗ (yj ) = t−bj t−1 d+1 s for j = 1, . . . , m. Assume that the reverse lexicographic orders <A and <B are induced by the orderings xn <A · · · <A x1 and ym <B · · · <B y1 . Let <rev be the reverse lexicographic order on K[x, y, z] induced by the ordering z <rev xn <rev · · · <rev x1 <rev ym <rev · · · <rev y1 . In general, for an integer vector a = [a1 , . . . , ad ]⊤ ∈ Zd , we let supp(a) = {i : 1 ≤ i ≤ d, ai 6= 0}. Set the following: E = { (i, j) : 1 ≤ i ≤ n, 1 ≤ j ≤ m, supp(ai ) ∩ supp(bj ) 6= ∅ }. If c = ai − bj with (i, j) ∈ E, then it follows that c(+) 6= ai and c(−) 6= bj . Since A and B are of harmony, we know that c(+) is a column of A and c(−) is a column of B. It follows that f = xi yj − xk yℓ (6= 0) belongs to I[−B,A]∗ , where c(+) = ak and c(−) = bℓ . Then since for each 1 ≤ c ≤ d, ack ≤ aci , one has xk <A xi and in<rev (f ) = xi yj . Hence { xi yj : (i, j) ∈ E } ⊂ in<rev (I[−B,A]∗ ). Moreover, it follows that xn ym − z 2 ∈ I[−B,A]∗ and xn ym ∈ in<rev (I[−B,A]∗ ). We set M = {xn ym } ∪ { xi yj : (i, j) ∈ E } ∪ MA ∪ MB ( ⊂ in<rev (I[−B,A]∗ ) ), where MA (resp. MB ) is the minimal set of squarefree monomial generators of in<A (IA ) (resp. in<B (IB )). Let G be a finite set of binomials belonging to I[−B,A]∗ with M = {in<rev (f ) : f ∈ G}. Now, we prove that G is a Gröbner base of in<rev (I[−B,A]∗ ) with respect to <rev . By the following fact ([19, (0.1), p. 1914]) on Gröbner bases, we must prove the 5 following assertion: If u and v are monomials belonging to K[x, y, z] with u 6= v such that u ∈ / (in< (g) : g ∈ G) and v ∈ / (in< (g) : g ∈ G) , then π ∗ (u) 6= π ∗ (v). Suppose that there exists a nonzero irreducible binomial g = u − v be belonging / (in< (g) : g ∈ G) and v ∈ / (in< (g) : g ∈ G). Write to I[−B,A]∗ such that u ∈ ! ! ! ! Y j′ ′ Y Y Y i′ ′ yqq′ , xpp′ u= xipp yqjq , v = z α p∈P p′ ∈P ′ q∈Q q ′ ∈Q where P and P ′ are subsets of [n], Q and Q′ are subsets of [m], α is a nonnegative integer, and each of ip , jq , i′p′ , jq′ ′ is a positive integer. Since g = u − v is irreducible, one has P ∩ P ′ = Q ∩ Q′ = ∅. Furthermore, by the fact that each of xi yj with (i, j) ∈ E can divide neither u nor v, it follows that ! ! ! ! [ [ [ [ supp(bq′ ) = ∅. supp(ap′ ) ∩ supp(ap ) ∩ supp(bq ) = p∈P q ′ ∈Q′ p′ ∈P ′ q∈Q Hence, since π ∗ (u) = π ∗ (v), it follows that X X X X ip ap = jq bq = i′p′ ap′ , jq′ ′ bq′ . P p∈P P p′ ∈P ′ q ′ ∈Q′ q∈Q P P Let ξ = p∈P ip , ξ ′ = p′ ∈P ′ i′p′ , ν = q∈Q jq , and ν ′ = q′ ∈Q′ jq′ ′ . Then ξ + ν = ξ ′ + ν ′ + α. Since α ≥ 0, it follows that either ξ ≥ ξ ′ or ν ≥ ν ′ . Assume that ξ > ξ ′. Then ! Y Y i′ ′ ′ h= xipp − xnξ−ξ xpp′ p′ ∈P ′ p∈P Q i belongs to IA and I[−B,A]∗ . If h 6= 0, then in<A (h) = in<rev (h) = p∈P xpp divides u, a contradiction. Hence P = {n} and Q = ∅. If ξ = ξ ′ , then the binomial Y Y i′ ′ xpp′ h0 = xipp − p′ ∈P ′ p∈P Q Q i′ ′ i belongs to IA and I[−B,A]∗ . Moreover, if h0 6= 0, then either p∈P xpp or p′ ∈P ′ xpp′ must belong to in<A (IA ) and in<rev (I[−B,A]∗ ). This contradicts the fact that each of u and v can be divided by none of the monomials belonging to M. Hence h0 = 0 and P = P ′ = ∅. Similarly, Q = {m} and Q′ = ∅, or Q = Q′ = ∅. Hence we know ℓ − z α , where k and ℓ are nonnegative integers. Since u cannot be that g = xkn ym divided by xn ym , it follows that g = 0, a contradiction. Therefore, G is a Gröbner  base of in<rev (I[−B,A]∗ ) with respect to <rev . Now, we recall the following lemma. Lemma 2.2 ([12, Lemma 1.1]). Let P ⊂ Rd be a lattice polytope of dimension d such that the origin of Rd is contained in its interior and P ∩ Zd = {a1 , . . . , an }. Suppose that any integer point in Zd+1 is a linear integer combination of the integer 6 points in P × {1} and there exists an ordering of the variables xi1 < · · · < xin for which ai1 = 0d such that the initial ideal in< (IA ) of the toric ideal IA with respect to the reverse lexicographic order < on the polynomial ring K[x1 , . . . , xn ] induced by the ordering is squarefree, where A = [a1 , . . . , an ]. Then P is a reflexive polytope which possesses the integer decomposition property. By Theorem 2.1 and this lemma, we obtain the following corollary. Corollary 2.3. Work with the same situation as in Theorem 2.1. Let P ⊂ Rd+1 be the lattice polytope of dimension d + 1 with          a1 an −b1 −bm d+1 P ∩Z = ,..., , ,..., , 0d+1 . 1 1 −1 −1 Suppose that 0d+1 ∈ Zd+1 belongs to the interior of P and any integer point in Zd+2 is a linear integer combination of the integer points in P ×{1}. Then P is a reflexive polytope which possesses the integer decomposition property. Recall that an integer matrix A is compressed ([18], [24]) if the initial ideal of the toric ideal IA is squarefree with respect to any reverse lexicographic order. Finally, we prove Theorem 1.1. Proof of Theorem 1.1. For a finite simple graph G on [d], let AS(G) be the matrix whose columns are those ρ(W ) with W ∈ S(G). If W ∈ S(G), then each subset of W is also a stable set of G. This means that S(G) is a simplicial complex on [d]. Hence it is easy to show that AS(G1 ) and AS(G2 ) are of harmony. Moreover, for any perfect graph G, AS(G) is compressed ([18, Example 1.3 (c)]). Let P ⊂ Rd+1 be the convex hull of {±(e1 + ed+1 ), . . . , ±(ed + ed+1 ), ±ed+1 }. Then it follows that 0d+1 ∈ Zd+1 belongs to the interior of P and any integer point in Zd+2 is a linear integer combination of the integer points in P × {1}. Moreover, we have P ⊂ Ω(QG1 , QG2 ). This implies that 0d+1 ∈ Zd+1 belongs to the interior of Ω(QG1 , QG2 ) and any integer point in Zd+2 is a linear integer combination of the integer points in Ω(QG1 , QG2 ) × {1}. On the other hand, one has 1 Ω(QG1 , QG2 ) ∩ {[a1 , . . . , ad+1 ]⊤ ∈ Rd+1 : ad+1 = 0} = (QG1 − QG2 ) × {0}. 2 1 Since (QG1 − QG2 ) ∩ Zd = {0d }, we obtain 2       a −b d+1 d d Ω(QG1 , QG2 )∩Z = : a ∈ QG1 ∩ Z ∪ : b ∈ QG2 ∩ Z ∪{0d+1 }. 1 −1 Hence, by Corollary 2.3, if G1 and G2 are perfect, Ω(QG1 , QG2 ) is a reflexive polytope which possesses the integer decomposition property. Next, we prove that if G1 is not perfect, then Ω(QG1 , QG2 ) does not possess the integer decomposition property. Assume that G1 is not perfect and Ω(QG1 , QG2 ) possesses the integer decomposition property. By the strong perfect graph theorem 7 ([4]), G1 possesses either an odd hole or an odd antihole, where an odd hole is an induced odd cycle of length ≥ 5 and an odd antihole is the complementary graph of an odd hole. Suppose that G1 possesses an odd hole C of length 2ℓ + 1, where ℓ ≥ 2 and we regard C as a finite graph on [d]. We may assume that the edge set of C is {{i, i + 1} : 1 ≤ i ≤ 2ℓ} ∪ {1, 2ℓ + 1}. Then the maximal stable sets of C in [2ℓ + 1] are S1 = {1, 3, . . . , 2ℓ − 1}, S2 = {2, 4, . . . , 2ℓ}, . . . , S2ℓ+1 = {2ℓ + 1, 2, 4, . . . , 2ℓ − 2} and each i ∈ [2ℓ + 1] appears ℓ times in the above list. For 1 ≤ i ≤ 2ℓ + 1, we set P vi = j∈Si ej + ed+1 . Then one has v1 + · · · + v2ℓ+1 + (−ed+1 ) = e1 + · · · + e2ℓ+1 + 2ed+1 . ℓ Since 2 < (2ℓ + 2)/ℓ ≤ 3, a ∈ 3Ω(QG1 , QG2 ). Hence there exist a1 , a2 , a3 ∈ Ω(QG1 , QG2 ) ∩ Zd+1 such that a = a1 + a2 + a3 . Then we may assume that a1 , a2 ∈ QC × {1} and a3 = 0d+1 . However, since the maximal cardinality of the stable sets of C in [2ℓ + 1] equals ℓ, a contradiction. Suppose that G1 possesses an odd antihole C such that the length of C equals 2ℓ+1, where ℓ ≥ 2 and we regard C as a finite graph on [d]. Similarly, we may assume that the edge set of C is {{i, i + 1} : 1 ≤ i ≤ 2ℓ} ∪ {1, 2ℓ + 1}. Then the maximal stable sets of C are the edges of C. For 1 ≤ i ≤ 2ℓ, we set wi = ei + ei+1 + ed+1 and set w2ℓ+1 = e1 + e2ℓ+1 + ed+1 . Then one has a= b= w1 + · · · + w2ℓ+1 + (−ed+1 ) = e1 + · · · + e2ℓ+1 + ℓed+1 2 and b ∈ (ℓ + 1)Ω(QG1 , QG2 ). Hence there exist b1 , . . . , bℓ+1 ∈ Ω(QG1 , QG2 ) ∩ Zd+1 such that b = b1 + · · · + bℓ+1 . Then we may assume that b1 , . . . , bℓ ∈ QC × {1} and bℓ+1 = 0d+1 . However, since the maximal cardinality of the stable sets of C in [2ℓ + 1] equals 2, a contradiction. Therefore, if Ω(QG1 , QG2 ) possesses the integer decomposition property, then G1 and G2 are perfect, as desired.  3. Ehrhart δ-polynomials In this section, we consider the Ehrhart δ-polynomials and the volumes of the polytopes Ω(QG1 , QG2 ) and Γ(QG1 , QG2 ), in particular, we prove Theorem 1.2. Let P ⊂ Rd be a lattice polytope of dimension d with P ∩ Zd = {a1 , . . . , an }. Set A = [a1 , . . . , an ]. We define the toric ring K[P] and the toric ideal IP of P by K[A] and IA . In order to prove Theorem 1.2, we use the following facts. • If P possesses the integer decomposition property, then the Ehrhart polynomial | nP ∩ Zd | of P is equal to the Hilbert polynomial of the toric ring K[P]. 8 • Let S be a polynomial ring and I ⊂ S be a graded ideal of S. Let < be a monomial order on S. Then S/I and S/in< (I) have the same Hilbert function. (see [8, Corollary 6.1.5]). Now, we prove the following theorem. Theorem 3.1. Work with the same situation as in Theorem 2.1. Let P ⊂ Rd be the lattice polytope with P ∩ Zd = {a1 , . . . , an } and Q ⊂ Rd the lattice polytope with Q ∩ Zd = {b1 , . . . , bm }. Suppose that any integer point in Zd+1 is a linear integer combination of the integer points in Γ(P, Q) × {1}, any integer point in Zd+2 is a linear integer combination of the integer points in Ω(P, Q) × {1}, Γ(P, Q) ∩ Zd = {a1 , . . . , an−1 , −b1 , . . . , −bm−1 , 0d } and d+1 Ω(P, Q) ∩ Z =  a1 1  ,...,  an 1       −b1 −bm , ,..., , 0d+1 . −1 −1 Then we obtain δ(Ω(P, Q), λ) = (1 + λ)δ(Γ(P, Q), λ). In particular, vol(Ω(P, Q)) = 2 · vol(Γ(P, Q)). Proof. Set R = conv{Γ(P, Q) × {0}, ±ed+1 }. Then it follows from [3, Theorem 1.4] that δ(R, λ) = (1 + λ)δ(Γ(P, Q), λ). Moreover, by [21, Theorem 1.1] and Theorem 2.1, R and Ω(P, Q) possess the integer decomposition property. Hence we should show that K[R] and K[Ω(P, Q)] have the same Hilbert function. Now, use the same notation as in the proof of Theorem 2.1. Then we have K[x, y, z] K[x, y, z] = . in<ref (IΩ(P,Q) ) (M) Set # # " "   b a i i        0 , 1 ≤ j ≤ m − 1,  0 , 1 ≤ i ≤ n − 1, ′ ′ and bj = ai = ed+1 , ed+1 , j = m, i = n,         0d+1 , j = m + 1. 0d+1 , i = n + 1, Then it is easy to show that A′ = [a′1 , . . . , a′n+1 ] and B ′ = [b′1 , . . . , b′m+1 ] are of harmony. Moreover, in<B′ (IB′ ) ⊂ K[y1 , . . . , ym+1 ] and in<A′ (IA′ ) ⊂ K[x1 , . . . , xn+1 ] are squarefree with respect to reverse lexicographic orders <A′ on K[x1 , . . . , xn+1 ] and <B′ on K[y1 , . . . , ym+1 ] induced by the orderings xn+1 <A′ xn <A′ · · · <A′ x1 and ym+1 <B′ ym <B′ · · · <B′ y1 . Now, we introduce the following: E ′ = { (i, j) : 1 ≤ i ≤ n, 1 ≤ j ≤ m, supp(a′i ) ∩ supp(b′j ) 6= ∅ }. 9 Then we have E ′ = E ∪ {(n, m)}. Let MA′ (resp. MB′ ) be the minimal set of squarefree monomial generators of in<A′ (IA′ ) (resp. in<B′ (IB′ )). Then it follows that MA′ = MA and MB′ = MB . This says that M = E ′ ∪ MA′ ∪ MB′ . By the proof of [21, Theorem 1.1], we obtain in<rev (IR ) = (M) ⊂ K[x, y, z]. Hence it follows that K[x, y, z] K[x, y, z] = . in<rev (IΩ(P,Q) ) in<rev (IR ) Therefore, K[R] and K[Ω(P, Q)] have the same Hilbert function, as desired.  Now, we prove Theorem 1.2. b = S(G) ∪ Proof of Theorem 1.2. For any finite simple graph G on [d], we have S(G) {d + 1}. Hence it follows that Γ(QGc1 , QGc2 ) = conv{Γ(QG1 , QG1 ) × {0}, ±ed+1 }. Therefore, by Theorem 3.1, we obtain δ(Ω(QG1 , QG2 , λ) = δ(Γ(QGc1 , QGc2 ), λ) = (1 + λ)δ(Γ(QG1 , QG2 ), λ), as desired.  4. Examples In this section, we give some curious examples of Γ(QG1 , QG2 ) and Ω(QG1 , QG2 ). At first, the following example says that even though G1 and G2 are not perfect, Ω(QG1 , QG2 ) may be reflexive. Example 4.1. Let G be the finite simple graph as follows: G: t ❆ ❆ ❆ ❆ ❆t t ❅ ❅ ❅ ❅ ❅t ✁ ✁ ✁ ✁ t✁ Namely, G is a cycle of length 5. Then G is not perfect. Hence Γ(QG , QG ) is not reflexive. However, Ω(QG , QG ) is reflexive. In fact, we have δ(Γ(QG , QG ), λ) = 1 + 15λ + 60λ2 + 62λ3 + 15λ4 + λ5 , δ(Ω(QG , QG ), λ) = 1 + 16λ + 75λ2 + 124λ3 + 75λ4 + 16λ5 + λ6 . Moreover, Γ(QG , QG ) possesses the integer decomposition property, but Ω(QG , QG ) does not possess the integer decomposition property. 10 For this example, Γ(QG , QG ) possesses the integer decomposition property. Next example says that if G1 and G2 are not perfect, Γ(QG1 , QG2 ) may not possess the integer decomposition property. Example 4.2. Let G be a finite simple graph whose complementary graph G is as follows: G: t t t ❅ ❅ ❅ ❅ ❅t t t t t ❅ ❅ ❅ ❅ ❅t t Then G is not perfect. Hence Γ(QG , QG ) is not reflexive. However, Ω(QG , QG ) is reflexive. Moreover, in this case, Γ(QG , QG ) and Ω(QG , QG ) do not possess the integer decomposition property. For any finite simple graph G with at most 6 vertices, Ω(QG , QG ) is always reflexive. However, in the case of finite simple graphs with more than 6 vertices, we obtain a different result. Example 4.3. Let G be the finite simple graph as follows: G: t t t t ❅ ❅ ❅ ❅ ❅t t t Namely, G is a cycle of length 7. Then G is not perfect. Hence Γ(QG , QG ) is not reflexive. Moreover, Ω(QG , QG ) is not reflexive. In fact, we have δ(Γ(QG , QG ), λ) = 1 + 49λ + 567λ2 + 1801λ3 + 1799λ4 + 569λ5 + 49λ6 + λ7 , δ(Ω(QG , QG ), λ) = 1 + 50λ + 616λ2 + 2370λ3 + 3598λ4 + 2368λ5 + 618λ6 + 50λ7 + λ8 . Finally, we show that even though the Ehrhart δ-polynomial of Ω(QG1 , QG2 ) coincides with that of Γ(QGc1 , QGc2 ), Ω(QG1 , QG2 ) may not be unimodularly equivalent to Γ(QGc1 , QGc2 ). 11 Example 4.4. Let G be the finite simple graph as follows: G: t ✟t ❍ ✟ ❆ ❍❍ ✟ ✁❅ ✟ ✁ ❅ ❍❍ ❆ ✟ ✟ ✁ ❍❍❅ ❆ ✟ ❅ ✟ ✁ ❍❍ ❆ ✟ t ❅ ✟ ✁ ❍ ❆ ✟t ❍ ✁❆ ❍❍ ✟✟ ✁ ❆ ✟✟ ❍❍ ✁ ✟ ❍❍ ❆✟ ✟❍❆ ✁✟❍ t✁✟ ❍ ❆t Namely, G is a (2, 2, 2)-complete multipartite graph. Then G is perfect. Hence we know that Ω(QG , QG ) and Γ(QGb , QGb ) have the same Ehrhart δ-polynomial and the same volume. However, Ω(QG , QG ) has 54 facets and Γ(QGb , QGb ) has 432 facets. Hence, Ω(QG , QG ) and Γ(QGb , QGb ) are not unimodularly equivalent. Moreover, for b the Ehrhart δ-polynomial any finite simple graph G′ on {1, . . . , 7} except for G, of Γ(QG′ , QG′ ) is not equal to that of Ω(QG , QG ). This implies that the class of Ω(QG1 , QG2 ) is a new class of reflexive polytopes. References [1] C. A. Athanasiadis, h∗ -vectors, Eulerian polynomials and stable polytopes of graphs, Electron. J. Combin., 11 (2004), 1–13. [2] V. Batyrev, Dual polyhedra and mirror symmetry for Calabi-Yau hypersurfaces in toric varieties, J. Algebraic Geom., 3 (1994), 493–535. [3] M. Beck, P. Jayawant, and T. B. McAllister, Lattice-point generating functions for free sums of convex sets, J. Combin. Theory, Ser. A 120 (2013), 1246–1262. [4] M. Chudnovsky, N. Robertson, P. Seymour and R. Thomas, The strong perfect graph theorem, Ann. of Math. 164 (2006), 51–229. [5] D. Cox, J. Little and H. Schenck, “Toric varieties”, Amer. Math. Soc., 2011. [6] R. Freij, M. Henze, M. W. Schmitt and G. M. Ziegler, Face numbers of centrally symmetric polytopes from split graphs, Electron. J. Combin. 20 (2013), 1–13. [7] C. Haase and H. V. Melinkov, The Reflexive Dimension of a Lattice Polytope, Ann. Comb. 10 (2006), 211–217. [8] H. Herzog and T. Hibi, “Monomial Ideals”, Graduate Text in Mathematics, Springer, 2011. [9] T. Hibi, “Algebraic Combinatorics on Convex Polytopes,” Carslaw Publications, Glebe NSW, Australia, 1992. [10] T. Hibi, Ed., “Gröbner Bases: Statistics and Software Systems,” Springer, 2013. [11] T. Hibi and K. Matsuda, Quadratic Gröbner bases of twinned order polytopes, European J. Combin. 54(2016), 187–192. [12] T. Hibi, K. Matsuda, H. Ohsugi and K. Shibata, Centrally symmetric configurations of order polytopes, J. Algebra 443(2015), 469–478. [13] T. Hibi, K. Matsuda and A. Tsuchiya, Quadratic Gröbner bases arising from partially ordered sets, Math. Scand. 121 (2017), 19–25. 12 [14] T. Hibi, K. Matsuda and A. Tsuchiya, Gorenstein Fano polytopes arising from order polytopes and chain polytopes, arXiv:1507.03221. [15] T. Hibi and A. Tsuchiya, Fasets and volume of Gorenstein Fano polytopes, Math. Nachr. 290 (2017), 2619–2628. [16] M. Kreuzer and H. Skarke, Complete classification of reflexive polyhedra in four dimensions, Adv. Theor. Math. Phys. 4(2000), 1209–1230. [17] J. C. Lagarias and G. M. Ziegler, Bounds for lattice polytopes containing a fixed number of interior points in a sublattice, Canad. J. Math. 43(1991), 1022–1035. [18] H. Ohsugi and T. Hibi, Convex polytopes all of whose reverse lexicographic initial ideals are squarefree, Proc. Amer. Math. Soc. 129 (2001), 2541–2546. [19] H. Ohsugi and T. Hibi, Quadratic initial ideals of root systems, Proc. Amer. Math. Soc. 130 (2002), 1913–1922. [20] H. Ohsugi and T. Hibi, Centrally symmetric configurations of integer matrices Nagoya Math. J. 216 (2014), 153-170 [21] H. Ohsugi and T. Hibi, Reverse lexicographic squarefree initial ideals and Gorenstein Fano polytopes, J. Commut. Alg., to appear. [22] R. Sanyal, A. Werner and G. M. Ziegler On Kalai’s conjectures about centrally symmetric polytopes, Discrete Comput. Geometry 41 (2009), 183 – 198. [23] A. Schrijver, “Theory of Linear and Integer Programing”, John Wiley & Sons, 1986. [24] S. Sullivant, Compressed polytopes and statistical disclosure limitation, Tohoku Math. J. 58 (2006), 433 – 445. (Takayuki Hibi) Department of Pure and Applied Mathematics, Graduate School of Information Science and Technology, Osaka University, Suita, Osaka 565-0871, Japan E-mail address: [email protected] (Akiyoshi Tsuchiya) Department of Pure and Applied Mathematics, Graduate School of Information Science and Technology, Osaka University, Suita, Osaka 565-0871, Japan E-mail address: [email protected] 13
0math.AC
Commutative algebraic groups up to isogeny arXiv:1602.00222v2 [math.AG] 27 Sep 2016 Michel Brion Abstract Consider the abelian category Ck of commutative group schemes of finite type over a field k. By results of Serre and Oort, Ck has homological dimension 1 (resp. 2) if k is algebraically closed of characteristic 0 (resp. positive). In this article, we explore the abelian category of commutative algebraic groups up to isogeny, defined as the quotient of Ck by the full subcategory Fk of finite k-group schemes. We show that Ck /Fk has homological dimension 1, and we determine its projective or injective objects. We also obtain structure results for Ck /Fk , which take a simpler form in positive characteristics. Contents 1 Introduction 2 2 Structure of algebraic groups 5 2.1 Preliminary results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2 Characteristic zero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.3 Positive characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3 The 3.1 3.2 3.3 isogeny category of algebraic groups Definition and first properties . . . . . . . . . . . . . . . . . . . . . . . . . Divisible groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Field extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Tori, abelian varieties, and homological 4.1 Tori . . . . . . . . . . . . . . . . . . . 4.2 Abelian varieties . . . . . . . . . . . . 4.3 Vanishing of extension groups . . . . . dimension 22 . . . . . . . . . . . . . . . . . . . . 22 . . . . . . . . . . . . . . . . . . . . 24 . . . . . . . . . . . . . . . . . . . . 28 5 Structure of isogeny categories 5.1 Vector extensions of abelian varieties . . . . . . . . . . . . . . . . . . . . . 5.2 Semi-abelian varieties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3 Product decompositions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 12 12 17 20 30 30 35 36 1 Introduction There has been much recent progress on the structure of algebraic groups over an arbitrary field; in particular, on the classification of pseudo-reductive groups (see [CGP15, CP15]). Yet commutative algebraic groups over an imperfect field remain somewhat mysterious, e.g., extensions with unipotent quotients are largely unknown; see [To13] for interesting results, examples, and questions. In this article, we explore the category of commutative algebraic groups up to isogeny, in which the problems raised by imperfect fields become tractable; this yields rather simple and uniform structure results. More specifically, denote by Ck the category with objects the group schemes of finite type over the ground field k, and with morphisms, the homomorphisms of k-group schemes (all group schemes under consideration will be assumed commutative). By a result of Grothendieck (see [SGA3, VIA, Thm. 5.4.2]), Ck is an abelian category. We define the category of ‘algebraic groups up to isogeny’ as the quotient category of Ck by the Serre subcategory of finite group schemes; then Ck /Fk is obtained from Ck by inverting all isogenies, i.e., all morphisms with finite kernel and cokernel. It will be easier to deal with the full subcategory C k of Ck /Fk with objects the smooth connected algebraic groups, since these categories turn out to be equivalent, and morphisms in C k admit a simpler description. As a motivation for considering the ‘isogeny category’ C k , note that some natural constructions involving algebraic groups are only exact up to isogeny; for example, the formations of the maximal torus or of the largest abelian variety quotient, both of which are not exact in Ck . Also, some structure theorems for algebraic groups take on a simpler form when reformulated up to isogeny. A classical example is the Poincaré complete reducibility theorem, which is equivalent to the semi-simplicity of the isogeny category of abelian varieties, i.e., the full subcategory Ak of C k with objects abelian varieties. Likewise, the isogeny category of tori, T k , is semi-simple. We gather our main results in the following: Theorem. (i) The category C k is artinian and noetherian. Its simple objects are exactly the additive group Ga,k , the simple tori, and the simple abelian varieties. (ii) The product functor T k × U k → Lk yields an equivalence of categories, where U k (resp. Lk ) denotes the isogeny category of unipotent (resp. linear) algebraic groups. (iii) If char(k) > 0, then the product functor S k × U k → C k yields an equivalence of categories, where S k denotes the isogeny category of semi-abelian varieties. If in addition k is locally finite, then the product functor T k × Ak → S k yields an equivalence of categories as well. (iv) The base change under any purely inseparable field extension k ′ of k yields an equivalence of categories C k → C k′ . (v) The homological dimension of C k is 1. We also describe the projective objects of the category C k (Theorem 5.14) and its injective objects (Theorem 5.16). Moreover, in characteristic 0, we obtain a structure 2 result for that category (Proposition 5.13), which turns out to be more technical than in positive characteristics. Let us now compare the above statements with known results on Ck and its full subcategories Ak (resp. Tk , Uk , Lk , Sk ) of abelian varieties (resp. tori, unipotent groups, linear groups, semi-abelian varieties). About (i) (an easy result, mentioned by Serre in [Se60]): Ck is artinian and not noetherian. Also, every algebraic group is an iterated extension of ‘elementary’ groups; these are the simple objects of C k and the simple finite group schemes. About (ii): denoting by Mk the full subcategory of Ck with objects the algebraic groups of multiplicative type, the product functor Mk × Uk → Lk yields an equivalence of categories if k is perfect. But over an imperfect field, there exist non-zero extensions of unipotent groups by tori, and these are only partially understood (see [To13, §9] again; our study of C k brings no new insight in these issues). About (iii): the first assertion follows from recent structure results for algebraic groups (see [Br15b, §5]), together with a lifting property for extensions of such groups with finite quotients (see [Br15a] and [LA15]). The second assertion is a direct consequence of the Weil-Barsotti isomorphism (see e.g. [Oo66, §III.18]). About (iv): this is a weak version of a result of Chow on abelian varieties, which asserts (in categorical language) that base change yields a fully faithful functor Ak → Ak′ for any primary field extension k ′ of k (see [Ch55], and [Co06, §3] for a modern proof). About (v), the main result of this article: recall that the homological dimension of an abelian category D is the smallest integer, hd(D), such that ExtnD (A, B) = 0 for all objects A, B of D and all n > hd(D); these Ext groups are defined as equivalence classes of Yoneda extensions. In particular, hd(D) = 0 if and only if D is semi-simple. It follows from work of Serre (see [Se60, 10.1 Thm. 1] together with [Oo64, Thm. 3.5]) that hd(Ck ) = 1 if k is algebraically closed of characteristic 0. Also, by a result of Oort (see [Oo66, Thm. 14.1]), hd(Ck ) = 2 if k is algebraically closed of positive characteristic. Building on these results, Milne determined hd(Ck ) when k is perfect (see [Mi70, Thm. 1]); then the homological dimension can be arbitrarily large. In the approach of Serre and Oort, the desired vanishing of higher extension groups is obtained by constructing projective resolutions of elementary groups, in the category of pro-algebraic groups. The latter category contains Ck as a full subcategory, and has enough projectives. In contrast, to show that hd(C k ) = 1 over an arbitrary field k, we do not need to go to a larger category. We rather observe that tori are projective objects in C k , and abelian varieties are injective objects there. This yields the vanishing of all but three extension groups between simple objects of C k ; two of the three remaining cases are handled directly, and the third one reduces to the known vanishing of Ext2Ck (Ga,k , Ga,k ) when k is perfect. When k has characteristic 0, the fact that hd(Ck ) ≤ 1 follows from a similar result for the category of Laumon 1-motives up to isogeny (obtained by Mazzari in [Ma10, Thm. 2.5]). Indeed, Ck is equivalent to a Serre subcategory of the latter category; moreover, if an abelian category has homological dimension at most 1, then the same holds for any Serre subcategory (as follows e.g. from [Oo64, §3]). Likewise, the fact that the category of Deligne 1-motives up to isogeny has homological dimension at most 1 (due to Orgogozo, see [Or04, Prop. 3.2.4]) implies the corresponding assertion for the isogeny category of semi-abelian varieties over an arbitrary field. 3 Abelian categories of homological dimension 1 are called hereditary. The most studied hereditary categories consist either of finite-dimensional modules over a finite-dimensional hereditary algebra, or of coherent sheaves on a weighted projective line (see e.g. [Ha01]). Such categories are k-linear and Hom-finite, i.e., all groups of morphisms are vector spaces of finite dimension over the ground field k. But this seldom holds for the above isogeny categories. More specifically, Ak and T k are both Q-linear and Hom-finite, but not C k unless k is a number field. When k has characteristic 0, we may view C k as a mixture of k-linear and Q-linear categories. This is already displayed by the full subcategory V k with objects the vector extensions of abelian varieties: as shown in §5.1, V k has enough projectives, and these are either the unipotent groups (k-linear objects), or the vector extensions of simple abelian varieties (Q-linear objects). In positive characteristic, one may also consider the quotient category of Ck by the Serre subcategory Ik of infinitesimal group schemes. This yields the abelian category of ‘algebraic groups up to purely inseparable isogeny’, which is equivalent to that introduced by Serre in [Se60]; as a consequence, it has homological dimension 1 if k is algebraically closed. For any arbitrary field k, the category Ck /Ik is again invariant under purely inseparable field extensions; its homological properties may be worth investigating. Notation and conventions. We will use the book [DG70] as a general reference, especially for affine algebraic groups, and the expository text [Br15b] for some further results. Throughout this text, we fix the ground field k and an algebraic closure k̄; the characteristic of k is denoted by char(k). We denote by ks the separable closure of k in k̄, and by Γk the Galois group of ks over k. We say that k is locally finite, if it is algebraic over Fp for some prime p. By an algebraic k-group, we mean a commutative group scheme G of finite type over k; we denote by G0 the neutral component of G. The group law of G will be denoted additively: (x, y) 7→ x + y. By a k-subgroup of G, we mean a closed k-subgroup scheme. Morphisms are understood to be homomorphisms of k-group schemes. The (scheme-theoretic) image of a morphism f : G → H will be denoted by Im(f ) or f (G), and the (scheme-theoretic) pull-back of a k-subgroup H ′ ⊂ H, by G ×H H ′ or f −1 (H ′ ). Recall that an abelian variety over k is a smooth connected proper algebraic k-group. Also, recall that a k-group scheme G is an affine algebraic k-group if and only if G is isomorphic to a k-subgroup of the general linear group GLn,k for some n. We will thus call affine algebraic k-groups linear. We say that an algebraic k-group G is of multiplicative type if G is isomorphic to a k-subgroup of some k-torus. To simplify the notation, we will suppress the mention of the ground field k whenever this yields no confusion. For example, the category Ck will be denoted by C, except when we use base change by a field extension. Given an algebraic group G and two subgroups G1 , G2 , we denote by G1 + G2 the subgroup of G generated by G1 and G2 . Thus, G1 + G2 is the image of the morphism G1 × G2 → G, (x1 , x2 ) 7→ x1 + x2 . An isogeny is a morphism with finite kernel and cokernel. Two algebraic groups G1 , G2 are isogenous if they can be connected by a chain of isogenies. We say that two subgroups G1 , G2 of an algebraic group G are commensurable if both quotients G1 /G1 ∩ G2 and G2 /G1 ∩ G2 are finite; then G1 and G2 are isogenous. 4 Given an algebraic group G and a non-zero integer n, the multiplication by n yields a morphism nG : G −→ G. We denote its kernel by G[n], and call it the n-torsion subgroup. We say that G is divisible if nG is an epimorphism for all n 6= 0; then nG is an isogeny for all such n. When char(k) = 0, the divisible groups are exactly the connected algebraic groups; when char(k) = p > 0, they are just the semi-abelian varieties, that is, the extensions of abelian varieties by tori (see e.g. [Br15b, Thm. 5.6.3] for the latter result). Still assuming that char(k) = p > 0, we say that an algebraic group G is a p-group if n pG = 0 for n ≫ 0. Examples of p-groups include the unipotent groups and the connected finite algebraic groups, also called infinitesimal. 2 Structure of algebraic groups 2.1 Preliminary results We will use repeatedly the following simple observation: Lemma 2.1. Let G be a smooth connected algebraic group. (i) If G′ is a subgroup of G such that G/G′ is finite, then G′ = G. (ii) Any isogeny f : H → G is an epimorphism. Proof. (i) The quotient G/G′ is smooth, connected and finite, hence zero. (ii) This follows from (i) applied to Im(f ) ⊂ H. The following lifting result for finite quotients will also be frequently used: Lemma 2.2. Let G be an algebraic group, and H a subgroup such that G/H is finite. (i) There exists a finite subgroup F ⊂ G such that G = H + F . (ii) If G/H is infinitesimal (resp. a finite p-group), then F may be chosen infinitesimal (resp. a finite p-group) as well. Proof. (i) This is a special case of [Br15a, Thm. 1.1]. (ii) Assume G/H infinitesimal. Then the quotient G/(H + F 0 ) is infinitesimal (as a quotient of G/H) and étale (as a quotient of F/F 0 ), hence zero. Thus, we may replace F with F 0 , an infinitesimal subgroup. Next, assume that G/H is a finite p-group. Denote by F [p∞ ] the largest p-subgroup of F . Then the quotient G/(H + F [p∞ ]) is a finite p-group and is killed by the order of F/F [p∞ ]. Since the latter order is prime to p, we obtain G/(H + F [p∞ ]) = 0. Thus, we may replace F with F [p∞ ]. Next, we recall a version of a theorem of Chevalley: 5 Theorem 2.3. (i) Every algebraic group G contains a linear subgroup L such that G/L is an abelian variety. Moreover, L is unique up to commensurability in G, and G/L is unique up to isogeny. (ii) If G is connected, then there exists a smallest such subgroup, L = L(G), and this subgroup is connected. (iii) If in addition G is smooth, then every morphism from G to an abelian variety factors uniquely through the quotient map G → G/L(G). Proof. The assertion (ii) follows from [Ra70, Lem. IX 2.7] (see also [BLR90, 9.2 Thm. 1]). To prove (i), note that G contains a finite subgroup F such that G/F is connected (as follows from Lemma 2.2). Then we may take for L the pull-back of a linear subgroup of G/F with quotient an abelian variety. If L′ is another linear subgroup of G such that G/L′ is an abelian variety, then L + L′ is linear, as a quotient of L × L′ . Moreover, the natural map q : G/L → G/(L + L′ ) is the quotient by (L + L′ )/L, a linear subgroup of the abelian variety G/L. It follows that (L + L′ )/L is finite; thus, q is an isogeny and L′ /L ∩ L′ is finite. Likewise, q ′ : G/L′ → G/(L + L′ ) is an isogeny and L/L ∩ L′ is finite; this completes the proof of (i). Finally, the assertion (iii) is a consequence of [Br15b, Thm. 4.3.4]. The linear algebraic groups may be described as follows (see [DG70, Thm. IV.3.1.1]): Theorem 2.4. Let G be a linear algebraic group. Then G has a largest subgroup of multiplicative type, M; moreover, G/M is unipotent. If k is perfect, then G = M × U, where U denotes the largest unipotent subgroup of G. Also, note the following orthogonality relations: Proposition 2.5. (i) Let M be a group of multiplicative type, and U a unipotent group. Then HomC (M, U) = 0 = HomC (U, M). (ii) Let L be a linear algebraic group, and A an abelian variety. Then HomC (A, L) = 0, and every morphism L → A has finite image. Moreover, HomC (L, A) is n-torsion for some positive integer n. Proof. (i) This follows from [DG70, Cor. IV.2.2.4]. (ii) The image of a morphism A → L is proper, smooth, connected and affine, hence zero. Likewise, the image of a morphism L → A is affine and proper, hence finite. To show the final assertion, we may replace k with any field extension, and hence assume that k is perfect. Then the reduced neutral component L0red is a smooth connected subgroup of L, the quotient L/L0red is finite, and HomC (L0red , A) = 0 by the above argument. Thus, HomC (L, A) = HomC (L/L0red , A) and this group is n-torsion, where n denotes the order of the finite group scheme L/L0red (indeed, L/L0red is n-torsion in view of [SGA3, VIIA, Prop. 8.5]). Next, we obtain a key preliminary result. To state it, recall that a unipotent group G is split if it admits a finite increasing sequence of subgroups 0 = G0 ⊂ G1 ⊂ · · · ⊂ Gn = G such that Gi /Gi−1 ∼ = Ga for i = 1, . . . , n. 6 Proposition 2.6. Let G be an algebraic group. (i) There exists a finite subgroup F ⊂ G such that G/F is smooth and connected. (ii) If G is unipotent, then we may choose F such that G/F is split. Proof. (i) By Lemma 2.2, we have G = G0 + F for some finite subgroup F ⊂ G. Thus, G/F ∼ = G0 /F ∩ G0 is connected; this completes the proof when char(k) = 0. When char(k) = p > 0, we may assume G connected by the above step. Consider the n n relative Frobenius morphism FG/k : G → G(p) and its iterates FG/k : G → G(p ) , where n n n ≥ 1. Then Ker(FG/k ) is finite for all n; moreover, G/Ker(FG/k ) is smooth for n ≫ 0 (see [SGA3, VIIA, Prop. 8.3]), and still connected. (ii) We argue by induction on the dimension of G. The statement is obvious if dim(G) = 0. In the case where dim(G) = 1, we may assume that G is smooth and connected in view of Lemma 2.2 again; then G is a k-form of Ga . By [Ru70, Thm. 2.1], there exists an exact sequence f 0 −→ G −→ G2a −→ Ga −→ 0, where f ∈ O(G2a ) ∼ = k[x, y] satisfies f (x, y) = y p − a0 x − a1 xp − · · · − am xp for some integers m, n ≥ 0 and some a0 , . . . , am ∈ k with a0 6= 0. Thus, the projection m n p1 : G −→ Ga , (x, y) 7−→ x lies in an exact sequence p1 0 −→ αpn −→ G −→ Ga −→ 0, n where αpn denotes the kernel of the endomorphism x 7→ xp of Ga . This yields the assertion in this case. If dim(G) ≥ 2, then we may choose a subgroup G1 ⊂ G such that 0 < dim(G1 ) < dim(G) (as follows from [DG70, Prop. IV.2.2.5]). By the induction assumption for G/G1 , there exists a subgroup G2 ⊂ G such that G1 ⊂ G2 , G2 /G1 is finite, and G/G2 is split. Next, the induction assumption for G2 yields a finite subgroup F ⊂ G2 such that G2 /F is split. Then G/F is split as well. Remark 2.7. By Proposition 2.6, every algebraic group G admits an isogeny u : G → H, where H is smooth and connected. If k is perfect, then there also exists an isogeny v : K → G, where K is smooth and connected: just take v to be the inclusion of the reduced neutral component G0red . But this fails over any imperfect field k. Indeed, if such an isogeny v exists, then its image must be G0red . On the other hand, by [SGA3, VIA, Ex. 1.3.2], there exists a connected algebraic group G such that Gred is not a subgroup. By combining Lemma 2.2, Theorems 2.3 and 2.4, and Proposition 2.6, we obtain readily: Proposition 2.8. Every algebraic group G admits a finite increasing sequence of subgroups 0 = G0 ⊂ G1 ⊂ · · · ⊂ Gn = G such that each Gi /Gi−1 , i = 1, . . . , n, is finite or isomorphic to Ga , a simple torus, or a simple abelian variety. Moreover, G is linear if and only if no abelian variety occurs. 7 2.2 Characteristic zero In this subsection, we assume that char(k) = 0. Recall that every unipotent group is isomorphic to the additive group of its Lie algebra via the exponential map; this yields an equivalence between the category U of unipotent groups and the category of finitedimensional k-vector spaces (see [DG70, Prop. IV.2.4.2]). In particular, every unipotent group is connected. Next, consider a connected algebraic group G. By Theorem 2.3, there is a unique exact sequence 0 → L → G → A → 0, where A is an abelian variety, and L is connected and linear. Moreover, in view of Theorem 2.4, we have L = T × U, where T is a torus and U is unipotent. We now extend the latter structure results to possibly non-connected groups: Theorem 2.9. (i) Every algebraic group G lies in an exact sequence 0 −→ M × U −→ G −→ A −→ 0, where M is of multiplicative type, U is unipotent, and A is an abelian variety. Moreover, U is the largest unipotent subgroup of G: the unipotent radical, Ru (G). Also, M is unique up to commensurability in G, and A is unique up to isogeny. (ii) The formation of the unipotent radical commutes with base change under field extensions, and yields an exact functor Ru : C −→ U, right adjoint to the inclusion U → C. (iii) The projective objects of C are exactly the unipotent groups. Proof. (i) Theorem 2.3 yields an exact sequence 0 −→ L −→ G −→ A −→ 0, where L is linear (possibly non-connected), and A is an abelian variety. By Theorem 2.4, we have L = M × U, where M is of multiplicative type and U is unipotent. Since M and A have no non-trivial unipotent subgroups, we have U = Ru (G). Given another exact sequence 0 −→ M ′ × U −→ G −→ A′ −→ 0 satisfying the same assumptions, the image of M ′ in A ∼ = G/(M × U) is finite by Proposition 2.5. In other words, the quotient M ′ /M ′ ∩(M ×U) is finite. Likewise, M/M ∩(M ′ ×U) is finite as well. Since (M × U) ∩ M ′ = M ∩ M ′ = M ∩ (M ′ × U), we see that M, M ′ are commensurable in G. Then A = G/(M × U) and A′ = G/(M ′ × U) are both quotients of G/(M ∩ M ′ ) × U by finite subgroups, and hence are isogenous. (ii) In view of (i), G/Ru (G) is an extension of an abelian variety by a group of multiplicative type. Since these two classes of algebraic groups are stable under base change by 8 any field extension k ′ of k, it follows that (G/Ru (G))k′ has zero unipotent radical. Thus, Ru (G)k′ = Ru (Gk′ ). Next, note that every morphism f : G → H sends Ru (G) to Ru (H). Consider an exact sequence f g 0 −→ G1 −→ G2 −→ G3 −→ 0 and the induced complex Ru (f ) Ru (g) 0 −→ Ru (G1 ) −→ Ru (G2 ) −→ Ru (G3 ) −→ 0. Clearly, Ru (f ) is a monomorphism. Also, we have Ker(Ru (g)) = Ru (G2 ) ∩ Ker(g) = Ru (G2 ) ∩ Im(f ) = Im(Ru (f )). We now show that Ru (g) is an epimorphism. For this, we may replace G2 with g −1(Ru (G3 )), and hence assume that G3 is unipotent. Next, we may replace G2 with G2 /Ru (G2 ), and hence assume (in view of (i) again) that G2 is an extension of an abelian variety by a group of multiplicative type. Then Hom(G2 , G3 ) = 0 by Proposition 2.5; this completes the proof of the exactness assertion. The assertion about adjointness follows from the fact that every morphism U → H, where U is unipotent and H arbitrary, factors through a unique morphism U → Ru (H). (iii) Consider an epimorphism ϕ : G → H, a unipotent group U, and a morphism ψ : U → H. Then ψ factors through Ru (H). Also, by (ii), ϕ restricts to an epimorphism Ru (G) → Ru (H), which admits a section as unipotent groups are just vector spaces. Thus, ψ lifts to a morphism U → G. This shows that U is projective in C. Conversely, let G be a projective object in C. We claim that the (abstract) group HomC (G, H) is divisible for any divisible algebraic group H. Indeed, the exact sequence n H 0 −→ H[n] −→ H −→ H −→ 0 yields an exact sequence ×n 0 −→ HomC (G, H[n]) −→ HomC (G, H) −→ HomC (G, H) −→ 0, for any positive integer n. Next, the exact sequence 0 → L → G → A → 0 yields an exact sequence 0 −→ EndC (A) −→ HomC (G, A) −→ HomC (L, A), where the abelian group EndC (A) is free of finite rank (see [Mi86, Thm. 12.5]), and HomC (L, A) is killed by some positive integer (Proposition 2.5). On the other hand, HomC (G, A) is divisible by the above claim. It follows that EndC (A) is zero, and hence so is A. Thus, G is linear, and hence G = M × U as above. Since U is projective, so is M. Choose a torus T containing M; then again, the group HomC (M, T ) is finitely generated and divisible, hence zero. Thus, T = 0 and G = U. Remark 2.10. With the notation of the above theorem, we have a natural map G −→ G/M ×A G/U, which is a morphism of M × U-torsors over A, and hence an isomorphism. Moreover, G/M is an extension of an abelian variety by a unipotent group; such ‘vector extensions’ will be studied in detail in §5.1. Also, G/U is an extension of an abelian variety by a group of multiplicative type, and hence of a semi-abelian variety by a finite group. The semi-abelian varieties will be considered in §5.2. 9 2.3 Positive characteristics In this subsection, we assume that char(k) = p > 0. Then the assertions of Theorem 2.9 are no longer valid. For example, the formation of the unipotent radical (the largest smooth connected unipotent subgroup) is not exact, and does not commute with arbitrary field extensions either (see Remark 2.12 (i) for details). Also, C has no non-zero projective objects, as will be shown in Corollary 5.15. Yet Theorem 2.9 has a useful analogue, in which the unipotent radical is replaced by the largest unipotent quotient: Theorem 2.11. Let G be an algebraic group. (i) G has a smallest subgroup H such that U := G/H is unipotent. Moreover, H is an extension of an abelian variety A by a group of multiplicative type M. Also, M is unique up to commensurability in G, and A is unique up to isogeny. (ii) Every morphism H → U is zero; every morphism U → H has finite image. (iii) The formation of U commutes with base change under field extensions, and yields a functor U : C −→ U, which is left adjoint to the inclusion of U in C. Moreover, every exact sequence in C f g 0 −→ G1 −→ G2 −→ G3 −→ 0 yields a right exact sequence U (f ) U (g) 0 −→ U(G1 ) −→ U(G2 ) −→ U(G3 ) −→ 0, where Ker(U(f )) is finite. (iv) There exists a subgroup V ⊂ G such that G = H + V and H ∩ V is a finite p-group. Proof. (i) Since the underlying topological space of G is noetherian, we may choose a subgroup H ⊂ G such that G/H is unipotent, and H is minimal for this property. Let H ′ ⊂ G be another subgroup such that G/H ′ is unipotent. Then so is G/H ∩ H ′ in view of the exact sequence 0 −→ G/H ∩ H ′ −→ G/H × G/H ′ . By minimality of H, it follows that H ∩ H ′ = H, i.e., H ⊂ H ′ . Thus, H is the smallest subgroup with unipotent quotient. Since the class of unipotent groups is stable under extensions, every unipotent quotient of H is zero. Also, by the affinization theorem (see [Br15b, Thm. 1, Prop. 5.5.1]), H is an extension of a linear algebraic group L by a semi-abelian variety S. Then every unipotent quotient of L is zero, and hence L must be of multiplicative type in view of Theorem 2.4. By [DG70, Cor. IV.1.3.9], the reduced neutral component L0red is its maximal torus, T ; the quotient L/T is a finite group of multiplicative type. Denote by S ′ the preimage of T in H; then S ′ is a semi-abelian variety (extension of T by S) and we have an exact sequence 0 −→ S ′ −→ H −→ L/T −→ 0. 10 By Lemma 2.2, there exists a finite subgroup F ⊂ H such that H = S ′ + F ; equivalently, the quotient map H → L/T restricts to an epimorphism F → L/T . Also, by Theorem 2.4 again, F has a largest subgroup of multiplicative type, MF , and the quotient F/MF is unipotent. Since L/T is of multiplicative type, it follows that the composition MF → F → L/T is an epimorphism as well. Thus, we may replace F with MF , and assume that F is of multiplicative type. Let T ′ be the maximal torus of the semi-abelian variety S ′ , and M := T ′ + F . Then M is of multiplicative type; moreover, H/M is a quotient of S ′ /T ′ , and hence is an abelian variety. The uniqueness assertions may be checked as in the proof of Theorem 2.9. (ii) This follows readily from Proposition 2.5. (iii) The assertion on base change under field extensions follows from the stability of the classes of unipotent groups, abelian varieties, and groups of multiplicative type, under such base changes. The adjointness assertion may be checked as in the proof of Theorem 2.9 (ii). Next, consider an exact sequence as in the statement. Clearly, U(g) is an epimorphism. Also, Ker(U(g))/Im(U(f )) ∼ = g −1 (H3 )/(u(G1 ) + H2 ), where Hi denotes the kernel of the quotient map Gi → U(Gi ). Thus, Ker(U(g))/Im(U(f )) is a quotient of g −1 (H3 )/u(G1) ∼ = H3 . As Ker(U(g))/Im(U(f )) is unipotent, it is trivial by (ii). Finally, Ker(U(f )) ∼ = −1 (G1 ∩ u (H2 ))/H1 is isomorphic to a subgroup of H2 /u(H1). Moreover, H2 /u(H1) is an extension of an abelian variety by a group of multiplicative type. Since Ker(U(f )) is unipotent, it is finite by (ii) again. (iv) Consider the subgroups Ker(pnG ) ⊂ G, where n is a positive integer. Since they form a decreasing sequence, there exists a positive integer m such that Ker(pnG ) = Ker(pm G) m+1 m m for all n ≥ m. Let G := G/Ker(pG ), then Ker(pG ) = Ker(pG )/Ker(pG ) is zero, and hence pG is an isogeny. Next, let H ⊂ G be as in (i) and put H := H/Ker(pm H ), U = G/H. Then U is unipotent (as a quotient of U) and pU has finite cokernel (since this holds for pG ). Thus, U is a finite p-group. By Lemma 2.2, there exists a finite p-subgroup F ⊂ G such that G = H + F with an obvious notation. Thus, G = H + V , where V := Ker(pm G) + F. m m Also, H ∩ Ker(pG ) = Ker(pH ) is finite, since H is an extension of A by M, and Ker(pm A) and Ker(pm ) are finite. As F is finite, it follows that H ∩ V is finite as well. Moreover, V M m is a p-group, since so are F and Ker(pG ); we conclude that H ∩ V is a finite p-group. Remarks 2.12. (i) The formation of the unipotent radical does not commute with purely inseparable field extensions, in view of [SGA3, XVII.C.5]. This formation is not exact either, as seen e.g. from the exact sequence F 0 −→ αp −→ Ga −→ Ga −→ 0, where F denotes the relative Frobenius endomorphism. When k is perfect, one may show that every exact sequence 0 → G1 → G2 → G3 → 0 in C yields a complex 0 → Ru (G1 ) → Ru (G2 ) → Ru (G3 ) → 0 with finite homology groups. But this fails when k is imperfect; more specifically, choose a finite purely inseparable field extension K of k of degree p, and consider G := RK/k (Gm,K ), where RK/k denotes the Weil restriction. By [CGP15, Prop. A.5.11], G is smooth, connected, and lies in an exact sequence 0 −→ Gm −→ G −→ U −→ 0, 11 where U is unipotent of dimension p − 1. Moreover, every morphism from a smooth connected unipotent group to G is constant, as follows from the adjointness property of the Weil restriction (see [CGP15, (A.5.1)]). In other terms, Ru (G) = 0. (ii) The functor U of Theorem 2.11 is not left exact, as seen from the exact sequence F 0 −→ αp −→ E −→ E (p) −→ 0, where E denotes a supersingular elliptic curve, and F its relative Frobenius morphism. Also, note that the torsion subgroups E[pn ], where n ≥ 1, form a strictly increasing sequence of infinitesimal unipotent groups; in particular, E has no largest connected unipotent subgroup. Corollary 2.13. Let G be an algebraic group. (i) There exists a finite subgroup F ⊂ G such that G/F ∼ = S × U, where S is a semiabelian variety, and U a split unipotent group. Moreover, S and U are unique up to isogeny. (ii) If k is locally finite, then we may choose F so that S ∼ = T × A, where T is a torus, and A an abelian variety. Moreover, T and A are unique up to isogeny. Proof. (i) With the notation of Theorem 2.11, we have isomorphisms G/H ∩ V ∼ = G/V × G/H ∼ = (H/H ∩ V ) × U. Also, H/H ∩ V is an extension of an abelian variety, H/(H ∩ V ) + M, by a group of multiplicative type, M/M ∩ V . Moreover, U is an extension of a split unipotent group by a finite group (Proposition 2.6). Thus, we may assume that G = H. Then G0red is a semi-abelian variety, as follows from [Br15b, Lem. 5.6.1]. Since G/G0red is finite, applying Lemma 2.2 yields that G is an extension of a semi-abelian variety by a finite group. (ii) By [Br15b, Cor. 5.5.5], there exists an abelian subvariety A ⊂ S such that S = T + A, where T ⊂ S denotes the maximal torus. Then T ∩ A is finite, and S/T ∩ A ∼ = T /T ∩ A × A/T ∩ A. This completes the proof of the existence assertions in (i) and (ii). The uniqueness up to isogeny follows from Proposition 2.5. 3 3.1 The isogeny category of algebraic groups Definition and first properties Recall that C denotes the category of commutative algebraic groups, and F the full subcategory of finite groups. Since F is stable under taking subobjects, quotients and extensions, we may form the quotient category C/F ; it has the same objects as C, and its morphisms are defined by HomC/F (G, H) = lim HomC (G′ , H/H ′ ), → 12 where the direct limit is taken over all subgroups G′ ⊂ G such that G/G′ is finite, and all finite subgroups H ′ ⊂ H. The category C/F is abelian, and comes with an exact functor Q : C −→ C/F , which is the identity on objects and the natural map HomC (G, H) −→ lim HomC (G′ , H/H ′), → f 7−→ f on morphisms. The quotient functor Q satisfies the following universal property: given an exact functor R : C → D, where D is an abelian category, such that R(F ) = 0 for any finite group F , there exists a unique exact functor S : C/F → D such that R = S ◦ Q (see [Ga62, Cor. III.1.2, Cor. III.1.3] for these results). Alternatively, C/F may be viewed as the localization of C at the multiplicative system of isogenies (see [GZ67, §I.2] or [SP16, §4.26] for localization of categories); this is easily checked by arguing as in the proof of [SP16, Lem. 12.9.6]. We now show that C/F is equivalent to a category with somewhat simpler objects and morphisms: Lemma 3.1. Let C be the full subcategory of C/F with objects the smooth connected algebraic groups. (i) The inclusion of C in C/F is an equivalence of categories. (ii) HomC (G, H) = lim HomC (G, H/H ′), where the direct limit is taken over all finite subgroups H ′ ⊂ H. (iii) Let f ∈ HomC (G, H) be represented by a morphism f : G → H/H ′ in C. Then f is zero (resp. a monomorphism, an epimorphism, an isomorphism) if and only if f is zero (resp. has a finite kernel, is an epimorphism, is an isogeny). Proof. (i) This follows from Proposition 2.6. (ii) This follows from Lemma 2.1. (iii) By [Ga62, Lem. III.1.2], f is zero (resp. a monomorphism, an epimorphism) if and only if Im(f ) (resp. Ker(f ), Coker(f )) is finite. By Lemma 2.1 again, the finiteness of Im(f ) is equivalent to f = 0, and the finiteness of Coker(f ) is equivalent to f being an epimorphism. As a consequence, f is an isomorphism if and only if f is an isogeny. The abelian category C will be called the isogeny category of (commutative) algebraic groups. Every exact functor R : C → D, where D is an abelian category and R(f ) is an isomorphism for any isogeny f , factors uniquely through C (indeed, R must send any finite group to zero). We may now prove the assertion (i) of the main theorem: Proposition 3.2. (i) The category C is noetherian and artinian. (ii) The simple objects of C are exactly Ga , the simple tori, and the simple abelian varieties. 13 Proof. (i) Let G be a smooth connected algebraic group, and (Gn )n≥0 an increasing sequence of subobjects of G in C, i.e., each Gn is smooth, connected, and equipped with a C-morphism ϕn : Gn −→ G/G′n , where Ker(ϕn ) and G′n are finite; moreover, we have C-morphisms ψn : Gn −→ Gn+1 /G′′n+1 , where Ker(ψn ) and G′′n+1 are finite. Thus, dim(Gn ) ≤ dim(Gn+1 ) ≤ dim(G). It follows that dim(Gn ) = dim(Gn+1 ) for n ≫ 0, and hence ψn is an isogeny. So Gn ∼ = Gn+1 in C for n ≫ 0. This shows that C is noetherian. One may check likewise that C is artinian. (ii) This follows from Proposition 2.8. Next, we relate the short exact sequences in C with those in C: Lemma 3.3. Consider a short exact sequence in C, ξ: u v 0 −→ G1 −→ G2 −→ G3 −→ 0, where G1 , G2 , G3 are smooth and connected. Then ξ splits in C if and only if the push-out f∗ ξ splits in C for some epimorphism with finite kernel f : G1 → H. Proof. Recall that ξ splits in C if and only if there exists a C-morphism g : G2 → G1 such that g ◦ u = id in C. Equivalently, there exists a finite subgroup G′1 ⊂ G1 and a C-morphism g : G2 → G1 /G′1 such that g ◦ u is the quotient map f1 : G1 → G1 /G′1 . If such a pair (G′1 , g) exists, then g factors through a morphism G2 /u(G′1 ) → G1 /G′1 , which splits the bottom exact sequence in the push-out diagram 0 −−−→ G1   f1 y u −−−→ G2   f2 y u′ v −−−→ G3 −−−→ 0   idy v′ 0 −−−→ G1 /G′1 −−−→ G2 /u(G′1) −−−→ G3 −−−→ 0. Replacing G′1 by a larger finite subgroup, we may assume that G1 /G′1 is smooth and connected (Lemma 2.2). Conversely, a splitting of the bottom exact sequence in the above diagram is given by a C-morphism g ′ : G2 /u(G′1 ) → G1 /G′1 such that g ′ ◦ u′ = id in C. Let g : G2 → G1 /G′1 f2 g′ denote the composition G2 −→ G2 /u(G′1 ) −→ G1 /G′1 . Then g◦u = g ′ ◦f2 ◦u = g ′ ◦u′ ◦f1 = f1 as desired. We may now construct non-split exact sequences in C, thereby showing that hd(C) ≥ 1: Examples 3.4. (i) Consider an exact sequence ξ: 0 −→ Ga −→ G −→ A −→ 0, where A is an abelian variety. Then ξ, viewed as an extension of A by Ga in C, is classified by an element η ∈ H 1 (A, OA ) (see [Ro58] or [MM74, §1.9]). 14 If char(k) = 0, then every epimorphism with finite kernel f : Ga → H may be identified with the multiplication by some t ∈ k ∗ , viewed as an endomorphism of Ga ; then the push-out f∗ ξ is classified by tη. In view of Lemma 3.3, it follows that ξ is non-split in C whenever η 6= 0. In contrast, if char(k) = p > 0, then ξ splits in C. Indeed, the multiplication map pA yields an isomorphism in C, and pGa = 0 whereas (pGa )∗ ξ = p∗A ξ. (ii) Assume that char(k) = p > 0 and consider the algebraic group W2 of Witt vectors of length 2. This group comes with an exact sequence ξ: 0 −→ Ga −→ W2 −→ Ga −→ 0, see e.g. [DG70, §V.1.1.6]. Every epimorphism with finite kernel f : Ga → H may be identified with a non-zero endomorphism of Ga . In view of [DG70, Cor. V.1.5.2], it follows that the push-forward f∗ ξ is non-split. Thus, ξ does not split in C. Proposition 3.5. Consider an exact sequence u u un−1 v vn−1 1 2 0 −→ G1 −→ G2 −→ · · · −→ Gn −→ 0 in C. Then there exists an exact sequence v 1 2 0 −→ H1 −→ H2 −→ · · · −→ Hn −→ 0 in C, and epimorphisms with finite kernels fi : Gi → Hi (i = 1, 2, . . . , n), such that the diagram un−1 u2 u1 → G2 −−− → · · · −−−→ Gn −−−→ 0 0 −−−→ G1 −−−       f 1y f 2y f ny v n−1 v v 1 2 → H2 −−− → · · · −−−→ Hn −−−→ 0 0 −−−→ H1 −−− commutes in C. Proof. We argue by induction on the length n. If n = 2, then we just have an isomorphism u : G1 → G2 in C. Then u is represented by an isomorphism u : G1 /G′1 → G2 /G′2 in C, for some finite groups G′1 ⊂ G1 and G′2 ⊂ G2 . If n = 3, then the C-morphism u2 : G2 → G3 is represented by an epimorphism u2 : G2 → G3 /G′3 in C, where G′3 is a finite subgroup of G3 . We may thus replace G3 with G3 /G′3 , and assume that u2 is an epimorphism in C. Next, u1 : G1 → G2 is represented by a morphism u1 : G1 → G2 /G′2 with finite kernel, where G′2 is a finite subgroup of G2 . We may thus replace G1 (resp. G2 , G3 ) with G1 /Ker(u1 ) (resp. G2 /G′2 , G3 /u2 (G′2 )) and assume that u1 is a monomorphism in C. Then u2 ◦ u1 has finite image, and hence is zero since G1 is smooth and connected. We now have a complex in C u u 1 2 0 −→ G1 −→ G2 −→ G3 −→ 0, 15 where u1 is a monomorphism, u2 an epimorphism, and Ker(u2 )/Im(u1 ) is finite. By Lemma 2.2, we may choose a finite subgroup F ⊂ Ker(u2 ) such that Ker(u2 ) = Im(u1 )+F . This yields a commutative diagram in C 0 −−−→ G1   q1 y u 1 −−− → u 2 −−− → G3 −−−→ 0   idy G2   q2 y v v 1 2 0 −−−→ G1 /u−1 1 (F ) −−−→ G2 /F −−−→ G3 −−−→ 0, where q1 , q2 denote the quotient maps. Clearly, v1 is a monomorphism, and v2 an epimorphism. Also, v2 ◦ v1 = 0, since q1 is an epimorphism. Finally, q2 restricts to an epimorphism Ker(u2 ) → Ker(v2 ), and hence Ker(v2 ) = Im(v1 ). This completes the proof in the case where n = 3. For an arbitrary length n ≥ 4, we cut the given exact sequence into two exact sequences in C u1 G2 −→ K −→ 0, 0 −→ G1 −→ u un−1 3 0 −→ K −→ G3 −→ · · · −→ Gn −→ 0. By the induction assumption, there exists a commutative diagram in C u un−1 v v n−1 3 0 −−−→ K −−−→ G3 −−− → · · · −−−→ Gn −−−→ 0       f 3y f ny fy v 3 → · · · −−−→ Hn −−−→ 0, 0 −−−→ L −−−→ H3 −−− where f, f3 , . . . , fn are epimorphisms with finite kernels, and the bottom sequence comes from an exact sequence in C. Since f is an isomorphism in C, we have an exact sequence u 1 0 −→ G1 −→ G2 −→ L −→ 0 in C, and hence another commutative diagram in C u 1 → G2 −−−→ 0 −−−→ G1 −−−     f 1y f 2y L −−−→ 0  g y v 1 → H2 −−−→ M −−−→ 0, 0 −−−→ H1 −−− where again f1 , f2 , g are epimorphisms with finite kernels, and the bottom sequence comes from an exact sequence in C. Denote by F the kernel of g : L → M; then we have a commutative diagram in C 0 −−−→ L −−−→  g y G3   hy u u un−1 w v v n−1 3 4 −−− → G4 −−− → · · · −−−→ Gn −−−→ 0     f ny f 4y 4 → · · · −−−→ Hn −−−→ 0, 0 −−−→ M −−−→ H3 /v(F ) −−−→ H4 −−− 16 satisfying similar properties. This yields the desired commutative diagram u 1 → 0 −−−→ G1 −−−   y u 2 G2 −−− →   y u u un−1 w v v n−1 3 4 −−− → G4 −−− → · · · −−−→   y G3   y v Gn −−−→ 0   y 1 4 0 −−−→ H1 −−− → H2 −−−→ H3 /v(F ) −−−→ H4 −−− → · · · −−−→ Hn −−−→ 0. 3.2 Divisible groups Given a divisible algebraic group G and a non-zero integer n, the morphism nG : G → G ∼ = factors through an isomorphism G/G[n] −→ G. We denote the inverse isomorphism by ∼ = un : G −→ G/G[n]. By construction, we have a commutative triangle G ❍❍ nG  G ❍❍ q ❍❍ ❍❍ ❍# un / G/G[n], where q denotes the quotient morphism. Since q yields the identity morphism in C, we see that un yields the inverse of the C-automorphism nG of G. As a consequence, EndC (G) is a Q-algebra. More generally, we have the following: Proposition 3.6. Let G, H be smooth connected algebraic groups, and assume that H is divisible. (i) Every extension group ExtnC (G, H) is a Q-vector space. (ii) The natural map Q : HomC (G, H) → HomC (G, H) is injective and induces an isomorphism γ : Q ⊗Z HomC (G, H) −→ HomC (G, H), 1 ⊗ f 7−→ Q(un ⊗ f ). n (iii) If G is divisible as well, then the natural map Q1 : Ext1C (G, H) → Ext1C (G, H) induces an isomorphism γ 1 : Q ⊗Z Ext1C (G, H) −→ Ext1C (G, H). Proof. (i) Just note that ExtnC (G, H) is a module over the Q-algebra EndC (H). (ii) Let f ∈ HomC (G, H), and n a positive integer. If γ( n1 ⊗ f ) = 0, then γ(f ) = 0, i.e., f = 0. Thus, f = 0 by Lemma 3.1. This shows the injectivity of γ. 17 For the surjectivity, consider a C-morphism f : G → H represented by a C-morphism f : G → H/H ′ , where H ′ is a finite subgroup of H. Then H ′ ⊂ H[n] for some positive integer n, which we may take to be the order of H ′ . Thus, we may assume that H ′ = H[n]. 1 Then the C-morphism ϕ := u−1 n ◦ f : G → H satisfies ϕ = nf , i.e., f = γ( n ⊗ ϕ). (iii) Consider η ∈ Ext1C (G, H) such that γ 1 ( n1 ⊗ η) = 0 for some positive integer n. Then of course γ 1 (η) = 0, i.e., η is represented by an exact sequence in C u v 0 −→ H −→ E −→ G −→ 0, which splits in C. By Lemma 3.3 and the divisibility of H, it follows that the push-out by mH of the above extension splits in C for some m > 0. But (mH )∗ η = mη (see e.g. [Oo66, Lem. I.3.1]), and hence mη = 0. This shows the injectivity of γ 1 . For the surjectivity, we adapt the argument of Proposition 3.5. Let η ∈ Ext1C (G, H) be represented by an exact sequence in C u v 0 −→ H −→ E −→ G −→ 0. Since G is divisible, v is represented by a C-morphism v : E → G/G[m] for some positive integer m. Replacing η with its pull-back u∗m η = (m∗G )−1 η = γ 1 ( m1 ⊗ η), we may thus assume that v is represented by a C-epimorphism v : E → G. Likewise, since H is divisible, u is represented by some C-morphism u : H → E/E[n]. Then η is represented by the exact sequence in C v u n G −→ 0, 0 −→ H −→ E/E[n] −→ where vn : E/E[n] → G/G[n] is the C-epimorphism induced by v. So we may further assume that u is represented by a C-morphism u : H → E. By Lemma 3.1, we then have v ◦ u = 0; moreover, Ker(u) and Ker(v)/Im(u) are finite. In view of Lemma 2.2, we have Ker(v) = Im(u) + E ′ for some finite subgroup E ′ ⊂ E. This yields a commutative diagram in C u v 0 −−−→ H −−−→ E −−−→ G −−−→ 0       idy y y u v 1 1 0 −−−→ H/u−1 (E ′ ) −−− → E/E ′ −−− → G −−−→ 0, where the bottom sequence is exact, and u−1(E ′ ) is finite. We may thus choose a positive integer r such that u−1 (E ′ ) ⊂ H[r]. Taking the pushout by the quotient map H/u−1 (E ′ ) → H/H[r] yields a commutative diagram in C 0 −−−→ H   y u E   y −−−→ u v −−−→ G −−−→ 0   idy v 2 2 0 −−−→ H/H[r] −−− → E/E ′ + u(H[r]) −−− → G −−−→ 0, where the bottom sequence is exact again. Thus, rη = (rH )∗ η is represented by an exact sequence in C. 18 Remarks 3.7. (i) Given two divisible groups G, H, the map Q1 : Ext1C (G, H) −→ Ext1C (G, H) is not necessarily injective. Indeed, the group Ext1C (A, Gm ) has non-zero torsion for any non-zero abelian variety A over (say) a separably closed field, as follows from the WeilBarsotti isomorphism. (ii) We may also consider the natural maps γ n : Q ⊗Z ExtnC (G, H) −→ ExtnC (G, H) for n ≥ 2. But these maps turn out to be zero for any algebraic groups G, H, since ExtnC (G, H) = 0 (Lemma 4.11) and ExtnC (G, H) is torsion (Remark 4.12). As a first application of Proposition 3.6, we obtain: Proposition 3.8. Assume that char(k) = 0. (i) The composition of the inclusion U → C with the quotient functor Q : C → C identifies U with a full subcategory of C. (ii) The unipotent radical functor yields an exact functor Ru : C −→ U, which is right adjoint to the inclusion. Moreover, Ru commutes with base change under field extensions. (iii) Every unipotent group is a projective object in C. Proof. (i) Recall that a morphism of unipotent groups is just a linear map of the associated k-vector spaces. In view of Proposition 3.6, it follows that the natural map HomC (U, V ) → HomC (U, V ) is an isomorphism for any unipotent groups U, V . (ii) The functor Ru : C → U is exact by Theorem 2.9, and sends every finite group to 0. By the universal property of Q, there exists a unique exact functor S : C/F → U such that Ru = S ◦ Q. Since Ru commutes with base change under field extensions (Theorem 2.9 again), so does S by uniqueness. Thus, composing S with the inclusion C → C/F yields the desired exact functor. For any unipotent group U and any algebraic group G, the natural map HomU (U, Ru (G)) −→ HomC (U, G) is an isomorphism. By Proposition 3.6 again, the natural map Q : HomC (U, G) −→ HomC (U, G) is an isomorphism as well. It follows that Ru is right adjoint to the inclusion. (iii) Let U be a unipotent group. Then the functor on C defined by G 7−→ HomU (U, Ru (G)) is exact, since the unipotent radical functor is exact and the category U is semi-simple. Thus, G 7→ HomC (U, G) is exact as well; this yields the assertion. 19 3.3 Field extensions Let k ′ be a field extension of k. Then the assignment G 7→ Gk′ := G ⊗k k ′ yields the base change functor ⊗k k ′ : Ck −→ Ck′ . Clearly, this functor is exact and faithful; also, note that G is connected (resp. smooth, finite, linear, unipotent, a torus, an abelian variety, a semi-abelian variety) if and only if so is Gk′ . Lemma 3.9. With the above notation, the functor ⊗k k ′ yields an exact functor ⊗k k ′ : C k −→ C k′ . Proof. The composite functor Qk′ ◦ ⊗k k ′ : Ck → C k′ is exact and sends every finite kgroup to 0; hence it factors through a unique exact functor Ck /Fk → C k′ . This yields the existence and exactness of ⊗k k ′ . Lemma 3.10. Let k ′ be a purely inseparable field extension of k, and G′ a k ′ -group. (i) There exists a smooth k-group G and an epimorphism f : G′ → Gk′ such that Ker(f ) is infinitesimal. (ii) If G′ ⊂ Hk′ for some k-group H, then there exists a k-subgroup G ⊂ H such that G′ ⊂ Gk′ and Gk′ /G′ is infinitesimal. Proof. (i) Let n be a positive integer and consider the nth relative Frobenius morphism n FGn′ /k′ : G′ −→ G′(p ) . Recall that the quotient G′ /Ker(FGn′ /k′ ) is smooth for n ≫ 0. Since Ker(FGn′ /k′ ) is infinitesimal, we may assume that G′ is smooth. Then FGn′ /k′ is an epimorphism in view of [SGA3, VIIA, Cor. 8.3.1]. Next, note that G′ is defined over some finite subextension k ′′ of k ′ , i.e., there exists ′′ a k -subgroup G′′ such that G′ = G′′ ⊗k′′ k ′ . By transitivity of base change, we may thus assume that k ′ is finite over k. Let q := [k ′ : k], then q = pn , where p = char(k) and n is a positive integer; also, k ′ q ⊂ k. Consider again the morphism FGn′ /k′ ; then by construction, n n G′(p ) ∼ = Gk ′ , = G′ ⊗k′ k ′ , where k ′ is sent to itself via the qth power map. Thus, G′(p ) ∼ ′ ′ ′ where G denotes the k-group G ⊗k k; here k is sent to k via the qth power map again. So the induced map G′ → Gk′ is the desired morphism. (ii) As above, we may reduce to the case where k ′ is finite over k. Then the statement follows by similar arguments, see [Br15b, Lem. 4.3.5] for details. We now are ready to prove Theorem 1 (iv): Theorem 3.11. Let k ′ be a purely inseparable field extension of k. Then the base change functor ⊗k k ′ : C k → C k′ is an equivalence of categories. 20 Proof. By Lemma 3.10, every k ′ -group G′ is isogenous to Gk′ for some smooth k-group G. It follows that ⊗k k ′ is essentially surjective. Next, let G, H be smooth connected k-groups, and f : G → H a C k -morphism, represented by a Ck -morphism f : G → H/H ′ for some finite k-subgroup H ′ ⊂ H. If f k′ : Gk′ → Hk′ is zero in C k′ , then the image of fk′ : Gk′ → Hk′ /Hk′ ′ is finite. By Lemma 2.1, it follows that fk′ = 0. This shows that ⊗k k ′ is faithful. We now check that ⊗k k ′ is full. Let again G, H be smooth connected k-groups, and let f ∈ HomC k′ (Gk′ , Hk′ ). We show that there exists a finite k-subgroup H ′ ⊂ H and a k-morphism ϕ : G → H/H ′ such that ϕk′ represents f . For this, we may replace H with its quotient by any finite k-subgroup. Choose a representative f : Gk′ → Hk′ /H ′′ of f , where H ′′ ⊂ Hk′ is a finite k ′ subgroup. By Lemma 3.10, there exists a k-subgroup I ⊂ H such that H ′′ ⊂ Ik′ and Ik′ /H ′′ is finite; then Ik′ is finite as well, and hence so is I. We may thus replace H by H/I, and f by its composition with the quotient morphism Hk′ /H ′′ → Hk′ /Ik′ = (H/I)k′ . Then f is represented by a morphism f : Gk′ → Hk′ . Consider the graph Γ(f ) ⊂ Gk′ ×k′ Hk′ . By Lemma 3.10 again, there exists a ksubgroup ∆ ⊂ G × H such that Γ(f ) ⊂ ∆k′ and ∆k′ /Γ(f ) is finite. Then the intersection ∆k′ ∩ (0 × Hk′ ) is finite, since Γ(f ) ∩ (0 × Hk′ ) is zero. Thus, ∆ ∩ (0 × H) is finite as well; equivalently, the k-group H ′ := H ∩ (0 × id)−1 (∆) is finite. Denoting by Γ the image of ∆ in G × H/H ′ , we have a cartesian square ∆ −−−→   y G×H   y Γ −−−→ G × H/H ′ , where the horizontal arrows are closed immersions, and the left (resp. right) vertical arrow is the quotient by ∆ ∩ (0 × H) (resp. by H ′ acting on H via addition). So Γ is a k-subgroup of G × H/H ′ , and Γ ∩ (0 × H/H ′ ) is zero; in other words, the projection π : Γ → G is a closed immersion. Since G is smooth and connected, and dim(Γ) = dim(∆) = dim Γ(f ) = dim(G), it follows that π is an isomorphism. In other words, Γ is the graph of a k-morphism ϕ : G → H/H ′ . Since the above cartesian square lies in a push-out diagram, 0 −−−→ ∆ −−−→   y G×H   y ϕ−q −−−→ H/H ′ −−−→ 0   idy ϕ−id 0 −−−→ Γ −−−→ G × H/H ′ −−−→ H/H ′ −−−→ 0, where q : H → H/H ′ denotes the quotient morphism, it follows that ∆ = ker(ϕ − q). As Γ(f ) ⊂ ∆k′ , we see that ϕk′ = qk′ ◦ f . Thus, f is represented by ϕk′ ; this completes the proof of the fullness assertion. Remarks 3.12. (i) Likewise, the base change functor induces equivalences of categories U k → U k′ , T k → T k′ , Lk → Lk′ , and Ak → Ak′ . For tori, this follows much more directly from the anti-equivalence of T k with the category of rational representations of the absolute Galois group of k, see Proposition 4.1. 21 (ii) In particular, the category U k is equivalent to U ki , where ki denotes the perfect closure of k in k̄. Recall from [DG70, Thm. V.1.4.3, Cor. V.1.4.4] that the category Uki is anti-equivalent to the category of finitely generated modules over the Dieudonné ring D = Dki which are killed by some power of the Verschiebung map V . Moreover, the category U ki is anti-equivalent to the category of finitely generated modules over the localization D(V ) which are killed by some power of V ; see [DG70, §V.3.6.7]. By work of Schoeller, Kraft, and Takeuchi (see [Sc72, Kr75, Tak75]), the category Uk is anti-equivalent to a category of finitely generated modules over a certain k-algebra, which generalizes the Dieudonné ring but seems much less tractable. 4 4.1 Tori, abelian varieties, and homological dimension Tori Denote by T (resp. M, F M) the full subcategory of C with objects the tori (resp. the groups of multiplicative type, the finite groups of multiplicative type). Then T is stable under taking quotients and extensions, but not subobjets; in particular, T is an additive subcategory of C, but not an abelian subcategory. Also, F and F M are stable under taking subobjects, quotients and extensions. Thus, we may form the quotient abelian category M/F M, as in §3.1. One may readily check that M/F M is a full subcategory of C/F . Let T be the full subcategory of M/F M with objects the tori. Since these are the smooth connected objects of M, one may check as in Lemma 3.1 that the inclusion of T in M/F M is an equivalence of categories. The remaining statements of Lemma 3.1 also adapt to this setting; note that we may replace the direct limits over all finite subgroups with those over all n-torsion subgroups, since tori are divisible. Also, Proposition 3.6 yields natural isomorphisms ∼ = Q ⊗Z HomC (T1 , T2 ) −→ HomT (T1 , T2 ) for any tori T1 , T2 . By assigning with each group of multiplicative type G its character group, X(G) := Homks (Gks , Gm,ks ), one obtains an anti-equivalence between M (resp. F M) and the category of finitely generated (resp. finite) abstract commutative groups equipped with the discrete topology and a continuous action of the Galois group Γ; see [DG70, Thm. IV.1.3.6]. Thus, the assignment XQ : G 7−→ Q ⊗Z X(G) =: X(G)Q yields a contravariant exact functor from M to the category RepQ (Γ) of finite-dimensional Q-vector spaces equipped with a continuous representation of Γ as above; moreover, every finite group of multiplicative type is sent to 0. This yields in turn a contravariant exact functor X Q : T −→ RepQ (Γ). 22 Proposition 4.1. The functor X Q is an anti-equivalence of categories. In particular, the category T is semi-simple, and HomT (T1 , T2 ) is a finite-dimensional Q-vector space for any tori T1 , T2 . Proof. Given a finite-dimensional Q-vector space V equipped with a continuous action of Γ, there exists a finitely generated Γ-stable subgroup M ⊂ V which spans V ; thus, V ∼ = X(T )Q , where T denotes the torus with character group M. So X Q is essentially surjective. Given two tori T1 , T2 , the natural isomorphism HomM (T1 , T2 ) ∼ = HomΓ (X(T2 ), X(T1 )) yields an isomorphism HomT (T1 , T2 ) ∼ = HomΓ (X(T2 )Q , X(T1 )Q ) in view of Proposition 3.6. It follows that X Q is fully faithful. Lemma 4.2. (i) Every algebraic group G has a unique maximal torus, T (G). (ii) Every morphism of algebraic groups u : G → H sends T (G) to T (H). (iii) The formation of T (G) commutes with base change under field extensions. Proof. (i) This follows from the fact that T1 + T2 is a torus for any subtori T1 , T2 ⊂ G. (ii) Just note that the image of a torus under any morphism is still a torus. (iii) Consider an algebraic group G, its maximal torus T , and a field extension k ′ of k. If char(k) = 0, then Theorem 2.9 implies that G/T is a an extension of an abelian variety by a product M × U, where M is finite and U unipotent. As a consequence, a similar assertion holds for Gk′ /Tk′ ; it follows that Gk′ /Tk′ contains no non-zero torus, and hence Tk′ is the maximal torus of Gk′ . On the other hand, if char(k) > 0, then G/T is a 3-step extension of a unipotent group by an abelian variety by a finite group, in view of Theorem 2.11. It follows similarly that Tk′ is the maximal torus of Gk′ . By Lemma 4.2, the assignment G 7→ T (G) yields a functor T : C −→ T , the functor of maximal tori. This functor is not exact, as seen from the exact sequence n G G −→ 0, 0 −→ G[n] −→ G −→ where G is a non-zero torus and n a non-zero integer. But T is exact up to finite groups, as shown by the following; Lemma 4.3. Every exact sequence in C u v 0 −→ G1 −→ G2 −→ G3 −→ 0 yields a complex in C T (u) T (v) 0 −→ T (G1 ) −→ T (G2 ) −→ T (G3 ) −→ 0, where T (u) is a monomorphism, T (v) an epimorphism, and Ker T (v)/Im T (u) is finite. 23 Proof. We argue as in the proof of Theorem 2.11 (iii). Clearly, T (u) is a monomorphism. Also, the group Ker T (v)/Im T (u) = T (G2 ) ∩ u(G1 )/u(T (G1)) is the quotient of a group of multiplicative type by its maximal torus, and hence is finite. To show that T (v) is an epimorphism, we may replace G2 with v −1 (T (G3 )), and hence assume that G3 is a torus. Next, we may replace G2 with G2 /T (G2), and hence assume that T (G2 ) is zero. We then have to check that G3 is zero. If char(k) = 0, then there is an exact sequence 0 −→ M × U −→ G2 −→ A −→ 0 as in Theorem 2.9, where M is finite. Thus, every morphism G2 → G3 has finite image. Since v : G2 → G3 is an epimorphism, it follows that G3 = 0. On the other hand, if char(k) > 0, then there are exact sequences 0 −→ H −→ G2 −→ U −→ 0, 0 −→ M −→ H −→ A −→ 0 as in Theorem 2.11, where M is finite. This implies again that every morphism G2 → G3 has finite image, and hence that G3 = 0. Proposition 4.4. (i) The functor of maximal tori yields an exact functor T : C −→ T , right adjoint to the inclusion T → C. Moreover, T commutes with base change under field extensions. (ii) Every torus is a projective object in C. Proof. (i) Composing T with the functor T → T induced by the quotient functor Q, we obtain an exact functor C → T (Lemma 4.3), which sends every finite group to 0. This yields an exact functor T : C → T . The adjointness assertion follows from the natural isomorphism HomC (T, G) ∼ = HomT (T, T (G)) for any torus T and any algebraic group G, which yields a natural isomorphism HomC (T, G) ∼ = HomT (T, T (G)) by using Lemmas 3.1 and 4.3. Finally, the assertion on field extensions is a direct consequence of Lemma 4.2. (ii) This follows by arguing as in the proof of Proposition 3.8 (iii). 4.2 Abelian varieties Denote by A (resp. P) the full subcategory of C with objects the abelian varieties (resp. the proper groups, i.e., those algebraic groups G such that the structure map G → Spec(k) is proper). Like the categorye of tori, A is stable under taking quotients and extensions, 24 but not subobjects; so A is an additive subcategory of C, but not an abelian subcategory. Also, P is stable under taking subobjects, quotients and extensions; it also contains the category F of finite groups. We may thus form the quotient abelian category P/F , which is a full subcategory of C/F . Next, let A be the full subcategory of P/F with objects the abelian varieties. As in §4.1, the inclusion of A in P/F is an equivalence of categories, and the remaining statements of Lemma 3.1 adapt to this setting. Also, Proposition 3.6 yields natural isomorphisms ∼ = Q ⊗Z HomC (A1 , A2 ) −→ HomA (A1 , A2 ) for any abelian varieties A1 , A2 . Since the abelian group HomC (A1 , A2 ) has finite rank (see [Mi86, Thm. 12.5]), HomA (A1 , A2 ) is a finite-dimensional Q-vector space. Moreover, the category A is semi-simple, in view of the Poincaré complete reducibility theorem (which holds over an arbitrary field, see [Co06, Cor. 3.20] or [Br15b, Cor. 4.2.6]). Lemma 4.5. (i) Every smooth connected algebraic group G has a largest abelian variety quotient, α = αG : G −→ A(G). Moreover, Ker(α) is linear and connected. (ii) Every morphism u : G → H, where H is smooth and connected, induces a unique morphism A(u) : A(G) → A(H) such that the square G   αG y u −−−→ H   αH y A(u) A(G) −−−→ A(H) commutes. (iii) For any field extension k ′ of k, the natural morphism A(Gk′ ) → A(G)k′ is an isomorphism if char(k) = 0, and an isogeny if char(k) > 0. Proof. (i) and (ii) The assertions are direct consequences of Theorem 2.3 (ii). (iii) By (i), we have an exact sequence α 0 −→ L(G) −→ G −→ A(G) −→ 0, where L(G) is linear and connected. This yields an exact sequence 0 −→ L(G)k′ −→ Gk′ −→ A(G)k′ −→ 0. Thus, L(Gk′ ) ⊂ L(G)k′ and we obtain an exact sequence 0 −→ L(G)k′ /L(Gk′ ) −→ A(Gk′ ) −→ A(G)k′ −→ 0. Sinc L(G)k′ is linear, the quotient L(G)k′ /L(Gk′ ) must be finite; this yields the assertion when char(k) > 0. When char(k) = 0, we may characterize L(G) as the largest connected linear subgroup ∼ = of G. It follows that L(G)k′ ⊂ L(Gk′ ); hence equality holds, and A(Gk′ ) → A(G)k′ . 25 Remarks 4.6. (i) An arbitrary algebraic group G may admit no largest abelian variety quotient, as shown by the following variant of [Br15b, Ex. 4.3.8]: let A be a non-zero abelian variety, and choose an integer n ≥ 2. Let G := (A × A[n2 ])/diag(A[n]), where A[n] is viewed as a subgroup of A[n2 ]. Consider the subgroups of G H1 := (A[n] × A[n2 ])/diag(A[n]), H2 := diag(A[n2 ])/diag(A[n]). Then G/H1 , G/H2 are both isomorphic to A. Also, H1 ∩ H2 = 0, and G is not an abelian variety. (ii) The assignment G 7→ A(G) does not preserve exactness of sequences of smooth connected algebraic groups. For example, consider an elliptic curve E equipped with a k-rational point of prime order ℓ ≥ 2. Assume that k contains a nontrivial ℓth root of unity; this identifies µℓ with the constant group scheme Z/ℓZ. Consider the quotient G := (E × Gm )/diag(µℓ ), with an obvious notation. Then G is a smooth connected algebraic group, which lies in an exact sequence 0 −→ E −→ G −→ Gm −→ 0. Moreover, the induced map A(E) → A(G) is just the quotient map E → E/µℓ . We now show that the assignment G 7→ A(G) is exact up to finite groups: Lemma 4.7. Consider an exact sequence in C u v 0 −→ G1 −→ G2 −→ G3 −→ 0, where G1 , G2 , G3 are smooth and connected. Then we have a commutative diagram in C 0 −−−→ G1   α1 y u −−−→ G2   α2 y A(u) v −−−→ G3   α3 y −−−→ 0 A(v) 0 −−−→ A(G1 ) −−−→ A(G2 ) −−−→ A(G3 ) −−−→ 0, where A(v) is an epimorphism, and Ker A(u), Ker A(v)/Im A(u) are finite. Proof. Clearly, A(v) is an epimorphism. Let Li := Ker(αi ) for i = 1, 2, 3; then each Li is connected and linear by Theorem 2.3. We have isomorphisms Ker A(u) ∼ = u−1 (L2 )/L1 , −1 −1 Im A(u) ∼ = v (L3 )/L2 . Since u (L2 ) is linear, = u(G1)/u(G1 ) ∩ L2 and Ker A(v) ∼ Ker A(u) is linear as well; it is also proper, and hence finite. Also, Ker A(v)/Im A(u) ∼ = v −1 (L3 )/L2 + u(G1 ) is a quotient of v −1 (L3 )/u(G1 ) ∼ = L3 . It follows similarly that Ker A(v)/Im A(u) is finite. 26 Next, we obtain a dual version of Proposition 4.4: Proposition 4.8. (i) The Albanese functor yields an exact functor A : C −→ A, which is left adjoint to the inclusion A → C. Moreover, A commutes with base change under field extensions. (ii) Every abelian variety is an injective object in C. Proof. (i) Consider a C-morphism f : G → H and choose a representative by a Cmorphism f : G → H/H ′ , where H ′ is a finite subgroup of H. This yields an A-morphism A(f ) : A(G) −→ A(H/H ′) = A(H)/αH (H ′ ), and hence an A-morphism A(f ) : A(G) → A(H). One may readily check that A(f ) depends only on f , in a covariant way. By Proposition 3.5 and Lemma 4.5, the resulting functor A is exact and commutes with base change under field extensions. To show the adjointness assertion, consider a smooth connected algebraic group G and an abelian variety A. Then the map HomA (A(G), A) −→ HomC (G, A), f 7−→ f ◦ αG is an isomorphism by Lemma 4.5 again. In view of Proposition 3.6, it follows that the analogous map HomA (A(G), A) −→ HomC (G, A) is an isomorphism as well. (ii) This follows formally from (i). b the dual of an abelian variety A. Then the assignement Remarks 4.9. (i) Denote by A b yields a contravariant endofunctor of A, which is involutive and preserves isogenies A 7→ A and finite products. As an easy consequence, we obtain a contravariant endofunctor of A, which is involutive and exact. Note that each abelian variety is (non-canonically) A-isomorphic to its dual, via the choice of a polarization. (ii) Let k ′ be a field extension of k. Then the assignement A 7−→ Q ⊗Z A(k ′ ) =: A(k ′ )Q yields a functor from A to the category of Q-vector spaces (possibly of infinite dimension), which preserves finite products. Moreover, each isogeny f : A −→ B yields an isomorphism ∼ = A(k ′ )Q −→ B(k ′ )Q , since this holds for the multiplication maps nA . Thus, the above assignement yields an exact functor from A to the category of Q-vector spaces. 27 4.3 Vanishing of extension groups In this subsection, we prove the assertion (v) of Theorem 1: hd(C) = 1. We first collect general vanishing results for extension groups in C: Lemma 4.10. Let G be a smooth connected algebraic group, U a smooth connected unipotent group, A an abelian variety, and T a torus. (i) ExtnC (T, G) = 0 = ExtnC (G, A) = 0 for all n ≥ 1. (ii) If char(k) = 0, then ExtnC (U, G) = 0 for all n ≥ 1. (iii) If char(k) = p > 0 and G is divisible, then ExtnC (U, G) = 0 = ExtnC (G, U) for all n ≥ 0. (iv) If G is linear, then ExtnC (G, T ) = 0 for all n ≥ 1. If in addition char(k) = 0, then ExtnC (G, U) = 0 for all n ≥ 1 as well. Proof. (i) Just recall that T is projective in C (Proposition 4.4), and A is injective in C (Proposition 4.8). (ii) Likewise, U is projective in C by Proposition 3.8. (iii) Since U is unipotent, there exists a positive integer m such that pm G = 0. It m m follows that both groups Extm (U, G) and Ext (G, U) are p -torsion (see e.g. [Oo66, C C Lem. I.3.1]). But these groups are also modules over EndC (G), and hence Q-vector spaces by Proposition 3.6. This yields the assertion. (iv) By Proposition 2.8 and the long exact sequence for Ext groups, we may assume that G is unipotent or a torus. In the latter case, both assertions follows from (i); in the former case, the first assertion follows from (ii) and (iii), and the second assertion, from the fact that unipotent groups are just vector spaces. Next, recall that hd(C) ≥ 1 in view of Examples 3.4. So, to show that hd(C) = 1, it suffices to check the following: Lemma 4.11. For any smooth connected algebraic groups G, H and any integer n ≥ 2, we have ExtnC (G, H) = 0. Proof. Let η ∈ ExtnC (G, H), where n ≥ 3. Then η is represented by an exact sequence in C 0 −→ H −→ G1 −→ · · · −→ Gn −→ G −→ 0, which we may cut into two exact sequences in C 0 −→ H −→ G1 −→ G2 −→ K −→ 0, 0 −→ K −→ G3 −→ · · · −→ Gn −→ G −→ 0. Thus, η can be written as a Yoneda product η1 ∪ η2 , where η1 ∈ Ext2C (G, K) and η2 ∈ ExtCn−2 (K, H). So it suffices to show the assertion when n = 2. Using the long exact sequences for Ext groups, we may further reduce to the case where G, H are simple objects in C, i.e., Ga , simple tori T , or simple abelian varieties A (Proposition 3.2). In view of Lemma 4.10, it suffices in turn to check that 28 (i) Ext2C (A, T ) = 0, (ii) Ext2C (A, Ga ) = 0 when char(k) = 0, (iii) Ext2C (Ga , Ga ) = 0 when char(k) > 0. For (i), we adapt the argument of [Oo66, Prop. II.12.3]. Let η ∈ Ext2C (A, T ) be represented by an exact sequence in C u v w 0 −→ T −→ G1 −→ G2 −→ A −→ 0. As above, η = η1 ∪ η2 , where η1 denotes the class of the extension u 0 −→ T −→ G1 −→ K −→ 0, and η2 that of the extension w 0 −→ K −→ G2 −→ A → 0. Also, note that A(w) : A(G2 ) → A is an epimorphism in A, and hence has a section, say s. Denoting by H2 the pull-back of s(A) under the Albanese morphism G2 → A(G2 ), we have a monomorphism ι : H2 → G2 in C, such that A(w ◦ ι) : A(H2 ) → A is an isomorphism. This yields a commutative diagram of exact sequences in C 0 −−−→ T −−−→   idy u H1 −−−→   y H2 −−−→ A −−−→ 0     ιy idy v w 0 −−−→ T −−−→ G1 −−−→ G2 −−−→ A −−−→ 0. Thus, η is represented by the top exact sequence, and hence we may assume that A(w) is an isomorphism. Then K is linear in view of Theorem 2.3. Thus, κ1 = 0 by Lemma 4.10 (iv). So η = 0; this completes the proof of (i). For (ii), we replace T with Ga in the above argument, and use the vanishing of Ext1C (L, Ga ) for L linear (Lemma 4.10 (iv) again). Finally, for (iii), it suffices to show that Ext2U (Ga , Ga ) = 0. Also, we may assume that k is perfect, in view of Theorem 3.11. Let η ∈ Ext2U (Ga , Ga ) be represented by an exact sequence in U, 0 −→ Ga −→ G1 −→ G2 −→ Ga −→ 0. Then Proposition 3.5 yields an exact sequence in U, 0 −→ Ga −→ H1 −→ H2 −→ Ga −→ 0, and a commutative diagram in U, 0 −−−→ Ga −−−→   y G1 −−−→   y G2 −−−→   y Ga −−−→ 0   y 0 −−−→ Ga −−−→ H1 −−−→ H2 −−−→ Ga −−−→ 0. where the vertical arrows are isomorphisms in U (here we use the fact that the quotient of Ga by a finite subgroup is isomorphic to Ga ). Since Ext2U (Ga , Ga ) = 0 (see [DG70, V.1.5.1, V.1.5.2]), the bottom exqct sequence is equivalent to the trivial exact sequence in U, and hence in U. Thus η = 0 as desired. 29 Remark 4.12. When k is perfect, the groups ExtnC (G, H) are torsion for all n ≥ 2 and all algebraic groups G, H, in view of [Mi70, Cor., p. 439]. In fact, this assertion extends to an arbitrary field k: indeed, it clearly holds when G or H is finite, or more generally m-torsion for some positive integer m. Using Proposition 2.8, one may thus reduce to the case when G, H are simple objects of C. Then the assertion is obtained by combining Proposition 3.6, Lemma 4.10, and the proof of Lemma 4.11. 5 5.1 Structure of isogeny categories Vector extensions of abelian varieties In this subsection, we assume that char(k) = 0. Recall that a vector extension of an abelian variety A is an algebraic group G that lies in an extension ξ: 0 −→ U −→ G −→ A −→ 0, where U is unipotent. Then U = Ru (G) and A = A(G) are uniquely determined by G; also, the extension ξ has no non-trivial automorphisms, since HomC (A, U) = 0. Thus, the data of the algebraic group G and the extension ξ are equivalent. We denote by V the full subcategory of C with objects the vector extensions (of all abelian varieties). By Theorems 2.3 and 2.4, the objects of V are exactly those smooth connected algebraic groups that admit no non-zero subtorus. In view of Lemmas 4.2 and 4.3, this readily implies: Lemma 5.1. (i) Let 0 → G1 → G2 → G3 → 0 be an exact sequence in C, where G2 is connected. Then G2 is an object of V if and only if so are G3 and G01 . (ii) Let f : G → H be an isogeny of connected algebraic groups. Then G is an object of V if and only if so is H. (iii) Let k ′ be a field extension of k, and G an algebraic k-group. Then G is an object of Vk if and only if Gk′ is an object of Vk′ . In particular, V is stable under taking quotients and extensions, but not subobjects; like T and A, it is an additive subcategory of C, but not an abelian subcategory. Next, recall from [Ro58] or [MM74, §1.9] that every abelian variety A has a universal vector extension, ξ(A) : 0 −→ U(A) −→ E(A) −→ A −→ 0, where U(A) is the additive group of the vector space H 1 (A, OA )∗ ; moreover, dim U(A) = dim A. Also, E(A) is anti-affine, i.e., every morphism from E(A) to a linear algebraic group is zero (see e.g. [Br15b, Prop. 5.5.8]). Proposition 5.2. (i) The assignments A 7→ E(A), A 7→ U(A) yield additive functors E : A −→ V, U : A −→ U, which commute with base change under field extensions. 30 (ii) For any morphism f : A → B of abelian varieties, the map U(f ) : U(A) → U(B) is the dual of the pull-back morphism f ∗ : H 1 (B, OB ) → H 1 (A, OA ). Moreover, U(f ) is zero (resp. an isomorphism) if and only if f is zero (resp. an isogeny). (iii) E is left adjoint to the Albanese functor A : V → A. Proof. We prove (i) and (ii) simultaneously. Let f : A → B be a morphism of abelian varieties. Consider the pull-back diagram of exact sequences 0 −−−→ U(B) −−−→   idy F   y −−−→ A −−−→ 0   fy 0 −−−→ U(B) −−−→ E(B) −−−→ B −−−→ 0. The universal property of ξ(A) yields a commutative diagram of exact sequences 0 −−−→ U(A) −−−→ E(A) −−−→ A −−−→ 0       idy y y 0 −−−→ U(B) −−−→ F −−−→ A −−−→ 0, and hence another such diagram, 0 −−−→ U(A) −−−→ E(A) −−−→ A −−−→ 0       U (f )y E(f )y fy 0 −−−→ U(B) −−−→ E(B) −−−→ B −−−→ 0, which defines morphisms E(f ) and U(f ). Next, let η ∈ H 1 (B, OB ), so that we have a push-out diagram of extensions 0 −−−→ U(B) −−−→ E(B) −−−→ B −−−→ 0       ηy idy y 0 −−−→ Ga −−−→ Eη −−−→ B −−−→ 0. By construction, the pull-back of Eη by f is the push-out of ξ(A) by η◦U(f ) : U(A) → Ga . Hence U(f ) is the dual of f ∗ : H 1 (B, OB ) → H 1 (A, OA ). As a consequence, U is a covariant functor, and hence so is E. Since the formation of the universal vector extension commutes with base change under field extensions, the functors E and U commute with such base change as well. Clearly, they are additive; this completes the proof of (i). b To complete the proof of (ii), recall the canonical isomorphism H 1 (A, OA ) ∼ = Lie(A), where the right-hand side denotes the Lie algebra of the dual abelian variety (see [Mi86, b →A b denotes the Rem. 9.4]). This isomorphism identifies f ∗ with Lie(fˆ), where fˆ : B dual morphism of f . As a consequence, U(f ) = 0 ⇔ f ∗ = 0 ⇔ fˆ = 0 ⇔ f = 0, 31 where the second equivalence holds since char(k) = 0, and the third one follows from biduality of abelian varieties. Likewise, U(f ) is an isomorphism if and only if f ∗ is an isomorphism; equivalently, fˆ is an isogeny, i.e., f is an isogeny. (iii) Given a vector extension 0 → U → G → A(G) → 0, we check that the map α : HomV (E(A), G) −→ HomA (A, A(G)), u 7−→ A(u) is an isomorphism. Consider a morphism u : E(A) → G such that A(u) = 0. Then u factors through a morphism E(A) → Ru (G), and hence u = 0 as E(A) is anti-affine. Next, consider a morphism v : A → A(G). By (i), we have a commutative square E(v) E(A) −−−→ E(A(G))     y y A v −−−→ A(G). Also, the universal property of ξ(A) yields a commutative square δ E(A(G)) −−−→   y A(G) G   αG y id −−−→ A(G). Thus, w := E(v) ◦ δ ∈ HomV (E(A), G) satisfies α(v) = u. Denote by V the isogeny category of vector extensions, that is, the full subcategory of C with the same objects as V. Then V is an abelian category in view of Lemma 5.1. Also, Proposition 3.6 yields natural isomorphisms ∼ = Q ⊗Z HomC (G1 , G2 ) −→ HomV (G1 , G2 ), ∼ = Q ⊗Z Ext1C (G1 , G2 ) −→ Ext1V (G1 , G2 ) for any objects G1 , G2 of V. Corollary 5.3. (i) The functors E : A → V, U : A → U yield exact functors E : A −→ V, U : A −→ U, which commute with base change under field extensions. Moreover, E is left adjoint to the Albanese functor A : V → A. (ii) The universal vector extension of any abelian variety is a projective object of V. Proof. (i) This follows from Propositions 3.5 and 5.2. (ii) We have canonical isomorphisms for any object G of V: HomV (E(A), G) ∼ = HomA (A, A(G)), = Q ⊗Z HomA (A, A(G)) ∼ = Q ⊗Z HomV (E(A), G) ∼ where the first and third isomorphisms follow from Proposition 3.6, and the second one from Proposition 5.2 again. Since the Albanese functor A is exact (Proposition 4.8), it follows that the functor G 7→ HomV (E(A), G) is exact as well. 32 Next, let G be an object of V. Form and label the commutative diagram of exact sequences in C ι 0 −−−→ U(A) −−−→ E(A) −−−→ A −−−→ 0       γy idy δy 0 −−−→ U G −−−→ −−−→ A −−−→ 0, where U = U(G), A = A(G), and γ = γG classifies the bottom extension. This yields an exact sequence in C ξ: γ−ι 0 −→ U(A) −→ U × E(A) −→ G −→ 0. Proposition 5.4. Keep the above notation. (i) ξ yields a projective resolution of G in V. (ii) For any object H of V, we have an exact sequence ϕ 0 −→ HomV (G, H) −→ HomU (U(G), U(H)) × HomA (A(G), A(H)) ψ −→ HomU (U(A(G)), U(H)) −→ Ext1V (G, H) −→ 0, where ϕ(f ) := (U(f ), A(f )), and ψ(u, v) := u ◦ γG − γH ◦ U(v). Proof. (i) This holds as U, U(A) are projective in C (Theorem 2.9), and E(A) is projective in C (Proposition 5.2). (ii) In view of (i), this follows readily from the long exact sequence of extension groups 0 −→ HomV (G, H) −→ HomV (U × E(A), H) −→ HomV (U, H) −→ Ext1V (G, H) −→ 0 associated with the short exact sequence ξ. As a direct consequence of Proposition 5.4, we obtain: Corollary 5.5. The following conditions are equivalent for an object G of V: (i) G ∼ = E(A) in V for some abelian variety A. (ii) HomV (G, Ga ) = Ext1V (G, Ga ) = 0. As a further consequence, we describe the projective or injective objects of V: Corollary 5.6. (i) The projective objects of V are exactly the products V ×E(A), where V is unipotent, and A is an abelian variety. (ii) The injective objects of V are exactly the abelian varieties. 33 Proof. Let G be an extension of an abelian variety A by a unipotent group U. (i) If G is projective in V, then Ext1V (G, Ga ) = 0. In view of Proposition 5.4, it follows that the map HomU (U, Ga ) → HomU (U(A), Ga ), u 7→ u ◦ γ is surjective. Equivalently, γ is injective; hence so is δ : E(A) → G. Identifying E(A) with a subgroup of G, it follows that G = U + E(A), and U(A) ⊂ U. We may choose a complement V ⊂ U to the subspace U(A) ⊂ U; then G ∼ = V × E(A). Conversely, every such product is projective by Proposition 5.2. This yields the assertion. (ii) If G is injective in V, then Ext1V (B, G) = 0 for any abelian variety B. Thus, we have an exact sequence ∂ 0 −→ HomV (B, U) −→ HomV (B, G) −→ HomV (B, A) −→ Ext1V (B, U) −→ 0. Moreover, Ext1V (B, U) ∼ = HomU (U(B), U), as follows e.g. from Proposition 5.4. Since HomV (B, A) = HomA (B, A) is a finite-dimensional Q-vector space, so is HomU (U(B), U). When k is not a number field, i.e., k is an infinite-dimensional Q-vector space, this forces U = 0, since U(B) 6= 0 for any non-zero abelian variety B. Thus, G is an abelian variety. On the other hand, when k is a number field, there are only finitely many isomorphism classes of abelian varieties that are isogenous to any prescribed abelian variety (see [MW93] for a quantitative version of this finiteness result). As a consequence, we may choose a simple abelian variety B, not isogenous to any simple factor of A. Then HomA (B, A) = 0; as above, this yields U = 0, i.e., G is an abelian variety. Conversely, every abelian variety is injective in V by Proposition 4.8. We now describe the structure of V and V in terms of linear algebra. Let D be the category with objects the triples (A, U, γ), where A is an abelian variety, U a unipotent group, and γ : U(A) → U a morphism; the D-morphisms from (A1 , U1 , γ1) to (A2 , U2 , γ2 ) are those pairs of C-morphisms u : U1 → U2 , v : A1 → A2 such that the square U (v) U(A1 ) −−−→ U(A2 )     γ1 y γ2 y U1 u −−−→ U2 commutes. We also introduce the ‘isogeny category’ D, by allowing v to be a C-morphism in the above definition (this makes sense in view of Corollary 5.3). Next, define a functor D : V −→ D by assigning to each object G the triple (A(G), Ru (G), γ), where γ : U(A(G)) → Ru (G) denotes the classifying map, and to each morphism f : G1 → G2 , the pair (A(f ), U(f )). By Corollary 5.3 again, we may define similarly a functor D : V −→ D. Proposition 5.7. With the above notation, the functors D and D yield equivalences of categories. We omit the easy proof. 34 5.2 Semi-abelian varieties Recall that a semi-abelian variety is an algebraic group G that lies in an extension ξ: 0 −→ T −→ G −→ A −→ 0, where T is a torus, and A an abelian variety. We now adapt part of the results of §5.1 to this setting, leaving the (easy) verifications to the motivated reader. The algebraic groups T = T (G) and A = A(G) are uniquely determined by G, and the extension ξ has no non-trivial automorphisms. Thus, the data of G and of the extension ξ are equivalent. Moreover, recall the natural isomorphism ∼ = b s )), c : Ext1C (A, T ) −→ HomΓ (X(T ), A(k which arises from the Weil-Barsotti isomorphism ∼ = b s) Ext1Cks (Aks , Gm,ks ) −→ A(k together with the pairing Ext1C (A, T ) × X(T ) −→ Ext1Cks (Aks , Gm,ks ) given by push-out of extensions via characters of T . Denote by S the full subcategory of C with objects the semi-abelian varieties. Then the analogue of Lemma 5.1 holds in view e.g. of [Br15b, §5.4] (but there is no analogue of the universal vector extension in this setting). Thus, the isogeny category of semi-abelian varieties, S, is an abelian category. As for vector extensions of abelian varieties, we have natural isomorphisms ∼ = Q ⊗Z HomC (G1 , G2 ) −→ HomS (G1 , G2 ), ∼ = Q ⊗Z Ext1C (G1 , G2 ) −→ Ext1S (G1 , G2 ) for any objects G1 , G2 of S. This yields a natural isomorphism ∼ = b s )Q ). Ext1C (A, T ) −→ HomΓ (X(T )Q , A(k b s )Q yields an exact functor from A to the category of Note that the assignment A 7→ A(k Q-vector spaces equipped with the discrete topology and a continuous representation of Γ, as follows e.g. from Remarks 4.9. Next, we obtain a description of S in terms of linear algebra. Let E be the category with objects the triples (A, M, c), where A is an abelian variety, M a finite-dimensional Qb s )Q a Γ-equivariant vector space equipped with a continuous action of Γ, and c : M → A(k linear map; the E-morphisms from (A1 , M1 , c1 ) to (A2 , M2 , c2 ) are those pairs (u, v), where u : A1 → A2 is a A-morphism and v : M2 → M1 a Γ-equivariant linear map, such that the square c2 b2 (ks )Q M2 −−− → A     vy ûy c1 b1 (ks )Q M1 −−− → A 35 commutes. Then one may check that the assignment G 7→ (A(G), X(T (G))Q, c(G)Q ) yields an equivalence of categories S → E. Moreover, the sequence ϕ 0 −→ HomS (G1 , G2 ) −→ HomΓ (M2 , M1 ) × HomA (A1 , A2 ) ψ b1 (ks )Q ) −→ Ext1 (G1 , G2 ) −→ 0 −→ HomΓ (M2 , A S turns out to be exact for any semi-abelian varieties G1 , G2 , where E(Gi ) := (Ai , Mi , ci ) for i = 1, 2, ϕ(f ) := (X Q ◦ T )(f ), A(f )), and ψ(u, v) := c1 ◦ u − v̂ ◦ c2 . Yet there are important differences between the isogeny categories of vector extensions and semi-abelian varieties. For example, the latter does not have enough projectives in general: Proposition 5.8. (i) If k is not locally finite, then the projective objects of S are exactly the tori. (ii) If k is locally finite, then the product functor T × A → S yields an equivalence of categories. Proof. (i) Let G be a semi-abelian variety, extension of an abelian variety A by a torus b s ) the classifying map, and by T . Denote by c : X(T ) → A(k b s )Q cQ : X(T )Q −→ A(k the corresponding Q-linear map; recall that c and cQ are Γ-equivariant. If G is projective in C, then Ext1C (G, T ′) = 0 for any torus T ′ . Thus, we have an exact sequence ∂ 0 −→ HomC (A, T ′ ) −→ HomC (G, T ′ ) −→ HomC (T, T ′ ) −→ Ext1C (A, T ′) −→ 0. Moreover, the boundary map ∂ may be identified with the map b s )Q ). f 7−→ cQ ◦ f. HomΓ (X(T ′ )Q , X(T )Q ) −→ HomΓ (X(T ′)Q , A(k Since ∂ is surjective, and X(T ′ )Q may be chosen arbitrarily among finite-dimensional Qvector spaces equipped with a continuous representation of Γ, the map cQ is surjective as b s ) has finite rank. In view of [FJ74, Thm. 9.1], well. In particular, the abelian group A(k this forces A to be zero, i.e., G is a torus. (ii) This follows readily from Proposition 2.5 and Corollary 2.13. 5.3 Product decompositions In this subsection, we first prove the remaining assertions (ii) and (iii) of Theorem 1. Then we describe the isogeny category C in characteristic 0, and its projective or injective objects in arbitrary characteristics. Proposition 5.9. (i) If k is perfect, then the product functor M × U → L yields an equivalence of categories. 36 (ii) For any field k, the product functor T × U → L yields an equivalence of categories. Proof. (i) This follows readily from Theorem 2.4 and Proposition 2.5. (ii) This is a consequence of (i) in view of Theorem 3.11. Proposition 5.10. If char(k) > 0, then the product functor S × U → C yields an equivalence of categories. Proof. Let G be a smooth connected algebraic group. By Corollary 2.13, there exists a finite subgroup F ⊂ G such that G/F ∼ = S × U, where S is a semi-abelian variety, and U is unipotent. Thus, the product functor Π is essentially surjective. Next, let S1 , S2 be semi-abelian varieties, and U1 , U2 smooth connected unipotent groups. We check that Π induces an isomorphism HomC (S1 , S2 ) × HomC (U1 , U2 ) −→ HomC (S1 × U1 , S2 × U2 ), (ϕ, ψ) 7−→ ϕ × ψ. Assume that ϕ × ψ = 0. Choose representatives ϕ : S1 → S2 /S2′ , ψ : U1 → U2 /U2′ , where S2′ , U2′ are finite. Then ϕ × ψ : S1 × U1 → (S2 × U2 )/(S2′ × U2′ ) has finite image, and hence is zero by Lemma 2.1. So ϕ = ψ = 0. Let γ ∈ HomC (S1 × U1 , S2 × U2 ) be represented by γ : S1 × U1 → (S2 × U2 )/F , where F is finite. Then F ⊂ S2′ × U2′ for some finite subgroups S2′ ⊂ S2 , U2′ ⊂ U2 . Thus, we may assume that F = S2′ × U2′ . Then the composite morphisms γ S1 −→ S1 × U1 −→ S2 /S2′ × U2 /U2′ −→ U2 /U2′ , γ U1 −→ S1 × U1 −→ S2 /S2′ × U2 /U2′ −→ S2 /S2′ are zero by Lemma 2.1 and Proposition 2.5. Thus, γ = ϕ × ψ for some morphisms ϕ : S1 → S2 /S2′ , ψ : U1 → U2 /U2′ . Combining Propositions 5.8 (i) and 5.10, we obtain readily: Corollary 5.11. If k is locally finite, then the product functor T × A × U −→ C yields an equivalence of categories. Remarks 5.12. (i) With the notation of the above corollary, each of the categories T , A, U admits a description of its own. By Proposition 4.1, T is equivalent to the category of Q-vector spaces equipped with an automorphism of finite order. Also, the isomorphism classes of abelian varieties over a finite field are classified by the Honda-Tate theorem (see [Ho68, Tat66]); their endomorphism rings are investigated in [Wa69]. Finally, the structure of U (obtained in [DG70, §V.3.6.7]) has been described in Remark 3.12. (ii) Combining Lemma 2.2, Theorem 2.4 and Lemma 3.10, one may show that the product functor M/IM × U/IU → L/I yields an equivalence of categories. Here I denotes the category of infinitesimal algebraic groups, and IM (resp. IU) the full subcategory of infinitesimal groups of multiplicative type (resp. unipotent). 37 Next, assume that char(k) = 0. Then every algebraic group is isogenous to a fibered product E ×A S, where E is a vector extension of the abelian variety A, and S is semiabelian with Albanese variety isomorphic to A (see e.g. Remark 2.10). This motivates the consideration of the fibered product V ×A S: this is the category with objects the triples (E, S, f ), where E is a vector extension of an abelian variety, S a semi-abelian variety, and f : A(E) → A(S) an A-isomorphism. The morphisms from (E1 , S1 , f 1 ) to (E2 , S2 , f 2 ) are those pairs of C-morphisms u : E1 → E2 , v : S1 → S2 such that the square A(u) A(E1 ) −−−→ A(E2 )     f 2y f 1y A(v) A(S1 ) −−−→ A(S2 ) commutes in A. Proposition 5.13. If char(k) = 0, then C is equivalent to V ×A S. The proof is similar to that of Proposition 5.10, and will be omitted. Note that the descriptions of V and S in terms of linear algebra, obtained in §5.1 and §5.2, can also be reformulated in terms of fibered products of categories. Returning to an arbitrary field k, we obtain: Theorem 5.14. The projective objects of C are exactly: • the linear algebraic groups, if char(k) = 0. • the semi-abelian varieties, if k is locally finite. • the tori, if char(k) > 0 and k is not locally finite. Proof. Let G be a smooth connected algebraic group. As a consequence of Theorem 2.9 and Proposition 5.10, we have an exact sequence in C 0 −→ U −→ G −→ S −→ 0, where U is smooth, connected, and unipotent, and S is a semi-abelian variety. If G is projective in C, then Ext1C (G, T ′ ) = 0 for any torus T ′ . Since HomC (U, T ′) = 0 (as a consequence of Proposition 2.5) and Ext1C (U, T ′ ) = 0 (by Lemma 4.10), the long exact sequence for Ext groups yields that Ext1C (S, T ′ ) = 0 as well. By arguing as in the proof of Proposition 5.8, this forces either A(S) to be zero, or k to be locally finite. If A(S) = 0, then G is linear, and hence G ∼ = T ×U in C by Proposition 5.9. Moreover, tori are projective in C by Proposition 4.4; thus, we may assume that G is unipotent. If char(k) = 0, then every unipotent group is projective, as follows e.g. from Lemma 4.10. If char(k) > 0 and G 6= 0, then there exists an exact sequence 0 −→ H −→ G −→ Ga −→ 0 38 in C. Since Ext1C (G, Ga ) = 0 = Ext2C (H, Ga ), it follows that Ext1C (Ga , Ga ) = 0. But this contradicts Example 3.4 (ii), hence G = 0. On the other hand, if k is locally finite, then G ∼ = T × A × U in C (by Corollary 5.11) and it follows as above that U is zero. Conversely, every semi-abelian variety is projective in C, by Corollary 5.11 again. Corollary 5.15. If char(k) > 0, then C has no non-zero projective objects. Proof. Let G be a projective object of C. By the claim in the proof of Theorem 2.9 (iii), the (abstract) group HomC (G, H) is divisible for any divisible group H. By arguing as in that proof, it follows that G is linear. Also, for any torus T , the group HomC (G, T ) is finitely generated and divisible, hence zero. Next, we show that G is connected. Indeed, the quotient G/G0 is finite and étale, hence contained in a torus T . As HomC (G, T ) = 0, this yields the assertion. In view of Theorem 2.4, we obtain an exact sequence 0 −→ M −→ G −→ U −→ 0, where M is of multiplicative type, and U is unipotent and connected. We now show that U is projective in the unipotent category U. Indeed, given an exact sequence U1 → U2 → 0 in U and a morphism ϕ : U → U2 , we may lift the composition ψ : G → U → U2 to a morphism γ : G → U1 . Then γ(M) = 0 (Proposition 2.5) and hence γ factors through a morphism δ : U → U1 , which lifts ϕ. Let F be an infinitesimal subgroup of U such that U/F is smooth; then U/F is an object of U, and one easily checks by using Proposition 3.5 that U/F is projective in U. In view of Proposition 5.10 and Theorem 5.14, it follows that U/F is zero, hence U is infinitesimal. If U 6= 0 then there exists an epimorphism U → αp and hence a non-zero morphism U → A for some (supersingular) abelian variety A. Since HomC (G, A) = 0, this yields a contradiction. Thus, U = 0, i.e., G is of multiplicative type, hence contained in a torus, hence zero. Theorem 5.16. The injective objects of C are exactly the semi-abelian varieties if k is locally finite, and the abelian varieties otherwise. Proof. Let G be an injective object of C, and 0 → G1 → G → G2 → 0 an exact sequence in C. Since hd(C) = 1, the natural map Ext1C (H, G) → Ext1C (H, G2 ) is an epimorphism for any object H of C. Thus, every quotient of G is injective. In particular, so is the largest semi-abelian quotient S (Remark 2.10 and Theorem 2.11). We now adapt the argument of Corollary 5.6. Recall that S lies in a unique extension 0 −→ T −→ S −→ A −→ 0, classified by a Γ-equivariant morphism b s ). c : X(T ) −→ A(k Since S is injective in C, we have Ext1C (B, S) = 0 for any abelian variety B, and hence the connecting homomorphism ∂ : HomC (B, A) −→ Ext1C (B, T ) 39 is surjective. Under the isomorphisms HomC (B, A) ∼ = Q ⊗Z HomC (B, A), b s )) Ext1C (B, T ) ∼ = Q ⊗Z HomΓ (X(T ), B(k (Proposition 3.6 and §5.2), the map ∂ is identified with the composition of the natural map b s ), B(k b s )) Q ⊗Z HomC (B, A) −→ Q ⊗Z HomΓ (A(k with the map b s ), B(k b s )) −→ Q ⊗Z HomΓ (X(T ), B(k b s )), γ : Q ⊗Z HomΓ (A(k u 7−→ u ◦ c. Next, consider a free abelian group M of finite rank, equipped with a continuous action of Γ. Then for any abelian variety B, the tensor product Bks ⊗Z M is a ks -abelian variety equipped with the diagonal Γ-action, and descends to a unique k-abelian variety B(M). Replacing B with B(M), it follows that the corresponding map b s )) ∂(M) : Q ⊗Z HomΓCks (Bks ⊗Z M, Aks ) −→ Q ⊗Z HomΓ (X(T ) ⊗Z M, B(k b s )) are direct is surjective as well. As Q ⊗Z HomCks (Bks , Aks ) and Q ⊗Z Hom(X(T ), B(k sums of continuous, finite-dimensional Γ-modules, and M is arbitrary, it follows that the natural map b s )) HomCks (Bks , Aks ) −→ Hom(X(T ), B(k is surjective over the rationals. In the case where k is not locally finite, recall from [FJ74, Thm. 9.1] that the group b s ) has infinite rank for any non-zero abelian variety B. Since HomC (Bks , Aks ) has B(k ks finite rank, it follows that X(T ) = 0, i.e., S is an abelian variety. We now distinguish between two subcases. If char(k) = 0, then G is a vector extension of A, and hence is injective in the category V. Thus, G = A in view of Corollary 5.6. If char(k) > 0, then G ∼ = A × U in C for some split unipotent group U, which must be injective in C. If in addition U 6= 0, then it follows that Ga (a quotient of U) is injective in C as well. But Ext1C (Ga , Ga ) 6= 0 in view of Example 3.4, a contradiction. Thus, G = A again. Finally, in the case where k is locally finite, we have G ∼ = T × A × U in C with an obvious notation. As above, we obtain that U = 0; on the other hand, T and A are injective in C by Corollary 5.11. This completes the proof. Remark 5.17. The category C has no non-zero injective objects. This result should be well-known, but we could not find it in the literature; also, it does not seem to follow from Theorem 5.16, as the relation between injective objects in C and C is unclear. So we sketch a direct proof: let G be an injective object of C. For any positive integer n which is prime to char(k), the n-torsion subgroup G[n] is finite and étale, hence isomorphic to a subgroup of some torus Tn . The inclusion G[n] ⊂ G extends to a morphism Tn → G, and hence G[n] is contained in the maximal torus T (G). Likewise, G[n] is isomorphic to a subgroup of an abelian variety An , and hence is contained in the largest abelian subvariety 40 of G. Since this abelian variety intersects T (G) along a finite subgroup, it follows that G[n] = 0 for n ≫ 0. If char(k) = 0, then there is an exact sequence 0 → Ru (G) → G → H → 0, where H 0 is a semi-abelian variety. Since nRu (G) is an isomorphism, we have G[n] ∼ = H[n] for all n; it follows that H is finite. Thus, G = Ru (G) + F for some finite group F , which embeds into some torus T . As above, it follows that F = 0, i.e., G is unipotent. If G 6= 0, then Ext1C (A, G) 6= 0 for any abelian variety A, a contradiction. If char(k) = p > 0, then there is an exact sequence 0 → H → G → U → 0, where 0 H is again a semi-abelian variety, H/H 0 is of multiplicative type, and U is unipotent. Thus, H[n] ∼ = G[n] for all n prime to p, and hence H is finite. It follows as above that H = 0, i.e., G is unipotent. If G 6= 0, then G contains a copy of αp , which embeds into some abelian variety; this yields a contradiction. Acknowledgements. I warmly thank Claire Amiot, Brian Conrad, Hélène Esnault, Stéphane Guillermou, Bruno Kahn, Giancarlo Lucchini Arteche, Gaël Rémond, JeanPierre Serre, and Catharina Stroppel for very helpful discussions or e-mail exchanges. Special thanks are due to an anonymous referee for a careful reading and valuable comments. References [BLR90] S. Bosch, W. Lütkebohmert, M. Raynaud, Néron models, Ergebnisse Math. Grenzg. (3) 21, Springer, 1990. [Br15a] M. Brion, On extensions of algebraic groups with finite quotient, Pacific J. Math. 279 (2015), 135–153. [Br15b] M. Brion, Some structure theorems for algebraic groups, arXiv:1509.03059. [Ch55] W.-L. Chow, Abelian varieties over function fields, Trans. Amer. Math. Soc. 78 (1955), 253–275. [Co06] B. Conrad, Chow’s K/k-image and K/k-trace, and the Lang-Néron theorem, Enseign. Math. (2) 52 (2006), no. 1-2, 37–108. [CGP15] B. Conrad, O. Gabber, G. Prasad, Pseudo-reductive groups. Second edition, New Math. Monogr. 26, Cambridge Univ. Press, Cambridge, 2015. [CP15] B. Conrad, G. Prasad, Classification of pseudo-reductive groups, Ann. of Math. Stud. 191, Princeton Univ. Press, 2015. [DG70] M. Demazure, P. Gabriel, Groupes algébriques, Masson, Paris, 1970. [FJ74] G. Frey, M. Jarden, Approximation theory and the rank of abelian varieties over large algebraic fields, Proc. London Math. Soc. (3) 28 (1974), 112–128. [Ga62] P. Gabriel, Des catégories abéliennes, Bull. Soc. Math. France 90 (1962), 323–448. 41 [GZ67] P. Gabriel, M. Zisman, Calculus of fractions and homotopy theory, Ergeb. Math. Grenzgeb. 35, Springer-Verlag, New York, 1967. [Ha01] D. Happel, A characterization of hereditary categories with tilting object, Invent. Math. 144 (2001), no. 2, 381–398. [Ho68] T. Honda, Isogeny classes of abelian varieties over finite fields, J. Math. Soc. Japan 20 (1968), 83–95. [Kr75] H. Kraft, Kommutative algebraische Gruppen und Ringe, Lecture Notes in Math. 455, Springer-Verlag, Berlin-New York, 1975. [LA15] G. Lucchini Arteche, Extensions of algebraic groups with finite quotient, preprint, arXiv:1503:06582. [MM74] B. Mazur, W. Messing, Universal extensions and one dimensional crystalline cohomology, Lecture Notes in Math. 370, Springer-Verlag, Berlin-New York, 1974. [MW93] D. Masser, G. Wüstholz: Isogeny estimates for abelian varieties, and finiteness theorems, Ann. Math. (2) 137 (1993), no. 3, 459–472. [Ma10] N. Mazzari, Cohomological dimension of Laumon 1-motives up to isogenies, J. Théor. Nombres Bordeaux 22 (2010), no. 3, 719–726. [Mi70] J. S. Milne, The homological dimension of commutative group schemes over a perfect field, J. Algebra 16 (1970), 436–441. [Mi86] J. S. Milne, Abelian varieties, in: Arithmetic geometry, 103–150, Springer-Verlag, New York, 1986. [Oo64] F. Oort, Yoneda extensions in abelian categories, Math. Annalen 153 (1964), no. 3, 227–235. [Oo66] F. Oort, Commutative group schemes, Lecture Notes in Math. 15, Springer-Verlag, Berlin-New York, 1966. [Or04] F. Orgogozo, Isomotifs de dimension inférieure ou égale à un, Manuscripta Math. 115 (2004), no. 3, 339–360. [Ra70] M. Raynaud, Faisceaux amples sur les schémas en groupes et les espaces homogènes, Lecture Notes in Math. 119, Springer-Verlag, Berlin-New York, 1970. [Ro56] M. Rosenlicht, Some basic theorems on algebraic groups, Amer. J. Math. 78 (1956), 401–443. [Ro58] M. Rosenlicht, Extensions of vector groups by abelian varieties, Amer. J. Math. 80 (1958), 685–714. [Ru70] P. Russell, Forms of the affine line and its additive group, Pacific J. Math. 32 (1970), 527–539. 42 [SGA3] M. Demazure, A. Grothendieck, Schémas en groupes I, II, III (SGA 3), Springer Lecture Notes in Math. 151, 152, 153 (1970); revised version edited by P. Gille and P. Polo, vols. I and III, Soc. Math. de France, Paris, 2011. [Sc72] C. Schoeller, Groupes affines, commutatifs, unipotents sur un corps non parfait, Bull. Soc. Math. France 100 (1972), 241–300. [Se59] J.-P. Serre, Groupes algébriques et corps de classes, Hermann, Paris, 1959. [Se60] J.-P. Serre, Groupes proalgébriques, Publ. Math. IHÉS 7 (1960). [SP16] The Stack Project Authors, Stacks Project, http://stacks.math.columbia.edu, 2016. [Tat66] J. Tate, Endomorphisms of abelian varieties over finite fields, Invent. Math. 2 (1966), 134–144. [Tak75] M. Takeuchi, On the structure of commutative affine group schemes over a nonperfect field, Manuscripta Math. 16 (1975), no. 2, 101–136. [To13] B. Totaro, Pseudo-abelian varieties, Ann. Sci. Éc. Norm. Sup. (4) 46 (2013), no. 5, 693–721. [Wa69] W. C. Waterhouse, Abelian varieties over finite fields, Ann. Sci. École Norm. Sup. (4) 2 (1969), 521–560. 43
4math.GR
arXiv:1703.02600v2 [math.GR] 14 Mar 2018 Hopf Galois structures on symmetric and alternating extensions Teresa Crespo, Anna Rio and Montserrat Vela March 15, 2018 Abstract By using our previous results on induced Hopf Galois structures and a recent result by Koch, Kohl, Truman and Underwood on normality, we determine which types of Hopf Galois structures occur on Galois extensions with Galois group isomorphic to alternating or symmetric groups. 2010 Mathematics Subject Classification: Primary: 12F10; Secondary: 13B05, 16T05. Key words: Hopf algebra, Hopf Galois theory, Galois correspondence. 1 Introduction A Hopf Galois structure on a finite extension of fields K/k is a pair (H, µ), where H is a finite cocommutative k-Hopf algebra and µ is a Hopf action of H on K, i.e a k-linear map µ : H → Endk (K) giving K a left H-module algebra structure and inducing a bijection K ⊗k H → Endk (K). Hopf Galois structures were introduced by Chase and Sweedler in [11]. In Hopf Galois theory one has the following Galois correspondence theorem. Theorem 1 ([11] Theorem 7.6). Let (H, µ) be a Hopf Galois structure on the field extension L/K. For a K-sub-Hopf algebra H′ of H we define ′ LH = {x ∈ L | µ(h)(x) = ε(h) · x for all h ∈ H′ }, ′ where ε is the counity of H. Then, LH is a subfield of L, containing K, and FH : {H′ ⊆ H sub-Hopf algebra} −→ {Fields E | K ⊆ E ⊆ L} H′ → ′ LH T. Crespo acknowledges support by grants MTM2015-66716-P (MINECO/FEDER, UE) and 2014SGR 206; A. Rio and M. Vela acknowledge support by grants MTM2015-66180R (MINECO/FEDER, UE) and 2014SGR 550. 1 is injective and inclusion reversing. For separable field extensions, Greither and Pareigis [12] give the following grouptheoretic equivalent condition to the existence of a Hopf Galois structure. e its Galois closure, Theorem 2. Let K/k be a separable field extension of degree n, K ′ e e G = Gal(K/k), G = Gal(K/K). Then there is a bijective correspondence between the set of Hopf Galois structures on K/k and the set of regular subgroups N of the symmetric group Sn normalized by λ(G), where λ : G → Sn is the morphism given by the action of G on the left cosets G/G′ . For a given Hopf Galois structure on K/k, we will refer to the isomorphism class of the corresponding group N as the type of the Hopf Galois structure. The Hopf algebra H corresponding to a regular subgroup N of Sn normalized by λ(G) is the Hopf G e e subalgebra K[N] of the group algebra K[N] fixed under the action of G, where G acts e by k-automorphisms and on N by conjugation through λ. It is known that the on K G e Hopf subalgebras of K[N] are in 1-to-1 correspondence with the subgroups of N stable under the action of G (see e.g. [8] Proposition 2.2). For N ′ a G-stable subgroup of N, ′ ′ we will denote by K N the subfield K H of K fixed by the Hopf subalgebra H′ of H corresponding to N ′ and refer to it as fixed by N ′ . Childs [6] gives an equivalent condition to the existence of a Hopf Galois structure introducing the holomorph of the regular subgroup N of Sn . We state the more precise formulation of this result due to Byott [1] (see also [7] Theorem 7.3). Theorem 3. Let G be a finite group, G′ ⊂ G a subgroup and λ : G → Sym(G/G′ ) the morphism given by the action of G on the left cosets G/G′ . Let N be a group of order [G : G′ ] with identity element eN . Then there is a bijection between N = {α : N ֒→ Sym(G/G′ ) such that α(N) is regular} and G = {β : G ֒→ Sym(N) such that β(G′) is the stabilizer of eN }. Under this bijection, if α ∈ N corresponds to β ∈ G, then α(N) is normalized by λ(G) if and only if β(G) is contained in the holomorph Hol(N) of N. 2 Main result We will apply Theorem 2.9 in [13] to discard some types of Hopf Galois structures on Galois extensions with given Galois group. The setting will be the following. Let G be a group of order n and G′ a subgroup of G of index d such that no nontrivial subgroup of G′ is normal in G. Let N be a group of order equal to n having a unique conjugation 2 class of subgroups of index d with length 1. With these hypothesis, if K/k is a Galois ′ ′ extension with Galois group G and F := K G , then F := K N , for N ′ the normal subgroup of N of index d. If we know that a separable extension of degree d having normal closure with Galois group G has no Hopf Galois structure of type N/N ′ , we may conclude that a Galois extension with Galois group G has no Hopf Galois structure of type N. We will use Theorem 3 in [10] to prove that a certain type of Hopf Galois structure does occur on a Galois extension with given Galois group. Let K/k be a ′ Galois extension with Galois group G = H ⋊ G′ and let F := K G . Then if F/k has a Hopf Galois structure of type N1 and K/F has a Hopf Galois structure of type N2 , the extension K/k has a Hopf Galois structure of type N1 × N2 . 2.1 Galois extensions with Galois group A4 or S4 Let us denote by D2n the dihedral group of order 2n and by Dicn the dicyclic group of order 4n, that is D2n = hr, s|r n = 1, s2 = 1, srs = r −1 i, Dicn = ha, x|a2n = 1, x2 = an , xax−1 = a−1 i. Let us assume that K/k is Galois with group G = A4 , the alternating group. We analize the five possible types of Hopf Galois structures: the alternating group A4 , the dicyclic group Dic3 = C3 ⋊ C4 , the cyclic group C12 = C3 × C4 , the dihedral group D12 = C3 ⋊ V4 and the direct product C3 × V4 . The classical Galois structure gives a Hopf Galois structure of type A4 . On the other hand, since A4 = V4 ⋊ C3 , a quartic extension having Galois closure A4 is Hopf Galois of type V4 , hence, by [10], theorem 3, we get induced Hopf Galois structures of type C3 × V4 . Finally, since Hol(Dic3 ) = Hol(D12 ) (see [14], Proposition 2.1) either both types of Hopf Galois structures arise or none of them does. We are left with cyclic and dicyclic types. In both cases, we consider N ′ the cyclic subgroup of order 3, the 3-Sylow subgroup, and we have N/N ′ ≃ C4 . Then, the corresponding fixed field F gives a quartic extension with Galois closure K. Since Hol(C4 ) has order 8, it can not contain G, and this extension F/k can not have Hopf Galois structures of type C4 . This proves that K/k has neither cyclic nor dicyclic (or dihedral) Hopf Galois structures. Now let us assume that K/k is Galois with group G = S4 , the symmetric group. There are 15 isomorphism classes of groups of order 24. Hence there are 15 possible types for Hopf Galois structures on K/k. For a group of order 24, the number n3 of 3-Sylow subgroups may be 1 or 4. If n3 = 1, the group is a semi-direct product C3 ⋊ S, where S is a group of order 8, i.e. S = C8 , C4 × C2 , E8 = C2 × C2 × C2 , the dihedral group D8 or the quaternion group Q8 . There are 12 groups of order 24 with n3 = 1. These are precisely C3 ⋊ C8 , C24 = C3 × C8 , S3 × C4 = C3 ⋊ (C2 × C4 ), Dic3 × C2 = 3 C3 ⋊(C2 ×C4 ), S3 ×V4 = C3 ⋊(C2 ×C2 ×C2 ), C3 ×(C2 ×C2 ×C2 ), D24 = C3 ⋊D8 , C3 ⋊ϕ D8 , where ϕ : D8 → Aut C3 has kernel C2 × C2 , C3 × D8 , Dic6 = C3 ⋊ Q8 , C3 × Q8 . We have n3 = 4 for S4 , SL(2, 3) and A4 × C2 . Let us consider an intermediate field F for the extension K/k such that [F : k] = 8. Then F/k has Galois closure K and by [11], F/k has only Hopf Galois structures of type E8 = C2 × C2 × C2 . By [13] theorem 2.9, K/k has no Galois structure of type N if N has a unique subgroup N ′ of order 3 (then normal and G-stable) such that N/N ′ is not isomorphic to E8 . This is the case for N = C3 ⋊ C8 , C24 , S3 × C4 , Dic3 × C2 , D24 , C3 ⋊ϕ D8 , C3 × D8 , Dic6 , C3 × Q8 . Let us consider now the subfield F of K fixed by a transposition of S4 . Since A4 is a normal complement of Gal(K/F ) in S4 , the extension F/k has a Hopf Galois structure of type A4 , hence by [10], theorem 3, K/k has an induced Hopf Galois extension of type A4 × C2 . Let us now take F to be the subfield of K fixed by a subgroup of S4 isomorphic to S3 . Then K/F is Galois with group S3 and has a Hopf Galois structure of type C6 (see [11]). Since F/k has a Hopf Galois structure of type C2 × C2 , we obtain, again by [10], theorem 3 and taking into account S4 = V4 ⋊ S3 , than K/k has induced Hopf Galois structures of types S3 × V4 and C6 × V4 . Finally, we check, using Magma, that Hol(SL(2, 3)) has no subgroup isomorphic to S4 , hence K/k has no Galois structure of type SL(2, 3). We have obtained the following result. Proposition 4. Let K/k be a Galois extension with Galois group A4 . Then, the only types of Hopf Galois structures on K/k are A4 and C3 ×V4 . The classical Galois structure realizes type A4 and a Hopf Galois structure of type C3 × V4 is induced by the classical Galois structure on K/F and the Hopf Galois structure of type V4 on F/k for F an intermediate field with [K : F ] = 3. Let K/k be a Galois extension with Galois group S4 . Then, the only types of Hopf Galois structures on K/k are S4 and the split ones A4 × C2 , S3 × V4 and C6 × V4 . The classical Galois structure realizes the first type and the remaining three are realized as induced structures. 2.2 Galois extensions with Galois group A5 or S5 Let us assume that K/k is Galois with Galois group G = A5 , the alternating group. There are 13 possible types of Hopf Galois structures. If we take N 6= A5 a group of order 60, then N has a unique 5−Sylow subgroup that we can take for N ′ . Since none ′ of the groups of order 12 has holomorph of order divisible by 60, we know that K N /k is not a Hopf Galois extension and therefore theorem 2.9 in [13] implies than N is not a Hopf Galois type for K/k. Let us assume that K/k is Galois with group G = S5 , the symmetric group. Now there are 47 possible types of Hopf Galois structures. 4 The classical Galois structure gives a Hopf Galois structure of type S5 . On the other hand, since S5 = A5 ⋊ C2 , again by [10], theorem 3, we get induced Hopf Galois structures of type A5 × C2 . (Recall that an extension F/k of degree 60 with Galois closure K/k has an almost classical Hopf Galois structure of type A5 , since A5 is a normal complement of Gal(K/F ) in Gal(K/k) ≃ S5 .) Checking on the remaining 45 types, we see that all but one, namely N = SL(2, 5), have a normal p−Sylow subgroup. For a given N in that set, we choose N ′ a normal p−Sylow subgroup. Therefore, N ′ is a normal G-stable subgroup of N. On the other ′ hand, the fixed field F = K N provides an extension F/k with Galois closure K/k ( K/F has order 8, 5 or 3 and S5 has no nontrivial normal subgroup of order dividing any of these numbers). In the proofs of Propositions 3.2 and 4.11 in [9] , mostly arguing on solvability of holomorphs of groups of order 15, 24 and 40, respectively, we proved that F/k is not Hopf Galois. In this way, theorem 2.9 in [13] rules out all these 44 Hopf Galois types. We perform a computation with Magma to check that the holomorph of SL(2, 5) does not contain S5 as a transitive subgroup and then we have the following result. Proposition 5. Let K/k be a Galois extension with Galois group A5 . Then, the only type of Hopf Galois structures on K/k is A5 . The classical Galois structure realizes this type. Let K/k be a Galois extension with Galois group S5 = A5 ⋊ C2 . Then, the only types of Hopf Galois structures on K/k are S5 and the split one A5 × C2 . The classical Galois structure realizes the first type and the second type is realized as the induced Hopf Galois structure by an almost classical Hopf Galois structure on K <τ > /k, where τ denotes a transposition in S5 . 2.3 Galois extensions with Galois group An or Sn , n ≥ 5 Let K/k be a Galois extension with Galois group G = Sn or An , n ≥ 5. Let us assume that K/k is Hopf Galois of cyclic type. If N is a cyclic group corresponding to this Hopf Galois structure, we can take for N ′ the unique subgroup of N of index n. Then ′ K N /k should be Hopf Galois (of cyclic type). But we know by [12] Corollary 4.8 that a separable extension of degree n ≥ 5 such that its normal closure has Galois group An or Sn is not Hopf Galois. We have then obtained the following result. Proposition 6. Let K/k a Galois extension with Galois group Sn or An , where n ≥ 5. Then K/k has no Hopf Galois structures of cyclic type. Let us note that the results for the alternating group in sections 2.2 and 2.3 are special cases of Byott’s main result in [2] where the author proves that a Galois extension K/k with Galois group a non-abelian simple group G has exactly two Hopf Galois structures the Galois one and the classical non-Galois one. The results for the 5 symmetric group complements those in [4], where the authors compute the number of Hopf Galois structures of types Sn and An × C2 on a Galois extension with Galois group Sn . Proposition 6 supports a query of Byott in [3] where he states that we do not have any examples where an extension with nonsolvable Galois group admits a Hopf Galois structure of solvable type. References [1] N.P. Byott, Uniqueness of Hopf Galois structure for separable field extensions. Comm. Algebra 24 (1996), 3217-3228. Corrigendum, ibid., 3705. [2] N.P. Byott, Hopf-Galois structures on field extensions with simple Galois groups. Bull. London Math. Soc. 36 (2004), 24-29. [3] N.P. Byott, Solubility criteria for Hopf-Galois structures. New York J. Math. 21 (2015), 883-903. [4] S. Carnahan, L. N. Childs, Counting Hopf Galois Structures on Non-Abelian Galois Field Extensions. J. Algebra 218 (1999), 81-92. [5] S.U. Chase, M. Sweedler, Hopf Algebras and Galois Theory. Lecture Notes in Mathematics, Vol. 97, Springer Verlag, 1969. [6] L. N. Childs, On the Hopf Galois theory for separable field extensions. Comm. Algebra 17 (1989), 809-825. [7] L. N. Childs, Taming wild extensions: Hopf algebras and local Galois module theory, AMS 2000. [8] T. Crespo, A. Rio, M. Vela, On the Galois correspondence theorem in separable Hopf Galois theory, Publ. Mat. 60 (2016), 221-234. [9] T. Crespo, A. Rio, M. Vela, The Hopf Galois property in subfield lattices, Comm. Algebra 44 (2016), 336-353; Corrigendum, ibid., 3191. [10] T. Crespo, A. Rio, M. Vela, Induced Hopf Galois structures, J. Algebra 457 (2016), 312-322. [11] T. Crespo, M. Salguero, An algorithm to determine Hopf Galois structures, arXiv: 1704.00232. [12] C. Greither, B. Pareigis, Hopf Galois theory for separable field extensions, J. Algebra 106 (1987), 239-258. 6 [13] A. Koch, T. Kohl, P.J. Truman, R. Underwood, Normality and short exact sequences of Hopf-Galois structures, arXiv: 1708.08402. [14] T. Kohl, Multiple Holomorphs of Dihedral and Quaternionic Groups, Communications in Algebra, 43 (2015), 4290-4304. 7
4math.GR
arXiv:1606.03077v1 [cs.DS] 9 Jun 2016 Efficient Robust Proper Learning of Log-concave Distributions Ilias Diakonikolas∗ University of Southern California [email protected] Daniel M. Kane† University of California, San Diego [email protected] Alistair Stewart‡ University of Southern California [email protected] January 9, 2018 Abstract We study the robust proper learning of univariate log-concave distributions (over continuous and discrete domains). Given a set of samples drawn from an unknown target distribution, we want to compute a log-concave hypothesis distribution that is as close as possible to the target, in total variation distance. In this work, we give the first computationally efficient algorithm for this learning problem. Our algorithm achieves the information-theoretically optimal sample size (up to a constant factor), runs in polynomial time, and is robust to model misspecification with nearly-optimal error guarantees. Specifically, we give an algorithm that, on input n = O(1/ǫ5/2 ) samples from an e 8/5 ), and outputs a log-concave hypothesis unknown distribution f , runs in time O(n h that (with high probability) satisfies dTV (h, f ) = O(OPT) + ǫ, where OPT is the minimum total variation distance between f and the class of log-concave distributions. Our approach to the robust proper learning problem is quite flexible and may be applicable to many other univariate distribution families. ∗ Part of this work was performed while the author was at the University of Edinburgh. Supported in part by EPSRC grant EP/L021749/1 and a Marie Curie Career Integration grant. † Supported in part by NSF Award CCF-1553288 (CAREER). Some of this work was performed while visiting the University of Edinburgh. ‡ Part of this work was performed while the author was at the University of Edinburgh. Supported by EPSRC grant EP/L021749/1. 1 1 Introduction 1.1 Background and Motivation Suppose that we are given a number of samples drawn from an unknown target distribution that belongs to (or is well-approximated by) a given family of distributions D. Our goal is to approximately estimate (learn) the target distribution in a precise way. Estimating a distribution from samples is a fundamental unsupervised learning problem that has been studied in statistics since the late nineteenth century [Pea95]. During the past couple of decades, there has been a large body of work in computer science on this topic with a focus on computational efficiency [KMR+ 94]. The performance of a distribution learning (density estimation) algorithm is typically evaluated by the following criteria: • Sample Complexity: For a given error tolerance, the algorithm should require a small number of samples, ideally matching the information-theoretic minimum. • Computational Complexity: The algorithm should run in time polynomial in the number of samples provided as input. • Robustness: The algorithm should provide error guarantees under model misspecification, i.e., even if the target distribution does not belong in the target family D. The goal here is to be competitive with the best approximation of the unknown distribution by any distribution in D. In non-proper learning, the goal of the learning algorithm is to output an approximation to the target distribution without any constraints on its representation. In proper learning, we require in addition that the hypothesis is a member of the family D. Note that these two notions of learning are essentially equivalent in terms of sample complexity (given any accurate hypothesis, we can do a brute-force search to find its closest distribution in D), but not necessarily equivalent in terms of computational complexity. In many learning situations it is desirable to compute a proper hypothesis, i.e., one that belongs to the underlying family D. A proper hypothesis is usually preferable due to its interpretability. In particular, a practitioner may not want to use a density estimate, unless it is proper. For example, one may want the estimate to have the properties of the underlying family, either because this reflects some physical understanding of the inference problem, or because one might only be using the density estimate as the first stage of a more involved procedure. The aforementioned discussion raises the following algorithmic question: Can one obtain a proper learning algorithm for a given distribution family D whose running time matches that of the best non-proper algorithm for D? Perhaps surprisingly, our understanding of this natural question remains quite poor. In particular, little is known about the complexity of proper learning in the unsupervised setting of learning probability distributions. In contrast, the computational complexity of proper learning has been extensively investigated in the supervised setting of PAC learning Boolean functions [KV94, Fel15], with several algorithmic and computational intractability results obtained in the past decades. 2 In this work, we study the problem of robust proper learning for the family of univariate log-concave distributions (over R or Z) (see Section 1.2 for a precise definition). Log-concave distributions constitute a broad non-parametric family that is very useful for modeling and inference [Wal09]. In the discrete setting, log-concave distributions encompass a range of fundamental types of discrete distributions, including binomial, negative binomial, geometric, hypergeometric, Poisson, Poisson Binomial, hyper-Poisson, Pólya-Eggenberger, and Skellam distributions (see Section 1 of [FBR11]). In the continuous setting, they include uniform, normal, exponential, logistic, extreme value, Laplace, Weibull, Gamma, Chi and Chi-Squared and Beta distributions (see [BB05]). Log-concave distributions have been studied in a wide range of different contexts including economics [An95], statistics and probability theory (see [SW14] for a recent survey), theoretical computer science [LV07], and algebra, combinatorics and geometry [Sta89]. 1.2 Our Results and Comparison to Prior Work The problem of density estimation for log-concave distributions is of central importance in the area of non-parametric shape constrained inference. As such, this problem has received significant attention in the statistics literature, see [CS10, DR09, DW16, CS13, KS14, BD14, HW16] and references therein, and, more recently, in theoretical computer science [CDSS13, CDSS14a, ADLS15, ADK15, CDGR16, DKS16]. In this section, we state our results and provide a brief comparison to the most relevant prior work. See Section 1.3 for a a more detailed summary of related work. We study univariate log-concave distributions over both continuous and discrete domains. Definition 1. A function f : R → R+ with respect to Lebesgue measure is log-concave if f = exp(φ) where φ : R → [−∞, ∞) is a concave function. A function f : Z → [0, 1] is log-concave if f 2 (x) ≥ f (x − 1) · f (x + 1) for all x ∈ Z and f has no internal zeroes. We will denote by LC(D) the family of log-concave densities over D. We use the following notion of agnostic learning under the total variation distance, denoted by dTV : Definition 2 (Agnostic Proper Learning). Let D be a family of probability density functions on domain D. A randomized algorithm AD is an agnostic distribution learning algorithm for D, if for any ǫ > 0, and any probability density function f : D → R+ , on input ǫ and sample access to f , with probability 9/10, algorithm AD outputs a hypothesis density h ∈ D such def that dTV (h, f ) ≤ O(OPT) + ǫ, where OPT = inf g∈D dTV (f, g). Given the above terminology, we can state our main algorithmic result: Theorem 3 (Main Result). There exists an algorithm that, given n = O(ǫ−5/2 ) samples e 8/5 ) and from an arbitrary density f : D → R+ , where D = R or D = Z, runs in time O(n outputs a hypothesis h ∈ LC(D) such that with probability at least 9/10 it holds dTV (h, f ) ≤ def O(OPT) + ǫ, where OPT = inf g∈LC(D) dTV (f, g). We note that the sample complexity of our algorithm is optimal (up to constant factors), as follows from previous work [DL01, CDSS13]. Our algorithm of Theorem 3 is the first polynomial time agnostic proper learning algorithm for the family of log-concave distributions. 3 In particular, previous polynomial time learning algorithms for log-concave distributions were either non-proper [CDSS13, CDSS14a, ADLS15] or non-agnostic [ADK15, CDGR16]. Specifically, the sequence of works [CDSS13, CDSS14a, ADLS15] give computationally efficient agnostic learning algorithms that are inherently non-proper. Two recent works [ADK15, CDGR16] give proper learning algorithms for discrete log-concave distributions that are provably non-agnostic. It should be noted that the sample complexity and running time of the non-robust proper algorithms in [ADK15, CDGR16] are significantly worse than ours. We elaborate on this point in the following subsection. 1.3 Related Work Distribution Learning. Distribution learning is a paradigmatic inference problem with an extensive literature in statistics (see, e.g., the books [BBBB72, DG85, Sil86, Sco92, DL01]). A number of works in the statistics community have proposed proper estimators (relying on a maximum likelihood approach) for various distribution families. Alas, typically, these estimators are either intractable or their computational complexity is not analyzed. A body of work in theoretical computer science has focused on distribution learning from a computational complexity perspective; see, e.g., [KMR+ 94, FM99, AK01, CGG02, VW02, FOS05, BS10, KMV10, DDS12a, DDS12b, DDO+ 13, CDSS13, CDSS14a, CDSS14b, ADLS15, DKS15b, DDKT15, DKS15a]. We note that, while the majority of the literature studies either non-proper learning or parameter estimation, proper learning algorithms have been obtained for a number of families, including mixtures of simple parametric models [FOS05, DK14, SOAJ14, LS15], and, Poisson binomial distributions [DKS15c]. Prior Work on Learning Log-concave Distributions. Density estimation of logconcave distributions has been extensively investigated in the statistics literature [DR09, GW09, Wal09, DW16, BJRP13, CS13, KS14, BD14] with a focus on analyzing the maximum likelihood estimator (MLE). For the continuous case, the sample complexity of the problem has been characterized [DL01], and it is known [KS14, HW16] that the MLE is sample efficient. It has been shown [DR11] that the MLE for continuous log-concave densities c an be formulated as a convex program, but no explicit upper bound on its running time is known. We remark here that the MLE is known to be non-agnostic with respect to the total variation distance, even for very simple settings (e.g., for Gaussian distributions). Recent work in theoretical computer science [CDSS13, CDSS14a, ADLS15] gives sampleoptimal, agnostic, and computationally efficient algorithms for learning log-concave distributions (both continuous and discrete). Alas, all of these algorithms are non-proper, i.e., they output a hypothesis that is not log-concave. For the case of discrete log-concave distributions supported on [n], two recent papers [ADK15, CDGR16] obtain proper algorithms that use poly(1/ǫ) samples and run in time poly(n/ǫ). Roughly speaking, [ADK15, CDGR16] proceed by formulating the proper learning problem as a convex program. Here we would like to emphasize three important differences between [ADK15, CDGR16] and the guarantees of Theorem 3. First, the algorithms of [ADK15, CDGR16] are inherently non-agnostic. Second, their sample complexity is sub-optimal, namely Ω(1/ǫ5 ), while our algorithm is sample-optimal. Third, the linear programming formulation that they employ has size (i.e., number of variables and constraints) Ω(n), i.e., its size depends on the support of 4 the underlying distribution. As a consequence, the runtime of this approach is prohibitively slow, for large n. In sharp contrast, our algorithm’s running time is independent of the support size, and scales sub-quadratically with the number of samples. 1.4 Overview of our Techniques In this section, we provide a high-level overview of our techniques. Our approach to the proper learning problem is as follows: Starting with an accurate non-proper hypothesis, we fit a log-concave density to this hypothesis. This fitting problem can be formulated as a (non-convex) discrete optimization problem that we can solve efficiently by a combination of structural approximation results and dynamic programming. Specifically, we are able to phrase this optimization problem as a shortest path computation in an appropriately defined edge-weighted directed acyclic graph. In more detail, our agnostic proper learning algorithm works in two steps: First, we compute an accurate non-proper hypothesis, g, by applying any efficient non-proper agnostic learning algorithm as a black-box (e.g., [CDSS14a, ADLS15]). In particular, we will use the non-proper learning algorithm of [ADLS15] that outputs a piecewise linear hypothesis distribution g. To establish the sample-optimality of the [ADLS15] algorithm, one requires the following structural result that we establish (Theorem 12): Any log-concave distribution (continuous or discrete) can be ǫ-approximated, in total variation distance, by a piecewise linear distribution with O(ǫ−1/2 ) interval pieces. Since Ω(ǫ−1/2 ) interval pieces are required for such an approximation, our bound on the number of intervals is tight. It should be noted that a quantitatively similar structural result was shown in [CDSS14a] for continuous log-concave distributions, with a bound on the number of pieces that is sub-optimal up to logarithmic factors. For the discrete case, no such structural result was previously known. Since g is not guaranteed to be log-concave, our main algorithmic step efficiently postprocesses g to compute a log-concave distribution that is (essentially) as close to g as possible, in total variation distance. To achieve this, we prove a new structural result (Lemma 7) showing that the closest log-concave distribution can be well-approximated by a log-concave piecewise exponential distribution whose pieces are determined only by the mean and standard deviation of g. Furthermore, we show (Proposition 9) we can assume that the values of this approximation at the breakpoints can be appropriately discretized. These structural results are crucial for our algorithmic step outlined below. From this point on, our algorithm proceeds via dynamic programming. Roughly speaking, we record the best possible error in approximating g by a function of the aforementioned form on the interval (−∞, x] for various values of x and for given values of h(x), h′ (x). Since knowing h(x) and h′ (x) is all that we need in order to ensure that the rest of the function is log-concave, this is sufficient for our purposes. It turns out that this dynamic program can be expressed as a shortest path computation in a graph that we construct. The time needed to compute the edge weights of this graph depends on the description of the non-proper hypothesis g. In our case, g is a piecewise linear distribution and all these computations are manageable. 5 1.5 Organization In Section 2 we record the basic probabilistic ingredients we will require. In Section 3 we prove our main result. Finally, we conclude with a few open problems in Section 4. 2 Preliminaries def def For n ∈ Z+ , we denote [n] = {1, . . . , n}. For u ∈ R, we will denote exp(u) = eu . Let R f : R → R be a Lebesgue measurable function. We will use f (A) to denote x∈A f (x)dx. A Lebesgue measurable Rfunction f : R → R is a probability density function (pdf) if f (x) ≥ 0 for all x ∈ R and R f (x)dx = 1. We say that f : R → R is a pseudo-distribution if f (x) ≥ 0 for all x ∈ R. A (pmf) if if P function f : Z → R is a probability mass functionP f (x) ≥ 0 for all x ∈ Z and x∈Z f (x) = 1. We will similarly use f (A) to denote x∈A f (x). We say that f : Z → R is a pseudo-distribution if f (x) ≥ 0 for all x ∈ Z. For uniformity of the exposition, we will typically use D to denote the domain of our functions, where D is R for the continuous case and Z for the discrete case. We will use the term density to refer to either a pdf or pmf. R I The L1 -distance between f, g : D → R over I ⊆ D, denoted kf −gk , is |f (x)−g(x)|dx 1 I P for D = R and x∈I |f (x) − g(x)| for D = Z; when I = D we suppress the superscript I. def The total variation distance between densities f, g : D → R+ is defined as dTV (f, g) = (1/2) · kf − gk1 . Our algorithmic and structural results make essential use of continuous piecewise exponential functions, that we now define: Definition 4. Let I = [α, β] ⊆ D, where α, β ∈ D. A function g : I → R+ is continuous k-piecewise exponential if there exist α ≡ x1 < x2 < . . . < xk < xk+1 ≡ β, xi ∈ D, such that def def for all i ∈ [k] and x ∈ Ii = [xi , xi+1 ] we have that g(x) = gi (x), where gi (x) = exp(ci x + di ), ci , di ∈ R. Note that the above definition implies that gi (xi+1 ) = gi+1 (xi+1 ), for all i ∈ [k]. We will also require a number of useful properties of log-concave densities, summarized in the following lemma: Lemma 5. Let f : D → R+ be a log-concave density with mean µ and standard deviation σ. Then: (i) If D = R or D = Z and σ is at least a sufficiently large constant, 1/(8σ) ≤ def Mf = maxx∈D f (x) ≤ 1/σ, and (ii) f (x) ≤ exp (1 − |x − µ|Mf /e) Mf for all x ∈ D. For the case of continuous log-concave densities, (i) appears as Lemma 5.5 in [LV07], and the discrete case follows similarly. To show (ii) we note that, since f is unimodal, f (µ+e/Mf ) and f (µ − e/Mf ) are each at most Mf /e. The claim then follows from log-concavity. Lemma 6. Let f : D → R+ be a log-concave density with mean µ and standard deviation σ. Assume that either D = R or that σ is sufficiently large. Let g : D → R+ be a density with dTV (f, g) ≤ 1/10. Given an explicit description of g, we can efficiently compute values µ̃ and σ̃ so that |µ − µ̃| ≤ 2σ and 3σ/10 ≤ σ̃ ≤ 6σ. The proof of the above lemma uses the log-concavity of f and is deferred to Appendix A.1. 6 3 Proof of Theorem 3: Our Algorithm and its Analysis 3.1 Approximating Log-concave Densities by Piecewise Exponentials Our algorithmic approach relies on approximating log-concave densities by continuous piecewise exponential functions. Our first structural lemma states that we can approximate a log-concave density by a continuous piecewise exponential pseudo-distribution with an appropriately small set of interval pieces. Lemma 7. Let f : D → R+ be a log-concave density with mean µ, standard deviation σ at least a sufficiently large constant, and ǫ > 0. Let I = [α, β] ⊆ D be such that α < µ < β and |α − µ|, |β − µ| = Θ(log(1/ǫ)σ), with the implied constant sufficiently large. Let k be an integer so that either k = Θ(log(1/ǫ)/ǫ), or k = β −α = O(log(1/ǫ)/ǫ) and D = Z. Consider the set of equally spaced endpoints α ≡ x1 < x2 < . . . < xk < xk+1 ≡ β. There exist indices 1 ≤ l < r ≤ k + 1 and a log-concave continuous piecewise exponential pseudo-distribution g : I → R+ with kf − gk1 ≤ O(ǫ) such that the following are satisfied: def (i) g(x) = 0, for all x 6∈ J = [xl , xr ]. (ii) For all l ≤ i ≤ r it holds g(xi ) = f (xi ). (iii) For l ≤ i < r, g is exponential on [xi , xi+1 ]. Proof. If D = Z and σ is less than a sufficiently small constant, then Lemma 5 implies that all but an ǫ-fraction of the mass of f is supported on an interval of length O(log(1/ǫ)). If we let I be this interval and take k = |I|, we can ensure that g = f on I and our result follows trivially. Henceforth, we will assume that either D = R or that σ is sufficiently large. The following tail bound is a consequence of Lemma 5 and is proved in Appendix A.2: Claim 8. Let f : D → R+ be a log-concave density with mean µ and standard deviation σ. (−∞,α) Let α ≤ µ − Ω(σ(1 + log(1/ǫ))) and β ≥ µ + Ω(σ(1 + log(1/ǫ)))). Then, kf k1 ≤ ǫ and (β,∞) kf k1 ≤ ǫ. By Claim 8, it suffices to exhibit the existence of the function g : I → R+ and show that kf − gkI1 ≤ O(ǫ). We note that if D = Z and k = β − α, then we may take g = f on I, and this follows immediately. Hence, it suffices to assume that k > C(log(1/ǫ)/ǫ), for some appropriately large constant C > 0. Next, we determine appropriate values of l and r. In particular, we let l be the minimum value of i so that f (xi ) > 0, and let r be the maximum. We note that the probability measure of supp(f ) \ J is at most O(|β − α|/k) = O(ǫσ). Since Mf = O(1/σ), by Lemma 5(i), we have that f (I \ J) = O(ǫ). Therefore, it suffices to show that kf − gkJ1 = O(ǫ). We take k = Ω(log(1/ǫ)/ǫ). Since the endpoints x1 , . . . , xk+1 are equally spaced, it follows that L = |xi+1 − xi | = O(ǫσ). For l ≤ i < r, for x ∈ [xi , xi+1 ] we let g(x) be given by the unique exponential function that interpolates f (xi ) and f (xi+1 ). We note that this g clearly satisfies properties (i), (ii), and (iii). It remains to show that kf − gkJ1 = O(ǫ). 7 I Let Ij = [xj , xj+1] be an interval containing a mode of f . We claim that kf −gk1j = O(ǫ). This is deduced from the fact that maxx g(x) ≤ maxx f (x) ≤ 1/σ, where the first inequality is by the definition of g and the second follows by Lemma 5 (i). This in turn implies that the probability mass of both f (Ij ) and g(Ij ) is at most L · (1/σ) = O(ǫ). We now bound from abovePthe contribution to the error coming from the intervals j−1 Ii I1 , . . . , Ij−1 , i.e., the quantity i=1 kf − gk1 . Since all Ii ’s have length L, and f, g are monotone non-decreasing agreeing on the endpoints, we have that the aforementioned error term is at most L· j−1 X (f (xi+1 ) − f (xi )) = O(ǫσ) · Mf ≤ O(ǫσ) · (1/σ) = O(ǫ) . i=1 A symmetric argument shows the error coming from the intervals Ij+1 , . . . , Ik is also O(ǫ). An application of the triangle inequality completes the proof. The following proposition establishes the fact that the log-concave piecewise exponential approximation can be assumed to be appropriately discretized: Proposition 9. Let f : D → R+ be a log-concave density with mean µ, standard deviation σ at least a sufficiently large constant, and ǫ > 0. Let σ̃ = Θ(σ). Let I = [α, β] ⊆ D containing µ be such that |α −µ|, |β −µ| = Θ(log(1/ǫ)σ̃), where the implied constant is sufficiently large. Consider a set of equally spaced endpoints α ≡ x1 < x2 < . . . < xk < xk+1 ≡ β, xi ∈ D, where either k = Θ(log(1/ǫ)/ǫ), or D = Z and k = β−α= O(log(1/ǫ)/ǫ). There exist indices 1 ≤ l < r ≤ k + 1 and a log-concave continuous piecewise exponential pseudo-distribution h : I → R+ with kf − hk1 ≤ O(ǫ) such that the following are satisfied: def (i) h(x) > 0 if and only if x ∈ J = [xl , xr ]. (ii) For each endpoint xi , i ∈ [l, r], we have that (a) log(h(xi )σ̃) is an integer multiple of ǫ/k, and (b) −O(log(1/ǫ)) ≤ log(h(xi )σ̃) ≤ O(1). (iii) For any i ∈ [l, r − 1] we have | log (h(xi )σ̃) − log (h(xi+1 )σ̃) | is of the form b · ǫ · 2c /k, for integers |b| ≤ (1/ǫ) log(1/ǫ) and 0 ≤ c ≤ O(log(1/ǫ)). Proof. Let g : I → R+ be the pseudo-distribution given by the Lemma 7. We will construct our function h : I → R+ such that kh − gk1 = O(ǫ). For notational convenience, for the rest def def of this proof we will denote ai = log (h(xi )σ̃) and a′i = log (g(xi )σ̃) for i ∈ [k + 1]. We define the function h to be supported on the interval J = [xl , xr ] specified as follows: The point xl is the leftmost endpoint such that g(xl ) ≥ ǫ2 /σ̃ or equivalently a′l ≥ −2 log(1/ǫ). Similarly, the point xr is the rightmost endpoint such that g(xr ) ≥ ǫ2 /σ̃ or equivalently a′r ≥ −2 log(1/ǫ). We start by showing that the probability mass of g outside the interval J is O(ǫ). This is because g(x) ≤ ǫ2 /σ̃ off of J, and so has total mass at most ǫ2 /σ̃(β − α) = O(ǫ). To complete the proof, we need to appropriately define h so that it satisfies conditions (ii) and (iii) of the proposition statement, and in addition that kh − gkJ1 ≤ O(ǫ). We note that −O(log(1/ǫ)) ≤ a′i ≤ O(1) for all i ∈ [l, r]. Indeed, since a′l , a′r ≥ −2 log(1/ǫ) and g is log-concave, we have that a′i ≥ − log(1/ǫ) for all i ∈ [l, r]. Also, since a′i = 8 log (g(xi )σ̃) = log (f (xi )σ̃), we obtain a′i ≤ log(Mf σ̃) ≤ log 6 ≤ 1.8. We will construct h so that |a′i − ai | = O(ǫ) for all l ≤ i ≤ r. We claim that this is sufficient since it would imply that log(g(x)/h(x)) = O(ǫ)R for all x ∈ J. This in turn implies that h(x) = g(x) + O(ǫg(x)), and thus that kh − gkJ1 = J O(ǫg(x))dx = O(ǫ). We are now ready to define ai , i ∈ [l, r]. Let j be such that xj is a mode of g. Let di def be obtained by rounding d′i = a′i − a′i−1 as follows: Let ci be the least non-negative integer such that |d′i | ≤ 2ci log(1/ǫ)/k. Then, we define di to be d′i rounded to the nearest integer multiple of 2ci ǫ/k (rounding P towards 0 in the case of ties). Let Paj be the nearest multiple of (ǫ/k) to a′j . Let ai = aj + ik=j+1 dk for j > i, and ai = aj − jk=i+1 dk for i < j. We define h to be the continuous piecewise exponential function with h(xi ) = exp(ai )/σ̃, i ∈ [l, r], that is exponential on each of the intervals [xi , xi + 1], for i ∈ [l, r − 1]. By construction, for all i ∈ [l, r], ai is an integer multiple of ǫ/k and |ai − ai+1 | is of the form b · ǫ · 2c /k for integers 0 ≤ b ≤ (1/ǫ) log(1/ǫ), and 0 ≤ c ≤ O(log 1/ǫ). Since g is log-concave, we have a′i − a′i−1 ≥ a′i+1 − a′i . Note that the rounding of the di ’s is given by a monotone function and thus we also have ai − ai−1 ≥ ai+1 − aP i . Hence, h is also log-concave. ′ Since of the ci ’s yields i 2ci log(1/ǫ)/k P |acii| ≤ log(1/ǫ), i ∈ [l,′ r], the definition P = O(log(1/ǫ)) ci or i 2 = O(k). Since |di − di | ≤ 2 ǫ/k, we have that |ai − a′i | ≤ (ǫ/k) + i 2ci ǫ/k ≤ O(ǫ). This completes the proof. 3.2 Main Algorithm Theorem 10. Let g : D → R+ be a density and let OPT = inf f ∈LC(D) dTV (g, f ). There exists an algorithm that, given g and ǫ > 0, outputs an explicit log-concave density h such that dTV (g, h) = O(OPT + ǫ). The algorithm has running time O((t + 1)polylog(1/ǫ)/ǫ4 ), where t is the average across the intervals of an upper bound on the time needed to approximate [x ,x ] kg − hk1 i i+1 to within O(ǫ2 / log(1/ǫ)). Proof. Let f be a log-concave density such that dTV (g, f ) = OPT. First, we compute the median µ̃ and interquartile range σ̃. If OPT ≤ 1/10, Lemma 6 applies to these, and otherwise Theorem 10 is trivial. Using these approximations, we construct an interval I ⊆ D containing at least C log(1/ǫ) standard deviations about the mean of f , and of total length O(log(1/ǫ)σ), where C is a sufficiently large constant. If D = Z and 1/ǫ = O(σ), we let k be the length of I, otherwise, we let k = Θ(log(1/ǫ)/ǫ) and ensure that the length of I divided by k is in D. We will attempt to find a log-concave pseudo-distribution h satisfying the properties of Proposition 9 so that dTV (h, g) is (approximately) minimized. Note that the proposition implies there exists a log-concave pseudo-distribution h with dTV (f, h) = O(ǫ), and thus dTV (g, h) = O(OPT + ǫ). Given any such h with dTV (h, g) = O(OPT + ǫ), re-normalizing gives an explicit log-concave density h′ with dTV (h′ , g) = O(OPT + ǫ). We find the best such h via dynamic programming. In particular, if x1 , . . . , xk+1 are the interval endpoints, then h is determined by the quantities ai = log(h(xi )σ̃), which are either −m · ǫ/k, where m ∈ Z+ |m| ≤ O((1/ǫ) log(1/ǫ)k), or −∞. The condition that h is log-concave is equivalent to the sequence ai being concave. Let S be the set of possible ai ’s, i.e., the multiples of ǫ/k in the range [− log(1/ǫ), O(1)]∪ {−∞}. Let T be the set of possible ai+1 − ai ’s, i.e., numbers of the form b · ǫ · 2c /k, for 9 integers |b| ≤ (1/ǫ) log(1/ǫ) and 0 ≤ c ≤ O(log(1/ǫ)). Let H be the set of h which satisfy the properties of Proposition 9 except the bound on kh − f k1 . We use dynamic programming to determine for each i ∈ [k], a ∈ S, d ∈ T the concave sequence a1 , . . . , ai so that ai = a, [x ,x ] ai − ai−1 = d and kh − gk1 1 i is as small as possible, where h(x) is the density obtained by interpolating the ai ’s by a piecewise exponential function. We write ei (ai , ai+1 ) for the error in the i-th interval [xi , xi+1 ]. When ai and ai+1 are  both def [xi ,xi+1 ] xi+1 −xi x−xi finite, we take ei (ai , ai+1 ) = kg − hi k1 , where hi (x) = exp xi+1 −xi ai + xi+1 −xi ai+1 /σ. P def [x ,x ] [x ,x ] We define ei (a, −∞) = ei (−∞, a) = kgk1 i i+1 . Thus, we have kg, hk1 1 i ≤ ki=1 ei (ai , ai+1 ). When D = R, this an equality. However, when D =PZ, we double count the error in the [x ,x ] endpoints in the interior of the support, and so have ki=1 ei (ai , ai+1 ) ≤ 2kg − hk1 1 i . The algorithm computes ẽi (ai−1 , ai ) with |ẽi (ai−1 , ai ) − ei (ai−1 , ai )| ≤ ǫ/k for all ai−1 , ai ∈ S with ai − ai−1 ∈ T . Algorithm Compute h Input: an oracle for computing ẽi (a, a′ ) P Output: a sequence a1 , . . . , an that minimizes ki=1 ei+1 (ai , ai+1 ) 1. Let G be the directed graph with vertices of the form: (a) (0, −∞, −),(k + 1, ∞, +) (b) (i, a, d) for i ∈ [k], a ∈ S\{−∞}, d ∈ T ∪ {∞} (c) (i, −∞, s) for i ∈ [k], s ∈ {±} and weighted edges of the form (a) (i, −∞, −) to (i + 1, a, ∞) of weight ẽi (−∞, a) (b) (i, a, d) to (i + 1, a + d, d) of weight ẽi (a, a + d) (c) (i, a, d) to (i, a, d′ ) with d′ the predecessor of d in T ∪ {∞} or weight 0. (d) (i, a, d) to (i + 1, −∞, +) of weight ei (a, −∞) (e) (i, −∞, s) to (i + 1, −∞, s) of weight ei (−∞, −∞) 2. Using the fact that G is a DAG compute the path P from (0, −∞, −) to (k + 1, −∞, +) of smallest weight. 3. For each i ∈ [k], let ai be the value such that P passes through a vertex of the form (i, ai , d∗ ). 10 Algorithm Full-Algorithm Input: A concise description of a distribution g such that dTV (f, g) ≤ OPT for some log-concave distribution f and ǫ > 0. Output: A log-concave continuous piecewise exponential h with dTV (g, h) ≤ O(OPT+ ǫ) 1. Compute the median µ̃ and interquartile range σ̃ of g(x) 2. If D = Z and σ̃ = O(1/ǫ), 3. let α = µ̃ − Θ(log(1/ǫ)/ǫ) and β = µ̃ + Θ(log(1/ǫ)/ǫ) be integers, k = β − α and L = 1, 4. else let L = Θ(ǫσ̃) with L ∈ Z or R in the discrete and continuous cases respectively, k = Θ(log(1/ǫ)/ǫ) be an even integer, α = µ̃ − (k/2) and β = µ̃ − (k/2). 5. Let xi = α + (i + 1)L for 1 ≤ i ≤ k + 1. 6. Let S be the set of the multiples of ǫ/k in the range [− ln(1/ǫ), O(1)] ∪ {−∞}. Let T be the set of numbers of the form b· ǫ· 2c /k, for integers |b| ≤ (1/ǫ) ln(1/ǫ) and 0 ≤ c ≤ O(log(1/ǫ)). 7. Sort T into ascending order. 8. Let a1 , . . . , ak+1 be the output of algorithm Compute h. 9. Return the continuous piecewise exponential h(x) that has h(xi ) = exp(ai )/σ̃ for all 1 ≤ i ≤ k + 1 and has endpoints xl , xl+1 , . . . , xr , where l and r and the least and greatest i such that ai is finite. ′ ′ Now we show correctness. For Pkevery h′ ∈′ H, with log probabilities at the endpoints ai , there is a path of weight wh′ := i=1 ẽi (ai , ai+1 ) which satisfies kg − h′ kI1 − ǫ ≤ wh′ ≤ 2kg − h′ kI1 + ǫ . Thus, the output h(x) has kg − hkI1 ≤ 2ǫ + 2 minh′ ∈H kg − h′ kI1 . By Proposition 9, there is an h∗ ∈ H with kf − h∗ kI1 ≤ O(ǫ), where dTV (f, g) = OPT. Thus, kg − h∗ kI1 ≤ OPT + O(ǫ). Therefore, we have that kg − hkI1 ≤ 2kg − h∗ kI1 + 2ǫ ≤ 2OPT + O(ǫ) . Since the mass of f outside of I is O(ǫ), we have that the mass of g outside of I is at most OPT + O(ǫ). Thus, dTV (g, h) ≤ OPT + O(ǫ) + kg − hkI1 = O(OPT + ǫ), as required. Finally we analyze the time complexity. The graph G has k|S||T | + 2 vertices. Each vertex has at most one in-edge of each type. Thus, we can find the shortest path in time O(k|S||T |) plus the time it takes to compute every ẽi (a, a + d). There are O(k|S||T |) such computations and they take average time at most t. Thus, the time complexity is O(k|S||T |(t + 1)) = O(log(1/ǫ)/ǫ · log(1/ǫ)2 /ǫ2 · log(1/ǫ)2 /ǫ · (t + 1)) = O((t + 1) log5 (1/ǫ)/ǫ4 ). 11 3.3 Putting Everything Together We are now ready to combine the various pieces that yield our main result. Our starting point is the following non-proper learning algorithm: Theorem 11 ([ADLS15]). There is an agnostic learning algorithm for t-piecewise linear distributions with sample complexity O(t/ǫ2 ) and running time O((t/ǫ2 ) log(1/ǫ)). Moreover, the algorithm outputs an O(t)-piecewise linear hypothesis distribution. To establish that our overall learning algorithm will have the optimal sample complexity of O(ǫ−5/2 ), we make use of the following approximation theorem: Theorem 12. For any log-concave density f on either R or Z, and ǫ > 0, there exists a piecewise linear distribution g with O(ǫ−1/2 ) interval pieces so that dTV (f, g) ≤ ǫ. The proof of Theorem 12 is deferred to Appendix A.3. We now have all the ingredients to prove our main result. Proof of Theorem 3. Let f ′ be a log-concave density with dTV (f, f ′ ) = OPT. By Theorem 12, there is a piecewise linear density g ′ with O(ǫ−1/2 ) pieces that has dTV (f ′ , g ′) ≤ OPT + ǫ. By Theorem 11, there is an algorithm with sample complexity O(1/ǫ5/2 ) and running time O((1/ǫ5/2 ) log(1/ǫ)) that computes a piecewise linear density g ′ with O(ǫ−1/2 ) pieces such that dTV (f ′ , g ′) ≤ O(OPT + ǫ). We apply the algorithm of Theorem 10 to this g ′, which produces a piecewise exponential approximation h(x) that satisfies dTV (g ′, h) ≤ O(OPT+ǫ), and therefore dTV (h, f ) ≤ O(OPT + ǫ). It remains to prove that the time complexity is Õ(n8/5 ) = Õ(1/ǫ4 ). To obtain this, we must show that t = polylog(1/ǫ) in the statement of Theorem 10. When D = Z and the length of each interval is 1, we have t = O(1). Otherwise, we divide into k = Θ((1/ǫ) log(1/ǫ)) pieces. Since k ≥ O(ǫ−1/2 ), the average number of endpoints of g ′ (x) in a piece of h(x) is smaller than 1. Thus, to get the amortized time complexity to be polylog(1/ǫ), it suffices to show this bound for an exponential and linear function on a single interval. The following claim is proved in Appendix A.4: Claim 13. Let g(x) = ax + b and h(x) = c exp(dx). Let I = [x′ , x′ + L] be an interval with g(x) ≥ 0 and 0 ≤ h(x) ≤ O(ǫ/L) for all x ∈ I. There is an algorithm which approximates kg − hkI1 to within an additive O(ǫ2 / log(1/ǫ)) in time polylog(1/ǫ). This completes the proof of Theorem 3. 4 Discussion and Future Directions In this paper, we gave the first agnostic learning algorithm for log-concave distributions that runs in polynomial time. Our algorithm is sample-optimal and runs in time that is subquadratic in the size of its input sample. The obvious open problem is to obtain an agnostic proper learning algorithm that runs in near-linear time. More broadly, an interesting and 12 challenging question is to generalize our techniques to the problem of learning log-concave distributions in higher dimensions. We believe that our algorithmic approach should naturally extend to other structured distribution families, e.g., to monotone hazard rate (MHR) distributions, but we have not pursued this direction. Finally, as we point out in the following paragraph, our dynamic programming approach can be extended to properly learning mixtures of log-concave densities, alas with running time exponential in the number k of components, i.e., (1/ǫ)O(k) . Indeed, the non-proper learning algorithm from [ADLS15] also applies to mixtures, so it suffices to efficiently compute a nearly optimal approximation of a given distribution by a mixture of k log-concave distributions. It is easy to see that we can assume each of the mixing weights is Ω(ǫ). For our approach to work, we will need to approximate the mean and standard deviation of each distribution in the mixture. This can be done if we have O(1) samples from each component, which can be accomplished by taking O(1) samples from our original distribution and noting that with probability Ω(ǫ)O(1) it has chosen only samples from the desired component. After doing this, we will need to build a larger dynamic program. Our new dynamic program will attempt to approximate f as a mixture of functions h of the form given in Proposition 9. Specifically, it will need to have steps corresponding to each of the xi ’s for each of the functions h, and will need to keep track of both the current value of each h and its current logarithmic derivative. The aforementioned discussion naturally leads to our final open problem: Is there a proper learning algorithm for mixtures of k log-concave distributions with running time poly(k/ǫ)? References [ADK15] J. Acharya, C. Daskalakis, and G. Kamath. Optimal testing for properties of distributions. In NIPS, 2015. [ADLS15] J. Acharya, I. Diakonikolas, J. Li, and L. Schmidt. Sample-optimal density estimation in nearly-linear time. CoRR, abs/1506.00671, 2015. [AK01] S. Arora and R. Kannan. Learning mixtures of arbitrary Gaussians. In Proceedings of the 33rd Symposium on Theory of Computing, pages 247–257, 2001. [An95] M. Y. An. Log-concave probability distributions: Theory and statistical testing. Technical Report Economics Working Paper Archive at WUSTL, Washington University at St. Louis, 1995. [BB05] M. Bagnoli and T. Bergstrom. Log-concave probability and its applications. Economic Theory, 26(2):pp. 445–469, 2005. [BBBB72] R.E. Barlow, D.J. Bartholomew, J.M. Bremner, and H.D. Brunk. Statistical Inference under Order Restrictions. Wiley, New York, 1972. [BD14] F. Balabdaoui and C. R. Doss. Inference for a Mixture of Symmetric Distributions under Log-Concavity. Available at http://arxiv.org/abs/1411.4708, 2014. 13 [BJRP13] F. Balabdaoui, H. Jankowski, K. Rufibach, and M. Pavlides. Asymptotics of the discrete log-concave maximum likelihood estimator and related applications. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 75(4):769–790, 2013. [BS10] M. Belkin and K. Sinha. Polynomial learning of distribution families. In FOCS, pages 103–112, 2010. [CDGR16] C. L. Canonne, I. Diakonikolas, T. Gouleakis, and R. Rubinfeld. Testing shape restrictions of discrete distributions. In STACS, pages 25:1–25:14, 2016. [CDSS13] S. Chan, I. Diakonikolas, R. Servedio, and X. Sun. Learning mixtures of structured distributions over discrete domains. In SODA, pages 1380–1394, 2013. [CDSS14a] S. Chan, I. Diakonikolas, R. Servedio, and X. Sun. Efficient density estimation via piecewise polynomial approximation. In STOC, pages 604–613, 2014. [CDSS14b] S. Chan, I. Diakonikolas, R. Servedio, and X. Sun. Near-optimal density estimation in near-linear time using variable-width histograms. In NIPS, pages 1844–1852, 2014. [CGG02] M. Cryan, L. Goldberg, and P. Goldberg. Evolutionary trees can be learned in polynomial time in the two state general Markov model. SIAM Journal on Computing, 31(2):375–397, 2002. [CS10] M. Cule and R. Samworth. Maximum likelihood estimation of a multidimensional log-concave density. Journal of the Royal Statistical Society: Series B, 72:545–607, 2010. [CS13] Y. Chen and R. J. Samworth. Smoothed log-concave maximum likelihood estimation with applications. Statist. Sinica, 23:1373–1398, 2013. [DDKT15] C. Daskalakis, A. De, G. Kamath, and C. Tzamos. A size-free CLT for poisson multinomials and its applications. CoRR, abs/1511.03641, 2015. To appear in STOC 2016. [DDO+ 13] C. Daskalakis, I. Diakonikolas, R. O’Donnell, R.A. Servedio, and L. Tan. Learning Sums of Independent Integer Random Variables. In FOCS, pages 217–226, 2013. [DDS12a] C. Daskalakis, I. Diakonikolas, and R.A. Servedio. Learning k-modal distributions via testing. In SODA, pages 1371–1385, 2012. [DDS12b] C. Daskalakis, I. Diakonikolas, and R.A. Servedio. Learning Poisson Binomial Distributions. In STOC, pages 709–728, 2012. [DG85] L. Devroye and L. Györfi. Nonparametric Density Estimation: The L1 View. John Wiley & Sons, 1985. 14 [DK14] C. Daskalakis and G. Kamath. Faster and sample near-optimal algorithms for proper learning mixtures of Gaussians. In Proceedings of the 27th Annual Conference on Learning Theory, COLT ’14, pages 1183–1213, 2014. [DKS15a] I. Diakonikolas, D. M. Kane, and A. Stewart. The fourier transform of poisson multinomial distributions and its algorithmic applications. CoRR, abs/1511.03592, 2015. To appear in STOC 2016. [DKS15b] I. Diakonikolas, D. M. Kane, and A. Stewart. Optimal learning via the fourier transform for sums of independent integer random variables. CoRR, abs/1505.00662, 2015. To appear in COLT 2016. [DKS15c] I. Diakonikolas, D. M. Kane, and A. Stewart. Properly learning poisson binomial distributions in almost polynomial time. CoRR, 2015. To appear in COLT 2016. [DKS16] I. Diakonikolas, D. M. Kane, and A. Stewart. Learning multivariate log-concave distributions. CoRR, abs/1605.08188, 2016. [DL01] L. Devroye and G. Lugosi. Springer, 2001. [DR09] L. Dumbgen and K. Rufibach. Maximum likelihood estimation of a log-concave density and its distribution function: Basic properties and uniform consistency. Bernoulli, 15(1):40–68, 2009. [DR11] L. Dümbgen and K. Rufibach. logcondens: Computations related to univariate log-concave density estimation. J. Statist. Software, 39(6), 2011. [DW16] C. R. Doss and J. A. Wellner. Global rates of convergence of the mles of logconcave and s-concave densities. Ann. Statist., 44(3):954–981, 06 2016. [FBR11] H. Jankowski F. Balabdaoui and K. Rufibach. Maximum likelihood estimation and confidence bands for a discrete log-concave distribution, 2011. [Fel15] V. Feldman. Hardness of proper learning (1988; pitt, valiant). In Encyclopedia of Algorithms. 2015. [FM99] Y. Freund and Y. Mansour. Estimating a mixture of two product distributions. In Proceedings of the 12th Annual COLT, pages 183–192, 1999. [FOS05] J. Feldman, R. O’Donnell, and R. Servedio. Learning mixtures of product distributions over discrete domains. In Proc. 46th IEEE FOCS, pages 501–510, 2005. [GW09] F. Gao and J. A. Wellner. On the rate of convergence of the maximum likelihood estimator of a k-monotone density. Science in China Series A: Mathematics, 52:1525–1538, 2009. [HW16] Q. Han and J. A. Wellner. Approximation and estimation of s-concave densities via renyi divergences. Ann. Statist., 44(3):1332–1359, 06 2016. Combinatorial methods in density estimation. 15 [KMR+ 94] M. Kearns, Y. Mansour, D. Ron, R. Rubinfeld, R. Schapire, and L. Sellie. On the learnability of discrete distributions. In Proc. 26th STOC, pages 273–282, 1994. [KMV10] A. T. Kalai, A. Moitra, and G. Valiant. Efficiently learning mixtures of two Gaussians. In STOC, pages 553–562, 2010. [KS14] A. K. H. Kim and R. J. Samworth. Global rates of convergence in log-concave density estimation. Available at http://arxiv.org/abs/1404.2298, 2014. [KV94] M. Kearns and U. Vazirani. An Introduction to Computational Learning Theory. MIT Press, Cambridge, MA, 1994. [LS15] J. Li and L. Schmidt. A nearly optimal and agnostic algorithm for properly learning a mixture of k gaussians, for any constant k. CoRR, abs/1506.01367, 2015. [LV07] L. Lovász and S. Vempala. The geometry of logconcave functions and sampling algorithms. Random Structures and Algorithms, 30(3):307–358, 2007. [Pea95] K. Pearson. Contributions to the mathematical theory of evolution. ii. skew variation in homogeneous material. Philosophical Trans. of the Royal Society of London, 186:343–414, 1895. [Sco92] D.W. Scott. Multivariate Density Estimation: Theory, Practice and Visualization. Wiley, New York, 1992. [Sil86] B. W. Silverman. Density Estimation. Chapman and Hall, London, 1986. [SOAJ14] A. T. Suresh, A. Orlitsky, J. Acharya, and A. Jafarpour. Near-optimal-sample estimators for spherical gaussian mixtures. In NIPS, pages 1395–1403, 2014. [Sta89] R. P. Stanley. Log-concave and unimodal sequences in algebra, combinatorics, and geometry. Annals of the New York Academy of Sciences, 576(1):500–535, 1989. [SW14] A. Saumard and J. A. Wellner. Log-concavity and strong log-concavity: A review. Statist. Surv., 8:45–114, 2014. [VW02] S. Vempala and G. Wang. A spectral algorithm for learning mixtures of distributions. In FOCS, pages 113–122, 2002. [Wal09] G. Walther. Inference and modeling with log-concave distributions. Stat. Science, 24:319–327, 2009. 16 A A.1 Omitted Proofs Proof of Lemma 6 Lemma 6 Let f : D → R+ be a log-concave density with mean µ and standard deviation σ. Assume that either D = R or that σ is sufficiently large. Let g : D → R+ be a density with dTV (f, g) ≤ 1/10. Given an explicit description of g, we can efficiently compute values µ̃ and σ̃ so that |µ − µ̃| ≤ 2σ and 3σ/10 ≤ σ̃ ≤ 6σ. Proof. We define µ̃ to be the median of g and σ̃ to be the difference between the 25th and 75th percentiles of g. Since f and g are within total variation distance 1/10, it follows that their Kolmogorov distance (i.e., the maximum distance between their cumulative distribution functions) is at most 1/10. This implies that µ̃ lies between the 40th and 60th percentiles of f . By Cantelli’s inequality, we have that PrX∼f [X − µ ≥ 2σ] ≤ 1/5 and PrX∼f [X − µ ≤ −2σ] ≤ 1/5. Thus, |µ − µ̃| ≤ 2σ. Similarly, σ̃ lies between (a) the difference between the 65th and 35th percentile of f and (b) the difference between the 85th and 15th percentile of f . By Cantelli’s inequality, we have that PrX∼f [X − µ ≥ 3σ] ≤ 1/10 and PrX∼f [X − µ ≤ −3σ] ≤ 1/10. Thus, σ̃ ≤ 6σ. For the other direction, note that 3/10 of the probability mass of f lies between the 35th and 65th percentile. Since the maximum value of f is at most 1/σ, by Lemma 5 (i), we conclude that the difference between the 65th and 35th percentiles is at least 3σ/10. A.2 Proof of Claim 8 Claim 8 Let f be a log-concave density with mean µ and standard deviation σ. Let α ≤ (−∞,α) (β,∞) µ−Ω(σ(1+log(1/ǫ))) and β ≥ µ+Ω(σ(1+log(1/ǫ)))). Then, kf k1 ≤ ǫ and kf k1 ≤ ǫ.   Proof. By Lemma 5 (ii), we have f (x) ≤ exp 1 − |x−µ| /σ. In the case D = R, we have 8eσ     Rα Rα |α−µ| |x−µ| /σdx = 8eσ exp 1 − . This is at most ǫ when f (x)dx ≤ exp 1 − 8eσ 8eσ −∞ −∞ |α − µ| ≥ 8eσ(1 + ln(8e/ǫ)), which holds by our bounds    on |α −µ|. Pα−1 Pα−1 |x−µ| /σ. Since exp 1 − /σ In the case D = Z, we have −∞ f (x) ≤ −∞ exp 1 − |x−µ| 8eσ 8eσ     R x+1 /σ ≤ x exp 1 − |y−µ| /σdy is monotonically increasing on (∞, α], we have that exp 1 − |x−µ| 8eσ 8eσ for x ≤ α − 1. Thus, we can bound this integral  sum Rby the same  to the one for the con Pα−1 α |x−µ| |x−µ| tinuous case, i.e., −∞ exp 1 − 8eσ /σ ≤ −∞ exp 1 − 8eσ /σdx ≤ ǫ . A symmetric argument yields that the probability mass of f on (β, ∞) is O(ǫ). A.3 Proof of Theorem 12 Theorem 12 If f is a log-concave density on either R or Z, and ǫ > 0, there exists a piecewise linear distribution g with O(ǫ−1/2 ) interval pieces so that dTV (f, g) ≤ ǫ. 17 We begin by proving this in the case where the range of f and the logarithmic derivative of f are both relatively small. Lemma 14. Let f be a log-concave function defined on an interval I in either R or Z. Suppose furthermore, that the range of f is contained in an interval of the form [a, 2a] for some a, and that the logarithmic derivative of f (or the log-finite difference of f in the discrete case) varies by at most 1/|I| on I. Then there exists a piecewise linear function g on I with O(ǫ−1/2 ) pieces so that kf − gk1 ≤ O(ǫkf k1). Proof. By scaling f , we may assume that a = 1. Note that the log-derivative or logfinite difference of f must be O(1/|I|) everywhere. We now partition I into subintervals J1 , J2 , . . . , Jn so that on each Ji has length at most ǫ1/2 |I| and the logarithmic derivative (or finite difference) varies by at most ǫ1/2 /|I|. Note that this can be achieved with n = O(ǫ−1/2 ) by placing an interval boundary every O(ǫ1/2 |I|) distance as well as every time the logarithmic derivative passes a multiple of ǫ1/2 /|I|. We now claim that on each interval Ji there exists a linear function gi so that kgi −f k∞ = O(ǫ). Letting g be gi on Ji will complete the proof. Let Ji = [y, z]. We note that for x ∈ Ji that f (x) = f (y) exp((x − y)α) for some α in the range spanned by the logarithmic derivative (or log finite difference) of f on Ji . Letting α0 be some number in this range, we have that f (x) = f (y) exp((x − y)α0 + (x − y)(α − α0 )) = f (y) exp((x − y)α0) exp(O(ǫ1/2 |I|)O(ǫ1/2 /|I|)) = (1 + O(ǫ))f (y) exp((x − y)α0 ) . Noting that (x − y)α0 = O(ǫ1/2 |I|)O(1/|I|) = O(ǫ1/2 ), this is (1+O(ǫ))f (y)(1+(x−y)α0+O((x−y)α0)2 ) = (1+O(ǫ))(f (y)+(x−y)α0+O(ǫ)) = f (y)+(x−y)α0+O(ǫ). Therefore, taking gi (x) = f (y) + (x − y)α0 suffices. This completes the proof. Next, we need to show that we can partition the domain of f into intervals I satisfying the above properties. Proposition 15. Let f be a log-concave distribution on either R or Z. Then there exists a partition of R or Z into disjoint intervals I1 , I2 , . . . so that • f satisfies the hypotheses of Lemma 14 on each Ii . • For each m, there are only O(m) values of i so that f (Ii ) > 2−m . Proof. Firstly, by splitting the domain of f into two pieces separated by the modal value, we may assume that f is monotonic. Henceforth, we assume that f is defined on R+ or Z+ and that f is both log-concave and monotonically decreasing. 18 We define the intervals Ii = [ai , bi ] inductively. We let a1 = 0. Given ai , we let bi be the largest possible value so that f restricted to [ai , bi ] satisfies the hypotheses of Lemma 14. Given bi we let ai+1 be either bi (in the continuous case) or bi + 1 (in the discrete case). Note that this causes the first condition to hold automatically. We note that for each i, either f (ai+1 ) ≤ f (ai )/2 or the logarithmic derivative of f at ai+1 is less than the logarithmic derivative at ai by at least 1/(ai+1 − ai ). Note that in the latter case, since f (ai+1 ) > f (ai )/2, we have that the absolute value of the logarithmic derivative at f (ai ) is at most O(1/(ai+1 − ai )). Therefore, in this latter case, the absolute value of the logarithmic derivative of f at ai+1 is larger than the absolute value of the logarithmic derivative at ai by at least a constant multiple. Note that at the end of the first interval, we have that f (a2 ) = O(1/|I1|) and that the absolute logarithmic derivative of f at a2 is at least Ω(1/|I1 |). Note that each interval at least one of these increases by a constant multiple, therefore, there are only O(m) many i so that both f (ai ) > 2−m /|I1 | and the absolute logarithmic derivative of f at ai is less than 2m /|I1 |. We claim that if either of these fail to hold that the integral of f over Ii is O(2−m). If f (ai ) < 2−m /|I1 |, then since the absolute logarithmic derivative of f on Ii is at least Ω(1/|I1 |), we have that the length of Ii is O(|I1|). Therefore, the mass of f on Ii is O(2−m). If on the other hand the absolute logarithmic derivative of f at ai is at least 2m /|I1 |, since the value if f on Ii varies by at most a multiple of 2, we have that |Ii | = O(|I1 |/2m). Since f is decreasing, is has size O(1/|I1|) on Ii , and therefore, the integral of f of Ii is O(2−m). This completes the proof of the second condition. We are now prepared to prove our Theorem 12: Proof. We divide R or Z into intervals as described in Proposition 15. Call these intervals I1 , I2 , . . . sorted so that f (Ii ) is decreasing in i. Therefore, we have that f (Im ) = O(2−Ω(m) ). In particular, there is a constant c > 0 so that f (Im ) = O(2−cm). For m = 1, . . . , 2 log(1/ǫ)/c, we use Lemma 14 to approximate f in Im by a piecewise linear function gm so that gm has at most O(ǫ−1/2 2−cm/4 ) pieces and so that the L1 distance between f and gm on Im is at most f (Im )O(ǫ2cm/2 ) = O(ǫ2−cm/2 ). Let g be the piecewise linear function that is gm on Im for m ≤ c log(1/ǫ)/2, and 0 elsewhere. g is piecewise linear on 2 log(1/ǫ)/c X O(ǫ−1/2 2−cm/4 ) = O(ǫ−1/2 ) m=1 intervals. Furthermore the L1 error between f and g on the Im with m ≤ 2 log(1/ǫ)/c is at most 2 log(1/ǫ)/c X O(ǫ2−cm/2 ) = O(ǫ). m=1 The L1 error from other intervals is at most ∞ X O(2−cm) = O(ǫ). m=2 log(1/ǫ)/c 19 Therefore, kf − gk1 = O(ǫ). By replacing g by max(g, 0), we may ensure that it is positive (and at most double the number of pieces and decrease the distance from f ). By scaling g, we may then ensure that it is a distribution. Finally by decreasing ǫ by an appropriate constant, we may ensure that dTV (f, g) ≤ ǫ. This completes the proof. A.4 Proof of Claim 13 Claim 13 Let g(x) = ax + b and h(x) = c exp(dx). Let I = [x′ , x′ + L] be an interval with g(x) ≥ 0 and 0 ≤ h(x) ≤ O(ǫ/L) for all x ∈ I. There is an algorithm which approximates kg − hkI1 to within an additive O(ǫ2 / log(1/ǫ)) in time polylog(1/ǫ). ′ ′ Proof. First, we claim that for any subinterval I ′ ⊆ I, we can compute khkI1 and kgkI1 to within O(ǫ2 / log(1/ǫ)) in time polylog(1/ǫ). There are simple closed formulas for the integrals of these and for the sum of arithmetic and geometric series. The formula for the sum of a geometric series may have a cancellation issue when the denominator 1 − exp(d) is small but note that when |d| = O(ǫ2 / log(1/ǫ)) we can approximate the sum of h(x) over I by its integral. These can all be computed in polylog(1/ǫ) time. Now it remains to approximate any crossing points, i.e., points x where g(x) = h(x) for ′ x ≤ x ≤ x′ + L (which need not satisfy x ∈ D). If we find these with sufficient precision, ′ ′ then we can divide I and calculate khkI1 and kgkI1 for each sub-interval I ′ to get the result. Note that g(x) and h(x) can have at most two crossing points, since there is at most one x ∈ R where the derivative of h(x) − g(x) is 0. This can be calculated as x∗ = ln(a/(cd))/d, when a/(cd) > 0. If x∗ lies in I we can subdivide and reduce to the case when there is a crossing point only if g(x) − h(x) has different signs at the endpoints. In this case, if g(x) = Ω(ǫ/L) at one endpoint, we can find a point at which g(x) = Θ(ǫ/L), which is higher than our bound on h(x), and we can divide there. Thus, we can reduce to the case where there is exactly one crossing point in I and h(x), g(x) ≤ O(ǫ/L). By performing O(log(1/ǫ)) bisections we can approximate this crossing point to within O(ǫL/ log(1/ǫ) (or max{1, O(ǫ2L/ log(1/ǫ)} when D = Z). Then, we have that if J is the interval between the true crossing point and our estimate, then kg − hkJ1 ≤ kgkJ1 + khkJ1 = O(Lǫ/ log(1/ǫ) · ǫ/L) = O(ǫ2 / log(1/ǫ). Hence, if we divide here, each of the ′ ′ ′ sub-intervals I ′ has kh − gkI1 = |khkI1 − kgkI1 | + O(ǫ2 / log(1/ǫ)). Note that in all of the above cases, we only sub-divide I into at most O(1) sub-intervals, and so it takes polylog(1/ǫ) time to compute kg − hkI1 for the whole interval. 20
10math.ST
arXiv:1411.7838v2 [cs.DS] 2 Dec 2015 The Complexity of Finding Effectors∗ Laurent Bulteau†1 , Stefan Fafianie‡2 , Vincent Froese§3 , Rolf Niedermeier¶ 3 , and Nimrod Talmonk3 1 IGM-LabInfo, CNRS UMR 8049, Université Paris-Est Marne-la-Vallée, France. 2 Institut für Informatik, Universität Bonn, Germany. 3 Institut für Softwaretechnik und Theoretische Informatik, TU Berlin, Germany. Abstract The NP-hard Effectors problem on directed graphs is motivated by applications in network mining, particularly concerning the analysis of probabilistic information-propagation processes in social networks. In the corresponding model the arcs carry probabilities and there is a probabilistic diffusion process activating nodes by neighboring activated nodes with probabilities as specified by the arcs. The point is to explain a given network activation state as well as possible by using a minimum number of “effector nodes”; these are selected before the activation process starts. We correct, complement, and extend previous work from the data mining community by a more thorough computational complexity analysis of Effectors, identifying both tractable and intractable cases. To this end, we also exploit a parameterization measuring the “degree of randomness” (the number of ‘really’ probabilistic arcs) which might prove useful for analyzing other probabilistic network diffusion problems as well. ∗ An extended abstract appeared in Proceedings of the 12th Annual Conference on Theory and Applications of Models of Computation (TAMC ’15), Volume 9076 of LNCS, pages 224– 235, Springer, 2015. This article provides all proofs in full detail. † ([email protected]) Supported by the Alexander von Humboldt Foundation, Bonn, Germany. Main work done while affiliated with TU Berlin. ‡ ([email protected]) Supported by the DFG Emmy Noether-program (KR 4286/1). Main work done while affiliated with TU Berlin. § ([email protected]) Supported by the DFG, project DAMM (NI 369/13). ¶ ([email protected]) k ([email protected]) Supported by DFG Research Training Group “Methods for Discrete Structures” (GRK 1408). 1 1 Introduction To understand and master the dynamics of information propagation in networks (biological, chemical, computer, information, social) is a core research topic in data mining and related fields. A prominent problem in this context is the NP-hard problem Effectors [15]: The input is a directed (influence) graph with a subset of nodes marked as active (the target nodes) and each arc of the graph carries an influence probability greater than 0 and at most 1. Assuming a certain diffusion process on the graph, the task is to find few “effector nodes” that can “best explain” the set of given active nodes, that is, the activation state of the graph. Specifically, consider a set of nodes in the graph which are initially active. Then, due to a certain diffusion process, several other nodes in the graph, which initially were not active, might become active as a result. The diffusion model we consider (and which is known as the independent cascade model [14]) is such that, at each time step, a newly activated node (initially only the chosen effectors are active) has one chance to activate each non-active out-neighbor with the corresponding arc probability. If an out-neighbor was successfully activated in the last time step, then the propagation continues and this node has the chance to further activate its out-neighbors. The propagation process terminates when there are no newly activated nodes. Figure 1 shows an example of a possible propagation process. Given the activation state of the graph at the end of the propagation process, we ask for the set of nodes, the effectors, which could best explain the current activation state. Being able to efficiently compute the set of effector nodes is helpful in many scenarios. The paper by Lappas et al. [15] mentions several of them, including being able to better understand how information propagates in social networks, or finding those countries which are more prominent for spreading epidemics (here, one might assume a graph where each country is a node, and, given the current state of some plague, the effector nodes are those countries which explain this current state). Motivated also by the scenario from epidemics, one might be interested in providing shields against such plagues. One possible way to achieve this is by finding the set of effectors, and vaccinating the people in those countries. Taking monetary costs into account, it is desirable to find a small set of effectors; thus, in the Effectors problem, the goal is to find a set of effectors of small size. It is important to note that we allow effectors to be chosen from the whole set of graph nodes and not only from the set of target nodes. This makes our model, in a sense, more general than the original one by Lappas et al. [15].1 See Section 2 for definitions of the main problems, formal definition of our model, and a discussion about our model and its difference to that of Lappas et al. [15]. Our main contribution is to extend and clarify research on the computational 1 We conjecture that both models coincide if we are allowed to choose an unlimited number of effectors, that is, if the number of chosen effectors does not matter. On the contrary, they do not coincide if the number of effectors is bounded, see Section 2. 2 0.8 0.5 0.1 1 0.3 t=0 0.8 0.5 0.1 0.9 1 0.3 t=1 0.8 0.5 0.1 0.9 1 0.3 0.9 t=2 Figure 1: An example depicting the information propagation according to the independent cascade model. The influence graph is a directed graph where the arcs are labeled with influence probabilities. Initially, at time t = 0, only the top node is active (black) and has a chance to independently activate the left and right node with the corresponding arc probabilities. In the example, the right node is activated (thick arc) while the left node is not. The probability of this event is thus 0.5 · (1 − 0.8). The propagation then continues and the right node has a chance to activate its out-neighbors at time t = 1. Every activated node has only one chance (namely, after it became active the first time) to activate other inactive nodes. Note that at time t = 2 the bottom node cannot activate any new nodes. Hence, the propagation process terminates. The overall probability of this particular propagation (and of this particular activation state) equals 0.5 · (1 − 0.8) · 0.3 · (1 − 0.1) = 0.027. complexity status of Effectors, which has been initiated by Lappas et al. [15]. In short, Lappas et al. [15] have shown that Effectors is generally NP-hard and hard to approximate, developed an algorithm that is efficient on trees, and used it to develop an efficient heuristic. As probabilistic information propagation is central in the independent cascade information-propagation model which is in the heart of the Effectors problem (as well as in several other informationpropagation models), we put particular emphasis on studying how the “degree of randomness” in the network governs the computational complexity. Moreover, compared to previous work, we make an effort to present the results in a more formal setting, conducting a rigorous mathematical analysis. Informally speaking (concrete statements of our results appear in Section 2 after having provided formal definitions), we have gained the following main insights (also refer to Table 1 in Section 2). • With unlimited degree of randomness, finding effectors is computationally very hard. In fact, even computing the “cost” (how well does a set of effectors explain a given activation state) of a given set of effectors is intractable. This significantly differs from deterministic models. • Even if the directed input graph is acyclic, then this does not lead to a significant decrease of the computational complexity. • Bounding the degree of randomness (in other words, bounding the number 3 of arcs with probability different from 1), that is, parameterizing on the degree of randomness, yields some encouraging (fixed-parameter) tractability results for otherwise intractable cases. • We identify some flaws in the work of Lappas et al. [15] (see Section 5.4 for details), who claim one case to be intractable which in fact is tractable and one case the other way around. Admittedly, in real-world applications (where influence probabilities are determined through observation and simulation, often involving noise) the number of probabilistic arcs may be high, thus, at first sight, rendering the parameter “number of probabilistic arcs” doubtful. However, note that finding effectors is computationally very hard (also in terms of polynomial-time approximability; the approximation hardness of Effectors is mentioned by Lappas et al. [15] and follows, for example, from the reductions which use the Set Cover problem). So, in order to make the computation of a solution more feasible one might round up (to 1) arc probabilities which are close to 1 and round down (to 0) arc probabilities which are close to 0. Thus, one can achieve a trade-off between running time and accuracy of the result. Depending on the degree of rounding (as much as a subsequent fixed-parameter algorithm exploiting the mentioned parameter would “allow”), in this way one might at least find a good approximation of an optimal set of effectors in reasonable time. Related work. Our main point of reference is the work of Lappas et al. [15]. Indeed, we use a slightly different problem definition: They define the effectors to be necessarily a subset of the target nodes, whereas we allow the effectors to form an arbitrary subset of the nodes. It turns out that these two definitions really yield different problems, in the sense that a solution for one problem might not be a solution for the other (see Section 3 for an extensive discussion of the differences between these two models and for an explanation on why we have chosen to define our model as it is defined). The special case where all nodes are target nodes (and hence where the two models above clearly coincide) is called Influence Maximization and is well studied in the literature [7, 10, 14]. Specifically, it is known that the Influence Maximization problem is NP-hard, and a polynomial-time (1 − 1/e)-approximation algorithm for this problem is given by Kempe et al. [14]. Finally, a closely related deterministic version (called Target Set Selection) with the additional difference of having node-individual thresholds specifying how many neighboring nodes need to be active to make a node active has also been extensively studied, in particular from a parameterized complexity point of view [4, 5, 6, 8, 16]. Target Set Selection is NP-hard in general, and hard to approximate, also in the parameterized sense (specifically, cannot be approximated even in FPT-time (see Section 2) with respect to the solution size). It is NP-hard even on graphs of diameter 2 [16], and it is tractable on some restricted graph classes such as trees [6] and cliques [16]. 4 2 Preliminaries In this section, we provide definitions used throughout the work. We basically use the same definitions as Lappas et al. [15], except for few differences in notation. Graph Theory. We consider simple directed graphs G = (V, E) with a set V of nodes and an arc set E ⊆ {u → v | u, v ∈ V, u 6= v}. If there is an arc u → v ∈ E, then we call u an in-neighbor of v and we call v an out-neighbor of u. For a subset V ′ ⊆ V , we denote by G[V ′ ] := (V ′ , E ′ ) the subgraph of G induced by V ′ , where E ′ := {u → v ∈ E | u, v ∈ V ′ }. An undirected graph G = (V, E) consists of a vertex set V and an edge set E ⊆ {{u, v} | u, v ∈ V, u 6= v}. We use the acronym DAG for directed acyclic graphs. An undirected tree is a connected acyclic graph. A directed tree is an arbitrary orientation of an undirected tree. The condensation of a directed graph G is a DAG containing a node vC for each strongly connected component C of G and there is an arc vC → vC ′ if and only if there exists at least one arc from a node in C to a node in C ′ . Influence Graphs. An influence graph G = (V, E, w) is a simple directed graph equipped with a function w : E → (0, 1] ∩ Q assigning an influence weight to each arc u → v ∈ E which represents the influence of node u on node v. Strictly speaking, the influence is the probability that u propagates some information to v. We denote the number of nodes in G by n := |V | and the number of arcs in G by m := |E|. Information Propagation. We consider the following information-propagation process, called the Independent Cascade (IC) model [14]. Within this model, each node is in one of two states: active or inactive. When a node u becomes active for the first time, at time step t, it gets a single chance to activate its inactive out-neighbors. Specifically, u succeeds in activating a neighbor v with probability w(u → v). If u succeeds, then v will become active at step t + 1. Otherwise, u cannot make any more attempts to activate v in any subsequent round. The propagation process terminates when there are no newly activated nodes, that is, when the graph becomes static. We remark that, since our algorithms need to manipulate the probabilities determined by the function w, technically (and as usually) we assume that the precision of the probabilities determined by this function is polynomially upperbounded in the number n of nodes of the input graph, and we ignore the time costs for adding or multiplying rational numbers assuming that these operations take constant time. Cost Function. For a given influence graph G = (V, E, w), a subset X ⊆ V of effectors, and a subset A ⊆ V of active nodes, we define a cost function X X p(v|X), CA (G, X) := (1 − p(v|X)) + v∈A v∈V \A 5 where for each v ∈ V , we define p(v|X) to be the probability of v being active after the termination of the information-propagation process starting with X as P the active nodes. An alternative definition is that CA (G, X) := v∈V CA (v, X), where CA (v, X) := 1 − p(v|X) if v ∈ A and CA (v, X) := p(v|X) if v ∈ / A. One might think of this cost function as computing the expected number of nodes which are incorrectly being activated or unactivated. Main Problem Definition. Our central problem Effectors is formulated as a decision problem—it relates to finding few nodes which best explain (lowest cost) the given network activation state specified by a subset A ⊆ V of nodes. Effectors Input: An influence graph G = (V, E, w), a set of target nodes A ⊆ V , a budget b ∈ N, and a cost c ∈ Q. Question: Is there a subset X ⊆ V of effectors with |X| ≤ b and cost CA (G, X) ≤ c? We will additionally consider the related problem Effectors-Cost (see Section 4) where the set X of effectors is already given and one has to determine its cost. Parameters. The most natural parameters to consider for a parameterized computational complexity analysis are the maximum number b of effectors, the cost value c, and the number a := |A| of target nodes. Moreover, we will be especially interested in quantifying the amount of randomness in the influence graph. To this end, consider an arc u → v ∈ E: if w(u → v) = 1, then this arc is not probabilistic. We define the parameter number r of probabilistic arcs, that is, r := |{u → v ∈ E : w(u → v) < 1}|. Parameterized Complexity. We assume familiarity with the basic notions of algorithms and complexity. Several of our results will be cast using the framework of parameterized complexity analysis. An instance (I, k) of a parameterized problem consists of the classical instance I and an integer k being the parameter [11, 13, 17, 9]. A parameterized problem is called fixedparameter tractable (FPT) if there is an algorithm solving it in f (k) · |I|O(1) time, whereas an algorithm with running time |I|f (k) only shows membership in the class XP (clearly, FPT ⊆ XP). One can show that a parameterized problem L is (under certain complexity-theoretic assumptions) not fixed-parameter tractable by devising a parameterized reduction from a W[1]-hard or W[2]-hard problem (such as Clique or Set Cover, respectively, each parameterized by the solution size) to L. A parameterized reduction from a parameterized problem L to another parameterized problem L′ is a function that, given an instance (I, k), computes in f (k) · |I|O(1) time an instance (I ′ , k ′ ) with k ′ ≤ g(k) such that (I, k) ∈ L ⇔ (I ′ , k ′ ) ∈ L′ . The common working hypothesis is that FPT 6= W[1]. In fact, it is assumed that there is an infinite hierarchy FPT ⊂ W[1] ⊂ W[2] ⊂ . . . 6 called the W -hierarchy. Thus, for a parameterized problem to be W[2]-hard is even stronger in the sense that even if FPT = W[1] holds, it is still possible that FPT 6= W[2]. Counting Complexity. We will also consider so called counting problems of the form “Given x, compute f (x).”, where f is some function {0, 1}∗ → N (see Arora and Barak [2, Chapter 9] for an introduction to counting complexity). The class #P consists of all such functions f such that f (x) equals the number of accepting computation paths of a nondeterministic polynomial-time Turing machine on input x. Informally speaking, we can associate a decision problem in NP (which asks weather there exists a solution or not) with a counting problem in #P (which asks for the number of solutions). Clearly, if all counting problems in #P can be solved in polynomial time, then this implies P = NP. Analogously to NP-hardness, showing that a function is #P-hard gives strong evidence for its computational intractability. A function f : {0, 1}∗ → {0, 1}∗ is #P-hard if a polynomial-time algorithm for f implies that all counting problems in #P are polynomial-time solvable. Organization. Before we discuss our model and the one by Lappas et al. [15], we overview our main results in Table 1. We will treat the sub-problem Effectors-Cost in Section 4, and Effectors in Section 5. Note that most of our results transfer to the model of Lappas et al. [15]. In particular, this implies that their claims that the “zero-cost” special case is NP-hard [15, Lemma 1] and that the deterministic version is polynomial-time solvable are both flawed, because from our results exactly the opposite follows (see the last part of Section 5.4 for details). 3 Model Discussion Our definition of Effectors differs from the problem definition of Lappas et al. [15] in that we do not require the effectors to be chosen among the target nodes. Before pointing out possible advantages and motivating our problem definition, we give a simple example illustrating the difference between these two definitions. Consider the influence graph in Figure 2, consisting of one non-target node (white) having three outgoing arcs with probability 1 each to three target nodes (black). Clearly, for b = c = 1, this is a “no”-instance if we are only allowed to pick target nodes as effectors since the probability of being active will be 0 for two of the three target nodes in any case, which yields a cost of at least 2. According to our problem definition, however, we are allowed to select the nontarget node, which only incurs a cost of 1, showing that this is a “yes”-instance. Let us compare the two models. First, we think that our model captures the natural assumption that an effector node does not have to remain active 7 Table 1: Computational complexity of the different variants of Effectors. Note that all hardness results hold also for DAGs. The parameter a stands for the number of active nodes, b for the budget, c for the cost value, and r for the number of probabilistic arcs. Deterministic Parameterized Probabilistic (r = 0) EffectorsCost FPT XP [wrt. r], Theorem 2 (arbitrary r) #P-hard, Corollary 1 [wrt. min(a, b, c)], Effectors (general case) 1 Infinite budget (b = ∞) Influence Maximization (A = V ) (by r) FPT W[2]-hard [wrt. b + c], Theorem 3 W[1]-hard [wrt. a + b + c], Theorem 3 [wrt. r], Theorem 5 [wrt. b + c], Theorem 6 NP-hard, Theorem 4 open: FPT[wrt. a or c] FPT W[1]-hard 1 1 1 [wrt. min(b, c)], Theorem 6 Figure 2: Example where it is optimal to choose a nontarget node as effector. forever2. Indeed, the modeling of Lappas et al. [15] might be interpreted as a “monotone version” as for example discussed by Askalidis et al. [3], while in this sense our model allows for “non-monotone explanations”. Second, our model is more resilient to noise; consider, for example, Figure 2. It might be the case that indeed the top node is activated, however, due to noisy sampling methods, it looks to us as if this top node is inactive. In this simple example, a solution according to the model of Lappas et al. [15] would have to use three effectors to wrongly explain the data, while a solution according to our model would be compute a correct and optimal solution with only one effector. Clearly, if all nodes are target nodes (this particular setting is called Influence Maximization), then the two models coincide. Furthermore, we strongly conjecture that if we have an unlimited budget, then it suffices to search for a solution among the target nodes, that is, for b = ∞, we believe that the two problem definitions are also equivalent: Conjecture 1. For b = ∞, it holds that every “yes”-instance (G, A, b, c) of Effectors has a solution X ⊆ A. 2 Notably, in our model it actually remains active. The point is that before the whole computation starts (and after it ends) nodes may (have) become inactive again. Still, “temporary activeness” may make a node an effector that helps explaining the currently observed network activation state. 8 At least for directed trees (that is, the underlying undirected graph is a tree— these also have been studied by Lappas et al. [15]) we can prove 1. The idea of proof is that if an optimal solution contains a non-target node v, then this node only influences nodes reachable from it via paths that do not visit other nodes in the solution. Within this smaller tree of influenced nodes there must be some subtrees rooted at target nodes such that the expected cost for such a subtree is smaller if its target root node is activated during the propagation process compared to the case when it is not. Choosing these target nodes directly as effectors, replacing the non-target node v, yields another optimal solution with fewer non-target nodes. Theorem 1. 1 holds for directed trees. Proof. Before proving the actual theorem, let us have a brief look on the probabilistics of the information-propagation process in directed trees. Clearly, in any influence graph, a node v can activate another node u only if there is a directed path from v to u. Note that in a directed tree this path is unique if it exists. Moreover, the probability p(u|X) only depends on those nodes v ∈ X that are connected to u by a directed path that contains no other node from X. To see that this is true, consider a node v ∈ X such that all directed paths from v to u contain another node from X. Then, on each of these paths the corresponding node x ∈ X has only one chance to activate u via propagation along the path. Since v cannot “re-activate” x (x is already active from the beginning), the activation probability of u does not depend on v. For a node v ∈ V , let cl(v) ⊆ V denote the closure of v, that is, the set of all nodes u ∈ V for which there exists a directed path from v to u (including v itself, that is, v ∈ cl(v)). Let (G = (V, E, w), A, b, c) with b = ∞ be an input instance of Effectors, where G is an arbitrary directed tree. Let X ⊆ V be an optimal solution with X 6⊆ A, that is, there exists a node x ∈ X \ A. We show that there is an optimal solution X ∗ containing fewer non-target nodes than X. More formally, we show that there exists a solution X ∗ with x 6∈ X ∗ and X ∗ \ A ( X \ A such that CA (G, X ∗ ) ≤ CA (G, X). Recursively applying this argument then proves the theorem. First, note that if CA (G, X ′ ) ≤ CA (G, X) holds for X ′ := X \ {x}, then we are done. Thus, we can assume CA (G, X ′ ) > CA (G, X), or, equivalently: CA (G, X ′ ) − CA (G, X) > 0  X X X X p(v|X) > 0 p(v|X ′ ) − ⇔ (1 − p(v|X)) + (1 − p(v|X ′ )) + v∈A ⇔ X v∈A v∈A v∈V \A v∈V \A   X p(v|X) − p(v|X ′ ) > 0. p(v|X) − p(v|X ) − ′ (1) v∈V \A Now, consider a node v that is not in the closure of x. Clearly, it holds that p(v|X) = p(v|X ′ ) since there is no directed path from x to v, and thus x cannot change the probability of v becoming active during the informationpropagation process. Therefore, if we let Ax := cl(x) ∩ A and Ax := cl(x) \ Ax , 9 then Inequality (1) can be rewritten as X  X  p(v|X) − p(v|X ′ ) − p(v|X) − p(v|X ′ ) > 0. v∈Ax (2) v∈Ax For a directed tree G, the subgraph Tx := G[cl(x)] induced by the closure of x is a rooted directed tree with root x, where all the arcs are directed from x to the leaves (that is, an out-tree). Moreover, for a node v ∈ Ax , there is exactly one directed path from x to v in Tx . Let A′x ⊆ Ax be the subset of target nodes v in the closure of x such that the directed path from x to v contains no other target node closure of x as the disjoint union S from Ax . Then, we can write the S cl(x) = v∈A′x cl(v) ∪ Z, where Z := cl(x) \ ( v∈A′x cl(v)). Note that Z ⊆ Ax . Therefore, we can write Inequality (2) as XX  X  p(u|X) − p(u|X ′ ) − p(u|X) − p(u|X ′ ) − v∈A′x u∈Av u∈Av X v∈Z  p(v|X) − p(v|X ′ ) > 0. Note that p(v|X) ≥ p(v|X ′ ) holds for all v ∈ V since X ′ ⊆ X, which yields X  p(v|X) − p(v|X ′ ) ≥ 0. v∈Z Therefore, the following holds XX   X p(u|X) − p(u|X ′ ) > 0. p(u|X) − p(u|X ′ ) − v∈A′x u∈Av (3) u∈Av Now, let p(v|X) denote the probability that a node v is not activated given that the nodes in X are active and let p(u|v, X) be the probability of u being activated given that v is inactive and the nodes in X are active. Note that, for v ∈ cl(x) and u ∈ cl(v), the probability of u being active conditioned on v does not depend on x since v lies on the directed path from x to u, that is, p(u|v, X) = p(u|v, X ′ ) and p(u|v, X) = p(u|v, X ′ ). Hence, we have p(u|X) = p(u|v, X)p(v|X) + p(u|v, X)p(v|X) = p(u|v, X ′ )p(v|X) + p(u|v, X ′ )(1 − p(v|X)) and p(u|X ′ ) = p(u|v, X ′ )p(v|X ′ ) + p(u|v, X ′ )(1 − p(v|X ′ )). This yields   p(u|X) − p(u|X ′ ) = p(u|v, X ′ ) p(v|X) − p(v|X ′ ) + p(u|v, X ′ ) p(v|X ′ ) − p(v|X)   = p(v|X) − p(v|X ′ ) p(u|v, X ′ ) − p(u|v, X ′ ) . 10 Thus, for each v ∈ A′x , we have X  X  p(u|X) − p(u|X ′ ) − p(u|X) − p(u|X ′ ) = u∈Av u∈Av  X  p(v|X) − p(v|X ) p(u|v, X ′ ) − p(u|v, X ′ ) − ′ u∈Av X u∈Av  p(u|v, X ′ ) − p(u|v, X ′ ) . (4) In the following, let X  X  δv (X ′ ) := p(u|v, X ′ ) − p(u|v, X ′ ) − p(u|v, X ′ ) − p(u|v, X ′ ) . u∈Av u∈Av Consider now Inequality (3) again. Since the outer summation in Inequality (3) over all nodes v ∈ A′x is positive, there must be some nodes v ∈ A′x for which the summand (that is, the right-hand side product of Equation (4)) is positive. Note that p(v|X) − p(v|X ′ ) ≥ 0 since X ′ ⊆ X for all v ∈ A′x . Hence, the set A∗ := {v ∈ A′x | δv (X ′ ) > 0} is non-empty since these are the nodes for which the above product is positive. Furthermore, we define the new set of effectors X ∗ := X \ {x} ∪ A∗ = X ′ ∪ A∗ , which does not include the non-target node x. Now, consider the difference CA (G, X)− CA (G, X ∗ ). Since {x} ∪A∗ ⊆ cl(x), it follows p(v|X) = p(v|X ∗ ) for all v 6∈ cl(x). Thus, analogously to the above steps, we can write CA (G, X) − CA (G, X ∗ ) as XX   X p(u|X ∗ ) − p(u|X) − p(u|X ∗ ) − p(u|X) − v∈A′x u∈Av u∈Av X v∈Z  p(v|X ∗ ) − p(v|X) . Note that, for each v ∈ Z, it holds for all u ∈ A∗ that v 6∈ cl(u). Hence, p(v|X ∗ ) = p(v|X ′ ), which implies X  p(v|X ∗ ) − p(v|X) ≤ 0. v∈Z Thus, we obtain the following inequality CA (G, X)−CA (G, X ∗ ) ≥ XX  X  p(u|X ∗ ) − p(u|X) − p(u|X ∗ ) − p(u|X) . v∈A′x u∈Av u∈Av 11 (5) As in Equation (4), we can rewrite the right-hand side of Inequality (5) to X  X  p(v|X ∗ ) − p(v|X) p(u|v, X) − p(u|v, X) − u∈Av v∈A′x X u∈Av  p(u|v, X) − p(u|v, X) . (6) Clearly, for v ∈ A′x , the probability of u ∈ cl(v) being active conditioned on v does not depend on x, that is, it holds p(u|v, X) = p(u|v, X ′ ) and p(u|v, X) = p(u|v, X ′ ). By substituting these probabilities into (6) we arrive at X  p(v|X ∗ ) − p(v|X) δv (X ′ ). CA (G, X) − CA (G, X ∗ ) ≥ v∈A′x ∗ ′ ∗ Now, for each node v ∈ A , it holds δv (X =  ) >′ 0 and p(v|X ) − p(v|X) ∗ 1 − p(v|X) ≥ 0, and thus p(v|X ) − p(v|X) δv (X ) ≥ 0. For each v ∈ A′x \ A∗ , it holds δv (X ′ ) ≤ 0 and p(v|X ∗ ) = p(v|X ′ ) ≤ p(v|X), and thus p(v|X ∗ ) − p(v|X) δv (X ′ ) ≥ 0. Hence, CA (G, X) − CA (G, X ∗ ) ≥ 0 and, clearly, X ∗ \ A ( X \ A, and we are done. The last theorem shows that our model for the Effectors problem and that of Lappas et al. [15] sometimes coincide. In general, however, it is not completely clear how the computational complexity of our model for the Effectors problem differs from that of Lappas et al. [15]. We do mention that our algorithmic results (Lemma 1, 1, Theorem 5) easily transfer to the model of Lappas et al. [15], as well as Theorem 6. 4 Computing the Cost Function We consider the problem of computing the cost for a given set of effectors. Effectors-Cost Input: An influence graph G = (V, E, w), a set of target nodes A ⊆ V , and a set of effectors X ⊆ V . Compute: The cost CA (G, X). Effectors-Cost is polynomial-time solvable on directed trees [15]. By contrast, Effectors-Cost is unlikely to be polynomial-time solvable even on DAGs. This follows from a result by Wang et al. [19, Theorem 1]. They show that computing the expected number of activated nodes for a single given effector is #P-hard on DAGs. Note that for the case A = ∅ (that is, a = 0), the cost equals the expected number of activated nodes at the end of the propagation process. Hence, we obtain the following corollary of Wang et al. [19]. Corollary 1. Effectors-Cost on directed acyclic graphs is #P-hard even for a = 0 and |X| = 1. 12 Note that Corollary 1 implies that Effectors-Cost on DAGs is not fixedparameter tractable with respect to the combined parameter (a, |X|). On the positive side, Effectors-Cost is fixed-parameter tractable with respect to the number r of probabilistic arcs. The general idea is to recursively simulate the propagation process, branching over the probabilistic arcs, and to compute a weighted average of the final activation state of the graph. Theorem 2. Given an instance (G = (V, E), A, X) of Effectors-Cost, the probability p(v|X) for a given node v ∈ V can be computed in O(2r · n(n + m)) time, where r is the number of probabilistic arcs. Accordingly, Effectors-Cost can be solved in O(2r · n2 (n + m)) time. Proof. The overall idea of the proof is as follows. For each subset of the probabilistic arcs, we compute the cost, conditioned on the event that the propagation process was successful on these arcs, but not successful on the other probabilistic arcs. For each such subset we also compute the probability that this event happens. Then, by applying the law of total probability, it follows that the overall cost equals the weighted average of these conditioned costs, weighted by the probability of these events. We present the algorithm in a recursive way, mainly for the sake of having a formal proof for its correctness. To this end, let (G = (V, E), A, X) be an input instance of Effectors-Cost. Note that in order to compute the cost CA (G, X), we compute the probability p(v|X) for each node v ∈ V , because given all these probabilities it is straightforward to compute the cost in polynomial time. Hence, we prove the theorem by showing that computing p(v|X) is fixed-parameter tractable with respect to r using a search-tree algorithm that computes p(v|X) for a given node v by recursively “simulating” all possible scenarios which could appear during the propagation process. To this end, we define an auxiliary function p̃(v, X, F ) denoting the probability that v is activated during the propagation process given that exactly the nodes in X are active but only the nodes in F ⊆ X are allowed to activate further nodes in the next step, whereas the nodes in X \ F can never activate any other node (indeed, p(v|X) = p̃(v, X, X)). We now show how to compute p̃(v, X, F ). First, if v ∈ X, then p̃(v, X, F ) = 1, as it is already activated. Otherwise, if v 6∈ X and F is closed (that is, F has no outgoing arcs to V \ X), then there is no propagation at all and thus p̃(v, X, F ) = 0. Otherwise, if X is not closed, then let N ⊆ V \ X denote the set of nodes in V \ X that have an incoming arc from some node in F . Further, let Nd ⊆ N be the set of nodes that have at least one deterministic incoming arc from F , and let Np := N \ Nd . Also, let Ep ⊆ E be the set of probabilistic arcs from F to N . Clearly, all nodes in Nd will be active in the next step of the propagation process, while the nodes in Np will be active in the next step only with some positive probability. We can use the law of total probability on the subsets of Np , and write X p̃(v, X, F ) = p̃(v, XR , FR )q(XR |X), R⊆Np 13 Algorithm 1: Pseudocode for p̃(v, X, X). if v ∈ X then return 1 if v ∈ / X and X is closed then return 0 foreach R ⊆ Np do compute q(XR |X) compute P p̃(v, XR , FR ) recursively return R⊆Np q(XR |X) · p̃(v, XR , FR ) where XR := X ∪ FR denotes the set of active nodes in the next time step, FR := Nd ∪ R denotes the set of newly active nodes in the next time step, and q(XR |X) denotes the probability that exactly the nodes in XR are active in the next step given that exactly the nodes in X are active. Note that, for each subset R ⊆ Np , Y Y Y pu , where pu := (1 − w(v → u)), q(XR |X) = 1 − pu u∈R v→u∈Ep u∈Np \R is polynomial-time computable. As a result, we end up with the following recursive formula:   1, if v ∈ X p̃(v, X, F ) := 0, if v 6∈ X and X closed  P R⊆Np q(XR |X) · p̃(v, XR , FR ), else. Algorithm 1 presents the pseudocode for computing p̃. For the running time, consider the recursion tree corresponding to the computation of p̃(v, X, X), where each vertex corresponds to a call of p̃. For the running time, note that the inner computation (that is, without further recursive calls) of each node in the recursion tree can be done in time O(n + m). Moreover, for each call, either at least one node is inserted to X, or the recursion stops. Therefore, the height of the recursion tree is upper-bounded by the number n of nodes. Lastly, each leaf in the recursion tree corresponds to a distinct subset of the probabilistic arcs, specifically, to those probabilistic arcs along which the propagation process carried on. Since there are 2r different subsets of probabilistic arcs, it follows that the number of leaves of the recursion tree is upper-bounded by 2r . Thus, the overall size of the recursion tree is upperbounded by 2r · n, and hence, the running time is O(2r · n(n + m)). 5 Finding Effectors We treat the general variant of Effectors in Section 5.1, the special case of unlimited budget in Section 5.2, and the special case of influence maximization in Section 5.3. 14 5.1 General Model We study how the parameters number a of target nodes, budget b, and cost value c influence the computational complexity of Effectors. We first observe that if at least one of them equals zero, then Effectors is polynomial-time solvable. This holds trivially for parameters a and b; simply choose the empty set as a solution. This is optimal for a = 0, and the only feasible solution for b = 0. For parameter c, the following holds, using a simple decomposition into strongly connected components. Lemma 1. For c = 0, Effectors can be solved in linear time. Proof. If there is a directed path from a target node to a non-target node, then we have a “no”-instance. Now every target node must be activated with probability 1, which is only possible along deterministic arcs. Let G′ be the condensation (that is, the DAG of strongly connected components) of the influence graph G after removing all probabilistic arcs. Then, we consider only the strongly connected components which contain at least one target node (note that all nodes in this component must be targets). Finally, if there are more than b of these target components that are sources in G′ , then we have a “no”-instance. Otherwise, we arbitrarily pick a node from each component corresponding to a source, and return a positive answer. Each step requires linear time. Based on Lemma 1, by basically checking all possibilities in a brute-force manner, we obtain simple polynomial-time algorithms for Effectors in the cases of a constant number a of target nodes, budget b, or cost c. Proposition 1. For r = 0, Effectors is in XP with respect to each of the parameters a, b, and c. Proof. Containment in XP for the parameter b is straightforward: For each possible set of effectors, we compute the cost in linear time and then return the best set of effectors. Note that for the case r = 0, we can assume that b ≤ a. To see this, let X ⊆ V be a solution of size |X| > a and let A′ ⊆ A be the subset of target nodes that are activated by choosing X. Clearly, choosing A′ as effectors is a better solution since it activates the same target nodes and only activates a subset of the non-target nodes activated by X. Therefore, we also have containment in XP with respect to a. It remains to show the claim for parameter c. First, we choose which c′ ≤ c nodes incur a cost. Among these nodes, we set the target nodes to be non-targets, and vice versa. Then, we run the polynomial-time algorithm P of Lemma 1 with cost 0. We exhaustively try all possible cc′ =0 cn′ ∈ O(nc ) choices to find a positive answer and return a negative answer otherwise. In the following, we show that, even for r = 0 and the influence graph being a DAG, Effectors is W[1]-hard with respect to the combined parameter (a, b, c), and even W[2]-hard with respect to the combined parameter (b, c). 15 k 2 {u, v}  +k+1 u ... v ... vertex nodes .. . edge nodes (c(u), c(v)) .. . k 2 .. .  pairs ... Figure 3: Illustration of the influence graph used in the reduction from MultiColored Clique. In this example arcs are shown for one of the edge nodes. An arc from an edge node to a set of color pair nodes is used to represent the k 2 + k + 1 arcs to all nodes for this color pair. All arcs have an influence weight of 1. Theorem 3. 1. Effectors, parameterized by the combined parameter (a, b, c), is W[1]hard, even if r = 0 and the influence graph is a DAG. 2. Effectors, parameterized by the combined parameter (b, c), is W[2]-hard, even if r = 0 and the influence graph is a DAG. Proof. We begin with the first statement, namely, that Effectors, parameterized by the combined parameter (a, b, c), is W[1]-hard, even if r = 0 and G is a DAG. We describe a parameterized reduction from the following W[1]-hard problem [12]. Multi-Colored Clique Input: A simple and undirected graph G = (V, E) with k colors on the vertices and k ∈ N. Question: Is there a k-vertex clique with exactly one occurrence of each color in the clique? Consider an instance (G = (V, E), k) of Multi-Colored Clique. We assume that k > 1, otherwise the instance  can be  solved trivially. We construct an instance of Effectors with b = k2 , c = k2 + k and an influence graph (see  Figure 3 for an illustration) defined as follows. Add k2 + k + 1 nodes for each unordered pair of distinct colors. Let us call these nodes nodes. These  color-pair  color-pair nodes are the target nodes A, thus a = k2 · ( k2 + k + 1). Now, add a vertex node nv for each v ∈ V , add an edge node eu,v for each e = {u, v} ∈ E, and add arcs {eu,v → nu , eu,v → nv }. For each edge e = {u, v} ∈ E, let Le 16 be the color-pair nodes corresponding to the colors of u and v and add arcs {eu,v → ℓ | ℓ ∈ Le }. Finally, set the influence weights of all arcs to 1. Let G′ be the influence graph obtained by the above construction and notice that G′ is a DAG. We show that there is a k-vertex multi-colored clique in G if and only if there is a size-b set of effectors that incurs a cost of at most c in G′ . Suppose that there is a multi-colored clique with k vertices in G. Let X be the edge nodes corresponding to the edges of this clique. Clearly, |X| = k2 = b. These effectors activate all color-pair nodes, that is, the complete target set A with probability 1. Furthermore, the non-active edge and vertex nodes corresponding to the clique are activated, and a total cost of k2 + k = c is incurred. For the reverse direction, let X be a size-b set of effectors that incurs a cost of at most c in G′ . Directly picking a vertex node is not optimal, since they are non-target nodes without outgoing arcs. Hence, they can only increase the cost. Also, without loss of generality, we can assume that X does not contain a colorpair node x. To see this, assume the contrary and suppose that X contains at least one edge node which influences x. Then X \ {x} is a solution with equivalent cost and smaller budget. In the other case, suppose that no such edge node is in X. Then, we pay for at least k + 1 other nodes corresponding   to the same color-pair as x since we can only take b = k2 out of k2 + k + 1 nodes. Directly picking an edge node instead of x incurs a cost of at most 3. By assumption, k > 1, that is, any optimal solution can be replaced by one that chooses only edge nodes as effectors. Now, in order to avoid a cost higher than  k + k = c, every color-pair node must be directly activated by an edge node. 2  Then X must contain exactly k2 edge nodes, one for each color pair. A cost of  at most k2 + k is only obtained if they activate at most k vertex nodes, i.e., the edges corresponding to the chosen edge nodes must form a multi-colored clique with k vertices. We continue with the second statement, namely, that Effectors, parameterized by the combined parameter (b, c), is W[2]-hard, even if r = 0 and G is a DAG. We provide a parameterized reduction from the W[2]-complete Dominating Set problem [11]. Dominating Set Input: A simple and undirected graph G = (V, E), k ∈ N. Question: Is there a vertex subset D ⊆ V such that |D| ≤ k and for each v ∈ V either v ∈ D or ∃v ′ ∈ D such that {v, v ′ } ∈ E? Consider an instance (G = (V, E), k) of Dominating Set. We construct an instance for Effectors with b = c = k, and obtain the influence graph (see Figure 4 for an illustration) as follows: Add a node iv and a set of nodes {cv,1 , . . . , cv,k+1 } for each vertex v ∈ V . Let us call these the initiator and copies of v, respectively. We connect each initiator of v to all of its copies by adding arcs {iv → cv,1 , . . . iv → cv,k+1 }. In a similar fashion, for each edge {u, v} ∈ E, we connect the initiator of u to all copies of v and vice versa. Finally, let the set of target nodes A contain all copies of vertices and set the influence weight of all arcs to 1. 17 k + 1 copies ... ... initiators .. . .. . ... Figure 4: Illustration of the influence graph in the reduction from Dominating Set. The vertices corresponding to the two initiators at the top are neighbors in the input graph. An arc from an initiator to a set of copies is used to represent k + 1 arcs, one to each copy. All arcs have an influence weight of 1. Let G′ be the influence graph obtained in the construction and note that G′ is a DAG. We show that there is a size-k set D that dominates all vertices in G if and only if there is a size-k set X of effectors that incurs a cost of at most k in G′ . Suppose that D is a k-dominating set for G. Let X be the initiators of vertices in D. These effectors activate all copies of vertices, i.e., the complete target set A with probability 1. Clearly, |X| = k = b and a cost of k = c is incurred for picking the initiators as effectors. For the reverse direction, let X be a size-k set of effectors that incur a cost of at most k in G′ . Consider a solution in which we directly pick a copy x of a vertex v as an effector. Suppose that X contains the initiator of v or one of its neighbors. Then X \ {x} is a solution with equivalent cost and smaller budget. In the other case, suppose that X contains no such initiator. Then, we pay for at least one other copy of v since we can take at most k out of k + 1 copies. Therefore, any optimal solution can be replaced by one that chooses only initiators as effectors. Now, every copy must be directly activated by an initiator to avoid a cost higher than k. Furthermore, X can contain at most k initiators. These initiators can only influence copies of their corresponding vertex or its neighbors, that is, the vertices corresponding to the chosen initiators are a k-dominating set. 5.2 Special Case: Unlimited Budget Here, we concentrate on a model variant where we are allowed to choose any number of effectors, that is, the goal is to minimize the overall cost with an unlimited budget of effectors. In general, Effectors with unlimited budget remains intractable, though. Theorem 4. If P 6= NP, then Effectors, even with unlimited budget, is not polynomial-time solvable on DAGs. Proof. We consider the following #P-hard [18] counting problem. 18 s s 1 − p z ′ s′ t t Figure 5: Example illustrating the construction in the proof of Theorem 4. Left: A directed acyclic graph with two distinguished vertices s and t, where the gray vertices lie on a directed s-t-path. Right: The corresponding influence graph with target nodes colored in black. Dashed arcs have an influence weight of 1/2 and thick arcs have an influence weight of 1. s-t Connectedness Input: A directed acyclic graph G = (V, E), two vertices s, t ∈ V . Compute: Number of subgraphs of G in which there is a directed path from s to t. In the following, let #st (G) denote the number of subgraphs of G in which there exists a directed path from s to t (where distinct isomorphic subgraphs are considered different). We give a polynomial-time reduction from the decision version of s-t Connectedness, which asks whether #st (G) is at least a given integer z. Let I = (G = (V, E), s, t, z) be an instance of the decision version of st Connectedness. We create an Effectors instance I ′ = (G′ = (V ′ , E ′ , w), A, b, c) as follows. Let Vst ⊆ V be the set of vertices that lie on some directed path from s to t and let Est ⊆ E be the set of arcs of all directed paths from s to t. Further, let W := Vst \ {s, t}. Clearly, it holds #st (G) = #st (G[Vst ]) · 2|E\Est | since #st (G[V \ Vst ]) = 0. Thus, in order to decide whether #st (G) ≥ z, we have to decide whether #st (G[Vst ]) ≥ z ′ , where z ′ := ⌈z · 2−|E\Est | ⌉. We initialize G′ as the induced subgraph G[Vst ] and set w(v → u) := 1/2 for each v → u ∈ Est . We further create a copy v ′ for each vertex v ∈ W , and add the arc v → v ′ with w(v → v ′ ) := 1. We also create a copy s′ of s, and add the arc s → s′ with w(s → s′ ) := 1 − pz′ , where pz′ := z ′ · 2−|Est | . Finally, we set A := W ∪ {s}, b = ∞, and c := |W | + 1 − 2−|Est | . The construction is illustrated in Figure 5. In the following, we prove two claims used to show the correctness of the above reduction. First, we claim that an optimal solution X of I ′ either equals ∅ or {s}. This can be seen as follows. Choosing s′ , t, or any copy v ′ to be an effector is never optimal as these are all non-target nodes without outgoing arcs. 19 Now, assume that X contains a node v ∈ W and let X ′ := X \ {v}. Then, we have CA (G′ , X) − CA (G′ , X ′ ) =p(s|X ′ ) − p(s|X) + p(s′ |X) − p(s′ |X ′ )+ X (p(u|X ′ ) − p(u|X) + p(u′ |X) − p(u′ |X ′ ))+ u∈W p(t|X) − p(t|X ′ ). Since G′ is a DAG, it holds that there is no directed path from v to s and thus p(s|X ′ ) = p(s|X) and consequently also p(s′ |X ′ ) = p(s′ |X), Moreover, note that p(u|X) = p(u′ |X) and p(u|X ′ ) = p(u′ |X ′ ) holds for all u ∈ W , and p(t|X) ≥ p(t|X ′ ) clearly holds since X ′ ⊆ X. Hence, CA (G′ , X) − CA (G′ , X ′ ) ≥ 0 and therefore X ′ is also an optimal solution not containing v, which proves the claim. Next, we claim that p(t|{s}) = #st (G′ [Vst ])·2−|Est | . To prove this, we define an s-t-scenario S ⊆ Est to be a subset of arcs such that {s, t} ⊆ V (S) and there is a directed path from s to each v ∈ V (S) in G[S]. Let S ∗ := {v → u ∈ Est | v ∈ V (S)} denote the set of all outgoing arcs from nodes in V (S). We denote the set of all s-t-scenarios by Sst . Note that each scenario S constitutes a possible propagation in which exactly the arcs in S activated their endpoints and the arcs in S ∗ \ S did not activate their endpoints. The probability q(S) ∗ for a given s-t-scenario S to occur is thus 2−|S | . Clearly, we can write X X X ∗ ∗ p(t|{s}) = q(S) = 2−|S | = 2−|Est | · 2|Est \S | . S∈Sst S∈Sst S∈Sst Now, for a subset F ⊆ Est of arcs where s is connected to t in the subgraph G′ [F ], let sc(F ) denote the scenario S ∈ Sst where S ⊆ F and S ( S ′ for all S ′ 6= S ∈ Sst such that S ′ ⊆ F . It holds that F = S ∪ F ∗ , where S := sc(F ) P ∗ and F ∗ := F \ S ⊆ Est \ S ∗ . Hence, we have #st (G′ [Vst ]) = S∈Sst 2|Est \S | , which proves the claim. We now decide the instance I as follows. Note that CA (G′ , ∅) = |W | + 1 and CA (G′ , {s}) = |W | + 1 − pz′ + p(t|{s}). Therefore, if I ′ is a “yes”-instance, then {s} is the optimal solution with |W | + 1 − pz′ + p(t|s) ≤ c = |W | + 1 − 2−|Est | , which implies pz′ − p(t|{s}) ≥ 2−|Est | . It follows that #st (G′ [Vst ]) < z ′ . Therefore, I is a “no”-instance. If I ′ is a “no”-instance, then pz′ − p(t|{s}) < 2−|Est | , which implies #st (G′ [Vst ]) ≥ z ′ , hence I is a “yes”-instance. With unlimited budget, however, Effectors becomes fixed-parameter tractable with respect to the parameter number r of probabilistic arcs. Theorem 5. If b = ∞, then Effectors is solvable in O(4r · n4 ) time, where r is the number of probabilistic arcs. Proof. The general idea is to fully determine the probabilistic aspects of the graph, and then to remove all of the corresponding nodes and arcs. We can show that this leaves an equivalent “deterministic graph” that we can solve using a reduction to the problem Maximum Weight Closure, which is itself polynomial-time solvable by a polynomial-time reduction to a flow maximization problem [1, Chapter 19]. 20 Yo V′ X Xp X Vp X Yp X Xo Figure 6: Illustration for Theorem 5. Effectors of a solution are marked with an aura. Probabilistic arcs are dashed, and nodes of Vp (with an outgoing probabilistic arc) are marked with a cross. For readability, target nodes are not represented. Intuitively, the algorithm guesses the partition of Vp into Xp (effectors) and Yp (non-effectors). Node set Xp (respectively, Yp ) is then extended to its closure Xo (respectively, its closure Yo in the reverse graph). The remaining nodes form a deterministic subgraph G[V ′ ], in which effectors, forming the set X ′ , are selected by solving an instance of Maximum Weight Closure. Maximum Weight Closure Input: A directed graph G = (V, E) with weights on the vertices. Compute: A maximum-weight set of vertices X ⊆ V with no arcs going out of the set. We start with some notation (see Figure 6 for an illustration). For an input graph G = (V, E), let Ep := {u → v ∈ E | w(u → v) < 1} denote the set of probabilistic arcs and let Vp := {u | u → v ∈ Ep } denote the set of nodes with at least one outgoing probabilistic arc. For a node v ∈ V , let cldet (v) (cl-1 det (v)) denote the set of all nodes u such that there exists at least one deterministic path from v to u (respectively, from u to v), where a deterministic path is a path containing only deterministic arcs. We extend the notation to subsets V ′ of V S S -1 ′ ′ and write cldet (V ) = v∈V ′ cldet (v) and cldet (V ) = v∈V ′ cl-1 det (v). We call a subset V ′ ⊆ V of nodes deterministically closed if and only if cldet (V ′ ) = V ′ , that is, there are no outgoing deterministic arcs from V ′ to V \ V ′ . Our algorithm will be based on a closer analysis of the structure of an optimal solution. To this end, let G = (V, E, w) be an input graph with a set A ⊆ V of target nodes and let X ⊆ V be an optimal solution with minimum cost CA (G, X). Clearly, we can assume that X is deterministically closed, that is, cldet (X) = X, since we have an infinite budget b = ∞. We write Vp as a disjoint union of Xp := Vp ∩X and Yp := Vp \X. We also use Xo := cldet (Xp ), Yo := cl-1 det (Yp ), and Vo = Xo ∪ Yo . Since X is deterministically closed, we have that Xo ⊆ X and Yo ∩ X = ∅. We write V ′ := V \ Vo and 21 X ′ := X \ Xo = X ∩ V ′ . Note that X ′ is deterministically closed in G[V ′ ] and that G[V ′ ] contains only deterministic arcs. Moreover, note that the sets Xo , Yp , Yo , Vo , and V ′ , are directly deduced from the choice of Xp , and that for a given Xp , the set X ′ can be any deterministically closed subset of V ′ . We first show that the nodes in Vo are only influenced by effectors in Xo , that is, for any node v ∈ Vo , it holds that p(v|X) = p(v|Xo ). This is clear for v ∈ Xo , since in this case p(v|X) = p(v|Xo ) = 1. Assume now that there is a node x ∈ X ′ with a directed path to v ∈ Yo that does not contain any node from Xo (if every directed path from x to v passes through X0 , then clearly x does not influence v). Two cases are possible, depending on whether this path is deterministic. If it is, then, since v ∈ cl-1 det (Yp ), there exists a deterministic path from x to some u ∈ Yp , via v. Hence, x ∈ cl-1 det (Yp ) = Yo , yielding a contradiction. Assume now that the path from x to v has a probabilistic arc and write u → u′ for the first such arc. Hence, x ∈ cl-1 det (u) and u ∈ Vp . Since we assumed that the path does not contain any node from Xo , we have u ∈ / Xp , and therefore u ∈ Yp . Again, we have x ∈ cl-1 (Y ), yielding a contradiction. p det Hence, the nodes in Vo are not influenced by the nodes in X ′ . Now consider the nodes in V ′ . Note that we have p(v|X) = 1 for v ∈ X ′ and p(v|X) = p(v|Xo ) for v ∈ V ′ \ X ′ , since G[V ′ ] is deterministic and X ′ is deterministically closed. Overall, CA (v, X) = CA (v, Xo ) for all v ∈ V \ X ′ . The total cost of solution X can now be written as X X CA (G, X) = CA (v, Xo ) + CA (v, X) v∈V \X ′ v∈X ′ X X = CA (v, Xo ) − v∈V (CA (v, Xo ) − CA (v, X)) v∈X ′ ′ = α(Xo ) − β(Xo , X ), where α(Xo ) := X CA (v, Xo ) and β(Xo , X ′ ) := v∈V X (CA (v, Xo ) − CA (v, X)). v∈X ′ We further define, for all v ∈ V ′ , γ(v, Xo ) := 1−p(v|Xo ) if v ∈ A, and γ(v, Xo ) = p(v|Xo ) − 1 if v ∈ / A. Note that, for v ∈ P X ′ , the difference CA (v, Xo ) − CA (v, X) ′ is exactly γ(v, Xo ), hence β(Xo , X ) = v∈X ′ γ(v, Xo ). The algorithm can now be described directly based on the above formulas. Specifically, we branch over all subsets Xp ⊆ Vp (note that the number of these subsets is upper-bounded by 2r ). For each such subset Xp ⊆ Vp , we can compute Xo and Yo in linear time because this involves propagation only through deterministic arcs (outgoing for Xo and ingoing for Yo ). Then, for each node v ∈ V , we compute p(v|Xo ) using Theorem 2 in O(2r · n(n + m)) time. This yields the values α(Xo ) and γ(v, Xo ) for each v ∈ V ′ . By the discussion above, it remains to select a closed subset X ′ ⊆ V ′ such that the cost CA (G, Xo ∪ X ′ ) = α(Xo ) − β(Xo , X ′ ) is minimized. That is, we have to select the subset X ′ that maximizes the value of β(Xo , X ′ ). Hence, the subset X ′ can 22 Algorithm 2: Pseudocode for Effectors with b = ∞. foreach Xp ⊆ Vp do compute Xo := cldet (Xp ) compute Yo := cl-1 det (Vp \ Xp ) foreach v ∈ V do compute p(v|Xo ) (using Theorem 2) and γ(v, Xo ) compute α(Xo ) compute X ′ maximizing β(Xo , X ′ ) using Maximum Weight Closure on G[V ′ ], with weights γ(v, Xo ) return the Xo ∪ X ′ which gives the minimum α(Xo ) − β(Xo , X ′ ) be computed as the solution of Maximum Weight Closure on G[V ′ ] (which is solved by a maximum flow computation in O(n3 ) time), where the weight of any v ∈ V ′ is γ(v, Xo ). Finally, we return the set Xo ∪ X ′ that yields the minimum cost α(Xo ) − β(Xo , X ′ ). A pseudocode is given in Algorithm 2. 5.3 Special Case: Influence Maximization In this section, we consider the special case of Effectors, called Influence Maximization, where all nodes are targets (A = V ). Note that in this case the variant with unlimited budget and the parameterization by the number of target nodes are irrelevant. In the influence maximization case, on deterministic instances, one should intuitively choose effectors among the “sources” of the influence graph, that is, nodes without incoming arcs (or among strongly connected components without incoming arcs). Moreover, the budget b bounds the number of sources that can be selected, and the cost c bounds the number of sources that can be left out. In the following theorem, we prove that deterministic Effectors remains intractable even if either one of these parameters is small, but, by contrast, having b + c as a parameter yields fixed-parameter tractability in the deterministic case. We mention that the first statement is proven by a reduction from the W[2]-hard Set Cover problem, while the second statement is proven by a reduction from the W[1]-hard Independent Set problem. Theorem 6. 1. Influence Maximization, parameterized by the maximum number b of effectors, is W[2]-hard, even if G is a deterministic (r = 0) DAG. 2. Influence Maximization, parameterized by the cost c, is W[1]-hard, even if G is a deterministic (r = 0) DAG.  3. If r = 0, then Influence Maximization can be solved in O( b+c · (n + b m)) time. Proof. We begin with the first statement, namely, that Influence Maximization (which is equivalent to Effectors where all nodes are target nodes, that 23 is, where A = V ), parameterized by the maximum number b of effectors, is W[2]hard, even if G is a deterministic (r = 0) DAG. We provide a parameterized reduction from the W[2]-complete Set Cover problem [11]. Set Cover Input: Sets S = {S1 , . . . , Sm } over elements U = {u1 , . . . , un }, and parameter h ∈ N. S Question: Is there S ′ ⊆ S such that |S ′ | = h and Si ∈S ′ Si = U ? Given an instance for Set Cover, we create an instance for Influence Maximization as follows. Add a node vSj for each set Sj and write VS = {vSi | Si ∈ S}. Add a node vui for each element ui and write VU = {vui | ui ∈ U }. For each ui ∈ Sj , add an arc vSj → vui with influence probability 1. Set b := h, c := m − h, and A := VS ∪ VU . We can assume that any solution X is such that X ⊆ VS and |X| = b. Note that all nodes of VU are activated if and only if S ′ := {Si | vSi ∈ VS ′ } is a set cover for U . Hence, any solution with cost c = |VS \ X| = m − h needs to pay only for the unselected nodes of VS , and yields a set cover of U . Reversely, for any set cover S ′ for U of size h, the set X := {vSi | Si ∈ S ′ } is a set of effectors with cost at most c. We continue with the second statement, namely, that Influence Maximization, parameterized by the cost c, is W[1]-hard, even if G is a deterministic (r = 0) DAG. We provide a reduction from the following W[1]-complete problem [11]. Independent Set Input: An undirected graph G = (V, E) and parameter k ∈ N. Question: Is there an independent set I ⊆ V (i.e., no edge has both endpoints in I) such that |I| ≥ k? Consider an instance (G = (V, E), k) of Independent Set. Create an influence graph as follows: For each vertex v ∈ V , add a node nv and for each edge e ∈ E, add a node ne . Let NV := {nv | v ∈ V } and NE := {ne | e ∈ E}. Add an arc nv → ne with influence probability 1 for each edge e incident to vertex v in G. Set c := k, b := |V | − k, and A := NV ∪ NE . Consider any solution with cost c. Note that we can assume any optimal solution to choose only nodes from NV , since for any edge e = {u, v} ∈ E it is always better to choose either nv or nu instead of the node ne . Write X ⊆ NV for the set of effectors, NI = NV \ X, and I = {v | nv ∈ NI }. We have |X| ≤ b and |I| = |NI | = |V | − |X| ≥ |V | − b = k = c. Since the cost equals c, it follows that |NI | = c and only the nodes in NI are left inactive. Hence, no edge e has both endpoints in I. That is, I is an independent set of size c = k. Conversely, any independent set I of G directly translates into a set of effectors X = {nv | v ∈ V \ I} for the created influence graph. We finish with the third statement,namely, that if r = 0, then Influence ′ Maximization can be solved in O( b+c b ·(n+m)) time. To start with, let G be the condensation of G (that is, the DAG obtained by contracting each strongly 24 connected component (SCC) of G into one node). Note that since r = 0, we can assume that any minimal solution selects at most one node from each SCC in G. Moreover, it does not matter which node of an SCC is selected since they all lead to the same activations. Hence, in the following, we solve Influence Maximization on the condensation G′ , where selecting a node means to select an arbitrary node in the corresponding SCC in G. Let R denote the set of nodes of G′ with in-degree zero. Note that any node in R not chosen as an effector yields a cost of at least 1 in G, since the nodes in its corresponding SCC cannot be activated by in-neighbors. Hence, we can assume that |R| ≤ b + c, because otherwise the instance is a “no”-instance. Moreover, we can assume that all effectors are chosen from R. Indeed, consider any solution selecting a node u ∈ / R as effector. Then, u has at least one inneighbor v and selecting v instead yields the same number of effectors, while the cost can only be reduced (since at least as many nodes are activated). Since the graph G′ is a DAG, repeating this process yields a solution with smaller cost having only effectors in R. Hence, it is sufficient to enumerate all possible choices of size-b subsets of the b + c nodes in R, and check in polynomial time whether the chosen set of effectors in G yields a cost of at most c. 5.4 Results in Contradiction with Lappas et al. [15]. The following two claims of Lappas et al. [15] are contradicted by the results presented in our work. According to Lappas et al. [15, Lemma 1], in the Influence Maximization case with cost value c = 0, Effectors is NP-complete. The reduction is incorrect: it uses a target node ℓ which influences all other vertices with probability 1 (in at most two steps). It suffices to select ℓ as an effector in order to activate all vertices, so such instances always have a trivial solution (X = {ℓ}), and the reduction collapses. On the contrary, we prove in our Lemma 1 that all instances with c = 0 can be solved in linear time. According to the discussion of Lappas et al. [15] following their Corollary 1, there exists a polynomial-time algorithm for Effectors with deterministic instances (meaning r = 0). Their model coincides with our model in the case of Influence Maximization. However, the given algorithm is flawed: it does not consider the influence between different strongly connected components. Indeed, as we prove in Theorem 6, finding effectors under the deterministic model is NPhard, even in the case of Influence Maximization. 6 Conclusion Inspired by work of Lappas et al. [15], we contributed a fine-grained computational complexity analysis of a “non-monotone version” of finding effectors in networks. Indeed, we argued why we believe this to be at least as natural as the more restricted “monotone model” due to Lappas et al. [15]. A particular case for this is that we may find more robust solutions, that is, solutions that 25 are more resilient against noise. The central point is that, other than Lappas et al. [15], we allow non-target nodes to be effectors as well, motivated by the assumption that knowledge about the state of a node may get lost from time to time (see Section 3 for further discussion). Altogether, we observed that both models suffer from computational hardness even in very restricted settings. For the case of unlimited budget, we believe that both models coincide with respect to solvability and hence with respect to a fine-grained computational complexity classification. Our work is of purely theoretical and classification nature. One message for practical solution approaches we can provide is that it may help to get rid of some probabilistic arcs by rounding them up to 1 (making them deterministic) or rounding them down to 0 (deleting the arcs)—this could be interpreted as some form of approximate computation of effectors. Network structure restrictions seem to be less promising since our hardness results even hold for directed acyclic graphs. Still, there is hope for finding further islands of tractability, for instance by ignoring budget constraints and restricting the degree of randomness. We leave several challenges for future research. First, it remains to prove or disprove 1. Moreover, while we considered most of the parameterizations for most of the variants of the Effectors problem, we have left some work for future research, specifically the parameterized complexity of Effectors where there is infinite budget and arbitrarily-many probabilistic arcs (see the corresponding open question in Table 1). A further, more general direction would be to consider other diffusion models and other cost functions. For example, it is also natural to maximize the probability that precisely the current activation state is achieved when selecting the effectors to be initially active. Moreover, it seems as if the current diffusion model and its somewhat complicated probabilistic nature is one of the main reasons for the intractability of our problem. It would be interesting to consider other diffusion models, possibly simpler ones, and see whether it is possible to push the tractability results to apply for more cases. Specifically, it would be interesting to extend our results concerning the parameter “degree of randomness” to such models. References [1] R. K. Ahuja, T. L. Magnanti, and J. B. Orlin. Network Flows: Theory, Algorithms, and Applications. Prentice Hall, 1993. [2] S. Arora and B. Barak. Computational Complexity: A Modern Approach. Cambridge University Press, 2009. [3] G. Askalidis, R. A. Berry, and V. G. Subramanian. Explaining snapshots of network diffusions: Structural and hardness results. In Proceedings of the 20th International Conference on Computing and Combinatorics, volume 8591 of LNCS, pages 616–625. Springer, 2014. [4] C. Bazgan, M. Chopin, A. Nichterlein, and F. Sikora. Parameterized inap- 26 proximability of target set selection and generalizations. Computability, 3 (2):135–145, 2014. [5] C. Bazgan, M. Chopin, A. Nichterlein, and F. Sikora. Parameterized approximability of maximizing the spread of influence in networks. Journal of Discrete Algorithms, 27:54–65, 2014. [6] O. Ben-Zwi, D. Hermelin, D. Lokshtanov, and I. Newman. Treewidth governs the complexity of target set selection. Discrete Optimization, 8(1): 87–96, 2011. [7] S. Bharathi, D. Kempe, and M. Salek. Competitive influence maximization in social networks. In Proceedings of the Third International Workshop on Internet and Network Economics, volume 4858 of LNCS, pages 306–311. Springer, 2007. [8] M. Chopin, A. Nichterlein, R. Niedermeier, and M. Weller. Constant thresholds can make target set selection tractable. Theory of Computing Systems, 55(1):61–83, 2014. [9] M. Cygan, F. V. Fomin, L. Kowalik, D. Lokshtanov, D. Marx, M. Pilipczuk, M. Pilipczuk, and S. Saurabh. Parameterized Algorithms. Springer, 2015. [10] P. Domingos and M. Richardson. Mining the network value of customers. In Proceedings of the Seventh ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 57–66. ACM, 2001. [11] R. G. Downey and M. R. Fellows. Fundamentals of Parameterized Complexity. Springer, 2013. [12] M. R. Fellows, D. Hermelin, F. Rosamond, and S. Vialette. On the parameterized complexity of multiple-interval graph problems. Theoretical Computer Science, 410(1):53–61, 2009. [13] J. Flum and M. Grohe. Parameterized Complexity Theory. Springer, 2006. [14] D. Kempe, J. M. Kleinberg, and É. Tardos. Maximizing the spread of influence through a social network. Theory of Computing, 11:105–147, 2015. [15] T. Lappas, E. Terzi, D. Gunopulos, and H. Mannila. Finding effectors in social networks. In Proceedings of the 16th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 1059–1068. ACM, 2010. [16] A. Nichterlein, R. Niedermeier, J. Uhlmann, and M. Weller. On tractable cases of target set selection. Social Network Analysis and Mining, 3(2): 233–256, 2013. [17] R. Niedermeier. Invitation to Fixed-Parameter Algorithms. Oxford University Press, 2006. 27 [18] L. G. Valiant. The complexity of enumeration and reliability problems. SIAM Journal on Computing, 8(3):410–421, 1979. [19] C. Wang, W. Chen, and Y. Wang. Scalable influence maximization for independent cascade model in large-scale social networks. Data Mining and Knowledge Discovery, 25(3):545–576, 2012. 28
8cs.DS
A method for the online construction of the set of states of a Markov Decision Process using Answer Set Programming arXiv:1706.01417v1 [cs.AI] 5 Jun 2017 Leonardo A. Ferreira1 , Reinaldo A. C. Bianchi2 , Paulo E. Santos2 , Ramon Lopez de Mantaras3 1 Universidade Metodista de São Paulo, São Bernardo do Campo, Brazil. 2 Centro Universitário FEI, São Bernardo do Campo, Brazil. 3 IIIA-CSIC, Bellaterra, España. [email protected], {rbianchi,psantos}@fei.edu.br, [email protected] Abstract Non-stationary domains, that change in unpredicted ways, are a challenge for agents searching for optimal policies in sequential decision-making problems. This paper presents a combination of Markov Decision Processes (MDP) with Answer Set Programming (ASP), named Online ASP for MDP (oASP(MDP)), which is a method capable of constructing the set of domain states while the agent interacts with a changing environment. oASP(MDP) updates previously obtained policies, learnt by means of Reinforcement Learning (RL), using rules that represent the domain changes observed by the agent. These rules represent a set of domain constraints that are processed as ASP programs reducing the search space. Results show that oASP(MDP) is capable of finding solutions for problems in non-stationary domains without interfering with the action-value function approximation process. 1 Introduction A key issue in Artificial Intelligence (AI) is to equip autonomous agents with the ability to operate in changing domains by adapting the agents’ processes at a cost that is equivalent to the complexity of the domain changes. This ability is called elaboration tolerance [McCarthy, 1987; McCarthy, 1998]. Consider, for instance, an autonomous robot learning to navigate in an unknown environment. Unforeseen events may happen that could block passages (or open previously unavailable ones). The autonomous agent should be able to find new solutions in this changed domain using the knowledge previously acquired plus the knowledge acquired from the observed changes in the environment, without having to operate a complete code-rewriting, or start a new cycle of domain-exploration from scratch. Reinforcement Learning (RL) is an AI framework in which an agent interacts with its environment in order to find a sequence of actions (a policy) to perform a given task [Sutton and Barto, 2015]. RL is capable of finding optimal solutions to Markov Decision Processes (MDP) without assuming total information about the problem’s domain. However, in spite of having the optimal solution to a particu- lar task, a RL agent may still perform poorly on a new task, even if the latter is similar to the former [Garnelo et al., 2016]. Therefore, Reinforcement Learning alone does not provide elaboration-tolerant solutions. Non-monotonic reasoning can be used as a tool to increase the generality of domain representations [McCarthy, 1987] and may provide the appropriate element to build agents more adaptable to changing situations. In this work we consider Answer Set Programming (ASP) [Gelfond and Lifschitz, 1988; Lifschitz, 2002], which is a declarative non-monotonic logic programming language, to bridge the gap between RL and elaboration tolerant solutions. The present paper tackles this problem by introducing a novel algorithm: Online ASP for MDP (oASP(MDP)), that updates previously obtained policies, learned by means of Reinforcement Learning (RL), using rules that represent the domain changes as observed by the agent. These rules are constructed by the agent in an online fashion (i.e., as the agent perceives the changes) and they impose constraints on the domain states that are further processed by an ASP engine, reducing the search space. Tests performed in non-stationary non-deterministic grid worlds show that, not only oASP(MDP) is capable of finding the action-value function for an RL agent and, consequently, the optimal solution, but also that using ASP does not hinder the performance of a learning agent and can improve the overall agent’s performance. To model an oASP(MDP) learning agent (Section 3), we propose the combination of Markov Decision Processes and Reinforcement Learning (Section 2.1) with ASP (Section 2.2). Tests were performed in two different nonstationary non-deterministic grid worlds (Section 4), whose results show a considerable increase in the agent’s performances when compared with a RL base algorithm, as presented in Sections 4.1 and 4.2. 2 Background This section introduces Markov Decision Processes (MDP), Reinforcement Learning (RL) and Answer Set Programming (ASP) that are the foundations of the work reported in this paper. 2.1 MDP and Reinforcement Learning In a sequential decision making problem, an agent is required to execute a series of actions in an environment in order to find the solution of a given problem. Such sequence of actions, that forms a feasible solution, is known as a policy (π) which leads the agent from an initial state to a goal state [Bellman, 1957; Bellman and Dreyfus, 1971]. Given a set of feasible solutions, an optimal policy π ∗ can be found by using Bellman’s Principle of Optimality [Bellman and Dreyfus, 1971], which states that “an optimal policy has the property that whatever the initial state and initial decision are, the remaining decisions must constitute an optimal policy with regard to the state resulting from the first decision”; π ∗ can be defined as the policy that maximises/minimises a desired reward/cost function. A formalisation that can be used to describe sequential decision making problems is a Markov Decision Process (MDP) that is defined as a tuple hS, A, T , Ri, where: • S is the set of states that can be observed in the domain; • A is the set of actions that the agent can execute; • T : S × A × S 7→ [0, 1] is the transition function that provides the probability of, being in s ∈ S and executing a ∈ A, reaching the future state s0 ∈ S; • R : S × A × S 7→ R is the reward function that provides a real number when executing a ∈ A in the state s ∈ S and observing s0 ∈ S as the future state. One method that can be used to find an optimal policy for MDPs, which does not need a priori knowledge of the transition and reward functions, is the reinforcement learning model-free off-policy method known as QLearning [Watkins, 1989; Sutton and Barto, 2015]. Given an MDP M, Q-Learning learns while an agent interacts with its environment by executing an action at in the current state st and observing both the future state st+1 and the reward rt+1 . With these observations, Q-Learning updates an action-value function Q(s, a) using Q(st , at ) ← Q(st , at )+α.(rt+1 +γ. max Q(st+1 , a)−Q(st , at )), a where α is the learning rate and γ is a discount factor. By using these reward values to approximate a Q(s, a) function that maps a real value to pairs of states and actions, Q-Learning is capable of finding π ∗ which maximises the reward function. Since Q-Learning is a well-known and largely used RL method, we omit its detailed description here, which can be found in [Watkins, 1989; Sutton and Barto, 2015]. Although Q-Learning does not need information about T and R, it still needs to know the set S of states before starting the interaction with the environment. For finding this set, this work uses Answer Set Programming. 2.2 Answer Set Programming Answer Set Programming (ASP) is a declarative nonmonotonic logic programming language that has been successfully used for NP-complete problems such as planning [Lifschitz, 2002; Zhang et al., 2015; Yang et al., 2014]. An ASP rule is represented as A ← L1 , L2 , . . . , Ln (1) where A is an atom (the head of the rule) and the conjunction of literals L1 , L2 , . . . , Ln is the rule’s body. An ASP program Π is a set of rules in the form of Formula 1. ASP is based on the stable model semantics of logic programs [Gelfond, 2008]. A stable model of Π is an interpretation that makes every rule in Π true, and is a minimal model of Π. ASP programs are executed by computing stable models, which is usually accomplished by inference engines called answer set solvers [Gelfond, 2008]. Two important aspects of ASP are its third truth value for unkown, along with true and false, and its two types of negation: strong (or classical) negation and weak negation, representing negation as failure. As it is defined over stable models semantics, ASP respects the rationality that one shall not believe anything one is not forced to believe [Gelfond and Lifschitz, 1988]. Although ASP does not allow explicit reasoning with or about probabilities, ASP’s choice rules are capable of generating distinct outcomes for the same input. I.e., given a current state s and an action a, it is possible to describe in an ASP logic program states s1, s2 and s3 as possible outcomes of executing a in s as “1{ s1, s2, s3 }1 :a, s.”. Such choice rules can be read as “given that s and a are true, choose at least one and at maximum of one state from s1, s2 and s3”. Thus, the answer sets [s, a, s1], [s, a, s2] and [s, a, s3] represent the possible transitions that are the effects of executing action a on state s. This work assumes that for each state s ∈ S there is an ASP logic program with choice rules describing the consequences of each action a ∈ As (where As ⊆ A is the set of actions for the state s). ASP programs can also be used to represent domain constraints: the allowed or forbidden states or actions. In this context, to find a set S of an MDP and its Q(s, a) function is to find every answer set for every state that the agent is allowed to visit, i.e. every allowed transition for each state-action pair. In this paper ASP is used to find the set of states S of an MDP and Q-Learning is used to approximate Q(s, a) without assuming prior knowledge of T and R. The next section describes this idea in more details. 3 Online ASP for MDP: oASP(MDP) Given sets S and A of an MDP, a RL method M can approximate an action-value function Q(s, a). If S is constructed state by state while the agent is interacting with the world, M is still able to approximate Q(s, a), as it only uses the current and past states for that. By using choice rules in ASP, it is possible to describe a transition t(s, a, s0 ) in the form 1{s’}1 :- a for each action a ∈ As and each state s ∈ S. By describing possible transitions for each action in each state as a logic program, an ASP engine can be used to provide a set of observed states So , a set of actions As for each state and, finally, an action-value function defined from the interaction with the environment, that can be used to further operate in this environment. This is the essence of the oASP(MDP) method, represented in Algorithm 1. In order to illustrate oASP(MDP) (Algorithm 1), let’s consider the grid world in Figure 1, and an oASP(MDP) agent, initially located at the state “S” (blue cell in the grid), that is capable of executing any action in the following set: A ={ 1 Algorithm: oASP(MDP) G W Input: The set of actions A, an action-value function approximation method M and a number of episodes n. Output: The approximated Q(s, a) function. 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Initialize the set of observed states So = ∅ while number of episodes performed is less than n do repeat Observe the current state s if s 6∈ So then Add s to the set of states So . Choose and execute a random action a ∈ A. Observe the future state s0 . Update state s logic program with observed transition adding a choice rule. Update Q(s, a)’s description by finding every answer set for each state s added to So in this episode. else Choose an action a ∈ A as defined by M . Execute the chosen action a. Observe the future state s0 . end Update Q(s, a)’s value as defined by M . Update the current state s ← s0 . until the end of the episode end Algorithm 1: The oASP(MDP) Algorithm. go up, go down, go left, go right}. This grid world has walls (represented by the letter “W”), that are cells where the agent cannot occupy and through which it is unable to pass. If an agent moves toward a wall (or toward an external border of the grid) it stays at its original location. When the interaction with the environment starts, the agent has only information about the set of actions A. The set of observed states So is initially empty. At the beginning of the agent’s interactions with the environment, the agent observes the initial state s0 and verifies if it is in So . Since s0 6∈ So , the agent adds s0 to So (line 7 of Algorithm 1) and executes a random action, let this action be go up. As a consequence of this choice, the agent moves to a new state s1 (the cell above S) and receives a reward r0. At this moment, the agent has information about the previous state, allowing it to write the choice rule “1{s1}1 : − s0, go up” as an ASP logic program. In this first interaction, the only answer set that can be found for this choice rule is “[s0, go up, s1]”. With this information the agent can initialize a Q(s0, go up) and update this value using the reward r0 (line 17). After this first interaction, the agent is in the state s1 (the cell above S). Again, this is an unknown state (s1 6∈ So ), thus, as with the previous state, the agent adds s1 to So , chooses a random action, let it be go up again, and executes this action in the environment. By performing go up in this state, the agent hits a wall and stays in the same state. With W W W W W W W W W W W W W S W w W Figure 1: Example of a randomly generated grid world. this observation, the agent writes the choice rule “1{s1}1 : − s1, go up” and updates the value of Q(s1, go up) using the received reward r1. Since the agent is in the same state as in the previous interaction, it knows the consequence of the action go up in this state, but has no information about any other actions for this state. At this moment, the agent selects an action using the action-selection function defined by the learning method M and executes it in the environment. For example, let it choose go down, returning to the blue cell (S). The state s1 has now two choice rules: “1{s1}1 : − s1, go up” and “1{s0}1 : − s1, go down” which lead to the answer sets “[s1, go up]” and “[s1, go down, s0]” respectively. Once again, the agent updates the Q(s1, go up) function using the method described in M with the reward r2 received. After this transition, the agent finds itself once again in the initial state and continues the domain exploration just described. If, for example, the agent chooses to execute the action go up again, but due to the non-deterministic nature of the environment, the agent goes to the state on the right of the blue square, then a new state s2 is observed and the choice rule for the previous state is updated to “1{s1, s2}1 : − s0, go up”. The answer sets that can be found considering this choice rule are “[s0, go up, s1]” and “[s0, go up, s2]”. With the reward r3 received, the agent updates the value of Q(s0, go up). The learning process of oASP(MDP) continues according to the chosen action-value function approximation method (from line 12 onwards). After a number of interactions with the environment, the oASP(MDP) agent has executed every possible action in every state that is possible to be visited and has the complete environment description. Note that this method excludes states of the MDP that are unreachable by the agent, which improves the efficiency of a RL agent in cases that the environment imposes state constrains (as we shall see in the next section). The next section presents the tests applied to evaluate oASP(MDP) implemented with Q-Learning as the actionvalue function approximation method M . 4 Tests and Results The oASP(MDP) algorithm was evaluated with tests performed in non-deterministic, non-stationary, grid-world domains. Two test sets were considered where, in each set, one of the following domain variables was randomly changed: the number and location of walls in the grid (first test, Section 4.1), and the transition probabilities (second test, Section 4.2). Four actions were allowed in the test domains considered in this work: go up, go down, go left and go right. Each action has a predefined probability of conducting the agent in the desired direction and also for moving the agent to an orthogonal (undesired) location. The transition probability for each action depends on the grid world and will be defined for each test, as described below. In all tests, the initial state was fixed at the lower-leftmost square (e.g., cell ‘S’ in Fig. 1) and the goal state fixed in the upper-rightmost square (e.g., cell ‘G’ in Fig. 1). In the test domains, walls were distributed randomly in the grid as obstacles. For each grid, the ratio of walls per grid size is defined. The initial and goal states are the only cells that do not accept obstacles. Wall’s placement in the grid changed at the 1000th and 2000th episodes during each test trial. An example of a grid used in this work is shown in Figure 1. Results show the data obtained from executing Q-Learning and oASP(MDP) (with Q-Learning as the action-value function approximation method) in the same environment configuration. The values used for the learning variables were: learning rate α = 0.2, discount factor γ = 0.9, exploration/exploitation rate for the -greedy action selection method:  = 0.1 and the maximum number of steps before an episode is finished was 1000. In each test, three variables were used to compare QLearning and oASP(MDP). First, the root-mean-square deviation (RMSD), that provides information related to the convergence of the methods by comparing values of the Q(s, a) function in the current episode with respect to that obtained in the previous episode. Second, we considered the return (sum of the rewards) received in an episode. Third, the number of steps needed to go from the initial state to the goal state was evaluated. The results obtained were also compared with that of an agent using the optimal policy in a deterministic grid world (the best performance possible, shown as a red-dashed line in the results below). For oASP(MDP), the number of state-action pairs known by the agent was also measured and compared with the size of Q-Learing’s fixed Q(s, a) tabular implementation. This variable provides information of how far an oASP(MDP) agent is from knowing the complete environment along with how much the Q(s, a) function could be reduced. The test domains and related results are described in details in the next sections. 4.1 First test: changes in the wall–free-space ratio In the first test, the size of the grid was fixed to 10×10 and the transition probabilities were assigned at 90% for moving on the desired direction and 5% for moving in each of the two directions that are orthogonal to the desired. In this test, changes in the environment occurred in the number and location of walls in the grid. Initially the domain starts with no walls (0%), then it changes to a world where 10% of the grid is occupied by walls placed at random locations and, finally, the grid world changes to a situation where 25% of the grid is occupied by walls. Each change occurs after 1000 episodes. The results obtained in the first test are represented in Figure 2. Figure 2a shows that the RMSD values of oASP(MDP) decrease faster than those of Q-Learning, thus converging to the optimal policy ahead of Q-Learning. It is worth observing that when a change occurs in the environment (at episodes 1000 and at 2000) there is no increase in oASP(MDP) RMSD values, contrasting with the significant increase in Q-Learning’s values. A similar behaviour is shown in Figure 2c, where there is no change in the number of steps of oASP(MDP) after a change occurs, at the same time that Qlearning number of steps increase considerably at that point. The return values obtained in this test are shown in Figure 2b, where it can be observed that both oASP(MDP) and Q-learning reach the maximum value together during the initial episodes, but there is no reduction in the return values of oASP(MDP) when the environment changes, whereas Qlearning returns drop to the initial figures. Figure 2d shows the number of state-action pairs that oASP(MDP) has found for the grid world. Values obtained after the 15th episode were omitted since they presented no variation. This figure shows that oASP(MDP) has explored every state of the grid world and performed every action allowed in each state, resulting in a complete description of the environment. Since oASP(MDP) has provided the complete description of the environment, the agent that uses oASP(MDP) optimizes the same action-value function as the agent that uses Q-Learning, thus the optimal policy found by both agents is the same. Due to the exploration of the environment performed in the beginning of the interaction, before the 10th episode the agent has executed every action in every possible state at least once and, as can be seen in line 7 of Algorithm 1, the agent then uses the underlying RL procedure to find the action-value function. 4.2 Second test: changes in the transition probabilities In this test, the grid was fixed at a 10×10 size, with wall– free-space ratio fixed at 25%. Changes in the environment occurred with respect to the transition probabilities. Initially, the agent’s actions had 50% of probability for moving the agent in the desired direction and 25% for moving it in each of the two orthogonal directions. The first change set the probabilities at 75% (assigned to the desired action effect) and 12.5% (for the directions orthogonal to the desired). The final change assigned 90% for moving in the desired direction and 5% for moving in each of the orthogonal directions. The RMSD values for oASP(MDP), in this case, decreased faster than those of Q-Learning, reaching zero before the first change occurred, while Q-Learning at that point had not yet converged, as shown in Figure 3a. Analogously to the first test, there is no change in RMSD values of oASP(MDP) when the environment changes, whereas Q-learning presents re-initializations. In the results on return and the number of steps, shown in Figures 3b and 3c respectively, the performance of oASP(MDP) improves faster than the Q-Learning performance when there is a change in the environment. This is explained by the fact that, after oASP(MDP) approxi- mates the action-value function (in the periods between the changes), when a change occurs, the information about it, acquired by the agent, is used to find solutions in the new world situation. In this case, the current action-value function is simply updated. Q-Learning, on the other hand, is restarted at each time a change occurs, resulting in the application of an inefficient policy in the new environment. The number of state-action pairs that oASP(MDP) was able to describe is shown in Figure 3d. Once more, values obtained after the 15th episode were omitted, as they present no variation after this point. Analogous to the results obtained in the first experiment, oASP(MDP) was capable of executing at least once every allowed action in every state possible to be visited. As before, by exploring the environment oASP(MDP) could efficiently find the set of allowed states, defining the complete Q(s, a). In summary, the tests performed in the domains considered show that the information previously obtained is beneficial to an agent that learns by interacting with a changing environment. The action-value function obtained by oASP(MDP) before a change occurs accelerates the approximation of this function in a new version of the environment, avoiding the various re-initializations observed in Q-learning alone (as shown in Figures 2 and 3). However, as the action-value function approximation method used in oASP(MDP) (in this work) was Q-Learning, the policies learnt by oASP(MDP) and Q-Learning alone were analogous. This can be observed when comparing the curves for oASP(MDP) and Q-Learning in Figures 2 and 3 after convergence, noticing also that they keep the same distance with respect to the best performance possible (red-dashed lines in the graphs). Tests were performed in virtual machines in AWS EC2 with t2.micro configuration, which provides one virtual core of an Intel Xeon at 2.4GHz, 1GB of RAM and 8GB of SSD with standard Debian 8 (Jessie). oASP(MDP) was implemented in Python 3.4 using ZeroMQ for providing messages exchanges between agent and environment and Clingo [Gebser et al., 2013] was used as the ASP Engine. The source code for the tests can be found in the following (anonymous) URL: http://bit.ly/2k03lkl. 5 Related Work Previous attempts at combining RL with ASP include [Zhang et al., 2015], which proposes the use of ASP to find a predefined plan for a RL agent. This plan is described as a hierarchical MDP and RL is used to find the optimal policy for this MDP. However, changes in the environment, as used in the present work, were not considered in [Zhang et al., 2015]. Analogous methods were proposed by [Khandelwal et al., 2014; Yang et al., 2014], in which an agent interacts with an environment and updates an action’s cost function. While [Khandelwal et al., 2014] uses the action language BC, [Yang et al., 2014] uses ASP to find a description of the environment. Although both methods consider action costs, none of them uses Reinforcement Learning and they do not deal with changes in the action-value function description during the agent’s interaction with the environment. An approach to non-deterministic answer set programs is P-Log [Baral et al., 2009; Gelfond and Rushton, 2010]. While P-Log is capable of calculating transition probabilities from sampling, it is not capable of using this information to generate policies. Also P-Log does not consider action costs. Thus, although P-Log can be used to find the transition function, it cannot find the optimal solution, as proposed here. Works related to non-stationary MDPs such as [Even-Dar et al., 2009; Yu et al., 2009], which deal only with changes in reward function, are more associated with RL alone than with a hybrid method such as oASP(MDP), since RL methods are already capable of handling changes in the reward and transition functions. The advantage of ASP is to find the set of states so that it is possible to search for an optimal solution regardless of the agent’s transition and reward functions. A proposal that closely resembles oASP(MDP) is [Garnelo et al., 2016]. This method proposes the combination of deep learning to find a description to a set of states, which are then described as rules to a probabilistic logic program and, finally, a RL agent interacts with the environment using the results and learns the optimal policy. 6 Conclusion This paper presented the method oASP(MDP) for approximating action-value functions of Markov Decision Processes, in non-stationary domains, with unknown set of states and unknown transition and reward functions. This method is defined on a combination of Reinforcement Learning (RL) and Answer Set Programming (ASP). The main advantage of RL is that it does not need a priori knowledge of transition and reward functions, but it relies on having a complete knowledge to the set of domain states. In oASP(MDP), ASP is used to construct the set of states of an MDP to be used by a RL algorithm. ASP programs representing domain states and transitions are obtained as the agent interacts with the environment. This provides an efficient solution to finding optimal policies in changing environments. Tests were performed in two non-stationary nondeterministic grid-world domains, where each domain had one property of the grid world changed over time. In the first domain, the ratio of obstacles and free space in the grid was changed, whereas in the second domain changes occurred in the transition probabilities. The changes happened in intervals of 1000 episodes in both domains. Results show that, when a change occurs, oASP(MDP) (with Q-learning as the action-value function) is capable of approximating the Q(s, a) function faster than Q-learning alone. Therefore, the combination of ASP with RL was effective in the definition of a method that provides more general (or more elaboration tolerant) solutions to changing domains than RL methods alone. Future work will be directed toward the development of an interface to facilitate the use of oASP(MDP) with distinct domains, such as those provided by the DeepMind Lab [Beattie et al., 2016]. Also, a comparison of oASP(MDP) with the framework proposed in [Garnelo et al., 2016] is an interesting subject for future research. 10 10 Optimal Policy π ∗ oASP(MDP) Q-Learning 8 8 6 RMSD RMSD 6 4 4 2 2 0 0 Optimal Policy π ∗ oASP(MDP) Q-Learning 2 0 500 1000 1500 Episodes 2000 2500 3000 0 500 (a) RMSD. 1000 1500 Episodes 2000 2500 3000 (a) RMSD. 90 90 80 80 70 60 Return Return 70 60 Optimal Policy π ∗ oASP(MDP) Q-Learning 50 40 30 50 40 20 Optimal Policy π ∗ oASP(MDP) Q-Learning 0 500 1000 1500 Episodes 2000 2500 10 0 3000 0 500 (b) Return. 1000 1500 Episodes 2000 2500 3000 (b) Return. 60 100 90 50 80 70 Steps Steps 40 30 Optimal Policy π ∗ oASP(MDP) Q-Learning 60 50 40 20 30 Optimal Policy π ∗ oASP(MDP) Q-Learning 10 0 500 1000 20 1500 Episodes 2000 2500 3000 10 0 500 1000 1500 Episodes 2000 2500 (c) Number of steps. (c) Number of steps. (d) Numbers of state-action pairs. (d) Number of state-action pairs. Figure 2: Results for the first test. Figure 3: Results for the second test. 3000 References [Baral et al., 2009] Chitta Baral, Michael Gelfond, and Nelson Rushton. Probabilistic reasoning with answer sets. Theory and Practice of Logic Programming, 9(1):57, 2009. [Beattie et al., 2016] Charles Beattie, Joel Z. Leibo, Denis Teplyashin, Tom Ward, Marcus Wainwright, Heinrich Küttler, Andrew Lefrancq, Simon Green, Vı́ctor Valdés, Amir Sadik, Julian Schrittwieser, Keith Anderson, Sarah York, Max Cant, Adam Cain, Adrian Bolton, Stephen Gaffney, Helen King, Demis Hassabis, and Stig Petersen Shane Legg. Deepmind lab. arXiv preprint arXiv:1612.03801v2 [cs.AI], December 2016. [Bellman and Dreyfus, 1971] Richard Ernest Bellman and Stuart E. Dreyfus. Applied dynamic programming. Princeton Univ. Press, 4 edition, 1971. [Bellman, 1957] Richard Bellman. A Markovian decision process. Indiana University Mathematics Journal, 6(4):679–684, 1957. [Even-Dar et al., 2009] Eyal Even-Dar, Sham. M. Kakade, and Yishay Mansour. Online markov decision processes. Mathematics of Operations Research, 34(3):726– 736, 2009. [Garnelo et al., 2016] Marta Garnelo, Kai Arulkumaran, and Murray Shanahan. Towards deep symbolic reinforcement learning. arXiv preprint arXiv:1609.05518 [cs], September 2016. [Gebser et al., 2013] Martin Gebser, Roland Kaminski, and Benjamin Kaufmann. Answer set solving in practice. Morgan & Claypool Publishers, 2013. [Gelfond and Lifschitz, 1988] Michael Gelfond and Vladimir Lifschitz. The stable model semantics for logic programming. In Robert Kowalski, Bowen, and Kenneth, editors, Proceedings of International Logic Programming Conference and Symposium, pages 1070–1080. MIT Press, 1988. [Gelfond and Rushton, 2010] Michael Gelfond and Nelson Rushton. Causal and probabilistic reasoning in P-log. Heuristics, Probabilities and Causality. A tribute to Judea Pearl, pages 337–359, 2010. [Gelfond, 2008] Michael Gelfond. van Harmelen, Frank; Lifschitz, Vladimir; Porter, Bruce. Handbook of Knowledge Representation, chapter Answer sets, page 285–316. Elsevier, 2008. [Khandelwal et al., 2014] Piyush Khandelwal, Fangkai Yang, Matteo Leonetti, Vladimir Lifschitz, and Peter Stone. Planning in action language BC while learning action costs for mobile robots. In Proceedings of the Twenty-Fourth International Conference on Automated Planning and Scheduling, ICAPS 2014, Portsmouth, New Hampshire, USA, June 21-26, 2014, 2014. [Lifschitz, 2002] Vladimir Lifschitz. Answer set programming and plan generation. Artificial Intelligence, 138(1):39–54, 2002. [McCarthy, 1987] John McCarthy. Generality in artificial intelligence. Communications of the ACM, 30(12):1030– 1035, 1987. [McCarthy, 1998] John McCarthy. Elaboration tolerance. In Proc. of the Fourth Symposium on Logical Formalizations of Commonsense Reasoning (Common Sense 98), volume 98, London, UK, 1998. [Sutton and Barto, 2015] Richard S Sutton and Andrew G Barto. Reinforcement learning an introduction – Second edition, in progress (Draft). MIT Press, 2015. [Watkins, 1989] Christopher J. C. H. Watkins. Learning from deSuttonlayed rewards. PhD thesis, University of Cambridge England, 1989. [Yang et al., 2014] Fangkai Yang, Piyush Khandelwal, Matteo Leonetti, and Peter Stone. Planning in answer set programming while learning action costs for mobile robots. In AAAI Spring 2014 Symposium on Knowledge Representation and Reasoning in Robotics (AAAI-SSS), 2014. [Yu et al., 2009] Jia Yuan Yu, Shie Mannor, and Nahum Shimkin. Markov decision processes with arbitrary reward processes. Mathematics of Operations Research, 34(3):737–757, 2009. [Zhang et al., 2015] Shiqi Zhang, Mohan Sridharan, and Jeremy L. Wyatt. Mixed logical inference and probabilistic planning for robots in unreliable worlds. IEEE Transactions on Robotics, 31(3):699–713, 2015.
2cs.AI
Generative Adversarial Perturbations Omid Poursaeed1,2 Isay Katsman1 Bicheng Gao3,1 Serge Belongie1,2 1 2 3 Cornell University Cornell Tech Shanghai Jiao Tong University arXiv:1712.02328v2 [cs.CV] 4 Apr 2018 {op63,isk22,bg455,sjb344}@cornell.edu Abstract iterative approaches proposed in the literature, we consider trainable networks for learning the universal perturbation. From another viewpoint, adversarial attacks can be categorized as targeted and non-targeted. In targeted adversarial attacks, we seek adversarial images that can change the prediction of a model to a specific target label. In nontargeted attacks we want to generate adversarial examples for which the model’s prediction is any label other than the ground-truth label. Considering all the possible combinations, we can have four types of adversarial examples: targeted universal, non-targeted universal, targeted imagedependent and non-targeted image-dependent. We elaborate on each of them in the following sections. Our main contributions can be summarized as follows: In this paper, we propose novel generative models for creating adversarial examples, slightly perturbed images resembling natural images but maliciously crafted to fool pre-trained models. We present trainable deep neural networks for transforming images to adversarial perturbations. Our proposed models can produce image-agnostic and image-dependent perturbations for targeted and nontargeted attacks. We also demonstrate that similar architectures can achieve impressive results in fooling both classification and semantic segmentation models, obviating the need for hand-crafting attack methods for each task. Using extensive experiments on challenging high-resolution datasets such as ImageNet and Cityscapes, we show that our perturbations achieve high fooling rates with small perturbation norms. Moreover, our attacks are considerably faster than current iterative methods at inference time. • We present a unifying framework for creating universal and image-dependent perturbations for both classification and semantic segmentation tasks, considering targeted and non-targeted attacks with L∞ and L2 norms as the metric. 1. Introduction • We improve the state-of-the-art performance in universal perturbations by leveraging generative models in lieu of current iterative methods. In spite of their impressive performance on challenging tasks in computer vision such as image classification [25, 49, 51, 52, 20] and semantic segmentation [30, 5, 9, 59, 60], deep neural networks are shown to be highly vulnerable to adversarial examples, i.e. carefully crafted samples looking similar to natural images but designed to mislead a pretrained model. This phenomenon was first studied in [53], and may hinder the applications of deep networks on visual tasks, or pose security concerns. Two types of adversarial perturbations can be considered: Universal and Image-dependent. Image-dependent perturbations can vary for different images in the dataset. To generate these perturbations, we require a function which takes a natural image, and outputs an adversarial image. We approximate this function with a deep neural network. Universal perturbations are fixed perturbations which when added to natural images can significantly degrade the accuracy of the pre-trianed network. In this case, we seek a perturbation U with small magnitude such that for most natural images x, x + U can fool the pre-trained model. Unlike the • We are the first to present effective targeted universal perturbations. This is the most challenging task as we are constrained to have a single perturbation pattern and the prediction should match a specific target. • Our attacks are considerably faster than iterative and optimization-based methods at inference time. We can generate perturbations in the order of milliseconds. 2. Related Work 2.1. Universal Perturbations First introduced in [35], universal perturbations are fixed perturbations which after being added to natural images can mislead a pre-trained model for most of the images. The algorithm in [35] iterates over samples in a target set, and gradually builds the universal perturbation by aggregating image-dependent perturbations and normalizing the result. 1 [38] presents a data independent approach for generating image-agnostic perturbations. Its objective is to maximize the product of mean activations at multiple layers of the network when the input is the universal perturbation. While this method obviates the need for training data, the results are not as strong as [35]. A method for generating targeted universal adversarial perturbations for semantic segmentation models is presented in [34]. Their approach is similar to [35] in that they also create the universal perturbation by adding image-dependent perturbations and clipping the result to limit the norm. [36] proposes a quantitative analysis of the robustness of classifiers to universal perturbations based on the geometric properties of decision boundaries. A defense method against universal adversarial perturbations is proposed in [1]. It learns a Perturbation Rectifying Network (PRN) from real and synthetic universal perturbations, without needing to modify the target model. 2.2. Image-dependent Perturbations Various approaches have been proposed for creating image-dependent perturbations. Optimization-based methods such as [53] and [8] define a cost function based on the perturbation norm and the model’s loss. Then they use gradient ascent in pixel space with optimizers such as L-BFGS or Adam [24] to create the perturbation. While these approaches yield better results than other methods, they are slow at inference time as they need to forward the input to the model several times. [18] proposes a Fast Gradient Sign Method (FGSM) to generate adversarial examples. It computes the gradient of the loss function with respect to pixels, and moves a single step based on the sign of the gradient. While this method is fast, using only a single direction based on the linear approximation of the loss function often leads to sub-optimal results. Based on this work, [37] presents an iterative algorithm to compute the adversarial perturbation by assuming that the loss function can be linearized around the current data point at each iteration. [26] introduces the Iterative Least-Likely Class method, an iterative gradient-based method choosing the least-likely prediction as the desired class. This method is applied to ImageNet in [27]. It also discusses how to effectively include adversarial examples in training to increase model’s robustness. [11] proposes a method for directly optimizing performance measures, even when they are combinatorial and non-decomposable. [39] generates images unrecognizable to humans but classified with high confidence as members of a recognizable class. It uses evolutionary algorithms and gradient ascent to fool deep neural networks. Our work bears a resemblance to [6] in that it also considers training a network for generating adversarial examples. However, [6] does not provide a fixed bound on the perturbation magnitude, which might make perturbations detectable at inference time. It is also limited to targeted image-dependent perturbations. [58] extends adversarial examples from the task of image classification to semantic segmentation and object detection. For each image, it applies gradient ascent in an iterative procedure until the number of correctly predicted targets becomes zero or a maximum iteration is reached. Similar to [53] and [8], this method suffers from being slow at inference time. [2] evaluates the robustness of segmentation models against common attacks. [31] suggests that adversarial examples are sensitive to the angle and distance at which the perturbed picture is viewed. [4] presents a method for generating adversarial examples that are robust across various transformations. Several methods have been proposed for defending against adversarial attacks. While our focus is on efficient attacks, we refer the reader to [33, 57, 19, 47, 32, 50, 48, 54, 3, 13, 44, 16, 55, 45, 42, 56] for recent works on defense. 3. Generative Adversarial Perturbations Consider a classification network K trained on natural images from C different classes. It assigns a label K(x) ∈ {1, . . . , C} to each input image x1 . We assume that images are normalized to [0, 1] range. Let N ⊂ [0, 1]n represent the space of natural images2 . We assume that K achieves a high accuracy on natural images. Therefore, if we denote the correct class for image x by cx , K(x) = cx for most x ∈ N. Let AK stand for the space of adversarial examples for the network K. Images in AK must resemble a natural image yet be able to fool the network K. Hence, for each a ∈ AK there exists x ∈ N such that d(a, x) is small and K(a) 6= cx , where d(·, ·) is a distance metric. This framework can be easily extended to the task of semantic segmentation in which the correct class for each pixel needs to be determined. In this case, the segmentation network K assigns a label map K(x) = (K(x1 ), . . . , K(xn )) ∈ {1, . . . , C}n to each image x = (x1 , . . . , xn ). The ground-truth prediction for image x is cx = (cx1 , . . . , cxn ), and the set of adversarial examples is AK = {a ∈ [0, 1]n \N | ∃ x ∈ N : d(a, x) <  , ∀ i ∈ {1, . . . , n} : K(ai ) 6= cxi }, where  is a fixed threshold3 . 3.1. Universal Perturbations Universal Perturbations were first proposed in the seminal work of Dezfooli et al. [35]. The paper proposes an iterative algorithm to generate the universal perturbation. It constructs the universal perturbation by adding imagedependent perturbations obtained from [37] and scaling the result. Unlike the iterative approach of [35], we seek an end-to-end trainable model for generating the universal perturbation. Let us denote the set of universal perturbations 1 Note that x may or may not belong to the space of natural images. images of height h, width w and c channels: n = h × w × c. 3 We can also relax the constraint, and require that for most pixels the prediction is different from the ground-truth. 2 For Figure 1: Training architecture for generating universal adversarial perturbations. A fixed pattern, sampled from a uniform distribution, is passed through the generator. The scaled result is the universal perturbation which, when added to natural images, can mislead the pre-trained model. We consider both U-Net (illustrated here) and ResNet Generator architectures. for the network K by UK = {U ∈ [0, 1]n | for most x ∈ N : x + U ∈ AK }. We do not want the perturbation to directly depend on any input image from the dataset. We seek a function f : [0, 1]n → UK which can transform a random pattern to the universal perturbation. By changing the input pattern, we can obtain a diverse set of universal perturbations. In practice, we approximate f (·) with a deep neural network fΘ (·) with weights Θ. This setting resembles Generative Adversarial Networks (GANs) [17, 43, 15, 28, 21] in which a random vector is sampled from a latent space, and is transformed to a natural-looking image by a generator. In our case the range of the mapping is UK instead of N, and the generator is trained with a fooling loss instead of the discriminative loss used in GANs. We also tried using a combination of fooling and discriminative losses; however, it led to sub-optimal results. There are several options for the architecture of the image transformation network fΘ (·). We consider two architectures used in recent image-to-image translation networks such as [22] and [61]. The U-Net architecture [46] is an encoder-decoder network with skip connections between the encoder and the decoder. The other architecture is ResNet Generator which was introduced in [23], and is also used in [61] for transforming images from one domain to another. It consists of several downsampling layers, residual blocks and upsampling layers. In most of our experiments, the ResNet Generator outperforms U-Net. Figure 1 illustrates the architecture for generating universal perturbations. A fixed pattern Z ∈ [0, 1]n , sampled from a uniform distribution U [0, 1]n , is fed to a generator fΘ to create the perturbation. The output of the generator fΘ (Z) is then scaled to have  a fixed norm.  More specifi in which  is the cally, we multiply it by min 1, kfΘ (Z)k p maximum permissible Lp norm. Similar to related works in the literature, we consider p = 2 and p = ∞ in experiments. The resulting universal perturbation U is added to natural images to create the perturbed ones. Before feeding the perturbed image to the generator, we clip it to keep it in the valid range of images on which the network is trained. We feed the clipped image x̂ to the network K to obtain the output probabilities k(x̂)4 . Let 1cx denote the one-hot encoding of the ground-truth for image x. In semantic segmentation, cx ∈ {1, . . . , C}n is the ground-truth label map, and k(x̂) contains the class probabilities for each pixel in x̂. For non-targeted attacks we want the prediction k(x̂) to be different from 1cx , so we define the loss to be a decreasing function of the cross-entropy H(k(x̂), 1cx ). We found that the following fooling loss gives good results in experiments: lnon−targeted = lf ool = − log(H(k(x̂), 1cx )) (1) Alternatively, as proposed by [26] and [27], we can consider the least likely class kll (x) = arg min k(x), and set it as the target for training the model: lnon−targeted = lf ool = log(H(k(x̂), 1kll (x) )) (2) In practice, the losses in equations 1 and 2 lead to competitive results. We also found that for the Inception model, the logit-based loss used in [7, 8] yields optimal results. For targeted perturbations we consider the cross-entropy with the one-hot encoding of the target: ltargeted = lf ool = log(H(k(x̂), 1t )) (3) where t represents the target. Note that for the classification task, t ∈ {1, . . . , C} is the target class while in semantic segmentation, t ∈ {1, . . . , C}n is the target label map. 3.2. Image-dependent Perturbations We consider the task of perturbing images as a transformation from the domain of natural images to the domain of adversarial images. In other words, we require a mapping f : N → AK which generates a perturbed image f (x) ∈ AK for each natural image x ∈ N. A desirable function f (·) must result in a low accuracy and a high fooling ratio. Accuracy denotes the proportion of samples x 4 Note that K(x̂) = arg max k(x̂). Figure 2: Architecture for generating image-dependent perturbations. The generator outputs a perturbation, which is scaled to satisfy a norm constraint. It is then added to the original image, and clipped to produce the perturbed image. We use the ResNet Generator architecture for most of the image-dependent tasks. Figure 3: Architecture for training a model to fool multiple target networks. The fooling loss for training the generator is a linear combination of fooling losses of target models. for which K(f (x)) = cx , while fooling ratio represents the ratio of images x for which K(f (x)) 6= K(x). Since we assume that the model achieves a high accuracy on natural images, these two metrics are highly correlated. We consider two slightly different approaches for approximating f (·). The first approach is to parametrize it directly using a neural network fΘ (·). Hence, we seek Θ such that for most x ∈ N: K(fΘ (x)) 6= K(x). We also require that the perturbed image fΘ (x) look similar to the original image x. Hence, d(x, fΘ (x)) needs to be small for most x ∈ N, where d(·, ·) is a proper distance function. The second approach is to approximate the difference of natural and adversarial images with a neural network fΘ (·). We require that for most x ∈ N : K(x + fΘ (x)) 6= K(x) ≈ cx , and the Lp norm of the additive perturbation kfΘ (x)kp needs to be small in order for it to be quasi-imperceptible. The second approach gives us better control over the perturbation magnitude. Hence, we will focus on this approach hereafter. Figure 2 shows the architecture for generating imagedependent perturbations. Input image x is passed through the generator to create the perturbation fΘ (x). The perturbation is then scaled to constrain its norm. The result is the image-dependent perturbation which is added to the input image. We feed the clipped image x̂ to the network to obtain the output probabilities k(x̂). We use loss functions similar to the universal case as defined in equations 1–3. At inference time, we can discard the pre-trained model, and use only the generator to produce adversarial examples. This obviates the need for iterative gradient computations, and allows us to generate perturbations fast. 3.3. Fooling Multiple Networks Using generative models for creating adversarial perturbations enables us to train sophisticated models. For instance, we can consider training a single model for misleading multiple networks simultaneously. Suppose we have models K1 , K2 , . . . , Km trained on natural images. Let AK denote the space of adversarial examples for these target models, i.e. AK = {a ∈ [0, 1]n \N | ∃ x ∈ N : d(x, a) <  , ∀i ∈ {1, . . . , m} : Ki (a) 6= Ki (x) ≈ cx }, in which d(·, ·) is a distance function,  is a pre-specified threshold and cx is the ground-truth for x. We can consider both universal and image-dependent perturbations. In the case of universal perturbations, we seek a mapping F : [0, 1]n → AK generating adversarial examples from input patterns. In practice, the function is approximated with a deep neural network FΘ . Figure 3 depicts the corresponding architecture. It is similar to figure 1 other than that the resulting perturbed image x̂ is fed to each of the pre-trained models. The loss function for training the generator is a linear combination of fooling losses of pre-trained models as defined in equations 1–3. Hence, we have: lmulti−f ool = λ1 · lf ool1 + · · · + λm · lf oolm (4) in which {λ1 , . . . , λm } ⊂ IR is a set of weights chosen based on the difficulty of deceiving each target model. 4.1. Universal Perturbations (a) Perturbation norm: L2 = 2000, target model: VGG-16 (b) Perturbation norm: L∞ = 10, target model: VGG-19 Figure 4: Non-targeted universal perturbations. Enhanced universal pattern is shown on the left, and two samples of perturbed images are given on the right. L2 = 2000 GAP UAP VGG16 93.9% 90.3% VGG19 94.9% 84.5% ResNet152 79.5% 88.5% Table 1: Fooling rates of non-targeted universal perturbations for various classifiers pre-trained on ImageNet. Our method (GAP) is compared with Universal Adversarial Perturbations (UAP) [35] using L2 norm as the metric. L∞ = 10 GAP UAP VGG16 83.7% 78.8% VGG19 80.1% 77.8% Inception5 82.7%6 78.9% Table 2: Fooling rates of non-targeted universal perturbations using L∞ norm as the metric. The architecture for image-dependent perturbations is similar except that inputs to the generator are natural images. 4. Experiments on Classification We generate adversarial examples for fooling classifiers pre-trained on the ImageNet dataset [14]. For the Euclidean distance as the metric, we scale the output of the generator to have a fixed L2 norm. We can also scale the generator’s output to constrain its maximum value when dealing with the L∞ norm. All results are reported on the 50,000 images of the ImageNet [14] validation set. Note that the contrast of displayed perturbations is enhanced for better visualization. Non-targeted Universal Perturbations. This setting corresponds to the architecture in figure 1 with the loss functions defined in equations 1 and 2. Results are given in Tables 1 and 2 for L2 and L∞ norms respectively. For most cases our approach outperforms that of [35]. Similar to [35], a value of 2000 is set as the L2 -norm threshold of the universal perturbation, and a value of 10 is set for the L∞ -norm when images are considered in [0, 255] range7 . We use UNet and ResNet Generator for L2 and L∞ norms respectively. We visualize the results in figure 4. Notice that the L2 perturbation consists of a bird-like pattern in the top left. Intuitively, the network has learned that in this constrained problem it can successfully fool the classifier for the largest number of images by converging to a bird perturbation. On the other hand, when we optimize the model based on L∞ norm, it distributes the perturbation to make use of the maximum permissible magnitude at each pixel. Targeted Universal Perturbations. In this case we seek a single pattern which can be added to any image in the dataset to mislead the model into predicting a specified target label. We perform experiments with fixed L∞ norm of 10, and use the ResNet generator for fooling the Inceptionv3 model. We use the loss function defined in equation 3 to train the generator. Figure 5 depicts the perturbations for various targets. It also shows the top-1 target accuracy on the validation set, i.e. the ratio of perturbed samples classified as the desired target. We observe the the universal perturbation contains patterns resembling the target class. While this task is more difficult than the non-targeted one, our model achieves high target accuracies. To the best of our knowledge, we are the first to present effective targeted universal perturbations on the ImageNet dataset. To make sure that the model performs well for any target, we train it on 10 randomly sampled classes. The resulting average target accuracy for L∞ = 10 is 52.0%, demonstrating generalizability of the model across different targets. 4.2. Image-dependent Perturbations [8] proposes a strong method for creating targeted image-dependent perturbations. However, its iterative algorithm is very slow at inference time. It reports attacks that take several minutes to run for each image, making it infeasible in real-time scenarios in which the input image changes constantly. FGSM [18] is a fast attack method but is not very accurate. In this work, we present adversarial 6 Since [35] does not report results on Inception-v3, we compare with their results on Inception-v1 (GoogLeNet). 6 This result uses the logit-based loss [7, 8] as opposed to the least-likely class loss (equation 2), which is used for other results in the table. 7 The average L and L ∞ norm of images in our validation set are 2 consistent with those reported in [35]. VGG16 VGG19 Inception-v3 L∞ = 7 66.9% (30.0%) 68.4% (28.8%) 85.3% (13.7%) L∞ = 10 80.8% (17.7%) 84.1% (14.6%) 98.3% (1.7%) L∞ = 13 88.5% (10.6%) 90.7% (8.6%) 99.5% (0.5%) (a) Target: Soccer Ball, Top-1 target accuracy: 74.1% Table 3: Fooling ratios (pre-trained models’ accuracies) for non-targeted image-dependent perturbations. (b) Target: Knot, Top-1 target accuracy: 63.6% (a) L∞ = 7 (c) Target: Finch, Top-1 target accuracy: 61.8% Figure 5: Targeted universal perturbations. Three different targets and the corresponding average target accuracy of perturbed images on Inception-v3 are given. Universal pattern is shown on the left and two sample perturbed images are depicted on the right. Perturbation norm is L∞ = 10. (b) L∞ = 10 attacks that are both fast and accurate. Non-targeted Image-dependent Perturbations. The corresponding architecture is given in figure 2 with the loss function defined in equations 1 and 2. We use ResNet generator with 6 blocks for generating the perturbations. Similar to related works on image-dependent perturbations, we focus on L∞ norm as the metric. Results are shown for various perturbation norms and pre-trained classifiers in Table 3. Figure 6 illustrates the perturbed images. In this case the model converges to simple patterns which can change the prediction for most images. As we observe, the perturbations contain features from the corresponding input images. Targeted Image-dependent Perturbations. For this task we use the training scheme shown in figure 2 with the loss function in equation 3. Figure 7 shows samples of perturbed images for fooling the Inception-v3 model. The perturbations are barely perceptible, yet they can obtain high target accuracies. Moreover, the perturbation itself has features (c) L∞ = 13 Figure 6: Non-targeted image-dependent perturbations. From left to right: original image, enhanced perturbation and perturbed image. Three different thresholds are considered with Inception-v3 as the target model. resembling the target class and the input image. See figure 7 for more examples. We also evaluate performance of the model on 10 randomly sampled classes. The average target accuracy for L∞ = 10 is 89.1%, indicating generalizability of the proposed model across different target classes. The average inference time for generating a perturbation to fool the Inception-v3 model is 0.28 ms per image, showing that our method is considerably faster than [8]8 . 8 The time is measured on Titan Xp GPUs. VGG16 VGG19 ResNet152 VGG16 + VGG19 VGG16 93.9% 88.0% 31.9% 90.5% VGG19 89.6% 94.9% 30.6% 90.1% ResNet152 52.2% 49.0% 79.5% 54.1% Table 4: Transferability of non-targeted universal perturbations. The network is trained to fool the pre-trained model shown in each row, and is tested on the model shown in each column. Perturbation magnitude is set to L2 = 2000. The last row indicates joint training on VGG-16 and VGG-19. (a) Target: Soccer Ball, Top-1 target accuracy: 91.3% than training on a single target network. This is expected as the network has seen more models during training, so it generalizes better to unseen models. 5. Experiments on Semantic Segmentation (b) Target: Hamster, Top-1 target accuracy: 87.4% Figure 7: Targeted image-dependent perturbations. Two different targets and the corresponding average target accuracy of perturbed images on Inception-v3 are shown. From left to right: original image, enhanced perturbation and perturbed image. Perturbation magnitude is set to L∞ = 10. 4.3. Transferability and Fooling Multiple Networks Several works have demonstrated that adversarial examples generated for one model may also be misclassified by other models. This property is referred to as transferability, and can be leveraged to perform black-box attacks [53, 18, 40, 41, 29, 10, 7]. We show that our generated perturbations can be transferred across different models. Table 4 shows the fooling ratio of a non-targeted universal attack trained on one network and evaluated on others. Each row corresponds to the pre-trained model based on which the attack model is learned. The last row of the table corresponds to a model trained to jointly mislead VGG-16 and VGG-19 models based on the architecture depicted in figure 3. We see that joint optimization results in better transferability Current methods for fooling semantic segmentation models such as [58] and [34] use iterative algorithms, which are hand-engineered for the specific task, and are slow at inference. We demonstrate that our proposed architectures are generalizable across different tasks. More specifically, we show that architectures similar to those used in the classification task yield strong results on fooling segmentation models. We leave extension to tasks other than classification and segmentation as future work. Experiments are performed on the Cityscapes dataset [12]. It contains 2975 training and 500 validation images with a resolution of 2048 × 1024 pixels. Similar to [34], we downsample images and label maps to 1024 × 512 pixels using bilinear and nearest-neighbor interpolation respectively. 5.1. Universal Perturbations We first consider the more challenging case of targeted attacks in which a desired target label map is given. We use the same setting as in the classification task, i.e. the training architecture in figure 1 with the fooling loss defined in equation 3. In order for our results to be comparable with [34], we consider FCN-8s [30] as our segmentation model, and use L∞ norm as the metric. Our setting corresponds to the static target segmentation in [34]. We use the same target as the paper, and consider our performance metric to be success rate, i.e. the categorical accuracy between the prediction k(x̂) and the target t. Table 5 demonstrates our results. Our method outperforms the algorithm proposed in [34] for most of the perturbation norms. We also visualize the results in figure 8. We observe that the generator fools the segmentation model by creating a universal perturbation which resembles the target label map. We also demonstrates the resulting mean IoU for non-targeted attacks in Table 6. (b) Perturbed image (a) Perturbation (c) Prediction for perturbed image (d) Target Figure 8: Targeted universal perturbations with L∞ = 10 for fooling the FCN-8s semantic segmentation model. (a) Perturbation (b) Perturbed image (d) Target (c) Prediction for perturbed image Figure 9: Targeted image-dependent perturbations with L∞ = 10 for fooling the FCN-8s model. GAP (Ours) UAP-Seg [34] L∞ = 5 79.5% 80.3% L∞ = 10 92.1% 91.0% L∞ = 20 97.2% 96.3% Table 5: Success rate of targeted universal perturbations for fooling the FCN-8s segmentation model. Results are obtained on the validation set of the Cityscapes dataset. Task Universal Image-dependent L∞ = 5 12.8% 6.9% L∞ = 10 4.0% 2.1% L∞ = 20 2.1% 0.4% Table 6: Mean IoU of non-targeted perturbations for fooling the FCN-8s segmentation model on the Cityscapes dataset. 5.2. Image-dependent Perturbations The targeted image-dependent task corresponds to the architecture in figure 2 with the loss function in equation 3. We use the same target as the universal case. Results for various norms are given in Table 7. As we expect, relaxing the constraint of universality leads to higher success rates. Figure 9 illustrates the perturbations for L∞ = 10. By closely inspecting the perturbations, we can observe patterns from both the target and the input image. As shown in Table 6, image-dependent perturbations achieve smaller mean IoU by not having the universality constraint. The average inference time per image is 132.82 ms for the U-Net architecture and 335.73 ms for the ResNet generator9 . 9 The time is measured on Titan Xp GPUs. GAP L∞ = 5 87.0% L∞ = 10 96.3% L∞ = 20 98.2% Table 7: Success rate of targeted image-dependent perturbations for fooling FCN-8s on the Cityscapes dataset. 6. Discussion and Future Work In this paper, we demonstrate the efficacy of generative models for creating adversarial examples. Four types of adversarial attacks are considered: targeted universal, non-targeted universal, targeted image-dependent and nontargeted image-dependent. We achieve high fooling rates on all tasks in the small perturbation norm regime. The perturbations can successfully transfer across different target models. Moreover, we demonstrate that similar architectures can be effectively used for fooling both classification and semantic segmentation models. This eliminates the need for designing task-specific attack methods, and paves the way for extending adversarial examples to other tasks. Future avenues of research include incorporating various properties such as transformation-invariance into the perturbations and extending the proposed framework to tasks other than classification and semantic segmentation. Acknowledgments We would like to thank Seyed Ali Osia, Zekun Hao and Xun Huang for helpful discussions. This work is supported in part by a Google Focused Research Award and a Facebook equipment donation. (a) Target model: VGG-19, Fooling ratio: 94.9% (b) Target model: VGG-16, Fooling ratio: 93.9% Figure 10: Non-targeted universal perturbations. From top to bottom: original image, enhanced perturbation and perturbed image. Perturbation norm is set to L2 = 2000 for (a) and (b) and to L∞ = 10 for (c) and (d). (c) Target model: Inception-v3, Fooling ratio: 79.2% (d) Target model: VGG-19, Fooling ratio: 80.1% Figure 10: Non-targeted universal perturbations (continued). From top to bottom: original image, enhanced perturbation and perturbed image. Perturbation norm is set to L2 = 2000 for (a) and (b) and to L∞ = 10 for (c) and (d). (a) Target: Jigsaw Puzzle, Top-1 target accuracy: 89.3% (b) Target: Teapot, Top-1 target accuracy: 62.2% Figure 11: Targeted universal perturbations. From top to bottom: original image, enhanced perturbation and perturbed image. Perturbation norm is set to L∞ = 10, and target model is Inception-v3. (c) Target: Chain, Top-1 target accuracy: 64.9% (d) Target: Hamster, Top-1 target accuracy: 60.0% Figure 11: Targeted universal perturbations (continued). From top to bottom: original image, enhanced perturbation and perturbed image. Perturbation norm is set to L∞ = 10, and target model is Inception-v3. (a) L∞ = 7 (b) L∞ = 10 (c) L∞ = 13 Figure 12: Non-targeted image-dependent perturbations. From top to bottom: original image, enhanced perturbation and perturbed image. Three different thresholds are considered with Inception-v3 as the target model. (a) Target: Jigsaw puzzle, Top-1 target accuracy: 98.1% (b) Target: Knot, Top-1 target accuracy: 95.0% Figure 13: Targeted image-dependent perturbations. From top to bottom: original image, enhanced perturbation and perturbed image. Perturbation norm is set to L∞ = 10, and Inception-v3 is the pre-trained model. (c) Target: Chain, Top-1 target accuracy: 89.7% (d) Target: Teapot, Top-1 target accuracy: 90.6% Figure 13: Targeted image-dependent perturbations (continued). From top to bottom: original image, enhanced perturbation and perturbed image. Perturbation norm is set to L∞ = 10, and Inception-v3 is the pre-trained model. (a) Original image (b) Perturbation (c) Perturbed image (d) Prediction for original image (e) Target (f) Prediction for perturbed image Figure 14: Targeted universal perturbations with L∞ = 5. Zoom in for details. (a) Original image (b) Perturbation (c) Perturbed image (d) Prediction for original image (e) Target (f) Prediction for perturbed image Figure 15: Targeted universal perturbations with L∞ = 10. (a) Original image (b) Perturbation (c) Perturbed image (d) Prediction for original image (e) Target (f) Prediction for perturbed image Figure 16: Targeted universal perturbations with L∞ = 20. (a) Original image (b) Perturbation (c) Perturbed image (d) Prediction for original image (e) Target (f) Prediction for perturbed image Figure 17: Targeted image-dependent perturbations with L∞ = 5. Zoom in for details. (a) Original image (b) Perturbation (c) Perturbed image (d) Prediction for original image (e) Target (f) Prediction for perturbed image Figure 18: Targeted image-dependent perturbations with L∞ = 10. (a) Original image (b) Perturbation (c) Perturbed image (d) Prediction for original image (e) Target (f) Prediction for perturbed image Figure 19: Targeted image-dependent perturbations with L∞ = 20. (a) Original image (b) Perturbation (c) Perturbed image (d) Prediction for original image (e) Groundtruth (f) Prediction for perturbed image Figure 20: Non-targeted universal perturbations with L∞ = 5. Zoom in for details. (a) Original image (b) Perturbation (c) Perturbed image (d) Prediction for original image (e) Groundtruth (f) Prediction for perturbed image Figure 21: Non-targeted universal perturbations with L∞ = 10. (a) Original image (b) Perturbation (c) Perturbed image (d) Prediction for original image (e) Groundtruth (f) Prediction for perturbed image Figure 22: Non-targeted universal perturbations with L∞ = 20. (a) Original image (b) Perturbation (c) Perturbed image (d) Prediction for original image (e) Groundtruth (f) Prediction for perturbed image Figure 23: Non-targeted image-dependent perturbations with L∞ = 5. Zoom in for details. (a) Original image (b) Perturbation (c) Perturbed image (d) Prediction for original image (e) Groundtruth (f) Prediction for perturbed image Figure 24: Non-targeted image-dependent perturbations with L∞ = 10. (a) Original image (b) Perturbation (c) Perturbed image (d) Prediction for original image (e) Groundtruth (f) Prediction for perturbed image Figure 25: Non-targeted image-dependent perturbations with L∞ = 20. References [1] N. Akhtar, J. Liu, and A. Mian. Defense against universal adversarial perturbations. arXiv preprint arXiv:1711.05929, 2017. 2 [2] A. Arnab, O. Miksik, and P. H. Torr. On the robustness of semantic segmentation models to adversarial attacks. arXiv preprint arXiv:1711.09856, 2017. 2 [3] A. Athalye, N. Carlini, and D. Wagner. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. arXiv preprint arXiv:1802.00420, 2018. 2 [4] A. Athalye and I. Sutskever. Synthesizing robust adversarial examples. arXiv preprint arXiv:1707.07397, 2017. 2 [5] V. Badrinarayanan, A. Kendall, and R. Cipolla. Segnet: A deep convolutional encoder-decoder architecture for image segmentation. arXiv preprint arXiv:1511.00561, 2015. 1 [6] S. Baluja and I. Fischer. Adversarial transformation networks: Learning to generate adversarial examples. arXiv preprint arXiv:1703.09387, 2017. 2 [7] A. N. Bhagoji, W. He, B. Li, and D. Song. Exploring the space of black-box attacks on deep neural networks. arXiv preprint arXiv:1712.09491, 2017. 3, 5, 7 [8] N. Carlini and D. Wagner. Towards evaluating the robustness of neural networks. In Security and Privacy (SP), 2017 IEEE Symposium on, pages 39–57. IEEE, 2017. 2, 3, 5, 6 [9] L.-C. Chen, G. Papandreou, I. Kokkinos, K. Murphy, and A. L. Yuille. Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs. arXiv preprint arXiv:1606.00915, 2016. 1 [10] P.-Y. Chen, H. Zhang, Y. Sharma, J. Yi, and C.-J. Hsieh. Zoo: Zeroth order optimization based black-box attacks to deep neural networks without training substitute models. In Proceedings of the 10th ACM Workshop on Artificial Intelligence and Security, pages 15–26. ACM, 2017. 7 [11] M. Cisse, Y. Adi, N. Neverova, and J. Keshet. Houdini: Fooling deep structured prediction models. arXiv preprint arXiv:1707.05373, 2017. 2 [12] M. Cordts, M. Omran, S. Ramos, T. Rehfeld, M. Enzweiler, R. Benenson, U. Franke, S. Roth, and B. Schiele. The cityscapes dataset for semantic urban scene understanding. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3213–3223, 2016. 7 [13] N. Das, M. Shanbhogue, S.-T. Chen, F. Hohman, S. Li, L. Chen, M. E. Kounavis, and D. H. Chau. Shield: Fast, practical defense and vaccination for deep learning using jpeg compression. arXiv preprint arXiv:1802.06816, 2018. 2 [14] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. FeiFei. Imagenet: A large-scale hierarchical image database. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pages 248–255. IEEE, 2009. 5 [15] E. L. Denton, S. Chintala, R. Fergus, et al. Deep generative image models using a laplacian pyramid of adversarial networks. In Advances in neural information processing systems, pages 1486–1494, 2015. 3 [16] G. S. Dhillon, K. Azizzadenesheli, Z. C. Lipton, J. Bernstein, J. Kossaifi, A. Khanna, and A. Anandkumar. Stochastic acti- [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] vation pruning for robust adversarial defense. arXiv preprint arXiv:1803.01442, 2018. 2 I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. In Advances in neural information processing systems, pages 2672–2680, 2014. 3 I. J. Goodfellow, J. Shlens, and C. Szegedy. Explaining and harnessing adversarial examples. arXiv preprint arXiv:1412.6572, 2014. 2, 5, 7 C. Guo, M. Rana, M. Cissé, and L. van der Maaten. Countering adversarial images using input transformations. arXiv preprint arXiv:1711.00117, 2017. 2 K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770–778, 2016. 1 X. Huang, Y. Li, O. Poursaeed, J. Hopcroft, and S. Belongie. Stacked generative adversarial networks. arXiv preprint arXiv:1612.04357, 2016. 3 P. Isola, J.-Y. Zhu, T. Zhou, and A. A. Efros. Imageto-image translation with conditional adversarial networks. arXiv preprint arXiv:1611.07004, 2016. 3 J. Johnson, A. Alahi, and L. Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In European Conference on Computer Vision, pages 694–711. Springer, 2016. 3 D. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 2 A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012. 1 A. Kurakin, I. Goodfellow, and S. Bengio. Adversarial examples in the physical world. arXiv preprint arXiv:1607.02533, 2016. 2, 3, 24 A. Kurakin, I. Goodfellow, and S. Bengio. Adversarial machine learning at scale. arXiv preprint arXiv:1611.01236, 2016. 2, 3 A. B. L. Larsen, S. K. Sønderby, H. Larochelle, and O. Winther. Autoencoding beyond pixels using a learned similarity metric. arXiv preprint arXiv:1512.09300, 2015. 3 Y. Liu, X. Chen, C. Liu, and D. Song. Delving into transferable adversarial examples and black-box attacks. arXiv preprint arXiv:1611.02770, 2016. 7 J. Long, E. Shelhamer, and T. Darrell. Fully convolutional networks for semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3431–3440, 2015. 1, 7 J. Lu, H. Sibai, E. Fabry, and D. Forsyth. No need to worry about adversarial examples in object detection in autonomous vehicles. arXiv preprint arXiv:1707.03501, 2017. 2 X. Ma, B. Li, Y. Wang, S. M. Erfani, S. Wijewickrema, M. E. Houle, G. Schoenebeck, D. Song, and J. Bailey. Characterizing adversarial subspaces using local intrinsic dimensionality. arXiv preprint arXiv:1801.02613, 2018. 2 [33] A. Madry, A. Makelov, L. Schmidt, D. Tsipras, and A. Vladu. Towards deep learning models resistant to adversarial attacks. arXiv preprint arXiv:1706.06083, 2017. 2 [34] J. H. Metzen, M. C. Kumar, T. Brox, and V. Fischer. Universal adversarial perturbations against semantic image segmentation. arXiv preprint arXiv:1704.05712, 2017. 2, 7, 8 [35] S.-M. Moosavi-Dezfooli, A. Fawzi, O. Fawzi, and P. Frossard. Universal adversarial perturbations. arXiv preprint arXiv:1610.08401, 2016. 1, 2, 5 [36] S.-M. Moosavi-Dezfooli, A. Fawzi, O. Fawzi, P. Frossard, and S. Soatto. Analysis of universal adversarial perturbations. arXiv preprint arXiv:1705.09554, 2017. 2 [37] S.-M. Moosavi-Dezfooli, A. Fawzi, and P. Frossard. Deepfool: a simple and accurate method to fool deep neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2574–2582, 2016. 2 [38] K. R. Mopuri, U. Garg, and R. V. Babu. Fast feature fool: A data independent approach to universal adversarial perturbations. arXiv preprint arXiv:1707.05572, 2017. 2 [39] A. Nguyen, J. Yosinski, and J. Clune. Deep neural networks are easily fooled: High confidence predictions for unrecognizable images. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 427–436, 2015. 2 [40] N. Papernot, P. McDaniel, and I. Goodfellow. Transferability in machine learning: from phenomena to black-box attacks using adversarial samples. arXiv preprint arXiv:1605.07277, 2016. 7 [41] N. Papernot, P. McDaniel, I. Goodfellow, S. Jha, Z. B. Celik, and A. Swami. Practical black-box attacks against deep learning systems using adversarial examples. arXiv preprint arXiv:1602.02697, 2016. 7 [42] A. Prakash, N. Moran, S. Garber, A. DiLillo, and J. Storer. Deflecting adversarial attacks with pixel deflection. arXiv preprint arXiv:1801.08926, 2018. 2 [43] A. Radford, L. Metz, and S. Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015. 3 [44] A. Raghunathan, J. Steinhardt, and P. Liang. Certified defenses against adversarial examples. arXiv preprint arXiv:1801.09344, 2018. 2 [45] A. S. Rakin, Z. He, B. Gong, and D. Fan. Robust preprocessing: A robust defense method against adversary attack. arXiv preprint arXiv:1802.01549, 2018. 2 [46] O. Ronneberger, P. Fischer, and T. Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 234–241. Springer, 2015. 3 [47] A. Roy, C. Raffel, I. Goodfellow, and J. Buckman. Thermometer encoding: One hot way to resist adversarial examples. 2018. 2 [48] P. Samangouei, M. Kabkab, and R. Chellappa. Defense-gan: Protecting classifiers against adversarial attacks using generative models. 2018. 2 [49] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 1 [50] Y. Song, T. Kim, S. Nowozin, S. Ermon, and N. Kushman. Pixeldefend: Leveraging generative models to understand and defend against adversarial examples. arXiv preprint arXiv:1710.10766, 2017. 2 [51] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1–9, 2015. 1 [52] C. Szegedy, V. Vanhoucke, S. Ioffe, J. Shlens, and Z. Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2818–2826, 2016. 1 [53] C. Szegedy, W. Zaremba, I. Sutskever, J. Bruna, D. Erhan, I. Goodfellow, and R. Fergus. Intriguing properties of neural networks. arXiv preprint arXiv:1312.6199, 2013. 1, 2, 7 [54] F. Tramèr, A. Kurakin, N. Papernot, D. Boneh, and P. McDaniel. Ensemble adversarial training: Attacks and defenses. arXiv preprint arXiv:1705.07204, 2017. 2 [55] D. Vijaykeerthy, A. Suri, S. Mehta, and P. Kumaraguru. Hardening deep neural networks via adversarial model cascades. arXiv preprint arXiv:1802.01448, 2018. 2 [56] T.-W. Weng, H. Zhang, P.-Y. Chen, J. Yi, D. Su, Y. Gao, C.J. Hsieh, and L. Daniel. Evaluating the robustness of neural networks: An extreme value theory approach. arXiv preprint arXiv:1801.10578, 2018. 2 [57] C. Xie, J. Wang, Z. Zhang, Z. Ren, and A. Yuille. Mitigating adversarial effects through randomization. arXiv preprint arXiv:1711.01991, 2017. 2 [58] C. Xie, J. Wang, Z. Zhang, Y. Zhou, L. Xie, and A. Yuille. Adversarial examples for semantic segmentation and object detection. arXiv preprint arXiv:1703.08603, 2017. 2, 7 [59] F. Yu and V. Koltun. Multi-scale context aggregation by dilated convolutions. arXiv preprint arXiv:1511.07122, 2015. 1 [60] H. Zhao, J. Shi, X. Qi, X. Wang, and J. Jia. Pyramid scene parsing network. arXiv preprint arXiv:1612.01105, 2016. 1 [61] J.-Y. Zhu, T. Park, P. Isola, and A. A. Efros. Unpaired imageto-image translation using cycle-consistent adversarial networks. arXiv preprint arXiv:1703.10593, 2017. 3 7. Appendix 7.1. Runtime Analysis Note that inference time is not an issue for universal perturbations as we just need to add the perturbation to the input image during inference. Therefore, we provide running time only for image-dependent perturbations. In this case, we need to forward the input image to the generator and get the resulting perturbation. Table 8 demonstrates the inference time for image-dependent perturbations. It also shows the generator’s architecture for each task including the number of filters in the first layer. We perform model-level parallelization across two GPUs, and batch size is set to be one. Notice that inference time is in the order of milliseconds, allowing us to generate perturbations in real-time. Table 9 shows inference time for the segmentation task. Two architectures with similar performance are given. Here we deal with 1024 × 512 images in the Cityscapes dataset, and we need models with more capacity; hence, the inference time is larger compared with the classification task. Task Non-targeted Targeted Architecture ResNet Gen. 6 blocks, 50 filters ResNet Gen. 6 blocks, 57 filters Titan Xp Tesla K40 0.27 ms 4.7 ms 0.28 ms 4.8 ms Table 8: Average inference time per image and generator’s architecture for image-dependent classification tasks. Target model is Inception-v3. Architecture U-Net Generator: 8 layers, 200 filters ResNet Generator: 9 blocks, 145 filters Titan Xp Tesla K40m 132.8 ms 511.7 ms 335.7 ms 2396.9 ms Table 9: Average inference time per image and generator’s architecture for the semantic segmentation task. Targeted image-dependent perturbations are considered with FCN-8s as the pre-trained model. 7.2. Resistance to Gaussian Blur We examine the effect of applying Gaussian filters to perturbed images. Results for the classification task are shown in Table 10. In order to be comparable with [26], we consider non-targeted image-dependent perturbations with Destruction Rate (fraction of images that are no longer mis- classified after blur) as the metric. For most σ values, our method is more resistant to Gaussian blur than I-FGSM. We also evaluate the effect of Gaussian filters for the segmentation task. Results are given in Table 11. As we can observe, the perturbations are reasonably robust to Gaussian blur. GAP I-FGSM σ = 0.5 0.0% 0.0% σ = 0.75 0.8% 0.5% σ=1 3.2% 8.0% σ = 1.25 8.0% 23.0% Table 10: Destruction Rate of non-targeted imagedependent perturbations for the classification task. Perturbation norm is set to L∞ = 16. L∞ = 5 L∞ = 10 L∞ = 20 σ = 0.5 83.2% 94.8% 97.5% σ = 0.75 76.9% 90.1% 95.7% σ=1 66.0% 80.0% 89.3% σ = 1.25 57.1 % 69.6% 78.8% Table 11: Success rate of targeted image-dependent perturbations for the segmentation task after applying Gaussian filters.
9cs.NE
Pluggable AOP — Designing Aspect Mechanisms for Third-party Composition ∗ Sergei Kojarski David H. Lorenz Northeastern University Boston, Massachusetts 02115 USA arXiv:cs/0505004v1 [cs.SE] 30 Apr 2005 {kojarski,lorenz}@ccs.neu.edu ABSTRACT semantics for Base × Ext1 and the semantics for Base × Ext2 , the semantics for Base × Ext1 × Ext2 is undefined even though Ext1 and Ext2 are both aspect extensions to the same base language. Studies of Aspect-Oriented Programming (AOP) usually focus on a language in which a specific aspect extension is integrated with a base language. Languages specified in this manner have a fixed, non-extensible AOP functionality. In this paper we consider the more general case of integrating a base language with a set of domain specific third-party aspect extensions for that language. We present a general mixin-based method for implementing aspect extensions in such a way that multiple, independently developed, dynamic aspect extensions can be subject to third-party composition and work collaboratively. 1. In this paper we resolve this difficulty by considering a more general question: T HE ASPECT EXTENSION COMPOSITION QUESTION : Given a base language, Base, and a set {Ext1 , . . . , Extn } of independent aspect extensions to Base, what is the meaning of a program base ∈ Base in the base language in the presence of n aspect programs haspect 1 , . . . , aspect n i ∈ Ext1 × · · · × Extn written in the n different aspect extensions? INTRODUCTION A current trend in Aspect-Oriented Programming (AOP [26]) is the usage of general-purpose AOP languages (AOPLs). However, a general-purpose AOPL lacks the expressiveness to tackle all cases of crosscutting. A solution to unanticipated crosscutting concerns is to create and combine different domain-specific aspect extensions to form new AOP functionality [42]. As of yet, there is no methodology to facilitate this process. Ability to compose distinct aspect extensions is of great practical importance (Section 2). Addressing the general composition question also provides in the special case where n = 1 a better encapsulation of the semantics for a single aspect extension. 1.1 Combining Two Aspect Extensions Answering the aspect extension composition question is difficult even for n = 2. Let MyBase be a procedural language, and consider two independent, third-party aspect extensions to MyBase. The first, HisExt1 , capable of intercepting procedure calls and similar in flavor to AspectJ. The other, HerExt2 , an aspect extension to MyBase capable of intercepting calls to the primitive division operator for catching a division by zero before it even happens (as opposed to catching a division by zero exception after it occurs), a capability that AspectJ lacks.1 Both call interception (e.g., [27]) and checking if a divisor is zero (e.g., [5, 28, 18]) are benchmarks often used in connection with aspects. Studies of AOP typically consider the semantics for an AOPL that integrates a certain aspect extension, Ext1 , with a base language, Base. For example, Ext1 might be (a simplified version of) AspectJ [25] and Base (a simplified version of) Java [3]. The semantics for the integration Base × Ext1 is achieved by amending the semantics for the base language. Given a pair of programs hbase , aspect 1 i ∈ Base × Ext1 , the amended semantics explain the meaning of base in the presence of aspect 1 . Unfortunately, the semantics for the aspect extension and that for the base language become tangled in the process of integration. Consequently, it is difficult to reuse or combine aspect extensions. For each newly introduced aspect extension, say Ext2 , the semantics for Base × Ext2 needs to be reworked. Moreover, given the W.l.o.g., assume HisExt1 is created before HerExt2 is even conceived. If HisExt1 is to eventually work collaboratively with another aspect extension, e.g., HerExt2 , the implementation of HisExt1 must take special care to expose its AOP effect, and only its effect, in terms of MyBase. This is because an aspect 2 program written in HerExt2 would need to intercept divisions by zero not only in the base program base but also in advice introduced by an aspect 1 program written in HisExt1 . ∗ This research was supported in part by the National Science Foundation (NSF) Science of Design program under Grant Number CCF-0438971, and by the Institute for Complex Scientific Software at Northeastern University (http://www.icss.neu.edu). Failing to reify a division by zero in aspect 1 might cause a falsenegative effect in HerExt2 . Meanwhile, aspect 2 must not intercept divisions by zero, if any, in the implementation mechanism of either HisExt1 or HerExt2 . Reifying a division by zero in the implementation mechanism might cause a false-positive effect in HerExt2 . 1 1 AspectJ can neither advise primitives nor arguments. Similarly, aspect 1 must intercept not only procedure calls in base but also any matching procedure call introduced by aspect 2 . aspect 1 must not, however, intercept internal procedure calls that are a part of the implementation mechanism of either HisExt1 or HerExt2 . Specifically, our approach enables third-party composition of dynamic aspect mechanisms. We illustrate our solution for expression evaluation semantics. We model each aspect mechanism as a transformation function that revises the evaluation semantics for expressions. Note that generally aspect extensions present incompatible levels of AOP granularity [30]. In our example, aspect 1 is not expressible in HerExt2 , and aspect 2 is not expressible in HisExt1 . Therefore the problem of integrating the two cannot be reduced to translating aspect 1 to HerExt2 or translating aspect 2 to HisExt1 and using just one aspect extension. This distinguishes our objective from the purpose of frameworks (like XAspects [38]) that rely on the use of a general purpose AOPL (like AspectJ). 1.3 Outline In the rest of this paper, we demonstrate our solution to the aspect mechanism composition problem concretely through the implementation of interpreters. The next section motivates the need for composing multiple aspect extensions and demonstrates the lack of integration support in current aspect mechanisms. Section 3 presents a concrete instance of the problem: a base language MyBase with two aspect extensions, HisExt1 and HerExt2 . We present their syntax and analyze a runnable programming example implemented in our framework. In Section 4 we present our approach for the general case of integrating n aspect mechanisms. In Section 5 we revisit the example shown in Section 3 and formally demonstrate our approach by constructing the semantics for MyBase, HisExt1 , and HerExt2 . In the sequel, a base mechanism denotes an implementation of a base language semantics, an aspect mechanism denotes an implementation of an aspect extension semantics, and a multi mechanism denotes an implementation of a multi-extension AOPL. 1.2 Objective and Contribution We describe a general method for implementing the base mechanism and the aspect mechanisms in such a way that multiple, independent aspect mechanisms can be subject to third-party composition and work collaboratively. By third-party composition of aspect mechanisms we mean a semantical framework in which distinct aspect mechanisms can be assembled with the base mechanism into a meaningful multi mechanism without modifying the individual mechanisms. The mechanisms are said to be collaborative units of composition if the semantics of the composed multi mechanism can be derived from the semantics of the mechanisms that comprise it. 2. MOTIVATION There is a growing need for the simultaneous use of multiple domainspecific aspect extensions. The need steams mainly from the favorable trade-offs that a domain-specific aspect extension can offer over a general purpose AOPL: • Abstraction. A general purpose AOPL offers low-level abstractions for covering a wide range of crosscutting concerns. Domain specific aspect extensions, in contrast, can offer abstractions more appropriate for the crosscutting cases in the domain at hand, letting the programmer concentrate on the problem, rather then on low-level details. More precisely, let B denote the base mechanism for Base. Let M1 , . . . , Mn denote the aspect mechanisms for Ext1 , . . . , Extn , respectively. The aspect mechanism composition problem is to enable the third-party composition of M1 , . . . , Mn with B into a multi mechanism A, in a mannar similar to the assembly of software components:2 • Granularity. The granularity of an aspect extension dictates all possible concern effect points within an application. Combining domain-specific aspect extensions allows to overcome the fixed granularity limitation of general purpose AOPLs [30]. • Units of independent production. The aspect mechanisms M1 , . . . , Mn are independently defined. The base mechanism B is defined independently from M1 , . . . , Mn . To enable the composition, M1 , . . . , Mn rely only on B and have an explicit context dependency only on A. • Expressiveness versus Complexity. The granularity of a generalpurpose AOPL exposes a non-linear relationship between the language expressiveness and complexity. An increase in the language granularity would significantly increase the language complexity while achieving a relatively small increase in expressiveness. Domain specific aspect extensions, in contrast, can offer independent diverse ontologies [48]. • Units of composition. The mechanisms are subject to thirdparty composition. The multi mechanism A for the combined AOP language is constructed (denoted by a ⊞ combinator) by composing the base mechanism with the aspect mechanisms without altering them: A = ⊞hB, M1 , . . . , Mn i The need also arises from the sheer abundance of available aspect extensions (and their evolving aspect libraries). For the Java programming language alone there are numerous aspect extensions that are being used in a variety of commercial and research projects. These include: AspectJ (ajc [12] and abc [4]), AspectWerkz [6], COOL [29], JBoss-AOP [2], JAsCo [43], Object Teams [21], ComposeJ [50], to name just a few.3 Ability to use these aspect extensions together will allow to reuse exiting (and future) aspect libraries written for the different aspect extensions. • Units of collaboration. The semantics for the composed multi mechanism A is the “sum” of the semantics provided by all the mechanisms. Independence enables third-party development of aspect mechanisms; composability enables third-party composition of aspect mechanisms; and collaboration enables the desired behavior in the constructed AOP language. Unfortunately, little support is provided for the integration of distinct aspect mechanisms. Each aspect mechanism creates its own 2 A software component is a unit of composition with contractually specified interfaces and explicit context dependencies only. A software component can be deployed independently and is subject to third-party composition [40]. 3 For a complete list of commercial and research aspect extensions see http://www.aosd.net/technology/ 2 Listing 2: Synchronization aspect in COOL Listing 1: A non-synchronized bounded buffer 1 public class BoundedBuffer { 1 2 2 private private private private private 3 4 5 6 7 Object[] buffer; int usedSlots = 0; int writePos = 0; int readPos = 0; static BoundedBuffer singltn = null; 3 4 Listing 3: Synchronization aspect in AspectJ 8 public static BoundedBuffer getInstance() { return singltn; } 9 10 11 1 2 3 public aspect BufferSyncAspect { private Object remove_thread=null; private Object add_thread=null; 4 12 public BoundedBuffer (int capacity) { this.buffer = new Object[capacity]; singltn = this; } 13 14 15 16 Object around(): execution(Object BoundedBuffer.remove()) { Object this_thread = Thread.currentThread(); synchronized(this) { while ((remove_thread!=null && remove_thread!=this_thread) || (add_thread!=null && add_thread!=this_thread)) try {wait(); } catch (InterruptedException e) {} remove_thread = this_thread; } Object result = proceed(); synchronized(this) { remove_thread = null; notifyAll(); } return result; } 5 6 7 8 9 17 public Object remove() { if (usedSlots == 0) {return null;} Object result = buffer[readPos]; buffer[readPos] = null; usedSlots--; readPos++; if (readPos==buffer.length) readPos=0; return result; } 18 19 20 21 22 23 24 25 10 11 12 13 14 15 16 17 18 26 public void add(Object obj) throws Exception { if (usedSlots==buffer.length) throw new Exception("buffer is full"); buffer[writePos] = obj; usedSlots++; writePos++; if (writePos==buffer.length) writePos=0; } 27 28 29 30 31 32 33 34 35 coordinator BoundedBuffer { selfex {add, remove}, mutex {add, remove}; } } 19 20 21 22 23 24 void around() throws Exception: execution(void BoundedBuffer.add(Object)) { Object this_thread = Thread.currentThread(); synchronized(this) { while ((remove_thread!=null && remove_thread!=this_thread) || (add_thread!=null && add_thread!=this_thread)) try {wait(); } catch (InterruptedException e) {} add_thread = this_thread; } try{proceed();} finally { synchronized(this) { add_thread = null; notifyAll(); } } } 25 26 27 28 29 30 unique program representation which often excludes foreign aspects. Consequently, interaction between multiple aspect mechanisms operating on a single program can produce unexpected or incoherent results. 31 32 33 34 35 36 2.1 Example Consider a bounded buffer example implemented in Java (Listing 1). Suppose you have three aspect extensions to Java at your disposal: 37 38 39 40 41 42 43 • COOL [29]—a domain-specific aspect extension for expressing coordination of threads; 44 45 } • AspectWerkz [6]—a general purpose lightweight AOP framework for Java; {add, remove} specifies that add may not be executed by a thread while remove is being executed by a different thread, and vice versa. In addition, the selfex exclusion set prohibits different threads from simultaneously executing either add or remove.4 • AspectJ—a general purpose aspect extension for Java; and two concerns to address, namely, a synchronization concern and a tracing concern. The COOL code is expressive, concise, readable, and easy to understand. It provides the right abstractions. Studies [33, 46, 32, 47] have shown that “participants could look at COOL code and understand its effect without having to analyze vast parts of the rest of the code”, and that “COOL as a synchronization aspect language eased the debugging of multi-threaded programs, compared to the 2.1.1 COOL versus AspectJ The synchronization concern can be expressed as a coordinator aspect in COOL (e.g., Listing 2) or alternatively as an aspect in AspectJ (e.g., Listing 3). 4 The COOL aspect (Listing 2) provides an elegant declarative description of the desired synchronization. The mutex exclusion set However, the same thread is not prohibited from entering both add and remove. 3 @Before call(* *.*(..)) && !cflow(within(AWLogger)) Listing 4: Logger aspect in AspectWerkz 1 2 3 4 5 6 7 specifies that the log method is to be called for every method call not in the dynamic control flow of methods in AWLogger. /∗∗ @Aspect(”perJVM”) ∗/ public class AWLogger { /∗∗@Before call(∗ ∗.∗(..))&&!cflow(within(AWLogger))∗/ public void log(JoinPoint jp) { System.out.println("AW:"+jp.getSignature()); } } Listing 5 is an auditing aspect in AspectJ. The toLog() pointcut specifies that every method call should be logged. The before, after()returning, and after()throwing advice add log messages to the buffer. Arguably, if AspectWerkz and AspectJ were designed to be composable third-party aspect mechanisms, building AspectJ 5 would have been much easier. Moreover, third-party composition of aspect mechanisms would have made other domain specific combinations possible, like combining COOL with AspectWerkz and Java. Listing 5: Buffer Logger 1 public aspect BufferLogger { 2 pointcut toLog(): call(* *.*(..)) && !cflow(within(BufferLogger) ); 3 4 2.2 Lack of Integration Support 5 before(): toLog() { log("ENTER",thisJoinPoint); } after() returning: toLog() { log("EXIT",thisJoinPoint); } after() throwing: toLog() { log("THROW",thisJoinPoint); } 6 7 8 9 10 11 12 13 14 Unfortunately, current aspect mechanisms fail to compose correctly. We demonstrate this failure on the bounded buffer example for two commonly used approaches: • Translation. Aspect programs in different aspect extensions can be translated to a common target aspect extension. • Instrumentation. Aspect mechanisms can be implemented by means of program instrumentation. Such multiple independent aspect mechanisms can be trivially composed by passing the output of one aspect mechanism as the input to another aspect mechanism. 15 protected void log(String aType,JoinPoint jp) { BoundedBuffer buf=BoundedBuffer.getInstance(); if (buf==null) return; try{buf.add(jp);} catch (Exception e) { System.out.println(e.getMessage()); } } 16 17 18 19 20 21 22 23 2.2.1 No Behavior-Preserving Translation } ability to debug the same program written in Java” [45]. While it is possible to express the same concern in AspectJ, the code will be much longer. In comparison to the COOL code, the AspectJ implementation (Listing 3) requires 10 times more lines of code. It is also harder to explain. The aspect implements a monitor using two condition variables remove_thread and add_thread. Using two pieces of around execution advice, the aspect obtains locks (remove_thread and add_thread) for the duration of executing proceed (execution of remove and add, respectively). This guarentees that no more than one thread operates on the buffer at a time. If remove_thread or add_thread are locked by some other thread, the advice waits. When the thread has a lock, it runs proceed and afterwards releases the lock by signaling notifyAll(), which in turn wakes up other waiting threads. The translation approach requires the expressiveness of the target aspect extension to support arbitrary granularity. Even when granularity does not pose a problem, a translation from one aspect language to another will not generally preserve the behavior of the source aspect program in the presence of other aspects. Consider the synchronization concern implementation in COOL (Listing 2). Translating it to AspectJ (Listing 3) results in an aspect that seems to be a correct substitution for the COOL coordination aspect, but in the presence of the Logger aspect (Listing 5) is actually not. A property of the COOL synchronization concern is transparency with respect to the AspectJ logging concerns. There should not be any interference between the two. The COOL aspect does not contain any join points that should be visible to the AspectJ mechanism. This property is not preserved in the translation. Calls to wait (Listing 3, lines 13 and 33) and notifyAll (Listing 3, lines 20 and 41), which do not exist in the COOL code, will nonetheless be unexpectedly reflected by the logger.5 Worse yet, the unexpected join points in the target program may break existing invariants, resulting in our case in a deadlock. An implicit invariant of the COOL aspect is that if both add and remove are not currently executing by some other thread, then the thread can enter and execute them. The AspectJ synchronization aspect, however, violates this invariant. Assume that two threads concurrently access the buffer. The first thread acquires the lock, while the second invokes wait on the BufferSyncAspect object. However, before wait is invoked, the BufferLogger aspect calls BoundedBuffer.add (Listing 5, line 19). The latter call causes the second thread to enter the guarded code again and trigger a second call to wait.6 Since 2.1.2 AspectWerkz + AspectJ Semantically, the underlying mechanisms of AspectWerkz and AspectJ are essentially equivalent. Yet, their syntactical differences present programmers with a desired choice of alternatives. Recently is was announced that AspectWerkz has joined the AspectJ project to bring the key features of AspectWerkz to the AspectJ 5 platform [7]. This merger will allow aspects like those in Listing 4 and Listing 5 to run side by side. Listing 4 is a simple tracing aspect in AspectWerkz. The code is plain Java. The annotation @Aspect("perJVM") specifies that the AWLogger class is actually a singleton aspect. The annotation 5 6 4 Note that calls to wait and notifyAll cannot be avoided. Assuming that the first thread still owns the lock. cflow-pcd, and args-pcd. The and-pcd and or-pcd allows one to combine several pointcuts under conjunction and disjunction, respectively. Unlike AspectJ, around is the only advice kind in HisExt1 . There is no support for patterns in pointcut designators. HisExt1 introduces a new proceed-exp expression, which is valid only within an HisExt1 advice body expression. the second wait call is in the cflow of the logger, it is not advised, and the thread finally suspends. When the first thread releases the lock, the second thread wakes up after the second wait. It acquires the lock, completes the advice execution, releases the lock, and proceeds to the first wait invocation. At this point, the buffer is not locked; the second thread waits on the BufferSyncAspect object monitor; and if no other thread ever accesses the buffer, the second thread waits for ever—-deadlock! 3.1.3 HerExt2 Syntax HerExt2 allows one to declare a set of exception handlers in MyBase for catching and handling division by zero before an exception occurs. Advice code in HerExt2 specifies an exception handler expression. A guard clause allows one to specify a dynamic scope for the handler. HerExt2 introduces a new expression, namely raise-exp, which is allowed within a handler. It passes the exception handling to the next handler (in a manner, similar to proceed-exp of HisExt1 ). The syntax of the language is given in Figure 3. 2.2.2 No Correct Order for Sequential Processing One would expect the two aspects written in AspectWerkz (Listing 4) and AspectJ (Listing 5) to interact as if they were two aspects written in a single aspect extension (e.g., the future AspectJ 5 platform). On the one hand, the AspectJ logger should log all method calls within the AWLogger aspect. On the other hand, the AspectWerkz logger should log all method calls within BufferLogger. (And both should log all method calls in the base program as well.) However, applying the AspectJ and AspectWerkz instrumentation mechanisms sequentially, in any order, produces an unexpected result. The mechanism that is run first may not be able to interpret the second extension’s aspect program. Specifically, the AspectWerkz mechanism does not understand AspectJ’s syntax. It can be applied to the bounded buffer code but not to the BufferLogger aspect. Thus, when AspectWerkz is run first, some expected log messages will be missing. The semantics for HerExt2 is straightforward. Whenever the second argument to the division primitive evaluates to zero, the advice handler (if one exits) is invoked. The handler is evaluated and the result value substitutes the offending zero in the second argument to the division primitive, and the program execution resumes. Listing 8 shows an aspect we can write in HerExt2 . This aspect resumes the execution with the value of Precision(1) whenever the second argument of a division primitive evaluates to 0 within the control flow of the SQRT procedure. The mechanism that is run last logs method calls that are not supposed to be logged. For example, when AspectWerkz is run second, the following unexpected log message is generated by the AWLogger aspect: 1 3.2 A Programming Example The semantics for the base procedural language MyBase and the aspect extensions HisExt1 and HerExt2 are implemented as interpreters [19]. The example presented here is a simple executable arithmetic program in MyBase for computing the square root of a given number. While simple, the example is representative in terms of illustrating the complexity of achieving collaboration among aspect extensions, and its semantics serves as a proof of concept. AW:public void BufferLogger. ajc$afterReturning$BufferLogger$2$ba1fbd8a( org.aspectj.lang.JoinPoint) 3. PROBLEM INSTANCE We now return to MyBase, HisExt1 , and HerExt2 in order to analyze the problem and illustrate our approach concretely. After a brief introduction to the syntax, we informally explain MyBase, HisExt1 , and HerExt2 through a programming example. The code fragments are actual running code in our implementation, and their semantics is formally presented in Section 5. The procedure SQRT in Listing 6 implements in MyBase a simple approximation algorithm using a sequence generated by a recurrence relation: a0=approximation ; repeat an=f (an−1 ) until precise By default, it sets a0 = 0, and calls SqrtIter to generate the recurrence sequence: 3.1 Syntax 3.1.1 MyBase Syntax The syntax of MyBase is given in Figure 1. MyBase is a procedural language. Procedures are mutually-recursive with call-by-value semantics. The set of procedures is immutable at run-time. Expressed values are either booleans or numbers (but not procedures). The execution of a program starts by evaluating the body of a procedure named main. an = an−1 + ǫ until (an )2 > x. The procedure Improve generates the next element in the sequence; IsPreciseEnough? checks the termination condition; and the value ǫ = ǫ(x) is computed as a function of x by the procedure Precision. √ The resulted computation of x is inaccurate and extremely inefficient. However, it serves our purpose well. We will non-intrusively improve its efficiency using an aspect in HisExt1 . We will correct its behavior for the singular point x = 0 using HerExt2 . 3.1.2 HisExt1 Syntax The syntax for HisExt1 is given in Figure 2. HisExt1 is a simple AspectJ-like aspect extension to MyBase. HisExt1 allows one to impose advice around procedure calls and procedure executions. Advice code is declared in a manner similar to procedures. Like in AspectJ, the set of advice is immutable at run-time. Each advice has two parts: a pointcut designator and an advice body expression. Atomic pointcuts are pcall-pcd, pexecution-pcd, The code in Listing 7, written in HisExt1 , advises the base code for drastically improving its efficiency and accuracy. Four pieces of advice are used. The first around advice (lines 202–204) intercepts executions of the procedure Improve and instead applies 5 Program Declaration Procedure Exps ::= ::= ::= ::= lit-exp true-exp false-exp var-exp app-exp begin-exp if-exp assign-exp let-exp primapp-exp Prim Id PName Number ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= Declaration “program” “{” Procedure∗ “}” “procedure” PName “(” Id∗ “)” Exps lit-exp | true-exp | false-exp | var-exp | app-exp | begin-exp | if-exp | assign-exp | let-exp | primapp-exp Number “true” “false” Id “call” PName “(” Exps∗ “)” “{” Exps ( “;” Exps )∗ “}” “if” Exps “then” Exps “else” Exps “set” Id “=” Exps “let” ( Id “=” Exps )∗ “in” Exps Prim “(” Exps∗ “)” “+” | “-” | “*” | “/” Program Declaration Procedure Expressions Numbers True False Id meaning Procedure call Block Conditional Assignment Let Primitive application Primitives Identifier Procedure name Numbers Figure 1: MyBase syntax AOP1-Program AOP1-Declaration Advice Pointcut ::= ::= ::= ::= call-pcd exec-pcd cflow-pcd args-pcd and-pcd or-pcd Exps1 proceed-exp ::= ::= ::= ::= ::= ::= ::= ::= AOP1-Declaration “aop1” “{” Advice∗ “}” “around” “:” Pointcut Exps1 call-pcd | exec-pcd | cflow-pcd | args-pcd | and-pcd | or-pcd “pcall” “(” PName “)” “pexecution ” “(” PName “)” “cflow” “(” PName “)” “args” “(” Id∗ “)” “and” “(” Pointcut∗ “)” “or” “(” Pointcut∗ “)” Exps | proceed-exp “proceed” HisExt1 program HisExt1 declaration Advice Pointcut designators Procedure call pcd Procedure execution pcd Control flow pcd Argument pcd Conjunction pcd Disjunction pcd Advice expressions Proceed exp Figure 2: HisExt1 syntax AOP2-Program AOP2-Declaration Handler Exps2 raise-exp ::= ::= ::= ::= ::= AOP2-Declaration “aop2” “{” Handler∗ “}” “guard cflow” PName “resume with” Exps2 Exps | raise-exp “raise” Figure 3: HerExt2 syntax 6 HerExt2 program HerExt2 declaration Handlers Handler expressions Raise expressions Listing 6: A naıve program in MyBase for computing 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 √ (num-val 161/72) x program { procedure SQRT(radicand) { call SqrtIter(0,radicand,call Precision(radicand )) } procedure SqrtIter(approximation,radicand, precision) { let bid = call Improve(approximation,radicand, precision) in if call IsPreciseEnough?(bid,radicand) then bid else call SqrtIter(bid,radicand,precision) } procedure Improve(approximation,radicand, precision) { +(approximation,precision) } procedure Precision(x) {1} procedure IsPreciseEnough?(root,square) { lt?(square,call Square(root)) } procedure Square(x) {*(x,x)} procedure Abs(x) {if lt?(x,0) then -(0,x) else x} procedure main() {call SQRT(5)} } meaning 211 aop1 { around: and(pexecution(Improve) args(an,x,epsilon)) { /(+(an,/(x,an)),2) } around: and(pexecution(IsPreciseEnough?) args(root,x) ) { lt? (call Abs(-(x,call Square(root))),call Precision(x)) } around : pcall(Precision) { /(proceed,1000) } } 301 aop2 { guard cflow SQRT resume with call Precision(1) } 202 203 204 205 206 207 208 209 210 = 2.2361111 = √ . √ 5.0001929 = 5. The improved program works well for all non-negative inputs to SQRT, except for when the radicand is 0. In this case, Improve is called with the first argument an set to 0. The execution of Improve triggers the advice around Improve execution which divides x by an . Since the value of an is 0 an exception occurs. 3.3 Third-party Composition The main point of this example is that HisExt1 and HerExt2 are subject to third-part composition with MyBase and work collaboratively: • Units of independent production. HisExt1 and HerExt2 are independently constructed. • Units of composition. MyBase, HisExt1 , and HerExt2 are units of composition. MyBase can be used by itself (running only Listing 6). MyBase can be used with HisExt1 alone (omitting Listing 8). MyBase can be used with HerExt2 alone (omitting Listing 7). MyBase can be used with both HisExt1 and HerExt2 . • Units of collaboration. When HisExt1 and HerExt2 are both used they collaborate. In the absence of HerExt2 , calling Listing 7: Advice in HisExt1 for using Newton’s method 201 161 72 call SQRT(0) results in Error in /: undefined for 0. However, when HerExt2 with the advice code in Listing 8 are present, the correct value 0 is returned. The violating primitive division application is introduced by the advice of HisExt1 , yet intercepted by the advice of HerExt2 . This desired behavior is non-trivial because HisExt1 was constructed without any prior knowledge of HerExt2 . Listing 8: Advice in HerExt2 for preventing an exception 3.4 Analysis In order to achieve a correct collaboration: • The aspectual effect of all extension programs needs to be exposed to all the collaborating aspect mechanisms. Newton’s method: an+1 = 1 2  an + x an  • Each individual aspect mechanism must hide its implementation from other aspect mechanisms. The second around advice (lines 205–207) intercepts IsPreciseEnough? 3.4.1 Exposure of Aspectual Effect executions and checks instead whether or not (an )2 − x < ǫ 1 In the context of multiple distinct aspect mechanisms, certain elewhere ǫ = 1000 is set in the third around advice (lines 208–211). ments of the aspect program should be exposed to all collaborating The successive approximations now converge quadratically. aspect mechanisms. We call these elements the aspectual effect. The aspectual effect of an aspect program generally specifies the Running main and calling implementation of a crosscutting concern. We assume that the ascall SQRT(5) pectual effect is expressed in the base language. In our example, the aspectual effect of an aspect 1 ∈ HisExt1 is specified by advice-body expressions; the aspectual effect of an aspect 2 ∈ HerExt2 is specified by handler expressions. When HisExt1 and HerExt2 are composed together, their mechanisms must returns 7 7 The result shown is the actual value returned by the Scheme [36] implementation. 7 reflect each other’s effect. Specifically, HisExt1 aspects must be able to advise procedure calls made from the HerExt2 handler expressions; and HerExt2 handlers must be able to intercept exceptions introduced by the HisExt1 pieces of advice. self-eval evaluate B A=B 3.4.2 Hiding of Mechanism Implementation An aspect extension extends the base language with new functionality. For example, HisExt1 adds advice binding, and HerExt2 adds exception handling to the base language. An aspect mechanism that implements the new functionality must hide its internal operations from the other aspect mechanisms. In our example, pointcut matching and advice selection operations of the HisExt1 mechanism must be hidden from the HerExt2 mechanism. Conversely, testing whether the second division primitive argument evaluates to zero and the exception handler selection of HerExt2 should be invisible to the HisExt1 mechanism. 4. self-eval evaluate self-eval delegate-eval M1 B A = ⊞hB, M1 i self-eval evaluate delegate-eval OUR APPROACH Mn self-eval self-eval delegate-eval M1 B A = ⊞hB, M1 , . . . , Mn i Now that we have illustrated a desired behavior, we explain our solution to the aspect mechanism composition problem in general. Figure 4: Mixing-like composition of aspect mechanisms 4.1 Aspect Mechanisms as Mixins The primary idea is to view an aspect mechanism that extends a base mechanism as a mixin [13] that is applied to the base mechanism description. A description of a mechanism is an encoding of its implementation (e.g., a configuration of an abstract machine or its semantics). An aspect mixin mechanism transforms some of the base mechanism description and introduces some additional description.8 sidered a collaborative unit provided it properly hides, delegates, or exposes the evaluation. Notation. The following notations are pertinent. We express functions in Curried form. The Curried function definition By keeping a clean separation between the descriptions of the base and aspect mechanisms, the aspect mixin mechanism may be composed with other mechanisms that extend the same base language. The particular composition strategy may differ. In the next section we show a concete instance of this general approach. fn pat1 pat2 . . . patn ⇒ exp is the same as the lambda expression λ pat1 .λ pat2 . . . . λ patn .exp. Correspondingly, we write a list of function arguments with no parentheses or commas to express a function application that takes the first argument as its single parameter, which could be a tuple, constructs and returns a new function, which then takes the next argument as its single parameter, and so on. In function types, ‘→’ associates to the right. 4.2 Solution Instance We illustrate the approach specifically for expression evaluation semantics. To build a multi mechanism, the composed aspect mechanisms are organized in a chain-of-responsibility [20], pipe-andfilter architecture [37] (Figure 4). Each aspect mechanism performs some part of the evaluation and forwards other parts of the evaluation to the next mechanism using delegation semantics [8] (“super”-like calls). If an expression is delegated by all mechanisms then it is eventually evaluated in B. All the mechanisms defer to A for the evaluation of recursive and other “self”-calls. We use the form (id as pat) in a formal argument to bind an identifier id to a value and match the value with a pattern pat. Variables in the pattern bind to their corresponding values. We use val pat = val to split apart a value. The symbol ‘ ’ stands for an anonymous variable (don’t care). The symbol ⋄ denotes an empty mapping and [] denotes an empty list. 4.2.1 Overall Semantics A subtlety in designing a collaborative aspect mechanism is deciding what to hide, what to delegate, and what to expose. A mechanism may hide its effect by directly reducing an expression. A mechanism may refine the next mechanism’s semantics by delegating the evaluation. A mechanism may expose its effect by evaluating expressions in A. The latter allows what is known as “weaving”. The exposed expressions are then evaluated collaboratively by all the mechanisms. As a result, an effect of an aspect mechanism is made visible to all the other mechanisms. Hence, the mechanisms reflect one another’s effect. Overall, a mechanism is con- Let A[exp℄ denote the meaning of an AOP expression exp. Our goal is to be able to build the multi mechanism A by composing the base mechanism B and the mutually independent aspect mechanisms M1 , . . . , Mn . Base introduces a domain Exp0 of base expressions. In addition, each of the extensions Ext1 , Ext2 , . . . , Extn may introduce its own respective domain of additional expressions Exp1 , Exp2 , . . . , Expn .9 The domain of AOP expressions ExpA is hence a union of pairwise disjointed expression domains defined by: 8 We generally assume that granularity requirements of an aspect mechanism can always be satisfied by either taking the most finegrained description form (e.g., small-step operational semantics), or refining (e.g., annotating) the current description. ExpA = Exp0 + Exp1 + Exp2 + · · · + Expn 9 8 We assume that Expi ∩ Expj = φ for all 0 ≤ i < j ≤ n. 4.2.3 Design Guidelines for an Aspect Mechanism The additional expressions are concern integration instructions for the respective aspect mechanism. A concern implementation, on the other hand, is expressed using base language expressions in Exp0 only. We construct the aspect mechanism Mi for an aspect extension Exti as the override combination10 of a semantics transformer T i and a semantical function Ei : val Mi = E XAMPLE 1. HisExt1 introduces a proceed-exp and HerExt2 a raise-exp to specify nesting of advice and handler executions, respectively. An aspect 1 ∈ HisExt1 in implemented in Exp0 + {proceed-exp} and an aspect 2 ∈ HerExt2 in Exp0 +{raise-exp}. fn eval ⇒ (T i eval ) ⊕ Ei Semantics for the Exti ’s newly introduced expression domain Expi is defined by: Ei : Expi → ContA The introduction of Exti into the base language also requires a change to the evaluation semantics for a non-empty11 subset of the existing base language expressions Expi0 ⊆ Exp0 . We define this part of the semantics for Exti as a language semantics transformer: We use the term AOP configuration to denote the state of a multi mechanism A. An AOP configuration cfg ∈ CfgA is a vector of configurations of the composed mechanisms: CfgA = Cfg0 × Cfg1 × Cfg2 × · · · × Cfgn Eval Evali0 0 z }| { z }| { T i : (Exp0 → ContA ) → (Expi0 → ContA ) where Cfg0 denotes a domain of the base mechanism states, and Cfgi , 1 ≤ i ≤ n, denotes a domain of the aspect mechanism Mi states. The semantics transformer T i should adhere to the following design principles: E XAMPLE 2. Informally, a MyBase mechanism configuration comprises a procedure environment, a variable environment, and a store. A HisExt1 mechanism configuration comprises a list of advice, a “current” join point, and a “current” proceed computation. • T i defines the semantics for Exti and nothing more. Let B′ denote a semantical function with the same signature as B or an extended signature.12 T i (B′ ) delegates the evaluation to B′ whenever the base language semantics is required. The effect of evaluating an expression exp ∈ ExpA is to change the AOP configuration. The meaning of an expression exp ∈ ExpA , denoted A[exp℄, is defined to be a partial function on configurations: • T i (B′ ) accesses only the Cfg0 - and Cfgi -elements in a cfg ∈ CfgA configuration, while the rest are carried through the computation. ContA }| { z A : ExpA → (CfgA ֒→ CfgA ) Note that allowing the aspect mechanism access to the Cfg0 element is needed for modeling interesting cases of aspect mechanism interactions. We denote by ContA the set of partial functions on CfgA . 4.2.2 Design Guidelines for the Base Mechanism B provides semantics for expressions in Base. The meaning of an expression exp ∈ Exp0 in Base, denoted B[exp℄, is expected to be defined as: 4.2.4 Third-party Construction of an AOP Language Let B denote the Base mechanism, and let {ki }n i=1 be an ordered index set. Let Mk1 , . . . , Mkn denote the aspect mechanisms for the aspect extensions Extk1 , . . . , Extkn , respectively. B : Exp0 → ContA The semantical function B should adhere to the following design principles: We construct the multi mechanism A as the composition: A = ⊞hB, Mk1 , . . . , Mkn i • All sub-reductions within a B-reduction are reduced by calling A instead of B. where the composition semantics for ⊞ is defined as following. The meaning of exp ∈ ExpA , denoted An [exp℄ cfg , is given by the recurrence relation: • B only accesses and updates the head Cfg0 -element of the cfg ∈ CfgA configuration, and carries the tail through the computation. A0 = B An = An−1 ⊕ (Mkn An−1 ) By construction, Note that the fact that B is defined in terms of CfgA does not mean that A or n are known at the time of writing B. At the time of writing the base mechanism, A is assumed to be:  exp ∈ Exp0 B [exp ℄ A[exp ℄ = ⊥ otherwise  An : Exp0 + Expk1 + · · · + Expkn → ContA is of the right signature and obeys the composition principle. To illustrate the construction, we conclude by elaborating the first three instances: 10 where ⊥ stands for “undefined”. Let B̂ : Exp0 → Cfg0 → Cfg0 denote the evaluation semantics for Base with its standard signature. B̂ is extended to have the signature of B (without knowing n) as follows: ∀exp ∈ Exp0 , ∀cfg = cfg 0 :: cf g ∗ ∈ CfgA :  cfg ′0 :: cf g ∗ B̂[exp ℄ cfg 0 = cfg ′0 B[exp ℄ cfg = ⊥ B̂[exp ℄ cfg 0 = ⊥ For two partial functions g and h, their override combination g⊕h (h overrides g), is  defined by: h(x) x ∈ dom h (g ⊕ h)(x) =def g(x) otherwise 11 W.l.o.g., assume Expi0 6= φ. 12 An extended B may have a signature B′ : Exp′0 → CfgA , where Exp′0 ⊇ Exp0 . 9 Expi Exti annotated-exp = procbody-exp procarg-exp primarg-exp assignrhs-exp block-exp letbody-exp letrhs-exp if-exp then-exp else-exp = = = = = = = = = = Expi0 Base Exp0 j Exp0 Extj Expj Figure 5: Expression Domains for l = 2 • For l = 0, we have that ExpA = Exp0 , and the meaning of exp ∈ ExpA is the same as the meaning of exp in Base: Figure 6: Annotated Expressions φ A : Exp0 → ContA Aφ [exp℄ cfg = B[exp℄ cfg • For l = 1 and the singleton index set {i} for some 1 ≤ i ≤ n, we have that ExpA = Exp0 + Expi . The meaning of exp ∈ ExpA is app-exp begin-exp cond-exp assign-exp let-exp = = = = = primapp-exp = A{i} : (Exp0 + Expi ) → ContA Mi B cfg 0 ∈ Cfg0 z }| { = B ⊕ (T i B) ⊕ Ei A   Ei [exp℄ cfg A{i} [exp℄ cfg = (T i B)[exp℄ cfg  B[exp℄ cfg envV ∈ EnvV sto ∈ Store envP ∈ EnvP θ ∈ Proc exp ∈ Expi exp ∈ Expi0 otherwise • For l = 2 and the ordered index set {i, j} for some 1 ≤ i, j ≤ n, we have that ExpA = Exp0 + Expi + Expj (Figure 5). The meaning of exp ∈ ExpA is Procedure call Block Conditional exp Assignment Let Primitive app = EnvP × EnvV × Store = Var → Loc = Loc → Val = PNm → Proc = Var∗ × procbody-exp Base configuration Variable envs Value Stores Procedure envs Procedures Figure 8: MyBase domains Annotated expressions (Figure 6) extend the interface of the base mechanism to satisfy granularity needs of the HisExt1 and HerExt2 mechanisms. A complex expression (Figure 7) includes annotated expressions as subexpressions. A{i,j} : (Exp0 + Expi + Expj ) → ContA We construct: Mj A{i} A{i,j} PNm × procarg-exp∗ block-exp∗ if-exp × then-exp × else-exp Var × assignrhs-exp Var∗ × letrhs-exp∗ × letbody-exp P rim × primarg-exp∗ Figure 7: Complex Expressions We construct: {i} procbody-exp |procarg-exp |primarg-exp | assignrhs-exp |block-exp |letbody-exp | letrhs-exp |if-exp |then-exp |else-exp Exp0 × PNm Procedure body Exp0 × (PNm × Var) Procedure arg Exp0 × (P rim × Int) Primitive arg Exp0 × Var Assignment RHS Exp0 × Int Block element Exp0 × Var∗ Let body Exp0 × (Var × Int) Let env RHS Exp0 × {if} If exp Exp0 × {then} Then exp Exp0 × {else} Else exp }| { z = A{i} ⊕ (T j A{i} ) ⊕ Ej The base configuration domain Cfg0 consist of a procedure environment domain EnvP , a variable environment domain EnvV , and a value store domain Store (Figure 8). A procedure is represented as a closure that contains argument names and a procedure body expression. The other definitions are omitted.  Ej [exp℄     E i [exp℄    (T j B)[exp℄ {i,j} A [exp℄ =  (T i B)[exp℄     (T j (B ⊕ (T i B)))[exp℄   B[exp℄ exp ∈ Expj exp ∈ Expi exp ∈ Expj0 − Expi0 exp ∈ Expi0 − Expj0 The evaluation semantics B (Figure 9) for Exp expressions sat0 exp ∈ Expi0 ∩ Expj0 isfies the design principles for the base mechanisms: (1) all exotherwise pression evaluations in B are exposed to A (highlighted in the figure); (2) it accesses and updates only the Cfg0 -element of the 5. IMPLEMENTATION configuration; (3) the other configurations are carried through the As a proof of concept we have implemented MyBase, HisExt1 , and computation. HerExt2 for the example presented in Section 3. This section provides the implementation details more formally to the so-inclined 5.2 Aspect Mechanism Implementation reader. The aspect mechanisms are implemented as mixins to the base mechanism (Figure 10). The semantics for Exti is specified using 5.1 Base Mechanism Implementation three constructor functions: The domain ExpA of AOP expressions includes MyBase, HisExt1 , and HerExt2 expressions. We define Exp0 by extending the • build- Ei constructs an evaluator for Expi expressions: expression set Exps with a set of annotated expressions: Exp0 = Exps + annotated-exp build- Ei : Int → (Expi → ContA ) 10 val B : Exp0 → ContA = fn (lit-exp hnumi) h , , sto i :: cfg ∗ ⇒ h⋄, ⋄, sto [0 7→ (num-val num)]i :: cfg ∗ | fn (true-exp hi) h , , sto i :: cfg ∗ ⇒ h⋄, ⋄, sto [0 7→ (bool-val #t)]i :: cfg ∗ | fn (false-exp hi) h , , sto i :: cfg ∗ ⇒ h⋄, ⋄, sto [0 7→ (bool-val #f)]i :: cfg ∗ | fn (app-exp hpname, [exp1 , . . . , expn ]i) cfg 0 :: cfg ∗ let val henvP , envV , sto i = cfg 0 val h , , sto 1 i :: cf g1∗ = A exp1 henvP , envV , sto i :: cfg ∗ ... val h , , sto n i :: cf gn∗ = ∗ A expn henvP , envV , sto n−1 i :: cf gn−1 val h[id1 , . . . , idn ] , expproci = envP pname val υ1 = sto 1 0 ... val υn = sto n 0 val sto n+1 = sto n [l1 7→ υ1 ], l1 ∈ / dom sto n ... val sto 2n = sto 2n−1 [ln 7→ υn ], ln ∈ / dom sto 2n−1 in A expproc henvP , ⋄[id1 7→ l1 , . . . , idn 7→ ln ], sto 2n i :: cf gn∗ end | ... | fn (annotated-exp hexp, i) cfg ⇒ A exp cfg B #Cfg0 +eval(exp) #app-exp(pname, [exp1, ..., expn ]) #procbody-exp(expb , pname) #primarg-exp(exparg , prim, pos) ... M1 −Cfg1 +eval(exp) #app-exp(pname, [exp1, ..., expn ]) #procbody-exp(expb , pname) −proceed-exp() M2 −Cfg2 +eval(exp) #primarg-exp(exparg , prim, pos) #procbody-exp(expb , pname) −raise-exp() Figure 10: Aspect mechanisms as mixins exp ∈ Expadv cfg 1 ∈ Cfg1 adv ∈ Adv jp ∈ JP pcd ∈ PCD effect ∈ Effect bnd ∈ Bnd = Exp0 + Exp1 = Adv∗ × JP × ContA = PCD × Expadv = {call, exec} × PNm× Var∗ × Val∗ × JP + Unit = Bnd∗ × Expadv = Var × Val Advice exps Configuration Advice Join points Pointcuts Effects Binding Figure 11: HisExt1 Domains Figure 9: MyBase semantical function • build- T i constructs the semantics transformer for the Exti : Eval0 →Evali0 }| { z build- T i : Int → (Exp0 → ContA ) → (Expi0 → ContA ) • build- Mi constructs the aspect mixin mechanism Mi for Exti : val build- Mi : Int → Eval0 → (Expi0 + Expi ) → ContA = fn pos eval ⇒ (build- T i pos eval ) ⊕ (build- Ei pos) The Int arguments provides the position of the extension’s configuration domain Cfgi within CfgA . 5.2.1 HisExt1 Mechanism The aspect mechanism M1 transforms the semantics for procedure calls and executions, and supplies semantics for Exp1 ’s new proceed expression: Exp10 = {app-exp, procbody-exp} Exp1 = {proceed-exp} A configuration cfg 1 ∈ Cfg1 for HisExt1 (Figure 11) comprises a set of advice, a “current” join point, and a “current” proceed continuation. An advice adv ∈ Adv is derived directly from HisExt1 ’s syntax. A join point jp ∈ JP is an abstraction of the procedure call stack. It stores the name, formal and actual arguments of a corresponding procedure. The third element provides a meaning for proceed expressions. The effect and binding domains are internal to the mechanism. An effect carries a set of bindings and an advice local val app-eff : Int → Effect∗ → Eval0 → Eval0 = fn [] eval exp cfg ⇒ eval exp cfg | fn i hbnd∗adv , expadv i :: effect ∗ eval ⇒ fn exp henvP , envV , sto i :: cfg ∗ ⇒ let val hadv ∗ , jp, procdi = πi (cfg ∗ ) val procd′ : ContA = fn h , , sto ′ i :: cfg ∗′ ⇒ app-eff i effect ∗ eval exp henvP , envV , sto ′ i :: cfg ∗′ val henvV ′ , sto ′ i = build-adv-env bnd∗adv sto val cfg ∗′ = cfg ∗ [i 7→ hadv ∗ , jp, procd′ i] val cfg ′0 :: cfg ∗′′ = A expadv henvP , envV ′ , sto ′ i :: cfg ∗′ in cfg ′0 :: cfg ∗′′ [i 7→ hadv ∗ , jp, procdi] end ... in val build- T 1 : Int → Eval0 → Eval10 = fn i eval exp cfg 0 :: cfg ∗ ⇒ let val hadv ∗ , jpenc , procdi = πi (cfg ∗ ) val jp = build-jp exp jpenc cfg 0 val effect ∗ = match-jp jp adv ∗ val cfg ∗′ = cfg ∗ [i 7→ hadv ∗ , jp, procdi] val cfg ′0 :: cfg ∗′′ = app-eff i effect ∗ eval exp cfg 0 :: cfg ∗′ in cfg ′0 :: cfg ∗′′ [i 7→ hadv ∗ , jpenc , procdi] end end Figure 12: build- T 1 semantics 11 val build- E1 : Int → Exp1 → ContA = fn i (proceed-exp hi) (cfg as :: cfg ∗ ) ⇒ let val h , , procdi = πi (cfg ∗ ) in procd cfg end local val app-handler : Int → Exp∗hnd → ContA = fn [] cfg ⇒ cfg | fn i exp :: exp∗ henvP , , sto i :: cfg ∗ ⇒ let val hhnd∗ , stack, raisei = πi (cfg ∗ ) val υ = sto 0 val raise′ : ContA = fn henvP , envV , sto i :: cfg ∗ ⇒ app-handler exp∗ henvP , envV , sto [0 7→ υ]i :: cfg ∗ val cfg ∗′ = cfg ∗ [i 7→ hhnd∗ , stack, raise′ i] val cfg ′0 :: cfg ∗′′ = A exp henvP , ⋄, sto i :: cfg ∗′ in cfg ′0 :: cfg ∗′′ [i 7→ hhnd∗ , stack, raisei] end ... in val build- T 2 : Int → Eval0 → Eval20 = fn i eval (primarg-exp hexparg , prim, posi as exp) cfg ⇒ let val henvP , envV , i :: = cfg val (cfg ′ as h , , sto i :: cfg ∗ ) = eval exp cfg in if (sto 0 = (num-val 0) ∧ prim = “/” ∧ pos = 2) then let val hhnd∗ , stack, i = πi (cfg ∗ ) val exp∗hnd = match-handler hnd∗ stack in app-handler i exp∗hnd henvP , envV , sto i :: cfg ∗ end else cfg ′ end | fn i eval (procbody-exp hexpb , pnamei as exp) cfg 0 :: cfg ∗ ⇒ let val hhnd∗ , stack, raisei = πi (cfg ∗ ) val cfg ∗′ = cfg ∗ [i 7→ hhnd∗ , pname :: stack, raisei] val cfg ′0 :: cfg ∗′′ = eval exp cfg 0 :: cfg ∗′ in cfg ′0 :: cfg ∗′′ [i 7→ hhnd∗ , stack, raisei] end end Figure 13: build- E1 semantics body expression. The bindings provide an appropriate variable environment for evaluating the advice body expression. The interesting part of the aspect mechanism M1 implementation is given by build- T 1 (Figure 12). build- T 1 defines a transformer of the semantics for procedure calls and procedure executions. The new semantics creates a join point, matches it against an advice list, and applies selected advice effects in app-eff . The function ensures that the mechanism’s configuration properly reflects a “current” join point by setting it before and after an effect application. app-eff has two general behaviors. If the effect list is empty then the expression evaluation is delegated . Otherwise, the function exposes the effect by evaluating the advice expression expadv in A. expadv is evaluated in a properly constructed variable environment envV adv and a proceed continuation procd′ . app-eff ensures that the mechanism configuration always stores a proper proceed continuation in the same manner as build- T 1 reflects a “current” join point. This makes build- E1 straightforward (Figure 13). The meaning of a proceed-exp expression is given by the proceed continuation obtained from the configuration. The continuation then runs app-eff on the rest of the effect list. In other words, a proceed-exp expression either evaluates the next advice in A or delegates the evaluation to eval if there is no advice left. Due to space considerations, we omit the HisExt1 functions match-jp, build-jp and build-adv-env, which do not affect the mechanism composition semantics. 5.2.2 HerExt2 Mechanism The M2 mechanism for HerExt2 transforms the semantics for a primitive argument and procedure execution expressions, and supplies semantics for Exp2 ’s new raise expression: Figure 15: build- T 2 semantics Exp20 = {primarg-exp, procbody-exp} Exp2 = {raise-exp} and a “current” raise continuation. A handler hnd ∈ Handler is derived from the syntax of HerExt2 . It contains a name of a guarded procedure and a handler expression. A handler expression may contain a raise-exp expression. A configuration cfg 2 ∈ Cfg2 (Figure 14) stores a list of handlers, a stack of currently executing procedures (a list of procedure names), The new semantics for primarg-exp enables the invocation of a handler in an exceptional situation when the second argument of a division primitive evaluates to zero. In this case, build- T 2 (Figure 15) selects a list of handler expressions using match-handler and invokes them using app-handler . If no exception occurs, the original semantics is used. exp ∈ Exphnd cfg 2 ∈ Cfg2 = = hnd ∈ Handler = Exp0 + Exp2 Handler exps Handler∗ × PNm∗ × ContA Configuration PNm × Exphnd Handlers The mechanism reflects the execution stack of its configuration by transforming the semantics for procbody-exp expressions. The new semantics simply pushes the stack before and pops it after ap- Figure 14: HerExt2 Domains 12 val build- E2 : Int → Exp2 → ContA = fn i (raise-exp hi) (cfg as :: cfg ∗ ) ⇒ let val h , , raisei = πi (cfg ∗ ) in raise cfg end the original meaning and the option to override it. For example, the HisExt1 mechanism might disable the original semantics of app-exp and procbody-exp expressions when they are advised with no proceed. A mechanism can either delegate the expression evaluation to the next mechanism or evaluate the expression itself. In the latter case, the evaluated expression is “filtered” out. We call this a composition with wrapping semantics. Figure 16: build- E2 semantics Collaboration with wrapping semantics is sensitive to the order of composition. The program example in Listing 9 illustrates a collaboration with wrapping semantics. plying eval . Listing 9: Collaboration semantics in AOP app-handler produces a configuration transformer from a list of handler expressions. If the list is empty then the transformer is the identity function. Otherwise, the configuration is constructed by evaluating in A the first handler expression. The function also constructs and reflects a raise continuation in the mechanism configuration. The continuation simply applies app-handler to the rest of the handlers. 1 2 3 If the AOP language is constructed as A = ⊞ hB, M2 , M1 i M1 is applied first and replaces the procbody-exp of main with the advice body expression. Consequently, M2 does not observe the execution of main in the execution stack and would not guard the division. The program would therefore throws a divide-by-zero exception. On the other hand, if the language is constructed as The build- E2 function (Figure 16) is similar to build- E1 . The meaning of a raise-exp expression is provided by the raise continuation drawn from the configuration. Due to space considerations, we omit the match-handler function of HerExt2 . This function bars no affect on the mechanism composition semantics. A = ⊞ hB, M1 , M2 i the exception is caught. 5.3 Constructing an AOP language In wrapping semantics different mechanisms generally reflect different views of the program execution. Alternatively, one can provide a collaboration semantics where all the mechanisms share a unique program view. This can be achieved by decoupling the reification and reflection processes of a mechanism. With such semantics, every expression evaluated in A is reified by all the mechanisms. The evaluation semantics is then constructed by all the mechanism collaboratively with respect to the ordering. Given this alternative semantics, the program example in Listing 9 would produce no exception independently of the ordering of M1 and M2 . We construct the semantical function for the composed AOP language as follows: where A = ⊞ hB, M1 , M2 i M1 = build- M1 1 and M2 = build- M2 2 The meaning of a program 6.2 Alternative Semantical Operations p = hbase , aspect 1 , aspect 2 i We illustrate our approach using expression evaluation semantics. However, the idea of third-party composition of aspect extensions can be realized for other kinds of semantical operations. in the composed AOP language is defined as: M[p℄ = A expmain hcfg 0 , cfg 1 , cfg 2 i Consider a generalized form of a semantical function type: such that expmain cfg 0 cfg 1 cfg 2 6. = (app-exp h‘main, [] i) = henvP , ⋄, ⋄i = hadv ∗ , hi, ⋄i = hhnd∗ , [] , ⋄i program {procedure main() { 1 } } aop1 { around(): pexecution(main) {/(1,0)} } aop2 { guard cflow main resume with 2 } Mean = OP → ContA where OP is a domain of operation identifiers. Given CfgA = Cfg0 × Cfg∗ , Mean maps to various operations of MyBase semantics as shown in Table 1. For example, store lookup operation is identified by location. It takes a store and a (dummy) value, and returns a store and a result value. Our approach can be easily redefined to use Mean instead of expression evaluation semantics. envP = D0 [base ℄ adv ∗ = D1 [aspect 1 ℄ hnd∗ = D2 [aspect 2 ℄ DISCUSSION AND FUTURE WORK Our study of constructing an AOP language with multiple aspect extensions opens interesting research questions. 6.3 Other Solution Instances 6.1 Alternative Collaboration Semantics The specific ⊞ wrapping semantics is only an illustration of our approach in general. In this sections we discuss how alternative solution instances can be constructed. The co-existence of multiple aspect extensions raise a question concerning the desired policy of collaboration. The presented solution instance defines the combinator ⊞ operations to “wrap” aspect mechanisms around each other and around the original meaning. This grants the aspect mechanism with complete control over The wrapping semantics enables to compose arbitrary aspect mechanisms as long as the mechanisms can be defined as mixins to the 13 Type Expr. eval Store upd Store lookup Env upd Env lookup OP Exp Loc Loc Var Var Cfg0 EnvP × EnvV × Store Store Store × Val EnvV EnvV × Loc 7. RELATED WORK 7.1 Composing Aspect Extensions Several authors point out the expressiveness drawback in using a single general-purpose AOP language, and emphasize the usefulness of combining modular domain-specific aspect extensions [14, 22, 48, 38, 30]. However, the problem of composition has not received a thorough study. Table 1: Semantical operations in MyBase XAspects. Shonle et al. [38] present a framework for aspect compilation that allows to combine multiple domain-specific aspect extensions. The framework’s composition semantics is to reduce all extensions to a single general-purpose aspect extension (AspectJ). Specifically, given a set of programs written in different aspect extensions, XAspects produces a single program in AspectJ. An aspect extension program is translated to one or more AspectJ aspects. In XAspects, collaboration between the aspect extensions is realized as a collaboration between the translated AspectJ’s aspects. base mechanism description. However, wrapping does not support complex mechanism compositions. For example, a reasonable composition of AspectJ and AspectWerkz might require that, at each join point, before advice in both AspectJ and AspectWerkz aspects are executed before any around advice, and finally followed by after advice. However, such an AspectJ/AspectWerkz composition is difficult to construct using the wrapping composition semantics. The XAspects framework uses a translation-based approach. Specifically, XAspects translates programs in domain-specific aspect extensions to AspectJ. Unfortunately, in the presence of other aspects, this approach does not preserve the behavior of the domain specific aspects, and therefore the XAspects approach does not guarantee a correct result. More complex composition semantics can be provided by imposing additional requirements on the aspect mechanism design. For example, one possible approach is to specify types of aspectual effect that a mechanism can produce. With such a semantics, the overall aspectual effect can be constructed from aspectual effects of the collaborating mechanisms with regard to the effect types. Moreover, extensions in XAspects must be reducible to AspectJ. Since only a subset of aspect extensions is expressible in AspectJ, XAspects doesn’t achieve composition in general. Our approach to composition and collaboration is not based on translation. In comparison to XAspects our proposed approach is more general. 6.4 Other Mechanism Descriptions Our choice of the mechanism’s description style restricts access to the context data. Specifically, a mechanism can only access elements of the current or parent expression, environment, and stores. While this data can be sufficient for implementing the HisExt1 and HerExt2 aspect extensions for MyBase, real-world aspect extensions may generally require more information. For example, AspectJ needs access to callee and caller objects to construct a method call join point. Instantiating the approach for a description style that uses an explicit representation of the evaluation context (e.g., using a CEKS machine [15, 16]) would produce a more general solution. Concern Manipulation Environment. IBM’s new Concern Manipulation Environment provides developers with an extensible platform for concern separation: “The CME provides a common platform in which different AOSD tools can interoperate and integrate” [1]. CME would be a natural environment for a large scale application of our approach. 7.2 AOP Semantics In our solution we used annotated expressions to meet the granularity requirement of HisExt1 and HerExt2 . The same result can be achieved by using small-step operational semantics for describing the mechanisms. In this case, aspect mechanisms would transform and extend operational semantics rules of the base mechanism. Existing works in AOP semantics explain existing aspect extensions and model AOP in general. We base some of our work on these studies. Unfortunately, they do not address the problem of aspect mechanism composition directly. Semantics for Existing AOP Languages. Wand et al.’s [49] semantic for advice and dynamic join points explains a simplified dynamic AspectJ. It provides denotational semantics to a small procedural language, similar to ours. The language embodies key features of dynamic join points, pointcuts and advice. The semantics given does not express the AOP semantics separately from the base. However, advice weaving is defined there as a procedure transformer. This is a special case of a language semantics transformer as we choose to define an aspect mechanism. 6.5 Application This work provides a foundation for composing multiple aspect mechanisms. A practical application of this work is to construct an AOP framework that: 1. supports expressiveness that generalizes over concepts and lingual mechanisms of potential source aspect extensions. This requires a generalized aspect mechanism model. Method-Call Interception [27] is another semantical model that gives semantics of advising method calls. Similar to the previously discussed work, it highlights a very specific piece of AOP expressiveness (similar to AspectJ). 2. meets granularity requirements of any source aspect extension. 3. provides lingual mechanisms for encapsulating constructs that simulate a source aspect mechanism. Semantical Models of AOP. Several studies on AOP semantics provide a general model of AOP functionality. Walker et al. [44] defined aspects through explicitly labeled program points and firstclass dynamic advice. Jagadeesan et al. [24] use similar abstrac- 4. provides lingual mechanisms for exposing the aspectual effect of the source aspects. 14 [5] D. Balzarotti and M. Monga. Using program slicing to analyze aspect-oriented composition. In C. Clifton, R. Lämmel, and G. T. Leavens, editors, AOSD 2004 Workshop on Foundations of Aspect-Oriented Languages, pages 25–29, Lancaster, UK, Mar. 23 2004. Technical Report 04-04, Department of Computer Science, Iowa State University Ames, Iowa, USA, Iowa State University. tions (pointcuts and advice). Clifton et al. [10, 11] provides parameterized aspect calculus for modeling AOP semantics. In their model, AOP functionality can be applied to any reduction step in a base language semantics. This is similar to the definition of an aspect mechanism we use. In comparison to our semantics, these models define AOP functionality using low-level language semantics abstractions. Using these more formal approaches for describing our method is left for future work. [6] J. Bonér. What are the key issues for commercial AOP use: how does AspectWerkz address them? In Proceedings of the 3rd International Conference on Aspect-Oriented Software Development, pages 5–6, Mancaster, UK, 2004. AOSD 2004, ACM Press. http://aspectwerkz.codehaus.org/index.html. Modular Semantics for AOP. We define an aspect mechanism separately from the base language and require it to specify only the AOP transformation functionality. This approach leads to the construction of modular AOP semantics. Exploring the application of other approaches for modular language semantics (e.g., modular SOS [31] and monad-based denotational semantics) to describing aspect mechanism is another area for further research. 8. [7] J. Bonér. Invited talk: AspectWerkz 2 and the road to AspectJ 5. In Invited Industry Talks at AOSD 2005, Chicago, Illinois, USA, Mar. 14-18 2005. AOSD 2005. CONCLUSION In this paper we address the open problem of integrating a base language Base with a set of third-party aspect extensions Ext1 , . . . , Extn for that language. We present a semantical framework in which independently developed, dynamic aspect mechanisms can be subject to third-party composition and work collaboratively. We instantiate our approach for aspect mechanisms defined as expression evaluation transformers. The mechanisms can be composed like mixin layers [39, 34, 35] in a pipe-and-filter architecture with delegation semantics. Each mechanism collaborates by delegating or exposing the evaluation of expressions. The base mechanism serves as the terminator and does not delegate the evaluation further. [8] G. Bracha and W. Cook. Mixin-based inheritance. In Proceedings of ECOOP/Object-Oriented Programming Systems, Languages, and Applications, pages 303–311, Ottawa, Canada, Oct. 21-25 1990. OOPSLA’90, ACM SIGPLAN Notices 25(10) Oct. 1990. [9] L. Cardelli, editor. Proceedings of the 17th European Conference on Object-Oriented Programming, number 2743 in Lecture Notes in Computer Science, Darmstadt, Germany, July21-25 2003. ECOOP 2003, Springer Verlag. [10] C. Clifton, G. T. Leavens, and M. Wand. Formal definition of the parameterized aspect calculus. Technical Report TR #03-12, Dept. of Computer Science, Iowa State University, Oct. 2003. [11] C. Clifton, G. T. Leavens, and M. Wand. Parameterized aspect calculus: A core calculus for the direct study of aspect-oriented languages. Technical Report TR #03-13, Dept. of Computer Science, Iowa State University, Nov. 2003. We applied our approach in the implementation of a concrete base language MyBase and two concrete aspect extensions to that language: HisExt1 and HerExt2 . The implementation illustrates the constructions steps. It demonstrates the semantics for third-party composition of aspect mechanisms. [12] A. Colyer. Aspectj. In Filman et al. [17], pages 123–143. The semantics for HisExt1 resembles that for AspectJ. Indeed, our approach can be applied to implementing the pointcut and advice mechanism of AspectJ as an aspect extensions to Java. Moreover, our approach is not limited to the pipe-and-filter composition architecture. Introduction of a generalized aspect mechanism model would enable sophisticated compositions of third-party aspect mechanisms. This would further provide a practical way to compose AspectJ with new domain-specific aspect extensions. 9. [13] W. R. Cook. A Denotational Semantics of Inheritance. PhD thesis, Brown University, May 15 1989. [14] K. Czarnecki and U. Eisenecker. Generative Programming: Methods, Tools, and Applications. Addison-Wesley, 1st edition, 2000. [15] M. Felleisen and D. Friedman. Control operators, the secd machine, and the lambda-calculus. Formal Descriptions of Programming Concepts III, pages 193–217, 1986. REFERENCES [1] Concern manipulation environment, 2004. http://www.research.ibm.com/cme. [2] Jboss aspect oriented programming, 2005. http://aop.jboss.org. [16] M. Felleisen and D. Friedman. A reduction semantics for imperative higher-order languages. In Proceedings of the Parallel Architectures and Languages Europe 1987, pages 206–223, 1987. [3] K. Arnold and J. Gosling. The Java Programming Language. The Java Series. Addison–Wesley Publishing Company, 1996. [17] R. E. Filman, T. Elrad, S. Clarke, and M. Akşit, editors. Aspect-Oriented Software Development. Addison-Wesley, Boston, 2005. [4] P. Avgustinov, A. S. Christensen, L. Hendren, S. K. Montreal, J. Lhotak, O. Lhotak, C. O. de Moor, D. Sereni, G. Sittampalam, and J. Tibble. abc: An extensible aspectj compiler. In Tarr [41]. [18] P. Fradet and M. Südholt. AOP: towards a generic framework using program transformation and analysis. In S. Demeyer and J. Bosch, editors, Object-Oriented Technology. ECOOP’98 Workshop Reader, number 1543 in Lecture 15 [30] C. V. Lopes, P. Dourish, D. H. Lorenz, and K. Lieberherr. Notes in Computer Science, pages 394–397. Workshop Beyond AOP: Toward Naturalistic Programming. ACM Proceedings, Brussels, SIGPLAN Notices, 38(12):34–43, Dec. 2003. OOPSLA’03 Belgium, Springer Verlag, July 20-24 1998. Extended version Special Track on Onward! Seeking New Paradigms & New http://www.irisa.fr/lande/fradet/PDFs/AOP98-long.pdf. Thinking. [19] D. P. Friedman, M. Wand, and C. T. Haynes. Essentials of [31] P. D. Mosses. Foundations of modular sos. In MFCS ’99: Programming Languages. MIT Press, Cambridge, MA, Proceedings of the 24th International Symposium on second edition, 2001. Mathematical Foundations of Computer Science, pages 70–80. Springer-Verlag, 1999. [20] E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. [32] G. C. Murphy, R. J. Walker, and E. L. A. Baniassad. Professional Computing. Addison-Wesley, 1995. Evaluating emerging software development technologies: Lessons learned from assessing aspect-oriented [21] S. Herrmann. Object teams: Improving modularity for programming. IEEE Transactions on Software Engineering, crosscutting collaborations. In M. Akşit and M. Mezini, rd 25(4):438–455, 1999. editors, Proceedings of the 3 International Conference Net.ObjectDays, NODe 2002, Erfurt, Germany, Oct. 7-10 [33] G. C. Murphy, R. J. Walker, E. L. A. Baniassad, M. P. 2002. Robillard, A. Lai, and M. A. Kersten. Does aspect-oriented programming work? Comm. ACM, 44(10):75–77, Oct. 2001. [22] J. Hugunin. The next steps for aspect-oriented programming languages (in Java). In NSF Workshop on New Visions for Software Design & Productivity: Research & Applications, Vanderbilt University, Nashville, TN, Dec. 13-14 2001. National Coordination Office for Information Technology Research and Development (NCO/IT R&D). White Paper. [34] K. Ostermann. Implementing reusable collaborations with delegation layers. In D. H. Lorenz and V. C. Sreedhar, editors, Proceedings of the First OOPSLA Workshop on Language Mechanisms for Programming Software Components, pages 9–14, Tampa Bay, Florida, Oct. 15 2001. Technical Report NU-CCS-01-06, College of Computer Science, Northeastern University, Boston, MA 02115. [23] Proceedings of the 7th ACM SIGPLAN International Conference on Functional Programming, Uppsala, Sweden, Aug. 2003. ACM Press. [35] K. Ostermann. Dynamically composable collaborations with delegation layers. In Cardelli [9], pages 89–110. [24] R. Jagadeesan, A. Jeffrey, and J. Riely. An untyped calculus for aspect oriented programs. In Cardelli [9], pages 54–73. [36] J. A. Rees, W. D. Clinger, H. Abelson, N. I. A. IV, D. H. Bartley, G. Brooks, R. K. Dybvig, D. P. Friedman, R. Halstead, C. Hanson, C. T. Haynes, E. Kohlbecker, D. Oxley, K. M. Pitman, G. J. Rozas, G. J. Sussman, and M. Wand. Revised3 report on the algorithmic language Scheme. SIGPLAN Notices, 21(12):37–79, Dec. 1986. [25] G. Kiczales, E. Hilsdale, J. Hugunin, M. Kersten, J. Palm, and W. G. Griswold. An overview of AspectJ. In J. L. Knudsen, editor, Proceedings of the 15th European Conference on Object-Oriented Programming, number 2072 in Lecture Notes in Computer Science, pages 327–353, Budapest, Hungary, June 18-22 2001. ECOOP 2001, Springer Verlag. [37] M. Shaw and D. Garlan. Software Architecture, Perspectives on an Emerging Discipline. Prentice-Hall, 1996. [38] M. Shonle, K. Lieberherr, and A. Shah. XAspects: An extensible system for domain specific aspect languages. In Companion to the 18th Annual Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 28–37, Anaheim, California, 2003. ACM Press. [26] G. Kiczales, J. Lamping, A. Mendhekar, C. Maeda, C. Lopes, J.-M. Loingtier, and J. Irwin. Aspect-oriented programming. In M. Akşit and S. Matsuoka, editors, Proceedings of the 11th European Conference on Object-Oriented Programming, number 1241 in Lecture Notes in Computer Science, pages 220–242, Jyväskylä, Finland, June 9-13 1997. ECOOP’97, Springer Verlag. [39] Y. Smaragdakis and D. Batory. Mixin layers: an object-oriented implementation technique for refinements and collaboration-based designs. ACM Trans. Softw. Eng. Methodol., 11(2):215–255, 2002. [27] R. Lämmel. A semantical approach to method-call interception. In Proceedings of the 1st International Conference on Aspect-Oriented Software Development, pages 41–55, Enschede, The Netherlands, Apr. 2002. AOSD 2002, ACM Press. [40] C. Szyperski. Component Software, Beyond Object-Oriented Programming. Addison-Wesley, 2nd edition, 2002. With Dominik Gruntz and Stephan Murer. [28] R. Lämmel. Adding Superimposition To a Language Semantics (Extended Abstract). In C. Clifton and G. T. Leavens, editors, AOSD 2003 Workshop on Foundations of Aspect-Oriented Languages, Boston, Massachusetts, Mar. 18 2003. Technical Report, Department of Computer Science, Iowa State University Ames, Iowa, USA, Iowa State University. [41] P. Tarr, editor. Proceedings of the 4th International Conference on Aspect-Oriented Software Development, Chicago, Illinois, USA, Mar. 14-18 2005. AOSD 2005, ACM Press. [29] C. I. V. Lopes. D: A Language Framework for Distributed Programming. PhD thesis, Northeastern University, 1997. [43] W. Vanderperren, D. Suváe, B. Verheecke, M. A. Cibrán, and V. Jonckers. Adaptive programming in JAsCo. In Tarr [41]. [42] D. Thomas. Keynote: Transitioning AOSD from research park to main street. In Tarr [41], page 2. 16 [44] D. Walker, S. Zdancewic, and J. Ligatti. A theory of aspects. In ICFP 2003 [23], pages 127–139. [45] R. J. Walker, E. L. A. Baniassad, and G. Murphy. Assessing aspect-oriented programming and design. In C. Lopes, G. Kiczales, B. Tekinerdoğan, W. De Meuter, and M. Meijers, editors, Workshop on Aspect Oriented Programming (ECOOP 1998), June 1998. [46] R. J. Walker, E. L. A. Baniassad, and G. C. Murphy. An initial assessment of aspect-oriented programming. In Proc. 21st Int’l Conf. Software Engineering (ICSE ’99), pages 120–130, 1999. [47] R. J. Walker, E. L. A. Baniassad, and G. C. Murphy. An initial assessment of aspect-oriented programming. In Filman et al. [17], pages 531–556. [48] M. Wand. Understanding aspects (extended abstract). In ICFP 2003 [23]. Invited talk. [49] M. Wand, G. Kiczales, and C. Dutchyn. A semantics for advice and dynamic join points in aspect-oriented programming. ACM Trans. Prog. Lang. Syst., 26(5):890—910, Sept. 2004. [50] J. C. Wichman. Composej: The development of a preprocessor to facilitate composition filters in the Java language. Master’s thesis, Department of Computer Science, University of Twente, Enschede, the Netherlands, Dec. 1999. 17
6cs.PL
3D Shape Classification Using Collaborative Representation based Projections By F. Fotopoulou1, S. Oikonomou2, A. Papathanasiou2, G. Economou2 and S. Fotopoulos2 1 Department of Computer Engineering and Informatics, University of Patras, 26500, Greece - Email: [email protected] 2 Department of Physics, University of Patras, 26500, Greece Abstract A novel 3D shape classification scheme, based on collaborative representation learning, is investigated in this work. A data-driven feature-extraction procedure, taking the form of a simple projection operator, is in the core of our methodology. Provided a shape database, a graph encapsulating the structural relationships among all the available shapes, is first constructed and then employed in defining lowdimensional sparse projections. The recently introduced method of CRPs (collaborative representation based projections), which is based on L2-Graph, is the first variant that is included towards this end. A second algorithm, that particularizes the CRPs to shape descriptors that are inherently nonnegative, is also introduced as potential alternative. In both cases, the weights in the graph reflecting the database structure are calculated so as to approximate each shape as a sparse linear combination of the remaining dataset objects. By way of solving a generalized eigenanalysis problem, a linear matrix operator is designed that will act as the feature extractor. Two popular, inherently high dimensional descriptors, namely ShapeDNA and Global Point Signature (GPS), are employed in our experimentations with SHREC10, SHREC11 and SCHREC 15 datasets, where shape recognition is cast as a multi-class classification problem that is tackled by means of an SVM (support vector machine) acting within the reduced dimensional space of the crafted projections. The results are very promising and outperform state of the art methods, providing evidence about the highly discriminative nature of the introduced 3D shape representations. 1. Introduction. The 3D shape classification as well as relevant tasks for shape recognition and retrieval remain highly challenging and demanding. Despite the fact that a plethora of methods has already been presented, there is still space for improvement. A critical point in all these tasks is the selection of a suitable descriptor for the reliable representation of 3D shape. Regarding Global descriptors, spectral methods have dominated the field due to their isometry invariance property that makes them robust to deformations. ShapeDNA was one of the first descriptors obtained from the Laplace Beltrami 1 An updated version of this paper is under consideration at Pattern Recognition Letters. Operator (LBO) acting on the surface of the 3D shape [1], [23]. Other descriptors have also emerged from LBO with the GPS embedding one of the most well known [2]. This emerged from the Global Point Signature descriptor [20], with the important simplification of keeping only the eigenvalues, while ignoring the eigenfunctions. Biharmonic distance is also a global shape descriptor produced from LBO eigenvalues and proven very appropriate for classification [3],[4]. Recently a graph theoretic method was presented with very good shape classification performance [5]. The method enhances the sparse modeling objective function with the inclusion of a Laplacian term which preserves locality of encoded features during the sparse coding process. Beyond the classical machine learning methods, deep learning techniques have also presented [6]. In this work, we focus on a particular feature extraction scheme that is based on collaborative representation based projections (CRP). It is a novel dimensionality reduction technique [7] that results in a projection matrix after manipulating the sparse graph reflecting the estimated associations among the items of a given database. The term ‘collaborative’ points to the strategy adopted for representing each database item as a sparse combination of the rest items in the database. Briefly the method is as follows: Given a set X={X1, X2, X3,…XΝ} of Ν m-dimensional (training set of) patterns, treated as column-vectors, the row-vector of reconstruction weights Wi associated with the representation of Xi when using as lexicon all the rest patterns is obtained by the following objective function based on L2 norm Wi  arg min{|| Xi  XWi ||22  || Wi ||2 } (1) The N components of vector Wi are the edge weights to be used for constructing the graph reflecting the structure of the data manifold. This is the main part of CRP method [7] and we denote this method hereafter as L2Graph-CRP. The sparsity constraint of (1) is much weaker than that of L1 graph [9], [19] but keeps the problem computationally tractable. In order to overcome this weak point, and based on L2 graph, a minimization procedure of local compactness has been included in the above framework [7]. This together with a maximization of total separability results in a highly discriminative projection matrix P that is capable of mediating data-driven feature extraction appropriate for classification tasks. Data-structure descriptions based on L1 graph, which has a very high computational cost, has also been successfully used for devising projections of similar nature (i.e. collaborative sparse representations) [9]. The objective of our work is twofold. First we adapt and apply CRP method to 3D shape classification and second we make an important modification by incorporating an algorithmic step that makes the data-structure graph representation better suited to the non-negative nature of the conventional shape-descriptors. Actually this is the case here for the ShapeDNA and GPS which take only nonnegative values and this constraint is expected to further enhance the classification performance of CPR method. The reconstructing problem is treated just as a quadratic optimization problem following the approximation method presented in [8] which is 2 An updated version of this paper is under consideration at Pattern Recognition Letters. a Nonnegative Least Squares (NNLS) algorithm based on previous work on the Kuhn–Tucker theorem [10],[11]. Given a set X={X1, X2, X3,…XΝ} of non-negative patterns, every Xi is reconstructed by minimizing: min Wi  X i Wi 2 2 subject to Wi≥ 0 (2) after excluding the Xi itself from the patterns participating in its reconstruction. In their well known text, Lawson and Hanson [8] gave the standard algorithm for NNLS - an active set method [22]. Mathworks modified the algorithm and gave the name lsqnonneg. The optimal number of the nonzero coefficients is indirectly defined and therefore the absence of sparsity constraint like that of (1) makes the reconstruction process direct and simpler. For our convention we name this method as NNLS-CRP. Next, in part 2, the global shape descriptors will be presented, while the several steps of our framework will be detailed in part 3. In parts 4 and 5 experimental results, evaluation and conclusions will be given. 2. 3D shape representation and description The performance of the method is greatly affected by the shape descriptor. We focus on the shape representation with global descriptors. Spectral based descriptors originate from the eigen-decomposition of Laplace-Beltrami Operator (LBO) applied to 3D shapes’ surfaces S [20]. (3) ΔΦ(s) = λΦ(s) where Δ denotes the Laplacian operator defined over the geometry of S, and Φ(s) represents an eigenfunction with eigenvalue λ. The eigenfunctions Φο, Φ1, Φ2 … are placed in ascending order according to their eigenvalues λ0, λ1, λ2, …. It should be noticed that in the case of a closed manifold without boundary the first eigenvalue λ0 is equal to zero and the Φο eigenvector is constant over the surface. Therefore does not contribute to the shape representation and is not included in the descriptors. The truncated ordered sequence of the eigenvalues is the first spectral descriptor tested in this work with positive components named ShapeDNA [1]. ShapeDNA = {λ1 , λ 2 , λ 3 ,...} (4) The Global Point Signature (GPS) is another spectral descriptor developed from the inverse square roots of the LBO eigenvalues [2]. GPS = { 1 1 1 , , ,...., } λ1 λ2 λ3 (5) Both representations contain all the shape information for closed surfaces with no holes or handles [12] which is the usual case for most of the datasets, including SCREC11 which is of our interest here. 3 An updated version of this paper is under consideration at Pattern Recognition Letters. Both descriptors are isometry invariant and are proven to represent the 3D shapes very effective for retrieval, recognition, classification and clustering tasks. Spectral descriptors have dominated the representation of 3D shapes, however alternatives descriptors based on distributions of geodesic distances on the shape surface can be found in literature [21]. All of them are histograms of the distribution of the geodesic distances and therefore are positive-defined. There are other variants based on LBO with improved properties. A brief list of global spectral descriptors is given in [13], [14]. It is not the objective of this work to compare the performance of various descriptors therefore we restrict ourselves to the above two descriptors: ShapeDNA and GPS. In both cases care is taken for scale invariance normalization. It is well known that scaling an n-dimensional manifold by a factor a results in eigenvalues scaled by a factor 1/a2. Thus, by normalizing the eigenvalues, different shapes can be compared regardless of the object’s scale and position [1]. In this work normalization is applied by simply dividing each descriptor (vector) by its magnitude Construction graph Data set Shape descriptors L2 Graph NNLS 1.5 0.5 Low dimension description of bird 0.5 Description of bird with GPS 0.3 values GPS values 1 0.4 0 -0.5 0.2 -1 L2Graph- CRP NNLS-CRP -1.5 0.1 -2 0 0 20 40 60 80 No of input components 100 5 10 15 No of Output components 20 Figure 1. The 3D shape (“bird”) initially represented via GPS descriptor (shown in bottom-left figurine), which is of dimension 100, is ‘‘filtered’’ through a projection matrix and brought within a low dimensional space. The projection matrix has been derived based on a given shape dataset and conforms with the NNLS-CRP or L2Graph-CRP shape encoding. The nonzero values (seen in bottom-right figurine) are far less than the input dimension. The above 3D shape descriptors, usually, have a high dimension (>>100) in order to represent the shape precisely and convey all the information for an accurate classification. The objective of this work is to produce a parsimonious representation 4 An updated version of this paper is under consideration at Pattern Recognition Letters. of the shapes. This goal is achieved by exploiting the structure description of a training dataset of shapes in order to build an optimal projection matrix. Without going to details at this section we give an initial example in figure 1 to highlight the issue of dimensionality reduction (final description) of the shape signatures. The input signature (GPS) with 100 nonzero values is reduced to less than 15 nonzero values. This final description of a shape is expected to offer an improved classification performance. 3. Our classification approach The various stages of our method are visualized in the block diagram of Figure 2. Given the ensemble of 3D descriptors of a shape dataset, the linear mixture model finds the reconstructing weights to be used in the next step for deriving the graph, encompassing the dataset structure. The projection matrix is then computed providing high discrimination in the resulting low dimensional representation of the dataset. In the final step an SVM (Support Vector Machine) classifier is employed, acting on the projection coordinates to output the final estimation of the class label. The SVM parameters are set in the training phase where the label of every shape is known. The graph construction and the corresponding projection matrix are not explicitly trained, in the sense that the class label is not considered in this step. Shape descriptor GPS , Shape- DNA Graph construction Projection matrix SVM parameters Low Dimensional description SVM Classifier Training Shape descriptor GPS, Shape- DNA output Testing Figure 2. Block diagram of our framework. In the training phase the projection matrix as well as the SVM parameters are defined. In the test phase the new parameters for each sample are provided by the projection matrix and are forwarded to the SVM classifier for class prediction. 3.1 Graph construction – The nonnegative case Against the standard graph construction methods where the k-nearest neighbors or the e-ball neighbors are used for node connections, we find the edge weights by reconstruction of each sample based on the rest of the set samples. Applying sparse representation techniques this idea has been successfully used for the construction of L2 graph as part of the CRP framework detailed in [7]. In a similar way we proceed in this part by describing NNLS-CRP, i.e the nonnegative version of the graph construction, where 3D shapes are represented with nonnegative descriptors. The 5 An updated version of this paper is under consideration at Pattern Recognition Letters. reconstruction with nonnegative values is natural and meaningful and it is expected to have a positive impact on classification tasks. We briefly discuss the method and the tools associated for the specific task of graph creation when nonnegative samples are of interest. Every data point is approximated by an optimized linear mixture of the rest dataset items, using a nonlinear constraint. More specifically, given a set of N, mdimensional vectors Xi (i.e shape descriptors), each one of Xis is approximated by the rest of the data set as a linear mixture of the form: wi1X1 + wi2X2 + · · wi,j-1Xi-1 +0Xi+ wi,j+1Xi+1 · · + wiNXN = XWi (6) where X is the matrix with Xis the data description vectors and Wi the N dimensional column vector of coefficients Wi ={wij} , i=1:N, j=1:N.. These coefficients are found by minimizing the residual error ei=XWi-Xi in the sense of least squares optimization techniques. In our approach nonnegative coefficients wij , i=1:N, j=1:N are assumed. It should be noticed that this constraint is not mandatory but is used here for reasons referred to previously, and dealing with positive valued shape descriptors Xi where their weighting coefficients Wi={wij} should be positive for a meaningful reconstruction. As was described in section 1 (introduction) this Nonnegative Least Squares (NNLS) problem presented by the functional (2) is efficiently solved by the algorithm described in Lawson and Hanson landmark text (1974) [8] and implemented in MATLAB by the function named lsqnonneg. The resulting coefficients are set as the edge weights of the graph i.e the edge weights between each Xi and the rest of the nodes. This fitting procedure defines the optimal number of nonzero coefficients resulting in a sparse representation of vector Wi which finally assigns weight values to the graph edges. In the example given in figure 3, for the two shown shapes only 6 and 9, respectively, out of 600 coefficients are nonzero. In other words, only ~1% of the available shapes are necessary for reconstructing the two shapes. This could be considered as general result associated with the nonnegative constraint imposed to Least Square problem. At this point we mention that for L2graph-CRP the situation regarding sparsity is totally different. Many coefficients have significant values and the resulting graph is dense. Regarding correct neighborhood selection, we observe that the shapes #95, #105 are reconstructed mostly with shapes of the same classes (81-100, 101-120). This process to assign weights in the graph is very well suited for the 3D shapes usually represented with signatures in high dimensional space where choosing the nearest neighbors is not certain and unstable. The weighting vector Wi is indicative of the class and can be used directly for classification in the same way as the sparse representation method is formulated to detect the correct classes. However better discrimination is attained by utilizing the coefficients for an additional step in the framework which is the graph creation. Elaborating on this graph, a projection matrix is produced that is instrumental for providing the final shape description. The SVM classifier is adopted for the final step of class assignment. 6 An updated version of this paper is under consideration at Pattern Recognition Letters. It is implicitly assumed that with the graph creation and the corresponding matrix the same weights wij that reconstruct the Xi point in the input space should also reconstruct the same point in the projected output space. Computing W={Wi} i=1…N the graph creation is completed. 0.4 0.2 #95 bird2 0.3 0.15 reconstruction weights 0.2 details 0.1 0.1 0 0.05 0 200 400 Shape number 600 40 60 80 100 120 140 Shape number 0.8 0.5 0.4 0.3 details 0.2 0.1 #105 paper 0.6 0.4 0.2 0 0 200 400 Shape number 600 80 100 120 Shape number 140 Figure 3. Examples of the sets of reconstruction weights derived for two different shapes (#95 ‘bird2’ and #105 ‘paper’) using the encoding employed in NNLS-CRP method. The majority of reconstruction coefficients belongs to shapes of the same class. The sparsity of the coding coefficients is also evident. 3.2 Projection matrix for NNLS-CRP Having constructed the graph (X,W) we proceed to the next step to find the most discriminative projection matrix P based on the local compactness minimization and separability maximization [15]. The local compactness JC is defined as follows: N N Jc   P Xi   Wij P X j T 2  P TSC P T i 1 i 1 (7) where SC  X(I  W  WT  WWT )XT is the local scatter matrix The total separability Js is defined by 2 N JS   P X i  P X  P TSS P T T (8) i 1 N where X is the average and SS   (Xi  X)(Xi  X)T is the scatter matrix of the whole i 1 data set. The final function to be minimized is defined as follows: 7 An updated version of this paper is under consideration at Pattern Recognition Letters. J(P)  arg min P P TSC P P TSS P (9) and the desired projection matrix is computed by the largest eigenvectors of the equation SSP  SC P (10) The projection matrix P finalizes the data description to feed the SVM classifier for the final class prediction. The new signature produced by the projection matrix is very descriptive of class identity due to the optimization of class separability (9). A visualization of this optimized discriminative property is given in figure 4. The distance between shapes computed as a component wise squared difference are given (a) between shapes of the same class as well as between shapes of different classes (b). The “within” class distance is less than 1% of the “between” class distance. The two classes randomly selected from SHREC2011 are numbered as 81-100 (‘bird2’) and 101-120 (‘paper’). It should be noticed also that the contribution to distance is mainly due to the low dimension components, therefore we do not expect getting better by increasing the dimensionality of the projections. This remark is justified in section 4.2 (figure 6) where the impact of output dimension to classification accuracy is reported. -4 x 10 0.03 98 -100 91-99 94-97 value 2 0.02 1 0.01 0 0 0 10 20 30 dimension 40 100-101 98-102 93-110 value 3 50 0 10 20 30 dimension 40 50 (b) (a) Figure 4. Squared Difference along projected dimension for NNLS-GPS signatures. The shapes with labels 91 to 100 belong to the class’bird2’ while shapes 101 to 110 belong to class ‘paper’. The Squared difference between shapes of the same class (a) is much less than between different classes (b). These values is a strong evidence of the optimized class discrimination due to the graph projection stage. 3.3 Multiclass SVM Multiclass Support Vector Machines (SVM) solve classification problems very effectively and their “one versus all” version have been extensively used in a wide range of applications. Specifically for a K number of classes K binary SVM classifiers are trained giving positive result every time for one class e.g the ith class and negative for the rest K-1 classes. The overall assignment to one of the K classes is based on the largest value of the decision function for the K binary problems. 8 An updated version of this paper is under consideration at Pattern Recognition Letters. 3.4 Overview of the 3D shape classification method All the above described stages of our framework are summarized in the algorithm1 comprised of the following steps: Algorithm 1 Given the 3D shape Dataset M={M1,…MN} step1. Find X={X1, X2, ….XN}, where the p-dimensional vector Xis describes the 3D shape Mis step2. Compute the coefficients W={W1, W2,….WN} and construct the corresponding graph ( either L2Graph or Least squares optimization-lsqnonneg) step3. Find the matrix P={P1, P2, ….Pd} where Pi are the eigenvectors of SS1SC corresponding to d largest eigenvalues. step 4. For an input 3Dshape with description vector Xj find the final projection coordinates in the d dimensional space: Xjfinal= PT*Xj step 5. From Xjfinal and the trained SVM find the class label of Xj 4 Experimental results Summarizing the proposed classification methods derived from our framework and with the two shape descriptors, we end up in four distinct cases: • • • • L2Graph-GPS, L2Graph-ShapeDNA, NNLS-GPS NNLS-ShapeDNA. L2Graph refers to the CRP (collaborative representation based projections) method [7] with L2 graph, while NNLS to the nonnegative least squared version introduced in this work. GPS or ShapeDNA specifies the original shape descriptor signature. The classification performance of our framework is evaluated through the above four instances of experimentation with SHREC-2010, SHREC-2011 and SHREC-2015, 3D shape benchmarks. SHREC-2011 nonrigid dataset [16],[17] , consists of 600 watertight triangle meshes i.e. 30 classes with 20 shapes in each class. Each class is labeled with 20 consecutive numbers. e.g numbers 81-100 stand for the class ‘bird2’ and 101 to 120 class ‘paper’. In this work we refer several times in SHREC dataset to exemplify stages of our framework. SHREC-2010 dataset includes 200 mesh-type shapes from 10 classes [24]. Each class contains 20 shapes visually categorized in four sets : ants, crabs, spiders and octopi. SHREC-2015 is a recent non-rigid 3D shape database consisting of 1200 watertight 3D triangle meshes equally divided into 50 classes with 24 shapes each [25]. Choosing these datasets allows us to compare against other recent state-of-the-art methods [5], [6], [26], [27], [28], [29], [30] and [31]. These results are reported in Section 4.3. In figure 5 a sample of 20 shapes from SHREC2011 are given selected 9 An updated version of this paper is under consideration at Pattern Recognition Letters. from class ‘bird2’ and ‘paper’. Classification accuracy (11) is the measure adopted here for an overall evaluation of our framework. Figure 5. A sample of 20 shapes from SHREC-2011 database . Shapes with labels 91 to 100 are from the class ‘bird2’ and 101 to 110 from class ‘paper’. SHREC-2011 consists of 600 shapes and 20 consecutive numbers identify the members of each class. Classification accuracy could be derived from the confusion matrix. The main diagonal elements of this matrix contain the cases where the class labels given in the classification and ground truth data set agree. The sum of these elements i.e the correct classifications, divided by the total number of test instances provides a measure of classification accuracy. A direct definition is as follows: accuracy  # of correct classifications (11) total # of cases We followed three protocols for evaluation in order to make comparisons with various methods. In the first one select randomly 70% of shapes from the dataset in the training phase and keep the rest 30% for test. In the second we follow the 10 fold validation where the 90% is used for training and the rest 10% for test while in the third 50% of dataset is used for training and the rest 50% is kept for test. Training refers to graph construction as well as to learn SVM ‘one vs all’ model classifier. We apply the model to the test data and compute accuracy. This process is repeated 100 times and the average is taken as the overall classification accuracy. 10 An updated version of this paper is under consideration at Pattern Recognition Letters. 4.1 Baseline Classification methods In order to demonstrate the optimized performance of our method and based on SHREC2011 dataset, we present experimental results when the original descriptors (ShapeDNA [1], GPS [2]) are fed directly to an SVM classifier. Best performance is found by elaborating in the type and parameters of the adopted kernel. The dimension i.e the number of eigenvalues of the LBO (Laplace Beltrami operator) used in the shape signature was set to 10 following [5]. However no substantial change is reported by changing dimension. Τhe average classification accuracy for GPS-SVM was found ~94% and for the ShapeDNA-SVM ~93% . These results are included in the following Tables I to V. Having computed this basic line performance our method will be assessed compared with the improvement of the above results. 4.2 Parameter settings Input shape signature – GPS, ShapeDNA dimension The truncated set of the ordered LBO eigenvalues describing the 3D shape define the input dimension. We set this dimension to 100. It is experimentally verified that in the present framework this dimension has a minor effect in the classification performance. For the L2graph-CRP the need for an over-complete dictionary which is a necessary constraint is always fulfilled in our experiments. The parameter λ in eq.(1) which influences sparsity i.e the local compactness is set the typical value λ=0.001N/700 (with N=600) following the recommendation of [7]. Optimum projection The projection matrix which is in the core of our framework provides the final components of the shape descriptor and their number d should be set properly. Experimentation in SHREC2011 dataset, with increasing d indicates that accuracy increases with dimension (d) reaching a wide region with small variation. Maximum accuracy is found for a certain dimension in this region. This observation is in line with results reported in section 3.2 based on Figure 4, where it was shown that the lower dimension components contribute mostly to shape discrimination. This is observed in both shape signatures: shapeDNA and GPS. In Figure 6 the accuracy vs (output) dimension is given for the SVM parameters with optimum classification performance for the L2Graph-ShapeDNA and NNLS-Shape DNA cases. Similar results are received for the GPS signature. In the final step of our frame work is the SVM classifier. The linear c-SVM classifier is realized in all cases. 11 An updated version of this paper is under consideration at Pattern Recognition Letters. Classification accuracy 99 98 97 0 NNLS-ShapeDNA L2Graph-ShapeDNA 20 40 60 Output dimension 80 100 Figure 6. Accuracy vs output dimension for L2Graph-ShapeDNA, and NNLS-Shape DNA. The linear c-SVM classifier is implemented in both cases and tuned to the optimum performance. The training set was 70% of the given dataset (SHREC-2011). 4.3 Classification results SHREC2011. Ιt is the largest non-rigid 3D model dataset which is publicly available and it is extensively used in retrieval and classification experimentation. .Results of the accuracy are summarized in TABLE I together with a few basic and state of the art methods. ShapeDNA-SVM and GPS-SVM indicate the basic line methods where the shape descriptors are fed directly to SVM classifier. GraphBDM is the classification method proposed in [5] and DeepGM in [26] with given accuracy for the same data set (SHREC2011) and training with 70% of the dataset objects. GWCNN is proposed in [31] using for training 80% of the dataset. GWCNN is a Deep neural network technique. Results reported in [28] , [29] and [30] are also included. Their placement in the second column of the Table I is arbitrary. To our knowledge accuracy results of [5],[26] are the highest among similar methods The different classification performance of GPS, ShapeDNA, emphasizes the impact of descriptor in the discriminative representation of shapes as well as the algorithms employed in the framework. TABLE I SHREC2011 Classification Accuracy Training with 70% Training with 90% Method of the data set of the data set ShapeDNA-SVM 92.76 93.07 GPS-SVM 93.61 94.20 Method of [30] 96.00 GWCNN [31] 96.6 Graph BDM [5] 97.59 Deep GM [26] 97.89 12 An updated version of this paper is under consideration at Pattern Recognition Letters. CTA [28] NNLS-ShapeDNA NNLS-GPS 3DVFF [29] L2Graph-ShapeDNA L2Graph-GPS 97.0 98.95 98.61 98.97 99.10 98.70 98.95 99.1 99.13 99.30 SHREC2010. Results are in Table II. L2Graph-GPS shows the best scores in both training setups. The size of the training set has a serious impact on the accuracy especially in the NNLS method. This could be attributed to the small size of the SHREC2011 dataset. Also ShapeDNA has a poor performance in this dataset. Method L2Graph-GPS NNLS-GPS L2Graph-ShapeDNA NNLS-Shape DNA DeepSGW [6] SGWC-BoF [27] GraphBDM [5] TABLE II SHREC2010 Classification accuracy Training with 50% Training with 70% of the data set of the data set 97.56 98.75 89.92 95.80 75.5 78.7 75.2 78.25 96.00 95.66 96.67 SHREC2015. Results are given in Table III for 2 of our methods with best performance: L2Graph-GPS and NNLS-GPS. DeepGM [26] which outperforms our method is based to recently presented Deep Learning techniques. It should be noticed that SHREC2015 dataset includes models with 2 or 3 zero eigenvalues that are removed weakening the discriminative power of GPS descriptor. It is also noted that in this case of experimentation each shape of SHREC2015 is represented with a feature vector of dimension 200. TABLE III SHREC2015 Classification accuracy Method Training with 70% of the data set L2Graph-GPS 91.84 NNLS-GPS 91.28 L2Graph-ShapeDNA 87.94 NNLS-Shape DNA 87.56 DeepGM [26] 93.03 These classification results presented in TABLES I to III for the two training conditions, indicate that: 13 An updated version of this paper is under consideration at Pattern Recognition Letters. - - - All four implementations do not differ significantly in respect to classification accuracy. This result proves that the NNLS-CRP is a reliable alternative to CRP (collaborative graph embedding projection) method which is based on L2Graph construction. Among the four presented methods the L2Graph-GPS has the best performance. Compared to similar state of the art methods where data are available, all four methods have better performance in SHREC2011 dataset, best performance of L2Graph-GPS in SHREC2010, and comparable results in SHREC2015 dataset In all cases the inclusion of graph projection stage improves the classification accuracy. This improvement which is more than 5% refers to the baseline method i.e when the GPS (or ShapeDNA) descriptor feeds directly the SVM classifier. 5 Conclusions In this work we presented a framework where a collaborative representation based projections (CRP) technique [7] is used in conjunction with an SVM classifier for the purpose of 3D shape classification. The projection matrix is based on a graph creation technique using either an L2graph [18] or a NNLS (Nonnegative constrained Least Square) technique [8]. Inter-class separability is enhanced by means of a projection that minimizes local compactness to total separability [7],[15]. The nonnegative case, NNLS-CRP, was introduced as a fast and simpler alternative to L2Graph-CRP expecting to work efficiently with nonnegative descriptors (like ShapeDNA, GPS). Our objective was to demonstrate that the inclusion of the projection matrix in the framework enhances classification accuracy. In this regard the essential step is the graph construction providing stability to high dimensional descriptors especially when manually choosing the nearest neighbors fails due to high instability. It was beyond our scope to make a thorough study of different 3D shape descriptors regarding their impact on classification accuracy. However using two types of well known global descriptors (i.e GPS and ShapeDNA) we demonstrated that our method reached state of the art performance and with fewer parameters than other competitive methods. Looking for a better shape descriptor is the obvious extension of the present work. The method could also be extended to other 3D shape classification, clustering and recognition tasks without substantial modifications. References [1] M. Reuter, F.Wolter, N.Peinecke, ‘Laplace–Beltrami spectra as ‘ShapeDNA’ of surfaces and solids’ ,Comput.-Aid. Des. 38(4) (2006) 342–366 [2] Abhijit J. Chaudhari, et. All ‘Global point signature for shape analysis of carpal bones’ Phys Med Biol. 2014 February 21; 59(4): 961–973. 14 An updated version of this paper is under consideration at Pattern Recognition Letters. [3] Y.Lipman, R.Rustamov,T.Funkhouser, Biharmonic distance, ACMTrans. Graph. 29(3)(2010)1–11. [4] J. Ye,Y.Yu, A fast modal space transform for robust nonrigid shape retrieval, Vis. Comput.32(2015)553–568. [5] A. Ben Hamza ‘A graph-theoretic approach to 3D shape classification’ Neurocomputing 211 (2016) 11–21. [6] Majid Masoumi , A.Ben Hamza “Spectral shape classification: A deep learning approach”Journal of Visual Communication and Image Representation Volume 43, February 2017, Pages 198-211 [7] W. Yang, Z Wang, C. Sun - “A collaborative representation based projections method for feature extraction” , Pattern Recognition, 2015 – Elsevier [8] Lawson, C. L., & Hanson, R. J. (1974). Solving least-squares problems. Englewood Cliffs, NJ: Prentice-Hall. [9] B. Cheng,J.Yang,S.Yan,Y.Fu,T.Huang,Learning with L1-graph for image analysis, IEEE Trans. Image Process.19(4) (2010) 858–866. [10] Nonnegativity constraints in numerical analysis (2009) by Donghui Chen , Robert J. Plemmons, in A. Bultheel and R. Cools (Eds.), Symposium on the Birth of Numerical Analysis, World Scientific [11] Bro, Rasmus; De Jong, Sijmen (1997). "A fast non-negativity-constrained least squares algorithm". Journal of Chemometrics. 11 (5): 393. [12] Rosenberg, S. The Laplacian on a Riemannian Manifold. Cambridge University Press; Cambridge: 1997. [13] Z. Lian, A.Godil, B.Bustos, M.Daoudi, J.Hermans, S.Kawamura,Y.Kurita, G. Lavoué, H.Nguyen, R.Ohbuchi,Y.Ohkita,Y.Ohishi, F.Porikli, M.Reuter, I. Sipiran, D.Smeets, P.Suetens, H.Tabia, D.Vandermeulen, ‘A comparison of methods for nonrigid 3D shape retrieval’ Pattern Recognit. 46(1) (2013) 449–461. [14] C. Li, A. Ben Hamza, ‘Spatially aggregating spectral descriptors for nonrigid 3D shape retrieval : a comparative survey, Multimed. Syst. 20(3)(2014)253–281. [15] J. Yang, D.Zhang, J.Yang, B.Niu, Globally maximizing, locally minimizing: unsupervised discriminant projection with applications to face and palm biometrics, IEEETrans. Pattern Ana1. Mach. Intel1.29(4)(2007)650–664. [16] E. Boyer, A. M. Bronstein, M. M. Bronstein, B. Bustos, T. Darom, R. Horaud, I. Hotz, Y. Keller, J. Keustermans, A. Kovnatsky, R. Litman, J. Reininghaus, I. Sipiran, D. Smeets, P. Suetens, D. Vandermeulen, A. Zaharescu, and V. Zobel, “SHREC 2011: Robust feature detection and description benchmark,” in Proc Eurographics Workshop 3-D Object Retriev. , Llandudno, U.K., 2011. [17] Z. Lian, A. Godil, B. Bustos, M . Daoudi, J. Hermans, S. Kawamura, Y. Kurita, G. Lavoué, H. Van Nguyen, and R. Ohbuchi, “SHREC’11 track: Shape retrieval on nonrigid 3D watertight meshes,” 3DOR , vol.11, pp. 79–88, 2011. [18] Peng, Xi, et al. "Constructing the L2-graph for robust subspace learning and subspace clustering." IEEE transactions on cybernetics 47.4 (2017): 1053-1066. [19] L. Qiao,S.Chen,X.Tan,Sparsity preserving projections with applications to face recognition, PatternRecog.43(1)(2010)331–341. 15 An updated version of this paper is under consideration at Pattern Recognition Letters. [20] R.Rustamov, ‘Laplace–Beltrami eigenfunctions for deformation invariant shape representation’, in: Proceedings of the Eurographics Symposium on Geometry Processing, 2007,pp.225–233. [21] Julien Rabin, Gabriel Peyre, Laurent D. Cohen ‘Geodesic Shape Retrieval via Optimal Mass Transport’ , 11th European Conference on Computer Vision, Sep 2010, Heraklion, Crete, Greece, Springer, 6315/2010, pp.771-784, 2010, LNCS. [22] P. E. Gill, W. Murray and M. H. Wright, Practical Optimization, Academic, London, 1981. [23] Z. Gao, Z. Yu, X. Pang, A compact shape descriptor for triangular surface meshes, Comput.-Aid. Des. 53 (2014) 62–69. [24] Z Lian, A. Godil, T. Fabry, et.al ‘SHREC'10 track: Non-rigid 3D shape retrieval’, Proceedings, Eurographics Workshop on 3D Object Retrieval, Norrköping, Sweden, pp. 101-108, May 2, 2010. [25] Z. Lian, J. Zhang, S. Choi, H. ElNaghy, J. El-Sana, T. Furuya, A. Giachetti, R.A. Guler, L. Lai, C. Li, H. Li, F.A. Limberger, R. Martin, R.U. Nakanishi, A.P. Neto, L.G. Nonato, R. Ohbuchi, K. Pevzner, D. Pickup, P. Rosin, A. Sharf, L. Sun, X. Sun, S. Tari, G. Unal, R.C. Wilson, ‘SHREC’15 Track: Non-rigid 3D Shape Retrieval’ Eurographics Workshop on 3D Object Retrieval (2015), pp.1-14 [26] Lorenzo Luciano, A.Ben Hamza ‘Deep learning with geodesic moments for 3D shape classification’, Pattern Recognition Letters, available online 13 May 2017. [27] M. Masoumi and A.Ben Hamza ‘Shape Classification using Spectral Graph Wavelets’, Applied Intelligence, 2017 – Springer. [28] M. Moyou, KE Ihou, AM Peter, ‘LBO Shape Densities: Efficient 3D shape retrieval using wavelet densities’ - IEEE International Conference on Pattern Recognition, 2014. [29] T. Furuya, R. Ohbuchi , Fusing Multiple Features for Shape-based 3D Model Retrieval.’ BMVC, 2014 - bmva.org [30] Z Shu, S Xin, H Xu, L Kavan, P Wang, L Liu ‘3D model classification via Principal Thickness Images’ - Computer-Aided Design, 2016 – Elsevier [31] Ezuz, Danielle, et al. "GWCNN: A Metric Alignment Layer for Deep Shape Analysis." Computer Graphics Forum. Vol. 36. No. 5. 2017 16 An updated version of this paper is under consideration at Pattern Recognition Letters.
1cs.CV
Linear algebraic analogues of the graph isomorphism problem and the Erdős-Rényi model Yinan Li ∗ Youming Qiao † arXiv:1708.04501v2 [cs.DS] 1 Oct 2017 October 3, 2017 Abstract A classical difficult isomorphism testing problem is to test isomorphism of p-groups of class 2 and exponent p in time polynomial in the group order. It is known that this problem can be reduced to solving the alternating matrix space isometry problem over a finite field in time polynomial in the underlying vector space size. We propose a venue of attack for the latter problem by viewing it as a linear algebraic analogue of the graph isomorphism problem. This viewpoint leads us to explore the possibility of transferring techniques for graph isomorphism to this long-believed bottleneck case of group isomorphism. In 1970’s, Babai, Erdős, and Selkow presented the first average-case efficient graph isomorphism testing algorithm (SIAM J Computing, 1980). Inspired by that algorithm, we devise an average-case efficient algorithm for the alternating matrix space isometry problem over a key range of parameters, in a random model of alternating matrix spaces in vein of the Erdős-Rényi model of random graphs. For this, we develop a linear algebraic analogue of the classical individualisation technique, a technique belonging to a set of combinatorial techniques that has been critical for the progress on the worst-case time complexity for graph isomorphism, but was missing in the group isomorphism context. As a consequence of the main algorithm, we establish a weaker linear algebraic analogue of Erdős and Rényi’s classical result that most graphs have the trivial automorphism group. We also show that Luks’ dynamic programming technique for graph isomorphism (STOC 1999) can be adapted to slightly improve the worst-case time complexity of the alternating matrix space isometry problem in a certain range of parameters. Most notable progress on the worst-case time complexity of graph isomorphism, including Babai’s recent breakthrough (STOC 2016) and Babai and Luks’ previous record (STOC 1983), has relied on both group theoretic and combinatorial techniques. By developing a linear algebraic analogue of the individualisation technique and demonstrating its usefulness in the average-case setting, the main result opens up the possibility of adapting that strategy for graph isomorphism to this hard instance of group isomorphism. The linear algebraic Erdős-Rényi model is of independent interest and may deserve further study. In particular, we indicate a connection with enumerating p-groups of class 2 and exponent p. ∗ Centre for Quantum ([email protected]). † Centre for Quantum ([email protected]). Software and Information, University of Technology Sydney, Australia Software and Information, University of Technology Sydney, Australia 1 Introduction 1.1 Problems, postulates, and models Let Fq be the finite field with q elements. An n × n matrix A over Fq is alternating, if for every u ∈ Fnq , ut Au = 0. Λ(n, q) denotes the linear space of n × n alternating matrices over Fq , and a dimension-m subspace of Λ(n, q) is called an m-alternating (matrix) space. GL(n, q) denotes the general linear group of degree n over Fq . We study the following problem. Problem 1 (Alternating matrix space isometry problem, AltMatSpIso). Given the linear bases of two m-alternating spaces G, H in Λ(n, q), decide whether there exists A ∈ GL(n, q), such that At GA := {At BA : B ∈ G} is equal to H as subspaces. If such an A exists, we say that G and H are isometric. As will be explained in Section 1.2, AltMatSpIso has been studied, mostly under other names, for decades. It lies at the heart of the group isomorphism problem (GroupIso), and has an intimate relationship with the celebrated graph isomorphism problem (GraphIso). As a problem in NP ∩ coAM, its worst-case time complexity has barely been improved over the brute-force algorithm. In fact, a q O(n+m) -time algorithm is already regarded as very difficult. Let us recall one formulation of GraphIso. For n ∈ N, let [n] = {1, 2, . . . , n}, and Sn denotes the symmetric group on [n]. A simple undirected graph is just a subset of Λn := {{i, j} : i, j ∈ [n], i 6= j}. A permutation σ ∈ Sn induces a natural action on Λn . The following formulation of GraphIso as an instance of the setwise transporter problem is well-known [Luk82]. Problem 2 (Graph isomorphism problem, GraphIso). Given two subsets G, H of Λn , decide whether there exists σ ∈ Sn , such that Gσ := {{iσ , j σ } : {i, j} ∈ G} is equal to H as sets. The formulations of AltMatSpIso and GraphIso as in Problem 1 and Problem 2 lead us to the following postulate. Postulate 1. AltMatSpIso can be viewed and studied as a linear algebraic analogue of GraphIso. Postulate 1 originates from the following meta-postulate. Meta-postulate. Alternating matrix spaces can be viewed and studied as a linear algebraic analogue of graphs. This meta-postulate will be studied further in [Qia17]. As a related note, recent progress on the non-commutative rank problem suggests the usefulness of viewing linear spaces of matrices as a linear algebraic analogue of bipartite graphs [GGOW16, IQS16, IQS17]. From   the meta-postulate, we formulate a model of random alternating matrix spaces over Fq . Let be the Gaussian binomial coefficient with base q. q Model 1 (The linear algebraic Erdős-Rényi model). The linear algebraic Erdős-Rényi model, LinER(n, m, q), is the uniform probability distribution over the set of dimension-m subspaces of  n) 2 Λ(n, q), that is, each subspace is endowed with probability 1/ (m . q Model 1 clearly mimics the usual Erdős-Rényi model [ER59, ER63, Bol01]. Model 2 (Erdős-Rényi model). The Erdős-Rényi model ER(n, m) is the uniform probability distrin  2) . bution over the set of size-m subsets of Λn , that is, each subset is endowed with probability 1/ (m We then pose the following postulate. Postulate 2. LinER(n, m, q) can be viewed and studied as a linear algebraic analogue of ER(n, m). 1 1.2 Background of the alternating matrix space isometry problem While the name AltMatSpIso may be unfamiliar to some readers, this problem has been studied for decades as an instance – in fact, the long-believed bottleneck case – of the group isomorphism problem. This problem also has an intricate relationship with the graph isomorphism problem. We first review these connections below, and then examine the current status of this problem. Relation with the group isomorphism problem. We first introduce the group isomorphism problem (GroupIso) and mention a long-believed bottleneck instance of this problem. It turns out that AltMatSpIso is almost equivalent to this instance. GroupIso asks to decide whether two finite groups of order n are isomorphic or not. The difficulty of this problem depends crucially on how we represent the groups in the algorithms. If our goal is to obtain an algorithm running in time poly(n), then we may assume that we have at our disposal the Cayley (multiplication) table of the group, as we can recover the Cayley table from most reasonable models for computing with finite groups. Therefore, in the main text we restrict our discussion to this very redundant model, which is meaningful mainly because we do not know a poly(n)-time or even an no(log n) -time algorithm [Wil14] (log to the base 2), despite that a simple nlog n+O(1) -time algorithm has been known for decades [FN70, Mil78]. The past few years have witnessed a resurgence of activity on algorithms for this problem with worst-case analyses in terms of the group order; we refer the reader to [GQ17a] which contains a survey of these algorithms. It is long believed that p-groups form the bottleneck case for GroupIso. In fact, the decadesold quest for a polynomial-time algorithm has focused on class-2 p-groups, with little success. Even if we restrict further to consider p-groups of class 2 and exponent p, the problem is still difficult. Recent works [LW12, BW12, BMW15, IQ17] solve some nontrivial subclasses of this group class, and have lead to substantial improvement in practical algorithms. But the methods in those works seem not helpful enough to lead to any improvement for the worst-case time complexity of the general class. By a classical result of Baer [Bae38], testing isomorphism of p-groups of class 2 and exponent p in time polynomial in the group order reduces to solving AltMatSpIso over Fp in time pO(m+n) . On the other hand, there also is an inverse reduction for p > 2. In fact, when such p-groups are given by generators in the permutation group quotient model [KL90], isomorphism testing reduces to solving AltMatSpIso in time poly(n, m, log p) [BMW15]. We will recall the reductions in Appendix A. Because of these reductions and the current status of GroupIso, we see that AltMatSpIso lies at the heart of GroupIso, and solving AltMatSpIso in q O(m+n) is already very difficult. Relation with the graph isomorphism problem. The celebrated graph isomorphism problem (GraphIso) asks to decide whether two undirected simple graphs are isomorphic. The relation between AltMatSpIso and GraphIso is very delicate. Roughly speaking, the two time-complexity measures of AltMatSpIso, q O(n+m) and poly(n, m, q), sandwiches GraphIso in an interesting way. For one direction, solving AltMatSpIso in time q O(n+m) can be reduced to solving GraphIso for graphs of size q O(n+m) , by first reducing to solving GroupIso for groups of order q O(n+m) as above, and then to solving GraphIso for graphs of size q O(n+m) by the reduction from GroupIso to GraphIso [KST93]. Therefore, a polynomial-time algorithm for GraphIso implies an algorithm for AltMatSpIso in time q O(n+m) . It is then reasonable to examine whether the recent breakthrough of Babai [Bab16, Bab17], a quasipolynomial-time algorithm for GraphIso, helps with reducing the time complexity of AltMatSpIso. This seems unlikely. One indication is that 2 the brute-force algorithm for AltMatSpIso is already quasipolynomial with respect to q O(n+m) . Another evidence is that Babai in [Bab16, arXiv version 2, Section 13.2] noted that his algorithm seemed not helpful to improve GroupIso, and posed GroupIso as one roadblock for putting GraphIso in P. Since AltMatSpIso captures the long-believed bottleneck case for GroupIso, the current results for GraphIso are unlikely to improve the time complexity to q O(n+m) . There is also an explanation from the technical viewpoint [GR16]. Roughly speaking, the barrier in the group theoretic framework for GraphIso is to deal with large alternating groups, as other composition factors like projective special linear groups can be handled by brute-force in quasipolynomial time, so for the purpose of a quasipolynomial-time algorithm these group are not a concern. On the other hand for AltMatSpIso it is exactly the projective special linear groups that form a bottleneck. For the other direction, in a forthcoming work [GQ17b], it is shown that solving GraphIso in polynomial time reduces to solving AltMatSpIso over Fq with q = poly(n) in time poly(n, m, q). Current status of AltMatSpIso. It is not hard to show that solving AltMatSpIso in time poly(n, m, log q) is in NP ∩ coAM, so it is unlikely to be NP-complete. As to the worst-case time 2 complexity, the brute-force algorithm for AltMatSpIso runs in time q n ·poly(m, n, log q). Another 1 2 analysed algorithm for AltMatSpIso offers a running time of q 4 (n+m) +O(n+m) when q = p is a prime, by first reducing to testing isomorphism of class-2 and exponent-p p-groups of order pn+m , 1 and then applying Rosenbaum’s N 4 logp N +O(1) -time algorithm for p-groups of order N [Ros13]. This is only better than the brute-force one when m < n.1 It is somewhat embarrassing that for a problem in NP ∩ coAM, we are only able to barely improve over the brute-force algorithm in a limited range of parameters. In a very true sense, our current understanding of the worst-case time complexity of AltMatSpIso is like the situation for GraphIso in the 1970’s. On the other hand practical algorithms for AltMatSpIso have been implemented. As far as we know, current implemented algorithms for AltMatSpIso can handle the case when m+n ≈ 20 and p ≈ 13, but absolutely not the case if m+n ≈ 200, though for m+n ≈ 200 and say p ≈ 13 the input can be stored in a few megabytes.2 For GraphIso, the programs Nauty and Traces [MP14] can test isomorphism of graphs stored in gigabytes in a reasonable amount of time. Therefore, unlike GraphIso, AltMatSpIso seems hard even in the practical sense. On the parameters. From the discussion above, we see that solving AltMatSpIso with a worst-case time complexity q O(n+m) seems already a difficult target. From the meta-postulate, it is helpful to think of vectors in Fnq as vertices, and matrices in an m-alternating space as edges, so the q O(n+m) measure can be thought of as polynomial in the number of “vertices” and the number n of “edges.” Here the parameter m comes into the theme, because q m , while no more than q ( 2 ) , is not necessarily bounded by a polynomial in q n . This is in contrast to GraphIso, where the edge number is at most quadratic in the vertex number. In particular, when m = Ω(n2 ), the 2 brute-force algorithm which runs in q n · poly(m, n, log q) is already in time q O(n+m) . Furthermore, if we consider all n × n alternating matrix spaces (regardless of the dimension), most of them are of 1 As pointed out in [BMW15], there are numerous unanalysed algorithms [O’B93, ELGO02] which may lead to 2 some improvement, but q cn · poly(n, m, log q) for some constant 0 < c < 1 is a reasonable over estimate of the best bound by today’s method. 2 We thank James B. Wilson, who maintains a suite of algorithms for p-group isomorphism testing, for communicating his hands-on experience to us. We take the responsibility for any possible misunderstanding or not knowing of the performance of other implemented algorithms. 3 dimension Ω(n2 ), so the brute-force algorithm already works in time q O(n+m) for most alternating matrix spaces. On the other hand, when m is very small compared to n, say m = O(1), we can enumerate all elements in GL(m, q) in time q O(1) , and apply the isometry testing for alternating matrix tuples from [IQ17] which runs in randomized time poly(n, m, log q). Therefore, the q O(n+m) time measure makes most sense when m is comparable with n, in particular when m = Θ(n). This is why we study average-case algorithms in this regime of parameters (e.g. LinER(n, m, q) with m = Θ(n)), while the average-case algorithm for GraphIso in [BES80] considers all graphs (e.g. n each labelled graph is taken with probability 1/2( 2 ) ). 1.3 Algorithmic results Postulates 1 and 2 seem hopeful at first sight by the formulations of AltMatSpIso and LinER. But realities in the combinatorial world and the linear algebraic world can be quite different, as just discussed in the last paragraph. So meaningful results cannot be obtained by adapting the results for graphs to alternating matrix spaces in a straightforward fashion. One purpose of this article is to provide evidence that, despite potential technical difficulties, certain ideas that have been developed for GraphIso and ER can be adapted to work with AltMatSpIso and LinER. We will take a shortcut, by presenting one result that supports both postulates. In the graph setting, such a result is naturally an average-case efficient graph isomorphism testing algorithm with the average-case analysis done in the Erdős-Rényi model. The first such algorithm was proposed by Babai, Erdős and Selkow in 1970’s [BES80], with follow-up improvements by Lipton [Lip78], Karp [Kar79], and Babai and Kučera [BK79]. Therefore we set to study average-case algorithms for AltMatSpIso in the LinER model. Inspired by the algorithm in [BES80], we show the following. Theorem 1 (Main result). Suppose m = cn for some constant c. There is an algorithm which, for almost but at most 1/q Ω(n) fraction of alternating matrix spaces G in LinER(n, m, q), tests any alternating matrix space H for isometry to G in time q O(n) . An important ingredient in Theorem 1, the utility of which should go beyond the average-case setting, is an adaptation of the individualisation technique for GraphIso to AltMatSpIso. We also realise a reformulation of the refinement technique for GraphIso as used in [BES80] in the AltMatSpIso setting. Individualisation and refinement are very influential combinatorial ideas for GraphIso, have been crucial in the progress of the worst-case time complexity of GraphIso, including Babai’s recent breakthrough [Bab16,Bab17], but were missing in the GroupIso context. The main contribution of this article to AltMatSpIso is to initiate the use of the individualisation and refinement ideas for GraphIso in this problem. Here, we note an interesting historical coincidence. Babai was the first to import the group theoretic idea to GraphIso in 1979 [Bab79], by when the combinatorial techniques had been around for quite some time. On the other hand, we have an opposite situation for AltMatSpIso: the relevant group theoretic tools have been the subject of intensive study for decades, while it is the combinatorial individualisation and refinement ideas that need to be imported. We do understand though, that there are valid reasons for people not having come to this before. For example, we would not have come to such ideas, if we restrict ourselves to solving AltMatSpIso in time poly(n, m, log q). In Section 8.1, we will reflect on the historical development on the worst-case complexity of GraphIso, 2− and discuss the prospect of getting a q O(n ) -time algorithm for AltMatSpIso. 4 For an m-alternating space G in Λ(n, q), define the autometry group of G, Aut(G) as {A ∈ GL(n, q) : At GA = G}. The proof of Theorem 1 implies the following, which can be viewed as a weaker correspondence of the classical result that most graphs have trivial automorphism groups [ER63]. Corollary 2. Suppose m = cn for some constant c. All but 1/q Ω(n) fraction of alternating matrix spaces in LinER(n, m, q) have autometry groups of size q O(n) . We observe that Corollary 2 has certain consequences to the enumeration of finite p-groups of class 2. For details see Section 8.3. Finally, we provide another piece of evidence to support Postulate 1, by adapting Luks’ dynamic programming technique for GraphIso [Luk99] to AltMatSpIso. In the GraphIso setting, this technique improves the naive n! · poly(n) time bound to the 2O(n) time bound, which can be understood as replacing the number of permutations n! with the number of subsets 2n . In the 2 linear algebraic setting the analogue would be to replace Θ(q n ), the number of invertible matrices 1 2 over Fq , with the number of subspaces in Fnq which is q 4 n +O(n) . We show that this is indeed possible. 1 2 +n2 )+O(m+n) Theorem 3. There exists a deterministic algorithm for AltMatSpIso in time q 4 (m . Note that the quadratic term on the exponent of the algorithm in Theorem 3 is 14 (m2 + n2 ), slightly better than the one based on Rosenbaum’s result [Ros13] which is 41 (m + n)2 . We stress though that our intention to present this result is to support Postulate 1. Organisation of this paper. In Section 2, we explain the basic idea the algorithm for Theorem 1, by drawing analogues with the algorithm in [BES80]. Then, after presenting preliminaries and preparation material, we present detailed proofs for Theorem 1 (Section 6) and Theorem 3 (Section 7). Section 8 includes discussions, future directions, and connections to group enumeration. 2 Outline of the main algorithm We now describe the outline of the algorithm for Theorem 1, which is inspired by the first averagecase efficient algorithm for GraphIso by Babai, Erdős, and Selkow [BES80]. We will recall the idea in [BES80] that is relevant to us, define a linear algebraic individualisation, and propose a reformulation of the refinement step in [BES80]. Then we present an outline of the main algorithm. During the procedure we will also see how the meta-postulate guides the generalisation here. 2.1 A variant of the naive refinement algorithm as used in [BES80] Two properties of random graphs are used in the average-case analysis of the algorithm in [BES80]. The first property is that most graphs have the first d3 log ne largest degrees distinct. The second property, which is relevant to us, is the following. Let G = ([n], E) be a simple and undirected graph. Let r = d3 log ne, and S = [r], T = [n] \ [r]. Let B be the bipartite graph induced by the cut [r] ∪ {r + 1, . . . , n}, that is, B = (S ∪ T, F ) where F = {(i, j) : i ∈ S, j ∈ T, {i, j} ∈ E}. For each j ∈ T , assign a length-r bit string fj as follows: 5 fj ∈ {0, 1}r such that fj (i) = 1 if and only if (i, j) ∈ F . It is easy to verify that, all but at most O(1/n) fraction of graphs satisfy that fj ’s are distinct over j ∈ T . Let us see how the second property alone, together with the individualisation and refinement heuristic, give an average-case algorithm in nO(log n) . Suppose G satisfies the second property, and we would like to test isomorphism between G = ([n], E) and an arbitrary graph H = ([n], E 0 ). Let StG ⊆ {0, 1}r be the set of bit strings obtained in the procedure above. Note that |StG | = n − r. In the individualising step, we enumerate all r-tuple of vertices in H. For a fixed r-tuple (i1 , . . . , ir ) ∈ [n]r , we perform the refinement step, that is, label the remaining vertices in H according to their adjacency relations with the r-tuple (i1 , . . . , ir ) as before, to obtain another set of bit-strings StH . If StG 6= StH we neglect this r-tuple. If StG = StH , then form a bijective map between [n] and [n], by mapping j to ij for j ∈ [r], and the rest according to their labels. Finally check whether this bijective map induces an isomorphism. It can be verified easily that the above algorithm is an nO(log n) -time algorithm that tests isomorphism between G and H given that G satisfies the required property. In particular, this implies that for such G, |Aut(G)| ≤ nO(log n) . To recover the algorithm in [BES80], assuming that the largest r degrees are distinct, one can canonicalise the choice of the r-tuples by choosing the one with largest r degrees for both G and H. 2.2 Individualisation and refinement in the AltMatSpIso setting We will generalise the above idea to the setting of AltMatSpIso. To do this, we first make sense of what individualisation means in the alternating space setting. We discuss how the refinement step may be generalised, and indicate how we follow an alternative formulation of it. Let G = ([n], E) and H = ([n], E 0 ) be two graphs for which we want to test isomorphism. Let G, H ≤ Λ(n, q) be two m-alternating spaces for which we want to test isometry. As the case in Section 2.1, we will look for properties of G or G which enable the average-case analysis, and perform individualisation on H or H side. For i ∈ [n], ei denotes the ith standard basis vector of Fnq . For a vector space V and S ⊆ V , we use hSi to denote the linear span of S in V . Individualisation. In the graph setting, individualising r vertices in H can be understood as follows. First we fix a size-r subset L of [n]. Then put an order on the elements in L. The result is a tuple of distinct vertices (i1 , . . . , ir ) ∈ [n]r . Enumerating such tuples incurs a multiplicative cost of at most nr . In the alternating matrix space setting, it is helpful to think of vectors in Fnq as vertices, and matrices in H as edges. Consider the following procedure. First fix a dimension-r subspace L of Fnq . Then choose an ordered basis of L. The result is a tuple of linearly independent vectors (v1 , . . . , vr ), vi ∈ Fnq , such that L = hv1 , . . . , vr i. This incurs a multiplicative cost of at most q rn . Up to this point, this is in complete analogy with the graph setting. We may stop here and say that an r-individualisation amounts to fix an r-tuple of linearly independent vectors. We can go a bit further though. As will be clear in the following, it is beneficial if we also fix a complement subspace R of L, e.g. R ≤ Fnq such that L∩R = 0 and hL∪Ri = Fnq . This adds another multiplicative cost of q r(n−r) , which is the number of complement subspaces of a fixed dimension-r subspace in Fnq . In the graph setting, this step is not necessary, because for any L ⊆ [n] there exists a unique complement subset R = [n] \ L. To summarise, by an r-individualisation, we mean choosing a direct sum decomposition Fnq = 6 L ⊕ R where dim(L) = r and dim(R) = n − r, together with an ordered basis (v1 , . . . , vr ) of L. 2 Enumerating all r-individualisations incurs a total multiplicative cost of at most q 2rn−r . Towards a refinement step as in [BES80]. In the GraphIso setting, individualising r vertices gives (i1 , . . . , ir ) ∈ [n]r , and allows us to focus on isomorphisms that respect this individualisation, namely those φ ∈ Iso(G, H) such that φ(j) = ij for j ∈ [r]. There are at most (n − r)! such isomorphisms. Since r is usually set as a polylog, just naively trying all such permutations does not help. Therefore the individualisation is usually accompanied with a refinement type technique. Specifically, setting L = {i1 , . . . , ir } and R = [n]\L, the refinement step as in [BES80] assigns every v ∈ R a label according to its adjacency relation w.r.t. (i1 , . . . , ir ). This label in fact represents a subset of L, and an individualisation-respecting isomorphism has to preserve this adjacency relation for every v ∈ R. This restriction turns out to be quite severe for most graphs: as observed in Section 2.1, for most graphs G, the adjacency relations between (1, 2, . . . , r) and j ∈ [n] \ [r] are completely different over j. For such G and any individualisation of H, this means that there is at most one way to extend φ(j) = ij for j ∈ [r] to an isomorphism between G and H. In the AltMatSpIso setting, an r-individualisation also allows us to focus on isometries that respect the decomposition L⊕R and the ordered basis (v1 , . . . , vr ) of L, namely those φ ∈ Iso(G, H) 2 such that φ(ei ) = vi for i ∈ [r], and φ(her+1 , . . . , en i) = R. There are at most q (n−r) such isometries. Since r will be also set to be very small – in fact a constant here – we also need some refinement type argument. For u ∈ R, we can record its “adjacency relation” w.r.t. v = (v1 , . . . , vr ) as a subspace of L ∼ = Frq as follows. For Q ∈ H ≤ Λ(n, q), define Q(v, u) := (v1t Qu, . . . , vrt Qu)t ∈ Frq , and H(v, u) := {Q(v, u) : Q ∈ H} which is a subspace in Frq . H(v, u) records the adjacency relation between (v1 , . . . , vr ) and u under H. It can be verified that an individualisation-respecting isometry has to preserve this adjacency relation. It is tempting to check then on the G side, where we have the standard individualisation (e1 , . . . , er ) and her+1 , . . . , en i, whether for most G’s it is the case that every v ∈ her+1 , . . . , en i gets a unique label. If this is so, then the number of individualisationrespecting isomorphisms can also be significantly reduced. However, this cannot be the case when 2 2 r is small, as there are q (n−r) vectors in R but there at at most q r subspaces in Frq . The alert reader will note that, since we are looking for linear maps from her+1 , . . . , en i to R, the above counting argument does not make much sense, as it mostly concerns setwise maps from her+1 , . . . , en i to R. It is indeed the case, and we further note that the map from u ∈ R to H(v, u) ≤ Frq defines a sheaf over the projective space P(R), so such labels have some nontrivial relation to glue together to form a sheaf. (See the related concept of kernel sheaves as in [KV12].) It may be possible to use these observations to define a reasonable refinement step in the alternating matrix space setting. In this paper we shall follow the following reformulation. A reformulation of the refinement step. To resolve the above problem, we reformulate the idea in the graph setting as follows. Recall that on the G side we start with the standard individualisation [r]∪{r +1, . . . , n} with an order on [r] as (1, . . . , r), and let S = [r], T = {r +1, . . . , n}. This defines the bipartite graph B = (S ∪ T, F ) where the edge set F is induced from G. For a fixed individualisation on the H side, which produces L ∪ R, L = {i1 , . . . , ir } ⊆ [n] with an order on L, this also defines a bipartite graph C = (L ∪ R, F 0 ) where F 0 is induced from H. A bijective ψ : T → R is a right-side isomorphism between B and C if it induces an isomorphism between B and C as bipartite graphs. Let RIso(B, C) be the set of right-side isomorphisms, and let IndIso(G, H) be the set of individualisation-respecting isomorphisms from G to H w.r.t the above individualisations. 7 Note that both RIso(B, C) and IndIso(G, H) can be embedded to the set of bijective maps between T and R. The key observation is that an individualisation-respecting isomorphism has to be a right-side isomorphism between B and C, e.g. IndIso(G, H) ⊆ RIso(B, C). Also note that either |RIso(B, C)| = 0 (e.g. when B and C are not right-isomorphic), or |RIso(B, C)| = |RAut(B)| where RAut(B) := RIso(B, B). The refinement step as in Section 2.1 achieves two goals. Firstly on the G side, most G’s have the corresponding B with |RAut(B)| = 1. This means that |RIso(B, C)| ≤ 1. Secondly, given H with a fixed individualisation inducing the corresponding bipartite graph C, there is an efficient procedure to decide whether B and C are right-isomorphic (by comparing the labels), and if they do, enumerate all right-isomorphisms (actually unique). In the AltMatSpIso setting, on the G side we start with the standard individualisation S = he1 , . . . , er i, T = her+1 , . . . , en i with the ordered basis (e1 , . . . , er ) of S. We can also define a correspondence of the bipartite graph B in this setting, which is the matrix space B 0 = {[e1 , . . . , er ]t P [er+1 , . . . , en ] : P ∈ G} ≤ M (r × (n − r), q), where [e1 , . . . , er ] denotes the n × r matrix listing the column vectors {ei : i = 1, . . . , r}. Note that [e1 , . . . , er ]t P [er+1 , . . . , en ] is just the upper-right r × (n − r) submatrix of P . Similarly, the individualisation on the H side yields L ⊕ R with an ordered basis of L, (v1 , . . . , vr ), vi ∈ Fnq . Take any basis of R = hvr+1 , . . . , vn i. Similarly construct C 0 = {[v1 , . . . , vr ]t Q[vr+1 , . . . , vn ] : Q ∈ H} ≤ M (r × (n − r), q). A ∈ GL(n − r, q) is a right-side equivalence between B 0 and C 0 if B 0 A := {DA : D ∈ B 0 } = C 0 . Let RIso(B 0 , C 0 ) be the set of right-side equivalences between B 0 and C 0 , and IndIso(G, H) the set of individualisationrespecting isometries between G and H. Similarly, both RIso(B 0 , C 0 ) and IndIso(G, H) can be embedded in the set of invertible linear maps from T to R (isomorphic to GL(n − r, q)), and we have IndIso(G, H) ⊆ RIso(B 0 , C 0 ). Furthermore RIso(B 0 , C 0 ) is either empty (e.g. B 0 and C 0 are not right-side equivalent), or a coset of RAut(B 0 ) := RIso(B 0 , B 0 ). So in analogy with the graph setting, for our purpose the goals become: (1) for most m-alternating space G ≤ Λ(n, q) with m = cn for some constant c, setting r to be some constant, we have |RAut(B 0 )| ≤ q O(n) , and (2) for G’s satisfying (1), RIso(B 0 , C 0 ) can be enumerated efficiently. We are almost ready for the algorithm outline. Alas, there is one important ingredient missing. It turns out for the purpose of (2), we will need to“linearise” RAut(B 0 ) to allow for the use of efficient linear algebra procedures. This linearisation is captured by the adjoint algebra concept, defined below in the algorithm outline. Correspondingly, in the goals above we will replace RAut(B 0 ) and RIso(B 0 , C 0 ) with Adj(B) and Adj(B, C) where B and C will be defined below as well. 2.3 Algorithm outline Suppose we want to test isometry between two m-alternating spaces G = hG1 , . . . , Gm i and H = hH1 , . . . , Hm i in Λ(n, q). To ease the presentation in this subsection we assume r = 4 and m = n−4. We first define the property on G for the sake of average-case analysis. Given those Gk ∈ Λ(n, q) linearly spanning G, form a 3-tensor G ∈ Fn×n×m where G(i, j, k) denotes the (i, j)th entry of Gk . q 0 Let B be the upper-right r × (n − r) × m subtensor of G, with Bk0 being the corresponding corner in Gk . Bk0 ’s span the B 0 as defined above, soPA ∈ RAut(B 0 ) ≤ GL(n − r, q) if and only if there exists D = (di,j ) ∈ GL(m, q) such that ∀i ∈ [m], j∈[m] di,j Bj0 = Bi0 A. It is more convenient that we flip B0 which is of size r × (n − r) × m to the B which is of size (n − r) × m × r (Figure 1). Slicing B along the third index, we obtain an r-tuple of (n − r) × m matrices (B1 , . . . , Br ) (Figure 2). Define the set of equivalences of B as Aut(B) := {(A, D) ∈ GL(n − r, q) × GL(m, q) : ∀i ∈ [r], ABi D−1 = Bi }. Note that RAut(B 0 ) is the projection of Aut(B) to the first component. Now define the adjoint algebra of B as Adj(B) := {(A, D) ∈ M (n − r, q) ⊕ M (m, q) : ∀i ∈ [r], ABi = 8 Figure 1: The 3-tensor G, and flipping B0 to get B. Figure 2: Slicing B. Bi D}. (A, D) ∈ M (n − r, q) ⊕ M (m, q) is called invertible, if both A and D are invertible. Clearly, Aut(B) consists of the invertible elements in Adj(B). When r = 4, m = n − r = n − 4, it can be shown that the adjoint algebra of 4 random matrices in M (m, q) is of size q O(m) with probability 1 − 1/q Ω(m) . The key to prove this statement is the stable notion from geometric invariant theory [MFK94] in the context of the left-right action of GL(m, q) × GL(m, q) on matrix tuples M (m, q)r . In this context, a matrix tuple (B1 , . . . , Br ) ∈ M (m, q)r is stable, if for every nontrivial subspace U ≤ Fnq , dim(h∪i∈[r] Bi (U )i) > dim(U ). An upper bound on |Adj(B)| can be obtained by analysing this notion using some classical algebraic results and elementary probability calculations. The good property we impose on G is then that the corresponding |Adj(B)| ≤ q O(m) . It can be verified that this property does not depend on the choices of bases of G. There is one subtle point though: the analysis on Adj(B) is done for 4 random matrices but we want an analysis for G in the linear algebraic Erdős-Rényi model. This can be fixed by defining a so-called naive model and analysing the relation between the naive model and the LinER model (Section 5). Now that we have achieved our first goal, namely defining a good property satisfied by most G’s, let us see how this property enables an algorithm for such G’s. For an arbitrary H ≤ Λ(n, q), at a multiplicative cost of q O(n) (recall thar r = 4) we can enumerate all r-individualisations. Consider a fixed one, say Fnq = L ⊕ R with an ordered basis (v1 , . . . , vr ) of L. Analogous to the above, we can construct C0 , flip to get C, and slice C into r m × m matrices (C1 , . . . , Cr ). The task then becomes to compute Adj(B, C) := {(A, D) ∈ M (n − r, q) ⊕ M (m, q) : ∀i ∈ [r], ABi = Ci D}. Viewing A and D as variable matrices, ABi = Ci D are linear equations on A and D, so the solution set can be computed efficiently. As |Adj(B)| ≤ q O(m) , for Adj(B, C) to contain an invertible element, it must be that |Adj(B, C)| = |Adj(B)| ≤ q O(m) . In this case all elements in Adj(B, C) can be enumerated in time q O(m) = q O(n) . For each element (A, D) ∈ Adj(B, C), test whether it is invertible, and if so, test whether the A in that solution induces an isometry together with the individualisation. This completes a high-level description of the algorithm. In particular, this implies that if G satisfies this 9 property, then |Aut(G)| ≤ q O(n) . A detailed presentation is in Section 6, which have some minor differences with the outline here, as we want to reduce some technical details. 3 Preliminaries We collect some notation used in this paper. q is reserved for prime powers, and p for primes. For n ∈ N, [n] := {1, . . . , n}. Fq denotes the field of size q. 0 denotes the zero vector or the zero vector space. For i ∈ [n], ei denotes the ith standard basis vector of Fnq . For a vector space V and S ⊆ V , we use hSi to denote the linear span of S in V . M (s × t, q) denotes the linear space of matrices of size s × t over Fq , and M (s, q) := M (s × s, q). Is denotes the s × s identity matrix. For A ∈ M (s × t, q), At denotes the transpose of A. GL(n, q) is the general linear group consisting of n × n invertible matrices over Fq . Λ(n, q) is the linear space of alternating matrices of size n × n   over Fq . We use for the Gaussian binomial coefficient with base q, and for the ordinary q N  binomial coefficient. For N ∈ N and m ∈ [N ], m q counts the number of dimension-m subspaces in FN q . By a random vector in FN q , we mean a vector of length N where each entry is chosen independently and uniformly random from Fq . By a random matrix in M (s × t, q), we mean a matrix of size s × t where each entry is chosen independently and uniformly random from Fq . By a random alternating matrix in Λ(n, q), we mean an alternating matrix of size n where each entry in the strictly upper triangular part is chosen independently and uniformly random from Fq . Then the diagonal entries are set to 0, and the lower triangular entries are set in accordance with the corresponding upper triangular ones. Fact 4. Let N ∈ N and m ∈ N such that 0 ≤ m ≤ N . N 1. For a fixed subspace U in FN q of dimension m, the number of complements of U in Fq is m(N −m) q ; 2. A random matrix A ∈ M (N × m, q) is of rank m with probability ≥ 1 − m/q N −m+1 ; 3. A random matrix A ∈ M (N × m, q) is of rank m with probability > 1/4. Proof. (1) is well-known. For (2), observe that Pr[rk(A) = m|A ∈ M (N × m, q)] = (1 − 1/q N )(1 − 1/q N −1 ) . . . (1 − 1/q N −m+1 ) ≥ 1 − (1/q N + 1/q N −1 + · · · + 1/q N −m+1 ) ≥ 1 − m/q N −m+1 . For (3), this is because 4 1 2 · 3 4 · 7 8 · · · · ≈ 0.288788 > 1/4. Matrix tuples and matrix spaces An r-matrix tuple of size s × t over Fq is an element in M (s × t, q)r . An r-matrix space of size s × t over Fq is a dimension-r subspace in M (s × t, q). An m-alternating (matrix) tuple of size n over Fq is an element from Λ(n, q)m . An m-alternating (matrix) space of size n over Fq is a dimension-m 10  subspace in Λ(n, q). In the rest of this article we let Nn = n2 = dim(Λ(n, q)), or just N if n is obvious from the context. We shall use G, H, . . . , to denote alternating spaces, and G, H, . . . , to denote alternating tuples. B, C, . . . , are for (not necessarily alternating nor square) matrix spaces, and B, C for (not necessarily alternating nor square) matrix tuples. We say that a matrix tuple B represents a matrix space B, if the matrices in B form a spanning set (not necessarily a basis) of B. Given A ∈ M (s, q), D ∈ M (t, q), and B = (B1 ,P . . . , Br ) ∈ MP (s × t, q)r , ABDPis the tuple (AB1 D, . . . , ABr D). For Z Z = (zi,j ) ∈ M (r, q), B = ( i∈[r] z1,i Bi , i∈[r] z2,i Bi , . . . , i∈[r] zr,i Bi ). Two alternating tuples G = (G1 , . . . , Gm ) and H = (H1 , . . . , Hm ) in Λ(n, q)m are isometric, if there exists A ∈ GL(n, q), At GA = H. Two alternating spaces G and H in Λ(n, q) are isometric, if there exists A ∈ GL(n, q), such that At GA = H (equal as subspaces). Given alternating tuples G ∈ Λ(n, q)m and H ∈ Λ(n, q)m representing G and H respectively, G and H are isometric, if and only if there exists Z ∈ GL(m, q) such that G and HZ are isometric – in other words, there exist A ∈ GL(n, q) and Z ∈ GL(m, q), such that At GA = HZ . We use Iso(G, H) ⊆ GL(n, q) to denote the set of isometries between G and H. When G = H, the isometries between G and G are also called autometries. The set of all autometries forms a matrix group, and let Aut(G) = Iso(G, G) ≤ GL(n, q). Iso(G, H) is either empty or a right coset w.r.t. Aut(G). Analogously, we can define the corresponding concepts for tuples Iso(G, H) and Aut(G). 3 Two matrix tuples B = (B1 , . . . , Br ) and C = (C1 , . . . , Cr ) in M (s × t, q)r are equivalent, if there exist A ∈ GL(s, q) and D ∈ GL(t, q), such that ABD−1 = C. Two matrix spaces B and C in M (s × t, q) are equivalent, if there exist A ∈ GL(s, q) and D ∈ GL(t, q), such that ABD−1 = C (equal as subspaces). By abuse of notation, we use Iso(B, C) ≤ GL(s, q) × GL(t, q) to denote the set of equivalences between B and C, and let Aut(B) = Iso(B, B). Iso(B, C) is either empty or a left coset of Aut(B). Similarly we have Iso(B, C) and Aut(B). A trivial but useful observation is that Iso(B, C) and Aut(B) are naturally contained in certain subspaces of M (s, q) ⊕ M (t, q) as follows.4 Following [Wil09], we define the adjoint algebra of B ∈ M (s×t, q)r as Adj(B) = {(A, D) ∈ M (s, q)⊕ M (t, q) : AB = BD}. This is a classical concept, and is recently studied in the context of p-group isomorphism testing by Wilson et al. [Wil09, LW12, BW12, BMW15]. We further define the adjoint space between B and C in M (s × t, q)r as Adj(B, C) = {(A, D) ∈ M (s, q) ⊕ M (t, q) : AB = CD}. (A, D) ∈ M (s, q) ⊕ M (t, q) is called invertible if both A and D are invertible. Then Aut(B) (resp. Iso(B, C)) consists of invertible elements in Adj(B) (resp. Adj(B, C)). An easy observation is that if B and C are isometric, then an isometry defines a bijection between Adj(B, C) and Adj(B). 3 We explain our choices of the names “isometry” and “autometry”. In [Wil09], for two alternating bilinear maps n m b, c : Fn q × Fq → Fq , an isometry between b and c is A ∈ GL(n, q) such that b(A(v1 ), A(v2 )) = c(v1 , v2 ) for every n v1 , v2 ∈ Fq . A pseudo-isometry between b and c is (A, D) ∈ GL(n, q) × GL(m, q), such that b(A(v1 ), A(v2 )) = D(c(v1 , v2 )). The isometry group of b consists of those A ∈ GL(n, q) preserving b as above, and the pseudo-isometry group of b can also be defined naturally. Representing b and c by two alternating matrix tuples, we see that the isometry (resp. self-isometry) concept there is the same as our isometry (resp. autometry) concept for tuples. The pseudo-isometry (resp. self-pseudo-isometry) concept corresponds to – though not exactly the same – the isometry (resp. autometry) concept for spaces. We use autometries which seem more convenient and allow for using the notation Aut. 4 This linearisation trick allows us to decide whether B and C are equivalent, and compute a generating set of Aut(B), by using (sometimes with a little twist) existing algorithms for testing module isomorphism [CIK97, BL08, IKS10] and computing the unit group in a matrix algebra [BO08]. On the other hand, Iso(G, H) and Aut(G) for alternating tuples do not permit such easy linearisation. Therefore testing isometry between G and H [IQ17] and computing a generating set for Aut(G) [BW12] requires, besides the techniques in [CIK97, BL08, IKS10, BO08], new ideas, including exploiting the ∗-algebra structure, the use of which in the context of computing with p-groups is pioneered by Wilson [Wil09]. 11 Given B = (B1 , . . . , Br ) ∈ M (s×t, q)r , let im(B) = h∪i∈[m] im(Bi )i and ker(B) = ∩i∈[m] ker(Bi ). B is image-nondegenerate (resp. kernel-nondegenerate), if im(B) = Fsq (resp. ker(B) = 0). Note that if B is an alternating tuple in Λ(n, q)m , then B is image-nondegenerate if and only if it is kernel-nondegenerate, as im(B) and ker(B) are orthogonal to each other w.r.t. the standard bilinear form on Fnq . B is nondegenerate if it is both image-nondegenerate and kernel-nondegenerate. If B is image-nondegenerate (resp. kernel-nondegenerate), then the projection of Adj(B) to the first (resp. second) component along the second (resp. the first) component is injective. For a matrix tuple B = (B1 , . . . , Br ) ∈ M (s × t, q)r and a subspace U ≤ Ftq , the image of U under B is B(U ) := h∪i∈[m] Bi (U )i. It is easy to verify that, (AB)(U ) = A(B(U )), and (BD)(U ) = (B(D(U ))). U ≤ Ftq is trivial if U = 0 or U = Ftq . Definition 5. B ∈ M (s × t, q)r is stable, if B is nondegenerate, and for every nontrivial subspace U ≤ Ftq , dim(B(U ))/ dim(U ) > s/t. Remark 6. In Definition 5, we can replace nondegenerate with image-nondegenerate, as the second condition already implies kernel-nondegenerate. Lemma 7, 9 and Claim 11 are classical and certainly known to experts. However for completeness we include proofs which may be difficult to extract from the literature. Lemma 7. If B is stable, then any nonzero (A, D) ∈ Adj(B) is invertible. Proof. Take any (A, D) ∈ Adj(B). If D = 0, then AB = BD = 0, and by the image nondegeneracy of B, A has to be 0. Suppose now that D is not invertible nor 0, so ker(D) is not 0 nor Ftq . By AB(ker(D)) = BD(ker(D)) = 0, A(B(ker(D))) = 0, which gives ker(A) ≥ B(ker(D)). As B is stable, we have dim(B(ker(D))) > (s/t) dim(ker(D)), so dim(ker(A)) > (s/t) dim(ker(D)). On the other hand, AB(Ftq ) = BD(Ftq ). Again, by the image nondegeneracy of B, B(Ftq ) = Fsq , so AB(Ftq ) = im(A), and we see that im(A) = B(im(D)). As B is stable, dim(im(A)) > (s/t) dim(im(D)). It follows that s = dim(im(A)) + dim(ker(A)) > (s/t)(dim(im(D)) + dim(ker(D))) = (s/t) · t = s. This is a contradiction, so D has to be invertible. If D is invertible, then BD is image-nondegenerate, so A has to be invertible, as otherwise AB would not be image-nondegenerate. Remark 8. We present some background information on the stable concept and Lemma 7, for readers who have not encountered these before. Briefly speaking, the stable concept is a correspondence of the concept of simple as in representation theory of associative algebras, and Lemma 7 is an analogue of the Schur’s lemma there. Both the stable concept here and the simple concept are special cases of the stable concept in geometric invariant theory [MFK94, Kin94], specialised to the left-right action of GL(s, q) × GL(t, q) on M (s × t, q)r , and the conjugation action of GL(s, q) on M (s, q)r , respectively. Specifically, consider a tuple of square matrices B ∈ M (s, q)r , which can be understood as a representation of an associative algebra with r generators. This representation is simple if and only if it does not have a non-trivial invariant subspace, that is U ≤ Fsq , such that B(U ) ≤ U . −1 This amounts  to say that there does not exist A ∈ GL(s, q) such that every B in ABA is in the B1 B2 form where Bi ∈ M (s0 , q), 1 ≤ s0 ≤ s − 1. On the other hand, the stable concept can 0 B3 be rephrased as the following. B ∈ M (s × t, q)r is stable, if there do not exist A ∈ GL(s, q) and 12 D ∈ GL(t, q) such that every B ∈ ABD−1   B1 B2 is of the form where B1 is of size s0 × t0 , 0 B3 1 ≤ t0 ≤ t − 1, such that s0 /t0 ≤ s/t. Lemma 7 can be understood as an analogue of Schur’s lemma, which states that if B ∈ M (s, q)r is simple then a nonzero homomorphism A ∈ M (s, q) of B (e.g. ABA−1 = B) has to be invertible. The proof of the following classical result was communicated to us by G. Ivanyos. Lemma 9. Let A ⊆ M (n, q) be a field containing λIn , λ ∈ Fq . Then |A| ≤ q n . Proof. A is an extension field of Fq , and suppose its extension degree is d. Then Fnq is an Amodule, or in other words, a vector space over A. So Fnq ∼ = Am as vector spaces over A for some m ∈ N. Considering them as Fq vector spaces, we have n = md so d divides n. It follows that |A| = q d ≤ q n . By Lemma 7 and 9, we have the following. Proposition 10. If B ≤ M (s × t, q)r is stable, then |Adj(B)| ≤ q s . Proof. As B is stable, it is nondegenerate, so the projection of Adj(B) ≤ M (s, q) ⊕ M (t, q) to M (s, q) (naturally embedded in M (s, q) ⊕ M (t, q)) along M (t, q) is injective. By Lemma 7, the image of the projection is a finite division algebra over Fq containing λI. So by Wedderburn’s little theorem, it is a field. By Lemma 9, the result follows. Let us also mention an easy property about stable. Claim 11. Given B = (B1 , . . . , Br ) ∈ M (s × t, q)r , let Bt = (B1t , . . . , Brt ) ∈ M (t × s, q)r . Then B is stable if and only if Bt is stable. Proof. First we consider the nondegenerate part. If u ∈ Fsq satisfies B(u) = 0, then it is easy to verify that Bt (Ftq ) is contained in the hyperplane defined by u, e.g. ut (Bt (Fsq )) = 0. If B(Ftq ) 6= Fsq , then there exists some u ∈ Fsq such that ut (B(Ftq )) = 0, so u ∈ ker(Bt ). Therefore B is nondegenerate if and only if Bt is nondegenerate. In the following we assume that B is nondegenerate, and check nontrivial subspaces to show that B is not stable if and only if Bt is not stable. This can be seen easily from the discussion in Remark 8. B is not stable, then there exist A ∈ GL(r, q) and D ∈ GL(t, q) such that every  B 1 B2 B ∈ ABD−1 is of the form where B1 is of size s0 × t0 , 1 ≤ t0 ≤ t − 1, such that s0 /t0 ≤ s/t. 0 B3 Note that s0 > 0 as otherwise B is degenerate, so 1 ≤ s0 ≤ st · t0 < s. Now consider D−t Bt At ,  t  B1 0 the elements in which is of the form . Note that B3t is of size (t − t0 ) × (s − s0 ) where B2t B3t 1 ≤ s − s0 ≤ s − 1, 1 ≤ t − t0 ≤ t − 1, and (t − t0 )/(s − s0 ) ≤ t/s (by s0 /t0 ≤ s/t). It follows that D−t Bt At is not stable, so Bt is not stable. This concludes the proof. 5 Random alternating matrix spaces  For n ∈ N, N = n2 . Recall the definition of the linear algebraic Erdős-Rényi model, LinER(n, m) in Model 1. It turns out for our purpose, we can work with the following model. 13 Model 3 (Naive models for matrix tuples and matrix spaces). The naive model for alternating tuples, NaiT(n, m, q), is the probability distribution over the set of all m-tuples of n × n alternating tuples, where each tuple is endowed with probability 1/q N m . The naive model for alternating spaces, NaiS(n, m, q), is the probability distribution over the set of alternating spaces in Λ(n, q) of dimension ≤ m, where the probability at some G ≤ Λ(n, q) of dimension 0 ≤ d ≤ m equals the number of m-tuples of n × n alternating tuples that represent G, divided by q N m . While we aim at analysing the algorithm in the LinER model, we will ultimately work with the naive model due to its simplicity, as it is just an m-tuple of random n × n alternating matrices. The naive model for alternating spaces, NaiS, then is obtained by taking the linear spans of such tuples. The following observation will be useful. Observation 12. Every m-alternating space has (q m − 1)(q m − q) . . . (q m − q m−1 ) m-alternating tuples representing it. We now justify that working with the naive model suffices for the analysis even in the linear algebraic Erdős-Rényi model. Consider the following setting. Suppose we have E(n, m, q), a property of dimension-m alternating spaces in Λ(n, q), and wish to show that E(n, m, q) holds with high probability in LinER(n, m, q). E(n, m, q) naturally induces E 0 (n, m, q), a property of alternating tuples in Λ(n, q)m that span dimension-m alternating spaces. It is usually the case that there exists a property F (n, m, q) of all m-alternating tuples in Λ(n, q)m , so that F (n, m, q) and E 0 (n, m, q) coincide when restricting to those alternating tuples spanning dimension-m matrix spaces. If we could prove that F (n, m, q) holds with high probability, then since a nontrivial fraction of m-tuples do span dimension-m spaces, we would get that E(n, m, q) holds with high probability as well. The following proposition summarises and makes precise the above discussion. Proposition 13. Let E(n, m, q) and F (n, m, q) be as above. Suppose in NaiT(n, m, q), F (n, m, q) happens with probability ≥ 1 − f (n, m, q) where 0 ≤ f (n, m, q) < 1. Then in LinER(n, m, q), E(n, m, q) happens with probability > 1 − 4 · f (n, m, q). Proof. The number of tuples for which F (n, m, q) fails is no larger than f (n, m, q) · q N m . Clearly the bad situation for E 0 (n, m, q) is when each of them spans an m-alternating space, so we focus on this case. Recall that E 0 (n, m, q) is induced from a property of m-alternating spaces. That is, if two tuples span the same m-alternating space, then either both of them satisfy E 0 (n, m, q), or neither of them satisfies E 0 (n, m, q). By Observation 12, the number of m-alternating spaces for qN m which E(n, m, q) fails is ≤ f (n, m, q) · (qm −1)(qm −q)...(q m −q m−1 ) . The fraction of m-alternating spaces for which E(n, m, q) fails is then ≤ f (n, m, q) · comes from Fact 4 (3). 5.1 qN m (q N −1)(q N −q)...(q N −q N −m+1 ) < 4 · f (n, m, q) where 4 Random matrix spaces For s, t, r ∈ Z+ , we can define the Erdős-Rényi model for bipartite graphs on the vertex set [s] × [t]  st with edge set size r by taking every subset of [s] × [t] of size r with probability r . Analogously we can define the following in the matrix space setting. 1. The bipartite linear algebraic Erdős-Rényi model   BipLinER(s × t, r, q): each r-matrix space in M (s × t, q) is chosen with probability 1/ st r q. 14 2. The bipartite naive model BipNaiT(s × t, r, q) for matrix tuples: each r-matrix tuple in M (s × t, q)r is chosen with probability 1/q str . 3. The bipartite naive model BipNaiS(s × t, r, q) for matrix spaces: each matrix space B of dimension d, 0 ≤ d ≤ r in M (s × t, q), is chosen with probability a/q str where a is the number of r-matrix tuples representing B. 6 The main algorithm We will first define the property F (n, m, q, r) for the average-case analysis in Section 6.1. To lower bound the probability of F (n, m, q, r) we will actually work with a stronger property F 0 (n, m, q, r) in Section 6.1.1. Given this property we describe and analyse the main algorithm in Section 6.2. It should be noted that the algorithm here differs slightly from the outline from Section 2.3, as there we wanted to reduce some technical details. 6.1 Some properties of alternating spaces and alternating tuples An m-alternating space G ≤ Λ(n, q) induces B 0 = {[e1 , . . . , er ]t G[er+1 , . . . , en ] : G ∈ G} which is a matrix space in M (r × (n − r), q) of dimension no more than m. Define RAut(B 0 ) := {A ∈ GL(n − r, q) : B 0 A = B 0 }. An element in RAut(B 0 ) is called a right-side equivalence of B 0 . Definition 14. E 0 (n, m, q, r) is a property of m-alternating spaces in Λ(n, q), defined as follows. Given an m-alternating space G in Λ(n, q), let B 0 be the matrix space in M (r × (n − r), q) defined as above. G belongs to E 0 (n, m, q, r), if and only if |RAut(B 0 )| ≤ q n−r . Right-side equivalence is a useful concept that leads to our algorithm (as seen in Section 2.2), but what we actually need is the following linearisation of RAut(B 0 ). Definition 15. E(n, m, q, r) is a property of m-alternating spaces in Λ(n, q), defined as follows. Given an m-alternating space G in Λ(n, q), let B 0 be the matrix space in M (r × (n − r), q) defined as above. G belongs to E(n, m, q, r), if and only if |{A ∈ M (n − r, q) : B 0 A ≤ B 0 }| ≤ q n−r . We define a property F (n, m, q, r) for alternating tuples that corresponds to E(n, m, q, r). Given G = (G1 , . . . , Gm ) ∈ Λ(n, q)m , we can construct a matrix tuple B0 = ([e1 , . . . , er ]t B1 [er+1 , . . . , en ], . . . , [e1 , . . . , er ]t Bm [er+1 , . . . , en ]) in M (r × (n − r), q)m . Definition 16. F (n, m, q, r) is a property of m-alternating tuples in Λ(n, q)m , defined as follows. Given an m-alternating tuple G in Λ(n, q)m , let B0 be the m-matrix tuple in M (r × (n − r), q)m defined as above. G belongs to E(n, m, q, r), if and only if |{A ∈ M (n − r, q) : ∃D ∈ M (m, q), B0 A = B0D }| ≤ q n−r . It is not hard to see that F (n, m, q, r) is a proper extension of E(n, m, q, r). Proposition 17. Suppose G ∈ Λ(n, q)m represents an m-alternating space G ≤ Λ(n, q). Then G is in F (n, m, q, r) if and only if G is in E(n, m, q, r). Proof. Let B 0 and B0 be the matrix space and matrix tuple defined as above for G and G, respectively. Clearly B0 represents B 0 , so B0 A represents B 0 A. Finally note that B0 A = B0D for some D ∈ M (n, q) if and only if the linear span of B0 A is contained in the linear span of B0 , that is B0 A ≤ B0 . 15 Instead of working with B0 and {A ∈ GL(n − r, q) : ∃D ∈ GL(m, q), B0 A = B0D }, it is more convenient to flip B0 , an m-matrix tuple of size r × (n − r), to get B, an r-matrix tuple of size (n − r) × m. Then {A ∈ M (n − r, q) : ∃D ∈ M (m, q), B0 A = B0D } = {A ∈ M (n − r, q) : ∃D ∈ M (m, q), AB = BD}. The latter is closely related to the adjoint algebra concept for matrix tuples as defined in Section 4. Recall that Adj(B) = {(A, D) ∈ M (n − r, q) ⊕ M (m, q) : AB = BD}. Let π1 : M (n − r, q) ⊕ M (m, q) → M (n − r, q) be the projection to the first component along the second. {A ∈ M (n − r, q) : ∃D ∈ M (m, q), AB = BD} is then just π1 (Adj(B)). So Definition 16 is equivalent to the following. Definition 16, alternative formulation. F (n, m, q, r) is a property of m-alternating tuples in Λ(n, q)m , defined as follows. Given an m-alternating tuple G in Λ(n, q)m , let B be the mmatrix tuple in M ((n − r) × m, q)r defined as above. G belongs to E(n, m, q, r), if and only if |π1 (Adj(B))| ≤ q n−r . Our algorithm will be based on the property F (n, m, q, r). To show that F (n, m, q, r) holds with high probability though, we turn to study the following stronger property. Definition 18. F 0 (n, m, q, r) is a property of m-alternating tuples in Λ(n, q)m , defined as follows. Given an m-alternating tuple G in Λ(n, q)m , let B be the r-matrix tuple in M ((n − r) × m, q)r defined as above. G belongs to F 0 (n, m, q, r), if and only if |Adj(B)| ≤ q n−r . Clearly F 0 (n, m, q, r) implies F (n, m, q, r). To show that F 0 (n, m, q, r) holds with high probability, Proposition 10 immediately implies the following, which directs us to make use of the stable property. Proposition 19. Let G and B be defined as above. If B is stable, then G ∈ F 0 (n, m, q, r). 6.1.1 Estimating the probability for the property F 0 (n, m, q, r) We now show that F 0 (n, m, q, r) holds with high probability, when m = cn for some constant c with an appropriate choice of r depending on c. The integer r is chosen so that r ≥ 4 · n−r m if n − r ≥ m, m and r ≥ 4 · n−r if m ≥ n − r. When n is large enough this is always possible. For example, if c ≥ 1, m if n ≥ 25c. If 0 < c < 1, let r be an integer let r be any integer ≥ 5c, which ensures that r ≥ 4 · n−r n−r n−r m ≥ 5/c. If n − 5/c ≥ m, then r ≥ 5 · m ≥ 4 · m . If n − 5/c < m, then r ≥ 5 · n−r m ≥ 4 · n−r if r √ n ≥ 1−2c/ 5 . Let s = n − r and t = m. By Proposition 19, to show F 0 (n, m, q, r) holds with high probability, we can show that for most G from NaiT(n, m, q), the corresponding B in M (s × t, q)r is stable. A simple observation is that NaiT(n, m, q) induces BipNaiT(s × t, r, q) obtained by flipping the upper right s × t corners of the alternating matrices (see Figure 1). So we reduce to estimate the probability of an r-matrix tuple B in M (s × t, q)r being stable in the model BipNaiT(s × t, r, q). By our choice of r, we obtain an r-matrix tuple M (s × t, q) with r ≥ 4 · max(s,t) min(s,t) . By Claim 11, we know Pr[B is stable in BipNaiT(s × t, r, q)] = Pr[C is stable in BipNaiT(t × s, r, q)] via the transpose map. So it is enough to consider the case when s ≥ t. Proposition 20. Give positive integers s, t, and r such that s ≥ t ≥ 16, st = b ≥ 1, and r ≥ 4 · st . 1 Then B is stable with probability 1 − qΩ(t) in BipNaiT(s × t, r, q), where Ω(t) hides a positive constant depending on b. 16 Proof. We will upper bound the probability of B being not stable in BipNaiT(s × t, r, q), which is P = Pr[B is degenerate, or ∃U ≤ Ftq , U non-trivial, dim(B(U )) s ≤ ]. dim(U ) t By the union bound, we have: X P ≤ U ≤Ftq ,1≤dim(U )≤t−1 Pr[ dim(B(U )) s ≤ ] + Pr[B is degenerate]. dim(U ) t About B being degenerate. By Remark 6, we only need to bound Pr[B is image-degenerate]. Noticing that im(B) is spanned by the columns of Bi ’s, by forming an s×rt matrix A = [B1 , B2 , . . . , Br ], this amounts to upper bound the probability that Pr[rk(A) < s|A ∈ M (s×rt, q)]. As rt ≥ 4bt = 4s, Pr[rk(A) = s|A ∈ M (s × rt, q)] ≥ Pr[rk(A) = s|A ∈ M (s × 4s, q)] ≥ 1 − s/q 3s+1 , where the last inequality is from Fact 4 (2). So we have Pr[B is image-degenerate] ≤ 1/q Ω(t) since s = bt. Reduce to work with nontrivial subspaces according to the dimension d. Now we focus P )) s t on U ≤Ftq ,1≤dim(U )≤t−1 Pr[ dim(B(U dim(U ) ≤ t ] in the following. For a nontrivial subspace U ≤ Fq , let BU = {B ∈ M (s × t, q)r : dim(B(U )) s ≤ }. dim(U ) t Consider two subspace U1 , U2 ≤ Ftq of the same dimension 1 ≤ d ≤ t − 1. We claim that |BU1 | = |BU2 |. Let X ∈ GL(t, q) be any invertible matrix such that X(U2 ) = U1 , and consider the map TX : M (s × t, q)r → M (s × t, q)r defined by sending B to BX. It is easy to verify that TX is 1 )) a bijection between BU1 and BU2 . The claim then follows and we have PrB [ dim(B(U ≤ st ] = dim(U1 ) s 2 )) PrB [ dim(B(U dim(U2 ) ≤ t ]. So setting Ud = he1 , . . . , ed i, we have X U ≤Ftq ,1≤dim(U )≤t−1 dim(B(U )) s Pr[ ≤ ]= dim(U ) t X 1≤d≤t−1   s t Pr[dim(B(Ud )) ≤ · d]. d q t  Upper bound dt q Pr[dim(B(Ud )) ≤ st · d]. For 1 ≤ d ≤ t − 1, let Pd = Pr[dim(B(Ud )) ≤ st · d]. For any matrix B ∈ M (s × t, q), B(Ud ) is spanned by the first d column vectors of B. So for B = (B1 , . . . , Br ) ∈ M (s × t, q)r , B(Ud ) is spanned by the first d columns of Bi ’s. Collect those columns to form a matrix A ∈ M (s × rd, q), and we have Pd = Pr[dim(B(Ud )) ≤ bd] = Pr[rk(A) ≤ bbdc|A ∈ M (s × rd, q)]. (1) Note that in the above we substituted bd with bbdc as that does not change the probability. Equation 1 suggests the following upper bound of Pd . For A to be of rank ≤ bbdc, there must exist bbdc columns such that other columns are linear combinations of them. So we enumerate all 17 subsets of the columns of size bbdc, fill in these columns arbitrarily, and let other columns be linear combinations of them. This shows that  sbbdc bbdc(rd−bbdc) rd ·q bbdc · q Pd ≤ . (2) q srd When 1 ≤ d ≤ t/2, we have   t Pd ≤ d q rd bbdc  · q sbbdc · q bbdc(rd−bbdc) · t d q q srd q rd · q sbd · q bd(rd−bd) · q td (3) q srd 1 ≤ (sr−sb−t−r)d−b(r−b)d2 , q   rd where in the second inequality, we use bbdc ≤ 2rd ≤ q rd , dt q ≤ q td and bbdc(rd−bbdc) ≤ bd(rd−bd) since r ≥ 4b. Let f (d) = (sr − sb − t − r)d − b(r − b)d2 . It is easy to see that f (d) achieves minimum at d = 1 or d = t/2 in the interval 1 ≤ d ≤ 2t . We have f (1) = (br − b2 − 1)t + b2 − r − br and f ( 2t ) = ( 14 br − 14 b2 − 21 )t2 − 12 rt. Since r ≥ 4b and b ≥ 1, br − b2 − 1 ≥ 3b2 − 1 > 0 1 and 41 br − 41 b2 − 12 ≥ 34 b2 − 12 > 0. These two lower bounds then yield that dt q Pd ≤ qΩ(t) for 1 ≤ d ≤ t/2.  t   in Inequality 3 and obtain When t/2 ≤ d ≤ t − 3, we replace dt q by t−d q ≤   1 t Pd ≤ (sr−sb+t−r)d−b(r−b)d2 −t2 , d q q It can be seen easily that the function g(d) = (sr − sb + t − r)d − b(r − b)d2 − t2 achieves minimum at either d = t/2 or d = t − 3. We have g( 2t ) = f ( 2t ) = ( 14 br − 41 b2 − 21 )t2 − 21 rt and g(t−3) = (3br−3b2 −r−3)t+3r+9b2 −9br. Since r ≥4b and b ≥ 1, 34 b2 − 12 > 0 and 9b2 −4b−3 > 0 1 when b ≥ 1. These two lower bounds then yield that dt q Pd ≤ qΩ(t) for t/2 ≤ d ≤ t − 3. For d = t − 2 and t − 1, we use the method for the nondegenerate part. Recall that Pt−2 = Pr[rk(A) ≤ b(t − 2)|A ∈ M (s × r(t − 2), q)]. When t ≥ 16 (i.e. s ≥ 16b), r(t − 2) ≥ 4b(t − 2) ≥ d 72 se. Also note that b(t − 2) < bt = s. Therefore Pt−2 ≤ Pr[rk(A) < s|A ∈ M (s × d 27 se, q)], which is  t  2t 5 bt 1 ≤ s/q 2 s+1 by Fact 4 (2). Then t−2 P ≤ sq 5 s+1 = ( 5 b−2)t+1 ≤ q Ω(t) . The case when d = t − 1 is q t−2 2 2 q q  t  1 similar, and we can obtain t−1 P ≤ qΩ(t) as well. This concludes the proof. q t−1 6.2 The algorithm We now present a detailed description and analysis of the main algorithm and prove Theorem 1. As described in Section 2.3, the concept of r-individualisation is a key technique in the algorithm. Recall that an r-individualisation is a direct sum decomposition Fnq = L ⊕ R with an ordered basis (v1 , . . . , vr ) of L. In the algorithm we will need to enumerate all r-individualisations, and the following proposition realises this. 18 Proposition 21. There is a deterministic algorithm that lists all r-individualisations in Fnq in time q O(rn) . Each individualisation L ⊕ R with an ordered basis (v1 , . . . , vr ) of L is represented as an invertible matrix [v1 , . . . , vr , u1 , . . . , un−r ] where (u1 , . . . , un−r ) is an ordered basis of R. Proof. Listing all r-tuples of linearly independent vectors can be done easily in time q rn ·poly(n, log q). For a dimension-r L ≤ Fnq with an ordered basis (v1 , . . . , vr ), we need to compute all complements of L, and represent every complement by an ordered basis. To do this, we first compute one ordered basis of one complement of L, which can be easily done as this just means to compute a full ordered basis starting from a partial order basis. Let this ordered basis be (u1 , . . . , un−r ). Then the spans of the (n − r)-tuples (u1 + w1 , . . . , un−r + wn−r ) go over all complements of L when (w1 , . . . , wn−r ) go over all (n − r)-tuples of vectors from L. Add [v1 , . . . , vr , u1 + w1 , . . . , un−r + wn−r ] to the list. The total number of iterations, namely r-tuples of vectors from Fnq and (n − r)-tuples of vectors from 2 L∼ = Frq , is q 2rn−r . Other steps can be achieved via linear algebra computations. This concludes the proof. Remark 22. The algorithm in Proposition 21 produces a list T of invertible matrices of size n. An invertible A0 = [v1 , . . . , vn ] ∈ GL(n, q), viewed as a change-of-basis matrix, sends ei to vi for i ∈ [r], and her+1 , . . . , en i to R = hvr+1 , . . . , vn i. Suppose A1 = [v1 , . . . , vr , u1 , . . . , un−r ] is the matrix from  I 0 T where hu1 , . . . , un−r i = R. Then A0 = A1 r for some A ∈ GL(n − r, q). In particular for 0 A   Ir 0 . any A0 ∈ GL(n, q) there exists a unique A1 from T such that A−1 A is of the form 0 1 0 A We are now ready to present the algorithm, followed by some implementation details. Input. Two m-alternating tuples G = (G1 , . . . , Gm ) and H = (H1 , . . . , Hm ) in Λ(n, q)m representing m-alternating spaces G, H ≤ Λ(n, q), respectively. m = cn for some constant c, and n is large enough (larger than some fixed function of c). Output. Either certify that G does not satisfy F (n, m, q, r), or a set S consisting of all isometries between G and H. (If S = ∅ then G and H are not isometric.) Algorithm procedure. 1. S = ∅. 2. Set r ∈ N such that r ≥ 4 · n−r m 3. Construct B ∈ M ((n − r) × if n − r ≥ m, and r ≥ 4 · m, q)r m n−r if m ≥ n − r. as described in Section 2 or before Definition 18. 4. Compute a linear basis of Adj(B) ≤ M (n − r, q) ⊕ M (m, q). 5. Let π1 be the projection of M (n − r, q) ⊕ M (m, q) to M (n − r, q) along M (m, q). If dim(π1 (Adj(B))) > n − r, then return “G does not satisfy F (n, m, q, r).” 6. List all r-individualisations in Fnq by the algorithm in Proposition 21. For every rindividualisation Fnq = L ⊕ R with an ordered basis (v1 , . . . , vr ) of L, let A1 be its corresponding invertible matrix produced by the algorithm. Do the following. (a) Construct C ∈ M ((n − r) × m, q)r w.r.t. L ⊕ R and (v1 , . . . , vr ). (b) Compute a linear basis of Adj(B, C) := {(A, D) ∈ M (n − r, q) ⊕ M (m, q) : AB = CD}. 19 (c) If dim(π1 (Adj(B, C))) > n − r, go to the next r-individualisation. (d) If dim(π1 (Adj(B, C))) ≤ n − r, do the following:   Ir 0 i. For every A ∈ π1 (Adj(B, C)), if A is invertible, let A2 = . Test whether 0 A A0 = A2 A−1 1 is an isometry between G and H. If so, add A0 to S. 7. Return S. We describe some implementation details. Step 3. B is constructed by taking the upper-right r × (n − r) corners of Gi ’s to get an mmatrix tuple B0 ∈ M (r × (n − r), q)m , and flipping B0 to obtain an r-matrix tuple B ∈ M ((n − r) × m, q)r . See also Figure 1 and 2. Step 6.a. C is constructed as follows. In Step 6, by fixing an r-individualisation, we obtain a change-of-basis matrix A1 = [v1 , . . . , vr , u1 , . . . , un−r ] as described in Proposition 21. Let H1 = At1 HA1 . Then perform the same procedure as in Step 3 for H1 . Step 6.d.i. To test whether A0 = A2 A−1 1 is an isometry between G and H, we just need to test t whether A0 GA0 and H span the same alternating space. It is straightforward to verify that the algorithm runs in time q O(n) : the multiplicative cost 2 of enumerating r-individualisation is at most q 2rn−r , and the multiplicative cost of enumerating π1 (Adj(B, C)) is at most q n−r . All other steps are basic tasks in linear algebra so can be carried out efficiently. When m = cn and n larger than a fixed function of c, all but at most 1/q Ω(n) fraction of G ≤ Λ(n, q) satisfy F (n, m, q, r) by Propositions 20, 19, and 13. Note that Ω(n) hides a constant depending on c. To see the correctness, first note that by the test step in Step 6.d.i, only isometries will be added to S. So we need to argue that if G is in F (n, m, q, r), then every isometry A0 ∈ Iso(G, H) will be added to S. Recall that A0 ∈ GL(n, q) is an isometry from G to H if and only if there exists −1 D D ∈ GL(m, q) such that A0 t GA0 = HD , which is equivalent to G = A−t 0 (H )A0 . By Remark 22, −1 −1 −1 A0 ∈ GL(n, q) can be written  uniquely  as A0 = A1 A2 where A1 is from the list T produced by Ir 0 Proposition 21, and A−1 2 = 0 A−1 for some invertible A ∈ GL(n − r, q). When enumerating the individualisation corresponding to A1 , we have At2 GA2 = At1 (HD )A1 = (At1 HA1 )D , which implies that (A, D) ∈ Adj(B, C) and A ∈ π1 (Adj(B, C)). Since AB = CD for some invertible A and D, we have dim(Adj(B, C)) = dim(Adj(B)) and dim(π1 (Adj(B, C))) = dim(π1 (Adj(B))), which justifies Step 6.c together with the condition already imposed in Step 5. Since A ∈ π1 (Adj(B, C)), it will be encountered when enumerating Adj(B, C) in Step 6.d.i, so A0 = A2 A−1 1 will be built and, after the verification step, added to S. 7 Dynamic programming In this section, given a matrix group G ≤ GL(n, q), we view G as a permutation group on the domain Fnq , so basic tasks like membership testing and pointwise transporter can be solved in time 20 q O(n) by permutation group algorithms. Furthermore a generating set of G of size q O(n) can also be obtained in time q O(n) . These algorithms are classical and can be found in [Luk90, Ser03]. As mentioned in Section 1, for GraphIso, Luks’ dynamic programming technique [Luk99] can improve the brute-force n! · poly(n) time bound to the 2O(n) time bound, which can be understood as replacing the number of permutations n! with the number of subsets 2n . In our view, Luks’ dynamic programming technique is most transparent when working with the subset transporter problem. Given a permutation group P ≤ Sn and S, T ⊆ [n] of size k, this technique gives a 2k · poly(n)-time algorithm to compute PS→T := {σ ∈ P : σ(S) = T } [BQ12]. To illustrate the idea in the matrix group setting, we start with the subspace transporter problem. Problem 3 (Subspace transporter problem). Let G ≤ GL(n, q) be given by a set of generators, and let V , W be two subspaces of Fnq of dimension k. The subspace transporter problem asks to compute the coset GV →W = {g ∈ G : g(V ) = W }. The subspace transporter problem admits the following brute-force algorithm. Fix a basis 2 (v1 , . . . , vk ) of V , and enumerate all ordered basis of W at the multiplicative cost of q k . For each ordered basis (w1 , . . . , wk ) of W , compute the coset {g ∈ G : ∀i ∈ [k], g(vi ) = wi } by using 2 a sequence of pointwise stabiliser algorithms. This gives an algorithm running in time q k +O(n) . 2 Analogous to the permutation group setting, we aim to replace O(q k ), the number of ordered basis 1 2 of Fkq , with q 4 k +O(k) , the number of subspaces in Fkq , via a dynamic programming technique. For this we first observe the following. Observation 23. There exists a deterministic algorithm that enumerates all subspaces of Fnq , and 1 2 +O(n) for each subspace computes an ordered basis, in time q 4 n . Proof. For d ∈ {0, 1, . . . , n}, let Sd be the number of dimension-d subspaces of Fnq . The total number 1 2 of subspaces in Fnq is S0 + S1 + · · · + Sn = q 4 n +O(n) . To enumerate all subspaces we proceed by induction on the dimension in an increasing order. The case d = 0 is trivial. For d ≥ 1, suppose all subspaces of dimension d − 1, each with an ordered basis, are listed. To list all subspaces of dimension d, for each dimension-(d − 1) subspace U 0 with an ordered basis (u1 , . . . , ud−1 ), for each vector ud 6∈ U 0 , form U with the ordered basis (u1 , . . . , ud ). Then test whether U has been listed. If so discard it, and if not add U together with this ordered basis to the list. The two for loops as above adds a multiplicative factor of at most Sd−1 · q n , and other steps are basic linear algebra P 1 2 tasks. Therefore the total complexity is ni=0 Si · q O(n) = q 4 n +O(n) . Theorem 24. There exists a deterministic algorithm that solves the subspace transporter problem 1 2 in time q 4 k +O(n) . Proof. We fix an ordered basis (v1 , . . . , vk ) of V , and for d ∈ [k], let Vd = hv1 , . . . , vd i. The dynamic programming table is a list, indexed by subspaces U ≤ W . For U ≤ W of dimension d ∈ [k], the corresponding cell will store the coset G(Vd → U ) = {g ∈ G : g(Vd ) = U }. When d = k the corresponding cell gives G(V → W ). We fill in the dynamic programming table according to d in an increasing order. For d = 0 the problem is trivial. Now assume that for some d ≥ 1, we have computed G(Vl → U 0 ) for all 0 ≤ l ≤ d − 1 and subspace U 0 ≤ W of dimension U . To compute G(Vd → U ) for some fixed U ≤ W of dimension d, note that any g ∈ G(Vd → U ) has to map Vd−1 to some (d − 1)-dimension subspace 21 U 0 ≤ U , and vd to some vector u ∈ U \ U0 . This shows that [ [ G(Vd → U ) = [G(Vd−1 → U 0 )](vd → u). U 0 ≤U,dim(U 0 )=d−1 u∈U \U 0 To compute [G(Vd−1 → U 0 )](vd → u), we read G(Vd−1 → U 0 ) from the table, then compute [G(Vd−1 → U 0 )](vd → u) using the pointwise transporter algorithm. The number of u in U \ U 0 is no more than q d , and the number of (d − 1)-dimension subspaces of U is also no more than q d . After taking these two unions, apply Sims’ method to get a generating set of size q O(n) . Therefore for each cell the time complexity is q 2d · q O(n) = q O(n) . Therefore the whole dynamic programming 1 2 1 2 table can be filled in time q 4 k +O(k) · q O(n) = q 4 k +O(n) . To apply the above idea to AltMatSpIso, we will need to deal with the following problem. Problem 4 (Alternating matrix transporter problem). Let H ≤ GL(n, q) be given by a set of generators, and let A, B ∈ Λ(n, q) be two alternating matrices. The alternating matrix transporter problem asks to compute the coset HA→B = {g ∈ H : g t Ag = B}. Theorem 25. There exists a deterministic algorithm that solves the alternating matrix transporter 1 2 problem in time q 4 n +O(n) . Proof. Let (e1 , . . . , en ) be the standard basis vectors of Fnq , and let Ed = he1 , . . . , ed i. For an alternating matrix B, and an ordered basis (u1 , . . . , ud ) of a dimension-d U ≤ Fnq , B|U denotes the d × d alternating matrix [u1 , . . . , ud ]t B[u1 , . . . , ud ], called the restriction of B to U . For a vector v and U with the ordered basis as above, BU ×v = [u1 , . . . , ud ]t Bv ∈ Fdq . Then we construct a dynamic programming table, which is a list indexed by all subspaces of Fnq . Recall that each subspace also comes with an ordered basis by Observation 23. For any U ≤ Fnq of dimension k, its corresponding cell will store the coset H(A|Ek → B|U ) = {g ∈ H : g(Ek ) = U, g t (A|Ek )g = B|U }. (4) We will also fill in this list in the increasing order of the dimension d. The base case d = 0 is trivial. Now, assume we have already compute H(A|El → B|U 0 ) for all 0 ≤ l ≤ d − 1 and subspace U 0 ≤ Fnq of dimension l. To compute H(A|Ek → B|U ) for some U ≤ Fnq of dimension d, note that any g ∈ H(A|Ed → B|U ) satisfies the following. Firstly, g sends Ed−1 to some dimension-(d − 1) subspace U 0 ≤ U , and A|Ed−1 ∈ Λ(d − 1, q) to B|U 0 ∈ Λ(d − 1, q). Secondly, g sends ed to some vector u ∈ U \ U 0 , and A|Ed−1 ×ed ∈ Fd−1 to B|U 0 ×u ∈ Fqd−1 . This shows that q [ [   H(A|Ed → B|U ) = [H(A|Ed−1 → B|U 0 )](ed → u) (A|Ed−1 ×ed → B|U 0 ×u ). U 0 ≤U,dim(U 0 )=d−1 u∈U \U 0 (5)   To compute [H(A|Ed−1 → B|U 0 )](ed → u) (A|Ed−1 ×ed → B|U 0 ×u ), we read H(A|Ed−1 → B|U 0 ) from the table, compute [H(A|Ed−1 → B|U 0 )](ed → u) using the pointwise transporter algorithm. As [H(A|Ed−1 → B|U 0 )](ed → u) induces an action on Fd−1 corresponding to the last column of A|Ed q  with the last entry (which is 0) removed, [H(A|Ed−1 → B|U 0 )](ed → u) (A|Ed−1 ×ed → B|U 0 ×u ) can be computed by another pointwise transporter algorithm. As in Theorem 24, we go over the two unions and apply Sims’ method to obtain a generating set of size q O(n) . The time complexity for 1 2 filling in each cell is seen to be q 2d · q O(n) , and the total time complexity is then q 4 n +O(n) . We are now ready to prove Theorem 3. 22 Theorem 3, restated. Given G = (G1 , . . . , Gm ) and H = (H1 , . . . , Hm ) in Λ(n, q)m representing m-alternating spaces G, H ≤ Λ(n, q), there exists a deterministic algorithm for AltMatSpIso in 1 2 2 time q 4 (m +n )+O(m+n) . t Proof. Let (e1 , . . . ,P em ) be the standard basis of Fm q , and let Ek = he1 , . . . , ek i. v = (a1 , . . . , am ) ∈ m v m Fq , define H := i∈[m] ai Hi ∈ Λ(n, q). For a dimension-k subspace V ≤ Fq with an ordered basis (v1 , . . . , vk ), HV := (Hv1 , . . . , Hvk ) ∈ Λ(n, q)k . The dynamic programming table is indexed by subspaces of Fm q , so the number of cells is no 1 2 +O(m) more than q 4 m . The cell corresponding to a dimension-k subspace V stores the coset Iso(GEk , HV ) = {(g, h) ∈ GL(n, q) × GL(k, q) : g t (GEk )g = (HV )h }, (6) We will fill in the dynamic programming table in the increasing order of the dimension d. Recall that each subspace also comes with an ordered basis by Observation 23. The base case d = 0 is trivial. Now assume we have computed Iso(GE` , HV ) for all 1 ≤ ` ≤ d − 1 and V ≤ Fnq of dimension `. To compute Iso(GEd , HV ) for V ≤ Fnq of dimension d, note that any h in (g, h) ∈ Iso(GEd , HV ) satisfies the following. Firstly, h sends Ed−1 to some dimension-(d − 1) subspace V 0 ≤ V , and 0 (g, h) ∈ Iso(GEd−1 , HV ). Secondly, h sends ek to some v ∈ V \ V 0 , and g sends Ged to Hv . This shows that [ [   0 Iso(GEd , HV ) = [Iso(GEd−1 , HV )](ed → v) (Ged → Hv ). V 0 ≤V,dim(V 0 )=d−1 v∈V \V 0   0 0 To compute [Iso(GEd−1 , HV )](ed → v) (Ged → Hv ), Iso(GEd−1 , HV ) can be read from the table. 0 [Iso(GEd−1 , HV )](ed → v) is an instance of the pointwise transporter problem of GL(n,q)×GL(k, q)  O(m) . Finally [Iso(GEd−1 , HV 0 )](e → v) (Ged → Hv ) acting on Fm , which can be solved in time q d q is an instance of the alternating matrix transporter problem, which can be solved, by Theorem 25, 1 2 in time q 4 n +O(n) . Going over the two unions adds a multiplicative factor of q 2d , and then we apply Sims’ method to reduce the generating set size to q O(n) . Therefore for each cell the time complexity 1 2 1 2 is q 2d · q 4 n +O(n+m) = q 4 n +O(m+n) . Therefore the whole dynamic programming table can be filled 1 2 1 1 2 2 2 in in time q 4 m +O(m) · q 4 n +O(n+m) = q 4 (n +m )+O(n+m) . 8 8.1 Discussions and future directions Discussion on the prospect of worst-case time complexity of AltMatSpIso While our main result is an average-case algorithm, we believe that the ideas therein suggest that 2− an algorithm for AltMatSpIso in time q O(n ) may be within reach. For this, we briefly recall some fragments of the history of GraphIso, with a focus on the worst-case time complexity aspect. Two (families of) algorithmic ideas have been most responsible for the worst-case time complexity improvements for GraphIso. The first idea, which we call the combinatorial idea, is to use certain combinatorial techniques including individualisation, vertex or edge refinement, and more generally the Weisfeiler-Leman refinement [WL68]. The second idea, which we call the group theoretic idea, is to reduce GraphIso to certain problems in permutation group algorithms, and then settle those problems using group theoretic techniques and structures. A major breakthrough utilising the group theoretic idea is the polynomial-time algorithm for graphs with bounded degree by Luks [Luk82]. 23 Some combinatorial techniques have been implemented and used in practice [MP14], though the worst-case analysis usually does not favour such algorithms (see e.g. [CFI92]). On the other hand, while group theoretic algorithms for GraphIso more than often come with a rigorous analysis, such algorithms usually only work with a restricted family of graphs (see e.g. [Luk82]). The major improvements on the worst-case time complexity of GraphIso almost always rely on both ideas. The recent breakthrough, a quasipolynomial-time algorithm for GraphIso by Babai [Bab16,Bab17], is a √ Õ( n) clear evidence. Even the previous record, a 2 -time algorithm by Babai and Luks [BL83], relies on both Luks’ group theoretic framework [Luk82] and Zemlyachenko’s combinatorial partitioning lemma [ZKT85]. Let us return to AltMatSpIso. It is clear that AltMatSpIso can be studied in the context of matrix groups over finite fields. Computing with finite matrix groups though, turns out to be much more difficult than working with permutation groups. The basic constructive membership testing task subsumes the discrete log problem, and even with a number-theoretic oracle, a randomised polynomial-time algorithm for constructive membership testing was only recently obtained by Babai, Beals and Seress [BBS09] for odd q. However, if a q O(n+m) -time algorithm for AltMatSpIso is the main concern, then we can view GL(n, q) acting on the domain Fnq of size q n , so basic tasks like constructive membership testing are not a bottleneck. In addition, a group theoretic framework for matrix groups in vein of the corresponding permutation group results in [Luk82] has also been developed by Luks [Luk92]. Therefore, if we aim at a q O(n+m) -time algorithm for AltMatSpIso, the group theoretic aspect is relatively developed. Despite all the results on the group theoretic aspect, as described in Section 1.2, a q O(n+m) -time algorithm for AltMatSpIso has been widely regarded to be very difficult, as such an algorithm would imply an algorithm that tests isomorphism of p-groups of class 2 and exponent p in time polynomial in the group order. Reflecting back on how the time complexity of GraphIso has been improved, we realised that the other major idea, namely the combinatorial refinement idea, seemed missing in the context of AltMatSpIso. By adapting the individualisation technique, developing an alternative route to the refinement step as used in [BES80], and demonstrating its usefulness in the linear algebraic Erdős-Rényi model, we believe that this opens the door to systematically examine and adapt such combinatorial refinement techniques for GraphIso to improve the worstcase time complexity of AltMatSpIso. We mention one possibility here. In [Qia17], a notion of degree for alternating matrix spaces will be introduced, and it will be interesting to combine that degree notion with Luks’ group theoretic framework for matrix groups [Luk92] to see whether one can obtain a q O(n+m) -time algorithm to test isometry of alternating matrix spaces with bounded degrees. If this is feasible, then one can try to develop a version of Zemlyachenko’s combinatorial partition lemma for AltMatSpIso in the hope to obtain a moderately exponential-time algorithm 2− (e.g. in time q O(n ) ) for AltMatSpIso. 8.2 Discussion on the linear algebraic Erdős-Rényi model As far as we are aware, the linear algebraic Erdős-Rényi model (Model 1) has not been discussed in the literature. We believe that this model may lead to some interesting mathematics. In this section we put some general remarks on this model. We will consider LinER(n, m, q), or the corresponding bipartite version of LinER, BipLinER(n × n, m, q) as defined in Section 5.1. To start with, it seems to us reasonable to consider an event E as happening with high probability only when Pr[E] ≥ 1−1/q Ω(n) . To illustrate the reason, consider BipLinER(n×n, m, q) with the following property E(n, m, q). For a dimension-m B ≤ M (n × n, q), B satisfies E(n, m, q) if and 24 only if for every U ≤ Fnq , dim(B(U )) ≥ dim(U ). This corresponds to the concept of semi-stable as in the geometric invariant theory; compare with the stable concept as described in Section 2.3. One can think of B being semi-stable as having a perfect matching [GGOW16, IQS16, IQS17]. When 1 m = 1, B = hBi is semi-stable if and only if B is invertible, so 1 − 1q ≥ Pr[E(n, 1, q)] ≥ 1 − q−1 . On the other hand when m = 4, since stable implies semi-stable, from Section 2.3 we have 1 Pr[E(n, 4, q)] ≥ 1 − qΩ(n) . So though E(n, 1, q) happens with some nontrivial probability, it seems not fair to consider E(n, 1, q) happens with high probability, while E(n, 4, q) should be thought of as happening with high probability. The above example suggests that the phenomenon in the linear algebraic Erdős-Rényi model can be different from its classical correspondence. Recall that in the classical Erdős-Rényi model, an important discovery is that most properties E have a threshold mE . That is, when the edge number m is slightly less than mE , then E almost surely does not happen. On the other hand, if m surpasses mE slightly then E almost surely happens. mE is usually a nonconstant function of the vertex number, as few interesting things can happen when we have only a constant number of edges. However, the above example about the semi-stable property suggests that, if there is a threshold for this property, then this threshold has to be between 1 and 4, as we have seen the transition from 1 − 1/q O(1) to 1 − 1/q Ω(n) when m goes from 1 to 4. This is not surprising though, as one “edge” in the linear setting is one matrix, which seems much more powerful than an edge in a graph. It should be possible to pin down the exact threshold for the semi-stable property, and we conjecture that the transition (from 1 − 1/q O(1) to 1 − 1/q Ω(n) ) happens from 2 to 3 as this is where the transition from tame to wild as in the representation theory [Ben98, Chapter 4.4] happens for the representations of the Kronecker quivers. This hints on one research direction on LinER, that is, to determine whether the threshold phenomenon happens with monotone properties. The research on LinER has to depend on whether there are enough interesting properties of matrix spaces. We mention two properties that originate from existing literature; more properties can be found in the forthcoming paper [Qia17]. Let G be an m-alternating space in Λ(n, q). For U ≤ Fnq of dimension d with an ordered basis (v1 , . . . , vd ), the restriction of G to U is defined as {[v1 , . . . , vd ]t G[v1 , . . . , vd ] : G ∈ G} which is an alternating space in Λ(d, q). The first property is the following. Let s(G) be the smallest number for the existence of a dimension-s subspace U such that the restriction of G to U is of dimension m. This notion is one key to the upper bound on the number of p-groups [Sim65,BNV07]. It is interesting to study the asymptotic behavior of s(G). The second property is the following. Call U ≤ Fnq an independent subspace, if the restriction of G to U is the zero space. We can define the independent number of G accordingly. This mimics the independent sets for graphs, and seems to relate to the independent number concept for noncommutative graphs which are used to model quantum channels [DSW13]. Again, it is interesting to study the asymptotic behavior of the independent number. Finally, as suggested in [DSW13] (where they consider Hermitian matrix spaces over C), the model may be studied over infinite fields, where we replace “with high probability” with “generic” as in the algebraic geometry sense. 8.3 Discussion on enumerating of p-groups of class 2 and exponent p In this section we observe that Corollary 2 can be used to slightly improve the upper bound on the number of p-groups of class 2 and exponent p, as in [BNV07, Theorem 19.3]. (The proof idea there was essentially based on Higman’s bound on the number of p-groups of Frattini class 2 [Hig60].) We will outline the basic idea, and then focus on discussing how random graph theoretic ideas may 25 be used to further improve on enumerating p-groups of Frattini class 2. 8.3.1 From Corollary 2 to enumerating p-groups of class 2 and exponent p Theorem 26 ( [Hig60, BNV07]). The number of p-groups of class 2 and exponent p of order p` is 2 3 2 2 49 upper bounded by ` · p 27 ` − 9 ` + 72 ` . We will use Corollary 2 to show that, 49 72 , the coefficient of the linear term on the exponent, can be decreased. For this we recall the proof idea as in [Hig60, BNV07]. Recall that if a p-group G is of class 2 and exponent p, then its commutator subgroup and commutator quotient can be identified as vector spaces over Fp . We say that a class-2 and exponentp p-group G is of parameter (n, m), if dim(G/[G, G]) = n, and dim([G, G]) = m. By using relatively free p-groups of class 2 and exponent p as how Higman used relatively free p-groups of Frattini class 2 [Hig60], we have the following result in vein of [Hig60, Theorem 2.2]. Theorem 27. The number of p-groups of Φ-class 2 and parameter (n, m) is equal to the number of orbits of the natural GL(n, p) action on the codimension-m subspaces of Λ(n, p). Note that [Hig60, Theorem 2.2] needs p to be odd, due to the complication caused by the Frattini class 2 condition. We then need to translate the codimension-m condition in Theorem 27 to a dimension-m condition. Observation 28. The number of orbits of the GL(n, p) action on the codimension-m subspaces of Λ(n, p) is equal to the number of orbits of this action on the dimension-m subspaces of Λ(n, p). Proof. Define the standard bilinear form P on Λ(n, p) by P (A, B) = T r(At B), which gives a bijective map between dimension-m subspaces and codimension-m subspaces of Λ(n, p). It remains to verify that it yields a bijection between the GL(n, p) orbits as well. For this we check the following. Suppose P (A, B) = 0. For any X ∈ GL(n, p), P (X t AX, X −1 BX −t ) = T r(X t At XX −1 BX −t ) = T r(At B) = P (A, B) = 0. This implies that a dimension-m subspace B and a codimension-m sub−t space C are orthogonal to each other w.r.t. P , if and only if B X and C X are orthogonal to each other w.r.t. P . This concludes the proof. Therefore we reduce to study the number of orbits of GL(n, p) on dimension-m subspaces in Λ(n, p). Recall that dim(Λ(n, p)) = n(n − 1)/2. Suppose we want to upper bound the number of p-groups of order p` of parameter (n, m) when  n) 2 m = cn for some constant c (` = m + n). The number of dimension-m subspaces of Λ(n, p) is (m . p Therefore a trivial upper bound is just to assume that every orbit is as small as possible, which  n) 2 gives (m as the upper bound. Now that we have Corollary 2, by the orbit-stabilizer theorem, we p 1 know (1 − pΩ(n) ) fraction of the subspaces lie in an orbit of size pn 1 2 −O(n) . On the other hand, for a fraction of the subspaces, we have no control, so we simply assume that there each orbit is of size 1. Summing over the two parts, we obtain an upper bound pΩ(n) (n) (n) 2 m p pn2 −O(n) 2 + 26 m p pΩ(n) on the number of such p-groups. Note that the first summand will be dominated by the second one when n is large enough. Plugging this into Higman’s argument, we can show that the coefficient of the linear term is smaller than 49 72 . This idea can be generalised to deal with p-groups of Frattini class 2 without much difficulty. 8.3.2 Discussion on further improvements Our improvement on the upper bound of the number of p-groups of class 2 and exponent p is very modest. But this opens up the possibility of transferring random graph theoretic ideas to study enumerating such p-groups. In particular, this suggests the similarity between the number of unlabelled graphs with n vertices and m edges, and the number of p-groups of class 2 and exponent p of parameter (n, m). A celebrated result from random grapth theory suggests that the number of unlabelled graphs (n2 )/n! [Wri71] (see also [Bol01, Chapter 9.1]) when cn log n ≤ with n vertices and m edges is ∼ m  m ≤ n2 − cn log n. Note that this result implies, and is considerably stronger than, that most graphs have the trivial automorphism group. It is then tempting to explore whether the idea in [Wri71] can be adapted to show that when m = cn, the number of p-groups of class 2 and n  2 ) /|PSL(n, p)|. If this was true, then it would imply that exponent p of parameter (n, m) is ∼ (m 2 3 2 2 the number of p-groups of class 2 and exponent p of order p` is upper bounded by p 27 ` − 3 ` +O(`) . This would then match the coefficient of the quadratic term on the exponent of the lower bound, answering [BNV07, Question 22.8] in the case of such groups. Further implications to p-groups of Frattini class 2 should follow as well. A AltMatSpIso and p-group isomorphism testing The content in this appendix is classical by [Bae38, War76]. See also [Wil09] and [GQ17a]. Suppose we are given two p-groups of class 2 and exponent p, G1 and G2 of order p` . For Gi , let bi : Gi /[Gi , Gi ] × Gi /[Gi , Gi ] → [Gi , Gi ] be the commutator map where [Gi , Gi ] denotes the commutator subgroup. By the class 2 and exponent p assumption, Gi /[Gi , Gi ] are elementary abelian groups of exponent p. For G1 and G2 to be isomorphic it is necessary that [G1 , G1 ] ∼ = n m ∼ ∼ ∼ [G2 , G2 ] = Zp and G1 /[G1 , G1 ] = G2 /[G2 , G2 ] = Zp such that m + n = `. Furthermore bi ’s are alternating bilinear maps. So we have alternating bilinear maps bi : Fnp × Fnp → Fm p . G1 and G2 are isomorphic if and only if there exist A ∈ GL(n, p) and D ∈ GL(n, p) such that for every u, v ∈ Fnp , b1 (A(u), A(v)) = D(b2 (u, v)). Representing bi as a tuple of alternating matrices Bi = (B1 , . . . , Bm ) ∈ Λ(n, p)m , it translates to ask whether At B1 A = BD 2 . Letting Bi be the linear span of Bi , this becomes an instance of AltMatSpIso w.r.t. B1 and B2 . When p > 2, we can reduce AltMatSpIso to isomorphism testing of p-groups of class 2 and exponent p using the following construction. Starting from G ∈ Λ(n, p)m representing G, G can be viewed as representing a bilinar map b : Fnp × Fnp → Fm p . Define a group G with operation ◦ over 1 m n the set Fp × Fp as (v1 , u1 ) ◦ (v2 , u2 ) = (v1 + v2 + 2 b(u1 , u2 ), u1 + u2 ). It can be verified that G is a p-group of class 2 and exponent p, and it is known that two such groups G1 and G2 built from G1 and G2 are isomorphic if and only if G1 and G2 are isometric. When working with groups in the Cayley table model, and working with AltMatSpIso in time pO(m+n) , the above procedures can be performed efficiently. In [BMW15] it is discussed which models of computing with finite groups admit the reduction from isomorphism testing of p-groups 27 of class 2 and exponent p to the pseudo-isometry testing of alternating bilinear maps. In particular it is concluded there that the reduction works in the permutation group quotient model introduced in [KL90]. Acknowledgement. We thank Gábor Ivanyos and James B. Wilson for helpful discussions and useful information. Y. Q. was supported by ARC DECRA DE150100720 during this work. References [Bab79] László Babai. Monte-Carlo algorithms in graph isomorphism testing. Technical Report 79-10, Dép. Math. et Stat., Université de Montréal, 1979. [Bab16] László Babai. Graph isomorphism in quasipolynomial time [extended abstract]. In Proceedings of the 48th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2016, Cambridge, MA, USA, June 18-21, 2016, pages 684–697, 2016. arXiv:1512.03547, version 2. [Bab17] László Babai. Fixing the UPCC case of Split-or-Johnson. uchicago.edu/~laci/upcc-fix.pdf, 2017. [Bae38] Reinhold Baer. Groups with abelian central quotient group. Transactions of the American Mathematical Society, 44(3):357–386, 1938. [BBS09] László Babai, Robert Beals, and Ákos Seress. Polynomial-time theory of matrix groups. In Proceedings of the 41st Annual ACM Symposium on Theory of Computing, STOC 2009, Bethesda, MD, USA, May 31 - June 2, 2009, pages 55–64, 2009. [Ben98] David J. Benson. Representations and cohomology. i, volume 30 of cambridge studies in advanced mathematics, 1998. [BES80] László Babai, Paul Erdős, and Stanley M. Selkow. Random graph isomorphism. SIAM J. Comput., 9(3):628–635, 1980. [BK79] László Babai and Ludek Kučera. Canonical labelling of graphs in linear average time. In 20th Annual Symposium on Foundations of Computer Science, San Juan, Puerto Rico, 29-31 October 1979, pages 39–46, 1979. [BL83] László Babai and Eugene M. Luks. Canonical labeling of graphs. In Proceedings of the 15th Annual ACM Symposium on Theory of Computing, 25-27 April, 1983, Boston, Massachusetts, USA, pages 171–183, 1983. [BL08] Peter A. Brooksbank and Eugene M. Luks. Testing isomorphism of modules. Journal of Algebra, 320(11):4020 – 4029, 2008. [BMW15] Peter A. Brooksbank, Joshua Maglione, and James B. Wilson. A fast isomorphism test for groups of genus 2. arXiv:1508.03033, 2015. [BNV07] Simon R. Blackburn, Peter M. Neumann, and Geetha Venkataraman. Enumeration of finite groups. Cambridge Univ. Press, 2007. 28 http://people.cs. [BO08] Peter A. Brooksbank and E. A. O’Brien. Constructing the group preserving a system of forms. Internat. J. Algebra Comput., 18(2):227–241, 2008. [Bol01] B. Bollobás. Random Graphs. Cambridge Studies in Advanced Mathematics. Cambridge University Press, 2001. [BQ12] László Babai and Youming Qiao. Polynomial-time isomorphism test for groups with Abelian Sylow towers. In 29th STACS, pages 453 – 464. Springer LNCS 6651, 2012. [BW12] Peter A. Brooksbank and James B. Wilson. Computing isometry groups of Hermitian maps. Trans. Amer. Math. Soc., 364:1975–1996, 2012. [CFI92] Jin-yi Cai, Martin Fürer, and Neil Immerman. An optimal lower bound on the number of variables for graph identifications. Combinatorica, 12(4):389–410, 1992. [CIK97] Alexander Chistov, Gábor Ivanyos, and Marek Karpinski. Polynomial time algorithms for modules over finite dimensional algebras. In Proceedings of the 1997 international symposium on Symbolic and algebraic computation, ISSAC ’97, pages 68–74, New York, NY, USA, 1997. ACM. [DSW13] Runyao Duan, Simone Severini, and Andreas J. Winter. Zero-error communication via quantum channels, noncommutative graphs, and a quantum lovász number. IEEE Trans. Information Theory, 59(2):1164–1174, 2013. [ELGO02] Bettina Eick, C. R. Leedham-Green, and E. A. O’Brien. Constructing automorphism groups of p-groups. Communications in Algebra, 30(5):2271–2295, 2002. [ER59] P Erdős and A Rényi. On random graphs. Publicationes Mathematicae Debrecen, 6:290–297, 1959. [ER63] Paul Erdős and Alfréd Rényi. Asymmetric graphs. Acta Mathematica Hungarica, 14(3-4):295–315, 1963. [FN70] V. Felsch and J. Neubüser. On a programme for the determination of the automorphism group of a finite group. In Pergamon J. Leech, editor, Computational Problems in Abstract Algebra (Proceedings of a Conference on Computational Problems in Algebra, Oxford, 1967), pages 59–60, Oxford, 1970. [GGOW16] Ankit Garg, Leonid Gurvits, Rafael Oliveira, and Avi Wigderson. A deterministic polynomial time algorithm for non-commutative rational identity testing. In IEEE 57th Annual Symposium on Foundations of Computer Science, FOCS 2016, 9-11 October 2016, Hyatt Regency, New Brunswick, New Jersey, USA, pages 109–117, 2016. [GQ17a] Joshua A. Grochow and Youming Qiao. Algorithms for group isomorphism via group extensions and cohomology. SIAM Journal on Computing, 46(4):1153–1216, 2017. [GQ17b] Joshua A. Grochow and Youming Qiao. Isomorphism problems in linear algebra. In preparation, 2017. [GR16] François Le Gall and David J. Rosenbaum. On the group and color isomorphism problems. CoRR, abs/1609.08253, 2016. 29 [Hig60] Graham Higman. Enumerating p-groups. I: Inequalities. Proceedings of the London Mathematical Society, 3(1):24–30, 1960. [IKS10] Gábor Ivanyos, Marek Karpinski, and Nitin Saxena. Deterministic polynomial time algorithms for matrix completion problems. SIAM J. Comput., 39(8):3736–3751, 2010. [IQ17] Gábor Ivanyos and Youming Qiao. Algorithms based on ∗-algebras, and their applications to isomorphism of polynomials with one secret, group isomorphism, and polynomial identity testing. CoRR, abs/1708.03495, 2017. [IQS16] Gábor Ivanyos, Youming Qiao, and K. V. Subrahmanyam. Non-commutative Edmonds’ problem and matrix semi-invariants. Computational Complexity, pages 1–47, 2016. In press; see http://dx.doi.org/10.1007/s00037-016-0143-x. [IQS17] Gábor Ivanyos, Youming Qiao, and K. V. Subrahmanyam. Constructive noncommutative rank is in deterministic polynomial time. In the 8th Innovations in Theoretical Computer Science (ITCS), 2017. [Kar79] Richard M. Karp. Probabilistic analysis of a canonical numbering algorithm for graphs. In Proceedings of the AMS Symposium in Pure Mathematics, volume 34, pages 365–378, 1979. [Kin94] Alastair D. King. Moduli of representations of finite dimensional algebras. The Quarterly Journal of Mathematics, 45(4):515–530, 1994. [KL90] William M. Kantor and Eugene M. Luks. Computing in quotient groups. In Proceedings of the 22nd Annual ACM Symposium on Theory of Computing, May 13-17, 1990, Baltimore, Maryland, USA, pages 524–534, 1990. [KST93] Johannes Köbler, Uwe Schöning, and Jacobo Torán. The graph isomorphism problem: its structural complexity. Birkhauser Verlag, Basel, Switzerland, Switzerland, 1993. [KV12] Dmitry Kerner and Victor Vinnikov. Determinantal representations of singular hypersurfaces in pn. Advances in Mathematics, 231(3):1619–1654, 2012. [Lip78] Richard J. Lipton. The beacon set approach to graph isomorphism. Yale University. Department of Computer Science, 1978. [Luk82] Eugene M. Luks. Isomorphism of graphs of bounded valence can be tested in polynomial time. J. Comput. Syst. Sci., 25(1):42–65, 1982. [Luk90] Eugene M. Luks. Lectures on polynomial-time computation in groups. Lecture notes, 1990. [Luk92] Eugene M. Luks. Computing in solvable matrix groups. In 33rd Annual Symposium on Foundations of Computer Science, Pittsburgh, Pennsylvania, USA, 24-27 October 1992, pages 111–120, 1992. [Luk99] Eugene M. Luks. Hypergraph isomorphism and structural equivalence of boolean functions. In Proceedings of the Thirty-first Annual ACM Symposium on Theory of Computing, STOC ’99, pages 652–658, New York, NY, USA, 1999. ACM. 30 [LW12] Mark L. Lewis and James B. Wilson. Isomorphism in expanding families of indistinguishable groups. Groups - Complexity - Cryptology, 4(1):73110, 2012. [MFK94] David Mumford, John Fogarty, and Frances Kirwan. Geometric invariant theory. Springer-Verlag, 1994. [Mil78] Gary L. Miller. On the n log n isomorphism technique (a preliminary report). In STOC, pages 51–58, New York, NY, USA, 1978. ACM. [MP14] Brendan D. McKay and Adolfo Piperno. Practical graph isomorphism, II. Journal of Symbolic Computation, 60(0):94 – 112, 2014. [O’B93] Eamonn A. O’Brien. Isomorphism testing for p-groups. Journal of symbolic computation, 16(3):305–320, 1993. [Qia17] Youming Qiao. Matrix spaces as a linear algebraic analogue of graphs. In preparation, 2017. [Ros13] David J. Rosenbaum. Bidirectional collision detection and faster deterministic isomorphism testing. arXiv preprint arXiv:1304.3935, 2013. [Ser03] Ákos Seress. Permutation group algorithms, volume 152. Cambridge University Press, 2003. [Sim65] Charles C. Sims. Enumerating p-groups. Proceedings of the London Mathematical Society, 3(1):151–166, 1965. [War76] Robert B. Warfield. Nilpotent Groups. Number 513 in Lecture Notes in Mathematics; 513. Springer-Verlag, 1976. [Wil09] James B. Wilson. Decomposing p-groups via Jordan algebras. Journal of Algebra, 322(8):2642–2679, 2009. [Wil14] James B. Wilson. 2014 conference on Groups, Computation, and Geometry at Colorado State University, co-organized by P. Brooksbank, A. Hulpke, T. Penttila, J. Wilson, and W. Kantor. Personal communication, 2014. [WL68] Boris Weisfeiler and Andrei A. Leman. A reduction of a graph to a canonical form and an algebra arising during this reduction. Nauchno-Technicheskaya Informatsia, 2(9):12–16, 1968. [Wri71] Edward M Wright. Graphs on unlabelled nodes with a given number of edges. Acta Mathematica, 126(1):1–9, 1971. [ZKT85] Viktor N. Zemlyachenko, Nickolay M. Korneenko, and Regina I. Tyshkevich. Graph isomorphism problem. Journal of Soviet Mathematics, 29(4):1426–1481, 1985. 31
8cs.DS
arXiv:1701.02459v4 [math.GR] 27 Jul 2017 The Congruence Subgroup Problem for the Free Metabelian group on n ≥ 4 generators David El-Chai Ben-Ezra March 30, 2018 Abstract The congruence subgroup problem for a finitely generated group Γ \ asks whether the map Aut (Γ) → Aut(Γ̂) is injective, or more generally, what is its kernel C (Γ)? Here X̂ denotes the profinite completion of X. It n is well known that for finitely  generated free abelian groups C (Z ) = {1} 2 for every n ≥ 3, but C Z = F̂ω , where F̂ω is the free profinite group on countably many generators. Considering Φn , the free metabelian group on n generators, it was also proven that C (Φ2 ) = F̂ω and C (Φ3 ) ⊇ F̂ω . In this paper we prove that C (Φn ) for n ≥ 4 is abelian. So, while the dichotomy in the abelian case is between n = 2 and n ≥ 3, in the metabelian case it is between n = 2, 3 and n ≥ 4. Mathematics Subject Classification (2010): Primary: 19B37, 20H05, Secondary: 20E36, 20E18. Key words and phrases: congruence subgroup problem, automorphism groups, profinite groups, free metabelian groups. Contents 1 Introduction 2 2 Some properties of IA (Φn ) and its subgroups 6 3 The main theorem’s proof 8 4 Some elementary elements of hIA (Φn )m i 10 4.1 Elementary elements of type 1 . . . . . . . . . . . . . . . . . . . 10 4.2 Elementary elements of type 2 . . . . . . . . . . . . . . . . . . . 13 1 5 A main lemma 14 5.1 Reducing Lemma 3.1’s proof . . . . . . . . . . . . . . . . . . . . 14 5.2 A technical lemma . . . . . . . . . . . . . . . . . . . . . . . . . . 17 5.3 Finishing Lemma 3.1’s proof . . . . . . . . . . . . . . . . . . . . . 23 6 Remarks and problems for further research 1 25 Introduction The classical congruence subgroup problem (CSP) asks for, say, G = SLn (Z) or G = GLn (Z), whether every finite index subgroup of G contains a principal congruence subgroup, i.e. a subgroup of the form G (m) = ker (G → GLn (Z/mZ)) for some 0 6= m ∈ Z. Equivalently, it asks whether the natural map Ĝ → GLn (Ẑ) is injective, where Ĝ and Ẑ are the profinite completions of the group G and the ring Z, respectively. More generally, the CSP asks what is the kernel of this map. It is a classical 19th century result that the answer is negative for n = 2. Moreover (but not so classical, cf. [Mel], [L]), the kernel in this case is F̂ω - the free profinite group on a countable number of generators. On the other hand, it was proved in 1962 by Mennicke [Men] and Bass-Lazard-Serre [BLS] that for n ≥ 3 the answer is affirmative, and the kernel is therefore trivial. By the observation GLn (Z) ∼ = Aut (Zn ) = Out (Zn ), the CSP can be generalized as follows: Let Γ be a group and G ≤ Aut (Γ) (resp. G ≤ Out (Γ)). For a finite index characteristic subgroup M ≤ Γ denote: G (M ) = (resp. G (M ) = ker (G → Aut (Γ/M )) ker (G → Out (Γ/M ))). Such a G (M ) will be called a “principal congruence subgroup” and a finite index subgroup of G which contains G (M ) for some M will be called a “congruence subgroup”. The CSP for the pair (G, Γ) asks whether every finite index subgroup of G is a congruence subgroup. In some sense, the CSP tries to understand whether every finite quotient of G comes from a finite quotient of Γ. One can easily see that the CSP is equivalent to the question: Is the congruence map Ĝ = ← lim −G/U → lim ←−G/G (M ) injective? Here, U ranges over all finite index normal subgroups of G, and M ranges over all finite index characteristic subgroups of Γ. When Γ is finitely generated, it has only finitely many subgroups of given index m, and thus, the charateristic subgroups: Mm = ∩ {∆ ≤ Γ | [Γ : ∆] = m} are of finite index in Γ. Hence, one can write Γ̂ = 1 lim ←−m∈N Γ/Mm and have : limG/G (M ) = limm∈N G/G (Mm ) ≤ limm∈N Aut(Γ/Mm ) ←− ←− ←− ≤ Aut(lim (Γ/M )) = Aut(Γ̂) (resp. Out(Γ̂)). m∈N m ←− 1 By the celebrated theorem of Nikolov and Segal which asserts that every finite index subgroup of a finitely generated profinite group is open [NS], the second inequality is actually an equality. However, we do not need it. 2 Therefore, when Γ is finitely generated, the CSP is equivalent to the question: Is the congruence map: Ĝ → Aut(Γ̂) (resp. Ĝ → Out(Γ̂)) injective? More generally, the CSP asks what is the kernel C (G, Γ) of this map. For G = Aut (Γ) we will also use the simpler notation C (Γ) = C (G, Γ). The classical congruence  subgroup results mentioned above can therefore be reformulated as C Z2 = F̂ω while C (Zn ) = {e} for n ≥ 3. So the finite quotients of GLn (Z) are closely related to the finite quotients of Zn when n ≥ 3, but the finite quotients of GL2 (Z) are far of being understandable by the finite quotients of Z2 . Very few results are known when Γ is non-abelian. Most of the results are related to Γ = πg,n , the fundamental group of Sg,n , the closed surface of genus g with n punctures. In these cases one can take G = P M od (Sg,n ), the pure mapping class group of Sg,n , and can naturally view it as a subgroup of Out (πg,n ) (cf. [FM], chapter 8). Considering this cases, it is known that: Theorem 1.1. For g = 0, 1, 2 and every n ≥ 0, 1, 0 respectively, we have: C (P M od (Sg,n ) , πg,n ) = {1}. Z2 and P M od (S1,0 ) ∼ Note that when g = 1 and n = 0, π1,0 ∼ = SL2 (Z), =  2 so: C (P M od (S1,0 ) , π1,0 ) = C SL2 (Z) , Z = F̂ω . The cases for g = 0 were proved in [DDH] (see also [Mc]), the cases for g = 1 were proved in [A] (see also [Bo1], [BER]), and the cases for g = 2 were proved in [Bo1] (see also [Bo2] for the specific case where g = 2 and n = 0). In particular, as P M od (S1,1 ) is isomorphic to the special outer-automorphism group of F2 , we have an affirmative answer for the full outer-automorphism group of F2 , and by some standard arguments it shows that actually C (F2 ) is trivial (see [BER], [BL]). Note that for every n > 0, πg,n ∼ = F2g+n−1 = the free group on 2g + n − 1 generators. Hence, the above solved cases give an affirmative answer for various subgroups of the outerautomorphism group of finitely generated free groups, while the CSP for the full Aut (Fd ) when d ≥ 3 is still unsettled, and so is the situation with P M od (Sg,n ) when g ≥ 3. All the above settled cases have a common property which plays a crucial role in the proof of Theorem 1.1: There is an intrinsic description of G by iterative extension process by virtually free groups (groups which have a finite index free subgroup). Actually, in these cases, in some sense, we do understand the finite quotients of G, and the CSP tells us that these quotients are closely related to the finite quotients of Γ. This situation changes when we pass to G = Aut (Fd ) for d ≥ 3 or P M od (Sg,n ) for g ≥ 3. In these cases we do not have a description of G that can help to understand the finite quotients of G. So in some sense, all the known cases do not give us a new understanding of the finite quotients of G. Considering the abelian case, what makes the result of Mennicke and Bass-Lazard-Serre so special is that it not only shows that the finite quotients of GLn (Z) are related to the finite quotients of Zn , but also gives us a description of the finite quotients of GLn (Z), which we have not known without this result. Denote now the free metabelian group on n generators by Φn = Fn /Fn′′ . Considering the metabelian case, it was shown in [BL] (see also [Be1]) that 3 C (Φ2 ) = F̂ω . In addition, it was proven there that C (Φ3 ) ⊇ F̂ω . So, the finite quotients of Aut (Φ2 ) and Aut (Φ3 ) are far of being connected to the finite quotients of Φ2 and Φ3 , respectively. Here comes the main theorem of this paper: \ Theorem 1.2. For every n ≥ 4, C (IA (Φn ) , Φn ) is central in IA (Φn ), where: IA (Φn ) = ker (Aut (Φn ) → Aut (Φn /Φ′n ) = GLn (Z)) . u Using the commutative exact diagram (see 6): \ \ \ IA (Φn ) → Aut (Φn ) → GL n (Z) ց ↓ ↓ Aut(Φ̂n ) → GLn (Ẑ) → 1 \ and the fact that GL n (Z) → GLn (Ẑ) is injective for n ≥ 3, we obtain that C (IA (Φn ) , Φn ) is mapped onto C (Φn ). Therefore we deduce that: Theorem 1.3. For every n ≥ 4, C (Φn ) is abelian. This is dramatically different from the cases of n = 2, 3 described above. Theorem 1.3 tells us that when n ≥ 4 the situation changes, and the finite quotients of Aut (Φn ) are closely related to the finite quotients of Φn in the following manner: Corollary 1.4. Let n ≥ 4. Then, for every finite index subgroup H ≤ G = Aut (Φn ), there exists a finite index characteristic subgroup M ≤ Φn and r ∈ N such that G (M )′ G (M )r ⊆ H. Note that by a theorem of Bachmuth and Mochizuki [BM], Aut (Fn ) → Aut (Φn ) is surjective for every n ≥ 4, and thus G = Aut (Φn ) is finitely generated. Hence, the principal congruence subgroups of the form G (M ) are finitely generated, and thus, the subgroups of the form G (M )′ G (M )r are also of finite ′ r index in Aut (Φn ). Therefore, the quotients of the form Aut (Φn ) /G (M ) G (M ) describe all the finite quotients of Aut (Φn ). In particular, our theorem gives us a description of the finite quotients of Aut (Φn ) when n ≥ 4 - just like the theorem of [Men] and [BLS] gives for GLn (Z) when n ≥ 3. Corollary 1.4 obviously does not hold for n = 2, 3. So, the picture is that while the dichotomy in the abelian case is between n = 2 and n ≥ 3, in the metabelian case we have a dichotomy between n = 2, 3 and n ≥ 4. d In [KN], Kassabov and Nikolov showed that ker(SL\ n (Z [x]) → SLn (Z [x])) is central and not finitely generated, when n ≥ 3. In [Be2] we use their techniques and an interesting surjective representations:  x→1 IA (Φn ) ։ ker(GLn−1 Z[x±1 ] −→ GLn−1 (Z)) to show also that: 4 Theorem 1.5. For every n ≥ 4, C (IA (Φn ) , Φn ) is not finitely generated. We remark that despite the result of the latter theorem, we do not know whether C (Φn ) is also not finitely generated.uIn fact we can not even prove at this point that it is not trivial (for more, see 6). The main line of the proof of Theorem 1.2 is as follows: For G = IA (Φn ) we first take the principal congruence subgroups G (Mn,m ) where Mn,m = ′ ′ m m (Φ′n Φm (Φ /M ), and thus we deduce that n ) (Φn Φn ) . By [Be1], Φ̂n = lim ←− n n,m the subgroups of the form G Mn,m4 are enough to represent the congruence subgroups of IA(Φn ) in the sense that every congruence subgroup contains one of these principal congruence subgroups. Then, we follow the steps of the theorem of Bachmuth and Mochizuki [BM], showing that Aut (Fn ) → Aut (Φn ) is m surjective for n ≥ 4, and we try to build G Mn,m4 with elements of hIA (Φn ) i. This process, combined with some classical results from algebraic K-theory enables us to show that  m m hIA (Φn ) i G Mn,m4 / hIA (Φn ) i is finite and central in IA (Φn ) / hIA (Φn )m i, and thus, hIA (Φn )m i is of finite index in IA (Φn ). In particular, as every normal subgroup of index m in IA (Φn ) m m contains hIA (Φn ) i, we deduce that the groups of the form hIA (Φn ) i are enough to represent the finite index subgroups of IA (Φn ). From here, it follows \ easily that C (IA (Φn ) , Φn ) is central in IA (Φn ). We hope that the solution of the free metabelian case will help to understand some more cases of non-abelian groups, such as the automorphism group of a free group and the mapping class group of a surface. The immediate next challenges are the automorphism groups of free solvable groups. u Let us point out that, as remarked in 5 in [BL], one can deduce from Theorem 1.3 that for every n ≥ 4, Aut (Φn ) is not large, i.e does not contain a finite index subgroup which can be mapped onto a free group. This is in contrast with Aut (Φ2 ) and Aut (Φ3 ) which are large. u The paper is organized as follows: In 2 we present some needed notations and lemma, in u discuss IA (Φn ) and some of its subgroups. Then, up to a main u 3 we prove the main theorem of the paper, Theorem 1.2. In 4 we compute m some u elements of hIA (Φn ) i which we use in the proof of the main lemma. In 5 we prove the main reminded lemma. We end the paper with the proof of Theorem 1.3, and some remarks on the problem of computing C (Φn ) and C (IA (Φn ) , Φn ). Acknowledgements: I wish to offer my deepest thanks to my great supervisor Prof. Alexander Lubotzky for his sensitive and devoted guidance, and to the Rudin foundation trustees for their generous support during the period of the research. 5 2 Some properties of IA (Φn) and its subgroups Let G = IA (Φn ) = ker (Aut (Φn ) → Aut (Φn /Φ′n ) = GLn (Z)). We start with recalling some of the properties of G = IA (Φn ) and its subgroups, as presented in Section 3 in [Be2]. We also refer the reader to [Be2] for the proofs of the statements in this section. We start with the following notations: • Φn = Fn /Fn′′ = the free metabelian group on n elements. Here Fn′′ denotes the second derivative of Fn , the free group on n elements. ′ m ′ m • Φn,m = Φn /Mn,m , where Mn,m = (Φ′n Φm n ) (Φn Φn ) . • IGn,m = G(Mn,m ) = ker (IA (Φn ) → Aut (Φn,m )) . m • IAm n = hIA (Φn ) i. ±1 n • Rn = Z[Zn ] = Z[x±1 1 , . . . , xn ] where x1 , . . . , xn are the generators of Z . • Zm = Z/mZ. • σi = xi − 1 for 1 ≤ i ≤ n. We also denote by ~σ the column vector which has σi in its i-th entry. P • An = ni=1 σi Rn = the augmentation ideal of Rn . Pn • Hn,m = ker (Rn → Zm [Znm ]) = i=1 (xm i − 1) Rn + mRn . By the well known Magnus embedding (see [Bi], [RS], [Ma]), one can identify Φn with the matrix group: ) (  n X g a 1 t1 + . . . + a n tn n ai (xi − 1) | g ∈ Z , ai ∈ Rn , g − 1 = Φn = 0 1 i=1 where ti is a free basis for Rn -module, under the identification of the generators of Φn with the matrices   xi ti 1 ≤ i ≤ n. 0 1 Moreover, for every α ∈ IA (Φn ), one can describe α by its action on the generators of Φn , by:     xi ti xi ai,1 t1 + . . . + ai,n tn α: 7→ 0 1 0 1 and this description gives an injective homomorphism (see [Ba], [Bi]): IA (Φn ) ֒→ defined by α 7→ GLn (Rn )  a1,1 · · ·  ..  . an,1 6 ···  a1,n ..  .  an,n which gives an identification of IA (Φn ) with the subgroup: IA (Φn ) = = {A ∈ GLn (Rn ) | A~σ = ~σ } n o In + A ∈ GLn (Rn ) | A~σ = ~0 . One can find the proof of the following proposition in [Be2] (Propositions 3.1 and 3.2): Proposition 2.1. Let In + A ∈ IA (Φn ). Then: • If one denotes the P entries of A by ak,l for 1 ≤ k, l ≤ n, then for every n 1 ≤ k, l ≤ n, ak,l ∈ l6=i=1 σi Rn ⊆ An . Q • det (In + A) is of the form: det (In + A) = nr=1 xsrr for some sr ∈ Z. Consider now the map:    Pn g a 1 t1 + . . . + a n tn Φn = | g ∈ Zn , ai ∈ Rn , g − 1 = i=1 ai (xi − 1) 0 1 ↓    Pn g a 1 t1 + . . . + a n tn | g ∈ Znm , ai ∈ Zm [Znm ], g − 1 = i=1 ai (xi − 1) 0 1 which induced by the projections Zn → Znm , Rn = Z[Zn ] → Zm [Znm ]. Using result of Romanovskiı̆ [Rom], it is shown in [Be1] that this map is surjective and that Φn,m is canonically isomorphic to its image. Therefore, we can identify the principal congruence subgroup of IA (Φn ), IGn,m , with: IGn,m = = {A ∈ ker (GLn (Rn ) → GLn (Zm [Znm ])) | A~σ = ~σ } n o In + A ∈ GLn (Rn , Hn,m ) | A~σ = ~0 . Let us step forward with the following definitions: Definition 2.2. Let A ∈ GLn (Rn ), and for 1 ≤ i ≤ n, denote by Ai,i the minor which obtained from A by erasing its i-th row and i-th column. Now, for every 1 ≤ i ≤ n, define the subgroup IGLn−1,i ≤ IA (Φn ), by:   The i-th row of A is 0, IGLn−1,i = In + A ∈ IA (Φn ) | . In−1 + Ai,i ∈ GLn−1 (Rn , σi Rn ) The following proposition is proven in [Be2] (Proposition 3.4): Proposition 2.3. For every 1 ≤ i ≤ n we have: IGLn−1,i ∼ = GLn−1 (Rn , σi Rn ). We recall the following definitions from Algebraic K-Theory: Definition 2.4. Let R be a commutative ring (with identity), H ⊳ R an ideal, and d ∈ N. Then: 7 • Ed (R) = hId + rEi,j | r ∈ R, 1 ≤ i 6= j ≤ di ≤ SLd (R) where Ei,j is the matrix which has 1 in the (i, j)-th entry and 0 elsewhere. • SLd (R, H) = ker (SLd (R) → SLd (R/H)). • Ed (R, H) = the normal subgroup of Ed (R), which is generated as a normal subgroup by the elementary matrices of the form Id + hEi,j for h ∈ H. Under the above identification of IGLn−1,i with GLn−1 (Rn , σi Rn ), for every 1 ≤ i ≤ n we define: Definition 2.5. Let H ⊳ Rn . Then: ISLn−1,i (H) = IGLn−1,i ∩ SLn−1 (Rn , H) IEn−1,i (H) = IGLn−1,i ∩ E n−1 (Rn , H) ≤ ISLn−1,i (H) . 3 The main theorem’s proof Using the above notations we prove in u 5 the following main lemma: Lemma 3.1. For every n ≥ 4 and m ∈ N one has: IGn,m2 ⊆ IAm n · n Y ISLn−1,i (σi Hn,m ) i=1 = IAm n · ISLn−1,1 (σ1 Hn,m ) · . . . · ISLn−1,n (σn Hn,m ) . Observe that it follows that when n ≥ 4, then for every m ∈ N: IGn,m4 ⊆ 2 IAm n · n Y ISLn−1,i σi Hn,m2 i=1 ⊆ ⊆ IAm n · IAm n · n Y i=1 n Y i=1 ISLn−1,i σi Hn,m2  ISLn−1,i Hn,m2 .   The following Lemma is proved in [Be2], using classical results from Algebraic K-theory (Lemma 7.1 in [Be2]): Lemma 3.2. For every n ≥ 4, 1 ≤ i ≤ n and m ∈ N one has:  IEn−1,i Hn,m2 ⊆ IAm n. Let us now quote the following proposition (see [Be2], Corollary 2.3): Proposition 3.3. Let R be a commutative ring, H ⊳ R ideal of finite index and d ≥ 3. Assume also that Ed (R) = SLd (R). Then: SK1 (R, H; d) = SLd (R, H) /E d (R, H) is a finite group which is central in GLd (R) /E d (R, H). 8 Now, according to Proposition 3.3 and the fact that Ed (Rn ) = SLd (Rn ) for every d ≥ 3 [Su], we obtain that for every n ≥ 4: SLn−1 (Rn , Hn,m ) /E n−1 (Rn , Hn,m ) = SK1 (R, Hn,m ; n − 1) is a finite group. Thus ISLn−1,i (Hn,m ) /IEn−1,i (Hn,m ) ≤ SLn−1 (Rn , Hn,m ) /E n−1 (Rn , Hn,m ) is also a finite group. Hence, the conclusion from Lemmas 3.1 and 3.2 is that for every m ∈ N, one can cover IGn,m4 with finite number of cosets of IAm n . As IGn,m4 is obviously a finite index subgroup of IA (Φn ) we deduce that IAm n is also a finite index subgroup of IA (Φn ). Therefore, as every normal subgroup of IA (Φn ) of index m cotains IAm n we deduce that one can write explicitely m \ IA (Φn ) = lim ←− (IA (Φn ) /IAn ). On the other hand, it is proven in [Be1] that Φ̂n = ← lim −Φn,m , and thus: Corollary 3.4. For every n ≥ 4:   m C (IA (Φn ) , Φn ) = ker lim (IA (Φ ) /IA ) → lim (IA (Φ ) /IG ) n n n,m n ←− ←−   m 4 IA (Φ ) /IG = ker lim (IA (Φ ) /IA ) → lim n n n,m n ←− ←−  m m = lim IAn · IGn,m4 /IAn . ←− Now, Proposition 3.3 gives us also that for every m ∈ N and n ≥ 4, the subgroup SK1 (Rn , Hn,m ; n − 1) is central in GLn−1 (Rn ) /E n−1 (Rn , Hn,m ). This fact is used in [Be2] to prove that (see the arguments in Section 5 in [Be2]) : Proposition 3.5. For every n ≥ 4, m ∈ N and 1 ≤ i ≤ n the subgroup:  m IAm n · ISLn−1,i σi Hn,m2 /IAn is central in IA (Φn ) /IAm n. Corollary 3.6. For every n ≥ 4 and m ∈ N the elements of the set IAm n · n Y i=1  ISLn−1,i σi Hn,m2 /IAm n belong to the center of IA (Φn ) /IAm n. The conclusion from the latter corollary is that for every n ≥ 4 and m ∈ N, the set n Y  ISLn−1,i σi Hn,m2 /IAm IAm n n · i=1 is an abelian group which contained in the center of IA (Φn ) /IAm n . In particm m 4 /IA · IG ular, IAm is contained in the center of IA (Φ ) /IA n n,m n n , and thus, n \ C (IA (Φn ) , Φn ) is in the center of IA (Φn ). This finishes, up to the proof of Lemma 3.1, the proof of Theorem 1.2. So it remains to prove Lemma 3.1. But before we start to prove this lemma, we need to compute some elements of IAm n . We will do this in the following section. 9 4 Some elementary elements of hIA (Φn )m i m In this section we compute some elements of IAm n = hIA (Φn ) i which needed through the proof of Lemma 3.1. As one can see below, we separate the elementary elements to two types. In addition, we separate the treatment of the elements of type 1, to two parts. We hope this separations will make the process clearer. Additionally to the previous notations, on the section, and also later on, we will use the notation: µr,m = m−1 X xir for 1 ≤ r ≤ n. i=0 4.1 Elementary elements of type 1 Proposition 4.1. Let n ≥ 3, 1 ≤ u ≤ n and m ∈ N. Denote by ~ei the i-th row standard vector. Then, the elements of IA (Φn ) of the form (the following notation means that the matrix is similar to the identity matrix, except the entries in the u-th row):   Iu−1 0 0  au,1 · · · au,u−1 1 au,u+1 · · · au,n  ← u-th row 0 0 In−u when (au,1 , . . . , au,u−1 , 0, au,u+1 , . . . , au,n ) is a linear combination of the vectors: 1. {m (σi~ej − σj ~ei ) | i, j 6= u, i 6= j} 2. {σk µk,m (σi~ej − σj ~ei ) | i, j, k 6= u, i 6= j} 3. {σk µi,m (σi~ej − σj ~ei ) | i, j, k 6= u, i 6= j, k 6= j} with coefficients in Rn , belong to IAm n. Before proving this proposition, we present some more elements of this type. Note that for the following proposition we assume n ≥ 4: Proposition 4.2. Let n ≥ 4, IA (Φn ) of the form:  Iu−1  au,1 · · · au,u−1 0 1 ≤ u ≤ n and m ∈ N. Then, the elements of 0 1 0 au,u+1 0 ··· In−u  au,n  ← u-th row when (au,1 , . . . , au,u−1 , 0, au,u+1 , . . . , au,n ) is a linear combination of the vectors:  2 1. σu µu,m (σi~ej − σj ~ei ) | i, j 6= u, i 6= j 2. {σu σj µi,m (σi~ej − σj ~ei ) | i, j 6= u, i 6= j} with coefficients in Rn , belong to IAm n. 10 Proof. (of Proposition 4.1) Without loss of generality, we assume that u = 1. Observe now that for every ai , bi ∈ Rn for 2 ≤ i ≤ n one has:      1 a2 + b 2 · · · an + b n 1 b2 · · · bn 1 a2 · · · an . = 0 In−1 0 In−1 0 In−1 Hence, it is enough to prove that the elements of the following forms belong to IAm ei we mean that the entry of the i-th column in the first n (when we write a~ row is a):   1 mf (σi~ej − σj ~ei ) i, j 6= 1, i 6= j, f ∈ Rn 1. 0 In−1   1 σk µk,m f (σi~ej − σj ~ei ) i, j, k 6= 1, i 6= j, f ∈ Rn 2. 0 In−1   1 σk µi,m f (σi~ej − σj ~ei ) i, j, k 6= 1, i 6= j, k 6= j, f ∈ Rn . 3. 0 In−1 We start with the elements of form 1. Here we have: m    1 f (σi~ej − σj ~ei ) 1 mf (σi~ej − σj ~ei ) = ∈ IAm n. 0 In−1 0 In−1 We pass to the elements of form 2. In this case we have: " m # −1  1 f (σi~ej − σj ~ei ) xk −σ1~ek m IAn ∋ , 0 In−1 0 In−1   1 σk µk,m f (σi~ej − σj ~ei ) . = 0 In−1 We finish with the elements of form 3. If k = i, it is a private case of the previous case, so we assume k 6= i. So we assume that i, j, k are all different from each other and i, j, k 6= 1 - observe that this case is interesting only when n ≥ 4. The computation here is more complicated than in the previous cases, so we will demonstrate it for the private case: n = 4, i = 2, j = 3, k = 4. It is clear that symmetrically, with similar argument, the same holds in general when n ≥ 4 for every i, j, k 6= 1 which different from each other. So: −m     1 0 0 0 1 0 −σ4 f σ3 f    0 1 1 0 0  0 0    , 0  IAm ∋  4      0 0 0 −σ3 x2 0 1 0 0 0 0 1 0 0 0 1   1 −σ4 f µ2,m σ3 σ4 f σ2 µ2,m 0  0 1 0 0  . =   0 0 1 0  0 0 0 1 11 We pass now to the proof of Proposition 4.2. Proof. (of Proposition 4.2) Also here, without loss of generality, we assume that u = 1. Thus, all we need to show is that also the elements of the following forms belong to IAm n:   1 σ12 µ1,m f (σi~ej − σj ~ei ) i, j 6= 1, i 6= j, f ∈ Rn 1. 0 In−1   1 σ1 σj µi,m f (σi~ej − σj ~ei ) i, j 6= 1, i 6= j, f ∈ Rn . 2. 0 In−1 Also here, to simplify the notations, we will demonstrate the proof in the private case: n = 4, i = 2, j = 3. We start with the first form. From Proposition 4.1 we have (an element of form 2 in Proposition 4.1):   1 0 0 0  0 1 0 0  .  IAm 4 ∋ 0 0 1 0  0 σ3 σ1 µ1,m f −σ2 σ1 µ1,m f 1 Therefore, we also have:  x4 0 0 −σ1   0  0 1 0 ∋  IAm 4  0 0 1 0 0 0 0 1  2 1 −σ3 σ1 µ1,m f  0 1 =   0 0 0 0   1 0   0 1 ,   0 0 0 σ3 σ1 µ1,m f  σ2 σ12 µ1,m f 0 0 0  . 1 0  0 1 0 0 1 −σ2 σ1 µ1,m f  0  0   0  1 We pass to the elements of form 2. From Proposition 4.1 we have (an element of form 3 in Proposition 4.1):   1 0 0 0  0 1 0 0    IAm 4 ∋ 0 0 1 0  0 σ1 σ3 µ2,m f −σ1 σ2 µ2,m f 1 and therefore, we have:  1 0 σ4 −σ3  0 1 0 0 m   IA4 ∋  0 0 1 0 0 0 0 1  1 −σ1 σ32 µ2,m f  0 1 =   0 0 0 0   1 0   0 1 ,   0 0 0 σ1 σ3 µ2,m f  σ3 σ1 σ2 µ2,m f 0 0 0  . 1 0  0 1 12 0 0 1 −σ1 σ2 µ2,m f  0  0    0  1 4.2 Elementary elements of type 2 Proposition 4.3. Let n ≥ 4, 1 ≤ u < v ≤ n and m ∈ N. Then, the elements of IA (Φn ) of the form:   Iu−1 0 0 0 0  0 1 + σu σv f 0 −σu2 f 0    ← u-th row  0  0 I 0 0 v−u−1    0 σv2 f 0 1 − σu σv f 0  ← v-th row 0 0 0 0 In−v for f ∈ Hn,m , belong to IAm n. Proof. As before, to simplify the notations we will demonstrate the proof in the case: n = 4, u = 1 and v = 2, and it will be clear from the computation that the same holds in the general case, provided n ≥ 4. First observe that for every f, g ∈ Rn we have:    1 + σ1 σ2 g −σ12 g 0 0 1 + σ1 σ2 f −σ12 f 0 0   σ22 g 1 − σ1 σ2 g 0 0  σ22 f 1 − σ1 σ2 f 0 0        0 0 1 0  0 0 1 0 0 0 0 1 0 0 0 1  1 + σ1 σ2 (f + g) −σ12 (f + g) 2  σ2 (f + g) 1 − σ1 σ2 (f + g) =  0 0 0 0 0 0 1 0  0 0   0  1 so it is enough to consider the cases f ∈ mR4 and f ∈ σr µr,m R4 for 1 ≤ r ≤ 4, separately. Consider now the following computation. For an arbitrary f ∈ Rn we have:    −1  1 0 0 0 x4 0 0 −σ1  0    1 0 0    ,  0 x4 0 −σ2    0 0 1 0   0 0 1 0   −σ2 f σ1 f 0 1 0 0 0 1     1 0 0 0 1 + σ1 σ2 f −σ12 f 0 0   0 1 0 0  1 − σ1 σ2 f 0 0  σ22 f = . ·  0 0 1 0   0 0 1 0  −σ4 σ2 f σ4 σ1 f 0 1 0 0 0 1 Therefore, we conclude that  1 0 0  0 1 0   0 0 1 −σ4 σ2 f σ4 σ1 f 0 if:   1 0  0 0  ,  0   0 −σ2 f 1 13 0 1 0 σ1 f 0 0 1 0  0 0   ∈ IAm 4 0  1 then also:  1 + σ1 σ2 f  σ22 f   0 0 −σ12 f 1 − σ1 σ2 f 0 0  0 0   ∈ IAm 4 . 0  1 0 0 1 0 Thus, the cases f ∈ mR4 and f ∈ σr µr,m R4 for r 6= 4, are obtained immediately from Proposition 4.1. Hence, it remains to deal with the case f ∈ σr µr,m R4 for r = 4. However, it is easy to see that by switching the roles of 3 and 4, the remained case is also obtained by similar arguments. 5 A main lemma In this section we prove Lemma 3.1 which states that for every n ≥ 4 and m ∈ N we have: IGn,m2 ⊆ IAm n · n Y ISLn−1,i (σi Hn,m ) i=1 = IAm n · ISLn−1,1 (σ1 Hn,m ) · . . . · ISLn−1,n (σn Hn,m ) . The proof will be presented in a few stages - each of which will have a separated subsection. In this sections n ≥ 4 will be constant, so we will make notations simpler and write: R = Rn , A = An , Hm = Hn,m , IAm = IAm n , IGm = IGn,m . We will also use the following notations: Om = mR, Ur,m = µr,m R when µr,m = Pm−1 i=0 xir for 1 ≤ r ≤ n . Pn Notice that it follows from the definitions, that: Hm = r=1 σr Ur,m + Om (we note that in [Be2] we used the notation Ur,m for σr µr,m R). 5.1 Reducing Lemma 3.1’s proof We start this subsection with introducing the following objects: Definition 5.1. Let m ∈ N. Define: R ⊲ Jm = n X 2 σr3 Ur,m + A2 Om + AOm r=1 Jm =  In + A | In + A ∈ IA (Φn ) ∩ GLn (R, Jm ) Qn 2 det (In + A) = r=1 xrsr m , sr ∈ Z Proposition 5.2. For every m ∈ N we have: IGm2 = IA (Φn ) ∩ GLn (R, Hm2 ) ⊆ Jm . 14  . Pm−1 Proof. Let x ∈ R. Notice that i=0 xi ∈ (x − 1) R + mR. In addition, by P mi replacing x by xm we obtain: m−1 ∈ (xm − 1) R + mR. Hence: i=0 x m2 x −1 2 m −1 X xi = (x − 1) m−1 X xi m−1 X xmi = (x − 1) ∈ (x − 1) ((x − 1) R + mR) ((xm − 1) R + mR) ⊆ (x − 1)2 (xm − 1) R + (x − 1)2 mR + (x − 1) m2 R. i=0 i=0 i=0 P 2 2 2 Thus, we obtain that Hm2 = nr=1 (xm r − 1)R + m R ⊆ Jm + Om . Now, let In +A ∈ IGm2 = IA (Φn )∩GLn (R, Hm2 ). From the above observation and  from 2 ∩A = Proposition 2.1, it follows that every entry of A belongs to Jm + Om J . In addition, by Proposition 2.1, the determinant of I + A is of the form m n Qn m2 sr . On the other hand, we know that under the projection x → 7 1 and x r r r=1 Qn m2 7→ 0 one has: In + A 7→ In and thus also r=1 xsrr = det (In + A) 7→ 1. Qn 2 Therefore, det (In + A) is of the form r=1 xrm sr , as required. Corollary 5.3. Let n ≥ 4 and m ∈ N. Then, for proving Lemma 3.1 it suffices to prove that: n Y ISLn−1,i (σi Hm ) . Jm ⊆ IAm · i=1 We continue with defining the following objects: Definition 5.4. For 0 ≤ u ≤ n and 1 ≤ v ≤ n, define the following ideals of ±1 R = Rn = Z[x±1 1 , . . . , xn ]: Ãu = n X σr R r=u+1 J˜m,u,v =   Pu 2 Ãu  r=1 Aσr Ur,m + AOm + Om +   P  n 3 r=u+1 σr Ur,m  Pu 2  Ãu  r=1 Aσr Ur,m + AOm + Om +  P  n 3 2 v6=r=u+1 σr Ur,m + Aσv Uv,m v≤u v>u and for 0 ≤ u ≤ n define the groups: Ãu = IA (Φn ) ∩ GLn (R, Ãu ), and: ) ( Qn 2 det (In + A) = i=1 xsi i m , every entry in . J̃m,u = In + A ∈ IA (Φn ) | the v-th colmun of A belongs to J˜m,u,v Remark 5.5. If In + A ∈ J̃m,u , the entries of the columns of A may belong to different ideals in R, so it is not obvious that J̃m,u is indeed a group, i.e. closed under matrix multiplication and the inverse operation. However, showing that J̃m,u is a group is not difficult and we leave it to the reader. 15 Notice now the extreme cases: 1. For u = 0 we have (for every v and m): Ã0 = A, and Jm ⊆ J˜m,0,v . Hence, we have Jm ⊆ J̃m,0 . 2. For u = n we have (for every v and m): Ãn = J˜m,n,v = 0. Hence, we also have J̃m,n = {In }. Corollary 5.6. For proving Lemma 3.1, it is enough to prove that for every 1 ≤ u ≤ n: J̃m,u−1 ⊆ IAm · ISLn−1,u (σu Hm ) · J̃m,u . Proof. Using that IAm is normal in IA (Φn ) and the latter observations, under the above assumption, one obtains that: Jm ⊆ J̃m,0 ⊆ ⊆ ⊆ IAm · ISLn−1,1 (σ1 Hm ) · J̃m,1 ... n Y (IAm · ISLn−1,u (σu Hm )) · J̃m,n u=1 = IAm n Y ISLn−1,u (σu Hm ) u=1 which is the requirement of Corollary 5.3. We continue with defining the following objects: Definition 5.7. For 0 ≤ u ≤ n and 1 ≤ v ≤ n, define the following ideals of R:  Pu  2 A  r=1 Aσr Ur,m + AOm + Om +  Pn  3 v≤u r=u+1 σr Ur,m  Pu Jm,u,v = 2  + Aσ U + AO + O A r r,m m  m  Pn r=1 3 2 v>u v6=r=u+1 σr Ur,m + Aσv Uv,m and for 0 ≤ u ≤ n define the group:   Qn si m2 , every entry in . Jm,u = In + A ∈ IA (Φn ) | det (In + A) = i=1 xi the v-th colmun of A belongs to Jm,u,v It follows from the definitions that for every 1 ≤ u ≤ n we have: 1. Jm,u−1,v ⊆ Jm,u,v , but Ãu−1 ⊇ Ãu . Thus, we have also 2. Jm,u−1 ⊆ Jm,u , but Ãu−1 ⊇ Ãu . Here comes the connection between the latter objects to the objects defined in Definition 5.4. Proposition 5.8. For every 0 ≤ u ≤ n and 1 ≤ v ≤ n we have: Jm,u,v ∩ Ãu = J˜m,u,v , and hence: Jm,u ∩ Ãu = J̃m,u . 16 Proof. It is clear from the definitions that we have: J˜m,u,v ⊆ Jm,u,v ∩ Ãu , so we have to show an inclusion on the opposite way. Let a ∈ Jm,u,v ∩ Ãu . As: (P n σ 3 Ur,m v≤u ˜ Jm,u,v ⊇ Pnr=u+1 r 3 2 v6=r=u+1 σr Ur,m + Aσv Uv,m v > u  Pu 2 we can assume that: a ∈ A r=1 Aσr Ur,m + AOm + Om ∩ Ãu . Observe now that by dividing an element b ∈ R by σu+1 , . . . , σn (with residue), one can present b as a summand of an element of Ãu with an ele±1 ment of Ru = Z[x±1 1 , . . . , xu ]. Hence, R = Ãu + Ru and A = Ãu + Au , where Au is the augmentation ideal of Ru . Hence: a ∈ (Ãu + Au )2 u X σr µr,m (Ãu + Ru ) r=1 2 ⊆ + (Ãu + Au ) m(Ãu + Ru ) + (Ãu + Au )m2 (Ãu + Ru ) u X J˜m,u,v + A2u σr µr,m Ru + A2u mRu + Au m2 Ru . r=1  Pu Hence, we can assume that a ∈ A2u r=1 σr µr,m Ru + A2u mRu + Au m2 Ru ∩ Ãu = {0}, i.e. a = 0 ∈ J˜m,u,v , as required. Due to the above, we can now reduce Lemma 3.1’s proof as follows. Corollary 5.9. For proving Lemma 3.1 it suffices to show that given 1 ≤ u ≤ n, for every α ∈ J̃m,u−1 there exist β ∈ IAm ∩ Jm,u and γ ∈ ISLn−1,u (σu Hm ) ∩ Jm,u such that γαβ ∈ Ãu . Proof. As clearly Jm,u ⊇ Jm,u−1 ⊇ J̃m,u−1 , we obtain from Proposition 5.8 that: γαβ ∈ Ãu ∩ Jm,u = J̃m,u . Thus: α ∈ ISLn−1,u (σu Hm ) · J̃m,u · IAm = IAm · ISLn−1,u (σu Hm ) · J̃m,u . This yields that J̃m,u−1 ⊆ IAm ·ISLn−1,u (σu Hm )·J̃m,u which is the requirement of Corollary 5.6. 5.2 A technical lemma I this section we will prove a technical lemma, which will help us in subsection 5.3 to prove Lemma 3.1. In the following subsections 1 ≤ u ≤ n will be constant. Under this statement, we will use the following notations: • For a ∈ R we denote its image in Ru under the projection xu+1 , . . . , xn 7→ 1 by ā. In addition, we denote its image in Ru−1 under the projection ¯. xu , . . . , xn 7→ 1 by ā • For α ∈ GLn (R) we denote its image in GLn (Ru ) under the projection xu+1 , . . . , xn 7→ 1 by ᾱ. 17 • Similarly, we will use the following notations for every m ∈ N: P – Ā = Au = ui=1 σi P Ru , Ūr,m = µr,m Ru for 1 ≤ r ≤ u, Ōm = mRu u and H̄m = Hu,m = r=1 σr Ūr,m + Ōm . P u−1 ¯ =A ¯ – Ā u−1 = i=1 σi Ru−1 , Ūr,m = µr,m Ru−1 for 1 ≤ r ≤ u − 1 and ¯ = mR Ō . m u−1 Now, let α = In + A ∈ J̃m,u−1 , and denote the entries of A by ai,j . Consider the u-th row of A. Under the above assumption, for every v we have:  P  u−1 2  + Aσr Ur,m + AOm + Om Ãu−1  r=1   Pn σ 3 U v<u r=u r r,m  au,v ∈ Pu−1 2  Ãu−1  r=1 Aσr Ur,m + AOm + Om +   Pn 3 2 v ≥ u. v6=r=u σr Ur,m + Aσv Uv,m Hence we have:   P u−1 2  Ū + Ā Ō + Ō + Āσu2 Ūu,m Āσ σ r,m m r u  m r=1     = σu Pu Āσr Ūr,m + ĀŌm + Ō2 m r=1 P  āu,v ∈ u−1 2  + σu3 Ūu,m Āσr Ūr,m + ĀŌm + Ōm σu  r=1   P   u−1 = σ 2 2 Ū + σ Ū + Ā Ō + Ō Āσ r,m u,m m r u u m r=1 v=u (5.1) v 6= u. We can state now the technical lemma: Lemma 5.10. Let α = In + A ∈ J̃m,u−1 . Then, there exists δ ∈ IAm ∩ J̃m,u−1 such that for every v 6= u, the (u, v)-th entry of αδ −1 belongs to σu2 H̄m . We will prove the lemma in two steps. Here is the first step: Proposition 5.11. Let α = In + A ∈ J̃m,u−1 . Then, there exists δ ∈ IAm ∩ J̃m,u−1 such that for every v < u, the (u, v)-th entry of αδ −1 belongs to σu2 H̄m . Proof. So let α = In + A ∈ J̃m,u−1 , and observe that for every 1 ≤ v ≤ u − 1 one Pu−1 2 . can write āu,v = σu b̄u,v for some: b̄u,v ∈ r=1 Āσr Ūr,m + σu2 Ūu,m + ĀŌm + Ōm In addition, as it is easy to see that: u−1 X r=1 Āσr Ūr,m = u−1 X ¯ )⊆σ ¯ )σ (σ Ū + Ū (σu Ru + Ā r,m u r u r,m r=1 u−1 X σr Ūr,m + r=1 u−1 X ¯ ¯ σ Ū Ā r r,m r=1 2 ¯2 ¯ + Ō ¯ Ō ¯ )2 ⊆ σ Ō + Ā ¯ ) + (σ Ō + Ō ¯ )(σ Ō + Ō ĀŌm + Ōm = (σu Ru + Ā m m u m m u m u m m ¯ for every 1 ≤ v ≤ u − 1, for some: one can write b̄ = σ c̄ + b̄ u,v ¯b̄ u,v u,v u u,v ∈ u−1 X ¯¯ ¯ σ Ū ¯2 ¯ Ā r r,m + ĀŌm + Ōm r=1 c̄u,v ∈ u−1 X σr Ūr,m + σu Ūu,m + Ōm = H̄m . r=1 18 Notice, that as A satisfies the condition A~σ = ~0 we have the equality σ1 au,1 + . . . + σn au,n = 0, which yields the following equalities as well: σ1 āu,1 + . . . + σu−1 āu,u−1 + σu āu,u = 0 σ1 b̄u,1 + . . . + σu−1 b̄u,u−1 + āu,u ⇓ = 0 σ1¯b̄u,1 + . . . + σu−1¯b̄u,u−1 ⇓ = 0. Observe now that for every 1 ≤ v ≤ u − 1 we have: ! u−1 X 2 ¯ ¯ ¯ ¯ ¯ ¯ ⊆ J˜m,u−1,v Āσr Ūr,m + ĀŌm + Ō σu b̄u,v ∈ σu m r=1 and thus, if we define:  δ =  σu¯b̄u,1 Iu−1 ··· 0 σu¯b̄u,u−1  0 0 1 0  ← u-th row 0 In−u then δ ∈ J̃m,u−1 . We claim now that we also have δ ∈ IAm . We will prove this claim soon, but assuming this claim, we can now multiply α from the right by δ −1 ∈ J̃m,u−1 ∩ IAm and obtain an element in J̃m,u−1 such that the image of its (u, v)-th entry for 1 ≤ v ≤ u − 1, under the projection xu+1 , . . . , xn 7→ 1, is: āu,v − σu¯b̄u,v (1 + āu,u ) = σu2 c̄u,v − σu¯b̄u,v āu,u ∈ σu2 H̄m + σu2 u−1 X ¯ σ Ū ¯¯ ¯ ¯2 Ā r r,m + ĀŌm + Ōm r=1 = σu2 H̄m ! as required. So it remains to prove the following claim: Pu−1 ¯ ¯ ¯ 2 for ¯ + Ō ¯ Ō σr Ūr,m + Ā Claim 5.12. Let n ≥ 4, 1 ≤ u ≤ n, and ¯b̄u,v ∈ r=1 Ā m m 1 ≤ v ≤ u − 1 which satisfy the condition: σ1¯b̄u,1 + . . . + σu−1¯b̄u,u−1 = 0. Then:  u-th row →  σu¯b̄u,1 Iu−1 ··· 0 σu¯b̄u,u−1 19  0 0 1 0  ∈ IAm . 0 In−u (5.2) Proof. It will be easier to prove a bit more - we will prove that if for every 1 ≤ v ≤ u − 1: u−1 X ¯b̄ ∈ ¯ ¯2 ¯ ¯ ¯ σ Ū Ā r r,m + Ā Ūv,m + Ōm u,v v6=r=1 then the vector: ~b = (¯b̄u,1 , . . . , ¯b̄u,u−1 , 0, . . . , 0) is a linear combination of the vectors:   σk µk,m (σi~ej − σj ~ei ) , m (σi~ej − σj ~ei ) | i, j, k ≤ u − 1, i 6= j σk µi,m (σi~ej − σj ~ei ) with coefficients in Ru−1 . This will show that σu (¯b̄u,1 , . . . , ¯b̄u,u−1 , 0, . . . , 0) is a linear combination of the vectors in Propositions 4.1 and 4.2, so the claim will follow. We start with expressing ¯b̄u,1 explicitly by writing: ¯b̄ = u,1 u−1 X u−1 X σi σr µr,m pi,r + r=2 i=1 u−1 X σi σj µ1,m qi,j + mr i,j=1 for some pi,r , qi,j , r ∈ Ru−1 . Now, Equation 5.2 gives that under the projection Pu−1 ¯ σ2 , . . . , σu−1 7→ 0, ¯b̄u,1 7→ 0. It follows that ¯b̄u,1 ∈ i=2 σi Ru−1 ⊆ Ā. In ¯ , so we can write: particular, r ∈ Ā ¯b̄ = u,1 u−1 X u−1 X σi σr µr,m pi,r + r=2 i=1 u−1 X σi σj µ1,m qi,j + u−1 X σi mri i=1 i,j=1 for some pi,r , qi,j , ri ∈ Ru−1 . Observe now that by dividing r1 by σ2 , . . . , σu−1 (with residue) we can write Pu−1 r1 = r1′ + i=2 σi ri′ where r1′ depends only on x1 . Therefore, by replacing r1 by r1′ and ri by ri + σ1 ri′ for 2 ≤ i ≤ n, we can assume that r1 depends only on x1 . Similarly, by dividing q1,1 by σ2 , . . . , σu−1 , we can assume that q1,1 depends only on x1 . Now, by replacing ~b with: ~b − − u−1 X u−1 X r=2 i=1 u−1 X u−1 X σi µr,m pi,r (σr ~e1 − σ1~er ) σj µ1,m qi,j (σi~e1 − σ1~ei ) − u−1 X σ1 µ1,m q1,j (σj ~e1 − σ1~ej ) j=2 i=2 j=1 − u−1 X mri (σi~e1 − σ1~ei ) i=2 we can assume that ¯b̄u,1 is a polynomial which depends only on x1 . On the Pu−1 other hand, we already saw that Equation 5.2 yields that ¯b̄u,1 ∈ i=2 σi Ru−1 , so we can actually assume that ¯b̄u,1 = 0. 20 We continue in this manner by induction. In the 1 ≤ v ≤ u − 1 stage we assume that ¯b̄u,1 = . . . ¯b̄u,v−1 = 0. Then we write: ¯b̄ = u,v u−1 X u−1 X u−1 X σi σr µr,m pi,r + σi σj µv,m qi,j + mr i,j=1 v6=r=1 i=1 for some pi,r , qi,j , r ∈ Ru−1 . The condition ¯b̄u,1 = . . . = ¯b̄u,v−1 = 0 and Equation 5.2 give that σv ¯b̄u,v +σv+1¯b̄u,v+1 +. . .+σu−1¯b̄u,u−1 = 0 and thus, under Pu−1 ¯ . In the projection σv+1 , . . . , σu−1 7→ 0, ¯b̄u,v 7→ 0, so ¯b̄u,v ∈ i=v+1 σi Ru−1 ⊆ Ā ¯ particular, r ∈ Ā, so we can write: ¯b̄ = u,v u−1 X u−1 X σi σr µr,m pi,r + u−1 X σi σj µv,m qi,j + σi mri i=1 i,j=1 v6=r=1 i=1 u−1 X for some pi,r , qi,j , ri ∈ Ru−1 . Now, as we explained previously, by dividing pi,r , qi,j , ri for 1 ≤ i, j, r ≤ v by σv+1 , . . . , σu−1 , we can assume that these polynomials depend only on x1 , . . . , xv . Thus, by replacing ~b with: ~b − u−1 X X u−1 σi µr,m pi,r (σr ~ev − σv ~er ) − u−1 X u−1 X σj µv,m qi,j (σi~ev − σv ~ei ) − u−1 X v u−1 X X σi µv,m qi,j (σj ~ev − σv ~ej ) i=1 j=v+1 i=v+1 j=1 − σr µr,m pi,r (σi~ev − σv ~ei ) r=1 i=v+1 r=v+1 i=1 − v−1 X X u−1 mri (σi~ev − σv ~ei ) i=v+1 we can assume that ¯b̄u,v is a polynomial which depends only on x1 , . . . , xv , without changing the assumption that ¯b̄u,w = 0 for w < v. But we saw that in Pu−1 this situation Equation 5.2 yields that ¯b̄u,v ∈ i=v+1 σi Ru−1 , so we can actually assume that ¯b̄u,v = 0, as required. Here is the second step of the technical lemma’s proof: Proposition 5.13. Let α = In + A ∈ J̃m,u−1 such that for every v < u, āu,v ∈ σu2 H̄m . Then, there exists δ ∈ IAm ∩ J̃m,u−1 such that for every v 6= u, the (u, v)-th entry of αδ −1 belongs to σu2 H̄m . Proof. So let α = In + A ∈ J̃m,u−1 such that for every v < u, , āu,v ∈ σu2 H̄ m . We remined that by Equation 5.1,for every v > u we have: āu,v ∈ P u−1 2 2 σu r=1 Āσr Ūr,m + σu Ūu,m + ĀŌm + Ōm . Hence, we can write explicitly: āu,v = σu u−1 u XX σi σr µr,m pr,i + σu2 µu,m q + r=1 i=1 u X i=1 21 mσi ri + m2 s ! 2 for some: pr,i , q, ri , s ∈ Ru . Clearly, as ĀŌm ⊇ ĀŌm , by dividing s by σi for 1 ≤ i ≤ u (with residue), we can assume that s ∈ Z. Consider now the following element: m2 IAm ∋ (In + σv Eu,u − σu Eu,v ) = In + σv µv,m2 Eu,u − σu µv,m2 Eu,v = δ ′ . By the computation in the proof of Proposition 5.2, we obtain that: 2 µv,m2 ∈ σv2 Uv,m + σv Om + Om and thus (we remind that v > u): σv µv,m2 σu µv,m2  2 ∈ σv σv2 Uv,m + σv Om + Om ⊆ J˜m,u−1,u  2 2 ∈ σu σv Uv,m + σv Om + Om ⊆ J˜m,u−1,v . 2 ′ In addition, the determinant of δ ′ is xm v . Therefore, δ ∈ J̃m,u−1 . Observe now that as v > u, under the projection σu+1 , . . . , σn 7→ 0, xv 7→ 1, and δ is therefore maped to: δ̄ ′ = In − m2 σu Eu,v . Thus, if we multiply α from the right by δ ′s we obtain that the value of the entries in the u-th row under the projection σu+1 , . . . , σn 7→ 0 does not change, besides the value of the entry in the v-th colmun, which changes to (see Equation 5.1 for the ideal which contains āu,u ): ! u−1 X Āσr Ūr,m + σu2 Ūu,m + ĀŌm āu,v − sm2 σu (1 + āu,u ) ∈ σu + σu2 = σu r=1 u X r=1 u−1 X Āσr Ūr,m + ĀŌm + Āσr Ūr,m + r=1 σu2 Ūu,m 2 Ōm ! + ĀŌm ! .  Pu Pu−1 Hence, we can assume that āu,v ∈ σu i=1 σi fi + σu2 r=1 σr Ūr,m + Ōm = P Pu−1 u−1 σu i=1 σi fi + σu2 H̄m , for some fi ∈ r=1 σr Ūr,m + Ōm . Define now (the coefficient of ~ev is the value of the (u, v)-th entry):   Iu−1 0  0  Pu−1   δv =  −σv σu f1 · · · −σv σu fu−1 1 σu i=1 σi fi ~ev  ∈ J̃m,u−1 . 0 0 In−u By proposition 4.1, we obviously have: δv ∈ IAm . In addition, as v > u, under the projection σu+1 , . . . , σn 7→ 0 we have:   Iu−1 0  P 0   u−1 ev  . 1 σu δ̄v =  0 i=1 σi fi ~ 0 0 In−u 22 Thus, by multiplying α from the right by δ̄v−1 we obtain that the value of the entries in the u-th row under the projection σu+1 , . . . , σn 7→ 0 does not change, besides the value of the entry in the v-th colmun, which changes to: ! ! u u−1 X X 2 2 2 Āσr Ūr,m + AŌm + Ōm σi fi (1 + āu,u ) ∈ σu H̄m + σu āu,v − σu r=1 i=1 = σu2 H̄m . Qn Thus, defininig δ = v=u+1 δv finishes the proof of the proposition, and hence, also the proof of the technical lemma. 5.3 Finishing Lemma 3.1’s proof We remind that we have a constant 1 ≤ u ≤ n. We remind also that by Corollary 5.9, it suffices to show that given α ∈ J̃m,u−1 there exist β ∈ IAm ∩ Jm,u and γ ∈ ISLn−1,u (σu Hm ) ∩ Jm,u such that γαβ ∈ Ãu . So let α = In + A ∈ J̃m,u−1 . By the above technical lemma, there exists δ ∈ IAm ∩ J̃m,u−1 ⊆ IAm ∩ Jm,u such that for every v 6= u, the (u, v)-th entry of αδ −1 belongs to σu2 H̄m . Thus, by replacing α with αδ −1 , with out loss of generality, we can assume that we have āu,v ∈ σu2 H̄m for every v 6= u. I.e. for every v 6= u one can write: āu,v = σu2 b̄u,v for some b̄u,v ∈ H̄m . Now, for every v 6= u define the matrix:   σ1 b̄u,v (σv ~eu − σu~ev )  σ2 b̄u,v (σv ~eu − σu~ev )    δv = In +   ∈ Jm,u ..   . σn b̄u,v (σv ~eu − σu~ev ) which is equals, by direct computation, to the multiplication of the matrices:   0 Jm,u ∋ εv,k = In +  σk b̄u,v (σv ~eu − σu~ev )  ← k-th row 0 for k 6= u, v and the matrix (the following is an example for v > u):   0  σu b̄u,v (σv ~eu − σu~ev )  ← u-th row    0 Jm,u ∋ ηv = In +     σv b̄u,v (σv ~eu − σu~ev )  ← v-th row 0 Qn i.e. δv = ηv · u,v6=k=1 εv,k (observe that the matrices εv,k commute, so the product is well defined). One can see that by Propositions 4.1 and 4.2, εv,k ∈ IAm for every k 6= u, v. Moreover, by Proposition 4.3, ηv ∈ IAm . Hence, 23 Pn δv ∈ IAm ∩ Jm,u . Now, as for every 1 ≤ i ≤ n we have j=1 ai,j σj = 0 (by the Qn condition A~σ = ~0), α · u6=v=1 δv is equals to:       σ1 b̄u,v (σv ~eu − σu~ev ) a1,1 · · · a1,n n      .. ..  Y I +  σ2 b̄u,v (σv ~eu − σu~ev )  I +   n   n  . .. .     . u6 = v=1 an,1 · · · an,n σn b̄u,v (σv ~eu − σu~ev )     σ1 b̄u,v (σv ~eu − σu~ev ) a1,1 · · · a1,n n    ..  + X  σ2 b̄u,v (σv ~eu − σu~ev )  . = In +  ...    . . ..   u6 = v=1 an,1 · · · an,n σn b̄u,v (σv ~eu − σu~ev ) Qn It is easy to see now that if we denote α · u6=v=1 δv = In + C, then for every v 6= u, c̄u,v = 0, when ci,j is the (i, j)-th entry of C. Hence, we also have: c̄u,u σu = n X c̄u,v σ̄v = 0 =⇒ c̄u,u = 0. v=1 Thus, we can write α · following properties: Qn u6=v=1 δv = In + C̄ when the matrix C̄ has the • The entries of the u-th row of C̄ are all 0. • As ai,v ∈ J˜m,u−1,v for 5.1 Pevery i, v, by the computation for Equation  u−1 2 2 for every we have: āi,v ∈ σu r=1 Āσr Ūr,m + σu Ūu,m + ĀŌm + Ōm i, v 6= u. Hence, for every i, v 6= u we have: ! u−1 X 2 2 Āσr Ūr,m + σu Ūu,m + ĀŌm + Ōm + σu ĀH̄m c̄i,v ∈ σu r=1 =  2 . σu ĀH̄m + Ōm Qn Qu 2 Now, as det(δv ) = 1 for every v 6= u, det(α · u6=v=1 δv ) = det(α) = i=1 xsi i m . However, as the entries of C̄ have the above properties, Qthis determinant is mapped to 1 under the projection σu 7→ 0. Thus, det(α · nu6=v=1 δv ) is of the 2 form xsuu m . Now, set i0 6= u, and denote: ζ = In + σu µu,m2 Ei0 ,i0 − σi0 µu,m2 Ei0 ,u = (In + σu Ei0 ,i0 − σi0 Ei0 ,u ) m2 ∈ IAm . By the computation in the proof of Proposition 5.2, we obtain that: 2 µu,m2 ∈ σu2 Uu,m + σu Om + Om and thus: σu µu,m2 σi0 µu,m2   2 2 ⊆ Jm,u,i0 ⊆ σu ĀH̄m + Ōm ∈ σu σu2 Uu,m + σu Om + Om  2 2 ∈ σi0 σu Uu,m + σu Om + Om ⊆ Jm,u,u 24 2 so ζ ∈ IAm ∩ Jm,u . In addition det (ζ) = xm u . Therefore, α · writen as In + C̄, has the following properties: Q v6=u δv ζ −su , • The entries of the u-th row of C̄ are all 0.  2 , so we can write • For every i, v 6= u we have: c̄i,v ∈ σu ĀH̄m + Ōm 2 c̄i,v = σu di,v for some di,v ∈ ĀH̄m + Ōm . Pu Pu−1 • For every 1 ≤ i ≤ n we have: k=1 σk c̄i,k = 0, so c̄i,u = − k=1 σk di,k .  • det In + C̄ = 1. I.e.:   i=u 0 P c̄i,j = − u−1 σ d j=u k i,k k=1   σu di,j i, j 6= u  2 for some di,j ∈ ĀH̄mQ+ Ōm , and det In + C̄ = 1. Define now β = v6=u δv ζ −su and γ −1 by (γ −1 i,j is the (i, j)-th entry of γ −1 . Notice that the sums in the u-th column run until n and not until u − 1 as in In + C̄, as we need the following matrix to be an element of IA (Φn ). However, clearly, this addition does not changes the value of the determinant, and it stays to be 1):   i=u 0 P −1 γ i,j = − nu6=k=1 σk di,k j = u   σu di,j i, j 6= u.  m 2 ⊆ Hm and det γ −1 = So β ∈ IA  ∩ Jm,u . In addition, as di,j ∈ ĀH̄m + Ōm det In + C̄ = 1, γ ∈ ISLn−1,u (σu Hm ). Moreover, γ ∈ Jm,u . Hence, we obtained β ∈ IAm ∩ Jm,u and γ ∈ ISLn−1,u (σu Hm ) ∩ Jm,u such that γαβ = In , i.e. γαβ ∈ Ãu , as required. 6 Remarks and problems for further research We will prove now Theorem 1.3, which asserts that C (Φn ) is abelian for every n ≥ 4. But before, let us have the following proposition, which is slightly more general than Lemma 2.1. in [BER], but proven by similar arguments: α β Proposition 6.1. Let 1 → G1 → G2 → G3 → 1 be a short exact sequence of groups. Assume also that G1 is finitely generated. Then: α̂ β̂ 1. The sequence Ĝ1 → Ĝ2 → Ĝ3 → 1 is also exact. α̂ 2. The kernel ker(Ĝ1 → Ĝ2 ) is central in Ĝ1 . Proof. (of Theorem 1.3) By Proposition 6.1, the commutative exact diagram: 1 → IA (Φn ) → Aut (Φn ) ց ↓ Aut(Φ̂n ) 25 → GLn (Z) → 1 ↓ → GLn (Ẑ) . gives rise to the commutative exact diagram: \ \ \ IA (Φn ) → Aut (Φn ) → GL n (Z) ց ↓ ↓ Aut(Φ̂n ) → GLn (Ẑ) → 1 \ Now, as n ≥ 4, by the CSP for GLn (Z), the map GL n (Z) → GLn (Ẑ) is injec\ tive, so one obtains by diagram chasing, that C (IA (Φn ) , Φn ) = ker(IA (Φn ) → \ Aut(Φ̂n )) is mapped onto C (Φn ) = ker(Aut (Φn ) → Aut(Φ̂n )) through the map \ \ IA (Φn ) → Aut (Φn ). In particular, as by Theorem 1.2 C (IA (Φn ) , Φn ) is cen\ tral in IA (Φn ) for every n ≥ 4, it is also abelian, and thus C (Φn ) is an image of abelian group, and therfore abelian, as required. Problem 6.2. Is C (Φn ) not finitely generated? trivial? We proved in [Be2] that C (IA (Φn ) , Φn ) is not finitely generated for every n ≥ 4. This may suggest that also C (Φn ) is not finitely generated, or at list, \ not trivial. Moreover, if C (IA (Φn ) , Φn ) was not central in IA (Φn ), we could use the fact that IA (Φn ) is finitely generated for every n ≥ 4 [BM], and by the second part of Proposition 6.1 we could derive that the image of C (IA (Φn ) , Φn ) \ in Aut (Φn ) is not trivial. However, we showed that C (IA (Φn ) , Φn ) is central \ \ \ in IA (Φn ), so it is possible that C (IA (Φn ) , Φn ) ⊆ ker(IA (Φn ) → Aut (Φn )) and thus C (Φn ) is trivial. We saw in [Be2] that for every i there is a natural surjective map  ±1 ±1 \ \ ρ̂i : IA (Φn ) ։ GLn−1 Z[x i ], σi Z[xi ] . These maps enabled us to show in [Be2] that for every n ≥ 4, C (IA (Φn ) , Φn ) can be written as C (IA (Φn ) , Φn ) = (C (IA (Φn ) , Φn ) ∩ni=1 ker ρ̂i ) ⋊ n Y Ci i=1 where Ci ∼ = ∼ =  ±1 ±1 ±1 \ \ ker(GLn−1 Z[x i ], σi Z[xi ] → GLn−1 (Z[xi ]))  ±1 \ \ ker(SLn−1 Z[x±1 i ] → SLn−1 (Z[xi ])). \ are central in IA (Φn ). Here we showed that also C (IA (Φn ) , Φn ) ∩ni=1 ker ρ̂i lie \ in the center of IA (Φn ) but we still do not know to determine whether: Q Problem 6.3. Is C (IA (Φn ) , Φn ) = ni=1 Ci or it contains more elements? It seems that having the answer to Problem 6.3 will help to solve Problem 6.2. 26 References [A] M. Asada, The faithfulness of the monodromy representations associated with certain families of algebraic curves, J. Pure Appl. Algebra 159 (2001), 123–147. [Ba] S. Bachmuth, Automorphisms of free metabelian groups, Trans. Amer. Math. Soc. 118 (1965) 93-104. [Be1] D. E-C. Ben-Ezra, The congruence subgroup problem for the free metabelian group on two generators. Groups Geom. Dyn. 10 (2016), 583–599. [Be2] D. E-C. Ben-Ezra, The IA-congruence kernel of high rank free Metabelian groups, in preparation. [Bi] J. S. Birman, Braids, links, and mapping class groups, Princeton University Press, Princeton, NJ, University of Tokyo Press, Toyko, 1975. [Bo1] M. Boggi, The congruence subgroup property for the hyperelliptic modular group: the open surface case, Hiroshima Math. J. 39 (2009), 351–362. [Bo2] M. Boggi, A generalized congruence subgroup property for the hyperelliptic modular group, arXiv:0803.3841v5. [BER] K-U. Bux, M. V. Ershov, A. S. Rapinchuk, The congruence subgroup property for Aut (F2 ): a group-theoretic proof of Asada’s theorem, Groups Geom. Dyn. 5 (2011), 327–353. [BL] D. E-C. Ben-Ezra, A. Lubotzky, The congruence subgroup problem for low rank free and free metabelian groups, J. Algebra (2017), http://dx.doi.org/10.1016/j.jalgebra.2017.01.001. [BLS] H. Bass, M. Lazard, J.-P. Serre, Sous-groupes d’indice fini dans SLn (Z), (French) Bull. Amer. Math. Soc. 70 (1964) 385–392. [BM] S. Bachmuth, H. Y. Mochizuki, Aut (F ) → Aut (F/F ′′ ) is surjective for free group F of rank ≥ 4, Trans. Amer. Math. Soc. 292 (1985), 81–101. [DDH] S. Diaz, R. Donagi, D. Harbater, Every curve is a Hurwitz space, Duke Math. J. 59 (1989), 737–746. [FM] B. Farb, D. Margalit, A primer on mapping class groups, Princeton Mathematical Series, 49. Princeton University Press, Princeton, NJ, 2012. [KN] M. Kassabov, M. Nikolov, Universal lattices and property tau, Invent. Math. 165 (2006), 209–224. [L] A. Lubotzky, Free quotients and the congruence kernel of SL2 , J. Algebra 77 (1982), 411–418. 27 [Ma] W. Magnus, On a theorem of Marshall Hall, Ann. of Math. 40 (1939), 764–768. [Mc] D. B. McReynolds, The congruence subgroup problem for pure braid groups: Thurston’s proof, New York J. Math. 18 (2012), 925–942. [Mel] O. V. Mel´nikov, Congruence kernel of the group SL2 (Z), (Russian) Dokl. Akad. Nauk SSSR 228 (1976), 1034–1036. [Men] J. L. Mennicke, Finite factor groups of the unimodular group, Ann. of Math. 81 (1965), 31–37. [NS] N. Nikolov, D. Segal, Finite index subgroups in profinite groups, C. R. Math. Acad. Sci. Paris 337 (2003), 303–308. [Rom] N. S. Romanovskiı̆, On Shmel´kin embeddings for abstract and profinite groups, (Russian) Algebra Log. 38 (1999), 598-612, 639-640, translation in Algebra and Logic 38 (1999), 326–334. [RS] V. N. Remeslennikov, V. G. Sokolov, Some properties of a Magnus embedding, (Russian) Algebra i Logika 9 (1970), 566–578, translation in Algebra and Logic 9 (1970), 342–349. [Su] A. A. Suslin, The structure of the special linear group over rings of polynomials, (Russian) Izv. Akad. Nauk SSSR Ser. Mat. 41 (1977), 235–252, 477. Institute of Mathematics The Hebrew University Jerusalem, ISRAEL 91904 [email protected] 28
4math.GR
Paper accepted for the ICDL-Epirob 2017 conference. Tapping the sensorimotor trajectory Oswald Berthold, Verena V. Hafner arXiv:1704.07622v2 [cs.NE] 6 Nov 2017 Adaptive Systems Group, Dept. of Computer Science, Humboldt-Universität zu Berlin, Germany Abstract—In this paper, we propose the concept of sensorimotor tappings, a new graphical technique that explicitly represents relations between the time steps of an agent’s sensorimotor loop and a single training step of an adaptive internal model. In the simplest case this is a relation linking two time steps. In realistic cases these relations can extend over several time steps and over different sensory channels. The aim is to capture the footprint of information intake relative to the agent’s current time step. We argue that this view allows us to make prior considerations explicit and then use them in implementations without modification once they are established. Here we explain the basic idea, provide example tappings for standard configurations used in developmental models, and show how tappings can be applied to problems in related fields. I. I NTRODUCTION As stated in theories of development, an agent’s brain can contain modules that function as models of its interaction with the world. These models are used by the brain to evaluate the possible actions in “imagined space” and the agent only performs the most promising ones in physical space. The role of a theory on these models is to describe how precisely a sensorimotor model is learnt from experience and how it interacts with other existing models in a developmental context. There are different types of such models. Machine learning (ML), for example, solves the problem of fitting a model to data in a problem independent form. The ML approach usually relies on a preprocessing step to transform the raw data into the required form. Using ML methods we can learn sensorimotor models of transitions in sensorimotor space up to a desired accuracy. This level of modelling provides the grounding in sensorimotor space. An important question is how to map the raw sensorimotor data to sensorimotor training data for realizing specific functions needed inside a developmental model. This paper introduces the concept of tapping for designing and analysing models of developmental learning. The concept is adopted from signal processing where it is used to describe a filter as a weighted sum of delayed copies of a signal as shown in Figure 1. The simplest sensorimotor tapping then is just the same as a filter tapping, using past values of a single variable to predict a future value of the same variable. In realistic situations the number of past values can be numerous, include different modalities, and the linear filter is a general nonlinear function whose parameters are learned from data. This view allows us to discuss a wide range of issues in temporal learning. For example, concepts from developmental robotics, reinforcement learning, neuroscience, Linear filter from delay line taps Fig. 1: This graphical representation of linear a filter uses successively delayed copies of an input s to compute a prediction as a weighted sum of all copies. It provides the starting point for sensorimotor tappings. and information theory can be represented and compared by exposing relational properties independent of terminology. The paper is structured as follows. In section II, related work and existing concepts are discussed. Section III explains the basics of tappings, and in section IV specific examples are discussed. In section V some particular application areas for tappings are named. The paper ends with a discussion and conclusions. II. R ELATED WORK A central concept in signal processing are linear filters. These were originally implemented as analog circuits using delay lines to store a finite amount of the signal’s past values. In time-discrete implementations a filter’s output is computed as a weighted sum over a finite number of past inputs. This is realized by tapping into fixed positions within a sliding window. Each tap is multiplied by a corresponding weight which together comprise the filter’s coefficients. This provides the starting point for sensorimotor tappings. A filter can be seen as linear regression and its coefficients can be learned with a least squares fit. This is known as an adaptive filter in signal processing and is the same as a linear adaptive forward model in a developmental robotics context. The main techniques used for describing developmental models are plain text accounts, equations, and various types of block diagrams. Equations and diagrams are each highlighting different aspects of a model’s function and behaviour. Equations are precise in representing functional dependencies including general temporal relations. Block diagrams emphasize which functions are used and which of those functions are interacting directly. None of them provides an intuitive representation of the global extent and the microstructure of interaction between variables for a given robot. This also means that reoccurring patterns of these properties and their systematic variation across different robots are hard to express. t t-1 . . . . Future t+1 Paper accepted for the ICDL-Epirob 2017 conference. Past Ex.: fwd model Prediction Ex.: inv model Sensorimotor space Single vector Matrix (stored vectors) Tappings ML Dataset Fig. 2: The basic idea of tapping the sensorimotor trajectory. Concatenating the row vectors horizontally creates a matrix. The matrix inherits the row structure from the vector and represents time along the other axis. More systematic graphical methods are the backup diagrams introduced by Sutton & Barto [1] and temporal probabilistic graphical models [2]. Backup diagrams track how the instantaneous information is related to previous states and indicates how it is propagated back in time to update the relevant state in the agent’s controller. These diagrams do not however differentiate sensory modalities very well. Probabilistic graphical models, especially dynamic bayesian networks, provide a natural complement to the current approach. Like recurrent neural networks, these models incorporate the problem of mapping input time and modality into the model state. In contrast, tappings aim at a decoupled representation of the input mapping and the model’s state update. Information theory can be used to quantify the amount of shared information among sensorimotor variables as shown in [3] or [4]. This provides the empirical complement of tappings and can be used to obtain a tapping from data prior to training a model or to analyze a model’s use of temporal information after training. A number of recent works have suggested predictive information, the amount of information shared between the past and the future of a random variable, as a measure for the amount of non-trivial information obtained from embodied interaction [5]. This also highlights the importance of the agent’s momentary temporal sensorimotor embedding. Internal modelling approaches in developmental robotics that use prediction learning are lacking a way to describe the interaction of the embedded sensorimotor models with the information provided by the enclosing developmental model in a general and systematic manner. This also holds for temporal difference learning in RL and correlational learning processes in neuroscience. Thus we see a definite need for an additional tool from which these fields, and maybe robotics and AI at large, might benefit. Our contribution besides the identification of this gap is a proposal for filling it. III. TAPPINGS The sequence of steps necessary for going from sensorimotor space to the sensorimotor model input / output space are shown in the illustration in Figure 2 with enlarged views of two example tappings. A single sensory measurement at time t is represented by a vector. The vector is composed of subparts that reflect the natural structure of the agent’s modalities imposed by the sensors (e.g. vision or joint angles). The set of all possible vectors defines the agent’s sensorimotor space. Measurement vector and sensorimotor space comprise the left part of the figure. The agent’s internal time creates the temporal ordering of incoming measurements [6], and storing them in this order forms a matrix. The matrix is shown in the center of the figure. It contains a numerical representation of the sequence of external states as they are reflected in sensorimotor space. An agent living in a partially observable world can benefit from extracting additional information from relations across time and modalities. To do this with memoryless models, the sensorimotor matrix has to be tapped using a context dependent pattern attached to the current time step with the data sliding along underneath. The patterns for a forward and an inverse model are shown close up. The locations of the nodes of the tapping indicate which relative time step and modalities are used to assemble a supervised training set. The node’s colors indicate wether the datum is an input or a target. A. Example Consider the example of a Nao robot bootstrapping the ability to move its hand to a given point in visual space shown in Figure 3. The agent creates an episode of data by exploring five random joint angles. For simplicity a kinematic arm is assumed so there is a delay of one time step between motor command and the corresponding measurement. Each momentary measurement consists of the current image, resulting from the previous command, and a new motor command about to Paper accepted for the ICDL-Epirob 2017 conference. Training Tapping Using Block diagram ? = ... Goal Best match Predictor pred. propagation red is input X green is target Y commit action Fig. 3: On the left a Nao robot trains a model to predict visual consequences from joint angle configurations through sensorimotor exploration, right: the robot uses the model to find the best matching prediction and the associated action in the predictor’s input. (a) Simple temporal predictor. Tapping Block diagram Predictor pred. propagation red is input X green is target Y M M1 M2 M3 M4 M5 S I1 I2 I3 I4 I5 ⇒ M1 M2 M3 M4 M5 X I2 Y I3 I4 I5 ... Fig. 4: An unrolled view of the repeated application of a tapping into sensorimotor data that the Nao agent uses for constructing the training data with inputs X and targets Y . be committed. In order to let the agent learn to predict the image in the next time step from the current command, an adaptive model is trained with commands as input and the image as target taken from different relative time steps as shown in Figure 4. The training set is created from the raw data by shifting the row of commands one time step to the right. The measurements in each column of the new matrix are now ordered by model update steps instead of sensorimotor time. A detailed tapping is shown Figure 5. B. Tapping degrees of freedom Tappings are specified relative to the current time t = 0, becoming positive in the future and negative into the past. This proposal only considers discrete time and equidistant sampling with a constant ∆t. It makes sense to group variables in the matrix according to their modality such as as exteroceptive- (vision, hearing), proprioceptive- (motors, joint angles, forces), or interoceptive sensors. Interoceptive variables represent any intermediate stage of other concurrent M1 t t −1 t −2 Modal. Nao tapping shoulder roll M2 elbow roll M3 elbow yaw M4 shoulder pitch SE Predictor image Fig. 5: Tapping for the Nao example with fully expanded motor signals and a corresponding block diagram. - - (b) Simple intermodal predictor. Fig. 6: The two principal axes of association shown as tappings alongside with corresponding block diagrams. a) A simple temporal predictor, predicting the state one timestep ahead, and b) a simple intermodal predictor taking proprioceptive input to an exteroceptive prediction. computations in the agent’s sensorimotor loop. A group whose elements all contribute to the same argument of the target function, for example all pixels in an image, can be reduced to a single element in the graphical representation. A common arrangement in a developmental model is to use a supervised learning algorithm because it can be trained effectively. A supervised training set consists of the input X and targets Y that constrain the functional relation f (X) = Y . The approximation task is to find parameters θ for the model fˆ(·, θ) = Ŷ such that |Y − Ŷ | is minimized under a given loss. Prediction learning allows the agent to construct infinite supervised training data on the fly. Tappings can describe the necessary transformations independent of the learning algorithm. If XY is the full supervised training set, the tapping defines a map taking an SM T index set to an XY index set. It can be immediately seen from the figures that a tapping is a directed graph on top of SM T ’s row and column indices. The graphical structure encodes the relation prescribed by the sensorimotor model’s function inside the developmental model. In addition to the supervised learning case the graph can immediately be taken as dynamic Bayesian network graph connecting the current approach to a rich existing body of formalism and inference techniques. A single time step prediction problem requires a tapping from one time step to the next. Doing the same along modalities captures intermodal prediction, that is, predicting sensory consequences in one modality from the state of another modality. By adding joint angle sensors to the Nao agent, it could learn to predict the hand position (vision) from joint angles (proprioception) in the same time step. Paper accepted for the ICDL-Epirob 2017 conference. Block diagram Tapping: Time-delayed temporal predictor Predictor pred. propagation red is input X green is target Y Fig. 7: The multi step predictor using a window on k past values as instantaneous input and, in the fully symmetric case a window on k − 1 additional future values as the target. The time indexing has been omitted for simplicity. S1E S1E S2E S2E C. Summary S3E S3E To summarize this section we highlight the main features of tappings. They provide an information centric view on developmental models. This view is independent of particular learning algorithms, and it provides an upper bound1 on the amount of explanation a model needs to accomplish. That bound is a reference for comparing different models in terms of the fraction of maximum explanation. Tappings facilitate the design of developmental models, algorithms and their implementations by highlighting regularities in the design space and being precise and explicit about time. Analysing two important model types and their tappings shows to what extent different functional roles are determined by the input / output relations, and the learning algorithm respectively. These features all contribute to facilitate systematic exploration of developmental models. S4E S4E IV. BASIC TAPPINGS In this section we explore tappings further by looking at some variations of the simple ones that came out of the previous section: multi step prediction, autoencoding, and autopredictive encoding. If the internal model is a feedforward map without internal memory the simple one time step predictor in Figure 6a cannot make use of additional information about the future that was presented more than one time step ago. The missing memory of the model can be replaced by using a moving window of size k that augments the momentary model input by including all k previous values of the variables2 . Since tappings are moving windows, the multi time step tapping shown in Figure 7 is almost trivial, the window size being equal to the number of input taps spread uniformly into the past. Iterative predictions in extended forward simulations 1 the joint entropy of all sensorimotor variables moving window technique is alternatively known as moving average model, time delay neural network, delay-embedding or method of delays 2 The t t −1 t −2 Modal. Tapping APE t +1 t t −1 Tapping AE Modal. The two dimensions of the sensorimotor data matrix result in two corresponding tappings resulting in a temporal predictor, shown in Figure 6a, and an intermodal predictor shown in Figure 6b. Sensorimotor models encode regularity in sensorimotor state transitions along these axes. Learning transitions along the normal forward flow of time results in a forward model. Forward models are central to the simulation theory of cognition, which states that an agent learning to approximate the forward transition rules to a sufficient degree of fidelity can use them to internally “simulate experience” [7]. Rearranging the direction of prediction to go backwards in time creates an inverse model. This allows the model to predict (infer) causes from observed effects, which allows the agent to control and change its own state by directly predicting the causes of its desired state. This translates to predicting the actions that lead to a goal [8]. Direct prediction imposes constraints on the learning algorithm. Generally the inverse of a function can be a correspondence, requiring the learning algorithm to be able to represent this type relation. Fig. 8: Autoencoder (left) and autopredictive encoder (right). The AE’s tapping is special because input and target coincide. Pulling the input and source apart over one timestep difference produces the autopredictive encoder. The prediction prior imposes additional structure on the hidden representation. demand better model accuracy. A reasonable shortcut towards more accuracy is to improve the prediction by imposing a longterm consistency constraint by extending the target tapping into the future (using buffering in closed-loop learning). A special case of a predictor is the autoencoder. Its tapping is shown on the left in Figure 8. Its target output is the same as its input. In terms of the XY formulation with X = Y , the autoencoder could only consist of wires. The added value of an autoencoder comes exclusively from constraints on the intermediate representation. Like prediction learning, autoencoding is an unsupervised learning technique built with supervised learning. If we look at the tapping we see that the information of each single variable on the input is distributed to all other variables on the output. By a simple change of the tapping we easily obtain an autopredictive encoder (APE) as the result of pulling the autoencoder’s input and output taps one time step apart. The autopredictive encoder is not an established term but multiple proposals for such architectures have in fact been made [9], [10], [11]. Applying the prediction constraint on the model has been shown to increase the task-independence of latent space representations in [12]. In the tapping we see immediately that the prediction constraint encourages the model to represent the rules of change in the hidden space. The APE tapping is shown in Figure 8. Paper accepted for the ICDL-Epirob 2017 conference. Tapping Block diagram TD(0) Q-Learning SARSA Predictor - pred. propagation red is input X green is target Y (a) Forward Tapping Block diagram red is input X green is target Y pred. propagation compute target Fig. 10: Tapping temporal difference learning algorithms. Predictor - pred. propagation red is input X green is target Y (b) Inverse Fig. 9: Tapping a single time step forward- and inverse model pair. The model’s functions are determined by different relations over the same set of variables. V. A PPLICATION AREAS Internal modelling [13] is an important concept used in developmental robotics [14], [15], [16]. An underlying driving hypothesis is that predictive models enable anticipatory behaviour [17] which is more powerful than purely reactive behaviour. From the developmental perspective this implies that some functions of a developmental model must be provided by adaptive models of the sensorimotor dynamics. Two basic functional types of internal models, forward and inverse ones, have already been introduced as examples in Figure 2 and are shown again as a pair of tappings in Figure 9. This highlights the rearrangement of the direction of prediction without a change of variables. Exploitation of adaptive models has also been described above indicating different ways of predicting and evaluating future options with forward models, or directly inferring actions with inverse models. A popular method in reinforcement learning is temporal difference learning. Temporal difference learning is a family of algorithms to approximate a prediction target with a recurrent estimate. The usual target is a value function which maps actions to a value. The estimate is bootstrapped by minimizing the moment-to-moment value prediction error, which is ultimately grounded in a primary reward signal. There exists extensive theory in RL that deals with the problem of integrating task-relevant information that is spread out in time, with two fundamental concepts being involved. The first one is that of multistep methods which take care of consequences escaping into the future. The second one are eligibility traces which capture causes vanishing into the past. Taken together they solve the general delayed reward problem. Depending on the parameters a corresponding tapping will be similar to the multi step predictor. The importance of features and modalities and the infor- mation contained in their mutual relations is less developed. The concepts used in reinforcement learning can easily be remapped to internal modelling terms and vice versa, making tappings immediately applicable to temporal difference learning problems. Looking at three basic temporal difference learning algorithms, TD(0), Q-Learning and SARSA, it can be seen that they all approximate a target by updating from a one time step difference. TD(0)’s target is a state value function v while for Q-learning and SARSA it is a state-action value function q [1]. The update rules all follow the same general form of ∆v = α(Rt + γv(S 0 )t ) and the corresponding tappings are shown in Figure 10. Comparing these with the internal model tappings we see that temporal difference learning corresponds with prediction learning and that the value function is a forward model allowing us to reframe RL problems as developmental prediction learning ones and the other way round. The λ = 0 case is shown here to correspond to a single time step tapping but the proportional increase in tapping length with increasing λ should be obvious. Neuroscience provides several models that link computational and neurobiological accounts of associative learning and reinforcement learning. The Rescorla-Wagner rule [18] is one example. It is a model of classical conditioning and describes how an association is learned across two modalities, the unconditioned (US) and the conditioned stimulus (CS), which occur at different times. Another example is the reward prediction error hypothesis of dopamine [19], [20], [21] which provides a physiological mechanism in support of computational descriptions of reinforcement. Low-level models of neural adaptation like spike-time dependent plasticity (STDP) [22], [23] are characterized by a local window of interaction on a microscopic time scale. STDP itself is not a model for learning delays but an even lower level mechanism for reinforcing or weakening the association of pre- and postsynaptic events based on the local window prior. It can of course be used indirectly to extract sensorimotor delay information. Tappings apply without modification to all these different levels of modeling as shown exemplarily for the conditioning case in Figure 11. Paper accepted for the ICDL-Epirob 2017 conference. t t −1 t −2 Modal. Classical conditioning CS Bell US Food Fig. 11: Model of classical conditioning: it explains the prediction of the unconditioned stimulus (US) from a stimulus occurring earlier in time, the conditioned stimulus (CS). The predictive association of stimuli across time is precisely the process of conditioning. This highlights again that the difference to a forward model or a value prediction is only in the terminology and not in the structure of the association problem. VI. D ISCUSSION During this presentation of tappings, a few additional issues came up that still need to be discussed. Models with memory like recurrent neural networks or dynamic Bayesian networks need special consideration with respect to tappings. Such models naturally retain an internal memory of past input values. Because of this, they do not need explicit memory in their inputs and in theory only need to tap across one time step. They are building up an implicit tapping as part of their learning while tappings aim at an representation of specific memory needs for a given learning task. Measuring the information flow across the model inputs and outputs after training with quantitative [3] or relational techniques [24] should result in an effective tapping that could be used for comparison with prior tappings or interpreted as a way of learning them. The memory issue is an example of a more general aspect about tappings. The current proposal disregards details about the learning algorithm used at the level of sensorimotor models. It is argued that this is in fact an advantage and necessary for wider comparison of models. The same is evident in the case of inverse problems where the learning of correspondences instead of functions needs to be considered. It remains to be shown how these properties could be integrated and represented in a tapping. No experimental validation is given in this paper. This does not mean though that no experimental backing of the idea exists. In fact, it is an outcome of analyzing the design of a large number of different experiments in developmental learning in the course of our research during which the structural invariant that tappings try to represent became evident. It was decided to defer the experimental validation in this paper in favour of being able to focus on the explanation of the basic idea and to demonstrate its applicability to a wide range of contexts. VII. C ONCLUSION This paper introduces tappings, a novel concept for designing and analysing models of developmental learning in the field of developmental robotics and the related fields of reinforcement learning and computational neuroscience. Tappings came out of a need for capturing the detailed embedding of learning machines in the temporal and modal context of raw sensorimotor trajectories. Tappings create a particular view on the interaction between the embodiment and the functional requirements of behaviour that can help to better understand developmental learning processes, and make sensorimotor learning more efficient. They can systematically describe the relationship between supervised learning and developmental models. By ignoring computational details the tapping view highlights the information flow across models and using that we can compare a large range of models that cannot easily be compared otherwise. We showed the structural similarity of prediction learning in the developmental context and temporal difference learning in RL. ACKNOWLEDGMENT We would like to thank Guido Schillaci for providing experimental data for the Nao example and the Adaptive Systems Group members for discussions. R EFERENCES [1] R. S. Sutton and A. G. Barto, Introduction to Reinforcement Learning, 1st ed. Cambridge, MA, USA: MIT Press, 1998. [2] D. Koller and N. Friedman, Probabilistic Graphical Models: Principles and Techniques - Adaptive Computation and Machine Learning, 2009. [3] M. Lungarella, T. Pegors, D. Bulwinkle, and O. Sporns, “Methods for quantifying the informational structure of sensory and motor data,” Neuroinformatics, vol. 3, no. 3, pp. 243–262, 2005. [4] F. Kaplan and V. V. Hafner, “Information-theoretic framework for unsupervised activity classification,” Advanced Robotics, vol. 20, no. 10, pp. 1087–1103, 2006. [5] W. Bialek and N. Tishby, “Predictive Information,” eprint arXiv:condmat/9902341, Feb. 1999. [6] A. V. Terekhov and J. K. O’Regan, “Space as an invention of active agents,” Frontiers in Robotics and AI, vol. 3, p. 4, 2016. [7] “The current status of the simulation theory of cognition,” Brain Research, vol. 1428, pp. 71 – 79, 2012, the Cognitive Neuroscience of Thought. [8] M. Rolf and M. Asada, “What are goals? and if so, how many?” in 2015 Joint IEEE International Conference on Development and Learning and Epigenetic Robotics (ICDL-EpiRob), Aug 2015, pp. 332–339. [9] V. Michalski, R. Memisevic, and K. Konda, “Modeling deep temporal dependencies with recurrent grammar cells"",” in Advances in Neural Information Processing Systems 27. [10] V. Patraucean, A. Handa, and R. Cipolla, “Spatio-temporal video autoencoder with differentiable memory,” CoRR, vol. abs/1511.06309, 2015. [Online]. Available: http://arxiv.org/abs/1511.06309 [11] J. L. Copete, Y. Nagai, and M. Asada, “Motor development facilitates the prediction of others’ actions through sensorimotor predictive learning,” in Proceedings of the 6th IEEE International Conference on Development and Learning and on Epigenetic Robotics, 2016. [12] W. Lotter, G. Kreiman, and D. Cox, “Unsupervised learning of visual structure using predictive generative networks,” CoRR, vol. abs/1511.06380, 2015. [Online]. Available: http://arxiv.org/abs/1511. 06380 [13] K. J. W. Craik, The Nature of Explanation. Cambridge University Press, 1943. [14] D. M. Wolpert and M. Kawato, “Multiple paired forward and inverse models for motor control,” Neural Networks, vol. 11, no. 7, pp. 1317– 1329, 1998. [15] “Hierarchical attentive multiple models for execution and recognition of actions,” Robotics and Autonomous Systems, vol. 54, no. 5, pp. 361 – 369, 2006. [16] G. Schillaci, V. V. Hafner, and B. Lara, “Exploration behaviors, body representations, and simulation processes for the development of cognition in artificial agents,” Frontiers in Robotics and AI, vol. 3, p. 39, 2016. Paper accepted for the ICDL-Epirob 2017 conference. [17] R. Rosen, Anticipatory Systems - Philosophical, Mathematical, and Methodological Foundations, 2nd ed., ser. IFSR International Series on Systems Science and Engineering. Springer-Verlag New York, 2012, vol. 1. [18] R. Rescorla and A. R. Wagner, “A theory of pavlovian conditioning: variations in the effectiveness of reinforcement and nonreinforcement,” in Classical conditioning II: Current research and theory. AppletonCentury-Crofts, New York, 1972. [19] W. Schultz, P. Dayan, and P. R. Montague, “A neural substrate of prediction and reward,” vol. 275, no. 5306, pp. 1593–1599, 1997. [20] P. Dayan, “Matters temporal,” Trends in Cognitive Sciences, vol. 6, no. 3, pp. 105–106, 2002. [21] “Reinforcement learning in the brain,” Journal of Mathematical Psychology, vol. 53, no. 3, pp. 139 – 154, 2009, special Issue: Dynamic Decision Making. [22] W. Gerstner, R. Kempter, J. L. van Hemmen, and H. Wagner, “A neuronal learning rule for sub-millisecond temporal coding,” Nature, vol. 383, no. 6595, pp. 76–78, 09 1996. [23] H. Markram, J. Lübke, M. Frotscher, and B. Sakmann, “Regulation of synaptic efficacy by coincidence of postsynaptic aps and epsps,” vol. 275, no. 5297, pp. 213–215, 1997. [24] P. L. Williams and R. D. Beer, “Nonnegative decomposition of multivariate information,” ArXiv.
9cs.NE
Efficient semiparametric estimation and model selection for multidimensional mixtures Elisabeth Gassiat1 , Judith Rousseau2 , and Elodie Vernet3 arXiv:1607.05430v2 [math.ST] 13 Dec 2017 1 Laboratoire de Mathématiques d’Orsay, Univ. Paris-Sud, CNRS, Université Paris-Saclay, 91405 Orsay, France 2 CEREMADE, Université Paris Dauphine, Paris, Franc 3 CMAP, École Polytechnique, route de Saclay, 91128 Palaiseau Cedex, France Abstract In this paper, we consider nonparametric multidimensional finite mixture models and we are interested in the semiparametric estimation of the population weights. Here, the i.i.d. observations are assumed to have at least three components which are independent given the population. We approximate the semiparametric model by projecting the conditional distributions on step functions associated to some partition. Our first main result is that if we refine the partition slowly enough, the associated sequence of maximum likelihood estimators of the weights is asymptotically efficient, and the posterior distribution of the weights, when using a Bayesian procedure, satisfies a semiparametric Bernstein-von Mises theorem. We then propose a cross-validation like method to select the partition in a finite horizon. Our second main result is that the proposed procedure satisfies an oracle inequality. Numerical experiments on simulated data illustrate our theoretical results. Keywords: Semiparametric statistics, mixture models, efficiency, Bernstein von Mises Theorem Contents 1 Introduction 2 2 Asymptotic efficiency 2.1 Model and notations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Efficient influence functions and efficient Fisher informations . . . . . . . 2.3 General result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 5 8 11 3 Model selection 3.1 Behaviour of the MLE as M increases . . . . . . . . . . . . . . . . . . . . . 3.2 Criterion for model selection . . . . . . . . . . . . . . . . . . . . . . . . . . 13 13 14 1 4 Simulation study 4.1 On the estimation of the risk and the selection of M . . . . . . . . . . . . 4.2 On the choice of M0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 17 22 5 Conclusion and discussion 5.1 On the structural assumptions on the model . . . . . . . . . . . . . . . . . 5.2 Extensions to Hidden Markov models . . . . . . . . . . . . . . . . . . . . . 23 24 25 6 Proofs 6.1 Proof of Proposition 1 . 6.2 Proof of Proposition 2 . 6.3 Proof of Lemma 1 . . . 6.4 Proof of Proposition 3 . 6.5 Proof of Corollary 1 . . 6.6 Proof of Theorem 2 . . 6.7 Proof of Proposition 4 . 25 25 26 27 29 33 34 34 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Introduction We consider in this paper multidimensional mixture models that describe the probability distribution of a random vector X with at least three coordinates. The model is a probability mixture of k populations such that the coordinates of X can be grouped into 3 blocks of random variables which are conditionally independent given the population. We call emission distributions the conditional distributions of the coordinates and θ the parameter that contains the probability weights of each population. It has been known for some time that such a model is identifiable under weak assumptions. When the coordinates of X take finitely many values, Kruskal [23] in 1977 provided an algebraic sufficient condition under which he proved identifiability. See also [28]. Kruskal’s result was recently used by [1] to obtain identifiability under almost no assumption on the possible emission distributions: only the fact that, for each coordinate, the k emission distributions are linearly independent. Spectral methods were proposed by [2], which allowed [10] to derive estimators of the emission densities having the minimax rate of convergence when the smoothness of the emission densities is known. Moreover, [11] proposes an estimation procedure in the case of repeated measurements (where the emission distributions of each coordinate given a population are the same). Our paper focuses on the semiparametric estimation of the population weights when nothing is known about the emission distributions. This is a semiparametric model, where the finite dimensional parameter of interest is θ and the infinite dimensional nuisance parameters are the emission distributions. In applications, the populations weights have direct interpretation. As an example, in [25] the problem is to estimate the proportion of cells of different types for diagnostic purposes, on the basis of flow cytometry data. Those data give the intensity of several markers responses and may be modelled as multidimensional mixtures. 2 We are in particular interested in constructing optimal procedures for the estimation of θ. Optimal may be understood as efficient, in Le Cam’s theory point of view which is about asymptotic distribution and asymptotic (quadratic) loss. See [24], [8], [33], [34]. The first question is: is the parametric rate attainable in the semiparametric setting? We know here, for instance using spectral estimates, that the parametric rate is indeed attainable. Then, the loss due to the nuisance parameter may be seen in the efficient Fisher information and efficient estimators are asymptotically equivalent to the empirical process on efficient influence functions. The next question is thus: how can we construct asymptotically efficient estimators? In the parametric setting, maximum likelihood estimators (MLEs) do the job, but the semiparametric situation is more difficult, because one has to deal with the unknown nuisance parameter, see the theorems in chapter 24 of [33] where it is necessary to control various bias/approximation terms. From a Bayesian perspective, the issue is the validity of the Bernstein-Von Mises property of the marginal posterior distribution of the parameter of interet θ. In other words: is the marginal posterior distribution of θ asymptotically Gaussian? Is it asymptotically centered around an efficient estimator? Is the asymptotic variance of the posterior distribution the inverse of the efficient Fisher information matrix? Semiparametric BernsteinVon Mises theorems have been the subject of recent research, see [31], [12], [29], [15], [14], [9], [17] and [29]. The results of our paper are twofold: first we obtain asymptotically efficient semiparametric estimators using a likelihood strategy, then we propose a data driven method to perform the strategy in a finite horizon with an oracle inequality as theoretical guarantee. Let us describe our ideas. For the multidimensional mixture model we consider, we will take advantage of the fact that, we can construct a parametric mixture model based on an approximation of the emission densities by piecewise constant functions - i.e histograms - which acts as a correct model for a coarsened version of the observations (the observations are replaced by the number of points in each grid of the histograms). So that as far as the parameter of interest is concerned, namely the weights of the mixture, this approximate model is in fact well specified, in particular the Kullback-Leibler divergence between the true distribution and the approximate model is minimized at the true value of the parameter of interest, see Section 2.1 for more details. For each of these finite dimensional models, the parameter of interest, i.e. the weights of the mixture, may then be efficiently estimated within the finite dimensional model. Then, under weak assumptions, and using the fact that one can approximate any density on [0, 1] by such histograms based on partitions with radius (i.e. the size of the largest bin) going to zero, it is possible to prove that asymptotically efficient semiparametric estimators may be built using the sequence of MLEs in a growing (with sample size) sequence of approximation models. In the same way, using Bayesian posteriors in the growing sequence of approximation models, one gets a Bernstein-Von Mises result. One of the important implications of the Bernstein-von Mises property is that credible regions, such as highest posterior density 3 regions or credible ellipsoids are also confidence regions. In the particular case of the semiparametric mixtures, this is of great interest, since the construction of a confidence region is not necessarily trivial. This is our first main result which is stated in Theorem 1: by considering partitions refined slowly enough when the number of observations increases, we can derive efficient estimation procedures for the parameter of interest θ and in the Bayesian approach for a marginal posterior distribution on θ which satisfies the renowned Bernstein-von Mises property. We still need however in practice to choose a good partition, for a finite sample size. This can be viewed as a model selection problem. There is now a huge literature on model selection, both in the frequentist and in the Bayesian literature. Roughly speaking the methods can be split into two categories: penalized likelihood types of approaches, which include in particular AIC (Akaike’s Information Criterion), BIC (Bayesian Information Criterion), MDL (Minimum Description Length) and marginal likelihood (Bayesian) criteria or approaches which consist in estimating the risk of the estimator in each model using for instance bootstrap or cross-validation methods. In all these cases theory and practice are nowadays well grounded, see for instance [22], [30], [6], [26], [7], [5], [16], [3]. Most of the existing results above cover parametric or nonparametric models. Penalized likelihoods in particular target models which are best in terms of Kullback-Leibler divergences typically and therefore aim at estimating the whole nonparametric parameter. Risk estimation via bootstrap or cross-validation methods are more naturally defined in semiparametric (or more generally set-ups with nuisance parameters) models, however the theory remains quite limited in cases where the estimation strategy is strongly non linear as encountered here. The idea is to estimate the risk of the estimator in each approximation model, and then select the model with the smallest estimated risk. We propose to use a cross-validation method similar to the one proposed in [13]. To get theoretical results on such a strategy, the usual basic tool is to write the cross-validation criterion as a function of the empirical distribution which is not possible in our semiparametric setting. We thus divide the sample in non overlapping blocks of size an (n being the the sample size) to define the cross validation criterion. This enables us to prove our second main result: Theorem 2 which states an oracle inequality on the quadratic risk associated with a sample of size an observations, and which also leads to a criterion to select an . Simulations indicate moreover that the approach behaves well in practice. In Section 2, we first describe the model, set the notations and our basic assumptions. We recall the semiparametric tools in Section 2.2, where we define the score functions and the efficient Fisher information matrices. Using the fact that spectral estimators are smooth functions of the empirical distribution of the observations, we obtain that, for large enough approximation model, the efficient Fisher information matrix is full rank, see Proposition 1. Intuition says that with better approximation spaces, more is known about all parameters of the distribution, in particular about θ. We prove in Proposition 2 that indeed, when the partition is refined, the Fisher information associated to this partition increases. This leads to our main general result presented in Theorem 1, Section 2.3: it is possible to let the approximation parametric models grow with the sample size 4 so that the sequence of maximum likelihood estimators are asymptotically efficient in the semiparametric model and so that a semiparametric Bernstein-von Mises Theorem holds. To prove this result we prove in particular, in Lemma 1, that semiparametric score functions and semiparametric efficient Fisher information matrix are the limits of the parametric ones obtained in the approximation parametric models, which has interest in itself, given the non explicit nature of semi-parametric efficient score functions and information matrices in such models. This implies in particular that the semiparametric efficient Fisher information matrix is full rank follows. In Section 3, we propose a model selection approach to select the number of bins. We first discuss in Section 3.1 the reasons to perform model selection and the fact that choosing a too large approximation space does not work, see Proposition 3 and Corollary 1. Then we propose in Section 3.2 our cross-validation criterion, for which we prove an oracle inequality in Theorem 2 and Proposition 4. Results of simulations are described in Section 4, where we investigate several choices of the number and length of blocks for performing cross validation, and investigate practically also V-fold strategies. In Section 5 we present possible extensions, open questions and further work. Finally Section 6 is dedicated to proofs of intermediate propositions and lemmas. 2 2.1 Asymptotic efficiency Model and notations Let (Xn )n≥1 be a sequence of independent and identically distributed random variables taking values in the product of at least three compact subsets of Euclidean spaces which, for the sake of simplicity, we will set as [0, 1]3 . We assume that the possible marginal distribution of an observation Xn , n ≥ 1, is a population mixture of k distributions such that, given the population, the coordinates are independent and have some density with respect to the Lebesgue measure on [0, 1]. The possible densities of Xn , n ≥ 1, are, if x = (x1 , x2 , x3 ) ∈ [0, 1]3 : gθ,f (x) = k X j=1 θj 3 Y fj,c (xc ), c=1 k X θj = 1, θj ≥ 0, ∀j (1) j=1 Here, k is the number of populations, θj is the probability to belong to population j for j ≤ k and we set θ = (θ1 , . . . , θk−1 ). For each j = 1, . . . , k, fj,c , c = 1, 2, 3, is the density of the c-th coordinate of the observation, given that the observation comes from population j, and we set f = ((fj,c )1≤c≤3 )1≤j≤k . We denote by P? the true (unknown) distribution of ? ∈ Θ the sequence (Xn )n≥1 , such that P? = Pθ⊗N ? ,f ? , dPθ ? ,f ? (x) = gθ ? ,f ? (x)dx, for some θ and f ? ∈ F 3k , where Θ is the set of possible parameters θ and F the set of probability densities on [0, 1]. We approximate the densities by step functions on some partitions of [0, 1]. We assume that we have a collection of partitions IM , M ∈ M, M ⊂ N, so that for each M ∈ M, 5 IM = (Im )1≤m≤M is a partition of [0, 1] by Borel sets. Then Im changes when M changes. For each M ∈ M, we now consider the model of possible densities ! k 3 M X Y X ωj,c,m gθ,ω;M (x) = θj 1lI (xc ) . (2) |Im | m j=1 c=1 m=1 Here, |I| is the Lebesgue measure of the set I, ω = (ωj,c,m )1≤m≤M −1,1≤c≤3,1≤j≤k , and for P −1 each j = 1, . . . , k, each c = 1, 2, 3, each m = 1, . . . , M − 1, ωj,c,m ≥ 0, M m=1 ωj,c,m ≤ 1, PM −1 and we denote ωj,c,M = 1 − m=1 ωj,c,m . We denote ΩM the set of possible parameters ω when using model (2) with the partition IM . For any partition IM , any ω = (ωm )1≤m≤M −1 such that ωm ≥ 0, m = 1, . . . , M , with P −1 ωm = 1 − M m=1 ωm , denote fω the step function given by M X ωm fω (x) = 1lI (x), |Im | m Z ωm = 1 fω (u)1lIm (u)du. (3) 0 m=1 When ω ∈ ΩM , let fω = ((fωj,c )1≤c≤3 )1≤j≤k . Possible extensions of our results to model (1) with non compact support, or with more than three coordinates, or with multivariate coordinates, and to model (2) with different sequences of partitions for each coordinate are discussed in Section 5. An interesting feature of step function approximation is that the Kullback-Leibler divergence KL((θ? , f ? ), (θ, fω )) between the distribution with density g(θ? ,f ? ) and that with density g(θ,ω;M ) , when (θ, ω) ∈ Θ × ΩM , is minimised at Z 1  ? ? ? θ = θ , ω = ω M := fj,c (u)1lIm (u)du . 0 1≤m≤M −1,1≤c≤3,1≤j≤k Indeed  gθ? ,f ? (X) KL((θ , f ), (θ, fω )) := E log gθ,ω;M (X)       gθ? ,f ? (X) gθ? ,ω? ;M (X) ? ? = E log + E log gθ? ,ω? ;M (X) gθ,ω;M (X)  X Y   3 gθ? ,ω? ;M (X) ? ? ? ? ? = KL((θ , f ), (θ , fω )) + E 1lXc ∈Imc log gθ,ω;M (X) ? ? ?  = KL((θ? , f ? ), (θ? , fω? )) +  1≤m1 ≤M c=1 1≤m2 ≤M 1≤m3 ≤M KL((θ? , fω? ), (θ, fω )). This particularity can also be obtained considering Yi := ((1lIm (Xi,c ))1≤m≤M )1≤c≤3 when the Xi ’s have probability density (1). Indeed, the density of the observations Yi is exactly the probability density (2) with θ = θ? , ω = ω ?M 6 This cornerstone property is specific to the chosen approximation, i.e. the step function approximation. Let `n (θ, ω; M ) be the log-likelihood using model (2), that is `n (θ, ω; M ) = n X log gθ,ω;M (Xi ). i=1 b M ) the maximum likelihood estimator (shortened as We denote, for each M ∈ M, (θbM , ω MLE), that is a maximizer of `n (θ, ω; M ) over Θ × ΩM . Let ΠM denote a prior distribution on the parameter space Θ × ΩM . The posterior distribution ΠM (·|X1 , . . . , Xn ) is defined as follows. For any Borel subset A of Θ × ΩM , R Qn i=1 gθ,ω;M (Xi )dΠM (θ, ω) A R Qn ΠM (A|X1 , . . . , Xn ) = . i=1 gθ,ω;M (Xi )dΠM (θ, ω) Θ×ΩM The first requirement to get consistency of estimators or posterior distributions is the identifiability of the model. We use the following assumption. Assumption (A1). • For all j = 1, . . . , k, θj? > 0. ? is continuous and almost surely positive and • For all c = 1, 2, 3, for all j = 1, . . . , k, fj,c ∀j1 , j2 ≤ k, 0 < inf x fj?1 ,c (x) fj?1 ,c (x) ≤ sup < +∞ ? fj?2 ,c (x) x fj2 ,c (x) (4) ? dx, . . . , f ? dx are linearly independent. • For all c = 1, 2, 3, the measures f1,c k,c Note that the two first points in Assumption (A1) imply that for all M , (θ? , ω ?M ) lies in the interior of Θ × ΩM . It is proved in Theorem 8 of [1] that under (A1) identifiability holds up to label switching, that is, if Tk is the set of permutations of {1, . . . , k}, ∀θ ∈ Θ, ∀f ∈ F 3k , gθ,f = gθ? ,f ? =⇒ ∃σ ∈ Tk such that σ θ = θ? , σ f = f ? , where σ θ ∈ Θ (resp. σ f ∈ F 3k , σ θj = θσ(j) , σ f j,c = fσ(j),c , c ∈ {1, 2, 3}, j ∈ {1, , . . . , k}) denotes the image of θ after permuting the labels using σ. This also implies the identifiability of model (2) if the partition is refined enough. We also need the following ? ? Lebesgue almost everywhere, assumption to ensure that all functions fj,c;M tend to fj,c ? ? where fj,c;M is the function defined in (3) with ω = (ωj,c,m )m . Assumption (A2). • For all M , the sets Im in IM are intervals with non empty interior. • As M tends to infinity, max1≤m≤M |Im | tends to 0. 7 Then, if (A1) and (A2) hold, for M large enough, we have that for all c = 1, 2, 3, the ? ? measures f1,c;M dx, . . . , fk,c;M dx are linearly independent. We give a formal proof of this fact in Section 6.1. Thus, using again the identifiability result in [1], under (A1) and (A2), for M large enough, ∀θ ∈ Θ, ∀ω ∈ ΩM , gθ,ω;M = gθ? ,ω?M ;M =⇒ ∃σ ∈ Tk such that σ θ = θ? , σ ω = ω ?M , where σ ω ∈ ΩM and σ ω j,c,m = ωσ(j),c,m , for all m ∈ {1, . . . , M }, c ∈ {1, 2, 3}, j ∈ {1, . . . , k}. 2.2 Efficient influence functions and efficient Fisher informations We now study the estimation of θ in model (1) and in model (2) from the semiparametric point of view, following Le Cam’s theory. We start with model (2) which is easier to analyze since it is a parametric model. For any M , gθ,ω;M (x) is a polynomial function of the parameter (θ, ω) and the model is differentiable in quadratic mean in the interior of ? = (S ? , S ? Θ × ΩM . Denote by SM ω,M ) the score function for parameter (θ, ω) at point θ,M (θ? , ω ?M ) in model (2). We have for j = 1, . . . , k − 1 Q3 ? Sθ,M j  = c=1 fωj,c;M ? − Q3 c=1 fωk,c;M gθ? ,ω?M ;M ? , and for j = 1, . . . , k, c = 1, 2, 3, m = 1, . . . , M − 1   1lIM (xc ) Q 1lIm (xc ) ? ? θj  c0 6=c fωj,c0 ;M |Im | − |IM | ? Sω,M = . j,c,m gθ? ,ω?M ;M (5) (6) ? (X): Denote by JM the Fisher information, that is the variance of SM  ?  ? JM = E? SM (X)SM (X)T ? (X)T is the transpose vector of S ? (X). Here, E? denotes expectation under P? , and SM M When considering the question of efficient estimation of θ in the presence of a nuisance parameter, the relevant mathematical objects are the efficient influence function and the efficient Fisher information. Recall that the efficient score function is the projection of the score function with respect to parameter θ on the orthogonal subspace of the closure of the linear subspace spanned by the tangent set with respect to the nuisance parameter (that is the set of scores in parametric models regarding the nuisance parameter), see [33] or [34] for details. The efficient Fisher information is the variance matrix of the efficient score function. For parametric models, a direct computation gives the result. If we partition the Fisher information JM according to the parameters θ and ω, that is  ?   ?  ? ? [JM ]θ,θ = E? Sθ,M (X)Sθ,M (X)T , [JM ]ω,ω = E? Sω,M (X)Sω,M (X)T , 8  ?  ? [JM ]θ,ω = E? Sθ,M (X)Sω,M (X)T , [JM ]ω,θ = [JM ]Tθ,ω , we get that, in model (2), if we denote ψ̃M the efficient score function for the estimation of θ, ? ? − [JM ]θ,ω ([JM ]ω,ω )−1 Sω,M , ψ̃M = Sθ,M and the efficient Fisher information J˜M is the (k − 1) × (k − 1)-matrix given by J˜M = [JM ]θ,θ − [JM ]θ,ω ([JM ]ω,ω )−1 [JM ]Tθ,ω . To discuss efficiency of estimators, invertibility of the efficient Fisher information is needed. Spectral methods have been proposed recently to get estimators in model (2), see [2]. It is possible to obtain upper bounds of their local maximum quadratic risk with rate n−1/2 , which as a consequence excludes the possibility that the efficient Fisher information be singular. This is stated in Proposition 1 below and proved in Section 6.1. Proposition 1. Assume (A1) and (A2). Then, for large enough M , J˜M is non singular. In the context of mixture models, all asymptotic results are given up to label switching. We define here formally what we mean by ‘up to label switching’ for frequentist efficiency results with Equation (8) and Bayesian efficiency results with Equation (10). By Proposition 1, if (A1) and (A2) hold, for large enough M , J˜M is non singular, and an estimator θb is asymptotically a regular efficient estimator of θ? if and only if n  J˜−1 X √  ? M b n θ−θ = √ ψ̃M (Xi ) + oP? (1), n up to label switching, (7) i=1 which formally means that there exists a sequence (σn )n belonging to Tk such that n  J˜−1 X √ σ n n θb − θ? = √M ψ̃M (Xi ) + oP? (1). n (8) i=1 To get an asymptotically regular efficient estimator, one may for instance use the MLE θbM (see the beginning of the proof of Theorem 1). One may also apply a one step improvement (see Section 5.7 in [33]) of a preliminary spectral estimator, such as the one described in [2]. In the Bayesian context, Bernstein-von Mises Theorem holds for large enough M if the prior has a positive density in the neighborhood of (θ? , ω ?M ), see Theorem 10.1 in [33]. That is, if k · kT V denotes the total variation distance, with ΠM,θ the marginal distribution on the parameter θ, ! ˜−1 J b M ΠM,θ (·|X1 , . . . , Xn ) − N θ; = oP? (1), up to label switching, (9) n TV where θb verifies Equation (7), which formally means that sup ΠM,θ ∃σ ∈ Tk : σ  θ ∈ A X1 , . . . , Xn − N A⊂Θ 9 σn ˜−1 b JM θ; n ! (A) = oP? (1), (10) where (σn ) and θb satisfy Equation (8). A naive heuristic idea is that, when using the Yi ’s as summaries of the Xi ’s, one has less information, but more and more if the partition IM is refined. Thus, the efficient Fisher information should grow when partitions IM are refined. The following proposition is proved in Section 6.2. Proposition 2. Let IM1 be a coarser partition than IM2 , that is such that for any I ∈ IM1 , there exists A ⊂ IM2 such that I = ∪I 0 ∈A I 0 . Then J˜M2 ≥ J˜M1 in which“ ≥” denotes the partial order between symmetric matrices. Thus, it is of interest to let the partitions grow so that one reaches the largest efficient Fisher information. Let us now come back to model (1). Let, j = 1, . . . , k, c = 1, 2, 3, Hj,c be the subset R for 2 ? ? of functions h in L (fj,c dx) such that hfj,c dx = 0. Then the tangent set for f at point (θ? , f ? ) is the subspace Ṗ of L2 (gθ? ,f ? (x)dx) spanned by the functions x 7→ h(xc ) Q3 ? c0 =1 fj,c0 (xc0 ) gθ? ,f ? (x) , h ∈ Hj,c , j = 1, . . . , k, c = 1, 2, 3. ? dx) Notice that for each j = 1, . . . , k and c = 1, 2, 3, Hj,c is a closed linear subset of L2 (fj,c and that Ṗ is a closed linear subset of L2 (gθ? ,f ? (x)dx). The efficient score function ψ̃ for the estimation of θ in the semiparametric model (1) is given, for j = 1, . . . , k − 1, by Q3 ψ̃j = (Sθ? )j − A (Sθ? )j , (Sθ? )j = ? c=1 fj,c − Q3 gθ? ,f ? ? c=1 fk,c , (11) with A the orthogonal projection onto Ṗ in L2 (gθ? ,f ? (x)dx). Then, the efficient Fisher information J˜ is the variance matrix of ψ̃. If J˜ is non singular, an estimator θb is asymptotically a regular efficient estimator of θ? if and only if n  J˜−1 X √  ? b √ n θ−θ = ψ̃ (Xi ) + oP? (1), n up to label switching (12) i=1 and a Bayesian method using a nonparametric prior Π satisfies a semiparametric Bernsteinvon Mises theorem if, with Πθ the marginal distribution on the parameter θ, ! ˜−1 J b Πθ (·|X1 , . . . , Xn ) − N θ; = oP? (1), up to label switching (13) n TV for a θb satisfying (12). 10 2.3 General result When the size of the bins in the partition decreases, we expect that the efficient score functions in (2) are good approximations of the efficient score functions in (1) so that asymptotically efficient estimators in model (2) become efficient estimators in model (1). This is what Theorem 1 below states, under the following additional assumption : Assumption (A3). For all M large enough, IM is a coarser partition than IM +1 We first obtain: Lemma 1. Under Assumptions (A1), (A2) and (A3), the sequence of score functions (ψ̃M )M converges in L2 (gθ? ,f ? dx) to the score function ψ̃, and the sequence of efficient Fisher informations ˜ which is non singular. (J˜M )M converges to the efficient Fisher information matrix J, The invertibility of J˜ is a consequence of Proposition 1, Proposition 2, and the con˜ vergence of J˜M to J. We are now ready to state Theorem 1. Theorem 1. Under Assumptions (A1), (A2), and (A3), there exists a sequence Mn tending to infinity sufficiently slowly such that the MLE θbMn is asymptotically a regular efficient estimator of θ? and satisfies n  J˜−1 X √  n θbMn − θ? = √ ψ̃ (Xi ) + oP? (1), n up to label switching. (14) i=1 Moreover, under the same assumptions and if for all M , the prior ΠM has a positive and continuous density at (θ? , ω ?M ), then there exists a sequence Ln tending to infinity sufficiently slowly such that ! n J˜−1 X J˜−1 ? ΠLn ,θ (·|X1 , . . . , Xn ) − N θ + ψ̃ (Xi ) ; = oP? (1), n n i=1 TV up to label switching. (15) Note that, in Theorem 1, any sequence Mn0 ≤ Mn going to infinity also satisfies (14) and similarly (15) holds for any sequence L0n ≤ Ln going to infinity. Proof. As explained in Section 2.1, model (2) is the correct model associated with the observations made of the counts per bins and under Assumption (A1) it is a regular model in the neighborhood of the true parameter. Also, using the identifiability of the model and the trick given in [33] p. 63, we get consistency of the MLE. Thus, it is possible to apply Theorem 5.39 in [33] to get that for each M , the MLE θbM is regular and asymptotically efficient, that is n  J˜−1 X √ σn,M n θbM − θ? = √M ψ̃M (Xi ) + Rn (M ), n i=1 11 where for each M , σn,M is a sequence of permutations in Tk , and (Rn (M ))n≥1 is a sequence of random vectors converging to 0 in P? -probability as n tends to infinity. Therefore, there exists a sequence Mn tending to infinity sufficiently slowly so that, as n tends to infinity, Rn (Mn ) tends to 0 in P? -probability. Now, n −1 X J˜M √n ψ̃Mn (Xi ) = n i=1 n n J˜−1 − J˜−1 X J˜−1 X √ ψ̃ (Xi ) + Mn√ ψ̃ (Xi ) n n i=1 i=1 n −1 X J˜M n +√ (ψ̃Mn − ψ̃) (Xi ) n i=1 = n J˜−1 X √ ψ̃ (Xi ) + oP? (1) n i=1 P since, by Lemma 1, E? k √1n ni=1 (ψ̃Mn − ψ̃) (Xi ) k2 = kψ̃Mn − ψ̃k2L2 (g ? ? (x)dx) tends to 0 as θ ,f ˜ −1 as n tends to infinity, so that the first n tends to infinity and (J˜Mn )−1 converges to (J) part of the theorem is proved. On the Bayesian side, for all M , there exists a sequence Vn (M ) of random vectors converging to 0 in P? -probability as n tends to infinity such that ! ˜−1  J σ n,M sup ΠM,θ ∃σ ∈ Tk : σ θ ∈ A X1 , . . . , Xn − N θbM ; M (A) = Vn (M ). n A⊂Θ Arguing as previously, there exists a sequence Ln tending to infinity sufficiently slowly so that, as n tends to infinity, both Vn (Ln ) and Rn (Ln ) tend to 0 in P? -probability. Using the fact that the total variation distance is invariant through one-to-one transformations we get N σn,M J˜−1 θbM ; M n = N ! −N n J˜−1 X J˜−1 θ + ψ̃ (Xi ) ; n n ! ? i=1 TV n  J˜−1 X √ σn,M −1 n θbM − θ? − √ ψ̃ (Xi ) ; J˜M n !   − N 0; J˜−1 i=1 = N n  J˜−1 X σ n,M 1/2 √ J˜M [ n θbM − θ? − √ ψ̃ (Xi )]; Id n TV !  − N 0; J˜M J˜−1  i=1 ≤ N n σ  J˜−1 X n,M 1/2 √ J˜M [ n θbM − θ? − √ ψ̃ (Xi )]; Id n TV ! − N (0; Id) i=1 TV  + N (0, Id) − N 0; J˜M J˜−1  TV . But for vectors in m ∈ Rk−1 and symmetric positive (k − 1) × (k − 1) matrices Σ we have kN (m, Id) − N (0; Id)kT V ≤ kmk 12 and   kN (0, Id) − N (0; Σ)kT V ≤ P kΣ1/2 U k2 − kU k2 ≥ log[det(Σ)]   − P kU k2 − kΣ−1/2 U k2 ≥ log[det(Σ)] where U ∼ N (0, Id). Thus the last part of the theorem follows from the triangular inequality and the fact that using Lemma 1, as n tends to infinity, J˜Ln J˜−1 tends to Id, the identity matrix, and Vn (Ln ) and Rn (Ln ) tend to 0 in P? -probability. 3 Model selection In Theorem 1, we prove the existence of some increasing partition leading to efficiency. In this section, we propose a practical method to choose a partition when the number of observations n is fixed. In Section 3.1 we prove that one has to take care to choose not too large Mn ’s since sequences (Mn )n tending too quickly to infinity lead to inconsistent estimators. In Section 3.2, we propose a cross-validation method to estimate the oracle h i ? ? ? 2 b value M minimizing the unknown risk as a function of M : M 7→ E kθM − θ k (up n to label switching). 3.1 Behaviour of the MLE as M increases We first explain why the choice of the model is important. We have seen in Proposition 2 that for a sequence of increasing partitions, the efficient matrix is non decreasing. The question is then: can we take any sequence tending to infinity wih n? Or, for a fixed n, can we take any M arbitrarily large? As is illustrated in Figure 2, we see that if M is too large (or equivalently if Mn goes to infinity too fast) the MLE (or the Bayesian procedure) is biased. In Proposition 3, we give the limit of the MLE when the number n of observations is fixed but M tends to infinity. Proposition 3. Under Assumptions (A1) and (A2). For almost all observations X1 , . . . , Xn , θbM (X1 , . . . , Xn ) tends to θn = (bn/kc/n, . . . , bn/kc/n, dn/ke/n, . . . , dn/ke/n) | {z } | {z } k−r r:=n−kbn/kc up to label switching, when M tends to infinity. Proposition 3 is proved in Section 6.4. Using Proposition 3, we can deduce a constraint on sequences Mn leading to consistent estimation of θ? , depending on the considered sequence of partitions (IM )M ∈M , which may give an upper bound on sequences Mn leading to efficiency. We believe that this constraint is very conservative and leads to very conservative bounds. Corollary 1 below is proved in Section 6.5. 13 Corollary 1. Assume that (A1), (A2) and (A3) hold. If θbMn tends to θ? in probability and if θ? is different from (1/k, . . . , 1/k), then there exists N > 0 and a constant C > 0 such that for all n ≥ N,   2 n2 max |Im | m≤Mn Mn ≥ C. In particular, if there exists 0 < C1 ≤ C2 such that for all n ∈ N and 1 ≤ m ≤ Mn , C2 C1 ≤ |Im | ≤ Mn Mn (16) then there exists a constant C > 0 such that, Mn ≤ Cn2 . Note that Assumption (16) holds as soon as the partition is regular, and in particular for the dyadic regular partitions which forms an embedded sequence of partitions where M = {2p , p ∈ N? } and for all M ∈ M Im = [(m − 1)/M, m/M ) for all m < M , IM = [(M − 1)/M, 1]. 3.2 Criterion for model selection In this section, we propose a criterion to choose the partition when n is fixed. This criterion can be used to choose the size M of a family of partitions but also to choose between two families of partition. For each dataset, we can compute the MLE or the posterior mean or other Bayesian estimators under model (2) with partition I. We thus shall index all our estimators by I. Note that the results of this section are valid for any family of estimators (θ̃I ) and not only for the MLE (θbI ). But we illustrate our results using the MLE. Proposition 3 and Corollary 1 show the necessity to choose an appropriate partition among a collection of partitions IM , M ∈ M. To choose the partition we need a criterion. Since the aim is to get efficient estimators, we choose the quadratic risk as the criterion to minimize. We thus want to minimize over all possible partitions h i (17) Rn (I) = E? kθ̃I (X1:n ) − θ? k2Tk , where X1:n = (Xi )i≤n and for all θ, θ̃ ∈ Θ, kθ − θ̃kTk = min kσ θ − θ̃k2 . σ∈Tk (18) As usual, this criterion cannot be computed in practice (since we do not know θ? ) and we need for each partition I some estimator C(I) of Rn (I). We want to emphasize here that the choice of the criterion for this problem is not easy. Indeed, the quadratic risk Rn (I) cannot be written as the of an excess loss ex- ii h expectation h pressed thanks to a contrast function, i.e. in the form E? E? γ(θ̃(X1:n ), X) − γ(θ? , X)|X1:n , 14 where γ : Θ × X → [0, +∞). Yet, the latter is the framework of most theoretical results in model selection, see [5] or [26] for instance. Moreover decomposing the quadratic risk as an approximation error plus an estimation error as explained in [5]: Rn (I) = inf kθ − θ? k2Tk + Rn (I) − inf kθ − θ? k2Tk , θ∈ΘI θ∈ΘI | {z } | {z } approximation error where ΘI = Θ, estimation error we see that the approximation error is always zero in our model (and not decreasing as often when the complexity of the models increases). Hence h i h i Rn (IM ) = V ar? θ̃IM (X1:n ) + E? θ̃IM (X1:n ) − θ? | {z } | {z variance bias 2 Tk (19) } where V ar? (.) is to be understood as the trace of the variance matrix. Here the bias is only an estimation bias and not a model mispecification bias. In the case of the MLE, using Theorem 1, for all fixed M (large enough), the regularity of the mixture of these multivariate distributions implies that the bias is O(1/n) and the variance converges to the inverse Fisher information matrix so that h  i  −1 + O(1/n) Rn (IM ) = V ar? θbIM (X1:n ) + O(1/n) = tr J˜M −1 and if M ≥ M so that kJ˜M − J˜−1 k ≤  we obtain that for n large enough      tr J˜−1 − 2 ≤ Rn (IM ) ≤ tr J˜−1 + 2. Minimizing Rn (IM ) therefore corresponds to choosing M such that J˜M is close enough to J˜ (i.e. M large enough) while not deteriorating too much the approximation of Rn (IM ) −1 ) (i.e. M not too large). by tr(J˜M Because the approximation error is always zero we cannot apply the usual methods and we use instead a variant of the cross-validation technique. Consider a partition of {1, · · · , n} in the form (Bb , B−b , b ≤ bn ), in other words the partition is made of 2 × bn subsets of {1, · · · , n}. By definition Bb1 ∩ B−b2 = ∅ for all b1 , b2 ≤ bn . Because an arbitrary estimator, e.g. the MLE, based on any finite sample size is not unbiased, the following naive estimator of the risk is not appropriate: bn 1 X CCV 1 (I) = kθ̃I (XBb ) − θ̃I (XB−b )k2Tk . 2bn b=1 This can be seen by decomposing the risk Rn (I) as in Equation (19) and by computing the expectation of CCV 1 (I) in the case where the sizes of Bb , B−b , b ≤ bn , are all equal, i h E? [CCV 1 (I)] = V ar? θ̃I (XBb ) . 15 Then, the criterion CCV 1 (I) do not capture the bias of the estimator θ̃I . In the case of the MLE, using Proposition 3, CCV 1 (I) is tending to 0 when maxm |Im | tends to 0. So that minimizing this criterion leads to choosing a partition Ibn ∈ arg minI CCV 1 (I) which has a large number of sets and so θbIbn (X1:n ) may be close to (1/k, . . . , 1/k) and then h i may not even be consistent. As an illustration, see Figure 2 where Rn (I), V ar? θbI (X1:n ) h i 2 and E? θbI (X1:n ) − θ? are plotted as a function of M , for three simulation sets and Tk various values of the sample size n, see Section 4 for more details. It is quite clear from these plots that the variances remain either almost constant with M or tend to decrease, while the bias increases with M and becomes dominant as M becomes larger. As a result Rn (I) tends to first decrease and then increase as M increases. To address the bad behaviour of CCV 1 (I), we use an idea of [13]. Choose a fixed base partition I0 with a small number of bins (although large enough to allow for identifiability). Then compute CCV (I) = bn 1 X kθ̃I (XBb ) − θ̃I0 (XB−b )k2Tk . bn b=1 Ideally we would like to use a perfectly unbiased estimator θ̃ in the place of θ̃I0 (XB−b ), see Assumption (A5.2) used in Theorem 2 and Proposition 4. We discuss the choice of θ̃I0 (XB−b ) at the end of the section. Figure 3 gives an idea of the behaviour of CCV (·) and CCV 1 (·) using the MLE. It shows in particular that in our simulation study CCV (·) follows the same behaviour as Rn (·), contrarywise to CCV 1 (·). More details are given in Section 4. We now provide some theoretical results on the behaviour of the minimizer of CCV (·) over a finite family of candidate partitions Mn compared to the minimizer of Ran (·) over the same family. Let mn = #Mn be the number of candidate partitions. We consider the following set of assumptions: Assumption (A5). (A5.1) Bb , B−b , b ≤ bn are disjoint sets of equal size #Bb = #B−b = an , for all b ≤ bn (A5.2) θ̃I0 (XB−b ) is not biased i.e. E? [θ̃I0 (XB−b )] = θ? . We obtain the following oracle inequality. Theorem 2. Suppose Assumption (A5). For any sequences 0 < n , δn < 1, with probability greater than  2 ! 1 − 2mn exp −2bn n inf Ran (I) + δn , I∈Mn we have 1 + n 2δn Ran (Ibn ) ≤ inf Ran (I) + , 1 − n I∈Mn 1 − n 16 (20) where Ibn ∈ arg minI∈Mn CCV (I). As a consequence of Theorem 2, the following Proposition holds. Recall that n = 2bn an . Proposition 4. Assume (A5). If bn & n2/3 log2 (n), an . n1/3 /(log2 (n)), and mn ≤ Cα nα , for some Cα > 0 and α ≥ 0, then i h E? an Ran (Ibn ) ≤ inf an Ran (I) + o(1), I∈Mn where Ibn ∈ arg minI∈Mn CCV (I). Note that for each I, Ran (I) is of order of magnitude 1/an so that the main term in the upper bound of Proposition 4 is inf I∈Mn an Ran (I). Note also that this is an exact oracle inequality (with constant 1). In Theorem 2 and Proposition 4, Ibn is built on n observations while the risk is associated with an < n observations. This leads to a conservative choice of Ibn , i.e. we may choose a sequence Ibn (optimal with an observations) increasing more slowly than the optimal one (with n observation). We think however that this conservative choice should not change the good behaviour of θbIbn , since Theorem 1 implies that any sequence of partitions which grows slowly enough to infinity leads to an efficient estimator. Hence, once the sequence Mn growing to infinity is chosen, then any other sequence growing to infinity more slowly also leads to an efficient estimator. In Proposition 4 and Theorem 2, the reference point estimate θ̃I0 (XB−b ) is assumed to be unbiased. This is a strong assumption, which is not exactly satisfied in our simulation study. To consider a reasonable approximation of it, θ̃I0 (XB−b ) is chosen as the MLE associated with a partition with a small number of bins. Recall that the maximum likelihood estimator is asymptotically unbiased and for a fixed M , the bias of the MLE for the whole parameter θ, ω is of order 1/n. The heuristic is that a small number of bins implies a smaller number of parameters to estimate, so that the asymptotic regime is attained faster. Our simulations confirm this heuristic, see Section 4. To take a small number of bins but large enough to get identifiability, we observe in Section 4.2 a great heterogeneity among different estimators and also that some estimators have null components or cannot be computed, when the number of bins is too small. 4 4.1 Simulation study On the estimation of the risk and the selection of M In this section, we illustrate the results obtained in Sections 3.1 and 3.2 with simulations. We compare six criteria for the model selection based on CCV with different choices of size of training and testing sets. We choose the regular embedded dyadic partitions, i.e. when M = {2p , p ∈ N∗ } and for all M ∈ M, Im = [(m − 1)/M, m/M ) for all 17 m < M , IM = [(M − 1)/M, 1]. Following Corollary 1, when n is fixed, we only consider M = 2P ≤ Mn = n3 (i.e. P ≤ Pn := b3/2 log(n)c). In this part, we only consider MLE estimators with ordered components and approximated thanks to the EM algorithm. For n fixed, the choice of the model, through P , is done using the criterion CCV based on two types of choice for (Bb ), (B−b ). First, we use the framework under which we were able to prove something, i.e. Assumption (A5.1) where all the training and testing sets are disjoints. In this context we use different sizes an and bn : • bn = dn2/3 log(n)/(20)e and an = bn/(2bn )c (Assumption of Proposition 4, up to D,1 D,1 log(n)), leading to the criterion CCV and the choice of P noted PbnD,1 ∈ arg minP ≤Pn CCV (I2P ), D,2 • bn = dn1/3 e, an = bn/(2bn )c, leading to the criterion CCV and the choice of P noted D,2 D,2 Pbn ∈ arg minP ≤P C (I2P ), n CV D,3 • an = bn/10c, bn = bn/(2an )c, leading to the criterion CCV and the choice of P noted D,3 D,3 b Pn ∈ arg minP ≤Pn CCV (I2P ) We also consider the famous V-fold, where the dataset is cut into bn disjoint sets B̃b of size an , leading to training sets Bb = B̃b and testing sets B−b = {1, . . . n} \ B̃b . We also use different sizes an and bn : V,1 and the choice of P noted • an = bn1/3 c, bn = bn/an c, leading to the criterion CCV V,1 V,1 b Pn ∈ arg minP ≤Pn CCV (I2P ), V,2 and the choice of P noted • an = bn2/3 /2c, bn = bn/an c, leading to the criterion CCV V,2 V,2 b Pn ∈ arg minP ≤Pn CCV (I2P ), V,3 and the choice of P noted • an = bn/10c, bn = bn/an c, leading to the criterion CCV V,3 V,3 b Pn ∈ arg minP ≤Pn CCV (I2P ) . Note that for criteria j,1 , j ∈ {D, V }, an is proportional to n1/3 up to a logarithm term, • CCV j,2 , j ∈ {D, V }, an is proportional to n2/3 , • CCV j,3 , j ∈ {D, V }, an is proportional to n. • CCV We now explain how we choose I0 . As explained earlier M0 has to be taken small, but not too small since otherwise the model would not be identifiable. We propose to choose the smallest M0 = 2P0 such that M0 ≥ k + 2 (equivalently P0 ≥ log(k + 2)/ log(2)). This lower bound ensures that generically on I0 the model (2) is identifiable. We consider three different simulation settings. In each one of them we consider the conditionally repeated sampling model, i.e. fj,1 = fj,2 = fj,3 , both for the true distribution and for the model. In the three cases, k = 2 and the other parameters are given in Table 1. So that, we work with P0 = 2 and M0 = 22 = 4. The different emission distributions are represented in Figure 1. 18 Simu. k θ? ? dx = f ? dx = f ? dx f1,1 1,2 1,3 ? dx = f ? dx = f ? dx f2,1 2,2 2,3 1 2 3 2 2 2 (0.3, 0.7) (0.2, 0.8) (0.3, 0.7) N (4/5, 0.072 ) truncated to [0, 1] U((0, 1)) β(1, 2) N (1/3, 0.12 ) truncated to [0, 1] N (2/3, 0.052 ) truncated to [0, 1] β(5, 3) Table 1: Values of the true parameters for simulation 1 to 3 (a) Simulation 1 (b) Simulation 2 (c) Simulation 3 Figure 1: Representation of the true emission distributions for simulations 1, 2 and 3. h i In Figure 2 we display the evolution of the risk Rn (I2P ), the variance V ar? θb2P (X1:n ) h i 2 and the squared bias E? θb2P (X1:n ) − θ? defined in Equation (19) as the number of Tk bins 2P increases, for different values of n and for each of the three true distributions. The risks, bias and variances are estimated by Monte Carlo, based on 1000 repeated samples and for each of them we compute the MLE using the EM algorithm. We notice that typically the bias first is either constant or slightly decreasing as P increases and then increases rapidly for larger values of P until it stabilizes to the value kθn − θ? kTk , which is what was proved in Proposition 3. On the other hand the variance is monotone non increasing as P increases until P becomes quite large and then it decreases to zero (which also is a consequence of Proposition 3) when P gets large. As a result the risk, which is the sum of the squared bias and the variance, is typically constant or decreasing for small increasing values of P and then increasing to kθn − θ? k2Tk when P gets large. In real situations Rn (I2P ) is unknown, we now illustrate the behaviour of the different 19 (a) Simulation 1, n = 100 (b) Simulation 3, n = 50 (c) Simulation 2, n = 50 (d) Simulation 3, n = 100 (e) Simulation 2, n = 500 (f) Simulation 3, n = 500 Figure 2: Patterns of the risk (with black squares), the squared bias (with blue dots) and variance (with magenta triangles) with respect to P = log(M )/ log(2) for simulations 1, 2 and 3 and different values of n. criteria CCV and CCV 1 and see how close to Rn (I2P ) they are. For the sake of conciseness we only display results for simulated data 1 and 2 and for n = 100, 500 since they are very typical of all other simulation studies we have conducted. The results are presented in Figure 3, where the criteria CCV , CCV 1 are computed based on a single data X1:n . We see in figure 3 that contrarywise to CCV , the basic cross-validated criterion CCV 1 does not recover the behaviour of Rn (I2P ) correctly as it fails to estimate the bias. Note that we do not compare the values but the behaviour. Indeed, the criteria are used to choose the best P by taking the minimum of the criterion so that the values are not important by themselves. Besides, we know that the criterion CCV is biased by a constant depending 20 on I0 . As theoretically explained in Section 3 and as a consequence of Proposition 3, we can see that the criteria CCV 1 are tending to 0 when P increases while it is not the case for the criteria CCV . It is interesting to note that from Figure 3, the minimizer in P of CCV corresponds to values of the risk that are close to the minimum, we precise this impression with table 2. D,1 (a) Simulation 1, n = 100, CCV (1) V,3 (b) Simulation 1, n = 100, CCV (1) D,1 (c) Simulation 2, n = 500, CCV (1) V,3 (d) Simulation 2, n = 500, CCV (1) Figure 3: behaviour of CCV 1 vs CCV as a function of P j,c , j ∈ {D, V }, c ∈ {1, 2, 3}, by estimating Finally we compare the six criteria CCV the squared risk of the associated estimator θb Pbnj,c , presented in Table 2 across different 2 sample sizes n and the three simulation set-upsp(simulated data 1, 2 and p 3) described above. We can compare the six squared risk to minP ≤Pn Rn (2P ) and Rn (2P0 ). The different risks are estimated by Monte Carlo by repeating 100 times the estimation. The differences of performance between the different criteria arepnot obvious. Besides, the performances of all the criteria are satisfactory, compared to minP ≤Pn Rn (2P ). Yet, we V,1 suggest not to use criterion CCV because it is computationally more intensive than the D,1 others, particularly when n is large (because of large bn ). In our simulation study CCV V,2 and CCV seem to behave slightly better than the others. These results confirm that by using M0 small, the criterion behaves correctly. Moreover, the fact that the choice of Ibn corresponds to a risk associated with an < n observations does not seem to be a conservative choice even in a finite horizon (i.e. when n is fixed). We were expecting this behaviour asymptotically but not necessarily in a finite horizon. 21 Simulation n p P pminP ≤Pn Rn (2 ) P0 ) R (2 r nh i E? kθb PbnD,1 (X1:n ) − θ? k2 2 r h i E? kθb PbnD,2 (X1:n ) − θ? k2 r h 2 i E? kθb PbnD,3 (X1:n ) − θ? k2 r h 2 i E? kθb PbnV,1 (X1:n ) − θ? k2 r h 2 i E? kθb PbnV,2 (X1:n ) − θ? k2 r h 2 i E? kθb PbnV,3 (X1:n ) − θ? k2 2 1 50 0.062 0.063 1 100 0.043 0.046 1 500 0.020 0.021 1 1000 0.014 0.015 1 2000 0.010 0.010 2 50 0.058 0.067 2 100 0.046 0.046 2 500 0.020 0.022 3 50 0.096 0.10 3 100 0.078 0.082 3 500 0.036 0.042 0.069 0.047 0.019 0.014 0.011 0.075 0.056 0.019 0.12 0.087 0.037 0.073 0.046 0.022 0.015 0.010 0.065 0.056 0.025 0.10 0.087 0.046 0.086 0.047 0.021 0.014 0.010 0.087 0.056 0.026 0.11 0.087 0.041 0.091 0.046 0.021 0.013 0.009 0.104 0.055 0.022 0.11 0.087 0.053 0.069 0.046 0.019 0.013 0.010 0.070 0.049 0.022 0.12 0.084 0.036 0.103 0.046 0.019 0.014 0.009 0.10 0.049 0.022 0.14 0.083 0.035 Table 2: Comparison of the squared risk of estimators associated to different criteria 4.2 On the choice of M0 j,i To compute the different criteria CCV , j ∈ {D, V }, i ∈ {1, 2, 3}, we proposed to choose M0 as small as possible but for which the model is identifiable up to label switching. Given min1≤j≤k θj? > 0, the model associated to the parameter space is identifiable as soon as ? ) ? the k vectors (ω1,c,· M0 , . . . , (ωk,c,· )M0 in ∆M0 are linearly independent for all c ∈ {1, 2, 3}. Considering the dimension of linear spaces, we may choose M0 = k + 1 or k + 2. Then we should generically avoid issues with identifiability. We chose such a M0 in the previous simulations. We now study the impact of a choice of M0 that would be too small . ? (y) = f ? (y) = f ? (y) = 1 and f ? (y) = To do so we have simulated data from f2,1 2,2 2,3 1,1 ? ? f1,2 (y) = f1,3 (y) = 1 + cos(2π(y + )), for  = 0.25, 0.3, 0.4 and 0.5 and n = 500, 1000 and 2000. In this case the smallest possible value for M0 based on the regular grid on [0, 1] is M0 = 2 for  6= 0.5 whereas if  = 0.5 the model is non identifiable at M0 = 2 but becomes identifiable when M0 = 4. For each of these simulation data we have computed various estimators: MLEs based on the EM algorithm initiated at different values, the posterior mean and the MAP estimator computed from a Gibbs sample algorithm with a Dirichlet prior distribution on θ and independently a Dirichlet prior distribution on each ωj,1 , for 1 ≤ j ≤ k. We noticed that the EM algorithm with different initializations were very heterogeneous. Moreover, the MAP estimator, posterior mean and spectral estimators often had one of the θ̂j null or close to 0. Sometimes, the spectral estimator could not be computed. The explanation for such behaviour is that when the model is not identifiable, one θj? ? ) ? may be null or the vectors (ω1,c,· M0 , . . . ,(ωk,c,· )M0 may be linearly dependent for some c ∈ {1, 2, 3}. In this case, the likelihood will have multiple modes (apart from those arising because of label switching). Hence a way to check that M0 is not too small is to compute multiple initialisation of the EM algorithm if the MLE is estimated or to look for very small values of θ̂j in the case of Bayesian estimators (possibly also running multiple MCMC chains with different initial values). In practice we suggest that this analysis be conducted for a few number of values M0 and then to select the value that leads to the 22 most stable results. To illustrate this, we present a simulation study where the number of estimators is S = 14. The 10 first estimators were obtained using the EM algorithm with different random initializations, we also considered the spectral estimator proposed in [2] and an estimator obtained with the EM algorithm with the spectral estimator as initialization. The last two estimators were the MAP estimator and the posterior mean. We considered regular partitions with M0 = 2, 4 and 6 bins. To present the results in a concise way we have summarized them in Figure 4, using the indicator ID(M0 ) = P S √ S 1∀s≤S, j≤2, θ̂s M0 ,j >1/  s=1 s minj=1,2 θ̂M − 0 ,j 1 S n PS t t=1 minj=1,2 θ̂M0 ,j 2 with k = 2 and θ? = (0.7, 0.3). Thus when ID(M0 ) = 0, there is a suspicion that the associated model is not identifiable and another partition should be chosen. It appears that for all n, when  = 0.5 M0 = 2 always appears as having a pathological behaviour and for the other values of  this value is accepted for large values of n. M0 = 2 M0 = 4 M0 = 6  = 0.25 0 24 24  = 0.3 0 0 10  = 0.4 0 58 0  = 0.5 0 0 28  = 0.4 0 25 16  = 0.5 0 63 10  = 0.4 0 38 14  = 0.5 0 47 19 (a) n = 500 M0 = 2 M0 = 4 M0 = 6  = 0.25 0 26 0  = 0.3 0 28 26 (b) n = 1000 M0 = 2 M0 = 4 M0 = 6  = 0.25 113 31 18  = 0.3 116 38 40 (c) n = 2000 Figure 4: The identifiability criterion ID(M0 ) for different M0 , n and . 5 Conclusion and discussion To sum up our results, we propose semiparametric estimators of the mixing weights in a mixture with a finite number of components and unspecified emission distributions. These estimators are constructed using an approximate model for the mixture where the emission densities are modelled as piecewise constant functions on fixed partitions of the 23 sampling space. This approximate model is thus parametric and regular and more importantly well specified as far as the weight parameters θare concerned. From Theorem   √ b −1 ? ? −θ 1 we have that for all M ≥ M0 , n θ N θ , J˜ as n goes to infinity M̃ ,n M̃ −1 and that J˜M̃ → J˜−1 as M goes to infinity (and similarly from a Bayesian point of view). Moreover we have proved in Section 3.1 that for all n, as M goes to infinity, θbM,n → θ̄n and that as n → +∞, θ̄n → (1/k, · · · , 1/k) whatever the true value θ∗ of the parameter. These two  results show thatwe can find a sequence Mn going to infinity such that  √ b ? ? n θ ˜ −θ N θ , J˜−1 but also that we cannot choose Mn going to infinity Mn ,n arbitrarily fast. It is thus important to determine a procedure to select M , for finite n. To choose Mn in practice, for finite n, we propose in Section 3.2 an approach which consists in minimizing an estimate of the quadratic risk Rn (I) in the partition I, as a √ way to ensure that the asymptotic variance of n(θb − θ) is close to J˜−1 and that the √ b quantity n(θ − θ) is asymptotically stable. The construction of an estimator of Rn (I) is not trivial due to the strong non linearity of the maximum likelihood estimator in mixture models and we use a reference model with a small number of bins M0 as a proxy for an unbiased estimator θ, together with a cross validation approach to approximate Ran (I for all partition I with an = o(n). This leads at best to a minimization of the risk Ran (IM ) instead of Rn (IM ), however this is it not per se problematic since a major concern is to ensure that Mn is not too large. In the construction of our estimation procedure (either by MLE or based on the posterior distribution) we have considered the same partitionning of [0, 1] for each coordinate c ∈ {1, 2, 3}. This can be relaxed easily by using different partitions accross coordinates, if one wishes to do so to adapt to different smoothness of emission densities for instance. However, this would require choices of M for each coordinate. We believe that our theoretical results would stay true. We did more simulations in this setting and we observed that, when the emission distributions are distinct in each direction, choosing different M for each coordinates is time consuming and does not really improve the estimations of θ, at least in our examples. We have also presented our results under some seemingly restrictive assumptions, which we now discuss. 5.1 On the structural assumptions on the model In model (1), it is assumed that each individual has three conditionally independent observations in [0, 1] each. Obviously this assumptions can be relaxed to any number p of conditionally independent observations with p ≥ 3 without modifying the conclusions of our results. Also, the method of estimation relies heavily on the fact that the Xi,c ’s belong to [0, 1]. This is not such a restrictive assumption since one can transform any random variable on R into [0, 1], writing Xi,c = Gc (X̃i,c ) , where Gc is a given cumulative distribution on R and X̃i,c is the original observation. Then the conditional densities are obtained as ? −1 fj,c (xc ) = fX̃;j,c (G−1 c (xc ))/gc (Gc (xc )), 24 j ≤ k, c ∈ {1, · · · , 3} and Assumption (4) becomes that for all c ∈ {1, · · · , 3}, 0 < liminfxc fX̃;j1 ,c (G−1 c (xc )) fX̃;j2 ,c (G−1 c (xc )) ≤ limsupxc fX̃;j1 ,c (G−1 c (xc )) fX̃;j2 ,c (G−1 c (xc )) < +∞, (21) which means that the densities of the observations within each group have all the same tail behaviour. Note that a common assumption found in the literature for estimation of densities on [0, 1] is that the densities are bounded from above and below, which in the above framework of transformations Gc amounts to saying that fX̃;j1 ,c ’s have all the same tail behaviours as g(·). This is a much stronger assumption because it would mean that the tail behaviour of the densities fX̃;j1 ,c is known a priori, whereas (21) only means that the tails are the same between the components of the mixtures but they not need to be the same as those of g. Finally we have considered univariate conditional observations Xi,c ∈ R, again this can be relaxed easily by considering partitions of [0, 1]d with d ≥ 1 if Xi,c ∈ [0, 1]d . In this case the first part of Assumption (A2) needs to be replaced by : • There exists a > 0 such that for all M , for all Im in IM , there exists an open ball I such that Im ⊂ I and |Im | ≥ a|I|. 5.2 Extensions to Hidden Markov models Finite mixture models all have the property that, when the approximation space for the emission distributions is that of step functions (histograms), then the model stays true for the observation process, but associated to the summary of the observations made of the counts in each bins. This leads to a proper and well specified likelihood for the parameter θ, w and there is no problem of model misspecification as fgar as θ is concerned even when the number of bins is fixed and small. We expect the results obtained in this paper to remain valid for nonparametric hidden Markov models with translated emission distributions studied in [21] or for general nonparametric finite state space hidden Markov models studied in [18], [35] and [19]. In the latter, the parameter describing the probability distribution of the latent variable is the transition matrix of the hidden Markov chain. However, semiparametric asymptotic theory for dependent observations is much more involved, see [27] for the ground principles. It seems difficult to identify the score functions and the efficient Fisher information matrices for hidden Markov models even in the parametric approximation model, so that to get results such as Theorem 1 could be quite challenging, nevertheless we think that the results obtained here pave the way to obtaining semi-parametric efficient estimation of the transition matrix in nonparametric hidden Markov models. 6 6.1 Proofs Proof of Proposition 1 ? ? Let us first prove that for large enough M , the measures f1,c;M dx, . . . , fk,c;M dx are linearly independent. Indeed, if it is not the case, there exists a subsequence Mp tending to infinity 25 as p tends to infinity and a sequence (α(p) )p≥1 in the unit ball of Rk such that for all p ≥ 1, k X (p) ? αj fj,c;M (x) = 0 p j=1 Lebesgue a.e. Let α = (α1 , . . . , αk ) be a limit point of (α(p) )p≥1 in the unit ball of Rk . Using Assumption (A.2) and Corollary 1.7 in Chapter 3 of [32], we have that as p tends to Pk ? ? (x) Lebesgue a.e. so that we obtain ? infinity, fj,c;M (x) converges to fj,c j=1 αj fj,c (x) = 0 p Lebesgue a.e., contradicting Assumption (A1). ? ? Fix now M large enough so that the measures f1,c;M dx, . . . , fk,c;M dx are linearly independent. Then, one may use the spectral method described in [2] to get estimators θbsp b M ;sp of the parameters θ and ω M from a sample of the multinomial distribution and ω associated to density gθ,ω;M . The estimator uses eigenvalues and eigenvectors computed from the empirical estimator of the multinomial distribution. But in a neighborhood of θ? and ω ? , this is a continuously derivative procedure, and since on this neighborhood, classical deviation probabilities on empirical means hold uniformly, we get easily that for any vector V ∈ Rk , there exists K > 0 such that for all c > 0, for large enough n (the size of the sample):  2  √ b nhθsp − θ, V i ≤ K. Eθ sup kθ−θ? k≤ √cn Now, the multinomial model is differentiable in quadratic mean, and following the proof of Theorem 4 in [20] one gets that, if V T J˜M V = 0, then  2  √ lim lim sup nhθbsp − θ, V i = +∞. Eθ c→+∞ n→+∞ kθ−θ? k≤ √c n Thus for all V ∈ Rk , V T J˜M V 6= 0, so that J˜M is not singular. 6.2 Proof of Proposition 2 We prove the proposition when M1 = M , M2 = M + 1, IM = {I1 , . . . , IM } and IM +1 = {I1 , . . . , IM,0 , IM,1 } with IM = IM,0 ∪ IM,1 , which is sufficient by induction. We denote (M ) (M +1) (ωj,c,m )j,c,m the parameter ω in the model with partition IM and (ωj,c,m )j,c,m the parameter ω in the model with partition IM +1 . Define b ∈ (0, 1), αj,c ∈ (0, 1), j = 1, . . . , k, c = 1, 2, 3 so that (M +1) (M ) |IM,0 | = (1 − b)|IM |, |IM,1 | = b|IM |, ωj,c,M = (1 − αj,c )ωj,c,M , (M +1) (M ) ωj,c,M +1 = αj,c ωj,c,M . Then, we may write gθ,ω;M (x) = k X j=1 θj (M ) 3 Y M Y ωj,c,m c=1 m=1 |Im | 26 !1lIm (xc ) and gθ,ω;M +1 (x) = = k X θj 3 M −1 Y Y  |Im | j=1 c=1 m=1 k X 3 Y M Y ωj,c,m c=1 m=1 |Im | θj j=1   1lI (xc )  1lI (xc ) M,0 M,1 (M +1) (M +1) (M +1) !1lIm (xc ) ω ω ωj,c,m  j,c,M   j,c,M +1   (M ) |IM,0 |  !1lIm (xc ) " α j,c 1lI M,1 |IM,1 | (xc )  b 1 − αj,c 1−b 1lI M,0  (xc ) # . Thus, when xc ∈ / IM for c = 1, 2, 3, gθ,ω;M +1 (x) = gθ,ω;M (x) and computations have to take care of x’s such that for some  c, xc ∈ IM . If we parametrize the model with (M ) partition IM +1 using the parameter θ, (ωj,c,m ), (αj,c ) we get the same efficient Fisher   (M +1) information for θ as when parametrizing with θ, (ωj,c,m ) . Define the function D as the difference between the gradient   of log gθ,ω;M +1 and that of log gθ,ω;M (x) with respect (M ) to the parameter θ, (ωj,c,m ), (αj,c ) : D(x) := ∇ log gθ,ω;M +1 (x) − ∇ log gθ,ω;M (x), in particular the last coordinates of ∇ log gθ,ω;M (x) corresponding to the derivatives with respect to (αj,c ) are zero. Let us denote K (M +1) the Fisher information obtained for this new parametrization, that is K (M +1) = E? [(∇ log gθ,ω;M +1 (X))(∇ log gθ,ω;M +1 (X))T ]. Easy but tedious computations give   0 ··· 0   E? [(∇ log gθ,ω;M (X))(D(X))T ] =  ... ... ...  , 0 ··· 0 so that K (M +1)  JM 0 = 0 0  +∆ where ∆ = E? [D(X)D(X)T ] is positive semi-definite. As said before, J˜M +1 is obtained from K (M +1) using the similar formula as from JM +1 . Then usual algebra gives that J˜M +1 ≥ J˜M since ∆ is positive semi-definite. 6.3 Proof of Lemma 1 ? are upper bounded. Let, for any M , A Under (A1), the functions fj,c M be the orthogonal 2 projection   in L (gθ? ,f ? dx) onto ṖM , the set of step functions spanned by the functions ? Sω,M j,c,m , j = 1, . . . , k, c = 1, 2, 3, m = 1, . . . , M − 1. Then for all j = 1, . . . , k − 1, ? (ψ̃M )j = Sθ,M  j 27 ? − AM Sθ,M  j , so that ? (ψ̃)j − (ψ̃M )j = (Sθ? )j − Sθ,M  j h  i ? − AM (Sθ? )j − Sθ,M + (AM − A) (Sθ? )j . j (22) Using Assumption   (A2) and Corollary 1.7 in Chapter 3 of [32], we have that as M tends ? to infinity, Sθ,M converges to (Sθ? )j Lebesgue a.e. Both functions are uniformly upper   ? ? bounded by the finite constant 1/θj using Assumption (A.1), so that Sθ,M converges j   ? to (Sθ? )j in L2 (gθ? ,f ? (x)dx) as M tends to +∞ and (Sθ? )j − Sθ,M converges j j L2 (g ? ? dx) θ ,f to 0 as M tends to +∞. Thus to prove that (ψ̃)j − (ψ̃M )j converges to 0 in L2 (gθ? ,f ? dx) when M tends to +∞, we need only to prove that k (AM − A) (Sθ? )j kL2 (gθ? ,f ? ) converges to 0. So we now prove that, for all S ∈ L2 (gθ? ,f ? ), kAM S − ASkL2 (gθ? ,f ? ) converges to 0 when M tends to +∞. First we prove that AM S converges in L2 (gθ? ,f ? ). Let L ≥ M and set ψS (M, L) = kAM S − AL SkL2 (gθ? ,f ? ) . For large enough M , we have ψS (M, L) = kAM (AL S) − AL SkL2 (gθ? ,f ? ) , since using (A3), ṖM ⊂ ṖL . It is easy to see that, for all M , ψS (M, L) is a monotone sequence, non decreasing in L, and bounded, so that it converges to some ψS? (M ) ≥ 0. Moreover, since for all L, ψS (M + 1, L) ≤ ψS (M, L), at the limit ψS? (M ) is monotone non increasing in M and non-negative so that it converges. Let ψS? be its limit. Because AL S = AM (AL S) + (I − AM )(AL S) = AM S + (I − AM )(AL S), AM S ⊥ (I − AM )(AL S), we get that kAL Sk2 = kAM Sk2 + k(I − AM )(AL S)k2 = kAM Sk2 + ψS (M, L)2 . Let M be fixed. Then we get that lim kAL Sk2 = kAM Sk2 + ψS? (M )2 L→+∞ and if we write ` the limit on the lefthandside of the equation, by letting now M tend to infinity we get that ` = ` + ψS? . This in turns implies that ψS? = 0. Now let Lp , Mp converge to infinity as p goes to infinity in such a way that for all p Lp ≥ Mp (which we can always assume by symmetry). Then ψS (Mp , Lp ) ≤ ψS? (Mp ) p→+∞ → 0 so that the sequence AM S is Cauchy in L2 (gθ? ,f ? ) and converges. Denote AS its limit. Let us prove that AS ∈ Ṗ. Any function in ṖM is a finite linear combination of functions Sj,c,M of form Q hj,c,M (xc ) c0 fω? 0 (xc0 ) j,c ;M Sj,c,M (x) = (23) gθ? ,ω?M ;M (x) 28 ? with hj,c,M ∈ Hj,c is such that hj,c,M fωj,c;M is a linear combination of indicator functions. It is thus enough to prove that the limit of any converging sequence of such functions is in Ṗ. Consider a sequence Sj,c,M converging to some variables S ? in L2 (gθ? ,f ? ) as M tends to infinity. Note that hj,c,M (xc ) = k X θ`? Sj,c,M (x) × ? (xc0 ) Y fω`,c 0 ;M c0 `=1 fω? j,c0 ;M (xc0 ) so that condition (4) together with the almost sure convergence of fω? 0 (xc0 )/fω? 0 (xc0 ) `,c ;M j,c ;M ? (x 0 )/f ? (x 0 ) implies that towards f`,c 0 0 c c j,c Sj,c,M (x) × ? (xc0 ) Y fω`,c 0 ;M c0 fω? j,c0 ;M L2 (gθ? ,f ? ) → (xc0 ) S ? ? (x 0 ) Y f`,c 0 c c0 ? (x 0 ) fj,c 0 c := h, ? ) to h. Since h which in turns implies that hj,c,M converges in L2 (fj,c j,c,M ∈ Hj,c for all M , ? h ∈ Hj,c and S ∈ Ṗ. We now prove that all function in Ṗ is a limit in L2 (gθ? ,f ? ) of functions in ṖM . As before, it is enough to prove it for functions Sj,c of form Q ? h(xc ) c0 fj,c 0 (xc0 ) Sj,c (x) = gθ? ,f ? (x) with h ∈ Hj,c . We are thus looking for a sequence of functions hM ∈ Hj,c such that ? hM fωj,c;M is a linear combination of indicator functions and such that Sj,c,M as defined by (23) converges to Sj,c in L2 (gθ? ,f ? ). Using Lemma 1.2 in [32], h may be approximated by a continuous function, which in turns may be approximated by a (centred) Q linear combination of indicator functions and the result follows using again that c0 fω? 0 /gθ? ,ω?M ;M j,c ;M Q ? ? and c0 fj,c 0 /gθ ? ,f ? are bounded (by 1/ minj θj ). Thus, we easily get that for all S in L2 (gθ? ,f ? ), AM AS − AS converges to 0 in L2 (gθ? ,f ? ), so that AA = A. Now, one easily deduces that A = A. Indeed: if S is in Ṗ, one has AS = S, and then AS = S. If now S is in the orthogonal of Ṗ, then for any S̃ ∈ Ṗ, one has hAM S, S̃i = hS, AM S̃i which leads to hAS, S̃i = hS, AS̃i = 0, so that AS is in the orthogonal of Ṗ and in Ṗ so that AS=0. 6.4 Proof of Proposition 3 Proposition 3 is easily implied by Lemma 2 which formalizes the following. When the sequence of observations X1 , . . . , Xn and n are fixed, then almost surely there exists a sufficiently fine partition IM such that there exists at most one component of an observation in each set Im , m ≤ M . Then we can reorder the sets Im so that Xi,c ∈ Ii+n(c−1) , for all c ∈ {1, 2, 3} and i ≤ n. In this case, the likelihood `n (·, ·; M ) is maximised at each parameter (θ, ω) belonging to the set SM ⊂ ∆k × (∆M )3k that we explain now (and formalise in Lemma 2). Each element of SM corresponds to one clustering of the observations in k sets 29 (represented by the (A?j )j≤k in Lemma 2) of size as equal as possible. For each clustering, for all j ≤ k, • θj = #A?j /n is the proportion of observations associated to A?j (then the θj are almost equal to 1/k), • for all c ∈ {1, 2, 3} and for all l ≤ M ,  1/#A?j if l − n(c − 1) ∈ A?j (i.e. Xl−n(c−1) ∈ Il is associated to     the hidden state j),  0 if l − n(c − 1) ∈ {1, . . . n} \ A?j (i.e. Xl−n(c−1) ∈ Il is not ωj,c,l =    associated to j),   0 otherwise (i.e. there is no observation in Il ). Lemma 2. Let X1 , . . . , Xn be fixed observations, as soon as for all i ≤ n and c ∈ {1, 2, 3}, Xi,c ∈ b M ) if and only if (θbM , ω b M ) ∈ SM Ii+n(c−1) then the likelihood `n (·, ·; M ) is maximised at (θbM , ω where  SM = (θ, ω) : θj = #A?j /n, ωj,c,l = 1l−n(c−1)∈A?j /#A?j , (J1 , J2 ) partition of {1, . . . , k}, #J2 = n − kbn/kc =: r (A?j )j≤k partition of {1, . . . , n}, #A?j1 = bn/kc =: q, for j1 ∈ J1 , #A?j2 = bn/kc + 1 =: q + 1, for j2 ∈ J2 , and n = kq + r, 0 ≤ r ≤ k − 1. Proof. Since the set of parameters is compact and the likelihood is a continuous function of the parameters then the maximum is attained. If (θ, ω) maximises the likelihood `n (·, ·; M ), (P1) then, for all 1 ≤ i ≤ n, there exists 1 ≤ j ≤ k such that ωj,c,i+n(c−1) > 0 for all c ∈ {1, 2, 3}. Indeed, if there exists 1 ≤ i ≤ n such that for all 1 ≤ j ≤ k, ωj,c,i+n(c−1) = 0 for some c ∈ {1, 2, 3}, then `n (θ, ω; M ) = n X i=1  log  k X j=1 θj 3 Y  ωj,c,i+n(c−1)  c=1 + n X log (1/(|Ii ||Ii+n ||Ii+2n |)) = −∞. i=1 | {z constant } (P2) and if there exists j, c, i such that ωj,c,i+n(c−1) = 0 and θj > 0 then ωj,d,i+n(d−1) = 0 for all d. Indeed otherwise you can give the weight ωj,d,i+n(d−1) , to one of the other ωj,d,s+n(d−1) for which ωj,e,s+n(e−1) > 0, for all e 6= d (which exist otherwise take θj = 0 which would increase the likelihood) and this increases the likelihood. 30 (P3) and if θj > 0, then ωj,c,l = 0 if l − n(c − 1) ∈ / {1, . . . , n}. Indeed, in this case, there is no observation in Il so that ωj,c,l does not appear in the likelihood and we conclude similarly as the previous point. Combining all the previous remarks, we know that the maximum can only be attained (and is at least once) in one of the following sets, indexed by J ⊂ {1, . . . , k} which determines the zeros of θ and Aj ⊂ {1, . . . , n}, j ≤ k, which determine the zeros of ω: SJ,A1 ,...,Ak ={θ ∈ ∆k : θj > 0, j ∈ J, θj = 0, j ∈ J c } Yn × (ωj,1,· , ωj,2,· , ωj,3,· ) ∈ (∆M )3 : j≤k ωj,c,i+n(c−1) > 0 , using (P2) using (P3) if i ∈ Aj , c ∈ {1, 2, 3}   if j ∈ J, o and ωj,c,l = 0, if l ∈ {1, . . . , M } \ {i + n(c − 1), i ∈ Aj } . Note that we do not assume that (Aj )j∈J is a partition of {1, . . . , n}. We fix J ⊂ {1, . . . , k} and Aj ⊂ {1, . . . , n}, j ∈ J. Now we search for parameters (θ̄, ω̄) in SJ,A1 ,...,Ak which maximize the likelihood. They are zeros of the derivative of   ! k 3 X X X (θ, ω, λ, µ) 7→ `n (θ, ω; M ) + λ  θ j − 1 + µj,c (24) ωj,c,i − 1 , j=1 c=1 i with respect to non zero components (θj , ωj,c,i+n(c−1) , λ and µj,c , for j ∈ J, i ∈ Aj , 1 ≤ c ≤ 3). Annulling the partial derivatives give X ω̄j,1,i ω̄j,2,i+n ω̄j,3,i+2n = −λ, s∈J(i) θ̄s ω̄s,1,i ω̄s,2,i+n ω̄s,3,i+2n Q θ̄j d6=c ω̄j,d,i+n(d−1) P = −µj,c , s∈J(i) θ̄s ω̄s,1,i ω̄s,2,i+n ω̄s,3,i+2n X θ̄j = 1, ∀j ∈ J (25) ∀j ∈ J, i ∈ Aj , c ∈ {1, 2, 3} (26) P i∈Aj (27) j∈J X ω̄j,c,i+n(c−1) = 1, ∀j ∈ J, c ∈ {1, 2, 3}, (28) i∈Aj where J(i) = {s ∈ J : i ∈ As }. Multiplying Equation (26) by ω̄j,c,i+n(c−1) and then summing the result over i ∈ Aj and using Equation (28), we obtain that µj,c does not depend on c. Then using Equations (26) for c = 1, c = 2 and c = 3, we obtain θ̄j ω̄j,1,i ω̄j,2,i+n = θ̄j ω̄j,1,i ω̄j,3,i+2n = θ̄j ω̄j,2,i+n ω̄j,3,i+2n , so that ω̄j,1,i = ω̄j,2,i+n = ω̄j,3,i+2n . 31 (29) Furthermore, multiplying Equation (25) by θ̄j and summing the result over j ∈ J and using Equation (27), we obtain λ = −n. Moreover by multiplying Equation (26) by ω̄j,c,i+n(c−1) , and then summing the P result over i ∈ Aj and finally subtracting (25) multiplied by θ̄j to the result (ie making i∈Aj (−θ̄j )(25) + ω̄j,c,i+n(c−1) (26)), we get 0 = −µj,c − nθ̄j . (30) Then using again Equations (26), (29) and (30), we get X 3 2 =n θ̄s ω̄s,1,i , ∀j ∈ J(i), ∀c ∈ {1, 2, 3}, ω̄j,c,i+n(c−1) s∈J(i) so that ω̄j,c,i+n(c−1) does not depend on j ∈ J(i) and   X ω̄j,c,i+n(c−1) = 1i∈Aj / n θ̄s  , ∀j ∈ J(i). (31) s∈J(i) For each SJ,A1 ,...,Ak =: S, we have obtained the zeros of the derivative of the loglikelihood, that we now denote (S θ̄,S ω̄), to emphasize the dependence with the considered set S. We now want to know which of these zeros (S θ̄,S ω̄) are local maxima thanks to the second partial derivatives. We consider sets SJ,A1 ,...,Ak for which there exists i ≤ n such that there exist j and l are in J(i) and j 6= i. We consider a second partial derivative of   n k X X `˜n (θ, ω̃; M ) = log  θj (ω̃j,1,i )3  i=1 j=1 that is the log-likelihood (up to an additive constant) associated to the model where for all 1 ≤ m ≤ k, 1 ≤ s ≤ n, ωm,1,s = ωm,2,s+nP= ωm,3,s+2n . Assume without loss of P generality that θl ≥ θj , then (using that θk = 1 − m<k θm and ωj,1,n = 1 − s<n ωj,1,s ),   2 X ˜  ∂ `n S S S ( θ̄, ω̄; M ) = C 6 S θ̄j θ̄m − 3 S θ̄j2  ≥ C 6 S θ̄j S θ̄l − 3 S θ̄j2 > 0, 2 ∂ ω̃j,1,i m∈J(i)\{j} where C > 0. This implies that for all sets SJ,A1 ,...,Ak := S where there exists i ≤ n such that #J(i) > 1, every zeros (S θ̄,S ω̄) is not a local maximum. So that the only possible local maxima of `n (θ, ω; M ) are the zeros (SJ,A1 ,...,Ak θ̄,SJ,A1 ,...,Ak ω̄) where #J(i) = 1 for all i ≤ n, i.e. when (Aj )j∈J forms a partition of {1, . . . , n}. So we now only consider sets Aj , j ∈ J which form a partition of {1, . . . , n} and P ω̄j,c,i+n(c−1) = 1i∈Aj /(nθ̄j ) for i ∈ Aj , using Equation (31). As i∈Aj ω̄j,1,i = 1, we then obtain that θ̄j = #Aj /n = 1/(nω̄j,1,i ), for all i ∈ Aj . So that we now only havePto choose the best partition (Aj )j∈J of {1, . . . , n} and J. Let Nj = #Aj , we know that j Nj = n and the log-likelihood at the local maximum (S θ̄,S ω̄) associated to SJ,A1 ,...,Ak =: S is X `n (S θ̄,S ω̄; M ) = Ns log(Ns−2 ) + constant. s∈J 32 So that we want to minimize X X Ns log(Ns ) under the constraint Ns = n s∈J (32) s∈J over J ⊂ {1, . . . k} and Nj ∈ N, j ∈ J. This minimization is equivalent to the minimization of X X Ns log(Ns ) under the constraint Ns = n (33) s≤k s≤k over Nj ∈ N, j ≤ k (since then the problem (33) is less constrained than for the minimization of (32) when J is fixed). And, when k divides n, the minimum of (33) is attained at Ns = n/k. Otherwise, when k does not divide n, consider only two indices s1 , s2 in {1, . . . , k} and assume that Ns , s ∈ / {s1 , s2 } are fixed such that Ns1 + Ns2 = SN is also fixed. Then we want to minimise −Ns1 log(Ns1 ) − (SN − Ns1 ) log(SN − Ns1 ). Studying the function x ∈ (0, SN ) 7→ −x log(SN ) − (SN − x) log(SN − x), we obtain that the minimum is attained when Ns1 and Ns2 = SN − Ns1 are the closest of NS /2. Then in both cases, the MLE is attained at every (θ, ω) ∈ SM . 6.5 Proof of Corollary 1 Suppose that for all N > 0 and all C > 0, there exists n ≥ N such that 2  n2 max |Im | Mn ≤ C. m≤Mn So that there exists a subsequence (φ(n))n∈N of (n)n∈N such that  2 (φ(n))2 max |Im | Mφ(n) −→ 0. (34) n→∞ m≤Mφ(n) Set  > 0, by Proposition 3, there exists N1 > 0 such that for all n ≥ N1 ,   P θbMn (X1:φ(n) ) − (1/k, . . . , 1/k) ≤   ≥ P ∃ 1 ≤ i1 , i2 ≤ φ(n), 1 ≤ c, d ≤ 3, m ≤ Mφ(n) : Xi1 ,c ∈ Im , Xi2 ,d ∈ Im c φ(n) φ(n) Mφ(n) ≥1− XX X P (Xi1 ,c ∈ Im , Xi2 ,d ∈ Im ) i1 =1 i2 =1 m=1 ≥ 1 − (φ(n))2 Mφ(n) max sup g, (sup g)2   2 max |Im | . m≤Mφ(n) (35) Using Equations (34) and (35) and Assumption (A3), then θbMn (X1:φ(n) ) tends in probability to (1/k, . . . , 1/k) which contradicts the convergence in law of θbMn to θ? . This concludes the proof. 33 6.6 Proof of Theorem 2 We first recall Lemma 2.1 in [4]: Lemma 3 (Sylvain Arlot). Let A, B, C, R : M → R. If for all m, m0 ∈ M, (C(m) − R(m)) − (C(m0 ) − R(m0 )) ≤ A(m) + B(m0 ), then for all m b ∈ M such that C(m) b ≤ inf m∈M C(m) + ρ, ρ > 0, R(m) b − B(m) b ≤ inf {R(m) + A(m)} + ρ. m∈M We are going to use this lemma with R(I) = Ran (I), C(I) = CCV (I) and A(I) = B(I) = n R(I) + δn . Using Hoeffding’s inequality, i  h  P {−B(I) ≤ CCV (I) − Ran (I)−E? kθ̃I0 (XB−b ) − θ? k2Tk ≤ A(I)}c  ≤ 2 exp −2bn A(I)2 , since kθ̃I (XBb ) − θ̃I0 (XB−b )k2 ≤ 1, for all b. We introduce the sets n h i o SI = −B(I) ≤ CCV (I) − Ran (I)−E? kθ̃I0 (XB−b ) − θ? k2Tk ≤ A(I) (36) for all I ∈ Mn . Using Lemma 3, on the set ∩I∈Mn SI , Equation (20) holds and using Equation (36), we obtain 2 !  . P (∩I∈Mn SI ) ≥ 1 − 2mn exp −2bn n inf Ran (I) + δn I∈Mn 6.7 Proof of Proposition 4 Using Theorem 2, h i E? an Ran (Ibn )   1 + n 2δn ≤ an inf Ra (I) + 1 − n I∈Mn n 1 − n  2 ! + 2an mn exp −2bn n inf Ran (I) + δn I∈Mn we can conclude by taking n = δn = 1/(log(n)an ). Acknowledgements This work was partly supported by the grants ANR Banhdits and Calibration. We want to thank the reviewers and the associate editor for their helpful comments. 34 References [1] E. S. Allman, C. Matias, and J. A. Rhodes. Identifiability of parameters in latent structure models with many observed variables. Ann. Statist., 37(6A):3099–3132, 12 2009. [2] A. Anandkumar, R. Ge, D. Hsu, S. M. Kakade, and M. Telgarsky. Tensor decompositions for learning latent variable models. JMLR, 15:2773–2832, 2014. [3] T. Ando. Bayesian model selection and statistical modeling. Statistics: Textbooks and Monographs. CRC Press, Boca Raton, FL, 2010. [4] S. Arlot. Contributions to statistical learning theory: estimator selection and change-point detection. Habilitation à diriger des recherches, University Paris Diderot, December 2014. Habilitation à diriger des recherches. [5] S. Arlot and A. Celisse. A survey of cross-validation procedures for model selection. Stat. Surv., 4:40–79, 2010. [6] P. Barbe and P. Bertail. The Weighted Bootstrap, volume 98 of Lecture Notes in Statistics. Springer, 1995. [7] J.-P. Baudry, C. Maugis, and B. Michel. Slope heuristics: overview and implementation. Stat. Comput., (22):455–470, 2012. [8] P. J. Bickel, C. A. J. Klaassen, Y. Ritov, and J. A. Wellner. Efficient and adaptive estimation for semiparametric models. Johns Hopkins Series in the Mathematical Sciences. Johns Hopkins University Press, Baltimore, MD, 1993. [9] P. J. Bickel and B. J. K. Kleijn. The semiparametric Bernstein-von Mises theorem. Ann. Statist., 40(1):206–237, 2012. [10] S. Bonhomme, K. Jochmans, and J.-M. Robin. Estimating multivariate latentstructure models. Ann. Statist., 44(2):540–563, 2016. [11] S. Bonhomme, K. Jochmans, and J.-M. Robin. Non-parametric estimation of finite mixtures from repeated measurements. J. R. Stat. Soc. Ser. B. Stat. Methodol., 78(1):211–229, 2016. [12] S. Boucheron and E. Gassiat. A Bernstein-von Mises theorem for discrete probability distributions. Electron. J. Stat., 3:114–148, 2009. [13] M. A. Brookhart and M. J. van der Laan. A semiparametric model selection criterion with applications to the marginal structural model. Comput. Statist. Data Anal., 50(2):475–498, 2006. [14] I. Castillo. Semiparametric Bernstein–von Mises theorem and bias, illustrated with Gaussian process priors. Sankhya A, 74(2):194–221, 2012. 35 [15] I. Castillo. A semiparametric Bernstein–von Mises theorem for Gaussian process priors. Probab. Theory Related Fields, 152(1-2):53–99, 2012. [16] G. Claeskens and N. L. Hjort. Model selection and model averaging, volume 27 of Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge University Press, Cambridge, 2008. [17] P. De Blasi and N. L. Hjort. The Bernstein–von Mises theorem in semiparametric competing risks models. J. Statist. Plann. Inference, 139(7):2316–2328, 2009. [18] Y. De Castro, E. Gassiat, and C. Lacour. Minimax adaptive estimation of nonparametric hidden Markov models. JMLR, 17(111), 2016. [19] Y. De Castro, E. Gassiat, and S. Le Corff. Consistent estimation of the filtering and marginal smoothing distributions in nonparametric hidden Markov models. I.E.E.E. Trans. Info. Th., 63(8):4758–4777, 2017. [20] E. Gassiat, D. Pollard, and G. Stoltz. Revisiting the van Trees inequality in the spirit of Hajek and Le Cam. unpublished manuscript, 2013. [21] E. Gassiat and J. Rousseau. Non parametric finite translation hidden Markov models and extensions. Bernoulli, 22(1):193–212, 2016. [22] M. H. Hansen and B. Yu. Model selection and the principle of minimum description length. 96:746–774, 2001. [23] J. B. Kruskal. Three-way arrays: rank and uniqueness of trilinear decompositions, with application to arithmetic complexity and statistics. Linear Algebra and Appl., 18(2):95–138, 1977. [24] L. Le Cam and G. Yang. Asymptotics in Statistics. Some Basic Concepts, Second Edition. Springer-Verlag, New-York, 2000. [25] Gyemin Lee and Clayton Scott. EM algorithms for multivariate Gaussian mixture models with truncated and censored data. Comput. Statist. Data Anal., 56(9):2816– 2829, 2012. [26] P. Massart. Concentration inequalities and model selection, volume 1896 of Lecture Notes in Mathematics. Springer, Berlin, 2007. Lectures from the 33rd Summer School on Probability Theory held in Saint-Flour, July 6–23, 2003, With a foreword by Jean Picard. [27] B. McNeney and J. A. Wellner. Application of convolution theorems in semiparametric models with non-i.i.d. data. J. Statist. Plann. Inference, 91(2):441–480, 2000. Prague Workshop on Perspectives in Modern Statistical Inference: Parametrics, Semi-parametrics, Non-parametrics (1998). [28] J. A. Rhodes. A concise proof of kruskal’s theorem on tensor decomposition. Linear Algebra and Appl., 432(7):1818–1824, 2010. 36 [29] V. Rivoirard and J. Rousseau. Bernstein-von Mises theorem for linear functionals of the density. Ann. Statist., 40(3):1489–1523, 2012. [30] C.P. Robert. The Bayesian Choice. Springer-Verlag, New York, second edition, 2001. [31] X. Shen. Asymptotic normality of semiparametric and nonparametric posterior distributions. J. Amer. Statist. Assoc., 97(457):222–235, 2002. [32] E. M. Stein and R. Shakarchi. Real analysis. Princeton Lectures in Analysis, III. Princeton University Press, Princeton, NJ, 2005. Measure theory, integration, and Hilbert spaces. [33] A. W. van der Vaart. Asymptotic statistics, volume 3 of Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge University Press, Cambridge, 1998. [34] A. W. van der Vaart. Semiparametric statistics. In Lectures on probability theory and statistics (Saint-Flour, 1999), volume 1781 of Lecture Notes in Math., pages 331–457. Springer, Berlin, 2002. [35] E. Vernet. Posterior consistency for nonparametric Hidden Markov Models with finite state space. Electronic Journal of Statistics, 9:717–752, 2015. 37
10math.ST
Multi-view Consistency as Supervisory Signal for Learning Shape and Pose Prediction Shubham Tulsiani, Alexei A. Efros, Jitendra Malik University of California, Berkeley arXiv:1801.03910v1 [cs.CV] 11 Jan 2018 {shubhtuls, efros, malik}@eecs.berkeley.edu Abstract We present a framework for learning single-view shape and pose prediction without using direct supervision for either. Our approach allows leveraging multi-view observations from unknown poses as supervisory signal during training. Our proposed training setup enforces geometric consistency between the independently predicted shape and pose from two views of the same instance. We consequently learn to predict shape in an emergent canonical (view-agnostic) frame along with a corresponding pose predictor. We show empirical and qualitative results using the ShapeNet dataset and observe encouragingly competitive performance to previous techniques which rely on stronger forms of supervision. We also demonstrate the applicability of our framework in a realistic setting which is beyond the scope of existing techniques: using a training dataset comprised of online product images where the underlying shape and pose are unknown. Figure 1: We learn to predict the shape and pose of an object from a single input view. Our framework can leverage training data of the form of multi-view observations of objects, and learn shape and pose prediction despite the lack of any direct supervision. 1. Introduction recent learning-based methods [8, 16] have attempted to address single-view 3D inference task, but this ability has come at a cost. These approaches rely on full 3D supervision and require known 3D shape for each training image. Not only is this form of supervision ecologically implausible, it is also practically tedious to acquire and difficult to scale. Instead, as depicted in Figure 1(b), our goal is to learn 3D prediction using the more naturally plausible multi-view supervision. The broader goal of learning from data without explicit supervision is the focus of of considerable attention in the deep learning literature. Mechanisms that have been proposed include the use of information bottlenecks or proxy tasks such as prediction that encourage learning about the temporal or spatial structure. Similarly, in this paper, we rely on enforcing a geometric bottleneck for the task of explaining novel views and leverage the principle of multi-view consistency: a common geometry, observed from different perspectives can consistently explain multiple views of an instance. While some recent approaches [25, 30, 34] have utilized these principles to learn 3D shape prediction, they all crucially rely on object pose supervision during training. Consider the flat, two-dimensional image of a chair in Figure 1(a). A human observer cannot help but perceive its 3D structure. Even though we may have never seen this particular chair before, we can readily infer, from this single image, its likely 3D shape and orientation. To make this inference, we must rely on our knowledge about the 3D structure of other, previously seen chairs. But how did we acquire this knowledge? And can we build computational systems that learn about 3D in a similar manner? Humans are moving organisms: our ecological supervision [15] comprises of observing the world and the objects in it from different perspectives, and these multiple views inform us of the underlying geometry. This insight has been successfully leveraged by a long line of geometry-based reconstruction techniques. However these structure from motion or multi-view stereo methods work for specific instances and do not, unlike humans, generalize to predict the 3D shape of a novel instance given a single view. Some Project website with code: https://shubhtuls.github.io/ mvcSnP/ 1 Training Time Test Time Figure 2: Overview of our approach. During training, we use paired views of the same instance along with a depth/mask verification image from the second view. We predict shape from the first image and pose from the second, and enforce consistency between the shape, pose and the verification image. At test time, our learned models are used to infer the shape and pose from a single RGB input image. Our proposed framework allows us to go a step further, and learn single-view shape and pose prediction using multi-view observations from unknown poses. Therefore, unlike previous methods which require either shape or pose supervision, we relax the requirement for both these forms of supervision. Our approach, as summarized in Figure 2, learns shape and pose prediction by enforcing consistency between the predictions and available (novel view) observations. Concretely, given one image of an object instance, we predict a corresponding shape. In parallel, given a different image of the same instance, we independently predict a corresponding pose. Then, we enforce that the predicted shape (using the former image) should be ‘consistent’ with a depth/mask observation for the latter image when viewed from the predicted pose. As we discuss in Section 3, and demonstrate qualitatively and quantitatively demonstrate in Section 4, this allows us to learn single-view shape and pose prediction despite not having direct supervision for either. representations from multiple color images. This class of optimization techniques can be further extended to incorporate additional signals e.g. depth or semantics [21, 26, 27]. The goal of all these multi-view instance reconstruction methods is to infer the 3D structure of a specific scene/object given a large number of views of the same instance. Our method can be thought of as trying to minimize similar cost functions during training, but at test time, we can infer the pose and shape from a single RGB image – something that these classical techniques cannot do. Generative 3D Modeling without 3D Supervision. Blanz and Vetter [2], using 3D supervision, captured the shapes of faces using a deformable model. Cashman and Fitzgibbon [5] subsequently demonstrated that similar generative models could be learned using only image based annotations. Kar et al. [19] extended these ideas to more general categories and automated test-time inference using off-the shelf recognition systems. However, these models are restricted to only capture deformations around a mean shape(s), thus limiting their expressiveness. Recently, Gadhela et al. [13] presented a more expressive generative model for shapes learned using a collection of silhouette images but did not examine applications for inference conditioned on image evidence. Eslami et al. [12] also learned a generative model with a corresponding inference module using only RGB images but only demonstrated 3D inference in scenarios where object shapes were known a priori. While the recent successes indicate that multi-view (or even single-view) ob- 2. Related Work Structure from Motion and Multi-view Instance Reconstruction. Structure from motion (SfM) [31] based methods (e.g. [4, 28]) aim to recover the geometry, typically as sparse 3D point clouds, and the camera pose for each image. It was also shown that volumetric representations can be inferred by fusing multiple range images [9] or foreground masksl [3, 22, 24]. More closely related to our formulation, ray-potential based optimization methods [10, 23] can be used to infer discrete or probabilistic [32] volumetric 2 Viv that is used for consistency verification during training. Note that there is no direct pose or shape supervision used – only multi-view observations with identity supervision. Shape and Pose Parametrization. The (predicted) shape representation x̄ is parametrized as occupancy probabilities of cells in a 3D grid. The pose of the object, parametrized as a translation t and rotation R, corresponds to the camera extrinsic matrix. While we assume known camera intrinsics for our experiments, our framework can also be extended to predict these. servations can allow learning expressive generative models, their applications for single-view reconstruction have not been demonstrated conclusively. We instead propose to discriminatively train single-view shape and pose estimation systems using similar multi-view observations. Multi-view Supervision for Single-view Depth Prediction. A recent direction pursued in the area of learning-based single-view depth prediction is to forego the need for direct supervision [11] and instead rely on multi-view observations for training [14, 17, 35]. Garg et al. [14] and Godard et al. [17] leverage stereo images as supervision to learn single image depth prediction. Zhou et al. [35] further relax the assumption of known relative pose between the multiple views, and learn single-view depth and ego-motion prediction models from monocular videos. Similarly, we leverage multiple views from unknown poses as supervisory signal but we pursue 3D instead of 2.5D predictions. 3.1. Geometric Consistency as Supervision Multiple images of the same instance are simply renderings of a common geometry from diverse viewpoints. Therefore, to correctly ‘explain’ multiple observations of an instance, we need the correct geometry (shape) of the instance and the corresponding viewpoints (pose) for each image. Our approach, which is depicted in Figure 2, builds on this insight and proposes to predict both, shape and pose s.t. the available multi-view observations can be explained. Concretely, during training, we use one image of an instance to predict the instance shape. In parallel, we use a different image of the same instance to predict pose. Then, we enforce that the predicted shape, when viewed according to the predicted pose, should be consistent with a depth/mask image from the latter view. We therefore use the notion of consistency as a form of meta-supervision i.e. while the ground-truth shape and pose are unknown, we know that they should be consistent with the available verification image. After the training stage, our learned models can infer shape and pose from a single view of a novel instance. A crucial aspect of the designed training setup is that the shape and pose estimates are independently obtained from different images of the same instance. This enforces that the optimal solution corresponds to predicting the correct shape and pose. Another interesting property is that the shape is predicted in an emergent canonical, view-independent frame, and the predicted pose is with respect to this frame. Multi-view Supervised Single-view Reconstruction. Initial CNN-based methods [8, 16] predicted voxel occupancy representations from a single input image but required full 3D supervision during training. Recent approaches have advocated using alternate forms of supervision. Zhu et al. [36] showed that systems trained using synthetic shape and pose supervision could be adapted to real data using only image based annotation. Their pre-training, however, crucially relied on direct shape and pose supervision. Towards relaxing the need of any shape supervision, some recent methods demonstrated the feasibility of using multi-view foreground masks [18, 25, 34] or more general forms of observation e.g. depth, color, masks, semantics etc. [30] as supervisory signal. Our work adheres to this ideology of using more natural forms of supervision for learning 3D prediction and we take a step further in this direction. The previous multiview supervised approaches [18, 25, 30, 34] required known camera poses for the multiple views used during training and our work relaxes this requirement. 3. Approach Correctness of Optimal Shape and Pose. We consider Figure 2 and first examine the shape prediction CNN fs . It predicts a shape fs (I1 ) given some input image. This shape is verified against V from a different view which is unknown to fs . The optimal predicted shape should therefore be consistent with all possible novel views of this instance, and therefore correspond to the true shape (upto some inherent ambiguities e.g. concavities in case of mask supervision). Similarly, the pose prediction CNN fp is required to infer a viewpoint under which the predicted geometry can explain the verification image V . As V is chosen to be from the same viewpoint as the image I2 , the pose CNN should predict the correct viewpoint corresponding to its input image (I2 ). We aim to learn shape and pose prediction systems, denoted as fs and fp respectively, which can infer the corresponding property for the underlying object from a single image. However, instead of direct supervision, the supervision available is of the form of multi-view observations from unknown poses. We first formally define our problem setup by describing the representations inferred and training data leveraged and then discuss our approach. Training Data. We require a sparse set of multi-view observations for multiple instances of the same object category. Formally, denoting by N (i) the set of natural numbers up to i, we assume a dataset of the form {{(Ivi , Vvi ) | v ∈ N (Ni )} | i ∈ N (N )}. This corresponds to N object instances, with Ni views available for the ith instance. Associated with each image Iiv , there is also a depth/mask image Emergent Canonical Frame. Under our proposed setup, the predicted pose fp (I2 ) is agnostic to the image I1 . How3 ever, to explain the verification image V , the pose CNN is required to predict a pose w.r.t the inferred shape fs (I1 ). So how can fp infer pose w.r.t fs (I1 ) when it does not even have access to I1 ? The resolution to this is that the shape prediction CNN fs automatically learns to predict shape in some (arbitrary) view-agnostic canonical frame (e.g. ‘front’ of chairs may always face towards the X axis), and the pose CNN fp learns to predict pose w.r.t this frame. Therefore, even though it is not explicitly enforced, our approach of independently inferring shape and pose makes the learnt CNNs automatically adhere to some emergent canonical frame. Towards implementing our framework, we require a consistency loss L(x̄, C; V ) which measures whether the (predicted) shape x̄ and camera pose C can geometrically explain a depth/mask image V . We present a formulation for this loss in Section 3.2 and then describe the training process in Section 3.3. We finally describe some modifications required to make the training more robust. is similar to that proposed by Tulsiani et al. [30], with the difference that the variable {xip } is redefined to correspond to the occupancy at the ith point sample along the ray. Concretely, we sample points at a fixed set of N = 80 depth values {di |1 ≤ i ≤ N } along each ray. To determine xpi , we look at the 3D coordinate of the corresponding point (determined using camera parameters), and trilinearly sample the shape x̄ to determine the occupancy at this point. u − u0 v − v0 di , di , di ) fu fv xpi = T (x̄, R × (li + t) ) li ≡ ( (2) (3) As the trilinear sampling function T is differentiable w.r.t its arguments, the sampled occupancy xpi is differentiable w.r.t the shape x̄ and the camera C. We note that Yan et al. [34] also used a similar sampling trick but their formulation is restricted to specifically using mask verification images and is additionally not leveraged for learning about pose. 3.2. Pose-differentiable Consistency Loss 3.3. Learning We formulate a view consistency loss L(x̄, C; V ) that measures the inconsistency between a shape x̄ viewed according to camera C and a depth/mask image V . Our formulation builds upon previously proposed differentiable ray consistency formulation [30]. However, unlike the previous formulation, our proposed view consistency loss is differentiable w.r.t pose (a crucial requirement for usage in our learning framework). Here, we very briefly recall the previous formulation and mainly highlight our proposed extension. A more detailed and complete formulation of the view consistency loss can be found in the appendix. Differentiable Ray Consistency [30]. The view consistency loss formulated by Tulsiani et al. [30] could be decomposed into per-pixel (or ray) based loss terms where Lp (x̄, C; vp ) denotes the consistency of the shape and camera with the observation vp at pixel p. The per-pixel loss is defined as the expected event cost: N X Lp (x̄, C; vp ) = qp (i)ψp (i) (1) Training Objective. To train the shape and pose predictors, we leverage the view consistency loss previously defined (Section 3.2) and train fs , fp jointly to minimize Ni Ni N P P P Ldata = L(fs (Iui ), fp (Ivi ); Vvi ). Therefore, i=1 u=1 v=1 the shape predicted using every image fs (Iui ) should be consistent with all available verification images of the same instance ({Vvi }) when viewed from the corresponding (predicted) poses ({fp (Ivi )}). As detailed earlier, the independent prediction of shape and pose from different images ensures that the CNNs learn to infer the correct shape and pose under some emergent canonical frame. Architecture and Optimization Details. We use a minibatch size of 8 images Iui for which shape is predicted. For each of these images, we randomly sample at least 2, and upto 3 if available, out of Ni , views Ivi of the same instance i.e. the mini-batch size for the pose prediction CNN is between 16 and 24. We use extremely simple CNN architectures (depicted in Figure 2) corresponding to fs and fp . Note that both these CNNs are initialized randomly (without any pre-training) and trained using ADAM [20]. Shape Prediction. Our shape prediction CNN has an encoder-decoder structure similar to the one used by Tulsiani et al. [30]. The input to the CNN is an RGB image of size 64 × 64 and the outputs are corresponding voxel occupancy probabilities for a 32 × 32 × 32 grid. Pose Prediction. Our pose prediction CNN fp has a similar encoder to fs , but outputs the predicted pose via fully connected layers. The rotation aspect of the pose is parametrized using two euler angles (azimuth, elevation) and the predicted translation ∈ R3 . However, for some analysis experiments, we also assume that the object is at a known location w.r.t i=1 Here, ψp (i) denotes the cost for each event, determined by vp , and qp (i) indicates the event probability i.e. the likelihood of the ray stopping at the ith voxel in its path. The event probability, qp (i) is in turn instantiated using the probabilities {xip } - where xip denotes the occupancy probability of the ith voxel in the ray’s path. See appendix for details. Sampling Occupancies along a Ray. The loss function as defined above is differentiable w.r.t shape x̄, but not the camera parameters. This is because the quantity {xip } is not a differentiable function of the camera (since the ordering of voxels on a ray’s path is a discrete function). Our insight is that instead of looking up voxels on the ray’s path, we can consider samples along its path. Thus, our formulation 4 training model, we use Ni = 5 images available from different (unknown) views with corresponding depth/mask observations. The images are rendered using blender and correspond to a viewpoint from a randomly chosen azimuth ∈ [0, 360) degrees and elevation ∈ [−20, 40] degrees. We additionally use random lighting variations during rendering. We also render the training objects under two settings - a) origin centred, or b) randomly translated around the origin. As the camera is always at a fixed distance away from the origin, the first setting corresponds to training with a known camera translation, but unknown rotation. The second corresponds to training with both translation and rotation unknown. To have a common test set across various control setting (and compare to [30]), we use the origin centered renderings for our validation and test sets. We note that these rendering settings are rather challenging and correspond to significantly more variation than commonly examined by previous multi-view supervised methods which examine settings with fixed translation [30], and sometimes only consider 24 [34] or even 8 [13] possible discrete views. the camera and only predict the camera rotation. While in this work we assume known intrinsic parameters, the pose prediction CNN could in principle be extended to infer these. 3.4. Overcoming Local Minima We observed that our training is susceptible to local minima, in particular for the pose prediction CNN fp . This is not too surprising since we have to learn both shape and pose from scratch, and erroneous estimates for one could confound the learning for the other, particularly in the in the initial stages We observe that the fp learns to predict only a small range of poses and e.g. instead of predicting back-facing chairs, it confuses them with front-facing chairs. To avoid such local minima, we introduce two changes to the setup previously described. Incorporating a Pose Prior. We encourage the distribution of the predicted poses to be similar to a prior distribution (uniform azimuth ∈ [0, 360), elevation ∈ [−20, 40) degrees). We do so by adding an adversarial loss for the predictions of fp where the ‘real’ samples are drawn from the prior distribution and ‘generated’ samples are those predicted by fp . We empirically show that our training is robust to the exact prior and that it can be different from the true distribution. Control Settings. In addition to reporting the performance in the scenario where pose and shape supervision is unavailable, we also examine the settings where stronger supervision e.g. shape or pose can be used. These experiments serve to highlight the upper bound performance. In all the experiments, we train a separate model per object category. The various settings studied are : 3D Supervision. To mimic the setup used by 3D supervised approaches [8, 16], we assume known ground-truth 3D models for each training image and train the shape CNN using a cross-entropy loss. Multi-view with Ground-truth Pose. In this supervision setting used by previous multi-view supervised approaches, pose (but not shape) supervision is available for the multiple observations. We use our loss function but train the shape prediction CNN fs using the ground-truth pose instead of predicted poses. We separately train the pose prediction CNN fp using squared L2 loss in quaternion space (after accounting for antipodal symmetry of quaternions). Multi-view without Pose Supervision. This represents our target setting with the weakest form of supervision available. We train the shape and pose prediction CNNs jointly using our proposed loss. Further, we consider two variants of this setting - one where camera translation is known, one where both camera translation and rotation are unknown. Allowing Diverse Predictions. While the adversarial loss encourages diverse predictions, we also need some architectural changes to easily capture these. Instead of directly regressing to a single pose estimate in the last layer, we predict Np = 8 estimates and additionally predict a probability distribution over these. We then sample a pose according to the predicted distribution. We use Reinforce [33] to obtain gradients for the probability predictions. 4. Experiments We consider two different scenarios where we can learn single-view shape and pose prediction using multi-view observations from unknown poses. We first examine the ShapeNet dataset where we can synthetically generate images and compare our approach against previous techniques which rely on stronger forms of supervision. We then consider a realistic setting where the existing approaches, all of which require either shape or pose supervision, cannot be applied due to lack of any such annotation. Unlike these existing methods, we show that our approach can learn using an online product dataset where multiple images on objects are collected from product websites e.g. eBay. Evaluation Metrics. We report the results using predictions for 2 images per test model. For evaluating the shape prediction CNN, we report the mean intersection over union (IoU) between the ground-truth and predicted shapes. Since different CNNs can be calibrated differently, we search for the optimal threshold (per CNN on the validation set) to binarize the predictions. To evaluate the rotation prediction, we measure the angular distance between the predicted and 4.1. Empirical Analysis using ShapeNet 4.1.1 Experimental Setup Dataset. We use the ShapeNet dataset [6] to empirically validate our approach. We evaluate on three representative object categories with a large number of models : airplanes, cars, and chairs. We create random train/val/test splits with (0.7, 0.1, 0.2) fraction of the models respectively. For each 5 Figure 3: Shape predictions on the validation set using a single RGB input image. We visualize the voxel occupancies by rendering the corresponding mesh (obtained via marching cubes) from a canonical pose. Left to Right: a) Input Image b) Ground-truth c) 3D Supervised Prediction d,e) Multi-view & Pose Supervision (Mask, Depth) f,g) Mult-view w/o Rotation Supervision (Mask, Depth), and h,i) Mult-view w/o Rotation and Translation Supervision (Mask, Depth) Figure 4: Rotation predictions on a random subset of the validation images. For visualization, we render the ground-truth voxel occupancies using the corresponding rotation. Left to Right: a) Input Image b) Ground-truth Rotation c) GT Supervised Prediction d,e) Multi-view w/o Rot Supervision (Mask, Depth), and f,g) Multi-view w/o Rot and Trans Supervision (Mask, Depth) Figure 5: Visualization of 8 random predicted shapes from azimuth = 60◦ , elevation = 30◦ . Left: Original predictions from the shape CNN. Right: Shape predictions transformed according to the optimal rotation. 6 Training Data 3D class Multi-view & GT Pose Multi-view w/o Rot Multi-view w/o Rot & Trans Training Data GT Pose MV w/o Rot Mask Depth MV w/o Rot & Trans Mask Depth Mask Depth Mask Depth Mask Depth class Acc Err Acc Err Acc Err Acc Err Acc Err aero car chair 0.57 0.79 0.49 0.55 0.75 0.42 0.43 0.69 0.45 0.52 0.74 0.40 0.44 0.71 0.43 0.38 0.48 0.35 0.37 0.68 0.37 aero car chair 0.79 0.90 0.85 10.7 7.4 11.2 0.69 0.87 0.81 14.3 5.2 7.8 0.60 0.85 0.83 21.7 4.9 8.6 0.53 0.53 0.55 26.9 24.8 24.0 0.63 0.56 0.62 12.3 20.6 19.1 mean 0.62 0.57 0.52 0.55 0.53 0.40 0.47 mean 0.85 10.0 0.79 9.0 0.76 11.7 0.54 25.1 0.61 17.4 Table 1: Analysis of the performance for single-view shape (Left) and pose (Right) prediction. a) Shape Accuracy: Mean IoU on the test set using various supervision settings. b) Pose Accuracy/Error: Acc π6 and Med-Err across different supervision settings. Figure 6: Visualization of the predicted pose distribution under various training settings. Each small image is placed at the (predicted/known) location of the corresponding camera. The reference grid in the centre depicts the space in which shape is predicted. Left to Right : a) Ground-truth poses b) No pose prior c) True pose prior d) Incorrect pose prior, discarded midway through training. See text for details. ground-truth rotation (in degrees) and report two metrics : a) Fraction of instances with error less than 30 degrees (Acc π6 ), and b) Median Angular Error (Med-Err). 4.1.2 To further support this point, we conducted an experiment where we used an incorrect pose prior (elevation uniform ∈ [−40, 80] instead of ∈ [−20, 40]) and removed the prior loss midway through training. We observed that this network also trained successfully, indicating that we do not require the true pose prior, rather only an approximate one. Figure 6 visualizes the pose distributions inferred under various settings. While using no prior results in a local optima, using the approximate prior (or the correct prior) does not. Results Prediction Frame Alignment. The ShapeNet models are all aligned in a canonical frame where X and Y axes represent lateral and upward directions. The shape and pose prediction CNNs learned using our approach are not constrained to adhere to this frame and in practice, learn to predict shape and pose w.r.t some arbitrary frame. However, to evaluate these predictions, we compute an optimal rotation to best align the predictions to the canonical ShapeNet frame. We use 8 random images per category (the first validation mini-batch) alongwith the ground-truth 3D voxelizations and search for a rotation that maximizes the voxel overlap between the ground-truth and the rotated predicted shapes. We visualize the prediction frame alignment for car and chair CNNs trained using multi-view observations w/o pose via depth verification images in Figure 5. Note that the prediction frames across classes vary arbitrarily. After the alignment process, the predictions for both categories are in the canonical ShapeNet frame. Single-view Shape Prediction. Our results and the performance under various control settings with stronger supervision is reported in Table 1 and visualized in Figure 3. In general, we observe that the results using our approach are encouragingly close to those obtained using much stronger forms of supervision. This clearly indicates that our approach is able to learn single-view shape prediction despite the lack of either shape or pose information during training. As expected, we also observe that we cannot learn about concavities in chairs via consistency against mask validation images, though we can do so using depth images. e observe a noticeable performance drop in case of mask supervision with unknown translation, as this settings results in scale ambiguities which our evaluation does not account for e.g. we learn to predict larger cars, but further away, and this results in a low empirical score. Role of a Pose prior. While the empirical results reported below correspond to using the correct pose prior, we first show that the primary benefit of this prior is that it encourages the CNN to predict diverse poses and avoid local minima, and that even an approximate prior is sufficient. Single-view Pose Estimation. The results of our approach are reported in Table 1 and visualized in Figure 4. We observe a similar trend for the task of pose prediction – that 7 Figure 7: Visualization of predictions using the Stanford Online Product Dataset. (Top) Input image. (Middle) Predicted shape in the emergent canonical pose. (Bottom) Predicted shape rotated according to the predicted pose. Results. We can apply our approach to learn from this dataset comprising of multiple views with associated (approximate) foreground masks. Since the camera intrinsics are unknown, we assume a default intrinsic matrix (see appendix). We then learn to predict the (unknown) translation and rotation via fp and the (unknown) shape via fs using the available multi-view supervision. Note that the learned CNNs are trained from scratch, and that we use the same architecture/hyperparameters as in the ShapeNet experiments. Some results (on images of novel instances) using our learned CNN are visualized in Figure 7. We see that we can learn to predict meaningful 3D structure and infer the appropriate shape and pose corresponding to the input image. Since only foreground mask supervision is leveraged, we cannot learn to infer the concavities in shapes. We also observe confusion across poses which result in similar foreground masks. However, we feel that this result using training data derived from a challenging real world setting, concretely demonstrates our method’s ability to learn despite the lack of direct shape or pose supervision. To the best of our knowledge, this is the first such result and it represents an encouraging step forward. our approach performs comparably to directly supervised learning using ground-truth pose supervision. Interestingly, we often get lower median errors than the supervised setting. We attribute this to the different topologies of the loss functions. The squared L2 loss used in the supervised setting yields small gradients if the pose is almost correct. Our consistency loss however, would want the observation image to perfectly align with the shape via the predicted pose. Interpretation. The main takeaway from these results is that it is indeed possible to learn shape and pose prediction without direct supervision for either. We empirically and qualitatively observe competitive performances for both these tasks when compared to approaches that leverage stronger forms of supervision. We see that we always learn meaningful shape and pose prediction systems across observation types (mask/depth) and that performance degrades gracefully when using less supervision (known/unknown translation). 4.2. Learning from Online Product Images Dataset. We examined the ‘chair’ object category from the Stanford Online Products Dataset [29] which comprises of automatically downloaded images from eBay.com [1]. Since multiple images (views) of the same product are available, we can leverage our approach to learn from this data. As we also require associated foreground masks for these images, we use an out-of-the-box semantic segmentation system [7] to obtain these. However, the obtained segmentation masks are often incorrect. Additionally, many of the product images were not suited for our setting as they only comprised of a zoom-in of a small portion of the instance (e.g. chair wheel). We therefore manually selected images of unoccluded/untruncated instances with a reasonably accurate (though still noisy) predicted segmentation. We then used the object instances with atleast 2 valid views for training. This results in a filtered dataset of N = 282 instances with Ni = 3.65 views on average per instance. 5. Discussion We presented a framework that allows learning singleview prediction of 3D structure without direct supervision for shape or pose. While this is an encouraging result that indicates the feasibility of using natural forms of supervision for this task, a number of challenges remain to be addressed. As our supervisory signal, we rely on consistency with validation images of unoccluded objects and it would be useful to deal with unknown occlusions. It would also be interesting to apply similar ideas for learning the 3D structure of general scenes though this might additionally require leveraging alternate 3D representations and allowing for object motion to handle dynamic scenes. 8 Acknowledgements. We thank David Fouhey for insightful discussions, and Saurabh Gupta and Tinghui Zhou for helpful comments. This work was supported in part by Intel/NSF VEC award IIS-1539099 and NSF Award IIS-1212798. We gratefully acknowledge NVIDIA corporation for the donation of GPUs used for this research. [19] A. Kar, S. Tulsiani, J. Carreira, and J. Malik. Categoryspecific object reconstruction from a single image. In CVPR, 2015. 2 [20] D. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980. 4 [21] A. Kundu, Y. Li, F. Dellaert, F. Li, and J. M. Rehg. Joint semantic segmentation and 3d reconstruction from monocular video. In ECCV, 2014. 2 [22] A. Laurentini. The visual hull concept for silhouette-based image understanding. TPAMI, 1994. 2 [23] S. Liu and D. B. Cooper. Ray markov random fields for image-based 3d modeling: model and efficient inference. In CVPR, 2010. 2 [24] W. Matusik, C. Buehler, R. Raskar, S. J. Gortler, and L. McMillan. Image-based visual hulls. In SIGGRAPH, 2000. 2 [25] D. J. Rezende, S. A. Eslami, S. Mohamed, P. Battaglia, M. Jaderberg, and N. Heess. Unsupervised learning of 3d structure from images. In NIPS, 2016. 1, 3 [26] N. Savinov, C. Hane, L. Ladicky, and M. Pollefeys. Semantic 3d reconstruction with continuous regularization and ray potentials using a visibility consistency constraint. In CVPR, 2016. 2 [27] N. Savinov, C. Häne, M. Pollefeys, et al. Discrete optimization of ray potentials for semantic 3d reconstruction. In CVPR, 2015. 2 [28] N. Snavely, S. M. Seitz, and R. Szeliski. Photo tourism: exploring photo collections in 3d. In ACM transactions on graphics (TOG), 2006. 2 [29] H. O. Song, Y. Xiang, S. Jegelka, and S. Savarese. Deep metric learning via lifted structured feature embedding. In CVPR, 2016. 8, 2 [30] S. Tulsiani, T. Zhou, A. A. Efros, and J. Malik. Multi-view supervision for single-view reconstruction via differentiable ray consistency. In CVPR, 2017. 1, 3, 4, 5, 2 [31] S. Ullman. The interpretation of structure from motion. Proceedings of the Royal Society of London B: Biological Sciences, 1979. 2 [32] A. O. Ulusoy, A. Geiger, and M. J. Black. Towards probabilistic volumetric reconstruction using ray potentials. In 3DV, 2015. 2 [33] R. J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 1992. 5 [34] X. Yan, J. Yang, E. Yumer, Y. Guo, and H. Lee. Perspective transformer nets: Learning single-view 3d object reconstruction without 3d supervision. In NIPS, 2016. 1, 3, 4, 5, 2 [35] T. Zhou, M. Brown, N. Snavely, and D. Lowe. Unsupervised learning of depth and ego-motion from video. In CVPR, 2017. 3 [36] R. Zhu, H. Kiani, C. Wang, and S. Lucey. Rethinking reprojection: Closing the loop for pose-aware shape reconstruction from a single image. In ICCV, 2017. 3 References [1] https://www.ebay.com/. 8 [2] V. Blanz and T. Vetter. A morphable model for the synthesis of 3d faces. In SIGGRAPH, 1999. 2 [3] A. Broadhurst, T. W. Drummond, and R. Cipolla. A probabilistic framework for space carving. In ICCV, 2001. 2 [4] M. Brown and D. G. Lowe. Unsupervised 3d object recognition and reconstruction in unordered datasets. In 3DIM, 2005. 2 [5] T. J. Cashman and A. W. Fitzgibbon. What shape are dolphins? building 3d morphable models from 2d images. TPAMI, 2013. 2 [6] A. X. Chang, T. Funkhouser, L. Guibas, P. Hanrahan, Q. Huang, Z. Li, S. Savarese, M. Savva, S. Song, H. Su, J. Xiao, L. Yi, and F. Yu. ShapeNet: An Information-Rich 3D Model Repository. Technical Report arXiv:1512.03012 [cs.GR], 2015. 5 [7] L.-C. Chen, G. Papandreou, I. Kokkinos, K. Murphy, and A. L. Yuille. Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs. TPAMI, 2017. 8, 2 [8] C. B. Choy, D. Xu, J. Gwak, K. Chen, and S. Savarese. 3dr2n2: A unified approach for single and multi-view 3d object reconstruction. In ECCV, 2016. 1, 3, 5 [9] B. Curless and M. Levoy. A volumetric method for building complex models from range images. In SIGGRAPH, 1996. 2 [10] J. De Bonet and P. Viola. Roxels: Responsibility weighted 3d volume reconstruction. In ICCV, 1999. 2 [11] D. Eigen and R. Fergus. Predicting depth, surface normals and semantic labels with a common multi-scale convolutional architecture. In ICCV, 2015. 3 [12] S. A. Eslami, N. Heess, T. Weber, Y. Tassa, D. Szepesvari, G. E. Hinton, et al. Attend, infer, repeat: Fast scene understanding with generative models. In NIPS, 2016. 2 [13] M. Gadelha, S. Maji, and R. Wang. Unsupervised 3d shape induction from 2d views of multiple objects. In 3DV, 2017. 2, 5 [14] R. Garg and I. Reid. Unsupervised cnn for single view depth estimation: Geometry to the rescue. In ECCV, 2016. 3 [15] J. J. Gibson. The ecological approach to visual perception. 1979. 1 [16] R. Girdhar, D. Fouhey, M. Rodriguez, and A. Gupta. Learning a predictable and generative vector representation for objects. In ECCV, 2016. 1, 3, 5 [17] C. Godard, O. Mac Aodha, and G. J. Brostow. Unsupervised monocular depth estimation with left-right consistency. In CVPR, 2017. 3 [18] J. Gwak, C. B. Choy, A. Garg, M. Chandraker, and S. Savarese. Weakly supervised 3d reconstruction with adversarial constraint. In 3DV, 2017. 3 9 Appendix : Multi-view Consistency as Supervisory Signal for Learning Shape and Pose Prediction Shubham Tulsiani, Alexei A. Efros, Jitendra Malik University of California, Berkeley {shubhtuls,efros,malik}@eecs.berkeley.edu along each ray. We denote by xpi the occupancy value at the ith sample along this ray. To determine xpi , we look at the 3D coordinate of the corresponding point. Note that this can be determined using the camera parameters. Given the camera intrinsic parameters (fu , fv , u0 , v0 ), the ray corresponding to the image pixel (u, v) travels along the direction th 0 v−v0 ( u−u fu , fv , 1) in the camera frame. Therefore, the i point along the ray, in the camera coordinate frame, is lov−v0 0 cated at li ≡ ( u−u fu di , fv di , di ). Then, given the camera extrinsics (R, t), we can compute the location of his point in the coordinate frame of the predicted shape x̄. Finally, we can use trilinear sampling to determine the occupancy at this point by sampling the value at this using the occupancies x̄. Denoting by T (G, pt) a function that samples a volumetric grid G at a location pt, we can compute the occupancy sampled at the ith as below. A1. Loss Formulation We briefly described, in the main text, the formulation of a view consistency loss L(x̄, C; V ) that measures the inconsistency between a shape x̄ viewed according to camera C and a depth/mask image V . Crucially, this loss was differentiable w.r.t both, pose and shape. As indicated in the main text, our formulation builds upon previously proposed differentiable ray consistency formulation [30] with some innovations to make it differentiable w.r.t pose. For presentation clarity, we first present our full formulation, and later discuss its relation to the previous techniques (a similar discussion can also be found in the main text). Notation. The (predicted) shape representation x̄ is parametrized as occupancy probabilities of cells in a 3D grid. We use the convention that a particular value in the tensor x corresponds to the probability of the corresponding voxel being empty. The verification image V that we consider can be a depth or foreground mask image. Finally, the camera C is parametrized via the intrinsic matrix K, and extrinsic matrix defined using a translation t and rotation R. xpi = T (x̄, R × (li + t) ); u − u0 v − v0 li ≡ ( di , di , di ) fu fv Per-pixel Error as Ray Consistency Cost. We consider the verification image V one pixel at a time and define the perpixel error using a (differentiable) ray consistency cost. Each pixel p ≡ (u, v) has an associated value vp e.g. in the case of a depth image, vp is the recorded depth at the pixel p. Additionally, each pixel corresponds to a ray originating from the camera centre and crossing the image plane at (u, v). Given the camera parameters C and shape x̄, we can examine the ray corresponding to this pixel and check whether it is consistent with the observation op . We define a ray consistency cost function Lp (x̄, C; vp ) to capture the error associated with the pixel p. The view consistency loss can then P be defined as the sum of per-pixel errors L(x̄, C; V ) ≡ Lp (x̄, C; vp ). (4) (5) Note that since the trilinear sampling function T is differentiable w.r.t its arguments, the sampled occupancy xpi is differentiable w.r.t the shape x̄ and the camera C. Probabilistic Ray Tracing. We have so far considered the ray associated with a pixel p and computed samples with corresponding occupancy probabilities along it. We now trace this ray as it travels forward and use the samples along the ray as checkpoints. In particular, we assume that when the ray reaches the point corresponding to the ith sample, it either travels forward or terminates at that point. Conditioned on the ray reaching this sample, it travels forward with probability xpi and terminates with likelihood (1 − xpi ). We denote by zp ∈ {1, · · · , N + 1} a random variable corresponding to the sample index where the ray (probabilistically) terminates, where z p = N + 1 implies that the ray escapes. We call these probabilistic ray terminations as ray termination events p Sampling Occupancies along a Ray. To define the consistency cost function Lp (x̄, C; vp ), we need to consider the ray as it is passing through the probabilistically occupied voxel grid x̄. We do so by looking at discrete points sampled along the ray. Concretely, we sample points at a pre-defined set of N = 80 depth values {di |1 ≤ i ≤ N } 1 and can compute the probability distribution q(zp ) for these. q(z p = i) = (1 − xpi ) i−1 Y xpj ∀(i ≤ N ); mask or depth verification images, a similar generalization is possible for our formulation. (6) A2. Online Product Images Dataset j=1 q(z p = N + 1) = N Y xpj ; We used the ‘chair’ object category from the Stanford Online Products Dataset [29]. To obtain associated foreground masks for these images, the semantic segmentation system from Chen et al. [7], where for each image, the mask was indicated by the pixels with most likely class label as ‘chair’. As the obtained segmentation masks were often incorrect, or objects in the images truncated/occluded, we manually selected images of unoccluded/untruncated instances with a reasonably accurate (though still noisy) predicted segmentation. For our training, we only used the object instances with atleast 2 valid views. This resulting dataset is visualized in Figure 8. The result visualizations shown in the main text are using images from the original online products dataset [29], but correspond to objects instances that were not used for our training (due to lack of a sufficient number of valid views). (7) j=1 Event Costs. Each event corresponds to the ray terminating at a particular point. It is possible to assign a cost to each event based on how inconsistent it is to w.r.t the pixel value vp . If we have a depth observation vp ≡ dp , we can penalize the event z p = i by measuring the difference between dp and di . Alternatively, if we have a foreground image observation i.e. vp ≡ sp ∈ {0, 1} where sp = 1 implies a foreground pixel, we can penalize all events which correspond to a different observation. We can therefore define a cost function ψp (i) which computes the cost associated with event zp = i. ψpdepth (i) = |dp − di |; (8) ψpmask (i) = |sp − 1(i ≤ N )|; (9) Ray Consistency Cost. We formulated the concept of ray termination events, and associated a probability and a cost to these. The ray consistency cost is then defined as the expected event cost. Lp (x̄, C; vp ) = E ψp (zp ) = zp N X q(zp = i)ψp (i) i=1 (10) Note that the probabilities q(zp = i) are a differentiable function of xp which, in turn, is a differentiable function of shape x̄ and camera C. The view consistency loss, which is simply a sum of multiple ray consistency terms, is therefore also differentiable w.r.t the shape and pose. Relation to Previous Work. The formulation presented draws upon previous work on differentiable ray consistency [30] and leverages the notions of probabilistic ray termination events and event costs to define the ray consistency loss. A crucial difference however, is that we, using trilinear sampling, compute occupancies for point samples along the ray instead of directly using the occupancies of the voxels in the ray’s path. Unlike their formulation, this allows our loss to also be differentiable w.r.t pose which is a crucial requirement for our scenario. Yan et al. [34] also use a similar sampling trick but their formulation is restricted to specifically using mask verification images and is additionally not leveraged for learning about pose. Tulsiani et al. [30] also discuss how their formulation can be adapted to use more general verification images e.g. color, semantics etc. using additional per-voxel predictions. While our experiments presented in the main text focus on leveraging 2 Figure 8: Training instances for the online products dataset. We visualize all the training images used along with their (approximate) segmentation masks, with images from the same object grouped together. 3
1cs.CV
arXiv:1705.00819v1 [cs.CE] 2 May 2017 Towards an Automated Optimization of Laminated Composite Structures: Hierarchical Zoning Approach with Exact Blending Rules D.T. Shvarts, F.V. Gubarev DATADVANCE LLC, Russia 117246, Nauchny pr. 17, 15 fl., Moscow Abstract We present an automated methodology to optimize laminated composite structures. Our approach, inspired by bi-level optimization scheme, avoids its prime deficiencies and is based on developed computationally inexpensive stacking sequences reconstruction algorithm, which identically satisfies conventional set of blending rules. We combine it with proposed tight approximation to feasible domain of composite integral parameters and hierarchical zoning procedure to get highly efficient optimization methodology, which we test in two example applications. In both cases it is shown that blending rules compliant optimal solution remains within 10% gap from one with no rules applied. 1 Introduction and Overview Design of an optimal composite structure is the problem to find the best (usually, minimal weight) distribution of locally variable thicknesses and fiber orientations (stacking sequences), which respect structural mechanical constraints and manufacturing (blending) rules as well as some other restrictions, e.g. related to damage-tolerances. It is important to distinguish usual constraints, which quantitatively characterize the degree of their violation by each particular design, and various rules, which are similar to binary markers of design feasibility and for which the notion of violation degree makes no sense. Usual constraints are to be accounted for in conventional optimization-like treatment. On the other hand, blending rules, which we discuss in length in Section 2, require the problem itself to be formulated such that possibility of their violation never arises. Complexity of optimal design process might be illustrated already at the level of usual constraints. Indeed, evaluation of mechanical properties of composite structure is often computationally intensive and requires sophisticated modeling software. This means that one is required to solve large-scale, expensive to evaluate, non-linear, constrained mixed-integer optimization problem, which is, in fact, not possible at all. The remedy is to get some insights into the problem structure, which would allow to apply practically relevant (albeit not rigorous) approximation schemes. Crucial points to be exploited are: 1. Presence of small parameter. In virtually all industrial applications the number of plies ni , laid up at each admissible angle θα , α = 1, ..., Nθ , is large, which is the direct consequence of small single ply thickness. Note that in this paper we exclusively consider the most common case of symmetric balanced laminates with Nθ = 4 possible ply orientations θα ∈ {0, ±45, 90}, although our approach applies equally in more general settings. Therefore the problem actually possesses small parameter 1/N  1, which allows to treat relative number of plies ρα = nα /N (percentages) as continuous non-negative variables. How large N should be in order to justify the relation 1/N  1? Experience revealed that already moderate values N ∼ 10 are, in fact, very close to that limit and therefore the above reasoning applies to virtually all practically relevant cases. 2. Structural problem decomposition. It is crucial that mechanical constraints depend upon specific stacking sequences only indirectly, via the (half-)total number of plies N , percentages ρ and the set of integrated composite material characteristics ξ, known as lamination parameters. Note that there are exponentially large number of specific stacking sequences, which correspond to the same (N, ρ, ξ)-values. Therefore, assuming that performance criteria could be reformulated in terms of these parameters as well (which is not always the case, see below) one could structurally decompose the original problem into two levels (bi-level scheme, detailed, for instance, in Refs. [1, 2, 3, 4]; for a review of recent developments see, e.g., Refs. [5, 6]): i) Global macroscopic level aimed to find optimal (N, ρ, ξ) values. Here one works exclusively with macroscopic characteristics with no regard to actual stacking sequences. 2 The puspose is to satisfy structural mechanical constraints and to provide best attainable performances. It is important that the resulting problem is usual continuous constrained optimization task admitting efficient solution strategies and all the computationally intensive activities are concentrated only at this level. ii) Local microscopic level intended to establish particular stacking sequences, which provide (N, ρ, ξ) parameters values closest to ones, obtained at global level. It is of crucial importance that there are exponentially large number of corresponding solutions [3]. Moreover, despite of imposed manufacturing and integrity constraints (blending and composition rules), the number of realizing stacking sequences remains exponentially large and provides a kind theoretical justification to the methodology presented in this paper. As far as the upper (global) level problem is concerned, parameters to be considered in case of balanced symmetric laminates are: 1. Number of plies nα , α = 0, ±45, 90, laid up at different orientations (or equivalently the corresponding percentages ρα = nα /N ) and the half-total number of plies N . 2. Integral characteristics of laminate composition, the so called lamination parameters ξi , i = 1, 2, 3, defined as: Rh P 2 3 ~ ~ ξ~ = 3 h−3 0 dz ζ(z) z 2 = 3 h−3 N k=1 ζ(zk ) zk ∆z ∈ [−1; 1] (1) T ~ ζ(zk ) = [ cos(2θk ), cos(4θk ), sin(2θk ) ] . Here ∆z denotes one ply thickness with h = N ∆z being the panel half-width, θk is orientation of k-th ply, zk = k ∆z is the distance of k-th lamina to mid-plane and we used vector notations instead of explicit indices. Note that for considered orientations ξ~ has only three components. It is worth noting that nowadays there are several efficient methodologies available to deal with global level problem formulation. It is extremely important to establish exact feasible region of macroscopic parameters, which warrants the existence of realizing stacking sequences. It is known [7, 8, 9] that for given percentages ρ feasible region of ξ-parameters is a convex polytope defined by explicit set of linear constraints. This fact was utilized in Ref. [4] to argue that the usage of collaborative strategies supplemented with standard optimization methods might greatly facilitate the solution process. However, collaborative schemes are generically expected to be less efficient than properly constructed direct approaches. We address this issue in Section 4 and develop tight convex approximation to feasible region of combined (ρ, ξ) parameters, which allows us to apply efficient direct optimization strategies. It is hardly possible to underestimate the advantages of the above partitioning scheme, which provides a clear separation of scales in the problem. Indeed, performance of designed macroscopic structure mostly depends upon its macroscopic characteristics and not on its microscopic composition. Moreover, exponentially large number of stacking sequences corresponding to the same values of (N, ρ, ξ) parameters is reminiscent to the notion of entropy 3 in statistical physics. Given that we are confident that bi-level scheme is fruitful concept and is to be preserved in future developments of composites optimization methods. Unfortunately, in its original formulation presented above it has rather limited applicability. Point is that major part of modeling tools used to predict performances of composite structures are in-house developed and, being provided with complete set of specific stacking sequences, evaluate at once both large and small scale characteristics. Relevant microscopic observables of interest might include, for instance, interlaminar shear stresses, strain check on every ply, etc. Therefore, application of bi-level methodology is often impossible because real-life applications might not technically admit explicit scales separation. In this paper we solve the above issue via the development of fast algorithm to establish representative set of stacking sequences, corresponding to given values of macroscopic parameters. Moreover, reconstructed stacking sequences identically satisfy conventional set of blending and composition rules, which we present and discuss in length in Section 3. Therefore, the algorithm essentially solves the problem posed at second (local) level of bi-level scheme, but it is computationally inexpensive and thus could be embedded into the upper level solution scheme. Although the methodology then ceases to be bi-level, it yet retains prime advantages of bi-level approach: optimization is performed in terms of macroscopic parameters only, representative stacking sequences are reconstructed “on the fly” essentially utilizing the fact that there are exponentially large number of appropriate solutions. Important ingredient of our methodology is the automated hierarchical zoning. Indeed, best performance could ever be achieved only if macroscopic parameters are allowed to be spatially inhomogeneous. In many cases design of large composite structures is based on its subdivision into local panel (or zone) design problems, in which the material composition of each panel is determined under assumed fixed loads. Since different zones are structurally interrelated the process is to be iterated: refined material composition in particular zone affects the loads of other panels and hence requires to solve panel-based problem anew. Even within such iterative settings it remains unclear how to properly select the number and locations of different zones. Inadequate choice might result in vast number of design variables, for which the problem might become intractable. We propose adaptive multi-scale methodology (Section 5), which was proven to be extremely useful in various contexts. It allows not only to automatically select appropriate number of zones, but also significantly facilitates the solution process. Namely, one starts with only a few (perhaps, a single) zones, for which the solution might be found easily although it is expected to be far from being really optimal. Then the obtained zones are subdivided further and problem is solved anew with smaller spatial resolution using previous result as the initial guess. Process stops when either smallest allowed resolution is reached or sequentially achieved gain in performances becomes negligible. Despite of its ideological simplicity the hierarchical zoning outlined above is technically involved. For instance, in real-life applications the number of zones to be considered simultaneously might be large (a few decades, say). Corresponding total number of macroscopic parameters is then of order O(100), making optimization problem almost intractable. To circumvent this we propose to use locality of zones interaction in physically motivated problems. Indeed, the prime reason of rapidly rising dimensionality is structural interconnection 4 of different zones. If there would be no loads redistribution, problem factorizes into the set of independent optimization tasks for each zone. On the other hand, change of the properties of particular zone affects only its neighbors, for sufficiently distant panels loads remain practically the same. This suggests the possibility to develop a specific optimization method, which exploits the locality of zone interactions and remains efficient even when number of zones is large. In Section 6 corresponding implementation is discussed in details. Methodology and algorithms outlined above were applied to well-known horseshoe and wing box composite structure optimization problems, for which a number of results obtained with other methods are available. It is convenient that both test cases might be solved without blending rules imposition (they both admit conventional bi-level treatment) thus providing a reference value, which is a lower bound on attainable mass. It turns out that with exact accounting for composition rules optimal mass remains within ∼ 10% gap from the respective lower bound. This result is encouraging because a priori one could expect that composition rules might induce severe non-local interactions between different zones and hence highly degrade attainable performances. However, this turns out to be not the case. To the contrary, we show that proper accounting for blending rules opens the possibility to design technologically compliant structures with almost theoretically attainable performances. 2 Blending Rules Manufacturing and integrity constraints, commonly known as blending or composition rules, play a central role in composite structures optimization. It is crucial that they are not the constraints per se because it is not possible to quantitatively characterize the degree of their violation. Instead they should be considered as a set of binary classifiers, which mark infeasibility of a particular design. Moreover, if the design appears to be infeasible with respect to blending rules it is hardly possible to point out how its stacking composition could be ameliorated. Therefore, the term “constraints” should not be considered literally, blending rules are indeed “the rules” and are to be satisfied identically. Stacking composition rules don’t have functional form and are usually tabulated in the form of requirements imposed on admissible stacking sequences. For ply orientations {0, ±45, 90} considered in this paper conventional set of blending rules could be summarized as follows [10, 11]: 1. Laminate is to be symmetric and balanced; 2. Minimal allowed relative number (percentage) of plies of each orientation is 8%; 3. At most 3 plies of same orientation could be grouped sequentially together (contiguity); 4. Change of orientation between neighboring plies must not exceed ±45 (disorientation); 5. Orientation angle of outer-most plies is to be ±45; 6. Outer-most plies must be continuous through all the structure (no drop-off); 5 contiguity i ... 1 11111111111 00000000000 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 disorientation horizontal vertical Figure 1: Single zone stacking sequence reconstruction: illustration of “horizontal”/“vertical” constraints and contiguity/disorientation rules implementation. 7. Continuity of ply orientation between zones must be respected (continuity); 8. For every 3 dropped plies there must be at least one continuous ply covering the dropped ones (dropping). Note that major part of the imposed rules might easily be accomplished in the considered approach. Indeed, optimization methodology to be detailed in Section 6 operates with macroscopic design variables, which are the (half-)number of plies N , percentages ρ and laminaion parameters ξ. Balance and symmetry requirements become trivial once we identify n45 = n−45 = n±45 and consider only the half of laminate width. Rules 5 and 6 might be identically accomplished by reservation of required continuous plies at very beginning. Therefore, the only non-trivial rules to be considered are the rules 3,4 and 7,8 marked in bold in the above list. Grouping of them in two pairs is not occasional: contiguity and disorientation rules refer to each particular zone with no regards to its possible neighbors and are to be taken into account always. As for continuity and dropping rules, they operate on the boundaries of neighboring zones and become void when only a single zone is considered. It is essential that only continuity and dropping rules deserve specific attention. This is because it is well-known (see, e.g., Refs. [12, 13] and references therein) how contiguity and disorientation requirements might be accounted for in single zone settings via linear integer programming formulation of stacking sequence reconstruction problem. Since we are going to exploit similar ideas in multi-zoning context it makes sense to briefly review the most essential points. For single zone one is given the (half-)total number of plies N and the corresponding percentages ρα or equivalently the number of plies nα laid up at particular angle, which constitutes the so called zone’s signature vector ~n. For each ply with index i from mid-plane one introduces a set of binary variables si,α = {0, 1} describing its orientation, subject to obvious “horizontal” constraints X si,α = 1 ∀i ∈ [1, N ] (2) α and a set of “vertical” relations X si,α = nα , i 6 (3) which enforce stacking sequence to have given signature (distinction between “horizontal” and “vertical” constraints and qualitative explanation of corresponding mnemonics is illustrated on Fig. 1). In term of binary variables contiguity and disorientation rules become an additional set of linear constraints operating either in bulk of laminate (contiguity) or on the interfaces (disorientation) of neighboring plies [12, 13]. To complete the setup one has to specify the objective function, which is worth to take linear in si,α in order to maintain problem complexity. Various performance measures could be used (for instance, uniformity of plies distribution through the stack), however, in our approach the natural goal is to fit externally given lamination parameters values ξ ∗ . Therefore, the objective function to consider is X f = γi , (4) i where additional variables γi ≥ 0 and corresponding constraints |ξi (s) − ξi∗ | ≤ γi (5) are used to represent L1 norm of ξ-residual as a linear function. A few comments are now in order. In the above formulation total number of plies and zone signature are preserved by construction. On the other hand, for any finite N it is not possible to reproduce externally given continuous values ξ ∗ exactly, the discrepancy is always of order 1/N . However, as far as stiffnesses are concerned, there is no much difference between percentages ρ and lamination parameters ξ, both parameterize rather symmetrically in-plane and out-of-plane stiffness matrices. Then the apparent distinction between ρ and ξ expressed in (3-5) appears unnatural, it is always worth to preserve problem symmetries and to consider ρ, ξ variables on equal footing. To achieve this we alter (3), (4) to read X | si,α − nα | ≤ N κα , (6) i f = X γi + X κα , (7) α i where the additional variables κα are non-negative and the factor N is required to have proper scales of different contributions. Therefore, single zone stacking sequence reconstruction might be performed via the solution of linear integer optimization problems of two types: 1. The one defined in (2-5), which treats ρ, ξ variables differently; 2. The solution of (2,6,7), where percentages and lamination parameters are considered symmetrically. Second formulation is advantageous not only because of symmetry, but also because it is much more flexible with respect to problem feasibility. Both formulations are used below and are to be supplemented with identical set of constraints related to contiguity and disorientation rules, which we do not present because of their simplicity. 7 0000000000000000000000000000000000000000000 1111111111111111111111111111111111111111111 0000000000000000000000000000000000000000000 1111111111111111111111111111111111111111111 0000000000000000000000000000000000000000000 1111111111111111111111111111111111111111111 11111111111 00000000000 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 00000000000 11111111111 111111111111111111111 000000000000000000000 000000000000000000000 111111111111111111111 000000000000000000000 111111111111111111111 000000000000000000000 111111111111111111111 000000000000000000000 111111111111111111111 111111111111111111111111111111111111111111 000000000000000000000000000000000000000000 000000000000000000000000000000000000000000 111111111111111111111111111111111111111111 0000000000 1111111111 000000000000000000000000000000000000000000 111111111111111111111111111111111111111111 0000000000 1111111111 0000000000 1111111111 1111111111 0000000000 0000000000 1111111111 0000000000 1111111111 0000000000 1111111111 0000000000 1111111111 0000000000 1111111111 0000000000 1111111111 0000000000000000000000 1111111111111111111111 1111111111111111111111 0000000000000000000000 00000000000 11111111111 00000000000 11111111111 mid−plane Figure 2: Patch set representation for composite structure with two zones. Determination of stacking sequences for multi-zoned structure differs from above single zone treatment in several aspects. First, there are plies common to different zones, for which corresponding si,α variables are to be identified. Second, continuity and dropping rules are to be explicitly taken into account. To address these issues it is natural to introduce the notion of patch, which is the sequence of several sequentially groupped connected plies of the same area shared between different zones, Fig. 2. Note that patch concept had been considered in the literature already [13, 14, 15], albeit with different purposes. Every patch is characterized only by its width and the connected set of zones it covers (patches covering all zones will be refered to as having no boundary or continuous). Upon stacking sequences determination one could also assign a particular ordered ply orientations to every patch. Description of multizoned structure in term of patches allows to address directly both continuity and dropping rules, as well as to properly assign the above binary degrees of freedom to different zones. Indeed, continuity rule only requires that boundaries of different patches never come to the same location. Dropping rule states that width of patches with non-zero boundary is limited from above. Therefore, the continuity and dropping rules for stacking sequences are transferred identically to the particular requirements on admissible patches. When appropriate exhaustive set of patches is constructed, stacking sequence determination might be performed similar to single zone case. Distinctions are mostly technical, although efficient solution requires specific tricks (see below). For instance, binary variables and corresponding “horizontal” constraints are to be considered now for plies in all patches, while “vertical” constraints are to be introduced for each zone with respect to all covering patches. With these reservations contiguity and disorientation requirements look almost identical to what had been discussed already. Therefore, the prime difficulty to construct stacking sequences for multiple zones reduces to finding an exhaustive set of patches compatible with continuity and dropping requirements at zone boundaries and to the solution of resulting linear integer problem. These are the topics of next Section. 3 Stacking Sequences Reconstruction In this section we provide the detailed description of computationally inexpensive method to reconstruct full set of stacking sequences of multi-zoned laminate composite structures. The problem setup is as follows. There is a known number of zones Z of fixed connectivity, for which both the target number of plies nµ,α µ = 1, ..., Z and the desired lamination parameters 8 11111111111111111111111111111 00000000000000000000000000000 000000000000000000000000000001 11111111111111111111111111111 0000000000000000000 1111111111111111111 2 0000000000000000000 1111111111111111111 0000000000 1111111111 0000000000 1111111111 00000000003 1111111111 11111111111111111111111111111 00000000000000000000000000000 000000000000000000000000000004 11111111111111111111111111111 11111111111111111111 5 B 00000000000000000000 0000000 1111111 0000000000 1111111111 0000000000 1111111111 0000000 1111111 00000000000 11111111111 00000000000 11111111111 0000000000 1111111111 00000000000 11111111111 0000000 1111111 00000000000 11111111111 0000000000 1111111111 00000000000 11111111111 00000000000 11111111111 0000000000 1111111111 0000000 1111111 00000000000 11111111111 0000000000 1111111111 n 1α n 2α n 3α Figure 3: Particular iteration of SLB-like methodology in 3-zone example. Five patches already constructed, indices indicate construction order. Boundary set B is non-zero, nµα are the reduced zones signatures to be exhausted during the process. values ξµ,α are given. Our method consists of two prime stages: 1. selection of exhaustive set of patches p, fulfilling continuity and dropping rules; 2. two-step solution of resulting linear integer problem aimed to ensure contiguity and disorientation requirements and to provide minimal L1 -residual with respect to externally provided zone signatures nµ,α and lamination parameters ξµ,α , µ = 1, ..., Z. The first stage of the method is reminiscent to well-known Shared Layer Blending (SLB) methodology [1, 2, 16] and at each step attempts to construct patches of maximal permitted area to be placed most distantly from the mid-plane (outer blending). At every iteration of the algorithm the following data is available, Fig. 3: • Current signatures of zones nµ,α ; • Boundary set B of already constructed patches, which are the locations of ply drops as they are seen from the mid-plane. To obtain the next patch we sequentially consider all possible integer vectors tα such that at least for one zone tα ≤ nµ,α , ∀α. For given signature t patch candidate is constructed similar to that in conventional SLB, however, we attempt to get all possible candidates. Moreover, it is crucial that not all formally acceptable vectors t are indeed appropriate. One should check first that accumulated patch set together with proposed candidate and remaining zones signatures leaves a chance for resulting linear integer problem to be feasible. Of course, it is not technically possible to solve full fledged integer linear problem for each patch candidate and we utilize simplified scheme, in which feasibility is tested with respect to corresponding relaxed variables. Namely, we augment accumulated patch stack with P candidate patch and patches of width α nµ,α > 0, each covering one remaining zone (thus, the rest of blending rules is temporally discarded) and attempt to solve linear problem of type 1 (see the previous Section) treating all sµ,α variables as continuous. This provides crude but rather restrictive feasiliblity test and ensures that proposed candidate makes sense at all. In practice, feasibility test discards an absolute majority of proposed patches and here 9 000000000000000000000000 111111111111111111111111 000000000000000000000000 111111111111111111111111 46 (−1) 000000000000000000000000 111111111111111111111111 000000000000000000000000 111111111111111111111111 000000000000000000000000 111111111111111111111111 000000000000000000000000 111111111111111111111111 000000000000000000000000 111111111111111111111111 000000000000000000000000 111111111111111111111111 3 00000000000000000 11111111111111111 00000000000000000 11111111111111111 2 00000000000000000 11111111111111111 3 B 3 1111111111111111111111111 000000000000000000000000 11111111111111111 00000000000000000 00000000000000000 11111111111111111 00000000000000000 11111111111111111 0000000000000000000000000000000 1111111111111111111111111111111 0000000000000000000000000000000 1111111111111111111111111111111 000000000 111111111 000000000 111111111 II 1111111111111111 0000000000000000 00000000000000003 1111111111111111 0000000000000000 1111111111111111 0000000000000000 1111111111111111 3 00000000 11111111 00000000000000000000000 11111111111111111111111 0000000000 1111111111 00000000000000000000000 11111111111111111111111 00000000 11111111 3 0000000000 1111111111 3 11111 00000 11111111111111111111111 00000000000000000000000 000000000 111111111 3 00000000 11111111 000000000 111111111 11111111 00000000 00000000 11111111 3 00000000 11111111 11111111111111111111111 00000000000000000000000 111111111 000000000 [8,12,6,0] 000000000 111111111 [6,8,4,0] 000000000 111111111 000000000 111111111 000000000 111111111 000000000 [0,2,0,3] 111111111 000000000 111111111 000000000 111111111 000000000 111111111 000000000 111111111 000000 111111 000000000 111111111 000000000 111111111 000000000 111111111 000000 111111 000000000 111111111 000000000 111111111 000000000 111111111 000000 111111 000000000 111111111 I 11111111111111111111111 00000000000000000000000 00000000000000000000000 11111111111111111111111 40 00000000000000000000000 11111111111111111111111 0000000000000000 1111111111111111 00000000000000000000000 11111111111111111111111 0000000000000000 1111111111111111 3 0000000000000000 1111111111111111 0000000000000000 1111111111111111 2 000000000000000000000000000000 111111111111111111111111111111 11111111 00000000 3 0000000000000000 1111111111111111 000000000000000000000000000000 111111111111111111111111111111 00000000 11111111 3 000000000000000000000000000000000000000000000 111111111111111111111111111111111111111111111 0000000000000000 1111111111111111 000000000000000000000000000000000000000000000 111111111111111111111111111111111111111111111 00000000 11111111 0000000000000000 1111111111111111 3 00000000 11111111 000000000000000000000000000000000000000000000 111111111111111111111111111111111111111111111 3 00000 11111 000000000000000000000000000000000000000000000 111111111111111111111111111111111111111111111 00000000 11111111 00000 11111 00000000000000000000000 11111111111111111111111 3 00000000000000000000000 11111111111111111111111 1111111111111 00000000 00000 11111111111111111111111 00000000000000000000000 00000000 11111111 00000000000000000000000 11111111111111111111111 3 00000000 11111111 00000000000000000000000 11111111111111111111111 I II III III Figure 4: Patch construction algorithm in the example of three line-aligned zones. Left: intermediate state, some patches are completed, non-empty boundary requires to borrow one ply from outer-most layer; reduced zones content is shown at the bottom. Right: final exhaustive set of patches in all zones. Nearby numbers indicate patch widths. we radically differ from conventional SLB. Collected set of patch candidates are then sorted with respect to area and width, most extended and thick candidates are to be considered first. In case current boundary set B is non-zero or patch candidate is not continuous, it is also confronted to continuity and dropping rules: candidates violating any of them are either modified (diminished in width and/or area) or discarded. First encountered suitable candidate is taken to be the next patch. One additonal point is worth mentioning here. It might happen, especially at later iterations, that none of candidates pass feasibiblity check. There might be several possible causes: either boundary set B prevents patch selection or relaxed linear problem appears to be infeasible. However, it is crucial that in both cases one and the same trick, inspired by conventional SLB methodology, recovers normal patch selection algorithm. Namely, it suffices to borrow one continuous ply from some already constructed patch (perhaps, outer most one) and place it at current position in the patch stack. Ultimate reason for this recipe to succeed is that it simultaneously removes boundary set B altogether, diminishes the number of disorientation interfaces and introduces additional layer in the bulk, which might help to satisfy contiguity rules. The only situation, when this trick might not be applicable, corresponds to already exhausted outer-most patch, but this is virtually impossible in practical applications. In these rare cases we simply bypass feasibility checks, patch construction is performed similar to that in conventional SLB methodology. Once appropriate patch with signature t is selected, covered zones are reduced nµ ← nµ − t and process repeats until signatures are zeroed in all zones. For illustration purposes we follow Ref. [1] and consider the above procedure in simple case of three neighboring line-aligned zones 1 − 2 − 3 with initial signatures [40/17/7]s , [35/14/9]s 10 and [29/6/12]s , Fig. 4. Algorithm first selects appropriate outer-most patch of width 46 and signature [6, 27, 6, 7], which is written in general form [n−45 , n0 , n45 , n90 ] because each particular patch is not required to be symmetric. Implied feasibility checks make our method different from conventional SLB at first step already, SLB would pick up outer layer with signature [6, 29, 6, 7] and width 48, but it does not pass consistency test in our approach. After appropriate reductions algorithm continues and second suitable patch is determined to be [1, 0, 2, 0], it covers only first two zones. Non-empty boundary set between second and third zones appear, it has to be taken into account in subsequent construction. Third found patch is again not continuous, has signature [0, 0, 0, 2] and covers second and third zones, boundary remains non-empty, but it is now shifted to be inbetween first and second zones. Fortunately, boundary does not pose serious obstacles for next two iterations of the algorithm, at which patch set is augmented with [1, 0, 2, 0] (first two zones) and [1, 1, 1, 0] (first zone only). At this stage (Fig. 4, left) boundary set becomes maximal and the only possibility to continue is to borrow several plies from outer-most patch. It turns out that single continuous ply placed at current location passes feasibility check. Algorithm in a sense is restarted at this point because boundary set is totally removed. Final patch structure is presented on the right panel of Fig. 4, where the relative widths of all but outer-most patches are correctly preserved. Once the exhaustive patch structure is determined, stacking sequences are reconstructed as described in previous Section. Note that we solve symmetric with respect to ρ, ξ variables formulation, therefore solution is not obliged to reproduce exactly initial ply counts in the zones. In particular, in the considered example output zones signatures are [39/17/8]s , [35/14/9]s and [28/8/9]s respectively with the same total number of plies, but slightly (of order 1/N ) different percentages. The outcome of the above procedure is the ordered set of patches, each characterized by its width and covered set of zones. Then determination of stacking sequences requires to solve integer linear problem, single-zone version of which was described in the previous Section. For reasons already explained we solve symmetric problem, in which percentages ρ and lamination parameters ξ are treated on equal footing. It is apparent that for sufficiently fine zoning the linear integer problem might become prohibitively large, especially when zone signatures are vastly different and corresponding patch set contains significant number of small patches. Then it was proven advantageous to conduct the solution via the two stage process. First, stacking sequence is determined for outer-most continuous patch. Then reduced linear integer problem is solved to establish ply orientations in remaining patches. Underlying idea is essentially the same as in SLB method: in practically all relevant applications top level continuous patch is expected to contain significant number of plies. However, the treatment of outer most patch is much simpler and is equivalent to single zone stacking sequence determination. Therefore, two-stage procedure allows to greatly reduce the overall complexity of the algorithm. It remains to discuss how algorithm recovers in rare cases of final integer linear problem infeasibility. Since continuity and dropping rules are identically fulfilled, binding constraints, which might prevent the solution, are related to either contiguity or disorientation rules. In this case we essentially apply the same trick as above, however, appropriate places to insert continuous plies are to be determined first. In order to establish proper locations we solve 11 specifically reformulated integer linear problem, in which all potentially binding constraints are relaxed and objective function is L1 norm of corresponding relaxation variables. Reformulated problem is always feasible and its solution identifies the minimal set of constraints preventing stacking sequences determination. Then we attempt to add a continuous plies (perhaps, borrowed from outer-most patch) at several determined locations and solve original problem anew. In case of failure algorithm terminates and stacking sequences remain undefined. However, this happens too rarely to be of any practical relevance. 4 Design Space As was argued previously, retaining clear distinction between macroscopic (plies count N , percentages ρ and lamination parameters ξ) and microscopic (specific sequence of ply orientations) “degrees of freedom” is ought to be the cornerstone of efficient optimization strategy. However, integral characteristics appear as redundant variables, for which proper variation ranges and constraints on allowed values are yet to be given. This is the problem of integral parameters feasible domain determination, which deserved much attention in the past [7, 8, 9]. Multiple zones are of no concern here because total allowed design space is the appropriate direct product of identical single zone feasible domains. While there are essentially no specific limits imposed on the number of plies N , it had been known long ago that once percentages ρ are fixed, feasible region Ψρ (ξ) of lamination parameters ξ is convex polyhedra, vertices of which are rather explicit geometrically. Namely, consider an “extreme” configurations consisting of Nθ groups of sequentialy stacked plies of the same orientation. There are Nθ ! stacking sequences of this type and they define the vertices of Ψρ (ξ): convex hull of corresponding “extreme” ξ-values is an exact feasible region for ξ parameters at fixed ρ Ψρ (ξ) = {ξ : A(ρ) ξ ≤ b(ρ) } . (8) This immediately suggests [4] to utilize nested collaborative methods to conduct optimization with respect to (N, ρ, ξ) parameters. Namely, valid direct methodology is to treat N, ρ parameters subject to X N ≥ 0, 0 ≤ ρ ≤ 1, ρi = 1 , (9) i at outer level of nested scheme, while lamination parameters ξ ∈ [−1; 1]3 together with linear constraints (8) are to be considered at inner level. Advantage of this approach is that it exactly covers feasible region Ω of (ρ, ξ) parameters. However, it is not symmetric in (ρ, ξ) and, as might be generically expected for collaborative schemes, is less efficient in terms of required number of model evaluations compared to direct approaches. Therefore, it is desirable to establish tight approximation to feasible domain in the combined (ρ, ξ) space. Our proposition is that feasible region Ω in the space of combined lamination parameters (ρ, ξ) might be described rather precisely in the product form: Ω ≈ Ωρ × Ωξ , where: 12 (10) • Ωρ is convex polytope in ρ-subspace Ωρ : ρi ∈ [ ρmin ; 1 − (Nθ − 1) ρmin ] , X ρi = 1 (11) i with Nθ vertices ρv , for which only one ρ-component takes maximal allowed value, indicated in (11), others remain at minimal bound ρmin ; • Ωξ is again a convex polytope, constructed similar to Ψρ (ξ) above, but using ρv as reference percentages Ωξ = Ψρv (ξ) . (12) Note that since Ψρ (ξ) explicitly accounts for all permulations of “extreme” stacking sequences, Ωξ is in fact ρv independent. In order to verify and access the quality of proposition (10) one should check the inclusions Ωρ × Ωξ ⊆ Ω , Ω ⊆ Ωρ × Ωξ , (13) and estimate the quantity ∆ = | (Ωρ × Ωξ ) \ Ω | / |Ω| , (14) which is the relative difference of volumes of two sets (10). To this end we consider the probabilities P [x ∈ / Ωρ × Ωξ ] for x ∼ U [Ω] , (15) P [x ∈ / Ω] for x ∼ U [Ωρ × Ωξ ] , (16) where U [W ] denotes uniform distribution over the set W . Note that (15) directly measures the relative volume difference ∆, while (16) provides the same with Ω and Ωρ × Ωξ interchanged. Probabilities (15, 16) were measured via Monte-Carlo methodology using sufficiently large 8 (10 ) sample of uniformly distributed points. It turns out that probability (15) is zero with high confidence level (all points, sampled from U [Ω], belong to Ωρ × Ωξ ) Ω ⊂ Ωρ × Ωξ , (17) while (16) is non-zero but small providing the following estimate of relative volume difference 0 < ∆ . 10−5 . (18) Therefore, we heuristically justified the proposition (10). Moreover, direct product Ωρ × Ωξ provides conservative estimate for true feasible region Ω and is sufficiently tight for any practical purposes. Simple to describe approximation Ωρ × Ωξ provides the base for efficient optimization methodology to be described below. 13 111111111111 000000000000 0000000 1111111 000000 111111 000000000000 111111111111 0000000 1111111 000000 111111 000000000000 111111111111 0000000 1111111 000000 111111 000000000000 111111111111 0000000 1111111 000000 111111 000000000000 111111111111 0000000 1111111 000000 111111 000000000000 111111111111 0000000 1111111 Γ0 Γ1 111111 Γ2 000000000000 1111111 111111111111 0000000000000 000000 111111 000000000000 111111111111 0000000 000000 000000000000 1111111 111111111111 0000000111111 1111111 000000 111111 000000000000 111111111111 0000000 1111111 000000 111111 000000000000 111111111111 0000000 1111111 000000 000000000000 1111111 111111111111 0000000111111 000000 111111 1111 0000 00000 11111 0000 1111 00000 Γ 11111 Γ 0000 1111 00000 11111 0000 1111 00000 11111 0000 1111 00000 11111 Γ 11111 0000 1111 00000 Γ 0000 1111 00000 11111 0000 1111 00000 11111 3 5 4 6 Figure 5: Example of three-level hierarchical zoning. 5 Hierarchical Zoning Hierarchical zoning alluded to in Section 1 is an important ingredient of our optimization methodology and is worth of separate discussion. Indeed, in industrial applications it is not a rare case to consider sufficiently large number of zones (up to a few decades). The number of design variables might then becomes as large as O(100), which is about or even beyond the upper limit for engineering optimization methods. However, the challenge here is not only technical: the prime point is that blind application of even most powerfull optimization algorithms is not the most efficient approach to physically motivated problems. Indeed, appropriate solution is known to be smooth in a sense that it possesses some finite length scale of characteristic variations. However, when number of introduced variables becomes too large compared to that length scale optimization process will definitely stall: just by entropy arguments any algorithm will spend almost all the efforts in probing physically irrelevant configurations, corresponding to rough distributions. Unfortunately, it is usually not possible to guess the proper length scale a priori, it is known to be too much case to case dependent. Moreover, some bounds on it might come from external arguments, like ribs/stringers locations etc. In either case, guessing the length scale is known to be error-prone and too much sensitive to various problem details. Instead, another approach, known as multi-scale analysis, was proven to be successful in numerous applications: one starts with largest available length scale (coarse resolution, small number of variables), finds the approximate solution and then dimishes the length scale (refines the resolution, introduces more variables) using previous solution as the initial guess for the next iteration. Multi-scale methodology is quite generic and works in virtually all cases, however, its silent feature to be explicitly mentioned here is that it assumes the use of localized optimization algorithms. Indeed, the very notion of “initial guess” makes sense only in local settings and becomes void once global search is attempted. We will come back to this issue when discussing our optimization methodology. Within the context of laminated composites optimization multi-scale methodology looks extremely simple and reduces to sequential refinement of nested zones within the original structure geometry Γ. Indeed, the ultimate goal of zoning procedure is to find subdivision of original geometry into smaller components (zones) Γµ Γ = ∪µ Γµ , 14 (19) which is sufficiently effective in total mass reduction, but yet is technically feasible to achieve. Of course, there is an infinite number of ways how actual division might be performed, however, several competitive factors are to be taken into account. On one hand, smaller total mass requires larger number of zones. On the other hand, gain in mass diminishes with each resolution refinement, while finding the solution becomes more and more expensive. Usually there are some technological constraints on smallest possible zone geometry and it is not a rare case when finest reachable zoning structure is known in advance. Although theoretically it is possible to discuss fully automated zoning, we are currently not in a position to do this quantitatively. Instead, we assume that smallest possible zones geometry Γµ is known beforehand and solve the problem how to obtain corresponding optimal parameters (N, ρ, ξ)µ adaptively. Schematically, utilized procedure looks as follows. We always start with most coarse zoning, in which the whole structure is considered as a single zone, Γ(0) = Γ. Corresponding optimal solution is then easy to obtain, although it might be far from real optimality. At every iteration we have determined therefore some exhaustive set of zones Γµ , fulfilling (19) together with corresponding zone-specific parameters (N, ρ, ξ)µ . Then some of Γµ are divided further into several smaller zones and localized optimization method (see below) is applied to get parameters of smaller zones using previous solution as the initial guess. Process repeats until either smallest allowed zones geometries are reached or the gain in total mass becomes negligible. Three-step zoning procedure is illustarted on Fig. 5. It should be noted that adaptive choice of zones is only the convenient representation of entire composite structure during the optimization process. Any involved modeling tools always operate in terms of smallest available zones regardless of current zoning level. 6 Optimization Methodology This section provides a synthesis to what had been discussed so far and assembles into efficient optimization methodology prime ingredients of our approach: hierarchical zoning, separation of macro- and micro-scopic scales, computationally inexpensive (“on-line”) reconstruction of stacking sequences fulfilling all the required blending rules. We consider the following generic setup. There is a composite structure of fixed geometry Γ, for which finest allowed (0) subdivision into elementary subzones is provided, Γ = ∪k∈K Γk (from now on elementary (0) zones, which cannot be refined further and for which the geometries Γk are assumed to be known, are refered to as subzones). Zones are then defined as non-intersecting unions of several connected subzones (0) Γµ = ∪k∈Kµ Γk , ∪µ Kµ = K , K µ ∩ Kν = , (20) connectivity structure of which could be derived from that of subzones. The purpose is to find reasonably efficient zoning Γ = ∪µ Γµ and stacking sequences Sµ in all zones, for which total mass of the structure is minimal provided that specific set of reserve factors RFk , associated with each elementary subzone, remains sufficiently large, RFk ≥ 1. Without loss of generality we assume the same normalization of all reserve factors, which allows us to 15 define zone-specific single RF-function: RFµ = min RFk k∈Kµ (21) It is assumed that each reserve factor RFk is to be estimated with some externally given modeling software operating in terms of stacking sequences Sk , which for selected zoning are the same within the particular zone, Sk = Sµ , k ∈ Kµ . Proposed methodology is iterative and as follows from above generic setup its outer-most level is ought to be hierarchical zoning refinement. Initially we consider trivial partitioning consisting of single zone. Then at every iteration current zones are divided into two or three smaller zones until either minimal geometries Γ(0) are reached or termination criteria trigger algorithm completion. Therefore at every outer-most step the following data is available: • definition of zones {Kµ } as the collections of connected elementary subzones with empty pair-wise intersections; • current approximations Xµ∗ ≡ (N ∗ , ρ∗ , ξ ∗ )µ to optimal solution in each zone. Inner loop of our algorithm performs constrained minimization of total mass P minX µ M (Xµ ) (22) RFµ (X) ≥ 1 with respect to the design variables X = [ X1 , ... , XZ ] , (23) which are the collection of number of plies Nµ , percentages ρµ and lamination parameters ξµ for all current zones. Variation domain of design variables is the direct product of feasible regions, determined for each factor Xµ separately as described in Section 4. As we already noted direct optimization of (22) is not only problematic technically, but is also not the most efficient approach. Indeed, the problem (22) possesses specific structure, namely, various factors Xµ are totally factorized in the objective function and their interdependencies are only due to the imposed constraints. Furthermore, in all physically motivated problems some sort of locality is expected to hold. Qualitatively, altering the stacking sequence Xµ in a particular zone mostly affects reserve factors of this and some finite number of neighboring zones, while too distant RFν remain practically the same. Quantitatively, this means that in the decomposition δRFµ / δXν = D · δµν + Qµν (24) diagonal term D dominates, while off-diagonal entries Q rapidly fall down with the distance between zones µ and ν. Practically, however, it is not possible to infer appropriate length scale, which dictates the number and locations of dependent neighbors. Moreover, situation often becomes more complicated when additional structural elements (beams, ribs 16 and such), not present explicitly in problem formulation, mediate the interactions. Given that we decline to determine zone interdependencies in advance, instead we propose to do that adaptively with coordinate-descent like optimization method, in which dependencies are estimated dynamically during the process. In more details, basic inner loop of our algorithm considers design variables Xµ sequentially (after appropriate ordering, see below). At iteration µ optimization is performed in the reduced design space X ∈ [ X1∗ , ... , Xµ∗ ± ∆ , ... , XZ∗ ] (25) with respect to Xµ variables only, subject to linear constraints defining the appropriate feasible region. In other words, all the variables are held fixed at current guess Xν∗ , except Xµ , which is allowed to vary within the adjustable region around the current solution. Note that despite of the reduction of the design space the number of constraints does not change, at every iteration all zone-specific reserve factors (21) are taken into account. Particular feature of our methodology is that currently known best solution explicitly enters the formalism, which therefore becomes directly applicable in multi-scale context (see above). However, there remain two crucial issues yet to be resolved. First, it is well known that coordinate descent methods applied in constrained problems often get stuck in even not a locally optimal locations, because, in particular, coordinate axes have nothing to do and are not aligned with tangent space to currently active constraints. Second, due to the usual computational complexity of engineering applications it is custom to use Surrogate-Based Optimization (SBO) methods to search for the solution. However, SBO by its nature is a global methodology, for which the notion of proper initial guess is rather illusive. To circumvent both issues we propose to supplement SBO methodology, applied in the reduced design space (25), with filtering approach, well known in mathematical programming (see, e.g., Refs. [17, 18, 19] and references therein). In a nutshell, filter is a binary marker, which operates in two-dimensional space of objective function values and single measure of constraints violation and marks every evaluated design as being “good” if it improves currently selected Pareto optimal set of solutions. Most important for us feature of filtering is that it might allow and mark as acceptable the designs with rather significant constraints violation. This suggests that filter might be an invaluable tool within the considered methodology. In more details, we switch on the filter facility at the beginning of every cycle of inner optimization loop. Then the next SBO optimization with respect to Xµ variables is peformed as usual, however, the selection of best found solution is done only among the designs accepted by filter. In particular, best accepted solution becomes the “base point” X ∗ for the next SBO iteration dealing with next group of variables Xν . Experience revealed that filtering almost totally ameliorates the deficiencies of utilized SBO-based coordinate descent method. However, to be on the safe side we also monitor interdependencies of various groups of variables and attempt to perform optimization of several zones simultaneously in case no progress had been achieved in last performed inner loop with feasible base point X ∗ . Indeed, coordinate descent with respect to Xµ might get stuck due to the activity of some constraints RFν , variation of which with Xµ precludes the progress of the algorithm. Within the SBO context Xµ variables are sampled somehow 17 and it is natural then to consider violation probabilities of different constraints. Zones with maximal violation probabilities are dependent with the considered one and most likely prevent algorithm progress. Due to the mentioned above locality properties the number dependent active zones is usually small. Data: zoning structure L for ∀ zoning levels l ∈ L do X ∗ ← best solution reset filter for ∀ zones µ ∈ l do optimize for Xν ∈ Xν∗ ± δµν ∆, ∀ν collect dependencies Dµ = {µ, µ1 , µ2 , ...} X ∗ ← best accepted by filter if solution not improved then for ∀ zones µ ∈ l do optimize for Xν ∈ Xν∗  ±∆· 1, ν ∈ Dµ , 0, ν ∈ / Dµ ∀ν if termination criteria then break Figure 6: Summary of implemented optimization scheme. To complete the specification of our optimization methodology it remains to specify termination criteria and discuss the best suited ordering of zones to be considered in inner optimization loop. Termination criteria are simple: either no progress was achieved during the last cycle or current best solution is feasible with all the constraints being active. As far as ordering is concerned, we found that it is advantageous to consider first infeasible zones with RFµ < 1. Then inactive constraints with corresponding groups of variables Xµ are worth to treat next. Finally, active zones are to be optimized, but with one essential modification. For active zones there is no hope to improve the mass. Therefore, it makes sense to fix the number of plies Nµ for active zone and to maximize its reserve factor with respect to remaining variables (ρ, ξ)µ . This is essentially equivalent to the selection of best stacking sequence at fixed total mass. Simplified scheme of our optimization algorithm is presented on Fig. 6. Note that we do not discuss the details of utilized SBO methods, these were provided by algorithmic core of pSeven integration platform [20], on which our technical implementation is based. It is important and very convenient that stacking sequence reconstruction remains an optional feature in the above scheme. Depending on specific modeling software one could use either full-fledged optimization with “on-line” determination of allowed stacking sequences or fall back to conventional bi-level strategy. 18 Figure 7: Horseshoe test case setup: geometry and applied fixed loads. 7 Application Examples In this section we discuss two application examples, with which we tested our methodology. Tests selection is primarily dictated by availability of corresponding technical details in the literature, unfortunately, for many interesting applications technicalities could not be extracted from public sources. First test case is a well known horseshoe problem [10, 21], in which zone loads are fixed and no issues with zones interdependencies arise. Historically, we considered it at early stages of reported study using yet unfinished versions of our methodology. For that reason we believe that presented results are not the best attainable, however, they are quite satisfactory and hence deserve some discussions. Second example is a conventional wing box test problem [1, 2, 16, 22], which adequately reflects majority of issues present on real-life applications: loads redistribution upon the change of single zone parameters, presence of “hidden” structural elements etc. It is important that both examples might be considered with no explicit reference to specific stacking sequences (without blending rules applied). Corresponding treatment is equivalent to the solution of upper level problem in conventional bi-level scheme and provides strict lower bound on attainable total mass, which is to be compared with the solution respecting blending rules. In both cases we found that reconstruction of proper stacking sequences worsens the solution as it should, but optimal mass remains within 10% gap from corresponding theoretical lower bound. 19 N m RF N m RF 1 11 2.1 1.0 10 17 6.4 1.0 2 9 1.9 1.0 11 14 5.4 1.0 3 8 1.6 1.0 12 14 5.1 1.0 4 16 6.0 1.0 13 11 2.1 1.0 5 14 5.2 1.0 14 10 1.9 1.0 6 12 2.2 1.1 15 13 2.5 1.0 7 10 1.9 1.0 16 14 3.0 1.0 8 13 2.5 1.0 17 9 1.9 1.0 9 20 6.9 1.0 18 12 1.9 1.1 Table 1: Horseshoe test case: total number of plies, masses [lb] and reserve factors obtained without blending rules imposition. 7.1 Horseshoe Model Setup of horseshoe problem is illustrated on Fig. 7. Plain horseshoe-like structure consists of 18 elementary subzones, for which the geometry and applied loads are known in advance. Objective function is the total mass, while 18 constraints correspond to the stability requirements for all subzones (buckling reserve factors). Since there are no shear stresses buckling reserves might be evaluated semi-analytically [22]. First we consider the horseshoe test case without blending rules applied. Due to the fixed loads problem factorizes into 18 independent subproblems, solution of which is straightforward. Technically we performed optimization in pSeven integration platform, which provides among other things efficient optimization algorithms. Resulting optimal mass distribution in different subzones, corresponding reserve factors and optimal number of plies in each subzone are summarized in Table 1, where we rounded all floats to one significant digit. Conducted solution provides strict lower bound on the attainable mass ∗ Mth = 61.0 lb. (26) Once the solution at upper level of conventional bi-level scheme is obtained, it is instructive to consider what happens if we solve lower level problem as well. Direct application of stacking sequences reconstruction algorithm of Section 3 reveals that in account of blending rules traditional bi-level scheme produces 18% worse mass ∗ Mbi−level = 72.2 lb. (27) Note that we intentionally do not provide the details of obtained solution. As will become clear shortly it is not the best possible and for brevity reasons corresponding stacking sequences and RF distribution are omitted. Next let us consider the problem using methodology proposed in this paper. First, we define the structure of hierarchical zoning: there are 4 zoning levels having 1, 3, 9, 18 zones, 20 11111111111111111111111111111111111111 00000000000000000000000000000000000000 00000000000000000000000000000000000000 11111111111111111111111111111111111111 00000000000000000000000 0000000000000 1111111111111 00000000000000000000000000000000000000 11111111111111111111111111111111111111 00000000000011111111111111111111111 111111111111 0000000 1111111 1111111 0000000 1111111 00000000 11111111 000000000000 111111111111 0000000 1111111 0000000 00000000 11111111 00000000000000000000000 11111111111111111111111 0000000000000 1111111111111 00000000000000000000000000000000000000 11111111111111111111111111111111111111 000000000000 111111111111 0000000 1111111 0000000 1111111 00000000 11111111 000000000000 111111111111 0000000 1111111 0000000 1111111 00000000 11111111 00000000000000000000000 11111111111111111111111 0000000000000 1111111111111 00000000000000000000000000000000000000 11111111111111111111111111111111111111 000000000000 111111111111 0000000 1111111 0000000 1111111 00000000 11111111 000000000000 111111111111 0000000 1111111 0000000 1111111 00000000 11111111 00000000000000000000000 11111111111111111111111 0000000000000 1111111111111 00000000000000000000000000000000000000 11111111111111111111111111111111111111 000000000000 111111111111 0000000 1111111 0000000 1111111 00000000 11111111 000000000000 111111111111 0000000 1111111 0000000 1111111 00000000 11111111 00000000000000000000000 11111111111111111111111 0000000000000 1111111111111 00000000000000000000000000000000000000 11111111111111111111111111111111111111 000000000000 111111111111 0000000 1111111 1111111 0000000 1111111 00000000 11111111 000000000000 111111111111 0000000 1111111 0000000 00000000 11111111 00000000000000000000000 11111111111111111111111 0000000000000 1111111111111 00000000000000000000000000000000000000 11111111111111111111111111111111111111 000000000000 111111111111 0000000 1111111 0000000 1111111 00000000 11111111 000000000000 111111111111 0000000 1111111 0000000 1111111 00000000 11111111 00000000000000000000000 11111111111111111111111 0000000000000 1111111111111 00000000000000000000000000000000000000 11111111111111111111111111111111111111 000000000000 111111111111 0000000 1111111 0000000 1111111 00000000 11111111 000000000000 111111111111 0000000 1111111 0000000 1111111 00000000 11111111 00000000000000000000000 11111111111111111111111 0000000000000 1111111111111 00000000000000000000000000000000000000 11111111111111111111111111111111111111 000000000000 111111111111 00000000000000000000000 11111111111111111111111 0000000000000 1111111111111 00000000000000000000000000000000000000 11111111111111111111111111111111111111 000000000000 111111111111 000000000000 111111111111 0000000000000 1111111111111 00000000000000000000000000000000000000 11111111111111111111111111111111111111 000000000000 111111111111 000000000000 111111111111 11111−st level 0000 0000000000000 1111111111111 00000000000000000000000000000000000000 11111111111111111111111111111111111111 000000000000 111111111111 000000000000 111111111111 0000000000000 1111111111111 00002−nd level 1111 00000000000000000000000000000000000000 11111111111111111111111111111111111111 000000000000 111111111111 000000000000 111111111111 0000000000000 1111111111111 0000 1111 00000000000000000000000000000000000000 11111111111111111111111111111111111111 000000000000 111111111111 000000000000 111111111111 0000000000000 1111111111111 00000000000000000000000000000000000000 11111111111111111111111111111111111111 000000000000 111111111111 0000 1111 000000000000 111111111111 0000 1111 0000000000000 1111111111111 00000000000000000000000000000000000000 11111111111111111111111111111111111111 000000000000 111111111111 00003−rd level 1111 000000000000 111111111111 0000000000000 1111111111111 00000000000000000000000000000000000000 11111111111111111111111111111111111111 000000000000 111111111111 000000000000 111111111111 0000000000000 1111111111111 00000000000000000000000000000000000000 11111111111111111111111111111111111111 0000000000000 1111111111111 00000000000000000000000000000000000000 11111111111111111111111111111111111111 000000000000 111111111111 0000000000000 1111111111111 00000000000000000000000 11111111111111111111111 00000000000000000000000000000000000000 11111111111111111111111111111111111111 0000000 1111111 0000000 1111111 00000000 11111111 000000000000 111111111111 0000000 1111111 0000000 1111111 00000000 11111111 000000000000 111111111111 0000000000000 1111111111111 00000000000000000000000 11111111111111111111111 00000000000000000000000000000000000000 11111111111111111111111111111111111111 0000000 1111111 0000000 1111111 00000000 11111111 000000000000 111111111111 0000000 1111111 0000000 1111111 00000000 11111111 000000000000 111111111111 0000000000000 1111111111111 00000000000000000000000 11111111111111111111111 00000000000000000000000000000000000000 11111111111111111111111111111111111111 00000001111111 1111111 0000000 1111111 00000000 11111111 000000000000 111111111111 0000000 1111111 0000000 00000000 11111111 00000000000011111111111111111111111 111111111111 0000000000000 1111111111111 00000000000000000000000 00000000000000000000000000000000000000 11111111111111111111111111111111111111 0000000 1111111 0000000 1111111 00000000 11111111 000000000000 111111111111 0000000 1111111 0000000 1111111 00000000 11111111 000000000000 111111111111 0000000000000 1111111111111 00000000000000000000000 00000000000000000000000000000000000000 11111111111111111111111111111111111111 00000001111111 1111111 0000000 00000000 11111111 00000000000011111111111111111111111 111111111111 0000000 1111111 0000000 1111111 00000000 11111111 000000000000 111111111111 0000000000000 1111111111111 00000000000000000000000 11111111111111111111111 00000000000000000000000000000000000000 11111111111111111111111111111111111111 0000000 1111111 0000000 1111111 00000000 11111111 000000000000 111111111111 00000001111111 1111111 0000000 00000000 11111111 00000000000011111111111111111111111 111111111111 0000000000000 1111111111111 00000000000000000000000 00000000000000000000000000000000000000 11111111111111111111111111111111111111 00000001111111 1111111 0000000 1111111 00000000 11111111 000000000000 111111111111 0000000 1111111 0000000 00000000 11111111 00000000000011111111111111111111111 111111111111 0000000000000 1111111111111 00000000000000000000000 00000000000000000000000000000000000000 11111111111111111111111111111111111111 0000000000000 1111111111111 00000000000000000000000 11111111111111111111111 00000000000000000000000000000000000000 11111111111111111111111111111111111111 Figure 8: Hierarchical zoning in horseshoe test case: first three levels include 1, 3, and 9 zones, last one consists of 18 zones, which are the same as elementary subzones. For all but last levels zones ordering is counter-clockwise. 1 2 3 1111111111111111111111111111111111 0000000000000000000000000000000000 0000000000000000000000000000000000 1111111111111111111111111111111111 0000000000000000000000000000000000 1111111111111111111111111111111111 0000000000000000000000000000000000 1111111111111111111111111111111111 0000000000000000000000000000000000 1111111111111111111111111111111111 0000000000000000000000000000000000 1111111111111111111111111111111111 00000000000000000000000 11111111111111111111111 00000000000000000000000 11111111111111111111111 00000000000000000000000 11111111111111111111111 000000000000 111111111111 0000000000000000000000000000000000 1111111111111111111111111111111111 000000000000 111111111111 000000000000 111111111111 0000000000000000000000000000000000 1111111111111111111111111111111111 000000000000 111111111111 000000000000 111111111111 0000000000000000000000000000000000 1111111111111111111111111111111111 000000000000 111111111111 0000000000000000000000000000000000 1111111111111111111111111111111111 000000000000 111111111111 111111111111 000000000000 000000000000 111111111111 000000000000 111111111111 1111111111111111111111111111111111 0000000000000000000000000000000000 000000000000 111111111111 000000000000 111111111111 000000000000 111111111111 Figure 9: Horseshoe test case: patch structure of optimal solution at second zoning level. 1 2 3 4 5 6 7 8 9 1111111111111111111111111111111111 0000000000000000000000000000000000 0000000000000000000000000000000000 1111111111111111111111111111111111 000000000000 111111111111 0000 1111 0000000000000000000000000000000000 1111111111111111111111111111111111 000000000000 111111111111 0000 1111 0000000000000000000000000000000 1111111111111111111111111111111 000000000000 111111111111 0000000000000000000000000000000 1111111111111111111111111111111 111111111111111111111111111 000000000000000000000000000 11111111111111111111111 00000000000000000000000 000000000000 111111111111 000000000000 111111111111 000000000000 111111111111 000000000000 111111111111 000000000000 111111111111 0000 1111 000000000000 111111111111 000000000000 111111111111 0000 1111 0000 1111 00000000 11111111 00000000 11111111 111111111111 000000000000 0000 1111 0000 1111 0000 1111 0000000000000000 1111111111111111 1111111111111111111111111111111111 0000000000000000000000000000000000 0000 1111 0000000000000000 1111111111111111 0000 1111 0000 1111 0000000000000000000000000000000000 1111111111111111111111111111111111 0000 1111 0000000000000000000000000000000000 1111111111111111111111111111111111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 1111111111111111111111111111111111 0000000000000000000000000000000000 1111 0000 0000 1111 11111111 00000000 00000000 11111111 00000000 11111111 00000000 11111111 00000000 11111111 00000000 11111111 00000000 11111111 Figure 10: Horseshoe test case: patch structure of optimal solution at third (finest) zoning level. 21 respectively (Fig. 8), zones at last level coincide with elementary subzones on Fig. 7. At first zoning level the entire horseshoe structure is considered as a single zone, corresponding solution does not involve patch construction algorithm. Optimal stacking sequence at first level is (1) [ 8 / 4 / 4 ]s (28) (1) [−45/02 /−45/02 /45/0/45/902 /45/90/−45/90/−45/03 /45]s where conventional notations [n0 /n±45 /n90 ] had been used and subscript indicates, that this is only the half of total ply counts due to the symmetry (stacking sequences are always ordered from mid-plane to outer skin). Corresponding mass and buckling reserve factor are M (1) = 93.6 lb, RF (1) = 1.02 . (29) The above solution is used as an initial guess to conduct optimization at second zoning level, which includes three zones. Optimization methodology had been discussed in length already, hence we simply quote the results obtained. Optimal set of patches is presented on Fig. 9, where the relative patch widths are correctly preserved. Corresponding stacking sequences, which are derived from the determined patch structure via two-step linear integer programming are (2) zone 1 : [ 5 / 3 / 3 ]s (2) [0/−45/0/45/0/−45/903 /45/0/−45/0/45]s zone 2 : [ 6 / 5 / 4 ]s (2) [0/452 /02 /45/0/−452 /90/−452 /903 /45/0/−45/0/45]s zone 3 : [ 4 / 4 / 5 ]s (2) [0/45/0/−45/90/45/90/−452 /903 /45/0/−45/0/45]s (2) (30) (2) while the corresponding reserve factors and optimal mass are given by M (2) = 82.5 lb, RF (2) = ( 1.15, 1.02, 1.14 ) (31) Solution at third level is obtained similarly, corresponding optimal patches are shown on Fig. 10, again with preservation of relative patch widths, stacking sequences for all 9 zones 22 are (3) zone 1 : [ 3 / 3 / 4 ]s (3) [90/−45/03 /45/902 /−452 /90/452 ]s zone 2 : [ 2 / 3 / 2 ]s (3) [90/−45/0/−452 /90/45/0/452 ]s zone 3 : [ 4 / 4 / 2 ]s (3) [90/−45/0/−45/0/−452 /0/45/90/45/0/452 ]s zone 4 : [ 7 / 4 / 2 ]s (3) [90/−452 /0/−45/02 /−45/03 /45/90/45/0/452 ]s zone 5 : [ 6 / 5 / 4 ]s (3) [90/45/90/−452 /0/−45/0/45/90/−45/0/−45/03 /45/90/452 ]s zone 6 : [ 4 / 4 / 4 ]s (3) [90/−452 /0/45/90/−452 /03 /45/902 /452 ]s zone 7 : [ 5 / 4 / 3 ]s (3) [90/−45/0/−452 /0/−45/03 /45/902 /453 ]s zone 8 : [ 2 / 3 / 2 ]s (3) [90/−453 /02 /45/90/452 ]s zone 9 : [ 2 / 4 / 3 ]s (3) [90/45/0/−452 /902 /−452 /0/453 ]s (3) (3) (3) (3) (32) (3) (3) (3) (3) while the corresponding RF factors and optimal mass are given by RF (3) M (3) = 70.3 lb, = ( 1.14, 1.05, 1.76, 1.06, 1.07, 1.09, 1.02, 1.11, 1.00 ) (33) As far as the solution at last zoning level is concerned, we found that it is not much different from (32, 33) (mass improvement is less than 2%), but is significantly more expensive to obtain. Therefore, in the horseshoe test case reasonable, but yet efficient in mass reduction zoning structure corresponds to level 3 of our scheme (9 zones), consideration of smaller length scales seems to be not justified. A few comments are now in order. First important observation is that optimal mass (33), obtained in explicit account of all blending rules, is only 13% worse than the corresponding lower bound (26) and is slightly below of the result of bi-level approach, Eq. (27). This fact becomes even more encouraging if we remind that it corresponds to twice coarser zone resolution, for which the mass is expected to be larger. Simultaneously, it is apparent that presented solution still possesses further improvement potential. Indeed, reserve factors for zones 1 and 8 are ∼ 10% larger than required, while in zone 3 excess is as large as 75%. It is true that gap of order 10% in RF values is seen already at level 2 solution and hence could be explained by some deficiencies of yet unfinished optimization methodology used to solve horseshoe example. However, even with this reservation zone 3 result deviates too much. We 23 1111111111111111111111111 0000000000000000000000000 16 17 18 0000000000000000000000000 1111111111111111111111111 0000000000000000000000000 1111111111111111111111111 13 14 15 15 in 0000000000000000000000000 1111111111111111111111111 0000000000000000000000000 1111111111111111111111111 10 11 12 0000000000000000000000000 1111111111111111111111111 0000000000000000000000000 1111111111111111111111111 7 8 9 0000000000000000000000000 1111111111111111111111111 0000000000000000000000000 1111111111111111111111111 4 5 6 0000000000000000000000000 1111111111111111111111111 88.2 in 0000000000000000000000000 1111111111111111111111111 1 2 3 0000000000000000000000000 1111111111111111111111111 spar z y rib 139.5 in x Figure 11: Wing box test case: geometry and setup of the problem. suspect that this is a direct consequence of blending rules imposition. Indeed, inspection of Fig. 7 reveals that loads for zones 2 and 4 significantly differ and this is reflected in notable difference in corresponding stacking sequences. However, blending rules require zone 3 to be in-between its neighbors in terms of ply counts and this is unrelated to actual loads applied to it. Then it might easily happen that corresponding RF factor is far beyond imposed bound and we suggest that this is the reason of observed 75% excess. 7.2 Wing Box Model As the second application example we consider well-known wing box test problem, which was extensively studied in the past [1, 2, 16, 22]. Problem setup is shown on Fig. 11: there are four spars and three ribs in wing box structure, which are covered from bottom and top sides with 9+9 composite panels, optimal stacking sequences of which are to be determined. Wing box is clamped at the root, external loads are applied at the tip as shown on the figure. Material properties, allowed stains and safety factors are taken the same as in [22], mass of the structure is obtained using fixed thickness of one ply 0.005 in and density 0.057 lb/in3 . However, compared to Ref. [22] we calculate buckling reserve factors differently following the analysis of Refs. [23, 24] (details are provided in Appendix A). Although it might be guessed in advance that active set of constraints corresponds to strains for bottom panels and buckling for top, we used generic definition of zone specific reserve factor (21) with minimum taken with respect to all load types. Static parts of the structure (ribs and spars) are fixed and have 22 alternating ±45 plies with the same material properties. To complete the problem setup it remains to discuss technical aspects of the solution. 24 000000000 111111111 000000000000000 111111111111111 111111111111 000000000000 0000000000000 1111111111111 000000000 111111111 000000000000000 111111111111111 000000 111111 00000000 11111111 000000000 111111111 000000000000000 111111111111111 00000 11111 000000 111111 00000 11111 000000000000 111111111111 0000000000000 1111111111111 000000000 111111111 000000000000000 111111111111111 000000 111111 13 000000000000 111111111111 0000000000000 1111111111111 14 00000000 11111111 15 00000 11111 000000 111111 00000 11111 000000000000 111111111111 0000000000000 1111111111111 00000000 11111111 1111111111111111 0000000000000000 00000000 11111111 00000 11111 000000 111111 00000 11111 000000000000 111111111111 0000000000000 1111111111111 000000000 111111111 11111111 12 000000 0000000000000000 1111111111111111 00000000 11111111 000000000000 111111111111 0000000000000 1111111111111 000000000 11111111 00000000 000000000 111111111 00000000 11111111 000000000 111111111 00000000 11111111 000000000 111111111 10 111111111 000000 111111 000000000 111111111 00000000 11111111 000000000 111111111 9 7 8 00000000 11111111 000000000 111111111 00000000 11111111 000000000 111111111 00000000 11111111 000000000 111111111 00000000 11111111 000000000 111111111 00000000 11111111 4 00000000 11111111 000000000 111111111 00000000 111111111 11111111 5 11111111 6 000000000 00000000 11111111 000000000 111111111 00000000 11111111 000000000 111111111 00000000 4 5 6 16 11111111 00000000 000000000 111111111 00000000 11111111 00000000 11111111 000000000 111111111 00000000 11111111 1 2 3 17 18 111111111 000000000 00000000 11111111 000000000 111111111 000000000 111111111 00000000 11111111 000000000 111111111 000000000 111111111 00000000 11111111 000000000 111111111 000000000 111111111 00000000 11111111 000000000 111111111 1 2 3 Figure 12: Wing box test case: hierarchical zoning at second (left) and third (right) levels. First level consists of two zones covering entire bottom and top sides. 1 [29/6/4]s 1.09 7 [31/7/4]s 1.0 13 [42/13/15]s 1.01 2 [17/4/2]s 1.05 8 [18/4/3]s 1.01 14 [21/14/17]s 1.0 3 [3/3/1]s 1.0 9 [5/4/1]s 1.03 15 [6/14/17]s 1.0 4 [32/7/4]s 1.09 10 [49/11/9]s 1.0 16 [29/12/29]s 1.02 5 [19/4/2]s 1.03 11 [29/11/14]s 1.02 17 [18/15/19]s 1.08 6 [6/3/3]s 1.11 12 [4/13/14]s 1.01 18 [4/14/17]s 1.0 Table 2: Wing box test case: zone signatures and RF factors at third zoning level (no blending rules applied) It is based on the pSeven integration platform, which provides required highly configurable optimization algorithms and allows easy integration with ANSYS Mechanical modeling tool used in our study. As for the later, it had been configured via appropriate APDL scripts to operate in two regimes: either using preintegrated stiffness matrices given in terms of macroscopic parameters (upper level of bi-level scheme) or evaluating the model for given complete specification of relevant stacking sequences. Mesh size for each zone had been decided during the preliminary problem investigation, we found that it makes no much sense to consider grids with more than 10 elements along the subzone edges. Utilized hierarchical zoning structure, Fig. 12, consists of 3 levels with respective number of zones 2, 6 and 18 (in later case zones coincide with elementary subzones and are indexed the same). Silent peculiarity of zoning in wing box example is that there are always two disconnected set of zones at top and bottom sides, which slightly simplifies the treatment. Selection of particular zoning scheme is dictated by the problem itself and follows from the qualitative analysis of applied loads. As in the previous example, we first solved the problem without blending rules imposition to get the estimate of best attainable mass. Contrary to the horseshoe problem solution is to be conducted with sequentially refined zoning, at the first level with only two zones the 25 optimal mass and RF factors are found to be (1) bottom : [ 34 / 8 / 4 ]s RF = 1.09 (1) top : [ 37 / 19 / 10 ]s RF = 1.01 (34) (1) Mth = 974.8 lb. (35) Note that even with two zones the problem does not factorize because of additional structural elements (spars and ribs), which mediate the interactions. Analogous solution at the second zoning level turns out to be (2) bottom : [ 33 / 7 / 4 ]s RF = 1.01 (2) top : [ 43 / 15 / 12 ]s RF = 1.02 (2) [ 19 / 4 / 2 ]s RF = 1.01 (2) [ 20 / 14 / 20 ]s RF = 1.02 (2) [ 6 / 3 / 3 ]s RF = 1.14 (36) (2) [ 7 / 14 / 16 ]s RF = 1.05 (37) where for each sequentially indexed zone we provide vertically placed ply counts and RF factors. Corresponding optimal mass at the second zoning level is (2) Mth = 699.0 lb. (38) Finally, at finest possible resolution, in which zones are of minimal allowed extent, established optimal solution is summarized in Table 2, corresponding total mass is (3) Mth = 666.7 lb. (39) A few comments are now in order. One might expect that quality of the solution could be characterized by the activity of RF-constraints, it is tempting to conclude that solution is indeed optimal if it has RF & 1 for all zones. Apparently, even with no blending rules applied solution presented in (39) and Table 2 seems to be slightly suboptimal: in zone 6 (bottom panel) RF factor exceeds the limiting value by 10%. We experimented a lot with this observation and found that judgement of solution quality by the activity of RFtype constraints is, in fact, too simplified and should not be taken verbosely. In particular, in the considered case we found a few other solutions with RFµ ≈ 1, ∀µ, but with mass larger by about 5%. The key issue here is the load redistribution among different zones, which precludes some RF factors to become close to 1. Indeed, in the presented solution diminishing ply counts in zone 6 brings its RF factor down, but simultaneously increases the loads on a few other zones, which then are to be made thicker in order to maintain solution feasibility. Next we consider wing box problem with the same sequence of zoning levels and explicit reconstruction of stacking sequences, admissible with respect to all blending rules. This essentially reduces to solving the problem anew with reconstruction methodology of Section 3 and using different set of APDL scripts. Solution at the first zoning level is rather 26 11111111111111111 00000000000000000 00000000000000000 11111111111111111 000000000000 111111111111 00000000000000000 11111111111111111 000000000000 111111111111 000000000000 111111111111 000000000000 111111111111 11111111111111111 00000000000000000 000000000000 111111111111 000000000000 111111111111 000000000000 111111111111 000000000000 111111111111 11111111111111111 00000000000000000 000000000000 111111111111 000000 111111 000000000000 111111111111 000000 111111 11111111111111111 00000000000000000 000000 111111 000000000000 111111111111 000000 111111 000000 111111 000000000000 111111111111 000000 111111 0000000000000000000000000000000000 1111111111111111111111111111111111 000000 111111 0000000000000000000000000000000000 1111111111111111111111111111111111 000000000000 111111111111 000000000000 111111111111 000000000000 111111111111 00000000 11111111 1111 0000 11111111111111111 00000000000000000 00000000000000000 11111111111111111 00000000000000000 11111111111111111 00000000000000000 11111111111111111 Width 50 00000000000000000 11111111111111111 00000000000000000 11111111111111111 00000000000000000 11111111111111111 00000000000000000 11111111111111111 00000000000000000 11111111111111111 111111111111 000000000000 000000000000 111111111111 00000000000000000 11111111111111111 000000000000 111111111111 00000000000000000 11111111111111111 000000000000 111111111111 000000000000 111111111111 000000000000 111111111111 111111 000000 000000000000 111111111111 000000 111111 11111111111111111 00000000000000000 000000000000 111111111111 000000 111111 000000000000 111111111111 000000 111111 11111111111111111 00000000000000000 00000000000000000000000 11111111111111111111111 000000 111111 00000000000000000000000 11111111111111111111111 000000 111111 000000000000 111111111111 00000000 11111111 000000 111111 000000000000 111111111111 111111111111 000000000000 00000000 11111111 1111 0000 000000 111111 00000000000000000 11111111111111111 00000000000000000000000 11111111111111111111111 00000000000000000000000 11111111111111111111111 00000000000000000000000 11111111111111111111111 111111 000000 000000 111111 1111111111 0000000000 111111111111 000000000000 000000 111111 000000 111111 00000000000000000 11111111111111111 11111111 00000000 1111 0000 11111111 00000000 111111 000000 111111 000000 000000 111111 00000000000000000 11111111111111111 000000 111111 000000 111111 000000 111111 000000 111111 1 2 4 3 5 6 Figure 13: Wing box test case: patch structure of bottom (left) and top (right) sides at second zoning level. straightforward, it does not include patch construction algorithm. Corresponding results are (1) bottom : [ 36 / 8 / 5 ]s RF = 1.06 [45/0/−45/02 /−45/03 /45/03 /−45/03 /−45/03 /−45/03 / (1) −45/03 /−45/03 /45/03 /45/03 /45/902 /45/03 /45/03 /−45/903 /45]s top : (1) [ 45 / 16 / 7 ]s (40) RF = 1.08 [0/45/03 /−45/03 /45/03 /−45/03 /−45/03 /45/03 /−45/03 /45/03 /45/03 /45/02 /45/03 / (1) −45/03 /−45/03 /−45/02 /45/0/453 /0/−453 /0/453 /0/−453 /90/−453 /903 /45/903 /45]s M (1) = 988.8 lb, (41) (42) which, as expected, are quite similar to (34). At the next zoning level with 2 · 3 zones blending rules come into force and dictate the patch structure presented on Fig. 13, where, as before, relative patch widths are preserved. Respective solution in terms of zone signatures and resulting RF-factors reads (2) bottom : [ 34 / 9 / 5 ]s RF = 1.01 (2) top : [ 29 / 20 / 12 ]s RF = 1.0 (2) [ 19 / 7 / 5 ]s RF = 1.08 (2) [ 21 / 18 / 11 ]s RF = 1.03 (2) [ 5 / 4 / 5 ]s RF = 1.15 (43) (2) [ 13 / 15 / 11 ]s RF = 1.02 (44) with corresponding mass value being M (2) = 738.7 lb, 27 (45) 1 [27/9/5]s 1.01 7 [36/12/6]s 1.03 13 [32/16/19]s 1.0 2 [19/6/3]s 10.7 8 [20/6/5]s 1.02 14 [14/18/19]s 1.01 3 [6/3/2]s 1.26 9 [6/5/7]s 1.3 15 [18/13/13]s 1.22 4 [30/9/5]s 1.06 10 [30/16/19]s 1.14 16 [26/17/24]s 1.02 5 [16/6/3]s 1.04 11 [13/19/12]s 1.0 17 [15/20/11]s 1.02 6 [6/3/2]s 1.25 12 [14/12/8]s 1.21 18 [22/11/7]s 1.0 Table 3: Wing box test case: zone signatures and RF factors at third zoning level (optimal values). while per zone stacking sequences are summarized in Table 4. Compared to (36, 38) one notice that solution remains qualitatively the same, both in terms of total ply count and RF factors. Mass difference is mostly because of thicker bottom panels, while top side is characterized by redistribution of plies from root to tip, which is a consequence of applied blending rules. Solution at the third level is constructed similar to above, however, corresponding patch structure is difficult to present because of two-dimensional connectivity structure of zones and large number of patches. It suffices to note that there are 36 patches at bottom side, 8 of which are continuous with outer-most layer having final width 4 (all continuous patches placed internally are of unit width). At top side solution has 86 patches, 23 of which are continuous and outer-most layer is of width 11 (similar to bottom case all other continuous patches have unit width). Signatures of optimal stacking sequences for level 3 solution, as well as respective reserve factors are summarizes in Table 3, while Table 5 presents complete list of stacking sequences for all zones. Optimal mass is found to be M (3) = 718.5 lb. (46) Comparison with corresponding level 3 results in case of no blending rules imposition reveals that qualitative differences, noted already for level 2, remain the same. Bottom plate becomes thicker, while top side of wing box remains similar. Apparent feature of the presented solution is that almost all zones, closest to tip, have sufficiently large RF values. This is dictated by imposed blending rules: without them the width of both bottom and top sides rapidly diminishes from root to tip of the structure, however, large width changes are effectively forbidden by the dropping rule (among other factors). Perhaps, the most important is to note that the difference between optimal masses (39) and (46) is about 8%. This means, in particular, that blending rules imposition do not lead to severe non-localities in zone interactions. Indeed, one might expect that continuity and dropping rules could effectively induce additional non-local interactions between different zones. However, effect seems to be parametrically small and does not result in drastic efficiency degradation. 28 1 [0/−45/02 /−45/03 /45/02 /−45/03 /45/02 /−45/902 /−45/03 / −45/03 /−45/02 /45/02 /45/03 /45/03 /45/02 /45/02 /45/902 /−45/90/−45/0/45]s 2 [−45/03 /−45/03 /−45/902 /−452 /03 /45/02 /452 /03 /45/02 /45/02 /45/902 /−45/90/−45/0/45]s 3 [45/902 /−45/02 /−45/0/45/0/45/902 /−45/90/−45/0/45]s 4 [90/453 /02 /45/03 /452 /02 /−45/02 /−45/03 /−45/02 /−45/02 /−45/02 /−45/902 /45/03 /−45/02 /−45/ 903 /−45/03 /−452 /90/−45/90/453 /0/453 /0/−453 /90/452 /90/−452 /90/−453 /0/453 /90/452 ]s 5 [45/0/453 /02 /−45/03 /−45/02 /−45/02 /−45/902 /45/03 /−45/02 /−45/903 /−45/03 /−452 / 90/−45/90/453 /0/453 /0/−453 /90/452 /90/−452 /90/−453 /0/453 /90/452 ]s 6 [45/02 /−45/902 /45/03 /−45/02 /−45/903 /−45/03 /−452 /90/−45/90/453 /0/453 / 0/−453 /90/452 /90/−452 /90/−453 /0/453 /90/452 ]s Table 4: Wing box test case: optimal stacking sequences at second zoning level. 8 Conclusions In this paper we addressed long standing problem of automated optimization of laminated composite structures and proposed methodology, which seems to solve major deficiencies of known approaches. Here we mean primarily the bi-level scheme, which provides clear scales separation, explicitly utilizes small parameter in the problem and have therefore a great potential efficiency. However, its application scope remains rather limited. Ultimate reason of this is that distinguishing macro- and micro-scopic variables, which is the cornerstone of bilevel method, contradicts widely accepted industrial practices, where modeling tools evaluate performances and constraints directly from the exhaustive set of stacking sequences. In a nutshell, one is faced therefore with the problem of computationally inexpensive determination of relevant stacking sequences, identically fulfilling blending and composition rules, for given set of macroscopic parameters. We solved this issue and proposed specific “greedy” algorithm of stacking sequences determination, which is close in spirit, but is vastly different in details, to Shared Layers Blending approach. In particular, our method performs outer blending construction with built in composition rules. Algorithm first determines an exhaustive set of patches, for which continuity and dropping rules are satisfied identically for any choice of ply orientations, and then solves integer linear programming problem, which warrants continuity and disorientation requirements. We also provided the construction of tight convex approximation to feasible domain of macroscopic parameters, which allows to avoid the use of generically less efficient collaborative optimization schemes. Combined with hierarchical zoning it permitted us to develop optimization methodology, which inherits prime advantages of bi-level scheme, but is free from its prime deficiencies. Performance of proposed methodology was tested in two example problems, particular advantage of which is the possibility to solve them without blending rules imposition. It provides a lower bound on attainable performance in each case and gives the reference scale 29 1 [45/0/45/0/45/03 /45/90/−45/0/−45/902 /−45/02 /−45/02 /−45/03 /−45/03 /45/902 /−45/ 02 /−45/0/45/02 /45/03 /45/0/−45/02 /45]s 2 [0/45/0/45/02 /45/903 /−45/02 /−452 /03 /−45/02 /−45/0/45/03 /45/02 /−45/02 /45]s 3 [45/902 /−45/0/−45/02 /45/0/−45/02 /45]s 4 [0/45/0/45/0/45/03 /45/90/−45/0/−45/902 /−45/02 /−45/02 /−45/03 /−45/03 /45/902 /−45/ 02 /−45/0/45/02 /45/03 /45/03 /−45/02 /45]s 5 [0/45/0/45/02 /45/902 /−45/02 /−452 /0/−45/02 /−45/0/45/03 /45/0/−45/02 /45]s 6 [45/902 /−45/0/−45/02 /45/0/−45/02 /45]s 7 [90/452 /0/45/0/45/02 /45/90/−45/0/−45/902 /−45/02 /−45/02 /−45/02 /−45/03 /−45/03 /45/ 02 /45/902 /−45/02 /−45/02 /−45/0/45/02 /45/02 /45/03 /45/03 /−452 /02 /45]s 8 [0/45/903 /−45/02 /−45/03 /−45/03 /45/902 /−45/02 /−45/0/45/02 /45/03 /45/0/−45/02 /45]s 9 [90/−45/0/45/902 /45/902 /−452 /0/45/902 /−45/0/45/0/−45/02 /45]s 10 [−45/903 /−45/902 /45/902 /45/902 /−45/02 /45/02 /−45/902 /45/02 /45/02 /−45/03 /45/0/ 45/03 /45/02 /−452 /03 /45/902 /45/90/45/03 /45/0/−452 /0/−45/03 /−45/902 /−45/902 / −45/0/45/90/−453 /0/453 ]s 11 [−45/90/−45/902 /45/90/452 /0/−452 /02 /−45/902 /452 /0/453 /0/−45/0/452 /0/−45/90/ −453 /90/−45/0/45/90/452 /90/452 /0/−452 /0/−45/0/−45/90/−45/0/45/90/−453 /0/453 ]s 12 [−45/903 /452 /02 /45/02 /−45/0/452 /0/−452 /0/453 /0/−45/0/−45/03 /−45/902 /−45/ 902 /−45/0/45/90/−453 /0/453 ]s 13 [0/−452 /90/−45/90/−45/903 /45/902 /45/902 /−45/0/45/03 /45/03 /45/02 /−45/03 /45/0/45/ 03 /45/02 /−45/03 /45/902 /45/90/45/03 /45/02 /−45/902 /−45/03 /−45/902 /−452 /902 / −45/0/45/90/−453 /0/453 ]s 14 [−45/902 /−45/902 /−452 /902 /45/903 /452 /02 /−45/902 /45/0/453 /0/−45/0/452 /0/−452 /90/ −45/0/45/90/452 /90/452 /0/−452 /0/−45/03 /−45/902 /−45/902 /−45/0/45/90/−453 /0/453 ]s 15 [−45/90/−452 /902 /45/902 /45/02 /45/02 /−45/0/452 /0/−45/0/45/90/45/03 /45/0/−45/ 902 /45/03 /−45/902 /−45/02 /−45/902 /−45/0/45/90/−453 /0/453 ]s 16 [45/02 /452 /90/−45/903 /−45/0/45/902 /−45/902 /−45/0/−45/903 /45/902 /45/02 /45/03 / −45/02 /452 /02 /−45/03 /45/902 /45/90/45/03 /45/0/−452 /0/−45/03 /−45/902 /−45/ 903 /−45/902 /−45/0/45/90/−453 /0/453 ]s 17 [0/−452 /90/−45/902 /453 /90/−45/0/−45/90/−45/0/45/0/453 /02 /−452 /0/45/0/453 /0/ −452 /90/−45/0/45/90/452 /90/452 /0/−452 /0/−45/0/−452 /902 /−45/0/45/90/−453 /0/453 ]s 18 [−45/903 /45/02 /45/03 /45/0/452 /03 /−45/02 /−452 /0/45/03 /45/02 /−45/03 /−45/ 902 /−45/90/−45/0/45/90/−453 /0/453 ]s Table 5: Wing box test case: solutions at third zoning level (optimal stacking sequences) 30 to compare our results with. Comparison reveals that strict accounting for blending rules worsens the results only slightly, in both cases obtained optimal solutions are within 10% gap from the respective theoretical lower bounds. Acknowledgments The authors are grateful to the members of Applications Engineering Department of DATADVANCE LLC for stimulating environment. The thorough discussions with A.Pospelov, A.Saratov are kindly acknowledged. This work was partially supported by the grant RFBR15-29-07043. A Calculation of Buckling Reserve Factor Here we briefly summarize how critical buckling factor is calculated for simply supported rectangular plates under the bending and compression loads. Derivation closely follows Ref. [24], therefore we only provide essentially distinct points. The strain energy of buckled rectangular a1 × a2 plate is given by   Z 1 D11 D12 + 2D66 2 αβ 2 2 αβ d x D ∂α w ∂ β w , D = , (47) ∆U = D12 + 2D66 D22 2 a1 ×a2 where w is the orthogonal to plate deflection coordinate, Dαβ is flexural rigidity tensor and repeated indices taking values 1, 2 are summed up. The work performed by external forces reads   x Z 1 N N xy 2 αβ αβ , (48) d x N ∂α w ∂ β w , N = ∆T = − N xy N y 2 a1 ×a2 where N αβ are the in-plane forces per unit length. Loads criticality is characterized by the appearance of non-trivial solution to ∆U + ∆T = 0. Using proper eigenmodes representation for simply supported plates X Y πnα xα w = wn1 ,n2 sin[ ] (49) aα n ,n α 1 2 one obtains the following equation for the amplitudes wn1 ,n2 :     32 12 X 1 n1 n2 m1 m2 α 2 2 αβ 2 2 (π D nα nβ + N nα )wn1 ,n2 = 2 N + wm1 ,m2 , m1 m2 n1 n2 π 2 m ,m 1 2 (50) where  p q n m  pqnm = χp,n χq,m , 2 (p − n2 ) (q 2 − m2 ) 31  χp,q = 0, p + q = 2k . 1, p + q = 2k + 1 (51) Critical loads N correspond to the first encountered zero eigenvalue of the matrix defining the linear system (50). Alternatively, at fixed loads we may consider scaling parameter λ (commonly known as buckling reserve factor), at which the loads λN become critical. Therefore the problem is to determine minimal positive λ when lowest eigenvalue of symmetric matrix     32 12 1 1 2 αβ 2 2 ν µ α 2 · π D nα nβ · δµν + N nα · δµν − 2 N · + (52) Qµν = µ ν λ π 2 becomes zero (here Greek symbols denote multi-indices, µ = (n1 , n2 )). Note that for sufficiently small λ the matrix Q is surely positive definite, while the sign of its minimal eigenvalue λmin for λ → +∞ depends upon the distribution of external loads. We calculate buckling reserve factor λ via the solution of non-linear equation λmin (λ, N ) = 0 along the lines presented in Ref. [24]. Namely, the sequence of finite order approximations to the infinite sum in (50) (and hence the size of matrix (52)) is considered until respective values of reserve factor λ stabilize. This provides robust and rather precise estimate of buckling reserve factor applicable in case of general loads. References [1] D. Liu, V.V. Toroporov, O.M. Querin, D. C. Barton, “Bi-level Optimization of Blended Composite Wing Panels”, Journal of Aircraft, Vol. 48, No. 1 (2011), pp. 107-118. [2] D. Liu, V.V. Toroporov, O.M. Querin, D. C. Barton, “Weight and mechanical performance optimization of blended composite wing panels using lamination parameters”, Structural and Multidisciplinary Optimization, September 2015, Volume 52, Issue 3, pp 549-562. [3] D. Bettebghor, “Bilevel optimization of aerospace composite structures”, PhD thesis, 2011, ONERA lab. [4] F. Gubarev, V. Kunin, A. Pospelov, “Lay-up Optimization of Laminated Composites: Mixed Approach with Exact Feasibility Bounds on Lamination Parameters”, arXiv:1304.7226. [5] S.T. IJsselmuiden, “Optimal Design of Variable Stiffness Composite Structures using Lamination Parameters”, PhD thesis, 2011, Delft University (Aerospace Engineering Faculty). [6] J.M.J.F. Van Campen, “Optimum lay-up design of variable stiffness composite structures”, PhD thesis, 2011, Delft University (Aerospace Engineering Faculty). [7] C.G. Diaconu, M. Sato, H. Sekine, “Feasible region in general design space of lamination parameters for laminated composites”, AIAA journal, 40(3) 2002, 559-565. 32 [8] M.W. Bloomfield, C.G. Diaconu, P.M. Weaver, “On feasible regions of lamination parameters for lay-up optimization of laminated composites”, Proceedings of the Royal Society A: Mathematical, Physical and Engineering Science, 465(2104) 2009, 1123. [9] J.E. Herencia, P.M. Weaver M.I. Friswell, “ Optimization of anisotropic composite panels with T-shaped stiffeners including transverse shear effects and out-of-plane loading”, Structural and Multi-disciplinary Optimization, 37(2) 2008, 165-184. [10] G. Soremekun, Z. Gurdal, C. Kassapoglou, D. Toni, “Stacking sequence blending of multiple composite laminates using genetic algorithms”, Composite Structures, 56(1) 2002, 53-62. [11] F.-X. Irisarri, A. Lasseigne, F.-H. Leroy, R. Le Riche, “Optimal design of laminated composite structures with ply drops using stacking sequence tables”, Composite Structures, 107, 2014, 559-569. [12] S. Zein, B. Colson, S. Grihon, “A primal-dual backtracking optimization method for blended composite structures”, Structural and Multidisciplinary Optimization, 45(5) 2012, 669-680. [13] G. Allaire, G. Delgado, “Stacking sequence and shape optimization of laminated composite plates via a level-set method”, Journal of the Mechanics and Physics of Solids, 97 (2016) 168-196. [14] M. Giger, D. Keller, P. Ermanni, “A graph-based parameterization concept for global laminate optimization”, Structural and Multidisciplinary Optimization, 36(3) 2008, 289305. [15] D. Keller, “Global laminate optimization on geometrically partitioned shell structures”, Structural and Multidisciplinary Optimization, 43(3) 2011, 353-368. [16] D. Liu, “Bi-level optimization of blended composite wing panels”, PhD thesis, University of Leeds, 2010. [17] R. Fletcher, S. Leyffer, “Nonlinear programming without a penalty function”, Mathematical Programming, 91(2) 2002, 239-269. [18] A. Wachter, L.T. Biegler, “On the Implementation of an Interior-Point Filter LineSearch Algorithm for Large-Scale Nonlinear Programming”, Mathematical Programming 106(1) 2006, 25-57. [19] A. Wachter, L.T. Biegler, “Line Search Filter Methods for Nonlinear Programming: Motivation and Global Convergence”, SIAM Journal on Optimization 16(1) 2005, 1-31. [20] DATADVANCE LLC, https://www.datadvance.net 33 [21] O. Seresta, M.M. Abdalla, Z. Gurdal, “A genetic algorithm based blending scheme for design of multiple composite laminates”, Proceedings of 50th AIAA/ASME/ASCE/AHS/ASC Structures, Structural Dynamics and Materials Conference, 2009. [22] B. Liu, R.T. Haftka, M.A. Akgun, “Two-level composite wing structural optimization using response surfaces”, Structural and Multidisciplinary Optimization, 20(2) 2000, 87-96. [23] Oscar Barton Jr., “Buckling of simply supported rectangular plates under combined bending and compression using eigensensitivity analysis”, Thin-Walled Structures, 46(4), 2008, 435-441. [24] V. Piscopo, “Buckling Analysis of Rectangular Plates under the Combined Action of Shear and Uniaxial Stresses”, Int. J. of Mechanical, Aerospace, Industrial, Mechatronic and Manufacturing Engineering, 4(10) 2010, 1010-1017 34
5cs.CE
Sequential 3D U-Nets for Biologically-Informed Brain Tumor Segmentation Andrew Beers1 , Ken Chang1 , James Brown1 , Emmett Sartor2 , CP Mammen3 , Elizabeth Gerstner1,4 , Bruce Rosen1 , and Jayashree Kalpathy-Cramer1,5 arXiv:1709.02967v1 [cs.CV] 9 Sep 2017 1 Athinoula A. Martinos Center for Biomedical Imaging, Department of Radiology, Massachusetts General Hospital, Boston, USA 2 Massachusetts General Hospital, Boston, USA 3 NVIDIA, India 4 Athinoula A. Martinos Center for Biomedical Imaging, Department of Neuro-Oncology, Massachusetts General Hospital, Boston, USA 5 MGH & BWH Center for Clinical Data Science, Boston, USA Abstract. Deep learning has quickly become the weapon of choice for brain lesion segmentation. However, few existing algorithms pre-configure any biological context of their chosen segmentation tissues, and instead rely on the neural network’s optimizer to develop such associations de novo. We present a novel method for applying deep neural networks to the problem of glioma tissue segmentation that takes into account the structured nature of gliomas - edematous tissue surrounding mutuallyexclusive regions of enhancing and non-enhancing tumor. We trained multiple deep neural networks with a 3D U-Net architecture in a tree structure to create segmentations for edema, non-enhancing tumor, and enhancing tumor regions. Specifically, training was configured such that the whole tumor region including edema was predicted first, and its output segmentation was fed as input into separate models to predict enhancing and non-enhancing tumor. Our method was trained and evaluated on the publicly available BraTS dataset, achieving Dice scores of 0.882, 0.732, and 0.730 for whole tumor, enhancing tumor and tumor core respectively. Keywords: Brain tumor, convolutional neural network, segmentation, U-Net 1 Introduction Gliomas are among the most common forms of brain tumor, which are typically categorized into low-grade (LGG) and high-grade (HGG) owing to their different prognostic outcomes. Non-invasive medical imaging modalities such as computed tomography (CT) and magnetic resonance imaging (MRI) are employed to determine tumor phenotypes and inform the appropriate course of treatment, which includes chemotherapy, radiation therapy, and surgical resection. Anatomical MR sequences often include T1-weighted (T1), gadolinium-enhanced T1weighted (T1-post), T2-weighted (T2) and fluid-attenuated inversion recovery 2 A. Beers et al. (FLAIR). Characteristics of gliomas observed in MR images include enhancing tumor (hyperintense in T1-post compared with T1), non-enhancing/necrotic tumor (hypointense in T1-post compared with T1) and peritumoral edema (hyperintense in FLAIR). Manual delineation of these tumor regions allows for useful prognostic indicators to be extracted based on intensity, volume, shape and texture. However the annotation process requires significant effort on the part of the annotator, which can be prohibitively time consuming and subject to user error and bias. As a consequence, many research groups have developed methods to perform semi-automated or fully-automated tumor segmentation. The Brain Tumor Segmentation (BraTS) challenge [1] was established to evaluate state-of-the-art algorithms on a multi-institutional dataset of MRI scans with manually labeled tumor regions. Deep learning has become the preeminent approach to this task [2,3], outperforming shallow classification methods across a wide variety of problem domains [4]. We continue this trend in our submission to BraTS 2017, which uses convolutional neural networks (CNNs) to segment tumor tissue in a biologically informed manner. Specifically, training was configured such that the whole tumor (WT) region including edema was predicted first, and its output segmentation was fed as input into separate models to predict enhancing tumor (ET) and non-enhancing/necrotic tumor core (TC). We make use of the 3D U-Net [5] architecture to perform segmentation in a patch-based manner, yielding encouraging results on the BraTS validation set. 2 2.1 Methods U-Net architecture and training The U-Net architecture is shown in Fig. 1. Similar to the original 2D U-Net [6], our architecture consists of a downsampling and an upsampling arm with residual connections between the two that concatenate feature maps at different spatial scales. The networks were designed to receive input patches of size 32 × 32 × 32 voxels, comprising four MR channels; T1, T1-post, T2 and FLAIR. Rectified linear unit (ReLU) activation was used in all layers, with the exception of the final sigmoid output. Batch normalization [7] was applied after each convolutional layer for regularization purposes. We used Nestorov Adaptive Moment Estimation (NAdam) [8] to train the 3D U-Nets with an initial learning rate 10−6 , minimizing a soft dice loss function. Networks were trained on NVIDIA Tesla P100 GPUs for up to 200 epochs or until the validation loss plateaued. 2.2 Patch extraction and augmentation All MRI volumes (T1, T1-post, T2, FLAIR) were intensity normalized to have zero mean and unit variance. Patches were then sampled in the following ratio: 1% background, 29% normal brain, 70% tumor. A total of 70 patches were extracted from each subject, and augmented by means of sagittal flips to double the training set size. At inference time, each volume is gridded into 32 × 32 × 32 Sequential 3D U-Nets for Brain Tumor Segmentation 3 Fig. 1. The 3D U-Net architecture for glioma segmentation. 323 voxel patches are used to perform binary segmentation of each tissue type independently. The number of feature maps produced by the convolutional layers is denoted above each colored square. patches at 16 different offsets from the upper-most corner of the image. Probability maps for each of these patches is predicted by the model, and voxels with predictions from multiple overlapping patches have their probabilities averaged. Labels are produced by binarizing the averaged probability maps at a chosen threshold. 2.3 Segmentation pipeline Whole tumor. Whole tumor (WT) is defined as the set union of the peritumoral edema, enhancing tumor (ET) and non-enhancing/necrotic tumor core (TC). To produce an initial low resolution estimate of WT, the preprocessed training data were downsampled to 2mm isotropic voxels and used to train a U-Net with four input channels. After convergence, the training data were then fed into network to yield pseudo-probabilty maps of WT at 2mm resolution. These were thresholded to produce binary labelmaps which were naively upsampled to 1mm resolution using nearest-neighbour (NN) interpolation. A second U-Net was then trained on the original 1mm anatomical MR scans, with the NN upsampled labelmap as an additional input channel. Enhancing tumor and tumor core. Two separate U-Nets were trained on patches comprising the four MR channels plus the WT ground truth labelmap as a fifth channel. At inference time, the WT prediction from the previous step is used in place of the ground truth. The intuition behind this is that having knowledge about the boundaries of the whole tumor will allow the CNN to become more confident in its predictions of ET and TC. 4 A. Beers et al. Post-processing CNNs. Noisy segmentations are typically post-processed by means of morphological processing operations such as erosion, dilation and removal of small connected components. In this work, we instead employ two additional U-Nets that serve to tweak the predictions for ET and TC. Input patches consist of seven channels; four anatomical MR and three labelmaps corresponding to WT, ET, and TC. 3 Experiments and Results 3.1 Data and implementation We used the multi-institutional training and validation data made available for the 2017 BraTS challenge1 [1]. A set of pre-operative scans are provided with T1, T1-post, T2 and FLAIR volumes for each subject. Data were already intrasubject registered and skull-stripped. The full training set (n = 285) was randomly split into a smaller training (n = 258) and validation (n = 29) set for training and hyperparameter optimization, respectively. We report Dice scores, sensitivities, specificities for the BraTS validation set (n = 46). Ground truth labelmaps are not made available for these data, and so scores were determined by uploading our solutions to the BraTS online portal. Results for the testing data were not available at the time of publication. Our networks were implemented in Keras2 , with a TensorFlow3 backend. 3.2 Segmentation results Figures 2 and 3 shows example segmentation results for whole tumor, enhancing tumor and tumor core. Results over the BraTS validation set are shown in Figure 4. These results reflect those reported via the online leaderboard on 8th September 2017 4 . Out of the 61 entrants, our algorithm places 21st for whole tumor, 16th for enhancing tumor and 28th for tumor core. 4 Conclusion A method based on sequential U-Nets for segmentation of glioma from multimodal MRI is presented. We achieved mean dice scores over the BraTS 2017 validation set (n = 46) of 0.882, 0.732, and 0.730 for whole tumor, enhancing tumor and tumor core respectively. 1 2 3 4 http://http://braintumorsegmentation.org/ https://keras.io/ https://www.tensorflow.org/ https://www.cbica.upenn.edu/BraTS17/lboardValidation.html Sequential 3D U-Nets for Brain Tumor Segmentation 5 Fig. 2. Example segmentation result for whole tumor. Low resolution (top) labelmaps are upsampled using nearest-neighbour interpolation, and upsampled to high resolution (bottom). Acknowledgements. This research was carried out in whole or in part at the Athinoula A. Martinos Center for Biomedical Imaging at the Massachusetts General Hospital, using resources provided by the Center for Functional Neuroimaging Technologies, P41EB015896, a P41 Biotechnology Resource Grant supported by the National Institute of Biomedical Imaging and Bioengineering (NIBIB), National Institutes of Health. This work was supported by a training grant from the NIH Blueprint for Neuroscience Research (T90DA022759/R90DA023427), and the NCI/NIH (U24CA180927, U01CA154601). We would also like the acknowledge the GPU computing resources provided by the MGH and BWH Center for Clinical Data Science. References 1. Bjoern H Menze, Andras Jakab, Stefan Bauer, Jayashree Kalpathy-Cramer, Keyvan Farahani, Justin Kirby, Yuliya Burren, Nicole Porz, Johannes Slotboom, Roland Wiest, et al. The multimodal brain tumor image segmentation benchmark (BRATS). IEEE Transactions on Medical Imaging, 34(10):1993–2024, 2015. 2. Konstantinos Kamnitsas, Christian Ledig, Virginia FJ Newcombe, Joanna P Simpson, Andrew D Kane, David K Menon, Daniel Rueckert, and Ben Glocker. Efficient multi-scale 3D CNN with fully connected CRF for accurate brain lesion segmentation. Medical Image Analysis, 36:61–78, 2017. 3. Mohammad Havaei, Axel Davy, David Warde-Farley, Antoine Biard, Aaron Courville, Yoshua Bengio, Chris Pal, Pierre-Marc Jodoin, and Hugo Larochelle. Brain tumor segmentation with deep neural networks. Medical image analysis, 35:18–31, 2017. 4. Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521(7553):436–444, 2015. 6 A. Beers et al. Fig. 3. Example segmentation results for enhancing tumor and tumor core. Fig. 4. Box plot showing segmentation results for the BraTS validation set (n = 46). Dice scores, sensitivities and specificities are shown for enhancing tumor (ET), whole tumor (WT) and tumor core (TC). Sequential 3D U-Nets for Brain Tumor Segmentation 7 5. Özgün Çiçek, Ahmed Abdulkadir, Soeren S Lienkamp, Thomas Brox, and Olaf Ronneberger. 3D U-Net: learning dense volumetric segmentation from sparse annotation. In International Conference on Medical Image Computing and ComputerAssisted Intervention, pages 424–432. Springer, 2016. 6. Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 234–241. Springer, 2015. 7. Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International Conference on Machine Learning, pages 448–456, 2015. 8. Timothy Dozat. Incorporating nesterov momentum into adam, 2016.
1cs.CV
arXiv:1602.01454v1 [math.GR] 3 Feb 2016 A MATRIX MODEL FOR RANDOM NILPOTENT GROUPS KELLY DELP, TULLIA DYMARZ, ANSCHEL SCHAFFER-COHEN Abstract. We study random torsion-free nilpotent groups generated by a pair of random words of length ℓ in the standard generating set of Un (Z). Specifically, we give asymptotic results about the step properties of the group when the lengths of the generating words are functions of n. We show that √ the threshold function for asymptotic abelianness is ℓ = c n, for which the 2 −2c probability approaches e , and also that the threshold function for having full-step, the same step as Un (Z), is between cn2 and cn3 . 1. Introduction The goal of this paper is to study random finitely-generated torsion-free nilpotent groups (also known as T -groups [2]). Recall that a nilpotent group N is one for which the lower central series eventually terminates: N = N0 ≥ N1 ≥ · · · ≥ Nr = {0} where Ni = [N, Ni−1 ] is the ith commutator subgroup (i.e. the subgroups generated by commutators of elements in N and Ni−1 ). If r is the first index with Nr = {0} then we say that N is nilpotent of step r. For more background on nilpotent groups see [6]. Our motivation for studying random nilpotent groups comes from Gromov’s study of finitely generated random groups via random presentations (see [7] for a detailed introduction). Roughly speaking Gromov considers groups Gℓ given by a presentation Gℓ = hS | Rℓ i, where the generating set S is fixed and finite, and the relator set Rℓ contains a subset of all possible relators of length at most ℓ. A random group is said to have a property P if the probability that Gℓ has P goes to one as ℓ goes to infinity. Generally the size of Rℓ depends on ℓ and a chosen density constant d ∈ [0, 1] where Rℓ at density d contains on order of the dth power of possible relations of size less than ℓ. Changing d changes the properties of the random group. A fundamental result of Gromov’s shows that when the density is greater than 1/2 the resulting random group is trivial, and when the density is less than 1/2 then the random group is a so-called hyperbolic group. Unfortunately, nilpotent groups are not hyperbolic so this model is unsatisfactory for studying random nilpotent groups. For a recent generalization of Gromov’s idea to quotients of free nilpotent groups see [1]. The model we study is motivated by a well-known theorem [4] which states that any finitely-generated, torsion-free nilpotent group appears as a subgroup of Un (Z), the group of n × n upper-triangular matrices with ones on the diagonal and entries in Z. 1 2 KELLY DELP, TULLIA DYMARZ, ANSCHEL SCHAFFER-COHEN Let Ei,j be the elementary matrix that differs from the identity matrix In by con±1 taining a one at position (i, j) and set Ai = Ei,i+1 . Then the set S = {A±1 1 , . . . , An−1 } of superdiagonal elementary matrices is the standard generating set for Un (Z). Our random subgroups will be generated by taking two simple random walks of length ℓ on the Cayley graph of Un (Z) given by the generating set S. These two random walks define two words, V, W that generate a subgroup Gℓ,n := hV, W i ≤ Un (Z). We are interested in the asymptotic properties of Gℓ,n as ℓ → ∞. For example, when n is fixed one can show that the probability that Gℓ,n is abelian goes to zero as ℓ → ∞. If ℓ is a function of n, then the asymptotic abelianness depends on the rate of growth. Before giving the precise statement of our results, we recall the Landau notation that we use to describe the growth rate of ℓ: • If f (n) ∈ O(g(n)) then there exist numbers c and N , so that n > N implies f (n) < cg(n). • If f (n) ∈ o(g(n)) then for all c > 0, there exists an N , so that n > N implies f (n) < cg(n). • If f (n) ∈ ω(g(n)) then for all c > 0, there exists an N , so that n > N implies f (n) > cg(n). Additionally, we write f (n) ∼ g(n) if limn→∞ f (n)/g(n) = 1. Let P be a property of a group. For a particular length function ℓ(n), we say Gℓ,n is asymptotically almost surely (a.a.s) P if the probability that Gℓ,n has P approaches 1 as n approaches infinity. In Section 4 we prove the following theorem: Theorem 1. Let Gℓ,n be a subgroup of Un (Z) generated by two random walks of length ℓ in the standard generating set S and suppose ℓ is a function of n. √ (1) If ℓ ∈ o( n) then asymptotically almost surely Gℓ,n is abelian. √ 2 (2) If ℓ = c n then the probability that Gℓ,n is abelian approaches e−2c as n → ∞. √ (3) If ℓ ∈ ω( n), then asymptotically almost surely Gℓ,n is not abelian. Another property we focus on in this paper is the step of Gℓ,n . Note that Un (Z) is a step n − 1 nilpotent group. We say that Gℓ,n has full step if it is also of step n − 1. We show that the threshold function for being full step lies between n2 and n3 . Theorem 2. Let Gℓ,n be a subgroup of Un (Z) generated by two random walks of length ℓ in the standard generating set S and suppose ℓ is a function of n. (1) If ℓ ∈ o(n2 ) then asymptotically almost surely Gℓ,n does not have full step. (2) If ℓ ∈ ω(n3 ) then asymptotically almost surely Gℓ,n has full step. Theorem 2 is proven in Section 5. These theorems are summarized by the following diagram. A MATRIX MODEL FOR RANDOM NILPOTENT GROUPS step = 1 a.a.s. 1 < step < n − 1 a.a.s. √ n 3 step = n − 1 a.a.s. n2 n3 1.1. Outline. As random walks, V, W are given by V = V1 V2 · · · Vℓ and W = W1 W2 · · · Wℓ where Vi , Wi ∈ S. To prove Theorem 1, we define a sufficient condition for commuting, called supercommuting. Definition 1. Let V = V1 V2 · · · Vℓ and W = W1 W2 · · · Wℓ where Vi and Wi are elements in the Un generating set S. The words V and W supercommute if every Vi commutes with every Wj . We show that when ℓ ∈ o(n), supercommuting and commuting are √asymptotically equivalent, and that the threshold for supercommuting is at ℓ = c n. For Theorem 2 most of the results are a matter of analyzing the entries on the superdiagonals of our generators V and W . The (i, i + 1) superdiagonal entry of V , which we denote by vi , is the sum over the number of A±1 that occur in the walk, i where Ai contributes +1, and its inverse −1. Therefore the vector of superdiagonal entries is the endpoint of a random walk in Zn−1 ; while these are well studied objects, most of the study has been on walks in a fixed dimension n. In our case, both the dimension n, and the length of the walk are going to ∞. We gather these results in Section 3. Acknowledgements. This project began in the Random Groups Research Cluster held at Tufts University in the summer of 2014, supported by Moon Duchin’s NSF CAREER award DMS-1255442. We would like to thank the participants of this cluster for their questions, conversations, and attention in the summer of 2014, with special thanks to Meng-Che “Turbo” Ho, Samuel Lelièvre, and Mike Shapiro for their time in more extensive conversations. We would also like to thank Benedek Valkó for suggestions on Section 3. The first author also acknowledges support from National Science Foundation grant DMS-1207296. 2. Preliminaries Many of the results in this paper depend on the superdiagonal entries vi,i+1 and wi,i+1 of V and W . For this reason we adopt the shorthand zi := zi,i+1 for any matrix Z. The following proposition gives a necessary condition for commuting in Un . Lemma 3. Let W = [wi,j ] and V = [vi,j ] be matrices in Un . If W and V commute then wi vi+1 = wi+1 vi for all 1 ≤ i ≤ n − 2. Proof. This is a straightforward computation. The first superdiagonal of C = V W V −1 W −1 vanishes and the second superdiagonal entries are given by ci,i+2 = wi+1 vi − wi vi+1 .  4 KELLY DELP, TULLIA DYMARZ, ANSCHEL SCHAFFER-COHEN ±1 Corollary 4. The elementary superdiagonal matrices A±1 commute if and i , Aj only if |i − j| 6= 1. Next we study the kth commutator subgroup of Gℓ,n = hV, W i. Note that in a nilpotent group the kth commutator subgroup is generated by all m-fold commutators for m ≥ k of the form [B1 [B2 · · · [Bm , Bm+1 ]]]·] where the Bi are chosen from a fixed generating set (see for example Lemma 1.7 in [4]). Therefore to test that Gℓ,n is k-step nilpotent we only need to check that [B1 [B2 · · · [Bk , Bk+1 ]]]·] = I when Bi ∈ {V, W }. In Lemma 3 we noted that taking a commutator resulted in a matrix with zeros along the first superdiagonal. In the next lemma we show that taking a k th commutator results in zeros on the first k superdiagonals. We also give a recursive formula for the entries on the (k +1)st superdiagonal using iterated two dimensional determinants. Lemma 5. Let C k = [cki,j ] be a k-fold commutator of two matrices V, W ; then cki,j = 0 when i < j ≤ i + k and " # k−1 z c i,i+1 i,k+i (1) cki,k+i+1 = det k−1 zk+i,k+i+1 ci+1,k+i+1 where Z = [zi,j ] and either Z = V or Z = W . Proof. We prove this result by induction, where the base case is given in the proof of Lemma 3. Assume C k−1 is given, and for convenience let K = C k−1 . Since the first k − 1 superdiagonals of K contain all zeros, computing C k = ZKZ −1 K −1 yields zeros on the first k superdiagonals, and on the (i, i + k + 1)-diagonal we have k−1 k−1 zi,i+1 ci+1,k+i+1 − zk+i,k+i+1 ci,k+i . To help see this, note that when the first nonzero superdiagonals of Z, C k−1 , C k are overlayed the resulting matrix is the following.   . .. .. .. .. .. . .. . . . .   k−1  · · · 1 zi,i+1 · · · ci,k+i cki,i+k+1   k−1  1 ··· ci+1,k+i+1 · · ·     .. .. ..  . . . · · ·    1 zk+i,k+i+1 · · ·    1 · · ·   .. .  Our first application of Lemma 5 is the following lemma, which shows that Gℓ,n cannot be full step if V, W have a matching pair of zeros on their superdiagonals. Lemma 6. Given Gℓ,n = hV, W i, if there is some 1 ≤ d ≤ n − 1 such that vd = wd = 0 then the step of Gℓ,n is bounded by max{d − 1, n − 1 − d}. A MATRIX MODEL FOR RANDOM NILPOTENT GROUPS 5 Proof. Recall that vd = vd,d+1 and similarly wd = wd,d+1 . By Lemma 5 we have that for C 1 = [V, W ] c1d−1,d+1  v = det d−1,d vd,d+1  wd−1,d =0 wd,d+1 since the bottom row of this two by two matrix has both entries to zero. Similarly c1d,d+2 = det  vd,d+1 vd+1,d+2  wd,d+1 =0 wd+1,d+2 since the top row of the two by two matrix has entries both equal to zero. Inductively, by Equation 1, we have that ckd−k,d+1 = ckd,d+k+1 = 0. This is because either the top or bottom row of the matrix in Equation 1 will have both entries equal to k−1 k−1 zero. Alternatively, if both ci,k+i and ci+1,k+i+1 are zero then cki,k+i+1 = 0 since then the righthand column of the matrix in Equation 1 will have both entries zero. In particular, cki,j is zero if k > max{d − 1, n − 1 − d}.  Lemma 5 also leads us to define a modified determinant product which gives us a method to calculate the entries of the first nonzero superdiagonal of a iterated commutator product of upper triangular matrices given their first superdiagonal entries. Definition 2. Let ~a = (a1 , . . . , as ) and ~b = (b1 , . . . , bm ) be vectors with s ≥ m and set s − m = p; then [~a ~b] is the m − 1 dimensional vector given by [~a ~b] :=  a1 ap+2 b1 a2 , b2 ap+3 b2 a , · · · , m−1 b3 ap+m bm−1 bm  . Lemma 7. Let ~bi be the vector containing the n − 1 main superdiagonal entries of an n × n unipotent matrix Bi labeled from top left to bottom right. Then the (k + 1)st superdiagonal entries of the k-fold commutator [B1 [B2 · · · [Bk , Bk+1 ]]] are given by the (n − k) dimensional vector [~b1 [~b2 · · · [~bk ~bk+1 ] · · · ]. This lemma can be proved by direct computation or by inspecting the proof of Lemma 5. To illustrate this result, consider the following examples, the second of which will be used in Section 5. Example 1. We consider the commutator [D, [C, [A, B]]] where the superdiagonal entries of A are given by (a1 , . . . an−1 ) and similarly for B, C, D. The first three 6 KELLY DELP, TULLIA DYMARZ, ANSCHEL SCHAFFER-COHEN superdiagonals are all zero while the fourth superdiagonal has entries  an−4 bn−4 a1 b 1 cn−4 c1  an−3 bn−3 a b 2 2   d1 d n−4   an−3 bn−3 a2 b 2  cn−2 c3  an−2 bn−2 a b 3 3   , · · · ,   an−3 bn−3 a2 b 2  cn−3 c2  an−2 bn−2 a b 3 3   d4 d n−1   an−2 bn−2 a3 b 3 cn−1 c4 an−1 bn−1 a4 b 4 Example 2. Consider the commutator given by          .         [W, [W, . . . [W , V ]]] | {z } n−2 where V, W are n × n upper triangular matrices with main superdiagonals given by the vectors (v1 , · · · , vn−1 ) and (w1 , · · · , wn−1 ) respectively. Using the iterated determinant formula we see that the first nonzero superdiagonal has only one entry and is given by K1 v1 w2 w3 · · · wn−1 + K2 w1 v2 w3 · · · wn−1 + · · · + Kn−1 w1 · · · wn−2 vn−1  with alternating signs. where each Ki = n−1 i 3. Distribution of the superdiagonal entries In this section we examine the probability of finding zeroes on the superdiagonals of V and W when ℓ ∈ ω(n). In order to emphasize the dependence on ℓ we write V ℓ , W ℓ instead of V, W and vkℓ , wkℓ instead of vk , wk for the superdiagonal entries. If we fix n and k we can model vkℓ as the endpoint of a lazy random walk in Z: vkℓ = ℓ X xj j=1 where xj = ±1 with probability 1/2n each and xj = 0 with probability (n − 1)/n. Likewise for any two k1 6= k2 we have an induced lazy random walk on Z2 :  ℓ  X ℓ   vk1 xj = yj vkℓ 2 j=1 where (xj , yj ) = (±1, 0) or (0, ±1) with probability 1/2n each, and (xj , yj ) = (0, 0) with probability (n − 2)/n. Our goal is to estimate P(vkℓ = 0) and P(vkℓ 1 = vkℓ 2 = 0). The proofs of the following lemmas follow the standard proofs of the local central limit theorem for lazy random walks on Zd where special attention is paid to the dependence of the estimates on n. (See for example Section 2.3 in [5]). We reproduce them here because we were not able to find this exact formulation in the literature. Morally A MATRIX MODEL FOR RANDOM NILPOTENT GROUPS 7 we rewrite everything in terms of λ = ℓ/n and provide error estimates. We can do this as long as λ → ∞—that is, when ℓ ∈ ω(n). To make √ the results in this section more applicable later on, we define a constant K = 1/ 2π. Lemma 8. Suppose ℓ ∈ ω(n). Then for a fixed 1 ≤ k ≤ n we have r n P(vkℓ = 0) ∼ K ℓ Proof. We begin by noting that the characteristic function of xj is given by φ(t) = E(etixj ) = 1 − 1 1 it 1 + (e + e−it ) = 1 − (1 − cos t) n 2n n and the characteristic function of vkℓ which is ℓ  1 φ(t)ℓ = 1 − (1 − cos t) . n Therefore P (vkℓ 1 = 0) = 2π  ℓ 1 1 − (1 − cos t) dt. n −π Z π The methods used to estimate this integral are identical to the ones used in the more general proof of Lemma 10 below so we do not produce them here. The above integral is transformed to p n Z  ℓ −s2 /2 ℓ √ e ds + o(1) P (vk = 0) = 2π R  Since vkℓ and wkℓ are independent we have the following corollary: Corollary 9. Suppose ℓ ∈ ω(n). For fixed k, P(vk = wk = 0) ∼ K 2 n/ℓ. Next we prove an estimate on the probability of having a pair of zeros in fixed coordinates k1 6= k2 . Lemma 10. Suppose ℓ ∈ ω(n). Then for fixed k1 6= k2 , n P (vkℓ 1 = vkℓ 2 = 0) ∼ K 2 . ℓ Proof. We begin by computing the characteristic function of (xj , yj ) which is given by 1 1 φ(t1 , t2 ) = E(ei(t1 xj +t2 yj ) ) = 1 − (1 − cos t1 ) − (1 − cos t2 ) n n P P ℓ ℓ and the characteristic function of (vkℓ 1 , vkℓ 2 ) = ( j=1 xj , j=1 yj ) which is ℓ  1 1 ℓ φ(t) = 1 − (1 − cos t1 ) − (1 − cos t2 ) . n n 8 KELLY DELP, TULLIA DYMARZ, ANSCHEL SCHAFFER-COHEN Therefore P (vkℓ 1 = vkℓ 2 1 = 0) = (2π)2 ZZ 1 = (2π)2 ℓ  1 1 1 − (1 − cos t1 ) − (1 − cos t2 ) dt1 dt2 . n n [−π,π]2 ZZ [−π,π]2 where θ = (t1 , t2 ) and h(θ) =  ℓ 1 |θ|2 + h(θ) dθ 1− 2n n 2i 2i i t1 +t2 i=2 (−1) (2i)! P∞ P∞ We use the Taylor expansion log(1 + x) = i=1   (2) ∈ O(|θ|4 ). xi i that is valid for |x| ≤ 1 to write 1 1 |θ|2 |θ|2   + h(θ) = − + h(θ) + f (θ, 1/n) log(φ(θ)) = log 1 − 2n n 2n n | {z } x where f (θ, 1/n) = ∞ X 1 j=2 This expansion is valid for − j ∞ t2i + t2i 1X 2 (−1)i 1 n i=1 (2i)! !j = O(|θ|4 ). 1 1 |θ|2 |θ|2 + h(θ) = + h(θ) ≤ 1 − 2n n n 2 which holds as long as |θ| < δ where δ does not depend on n. (It holds for√n = 1 p and so it holds for all n). Let λ = ℓ/n. Now use a change of variable θ = s/ λ = s nℓ in Equation 2 and multiply both sides by ℓ to get   √  √ |s|2 ℓ ℓ log φ s/ λ = − + h(s/ λ) + f¯(s, 1/ℓ, λ) 2 |n {z } gn (ℓ,s) where f¯ = ℓf is given by f¯(s, 1/ℓ, λ) = ∞ X j=2 1 jℓj−1 ∞ X 1 s2i + s2i 2 (−1) i−1 1 λ (2i)! i=1 i !j . √ This expansion is valid as long as |s| ≤ δ λ. Note that when n = 1 we have !j ∞ ∞ 2i 2i X X 1 1 s + s 2 f¯(s, 1/ℓ, ℓ) = (−1)i i−1 1 j−1 jℓ ℓ (2i)! j=2 i=1 and since ℓ > λ we have that ∞ X j=2 Then 1 jℓj−1 ∞ X i=1 2i 1 s2i 1 + s2 λi−1 (2i)! !j ≤ ∞ X j=2 1 jλj−1 ∞ X i=1 2i 1 s2i 1 + s2 λi−1 (2i)! √ √ c|s|4 |gn (ℓ, s)| ≤ λ|h(s/ λ)| + |f¯(s, 1/ℓ, λ)| ≤ λ|h(s/ λ)| + λ !j . A MATRIX MODEL FOR RANDOM NILPOTENT GROUPS 9 where c can be chosen independent of n. Note that ∞ ∞ X X √ 1 s2i + s2i 1 s2i + s2i 2 2 (−1)i i 1 (−1)i i−1 1 λ h(s/ λ) = λ = λ (2i)! λ (2i)! i=2 i=2 √ √ 2 so λ |h(s/ λ)| = o(|s| ) and so we can find 0 < ǫ ≤ δ such that for |s| ≤ ǫ λ |gn (s, ℓ)| ≤ Let Fℓ,n (s) = egn (ℓ,s) − 1 and let p̄ℓ (0) = 1 (2π)2 λ Z |s|2 . 4 e− |s|2 2 ds = R2 1 2πλ be the integral of a two-variable standard normal distribution (see for example Equation 2.2 in [5]). Then P (vkℓ 1 = vkℓ 2 = 0) = = = = = where |An (ǫ, ℓ)| = 1 (2π)2 ZZ φ(θ)ℓ dθ [−π,π]2 ℓ  ZZ 1 1 |θ|2 dθ + h(θ) 1 − (2π)2 2n n [−π,π]2 ZZ 2 1 e−|s| /2 (Fℓ,n (s) + 1)ds √ √ (2π)2 λ 2 [−π λ,π λ] ! ZZ 2 1 −|s| /2 (Fℓ,n (s) + 1)ds An (ǫ, ℓ) + √ e (2π)2 λ |s|≤ǫ λ ! ZZ |s|2 1 − 2 An (ǫ, ℓ) + p̄ℓ (0) + Bn (ǫ, ℓ) + Fℓ,n (s)ds √ e (2π)2 λ |s|≤ǫ λ ZZ √ √ √ [−π λ,π λ]2 \{|s|≤ǫ λ} √ φ(s/ λ)ℓ ds ≤ Cλe−βλ b 2 where C and β do not depend on n since |φ(θ)| ≤ 1 − nb |θ|2 ≤ e− n |θ| (where b does √ √ not depend on n) for all θ ∈ [−π, π]2 and so for |s| ≥ ǫ λ we have φ(s/ λ) ≤ e−β/n . Likewise |Bn (ǫ, ℓ)| = 1 (2π)2 λ ZZ where β ′ and C ′ do not depend on n. √ |s|>ǫ λ e−|s| 2 /2 ds ≤ C ′ e−β ′ λ 1 Finally as long as |s| ≤ λ 8 we have |Fℓ,n (s)| ≤ |egn (ℓ,s) − 1| ≤ C ′′ gn (ℓ, s) ≤ C ′′ |s|4 λ where C ′′ does not depend on n. Therefore we have Z ZZ 2 |s|2 C ′′ C ′′′ − |s| 2 . |s|4 e− 2 ds ≤ Fℓ,n (s)ds ≤ e λ R2 λ |s|≤λ1/8 10 KELLY DELP, TULLIA DYMARZ, ANSCHEL SCHAFFER-COHEN √ This leaves us only to estimate the integral for λ1/8 ≤ |s| ≤ ǫ λ where we have the bound |Fℓ,n (s)| ≤ e− ZZ |s|2 4 √ λ1/8 ≤|s|≤ǫ λ + 1. The integral then can be estimated as follows ZZ 2 |s|2 1/4 − |s| 2 e− 4 ds ≤ C̄e−ζλ . e Fℓ,n (s)ds ≤ 2 |s|≥λ1/8 This gives the desired result.  Corollary 11. Suppose ℓ ∈ ω(n). For fixed k1 6= k2 , P(vkℓ 1 = vkℓ 2 = wkℓ 1 = wkℓ 2 = 0) ∼ K 4 .  n 2 ℓ Proof. This follows from Lemma 10 and the fact that P(vkℓ 1 = vkℓ 2 = wkℓ 1 = wkℓ 2 = 0) = P(vkℓ 1 = vkℓ 2 = 0) P(wkℓ 1 = wkℓ 2 = 0).  Lemma 12. Suppose ℓ ∈ ω(n) and suppose ai = ai (ℓ) for 1 ≤ i ≤ n − 1, with P(a1 6= 0) → 1 as ℓ → ∞. Then P(a1 v1 + a2 v2 + · · · + an−1 vn−1 = 0) → 0 as ℓ → ∞. Proof. n n X X ai ai vi = 0) = P(v1 = − vi = 0 | a1 6= 0) P(a1 6= 0) P( a i=2 1 i=1 n X ai vi = 0 | a1 = 0) P(a1 = 0) + P( i=1 n X ai ≤ P(v1 = − vi = 0 | a1 6= 0) + P(a1 = 0) a i=2 1 ≤ P(v1 = 0) + P(a1 = 0) since the most likely value for v1 is 0 and therefore by Lemma 8 this limit goes to zero.  4. Asymptotic Abelianess In this section we prove Theorem 1. To check that Gℓ,n is abelian we only need to check that V, W commute. Most of our analysis involves the notion of supercommuting that we defined in the introduction. Recall that for two words V = V1 V2 · · · Vℓ and W = W1 W2 · · · Wℓ with Vi , Wi ∈ S to supercommute, every Vi must commute with every Wj . Clearly supercommuting is a sufficient (but not necessary) condition for commuting. However, when ℓ ∈ o(n), the probability of V and W commuting but not supercommuting goes to zero as n → ∞. Therefore, when ℓ is in this class, these two notions of commuting are asymptotically equivalent. A MATRIX MODEL FOR RANDOM NILPOTENT GROUPS 11 To prove this fact, we begin by defining the function   if Z = Ai 1 σi (Z) := −1 if Z = A−1 i   0 otherwise. Since multiplication in Un is additive on the superdiagonal elements, vi = ℓ X σi (Vj ) wi = j=1 ℓ X σi (Wj ). j=1 In other words, the ith superdiagonal entry of V is a count of the number of times one of A±1 appears in the word V = V1 . . . Vn , where Ai contributes +1, and i its inverse −1. Since ℓ is growing more slowly than the size of our matrix (and hence more slowly than the size of our generating set S), the probability of seeing a particular Ai in an ℓ-step walk approaches zero. We make this precise in the following lemma. Lemma 13. Suppose ℓ ∈ o(n). For fixed 1 ≤ i ≤ n − 1 and Z = Z1 Z2 · · · Zℓ , where ±1 Zi ∈ S = {A±1 1 , . . . An−1 }, P(σi (Zj ) 6= 0 for some 1 ≤ j ≤ ℓ) → 0 as n → ∞. Proof. For fixed j,  P(σi (Zj ) = 0) = 1 − Since the Zj ’s are independent, 2 2(n − 1)   = 1−  P(σi (Zj ) = 0 for all j) = 1 − 1 n−1 1 n−1 ℓ  . . Since ℓ ∈ o(n), the limit of this probability is 1, and so its negation—the probability that σi (Zj ) 6= 0 for some j—goes to 0.  Now suppose that Ai appears at least once in our word Z1 Z2 · · · Zℓ . Lemma 13 implies that it, or its inverse, almost surely does not appear again. Corollary 14. Suppose ℓ ∈ o(n) and Z = Z1 Z2 · · · Zℓ . For a fixed 1 ≤ i ≤ n − 1, the ith superdiagonal entry zi of Z satisfies P(zi = ±1 | σi (Zj ) 6= 0 for some j) → 1 as n → ∞. Proof. This follows from the fact that P(zi = ±1 | σi (Zj ) 6= 0 for some j, and σi (Zk ) = 0 for all k 6= j)) = 1 and ℓ−1  1 P(σi (Zk ) = 0 for all k 6= j) = 1 − →1 n−1 as ℓ → ∞.  12 KELLY DELP, TULLIA DYMARZ, ANSCHEL SCHAFFER-COHEN Lemma 15. When ℓ ∈ o(n), P(V and W commute but do not supercommute) → 0. Proof. Note that P(V and W commute but do not supercommute) ≤ P(V and W commute | V and W do not supercommute). We will call this latter (conditional) event C and show that P(C) → 0. Let Ai and Ai+1 be called neighboring elementary matrices. If V and W do not supercommute, then Corollary 4 implies the words V and W must contain neighboring matrices. Without loss of generality, this implies there must be some 1 < k ≤ n − 1 and some 1 ≤ i, j ≤ ℓ such that σk−1 (Wi ) 6= 0 and σk (Vj ) 6= 0. We bound P(C) above by considering the events wk−1 6= ±1, vk 6= ±1 and the joint event wk−1 = ±1, vk = ±1. While these three events are not mutually exclusive, they do cover all possibilities. P(C) ≤ P(C | wk−1 6= ±1) P(wk−1 6= ±1) + P(C | vk 6= ±1) P(vk 6= ±1) + P(C | wk−1 , vk = ±1) P(wk−1 , vk = ±1). By Corollary 14 the first two terms go to 0 and the last term goes to just P(C | wk−1 , vk = ±1). By Lemma 3, this is at most P(C | wk−1 , vk = ±1) ≤ P (wk−1 vk − wk vk−1 = 0 | wk−1 , vk = ±1) ≤ P(wk vk−1 6= 0) ≤ P(vk−1 6= 0) and P(vk−1 6= 0) → 0 by Lemma 13.  √ 4.1. Part 1 of Theorem 1: when ℓ(n) ∈ o( n). In this case, we can use a counting argument to show that V and W supercommute. √ Lemma 16. Assume that ℓ ∈ o( n), V = V1 V2 · · · Vℓ , and W = W1 W2 · · · Wℓ . Let F be the number of pairs i, j for which Vi and Wj fail to commute. Then the expected value E(F ) → 0 as n → ∞. Proof. Let γi,j be an indicator random variable whose value is 1 precisely when Vi Wj 6= Wj Vi . By Corollary 4, for each k, there are at most 2 values of i such that ±1 Vi does not commute with A±1 k . Since Wj = Ak for some 1 ≤ k ≤ n − 1, when 2 4 = n−1 ; 2 ≤ k ≤ n − 2, the probability that Vi does not commute with Wj is 2(n−1) 2 1 when k is equal to 1 or n − 1, the probability is 2(n−1) = n−1 . Therefore the 2 probability P (Vi Wj 6= Wj Vi ) ≤ n−1 for all i and j. Since F counts the number of non-commuting pairs Vi , Wj , we have F = ℓ X ℓ X i=1 j=1 γi,j . A MATRIX MODEL FOR RANDOM NILPOTENT GROUPS 13 By linearity of expected value, E(F ) = ℓ X ℓ X E(γi,j ). i=1 j=1 = ℓ X ℓ X i=1 j=1 P(Vi Wj 6= Wj Vi ) ℓ X ℓ X 2 n − 1 i=1 j=1   2 . ≤ ℓ2 n−1 ≤ √ Since ℓ ∈ o( n) then ℓ2 ∈ o(n) and 2ℓ2 = 0. n→∞ n − 1 lim E(F ) ≤ lim n→∞  √ Corollary 17. If ℓ ∈ o( n) then V and W supercommute asymptotically almost surely. Proof. The elements V and W supercommute precisely when every Vi commutes with every Wj , that is when F = 0. Since F is a nonnegative integer random variable, and E(F ) → 0 we have that P(F = 0) → 1.  √ 4.2. Part 2 of Theorem 1: when ℓ = c n. We start with a heuristic argument. For V and W to supercommute, Vi must commute with Wj for all 1 ≤ i, j ≤ ℓ. The probability that a given Vi and Wj commute is 1 − 2/(n − 1) for most cases. Since there are ℓ2 such pairs, the probability that they all commute is  ℓ2  c2 n 2 2 1 1− = 1− → 2c2 . n−1 n−1 e This argument assumes independence of each Vi , Wj pair commuting, which does not in general hold. However, we are able to show that limiting probability for 2 abeilianess is nonetheless 1/e2c , as predicted. If we fix the Vi ’s, there is a specific set of k’s for which A±1 k fails to commute with at least one Vi . Let B be the number of such k’s; then since the Wj ’s are chosen independently, the probability that all of them commute with V is given by  ℓ B (3) P(V and W supercommute) = 1 − . n−1 Now we have to say something about the distribution of B. Imagine a row of n − 1 bins. For each Vi = Ak±1 , we put a ball in bin k − 1 and a ball in bin k + 1. Then B is the number of non-empty bins. Since there are 2ℓ balls, two1 for each Vi , we have 2 ≤ B ≤ 2ℓ. Let D be the difference 2ℓ − B. We will show that the expected value of D approaches a constant. 1When V = A±1 or A±1 only one ball is added; but this almost never happens as n → ∞. i 1 n−1 14 KELLY DELP, TULLIA DYMARZ, ANSCHEL SCHAFFER-COHEN √ Lemma 18. If ℓ = c n then E(D) → 2c2 as n → ∞. Proof. Let P V = V1 V2 · · · Vℓ . First, we count the number X of “empty bins”. We write X = Xi , where Xi = ( 0 1 if Ai+1 or Ai−1 appears in the word V otherwise. Note that the behaviors for the end bins (when i = 1 or i = n − 1) are slightly different than the other bins but asymptotically this difference will not be important. Since each element Vi is chosen independently, we have, E(Xi ) = P(Xi = 1) =  Therefore, E(X) = (n − 1) 1 − B + X = n − 1, and we have, 2 n−1  E(B) = (n − 1) − (n − 1) 1 − ℓ  1− 2 n−1 ℓ . . Since B is the number of nonempty bins, 2 n−1 ℓ  2 = (n − 1) 1 − 1 − n−1 ℓ ! . Finally, since D is the difference 2ℓ−B, the expected value of D is E(D) = 2ℓ−E(B). Taking the limit as n goes to infinity gives the result.  In order to evaluate the limit of Equation (3) as ℓ → ∞ we need to control the size of B = 2ℓ − D. For this we consider two cases: when D ≥ log ℓ and when D ≤ log ℓ. √ Lemma 19. If ℓ = c n then P(D ≥ log ℓ) → 0 as n → ∞. Proof. Markov’s inequality tells us that P(D ≥ log ℓ) ≤ E(D)/ log ℓ. Since E(D) converges to a constant by Lemma 18 but log ℓ grows without bound, this probability goes to 0.  √ 2 Lemma 20. If ℓ = c n then P(Gℓ,n is abelian | D < log ℓ) → 1/e2c as n → ∞. Proof. Recall (by Lemma 15 and Equation 3) that lim P(Gℓ,n is abelian) n→∞ = lim P(W and V supercommute) ℓ  B = lim 1 − n→∞ n−1 n→∞ and that by definition of D, B = 2ℓ − D. Since 0 < D < log ℓ, we have  ℓ  ℓ  ℓ 2ℓ 2ℓ − D 2ℓ − log ℓ 1− ≤ 1− ≤ 1− . n−1 n−1 n−1 A MATRIX MODEL FOR RANDOM NILPOTENT GROUPS 15 Using standard techniques (taking the logarithm and using L’Hôpital’s rule) one 2 can show that as n → ∞ both the extreme functions limit to 1/e2c , and the result follows.  √ 2 Lemma 21. If ℓ = c n then P(Gℓ,n is abelian) → 1/e2c as n → ∞. Proof. We have lim P(Gℓ,n is abelian) = lim P(Gℓ,n is abelian | D < log ℓ) P(D < log ℓ) n→∞ n→∞ + lim P(Gℓ,n is abelian | D ≥ log ℓ) P(D ≥ log ℓ). n→∞ By Lemma 19 the second term goes to zero and the second factor of the first term goes to one, leaving just = lim P(Gℓ,n is abelian | D < log ℓ) n→∞ = 1 e2c2 by Lemma 20.  √ 4.3. Part 3 of Theorem 1: when ℓ ∈ ω( n) and ℓ ∈ o(n). By Lemma 15 we know that when ℓ ∈ o(n) supercommuting is asymptotically the same as commuting. Therefore to show that asymptotically Gℓ,n is almost never abelian we only need to show that V and W almost never supercommute. To show this, we consider n − 1 “bins”, one for each Ai . We think of each element Vi as a ball of a particular type, say red. Similarly each of the elements Wi correspond to a blue ball. We throw the ℓ red balls, and ℓ blue balls into the n − 1 bins, and look for a particular collision that implies V and W don’t supercommute. To prove this, we will use the following Lemma which is a generalized (to 2 colors) version of the probabilistic pigeonhole principle. A statement for q-colors appears in [3]. Fact 1 (Lemma 5 in [3]). Let µ be any probability measure on a set of size n. Let z1 , . . . , z2ℓ be chosen randomly and independently using µ. Then P(∃ i, j with i ≤ ℓ < j, zi = zj ) ≥ 1 − 2e−cℓ/ √ n for some universal constant c. √ In particular, when ℓ ∈ ω( n), this probability approaches 1 as n → ∞. √ Lemma 22. When ℓ ∈ ω( n) as n → ∞ the probability that V, W supercommute goes to zero. Proof. Let f be the function that takes A±1 k to k, and define 2ℓ random variables {zi } as follows: when i ≤ ℓ, zi = f (Vi ) 16 KELLY DELP, TULLIA DYMARZ, ANSCHEL SCHAFFER-COHEN and when i > ℓ, zi = ( n−1 f (Wi−ℓ ) − 1 if f (Wi−ℓ ) = 1 otherwise Then the conditions of Fact 1 apply to the zi ’s, and so asymptotically almost surely there exist an i and j so that i ≤ ℓ < j and zi = zj . This means that either zi = f (Vi ) = f (Wj−ℓ ) − 1 = zj or f (Vi ) = n − 1 and f (Wj−ℓ ) = 1. The latter case has probability 1/(n − 1), and so as n → ∞ we are almost surely in the former ±1 case. Thus Vi = A±1 k and Wj−ℓ = Ak+1 . Then Vi and Wj do not commute, and so V and W do not supercommute.  √ Corollary 23. If ℓ = ω( n) and ℓ = o(n) then Gℓ,n is asymptotically almost surely nonabelian. Proof. By Lemma 22 the probability that V, W supercommute goes to zero and therefore by Lemma 15, Gℓ,n is asymptotically almost surely nonabelian.  4.4. Part 3 of Theorem 1: when ℓ ∈ ω(n). In this case we need results from Section 3 on the distribution of superdiagonal entries. Lemma 24. When ℓ ∈ ω(n) then Gℓ,n is a.a.s. not abelian. Proof. By Lemma p 3, if v1 w2 6= v2 w1 then Gℓ,n is not abelian. By Lemma 8, P(w2 = 0) ∼ K n/ℓ → 0. Then by Lemma 12, P(v1 w2 = v2 w1 ) = P(v1 w2 − v2 w1 = 0) → 0, and so a.a.s. v1 w2 6= v2 w1 .  4.5. Part 3 of Theorem 1: when k ≤ ℓ/n ≤ M . To complete the proof of Theorem 1 part 3, we need to consider functions ℓ which lie in the complement of o(n), and ω(n); we therefore consider functions ℓ such that for large enough n, there exists constants k and M so that ℓ k ≤ ≤ M. n To show that Gℓ,n is not abelian, it is sufficient to find 1 ≤ i ≤ n − 2 for which the condition of Lemma 3 fails; that is, there exists an i so that vi wi+1 6= vi+1 wi . To do this, we count a subset of pairs of words V and W which have this property, and show that these pairs occur with high probability. Lemma 25. Suppose there exist constants k and M so that for large enough n, k ≤ ℓ/n ≤ M . Then a.a.s. there is some 1 ≤ i ≤ n−2 for which vi = ±1, vi+1 = 0, wi = ±1, and wi+1 = ±1. Proof. We will look specifically for cases in which Vj = A±1 for precisely one j, i ±1 ±1 Vj 6= Ai+1 for all j, Wj = A±1 for precisely one j, and W = A j i i+1 for precisely one j. Note that words V and W of this form have vi = ±1, vi+1 = 0, wi = ±1, and wi+1 = ±1. Hence, by Lemma 3, V and W will not commute. It’ll be useful to have a name for this sort of failure to commute, so we’ll say this particular sort of pair (V, W ) has a “type i” configuration. Out strategy for this proof is to define a random variable X which counts the expected number of type i configurations for A MATRIX MODEL FOR RANDOM NILPOTENT GROUPS 17 a pair of words (V, W ). We then show E[X 2 ]/E[X]2 → 1. It will be sufficient to consider only odd values of i, and as this makes some of the counting arguments simpler, we make this assumption. Fix i. Let Si be the set of words V of length ℓ which have Vj = A±1 for precisely i one j and Vj 6= A±1 for all j. There are ℓ indices to choose for the location of A±1 i+1 i , two choices for the exponent on Ai , and after subtracting out the elements A±1 and i A±1 i+1 , we have 2(n − 3) remaining generators to choose from for the remaining ℓ − 1 elements in the word V . Since the total number of words of length ℓ is (2(n − 1))ℓ , we have  ℓ−1 2 ℓ (n − 3)ℓ−1 ℓ ℓ(n − 3)ℓ−1 1− . = = P (Si ) = (n − 1)ℓ n − 1 (n − 1)ℓ−1 n−1 n−1 Let Ti be the set of words W for which Wj = A±1 and exactly one j ′ for which i ±1 Wj ′ = Ai+1 . Then we have ℓ−2  2 ℓ(ℓ − 1)(n − 3)ℓ−2 ℓ(ℓ − 1) 1− P (Ti ) = . = (n − 1)ℓ (n − 1)2 n−1 Since V and W are chosen independently, we have (4) P (Si , Ti ) = ℓ2 (ℓ − 1) (n − 1)3  1− 2 n−1 2ℓ−3 . Now we compute the probability of Si ∩ Si′ , for distinct i and i′ . Counting words of this sort is where we use the convenience of only considering odd indices, so that |i − i′ | ≥ 2. ℓ(ℓ − 1)(n − 5)ℓ−2 ℓ(ℓ − 1) P (Si ∩ Si′ ) = = (n − 1)ℓ (n − 1)2  1− 4 n−1 ℓ−2 . Similarly, we compute the probability of Ti ∩ Ti′ . ℓ(ℓ − 1)(ℓ − 2)(ℓ − 3) ℓ(ℓ − 1)(ℓ − 2)(ℓ − 3)(n − 5)ℓ−4 = P (Ti ∩T ) = (n − 1)ℓ (n − 1)4 i′  1− 4 n−1 ℓ−4 Let n′ be the number of odd integers in [1, n − 2], and let X be the number of odd values of i for which a type i configuration occurs in the pair (V, W ). Define the random variable Xi ( 1 if V is in Si and W in Ti Xi = 0 otherwise Then X = Pn′ i=1 X2i−1 and E(X) = n′ P (Si , Ti ). . 18 KELLY DELP, TULLIA DYMARZ, ANSCHEL SCHAFFER-COHEN Note that when ℓ is in the complement of o(n), we have E(X) → ∞ as n → ∞. (Also, when ℓ is in ω(n), the expected value E(x) → 0 as n → ∞, hence this proof is not valid when ℓ is in this range.) When i 6= i′ , Xi Xi′ = 1 if and only if V is in Si ∩Si′ and W is in Ti ∩Ti′ . Therefore, E(X 2 ) = n′ P (Si , Ti ) + n′ (n′ − 1)P (Si ∩ Si′ , Ti ∩ Ti′ ). We now argue that E(X 2 )/ E(X)2 → 1 as n → ∞. E(X 2 ) n′ P (Si , Ti ) + n′ (n′ − 1)P (Si ∩ Si′ , Ti ∩ Ti′ ) = E(X)2 (n′ )2 P (Si , Ti )2   ′ n − 1 P (Si ∩ Si′ , Ti ∩ Ti′ ) 1 . + = ′ n P (Si , Ti ) n′ P (Si , Ti )2 When ℓ is bounded above by M n, the first term goes to zero as n → ∞. After simplifying a bit, we have, P (Si ∩ Si′ , Ti ∩ Ti′ ) (ℓ − 2)(ℓ − 3) = P (Si , Ti )2 ℓ2  n−5 n−3 2ℓ−6  n−3 n−1 −2ℓ When ℓ = cn, the product of the later two functions limits to 1. When can therefore conclude that E[X 2 ]/E[X]2 → 1 whenever ℓ is (eventually) bounded below by kn and above by M n. Since E[X] → ∞, asymptotically almost surely X > 0, meaning that there is some odd i for which a type i configuration occurs.  Corollary 26. Suppose there exits constants k and M so that for large enough n, k ≤ ℓ/n ≤ M ; then a.a.s. Gℓ,n is not abelian. 5. Full step To analyze whether our group Gℓ,n has full step we rely heavily on the results from Section 3. Define two families of indicator random variables δ and γ as follows: ( ( ( 1 if vi = 0 1 if wi = 0 1 if vi = wi = 0 δv,i = δw,i = γi = 0 if vi 6= 0 0 if wi 6= 0 0 if vi 6= 0 or wi 6= 0 Note that γi = δv,i δw,i . 5.1. Part 1 of Theorem 2: when ℓ ∈ o(n2 ). In this case we show that Gℓ,n is a.a.s never full step but we separate the proofs into two subcases. In Corollary 28 we consider the case when ℓ ∈ O(n) while in Lemma 29 we consider the case when ℓ ∈ ω(n) ∩ o(n2 ). The following lemma is standard but is the basis for Corollary 28 so we include the proof. A MATRIX MODEL FOR RANDOM NILPOTENT GROUPS 19 Lemma 27. If cn balls are thrown uniformly and independently into n bins, there is a.a.s. at least one empty bin. Proof. Let X be the number of empty bins. Then X = ( 1 if bin i is empty Xi = 0 otherwise. P i Xi where Then E(X) = n E(Xi ) = n P(Bin i is empty)  cn 1 =n 1− n and E(X 2 ) = E(X) + 2 X E(Xi Xj ) i6=j cn  n(n − 1) 1 +2 P(Bins i and j are both empty) =n 1− n 2 cn cn   2 1 + n(n − 1) 1 − . =n 1− n n Thus E(X) → ∞ and  1 cn + n(n − 1) n 2cn n2 1 − n1 cn 1 − n2 2cn 1 − n1 n 1− E(X 2 ) = 2 E(X) ∼ 1−  2 cn n → 1, And so P(X = 0) → 0. Thus a.a.s. X > 0, and so there is at least one empty bin.  Corollary 28. If ℓ ∈ O(n), a.a.s. Gℓ,n is not full-step. Proof. Let V = V1 · · · Vℓ and W = W1 · · · Wℓ . Set up n−1 bins and put a ball in bin i whenever some Vj = A±1 or Wj = A±1 i i . Note that this process effectively throws in 2ℓ balls uniformly and independently into the n − 1 bins. Since ℓ ∈ O(n), there is some c > 0 for which 2ℓ < c(n − 1) for large enough n, and thus by Lemma 27 there is an empty bin. This empty bin corresponds to some i for which vi = wi = 0, and so by Lemma 6 Gℓ,n is not full-step.  Lemma 29. If ℓ ∈ o(n2 ) and ℓ ∈ ω(n), a.a.s. Gℓ,n is not full-step. 20 KELLY DELP, TULLIA DYMARZ, ANSCHEL SCHAFFER-COHEN Proof. Let X be the number of positions on the superdiagonal for which V and W both have a 0. That is X γi X= i E(X) = X E(γi ) i = n P(vi = wi = 0). By Corollary 9, ∼ nK 2 ∼ K2 n ℓ n2 ℓ →∞ when ℓ ∈ o(n2 ). Also,  E(X 2 ) = E  = X X i E(γi ) + 2 i = X !2  γi  X E(γi γj ) i6=j P(vi = wi = 0) + 2 i X P(vi = vj = wi = wj = 0). i6=j By Corollaries 9 and 11, n n2 + n2 K 4 2 ℓ ℓ 4 2 n n + K4 2 . = K2 ℓ ℓ ∼ nK 2 Then 2 4 K 2 nℓ + K 4 nℓ2 E(X 2 ) ∼ 4 E(X)2 K 4 nℓ2 and since ℓ ∈ o(n2 ) the second term dominates in the numerator to give us 4 ∼ K 4 nℓ2 4 K 4 nℓ2 ∼ 1. Since E(X) → ∞ and E(X 2 )/ E(X)2 → 1 then P (X > 0) → 1. So there is at least one i for which γi = 1, that is vi = wi = 0. Then by Lemma 6 we have that Gℓ,n is not full-step.  A MATRIX MODEL FOR RANDOM NILPOTENT GROUPS 21 5.2. Part 2 of Theorem 2: when ℓ ∈ ω(n3 ). Lemma 30. If ℓ ∈ ω(n3 ), a.a.s. Gℓ,n is full-step. Proof. Let X be the number of zeroes on the superdiagonal of W . That is X δw,i . X= i Then E(X) = X E(δw,i ). i Since the δ are identically distributed, = n P(wi = 0). By Lemma 8, r n ∼ nK ℓ r 3 n ∼K ℓ →0 when ℓ ∈ ω(n3 ). This means that P(X = 0) → 1, and so a.a.s. none of the wi are 0. Now, for Gℓ,n to be full-step (that is, step n − 1), the (n − 2)-commutator subgroup must have a nontrivial element. In particular, consider the commutator C n−2 = [W, [W, . . . [W , V ]]]. | {z } n−2 As we saw in Example 2 in Section 2 the upper-right corner entry of C n−2 is given by n−2 cn,n = K1 v1 w2 w3 · · · wn−1 + K2 w1 v2 w3 · · · wn−1 + · · · + Kn−1 w1 · · · wn−2 vn−1  where each Ki = n−1 with alternating signs. Since the wi and Ki are a.a.s. i n−2 nonzero and ℓ ∈ ω(n), Lemma 12 says that P(cn,n = 0) → 0 and thus a.a.s. n−2 n−2 cn,n 6= 0, making C nontrivial.  References 1. Matthew Cordes, Moon Duchin, Yen Duong, and Andrew P. Sánchez, Random nilpotent groups 1, To appear in International Mathematics Research Notices (2015). 2. Willem A. de Graaf and Werner Nickel, Constructing faithful representations of finitelygenerated torsion-free nilpotent groups, J. Symbolic Comput. 33 (2002), no. 1, 31–41. MR 1876310 (2003j:20009) 3. Moon Duchin, Kasia Jankiewicz, Shelby Kilmer, Samuel Lelièvre, John M Mackay, and Andrew P. Sánchez, A sharper threshold for random groups at density one-half, To Appear in Groups, Geometry and Dynamics (2014). 4. Philip Hall, The Edmonton notes on nilpotent groups, Queen Mary College Mathematics Notes, Mathematics Department, Queen Mary College, London, 1969. MR 0283083 (44 #316) 22 KELLY DELP, TULLIA DYMARZ, ANSCHEL SCHAFFER-COHEN 5. Gregory F. Lawler and Vlada Limic, Random walk: a modern introduction, Cambridge Studies in Advanced Mathematics, vol. 123, Cambridge University Press, Cambridge, 2010. MR 2677157 (2012a:60132) 6. Wilhelm Magnus, Abraham Karrass, and Donald Solitar, Combinatorial group theory, revised ed., Dover Publications, Inc., New York, 1976, Presentations of groups in terms of generators and relations. MR 0422434 (54 #10423) 7. Yann Ollivier, A January 2005 invitation to random groups, Ensaios Matemáticos [Mathematical Surveys], vol. 10, Sociedade Brasileira de Matemática, Rio de Janeiro, 2005. MR 2205306 (2007e:20088)
4math.GR
1 On Energy Efficient Uplink Multi-User MIMO with Shared LNA Control arXiv:1709.06856v1 [cs.IT] 20 Sep 2017 Zehao Yu, Cong Shen, Pengkai Zhao, and Xiliang Luo Abstract—Implementation cost and power consumption are two important considerations in modern wireless communications, particularly in large-scale multi-antenna systems where the number of individual radio-frequency (RF) chains may be significantly larger than before. In this work, we propose to deploy a single low-noise amplifier (LNA) on the uplink multipleinput-multiple-output (MIMO) receiver to cover all antennas. This architecture, although favorable from the perspective of cost and power consumption, introduces challenges in the LNA gain control and user transmit power control. We formulate an energy efficiency maximization problem under practical system constraints, and prove that it is a constrained quasi-concave optimization problem. We then propose an efficient algorithm, Bisection – Gradient Assisted Interior Point (B-GAIP), that solves this optimization problem. The optimality, convergence and complexity of B-GAIP are analyzed, and further corroborated via numerical simulations. In particular, the performance loss due to using a shared LNA as opposed to separate LNAs in each RF chain, when using B-GAIP to determine the LNA gain and user transmit power, is very small in both centralized and distributed MIMO systems. I. I NTRODUCTION Energy efficiency of communication systems is of significant practical importance and has become a hot research topic in both academia and industry. This is mainly due to the increasing global energy demand and the requirement of green radio [1]. In addition, despite the significant development of battery technology, it has not been able to fully keep pace with the practical demand from portable devices such as smartphones and tablets [2]. From the operators’ perspective, reducing both the operation cost and carbon dioxide emissions [3] is becoming essential to their business bottom line. As a result, research on energy efficient wireless communications has been prolific over the past decade [4]–[7]. The energy efficient design become especially crucial with the introduction of multiple-input-multiple-output (MIMO), particularly with the increased emphasis on massive MIMO [8] in 5G standards [9]. A typical system architecture of massive MIMO assigns a separate radio-frequency (RF) chain to each transmit or receive antenna. When the number of antennas is large, hardware cost and power consumption increase substantially, which has motivated extensive studies on massive MIMO with inexpensive hardware components such as lowresolution Analog-to-Digital Converter (ADC) [10], Digitalto-Analog Converter (DAC) [11], mixers and oscillators [12]. Z. Yu and C. Shen are with the Laboratory of Future Networks, School of Information Science and Technology, University of Science and Technology of China. P. Zhao is with Qualcomm, Santa Clara, CA, USA. X. Luo is with School of Information Science and Technology, ShanghaiTech University. In this paper, we follow the same design philosophy and study an attractive low-complexity MIMO receiver structure, where a single low-noise amplifier (LNA) [13] is used to cover all receive antennas at the base station (BS). This architecture has the benefits of reduced implementation cost and lower power consumption, compared to the separate LNA approach where each RF chain uses an independent LNA for gain control. The shared-LNA structure is previously used by multichannel communications [13] where signals from different channels are non-overlapping in the frequency domain. This feature mostly relies on LNA’s wider bandwidth and more relaxed saturation point compared to other RF components like ADC. Fortunately, we will show in this work that the sharedLNA structure can be adopted by (large-scale) multi-antennas even when they are using the same spectrum. One intuitive solution is to program down-conversion parameters of different receiver paths (especially the configuration of mixer and bypass filters), so that within shared LNA, signals from these receiver paths are not overlapping in the frequency domain. However, reducing the number of LNAs also introduces some important design challenges. For the separate LNA receiver structure, each receive antenna will have an independent LNA to adjust the power of the received signal for further processing. This gain can be optimized based on the individual receive power of the RF chain, resulting in maximum flexibility. For the shared LNA structure, however, the single LNA gain control must accommodate all receive antennas. Hence, it is conceivable that performance degradation may occur if inappropriate power amplification happens on some RF chains, resulting in ADC overflow or underflow1. Intuitively, the performance disadvantage of shared LNA may be significant when the range of receive power values across all BS antennas is large, and the channel paths experience independent fading (both large- and small-scale). In this scenario, a single LNA may not satisfy the power amplification requirements for all antennas, resulting in a performance degradation. To evaluate this interesting case, we study both centralized and distributed MIMO layouts in this paper, and focus on the large-scale regime (i.e., massive MIMO). For the centralized layout, [8] studies the system capacity where the number of BS antennas approaches infinity while the number of single-antenna users remains fixed. In addition, a more complete asymptotic analysis where the number of BS antennas and/or users approaches infinity has been carried out in [17]. Regarding the energy efficiency analysis, most of 1 In our work, similar to the existing literature, we also consider using lowresolution ADCs [14]–[16] following the LNA gain control, to reduce the power consumption and overall cost. 2 the studies are carried out addressing different aspects such as power allocation algorithm [18], transmit antenna selection [19], and link adaptation [20]. In the distributed MIMO layout, the BS antennas are spread out in the coverage area and connected to the BS via fiber or cable [21]. This architecture has recently attracted a lot of research interest because of its potential in offering higher data rate [22], owing to the reduced minimum access distance of users to the scattered BS antennas. The capacity of multi-user large-scale MIMO systems with distributed layout has been evaluated in [21]– [23], but studies on its energy efficiency are limited [24]. In this paper, we study the energy efficient system design of an uplink multi-user MIMO (MU-MIMO) system deploying the shared LNA receiver structure, with both centralized and distributed MIMO layouts. More specifically, we focus on the joint optimization of shared LNA gain control and user transmit power control that can optimize the system energy efficiency, which is defined as the ratio between spectral efficiency and overall energy consumption [25]. We first formulate the energy efficiency optimization problem under realistic engineering constraints, and then show that it is a constrained quasi-concave optimization problem. An efficient algorithm, Bisection – Gradient Assisted Interior Point (B-GAIP), is proposed and its optimality is proved. Furthermore, we analyze its convergence and complexity with the help of an equivalent interpretation of B-GAIP. Numerical simulation results are provided to evaluate the benefits of shared LNA. The main contributions of this paper are summarized as follows. • • • We propose a shared LNA receive structure for uplink MU-MIMO systems, which has reduced implementation/operation cost and near-optimal energy efficiency. We formulate the energy efficiency optimization problem by considering several practical constraints. To solve this problem, we transfer the original problem under a fixed LNA gain into a constrained quasi-concave optimization problem, and then prove its concavity with respect to the LNA gain. These properties guarantee the feasibility and accuracy of our proposed solution. We propose B-GAIP, which is a two-step algorithm that finds the optimal power vector and LNA gain. By using the combination of gradient assisted interior point and bisection search, the algorithm solves the energy efficiency optimization problem in an efficient manner. We also show that the algorithm guarantees convergence to the global optimal solution and analyze its complexity. The rest of this paper is organized as follows. Section II presents the system model. Section III introduces the constraints and formulates the optimization problem. In Section IV we design and evaluate the proposed algorithm. Section V presents comprehensive numerical simulations to evaluate the performance. Finally, conclusions are drawn in Section VI. Notations: Throughout this paper, vectors are written as bold letters x, and can be either row or column and their dimensions will be explicitly stated when defined. Matrices are written as bold capital letters A. x◦y represents the Hadamard product of two vectors, and AH denotes the Hermitian of A. || · || denotes the l2 norm unless stated otherwise, and |X | denotes the cardinality of set X . [A]ij is the element at the ith row and jth column of the matrix A. x ∼ CN (x̄, σ 2 ) denotes a complex Gaussian random variable x with mean x̄ and variance σ 2 . diag(x1 , . . . , xn ) denotes an n × n diagonal matrix with diagonal elements x1 , . . . , xn . II. S YSTEM M ODEL Consider an uplink single-cell MU-MIMO system with radius R0 . For the convenience of analysis, we assume a circular coverage area centered around the BS. In the system, K user equipments (UEs) are randomly and uniformly distributed in the coverage area, and each UE is equipped with a single antenna. The BS deploys M antennas, which may locate either entirely at the cell center (centralized MIMO) or randomly and uniformly distributed in the coverage area and connect to the BS via fiber or cable (distributed MIMO) [21]. We denote the set of all BS antennas as M and the set of UEs as K, with cardinalities |M| = M and |K| = K, respectively. Note that in both layouts, all the UEs are randomly and uniformly distributed over the cell. Also, in both centralized and distributed MIMO layouts, signals from all antennas will be jointly processed. Assume that all UEs simultaneously transmit data to the base station, the received vector at the BS can be written as y = GPx + z, (1) where y ∈ CM×1 is the signal vector at the BS receive 2 antennas and z ∼ CN (0, σN IM ) ∈ CM×1 is an additive white Gaussian noise (AWGN) vector with mean 0 and covariance 2 σN IM , with IM denoting the identity matrix with dimension √ √ M . P = diag( p1 , . . . , pK ) is the real-valued diagonal transmit amplitude matrix, and Px ∈ CK×1 is the transmitted vector of the K UEs. G ∈ CM×K is the channel matrix between K UEs and M BS antennas, whose elements is gmk , [G]mk . The channel matrix G models the independent fast fading, geometric attenuation, and log-normal shadow fading. As a result, element gmk is given by p (2) gmk = hmk βmk , where hmk is the fast fading coefficient from the kth UE to the mth BS antenna, and it follows a circularly symmetric complex √ Gaussian distribution with zero mean and unit variance; βmk represents the geometric attenuation and shadow fading which are assumed to be independent and constant over the coherent intervals. In this paper, we adopt the WINNER II path loss model in [26], where the path loss in dB domain is dB βmk = 46 + 20 log 10 (dmk ) + Vmk . (3) In model (3), dmk is the distance from UE k to BS antenna m and Vmk denotes the shadow fading which follows the lognormal distribution. The power decay can be written as βmk = dB 10(−βmk /10) . In order to reduce implementation cost and conserving energy, we use a single LNA to amplify the received signals from all K UEs at the BS, as opposed to the traditional one-LNAper-RF-chain approach. The receiver structure is illustrated in 3 Transmitters Receivers 1 1 2 2 ADC 1 Shared . . . K . . . LNA ADC 2 . . . Joint Baseband Processor Output Signal Vector M ADC M Fig. 1. The receiver structure with shared LNA control. Note that transmitters in the above illustration are from different uplink users. The receive antennas are for one BS and can be either co-located or distributed. Fig. 1, where a common LNA is applied to amplify the signals of all receive antennas. The gain of this common LNA is dB denoted as ΩdB in the dB domain and Ω = 10(Ω /10) . The amplified received signal vector can be written as √ ỹ = Ωy. (4) We consider a finite range with discrete values for parameter dB dB ΩdB , i.e., ΩdB 6 ΩdB is an integer. max and Ω min 6 Ω After power amplification, each component of the signal vector will pass through an individual low-resolution ADC. We adopt the fixed ADC noise model2 as in [27]: ŷ = ỹ + nq , where Ad denotes the coding gain and possibly multi-antenna diversity gain, which in practice is obtained via off-line fitting via link adaptation simulations. Γmax is the maximum achievable SNR at the receiver, which is often dominated by phase noise and IQ mismatch3 . Finally, the energy efficiency is defined as the ratio between spectral efficiency and consumed power of the system [25]. Note that in our model, and also in other literature [13], [20], the overall consumed power includes the circuit power and the transmit power. Therefore, the energy efficiency defined here is a system-level metric rather than that of only the tranceivers. As a result, we have: PK k=1 Rk , (11) U (p, Ω) = PK Pc + k=1 pk /η where Pc denotes the circuit power of both the transmitters and the receivers, η is the power amplifier efficiency, and p = [p1 , p2 , ..., pK ] is the power allocation vector. Moreover, we define SE vector under configuration p and Ω as R = [R1 , R2 , ..., RK ]. Note that there is a one-to-one mapping between power pk and spectral efficiency Rk for a given Ω. Hence, U (p, Ω) can also be written as U (R, Ω). We further use U (Ω) to denote the maximum energy efficiency under all feasible power vectors. (5) A. Implementation Considerations for Shared Power Amplifier where the additive noise vector nq ∈ CM×1 is uncorrelated with the ADC input ỹ, and its elements are modeled as independent complex Gaussian random variables with zero 2 mean and variance σADC . We assume that the BS has perfect knowledge of the CSI. By using a zero-forcing (ZF) detector F , (GH G)−1 GH (which requires M > K), the quantized signal vector ŷ is processed as follows: In Fig. 1, we have illustrated the concept of a shared LNA that uses one power amplifier for all receive RF chains in an uplink MU-MIMO system. Conventionally, shared LNA has been adopted in multi-channel communications [13] where signals from different channels are non-overlapping in the frequency domain. It is not straightforward how such a shared LNA structure can be extended to multi-antenna receivers, where signals from different antennas are on the same frequency. In this section, we discuss two possible implementations, shown in Fig. 2, that can effectively and efficiently implement shared power amplifier for a multi-antenna receiver. The first implementation is to leverage the RF framework proposed in [30], which is built on a super-heterodyne receiver. The details of this implementation is depicted in Fig. 2(a). In this structure, although different receive antennas are using the same frequency channel, by programming the frond-end mixers and filters, these receive (Rx) paths can be tuned as non-overlapping in the frequency domain at the input of the shared amplifier. In addition, mixers and filters after the amplifier can further isolate the shared-amplifier output from each baseband path. Another possible implementation is shown in Fig. 2(b), where a direct-conversion receiver is used and synchronized switches at the input and output of shared amplifier are applied. Assuming sample-and-hold type ADCs and power amplifiers, if the switches at the input and output of shared r = Fŷ = (GH G)−1 GH ŷ. Since we have FG = IK , r is given by √ √ r = ΩPx + ΩFz + Fnq . (6) (7) Take the kth component of the vector r as an example, we have p √ rk = Ωpk xk + Ωfk z + fk nq , (8) where fk denotes the kth row of matrix F. As a result, the signal-to-noise ratio (SNR) of the kth UE at the output of the BS receiver can be calculated as Ωpk Γk = . (9) 2 + σ2 2 (ΩσN ADC )kfk k By using SNR Γk , we define the spectral efficiency (SE) via modified Shannon capacity:  log2 (1 + Ad ∗ Γk ), Γk < Γmax (10) Rk = log2 (1 + Ad ∗ Γmax ), Γk > Γmax 2 Note that under most of the ADC models, such as the additive quantization noise model (AQNM), the power of quantization noise changes with the power of ADC input signals. However, since LNA is used to control the power gain, it is convenient and appropriate to assume a fixed ADC noise [13], [27], [28]. 3 IQ mismatch refers to phase and gain imbalance between in-phase (I) and quadrature (Q) paths [29]. For a given Γmax from RF impairment, the baseband demodulation capability is accordingly designed with no extra demodulation gain when the input SNR is beyond Γmax . Such observation motivates the usage of a SNR cap in Eqn. (10). 4 BCDEFGHIJ X [\]^_`abcdef ghijklmno pqrstu MNOPQ •  Y  + Z 012345 6789:; <=>?@A     RSTUVW KL (a) Super-heterodyne implementation ¸¹º»¼½¾¿À É †‡ˆ Ê ‰Š‹ Ì Í Î ƒ „ ’“”•–— ˜™š›œ žŸ ¡¢£¤¥ Ë Á ÃÄÅÆÇÈ   ‘ vwxyz ¦§¨©ª« ¬­®¯°± ²³´µ¶· maximize U (p, Ω) p, Ω subject to (12), (13), (14). ÏÐÑÒÓÔÕÖרÙÚ ÛÜÝÞ ßàáâã äåæçèéêë maximize U (p, Ω) = maximize maximize U (p, Ω), (16) p, Ω Fig. 2. Two possible shared amplifier implementation structures. amplifier have well synchronized timing to ensure the same Rx path, and switching periodicity is aligned with the ADC sampling rate, then the baseband processor can collect the right digital samples from different Rx paths using one amplifier. A final comment is that although we focus on LNA in this paper, our work can be directly extended to any power amplifiers in the Rx path of the receiver, such as Intermediate Frequency (IF) amplifier or baseband amplifier. Besides these two possible implementations, other novel RF structures for shared power amplifiers can be further developed, which is an open topic in the 5G RF research. III. F ORMULATING THE E NERGY EFFICIENCY O PTIMIZATION P ROBLEM Before presenting the system design problem and looking into its structure, we first introduce the constraints that capture three important engineering limitations in practical systems. • Each UE’s transmit power pk is subject to a maximum power value, and is obviously non-negative: (12) To avoid ADC saturation, each ADC’s input power is ADC capped by a maximum value Pmax : H 2 ADC Ω(gm P2 gm + σN ) 6 Pmax , m ∈ M, (15) We first note that there are two optimizable variables p and Ω. For Ω, since only a finite set of values can be used, we always have ŒŽ 0 6 pk 6 Pmax , k ∈ K. (14) Note that (10) has already shown that, when the SNR at the receiver achieves the maximum value Γmax , the spectral efficiency will stay at log2 (1+Ad ∗Γmax ) without further increase. This means that when the received and processed signal of the kth UE already achieved the maximal SNR, there is no gain to increase transmit power pk . As a result, the limitation in (14) is an equivalent interpretation of (10). We comment that these constraints will limit the tunable parameters into a bounded subspace. With these practical limitations, the energy efficiency maximization problem under a shared LNA can be formally presented as {|}~€‚ (b) High-speed switch implementation • Ωpk 6 Γmax , k ∈ K. 2 + σ2 2 (ΩσN ADC )kfk k   ! "#$%& '()*+,-./    where gm denotes the mth row of matrix G. Note that for each m ∈ M, there exits a combined limitation on all of the transmit power Pk , ∀k ∈ K. Since the effective SNR and SE at the receiver are capped, the limitation on transmit power can be presented as (13) Ω p which means that we can optimize p and Ω sequentially. The following lemma shows that, when the LNA gain Ω is fixed, the aforementioned three constraints form a convex set with respect to the power vector p. Lemma 1. Under a fixed LNA gain Ω, (12), (13) and (14) are all linear constraints on the power vector p, and therefore form a convex set with respect to p. Proof. (12) and (14) are straightforward convex sets. For (13), it can be re-written as ! K X 2 2 ADC Ω |gmk | pk + σN 6 Pmax , m ∈ M, (17) k=1 which is a combined linear limitation on all the components of the power vector, and thus is convex. Finally, the lemma is immediately proven using the property that convexity is preserved under set intersections [31]. We proceed to evaluate the objective function U (p, Ω) in (11). Theorem 1 states that U (p, Ω) is a strictly quasi-concave function under a fixed LNA gain Ω, and Lemma 2 establishes the global optimality of local optimum for strictly quasiconcave functions. Then, Theorem 2 further shows that the objective function is concave in Ω. These three results lay the theoretical foundation of the proposed algorithm in Section IV. Theorem 1. The objective function U (p, Ω) in Problem 15 is a strictly quasi-concave function with respect to the power 5 allocation vector p. Thus, for a given LNA gain Ω, the original optimization problem (15) becomes a constrained quasi-concave optimization problem as follows: maximize U (p, Ω) p subject to (12), (13), (14). (18) Proof. See Appendix A. We note that any strictly concave function is also strictly quasi-concave but the reverse is generally not true. Moreover, an important property of an optimization problem whose objective function is strictly quasi-concave is that a local optimal solution must be the global optimal one, as formally presented in Lemma 2. The proof can be found in [32]. Lemma 2. Suppose function f is strictly quasi-concave. Then the local maximum of f is also the global maximum. Note that all the properties we have established so far are for a fixed LNA gain Ω. The following theorem establishes the influence of Ω on the maximum energy efficiency under all feasible power vectors. may have very slow convergence, or not converge at all within a reasonable time period of solving the problem. To cope with this challenge, especially to make the algorithm efficient and applicable for large system dimensions, we resort to the interior-point method [31], [33]. The interiorpoint method is an optimization algorithm which transfers constrained optimization problems into unconstrained ones. The main idea is to construct a penalty function which “punishes” the objective function when it approaches or falls out of the boundary of the feasible set. In particular, we chose a logarithmic penalty function in our problem, which is concave. Since we consider a fixed LNA gain Ω in this subsection, we simply write U (p, G) as U (p) for convenience. The penalty function can then be written as ϕ(p, ξ) = U (p) + ξB(p) K h X =U (p) + ξ ln pk + ln(Pmax − pk ) i  k=1 Ωpk + ln Γmax − 2 + σ2 2 (ΩσN ADC )kfk k " !# M K X X ADC 2 2 +ξ ln Pmax − Ω |gmk | pk + σN . Theorem 2. The energy efficiency function U (Ω) is concave in the LNA gain Ω. Proof. See Appendix B. IV. T HE B-GAIP A LGORITHM FOR E NERGY E FFICIENCY O PTIMIZATION In this section, we propose the Bisection – Gradient Assisted Interior Point (B-GAIP) algorithm that solves Problem (15) under both small and large system dimensions. This algorithm is essentially a two-step implementation of (16) as follows. First, we fix the LNA gain Ω and design a gradient assisted interior-point (GAIP) algorithm to optimize the power vector, leveraging the strict quasi-concavity property established in Theorem 1. On top of GAIP, we use a bisection search method to find the optimal LNA gain for the maximum energy efficiency, based on its concavity in Ω as shown in Theorem 2. In addition to the detailed description of the proposed algorithms, we present the proof of convergence and analyze the algorithm complexity. A. GAIP: Optimizing Power Allocation under A Fixed LNA Gain The heuristic gradient or gradient-based optimization methods are commonly used in energy efficient power allocation problems [13], [18], [20]. This method is well-known and widely-used due to its effectiveness and succinctness. However, under the problem setting of this paper, the optimization objective is a strictly quasi-concave function with convex constraints. Note that (12) and (14) are limitations on a single UE transmit power and the total number of these constraints is 2K, while (13) is a combination of all the UE transmit powers and the total number of the limitations is M . As the system dimension becomes large, so does the number of constraints on the power allocation vector and LNA gain. Therefore, a straightforward adoption of the gradient descent algorithm [31] m=1 k=1 (19) Note that B(p) represents the penalty for approaching the boundaries, while ξ is the penalty factor which decides the intensity of penalty. We can see from (19) that when p is about to violate the constraints in (12), (13) and (14), the latter two terms of (19) will reduce the original objective function U (p) by a value that is inversely proportional to the distance between p and the boundary of the feasible set. Intuitively, as the penalty factor ξ approaches to zero, the penalty function ϕ(p, ξ) is approaching to U (p) as well. We then resort to the gradient descent method to find the optimal value of the unconstrained optimization function in (19). In particular, the partial derivative of the penalty function with respect to pk can be derived as   ∂ϕ(p, ξ) ∂U (p) 1 Tk 1 = +ξ − − ∂pk ∂pk pk Pmax − pk Γmax − Tk pk M X −Ω|g |2 P mk , +ξ K ADC 2 p + σ2 |g | m=1 Pmax − Ω mk k N k=1 (20) where we define Tk = ∂U(p) ∂pk Ω 2 +σ 2 )kf k2 , (ΩσN k ADC and the first term in (20) is given by ∂U (p) Ad Tk Rsum = . − ∂pk ln 2(1 + Ad Γk )(Pc + Psum ) η(Pc + Psum )2 (21) We further define the gradient metric over power vector p ∂ϕ ∂ϕ as ∇ϕ(p, ξ) = [ ∂p , . . . , ∂p ]. Finally, the proposed GAIP 1 K algorithm is compactly presented in Algorithm 1. B. B-GAIP: Optimizing Both LNA Gain and Power Allocation The GAIP algorithm presented in IV-A only optimizes the power values under a fixed LNA gain. A naive approach would 6 Algorithm 1: Gradient Assisted Interior Point Method Algorithm 2: The B-GAIP Algorithm for Solving Problem (15) (0) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Parameters: initial penalty factor ξ ; coefficient c; error limit ǫ; maximum loop count Lmax ; step size tl Input: Ω, channel coefficients Output: popt and Uopt = U (popt ) Randomly choose the initial power vector p(0) from the feasible set; Set initial penalty function value ϕ(p(0) , ξ (0) ) using (19); Set iteration index i = 0; do pcurr = p(i) ; ϕopt = ϕ(p(i) , ξ (i) ); for l = 1 to Lmax do Calculate gl = ∇ϕ(pcurr , ξ (i) )/||∇ϕ(pcurr , ξ (i) )||; Update power vector as pnext = pcurr + tl gl ; if ϕ(pnext , ξ (i) ) > ϕopt then Set pcurr = pnext ; Set ϕopt = ϕ(pnext , ξ (i) ); end end i++; ξ (i) = ξ (i−1) ∗ c; p(i) = popt ; ϕ(p(i) , ξ (i) ) = ϕopt ; while ϕ(p(i) ,ξ (i) )−ϕ(p(i−1) ,ξ (i−1) ) ϕ(p(i−1) ,ξ (i−1) ) > ǫ; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 be to apply Algorithm 1 to all possible values of Ω, i.e., dB sweeping all integer values between ΩdB min and Ωmax , and obtain the optimal energy efficiency. However, this approach may have high complexity if the set of feasible Ω is large, and it does not utilize the concavity property of the objective function with respect to Ω. Alternatively, we propose to solve this optimization problem using a bisection search method, which has lower complexity than linear sweeping, achieves the same optimal value, and leverages the concavity to guarantee optimality (see Theorem 2). The overall algorithm that solves Problem (15) is presented in Algorithm 2. 20 dB Input: ΩdB min , Ωmax and channel coefficients Output: optimal power allocation vector popt ; optimal LNA gain ΩdB opt ; global maximum energy efficiency Umax dB dB dB Set ΩdB left = Ωmin and Ωright = Ωmax ; dB dB while Ωleft 6= Ωright do dB LB = ⌊(ΩdB left + Ωright )/2⌋; dB UB = ⌈(Ωleft + ΩdB right )/2⌉; if LB == UB then Set UB = UB + 1; end (popt1 , Uopt1 ) ← Algorithm 1 with input ΩdB = LB and channel coefficients; (popt2 , Uopt2 ) ← Algorithm 1 with input ΩdB = UB and channel coefficients; if Uopt1 > Uopt2 then Set ΩdB right = LB; else Set ΩdB left = UB; end dB if ΩdB left == Ωright then dB Set Ωopt = ΩdB left ; Set Umax = max{Uopt1 , Uopt2 }; Choose popt according to Umax ; end end In order to cope with these obstacles, we have proposed the B-GAIP algorithm in this paper. For the convenience of the theoretical evaluations, we re-interpret Algorithm 2 and provide some important comments in the following. In particular, the procedure of B-GAIP can be reorganized as follows. • • C. Analysis of the B-GAIP Algorithm In this section, we will theoretically evaluate the convergence and complexity of the proposed algorithm. In order to do so, we first reorganize the B-GAIP algorithm into an equivalent formulation in Sec. IV-C1. This new interpretation, although does not bear algorithmic novelty, simplifies the convergence and complexity study in Sec. IV-C2 and IV-C3. 1) An Equivalent Interpretation of B-GAIP: There are three obstacles to solve the original optimization problem (18): (1) under a fixed LNA gain, the objective function is strictly quasiconvex, which is difficult to handle compared to the standard convex function; (2) for massive MIMO, the system dimension is large and thus the algorithm complexity is of great importance to its practical utility; and (3) the engineering constraints must be satisfied. Therefore, the methods in existing literature [13], [20], [24] are not applicable in our problem setting. Step-1: Choose two LNA gain values, LB and UB, as described in Algorithm 2. Step-2: Under these two gains, use Algorithm 1 to find the maximal energy efficiencies, Uopt1 and Uopt2 , respectively. – Step-2.1: In Algorithm 1, choose the penalty factor and convert the problem into an unconstrained quasiconcave optimization problem. – Step-2.2: Solve the converted problem using the gradient descent method. – Step-2.3: Go back to Step-2.1 with a smaller penalty factor if the accuracy requirement is not met; otherwise return the maximal energy efficiency and the optimal power vector. • Step-3: Compare the two outputs of Step-2 and then decide if the algorithm converges. Go back to Step1 if not converge; otherwise return the optimal power allocation vector and LNA gain. From the procedure above, we can conclude that the twostep algorithm has three main layers as follows. 7 The outer layer: Optimize the LNA gain via the bisection search method; • The middle layer: Under a given LNA gain, transfer the constrained problem into an unconstrained optimization problem via the interior-point method; • The inner layer: Find the optimal value of the unconstrained problem via the gradient descent method. We will use this interpretation in the following convergence and complexity analysis. 2) The Convergence Analysis: It is difficult to directly analyze the convergence of B-GAIP due to its inherent complexity. We thus leverage the equivalent interpretation and separately study the convergence of each layer, and the overall convergence of B-GAIP can be proved by a combination argument. In the following, the convergences of the inner, middle and outer layers will be presented respectively. The gradient descent method is used in the inner layer, with Lmax loops be performed while at each loop l, the argument p move towards the gradient direction which is also the ascent direction of function ϕ(p) with a step length that diminishes in l. Note that only the direction of the gradient is used due to normalization in our algorithm. As a result, the step length that is moved at each loop, i.e., ||pnext − pcurr ||, is exactly the step size tl , where we set tP l = 0.01/l. When Lmax → ∞, ∞ we have tl → 0 while l=1 tl = ∞, which suggests that the argument can move an unbounded distance towards the optimal value if sufficient iterations are allowed, thus guaranteeing the convergence. Recall that Lemma 2 proves that the local maximum of our objective function is also the global maximum, and thus we conclude that the inner layer not only converges, but also converges to the global optimum. For the middle layer, we use the interior-point method to transfer the original constrained optimization problem into an unconstrained one, and then invoke the gradient descent method (the inner layer) to solve it. Since we have already proved the convergence of the inner layer, it is now sufficient to establish the convergence of the middle layer if we can prove the equivalence of the original constrained problem and the converted unconstrained problem. We start the argument by noting from (19) that the difference between the original and the converted functions is the boundary penalty B(p), which is controlled by the penalty factor ξ. At the end of each loop, the penalty factor ξ is multiplied by a decreasing coefficient c, which eventually results in ξ → 0, and the converted function ϕ(p, ξ) then converges to the original objective function U (p). However, as the penalty factor ξ → 0, the difficulty for the inner layer to obtain the optimal value increases as it may approach the boundary of the feasible set. This issue can be resolved by using the output of the previous iteration as the starting point for the new iteration [31], as is done in Algorithm 1. As a result, we can achieve the global optimal value popt for maximizing U (p) by combining the inner and middle layers. Finally, in the outer layer, the bisection search method is used to optimize the LNA gain. We have already proved that the optimal power allocation vector under any fixed LNA gain is achieved. Because of the concavity property (Theorem 2) and the optimality of the bisection search method [31], we • conclude that the algorithm must converge to the optimum. In dB fact, at most log2 ΩdB max − Ωmin iterations will be performed before we reach the optimal value. 3) The Complexity Analysis: In order to quantitatively study the complexity of Algorithm 1 and 2, we individually analyze the complexity of each layer like we did in the convergence analysis. For the inner layer, we perform Lmax iterations and within each iteration, the partial derivative of each UE is calculated separately, resulting in a complexity scaling O(KLmax ). For the middle layer, the number of iterations will change according to the required accuracy, and therefore, it is a function of the error limit ǫ. We denote the number of iteration times as Tǫ and the complexity scaling of this layer should be O(Tǫ ). Finally, for the outer layer, the complexity scaling  dB of the bisection search is O log2 ΩdB − Ω . Putting all max min three layers together, the overall complexity of B-GAIP is of the order:  dB O KLmax Tǫ log2 ΩdB . (22) max − Ωmin Qualitatively, as discussed before, in the scenario with large number of BS antennas and UEs, it becomes time-consuming to determine whether the boundary limitations are violated. Fortunately, this difficulty is circumvented in Algorithm 1 as it converts the engineering constraints into penalty items and therefore transfers a constrained optimization problem to an unconstrained one, greatly reducing the complexity, especially when the system dimension is large. In the meanwhile, Algorithm 2 utilizes a bisection approach which reduces the search time exponentially compared with the intuitive linear search method. Accordingly, Algorithm 1 and 2 are more efficient than heuristic solutions and applicable for large scale systems. V. S IMULATION R ESULTS We resort to system-level simulations of an uplink MIMO system to numerically evaluate the proposed B-GAIP algorithm. Important simulation parameters can be found in Table I. In particular, for a given MIMO configuration, many realizations of the small-scale fading vector hk , the K UE positions, and the M BS antenna positions (in the case of distributed MIMO) are randomly generated. TABLE I S IMULATION PARAMETERS Cell radius R0 2 Background noise σN Shadow fading V 2 ADC noise σADC Minimal LNA gain ΩdB min Maximal LNA gain ΩdB max Diversity gain Ad Circuit power Pc Power amplifier efficiency η Maximal transmit power Pmax ADC Maximal ADC input power Pmax Maximal SNR Γmax Step size tl 100 ∼ 1000 m -104 dBm Log-normal with standard deviation of 8 dB -60 dBm 1 dB 70 dB 1 0.1 W 50% 20 dBm -20 dBm 35 dB 0.01/l In the following, we first compare the proposed algorithm with the heuristic brute force search solution, to verify the feasibility and accuracy of the B-GAIP algorithm in Sec. V-A. Aim at analyzing the energy efficiency performance in different system settings, in Sec. V-B, we compare the average maximum energy efficiency with centralized and distributed MIMO layouts in both small and large system dimensions. In particular, we evaluate the energy efficiency with different UE number K, BS antenna number M , and the ratio v = M/K with different system layouts. After that, we adjust the cell radius from 100 meters to 1000 meters with a 100m step size to evaluate the effect of cell radius on energy efficiency in Sec. V-C. Note that the comparisons are made with both centralized and distributed MIMO layouts. In addition, we compare BGAIP with heuristic algorithms to evaluate the performance gain of the proposed algorithm in Sec. V-D. Finally, comparison between shared and separate LNA is carried out in Sec. V-E to illustrate the trade-off between energy efficiency and system costs. These numerical simulation result may offer guidance to the design and operation of cost-aware massive MIMO systems. A. Comparison between B-GAIP and Brute Force Search It is crucial to verify whether the proposed B-GAIP algorithm will converge to the global optimal solution of the original optimization problem. In addition to the theoretical analysis in Section IV-C, we now compare our algorithm with the naive brute force solution that tries every possible parameter combination to find out the optimal solution. In particular, we choose a small system dimension with 2 UEs and 4 BS antennas in a distributed layout due to the high complexity of brute force search. We try all possible transmit power values and the LNA gain in dB domain with 0.1dB and 1dB step-size, respectively. We change the cell radius from 100m to 1000m and at each radius, we perform 2000 realizations of the channel parameters including UE and BS antenna positions, fast fading and shadow fading. In each realization, we run the proposed B-GAIP algorithm and the brute force solution separately, under the same computational environment, to find out the maximum energy efficiency. We also record the run time in each realization. Fig. 3 illustrates the average maximum energy efficiency obtained by the B-GAIP algorithm and the brute force search under different cell radii. We can clearly see from the figure that our B-GAIP algorithm has the same energy efficiency as the brute force solution and therefore converges to the optimal value4 . Moreover, we compare the complexity between the proposed algorithm and other heuristic brute force search solutions, by comparing their running time. We compare B-GAIP with three algorithms: (1) naive brute force solution, which simultaneously searches power vector p and LNA gain Ω for the optimal values; (2) hybrid solution type 1 (Hybrid1), which uses brute force search for Ω, while still uses the interiorpoint method to find the optimal p; (3) hybrid solution type 2 4 Note that while looking the same in the figure, the average maximum energy efficiency in B-GAIP actually slightly exceeds that of the brute force search, which is the result of the 0.1dB step-size since it may skip over the true optimal value. Average Maximum Energy Efficiency [bits/Joule/Hz] 8 190 Brute Force Solution Proposed Algorithm 180 170 160 150 140 130 120 110 100 90 100 200 300 400 500 600 700 800 900 1000 Cell Radius [m] Fig. 3. Energy efficiency comparison between the B-GAIP algorithm and the brute force solution. (Hybrid2), which uses brute force solution to search p, while uses bisection search to find the optimal Ω. The results are shown in Table II5 . We can see from the table that both B-GAIP and Hybrid1 algorithms outperform the other two significantly. It is a direct consequence of the fact that brute force search of p has an exponential complexity in the number of UEs. We can see that the superiority of B-GAIP over Hybrid1 is mainly due to the use of bisection search method, which reduces the time complexity of optimizing Ω from a linear order to a logarithmic order. In addition to the general comparison of complexity scaling, we further look into the effect of number of UEs in the system. Note that the time consumption of B-GAIP and Hybrid1 when there is only one UE is longer that the others, which is a consequence of the fact that the initialization time of the interior-point method is rather significant. Furthermore, the complexities of B-GAIP and Hybrid1 algorithms are approximately increasing linearly with the number of UEs, which agrees with the analysis in Section IV. B. Energy Efficiency with Different Dimensions and Layouts We now turn our attention to evaluating the energy efficiency performance under different system dimensions and layouts. There are several parameters to adjust, including the number of UEs K, the number of BS antennas M , the ratio v = M/K and the different network topologies, i.e., centralized or distributed MIMO layouts. We will evaluate the influences of these factors respectively. Fig. 4(a) shows the effect of system dimensions on the energy efficiency, with both centralized and distributed MIMO layouts. In this simulation, we let K and M grow simultaneously with a fixed ratio v = M/K = 2. We can observe that the average maximum energy efficiency increases 5 Note that the computational environment will affect the time consumptions. We carry out the comparison under the same computational environment, and the results are also averaged over large amount of realizations. 9 TABLE II C OMPLEXITY C OMPARISON OF D IFFERENT A LGORITHMS Time [s] Algorithms B-GAIP Naive Brute Force 0.0345 0.1087 0.1210 0.1307 0.1359 0.1390 0.1432 0.1459 0.1490 0.1527 0.0195 4.2681 591.5498 70590.9569 \ \ \ \ \ \ UE numbers 1 2 3 4 5 6 7 8 9 10 Hybrid1: Brute Force: Ω & Interior-Point: p 0.2237 0.6989 0.8010 0.8852 0.9625 1.0561 1.1237 1.1867 1.2415 1.3107 600 9000 Average Maximum Energy Efficiency [bits/Joule/Hz] Average Maximum Energy Efficiency [bits/Joule/Hz] 10000 Hybrid2: Brute Force: p & Bisection: Ω 0.0026 0.4854 70.1647 8696.3573 \ \ \ \ \ \ Centralized MIMO Distributed MIMO 8000 7000 6000 5000 4000 3000 2000 1000 0 0 20 40 60 80 100 120 140 160 180 200 Centralized MIMO Distributed MIMO 500 400 300 200 100 0 1 The number of UEs 2 3 4 5 6 7 8 9 10 The number of UEs (a) Large system dimension (b) Small system dimension Fig. 4. The effect of system dimension on energy efficiency with a fixed ratio v = M/K = 2. approximately linearly with the system dimension. Note that even though the energy efficiency in a distributed MIMO layout outperforms the centralized one when K and M are large, it is actually the opposite when the system dimension is small, as depicted in Fig. 4(b) which shows the energy efficiency performance when the number of UEs grows from 1 to 10, while the BS antennas are twice as many as the number of UEs. Intuitively, the phenomenon in Fig. 4 can be explained as follows. When the numbers of transmitters and receivers are both small, the average access distance in a centralized layout is shorter than that the distributed layout. This is because the BS antennas are all co-located in the center of the coverage area in a centralized layout, while in the distributed layout, BS antennas are randomly distributed throughout the cell, which may occasionally result in larger access distance when the number of antennas is very small. On the contrary, when the number of antennas grows, the average access distance in a distributed layout will become shorter than that in centralized layout, which means less energy consumed while delivering the same amount of information. Therefore, the energy efficiency in a distributed layout will eventually outperform the centralized layout as the system dimension grows. Fig. 5 further illustrates the effects of K and M on energy efficiency, respectively. We see from Fig. 5(a) that the number of UEs has a significant impact on the energy efficiency, while Fig. 5(b) implies that the number of BS antennas has much less effect, especially when M reaches a relatively large value. As a result, the dominating factor that determines the average maximum energy efficiency is K. C. The Effect of Cell Radius In order to study the effect of cell radius on energy efficiency, we plot Fig. 6 with different antenna layouts. It is clear that the average maximum energy efficiency decreases as the cell radius increases, which is also observed in some existing papers such as [13], [20]. The curve is convex, which suggests that the decrease of the energy efficiency is large when the cell radius is small and the trend will slow down as the cell radius grows. As a side note, we set K = 2 and M = 4 in this simulation, which is a relatively small system dimension, and the energy efficiency performance in the centralized layout will outperform the distributed layout. Since a large cell radius means that more transmit power will be needed to convey the same amount of information, it is 10 10000 240 Average Maximum Energy Efficiency [bits/Joule/Hz] Average Maximum Energy Efficiency [bits/Joule/Hz] 9000 8000 7000 6000 Centralized MIMO Distributed MIMO 5000 4000 3000 2000 220 200 Centralized MIMO Distributed MIMO 180 160 140 120 1000 0 0 20 40 60 80 100 120 140 160 180 200 The number of UEs 100 0 50 100 150 200 250 300 350 400 450 500 The number of BS antennas (a) M = 400, K = 2 ∼ 200 (b) K = 2, M = 5 ∼ 500 Fig. 5. The effect of K and M on energy efficiency. Average Maximum Energy Efficiency [bits/Joule/Hz] 200 Centralized MIMO Distributed MIMO 180 160 140 120 100 80 100 200 300 400 500 600 700 800 900 1000 Cell Radius [m] Fig. 6. The effect of cell radius on energy efficiency, with K = 2 and M = 4. clear that the energy efficiency will decrease with the growth of the cell radius. D. Comparison between Proposed Algorithm and Heuristic Algorithms In addition to analyzing the energy efficiency performance of our proposed algorithm, we also compare B-GAIP with two commonly adopted heuristic algorithms [13] to evaluate their performance differences in the distributed MIMO setting. Intuitively, higher transmit power and LNA gain shall result in higher SNR, and therefore higher energy efficiency performance. Correspondingly, we consider the following two heuristic algorithms: (1) use the maximal LNA gain combined with the corresponding optimal transmit power vector; and (2) use the maximal transmit power vector combined with the corresponding optimal LNA gain. Note that the engineering constraints in (12), (13), and (14) are still enforced when using these heuristic algorithms. Fig. 7 shows the energy efficiency performance of three algorithms under both small and moderate system dimensions. The performance gap is quite significant, suggesting that invoking B-GAIP to solve the original optimization problem is necessary. In addition, two other important observations can be drawn from Fig. 7. Fig. 7(a) depicts a situation where the system dimension is small. It is clear that our proposed algorithm outperforms the heuristic ones with a large margin. At the maximum point, the average maximum energy efficiency value achieved by BGAIP is 151.4% higher than that of the heuristic algorithm; while at the minimum point, the advantage becomes 42.4%, which is still a considerable gain. Meanwhile, we expect an even higher performance gain of B-GAIP when the system dimension becomes larger, since the bounded subspace of the tunable parameters will become larger, which means that there will be more options available for the algorithm to optimize with. To validate this conjecture, we run the simulation and report the corresponding result in Fig. 7(b), where a moderate system dimension is used as an example to compare the performance change. We can see from the figure that even at the minimum point, the performance of B-GAIP is still more than twice as that of the heuristic algorithm. Different from the conclusion we draw in Sec. V-C that the energy efficiency will decrease with the growth of cell radius, by using the heuristic algorithm with maximum LNA gain, Fig. 7(a) shows that the energy efficiency actually first increases and then decreases, and Fig. 7(b) indicates that the energy efficiency will always increase with the cell radius. While at the first glance, these results seem counterintuitive and may even contradict the analysis in subsection V-C, a deeper investigation can explain this phenomenon as follows. On the one hand, the cell radius does affect the energy efficiency. If we keep all other parameters, such as LNA gain and transmit 11 900 160 Average Maximum Energy Efficiency [bits/Joule/Hz] Average Maximum Energy Efficiency [bits/Joule/Hz] 180 Proposed Algorithm Max Gain & Optimal Power Max Power & Optimal Gain 140 120 100 80 60 40 20 100 200 300 400 500 600 700 800 900 800 700 600 500 400 300 200 100 0 100 1000 Proposed Algorithm Max Gain & Optimal Power Max Power & Optimal Gain 200 300 400 500 600 700 800 900 1000 Cell Radius [m] Cell Radius [m] (a) K = 2, M = 4 (b) K = 10, M = 20 Fig. 7. Comparison between B-GAIP and the heuristic algorithms, in both small and moderate system dimensions. power vector, unchanged and only increase the cell radius, the energy efficiency will decrease. However, the constraints in the optimization problem may affect the energy efficiency in a different way. Note that the maximal LNA gain is used here, which may cause the ADC to saturate rather frequently, and thus reach the maximum SNR limitation . As a result, the main factor that keeps the performance from further growing is the SNR limitation rather than the cell radius in most cases. This explanation is numerically validated in Fig. 7(b) where the average access distance is relatively small and so is the pass loss. In this case, a large LNA gain does not help. The LNA saturation can be mitigated when the cell radius becomes larger, and the performance will increase accordingly. On the other hand, for a small system dimension as Fig. 7(a) shows, the antennas are not very crowded even when the cell radius is relatively small. Hence, as the cell radius increases, the performance first reaches the maximum, and any further-increasing radius will then degrade the energy efficiency performance. E. Comparison between Shared LNA and Separate LNA Our system model uses one shared LNA to amplify the BS received signals in order to save both implementation cost and power consumption. One natural question is how much performance sacrifice we are incurring compared with using a separate LNA for each RF chain. In this subsection, we aim to address this question via system simulations. We first derive energy efficiency under the same system model but with separate LNA at each RF chain. For clarity, we use subscript “sep” to denote the signals using the separate LNA structure throughout this subsection. The received signal vector is the same as (1), while the amplified signal can be written as ỹsep = Ωy, (23) √ √ where Ω = diag( Ω1 , . . . , ΩM ) denotes the LNA gain values of the M separate LNAs. After passing ỹsep through separate ADCs for quantization, we also adopt a ZF receiver to process the quantized signal by multiplying it with the pseudo-inverse of the equivalent channel matrix Ĝ = ΩG, where we have F̂Ĝ = IK . Now rsep is given by rsep = Px + F̂Ωz + F̂nq . (24) Like (8), we also take the kth component of the vector rsep as an example: √ (25) rsep,k = pk xk + f̂k Ωz + f̂k nq , where f̂k denotes the kth row of matrix F̂k . As a result, the SNR of the kth UE can be calculated as pk Γsep,k = . (26) 2 f̂ Ω2 f̂ H + σ 2 2 σN k k ADC kf̂k k Finally, the spectral efficiency and the energy efficiency remain the same as (10) and (11), respectively. Note that the constraints in (13) and (14) will change to the following, while (12) still holds. • ADC saturation limitation: H 2 ADC Ωm (gm P2 gm + σN ) 6 Pmax , m ∈ M. • Maximum SNR limitation: pk 2 f̂ Ω2 f̂ H + σ 2 2 σN k ADC kf̂k k k 6 Γmax , k ∈ K. (27) (28) Note that the objective function and the constraints under the separate LNA model have similar properties as Theorem 1, i.e., Usep (p, Ω) is a strictly quasi-concave function with convex constraints under a fixed LNA gain matrix Ω. Therefore, we will use a similar method as Algorithm 1 to find the optimal power allocation vector with given Ω. However, since the function Usep (Ω) under the separate LNA structure does not have the concavity property proved in Theorem 2, we resort to the brute force search solution to find the optimal LNA gain values, which has a higher complexity. For the ease of numerical simulations, we only compare the performance 150 Average Maximum Energy Efficiency [bits/Joule/Hz] Average Maximum Energy Efficiency [bits/Joule/Hz] 12 140 Separate LNA Shared LNA 130 120 110 100 90 80 70 60 100 200 300 400 500 600 700 800 900 1000 Cell Radius [m] (a) Centralized MIMO 150 140 Separate LNA Shared LNA 130 120 110 100 90 80 70 60 50 100 200 300 400 500 600 700 800 900 1000 Cell Radius [m] (b) Distributed MIMO Fig. 8. Comparison between shared LNA and separate LNA structures under both centralized and distributed MIMO layouts. under a small system dimension where the numbers of UEs and the BS antennas are set to 2, i.e., M = K = 2. Fig. 8 reports the comparison of energy efficiency with separate and shared LNA structure in both centralized and distributed MIMO layouts, respectively. We conclude from the figure that while the separate LNA structure achieves a better performance, using a shared LNA structure can very closely approach the performance of the separate LNA. Taking a deeper look at the statistics, we have that the maximum performance loss in a centralized layout is 3.21%, while this loss becomes 4.62% in a distributed layout6. As a result, using a shared LNA can significantly reduce the hardware cost and power consumption, while sacrificing very little energy efficiency. This result sheds important light on the design of RF front-end power amplifiers in practical MIMO systems. simulations have been performed to validate the effectiveness of the proposed algorithm. Although massive MIMO under realistic hardware constraints have attracted much attention lately, the existing literature, including this paper, still leaves many problems unsolved. For example, the energy efficiency of a massive MIMO system with imperfect CSI under a similar setting is of great importance in practice but remains unsolved. How to incorporate other practical constraints and system design objectives into this problem is another interesting research topic, which may be worth investigation in the future. VI. C ONCLUSIONS Since our proof is based on a given Ω, we use U (p) instead of U (p, Ω) to simplify the notation. Furthermore, we define U (p)’s super-level set as Energy efficiency is of great importance in modern wireless communications, especially when massive MIMO gains its popularity in 5G systems. The high power consumption of RF front-end components including LNA and ADC significantly affects the energy efficiency performance in MIMO systems. In this paper, we have proposed a shared LNA structure and showed that combined with low-resolution ADCs, this architecture saves both hardware costs and reduces power consumption, while achieving near-optimal performance. In particular, we formulated the energy efficiency maximization problem under real-world engineering constraints, and revealed several important properties of this problem. We then proposed the Bisection – Gradient Assisted Interior Point (B-GAIP) algorithm that solves the optimization problem precisely and efficiently. The convergence and complexity analysis of B-GAIP have been studied, and comprehensive 6 It is worth noting that we use the same circuit power, i.e., P = 0.1 W, in c both LNA structures, while in reality the separate LNA structure should have more power consumption than the shared LNA structure, which may further degrade its energy efficiency. A PPENDIX A P ROOF OF T HEOREM 1 Sα = {p  0|U (p) > α}. (29) By using the equivalent definition of quasi-concavity in [31] that a function f is called strictly quasi-concave if its domain D and all its super-level sets Sα = {x ∈ D|f (x) > α} are convex, U (R) is strictly quasi-concave if Sα in (29) is strictly convex for any real number α. Now it is sufficient to show the quasi-concavity of U (p) if we can prove Sα is convex for positive, negative and zero values of α, respectively. Since we have the property that R  0 and p  0, U (p) is therefore nonnegative over all possible power vector p. As a result, no points exist on the contour U (p) = α for α < 0, and only one point 0 is on the contour U (p) = α for α = 0. Hence, Sα is convex when α 6 0. To prove P the case α > 0, we first investigate the property K of Rsum , k=1 Rk . The proof of the following lemma is straightforward and is omitted. 13 Lemma 3. Recall the definition of Rsum (p): K X K X Ωpk 2 + σ 2 )kf k2 ). (ΩσN k ADC k=1 k=1 (30) We have that Rsum (p) is concave with respect to the power allocation vector p and monotonically increasing in each component of the vector p. PK We define Psum , k=1 pk /η, which is a linear function on p. Since Rsum (p) is concave on p, Sα is convex because Sα is equivalent to Sα = {p  0|αPc + αPsum − Rsum (p) 6 0}. Therefore, the strict quasi-concavity of U (p) is proved. Rsum (p) = Rk = log2 (1+Ad ∗ A PPENDIX B P ROOF OF T HEOREM 2 For a given power vector p, we can calculate the first derivative of U (p, Ω) as ∂U (p, Ω) = ∂Ω K X k=1 , ln 2(Pc + K X 2 Psum ) [(σN Ω 2 Ad σADC pk 2 2 2 + σADC )kfk k2 + Ad pk Ω] (σN Ω + σADC ) C , P(Ω) k=1 2 where C = Ad σADC pk is a positive constant and P(Ω) represents a quadratic polynomial of Ω with all coefficients positive. As a result, we can calculate the second derivative of U (p, Ω) as K ∂ 2 U (p, Ω) X −CP′ (Ω) = < 0, ∂Ω2 P2 (Ω) (31) k=1 which indicates that U (p, Ω) is a concave function in Ω under a given p. Recall that we use U (Ω) to denote the maximum energy efficiency under all feasible power vector p. Since the maximum of a set of concave functions is still concave, we have proved the concavity of U (Ω) on Ω. R EFERENCES [1] Y. Chen, S. Zhang, S. Xu, and G. Y. Li, “Fundamental trade-offs on green wireless networks,” IEEE Commun. Mag., vol. 49, no. 6, 2011. [2] K. Lahiri, A. Raghunathan, S. Dey, and D. Panigrahi, “Battery-driven system design: A new frontier in low power design,” in Proceedings of ASP-DAC, 2002, pp. 261–267. [3] A. Akbari, R. Hoshyar, and R. Tafazolli, “Energy-efficient resource allocation in wireless OFDMA systems,” in IEEE PIMRC, 2010. [4] O. Onireti, F. Heliot, and M. A. Imran, “On the energy efficiencyspectral efficiency trade-off of distributed MIMO systems,” IEEE Trans. Commun., vol. 61, no. 9, pp. 3741–3753, 2013. [5] Q. Shi, C. Peng, W. Xu, M. Hong, and Y. Cai, “Energy efficiency optimization for MISO SWIPT systems with zero-forcing beamforming,” IEEE Trans. Signal Process., vol. 64, no. 4, pp. 842–854, 2016. [6] M. Jang, Y. Kwon, H. Park, and T. Hwang, “Energy-efficient uplink power control for multiuser SIMO systems with imperfect channel state information,” EURASIP Journal on Wireless Communications and Networking, p. 166, Dec. 2014. [7] G. Geraci, M. Wildemeersch, and T. Q. S. Quek, “Energy efficiency of distributed signal processing in wireless networks: A cross-layer analysis,” IEEE Trans. Signal Process., vol. 64, no. 4, pp. 1034–1047, 2015. [8] T. L. Marzetta, “Noncooperative cellular wireless with unlimited numbers of base station antennas,” IEEE Trans. Wireless Commun., vol. 9, no. 11, pp. 3590–3600, Nov. 2010. [9] J. G. Andrews, S. Buzzi, W. Choi, S. V. Hanly, A. Lozano, A. C. K. Soong, and J. C. Zhang, “What will 5G be?” IEEE J. Select. Areas Commun., vol. 32, no. 6, pp. 1065–1082, June 2014. [10] C. Mollen, J. Choi, E. G. Larsson, and R. W. Heath, “Uplink performance of wideband massive MIMO with one-bit ADCs,” IEEE Trans. Commun., vol. 16, no. 1, pp. 87–100, Jan. 2017. [11] Y. Li, C. Tao, A. L. Swindlehurst, A. Mezghani, and L. Liu, “Downlink achievable rate analysis in massive MIMO systems with one-bit DACs,” IEEE Commun. Letter, vol. 21, no. 7, pp. 1669–1672, Jul. 2017. [12] E. Bjornson, J. Hoydis, M. Kountouris, and M. Debbah, “Massive MIMO systems with non-ideal hardware: Energy efficiency, estimation, and capacity limits,” IEEE Trans. Info. Theory, vol. 60, no. 11, pp. 7112–7139, Nov. 2014. [13] P. Zhao, S. Bhattacharjee, J. H. Park, P. Subrahmanya, B. Banister, and M. Narasimha, “Energy-efficient power and LNA control for wireless multi-channel communication,” in IEEE WCNC, 2017, pp. 1–6. [14] J. Singh, O. Dabeer, and U. Madhow, “On the limits of communication with low-precision analog-to-digital conversion at the receiver,” IEEE Trans. Commun., vol. 57, no. 12, pp. 3629–3639, Dec. 2009. [15] A. Mezghani and J. A. Nossek, “On ultra-wideband MIMO systems with 1-bit quantized outputs: Performance analysis and input optimization,” in IEEE ISIT, 2007, pp. 1286–1289. [16] J. Mo and R. W. Heath, “Capacity analysis of one-bit quantized MIMO systems with transmitter channel state information,” IEEE Trans. Signal Process., vol. 63, pp. 5498–5512, Oct. 2015. [17] C. Guthy, W. Utschick, and M. L. Honig, “Large system analysis of sum capacity in the Gaussian MIMO broadcast channel,” IEEE J. Select. Areas Commun., vol. 31, no. 2, pp. 149–159, Feb. 2013. [18] L. Zhao, H. Zhao, F. Hu, K. Zheng, and J. Zhang, “Energy efficient power allocation algorithm for downlink massive MIMO with MRT precoding,” in IEEE VTC, 2013, pp. 1–5. [19] H. Li, L. Song, D. Zhu, and M. Lei, “Energy efficiency of large scale MIMO systems with transmit antenna selection,” in IEEE ICC, 2013. [20] G. Miao, N. Himayat, and G. Y. Li, “Energy-efficient link adaptation in frequency-selective channels,” IEEE Trans. Commun., vol. 58, no. 2, pp. 545–554, 2010. [21] H. Q. Ngo, A. Ashikhmin, H. Yang, E. G. Larsson, and T. L. Marzetta, “Cell-free massive MIMO: Uniformly great service for everyone,” in IEEE International Workshop on Signal Processing Advances in Wireless Communications (SPAWC), June 2015, pp. 201–205. [22] J. Wang and L. Dai, “Asymptotic rate analysis of downlink multi-user systems with co-located and distributed antennas,” IEEE Trans. Wireless Commun., vol. 14, no. 6, pp. 3046–3058, June 2015. [23] K. Hosseini, W. Yu, and R. S. Adve, “Large-scale MIMO versus network MIMO for multicell interference mitigation,” IEEE J. Select. Areas Commun., vol. 8, no. 5, pp. 930–941, Oct. 2014. [24] X. Chen, X. Xu, and X. Tao, “Energy efficient power allocation in generalized distributed antenna system,” IEEE Commun. Letter, vol. 16, no. 7, pp. 1022–1025, 2012. [25] H. Kwon and T. Birdsall, “Channel capacity in bits per joule,” IEEE Journal of Oceanic Engineering, vol. 11, no. 1, pp. 97–99, 1986. [26] P. Kyosti, “Winner II channel models,” IST, Tech. Rep. IST-4-027756 WINNER II D1, V1.2, 2007. [27] M. Bertocco, C. Narduzzi, P. Paglierani, and D. Petri, “A noise model for digitized data,” IEEE Trans. Instrum. Meas., vol. 49, no. 1, pp. 83–86, Feb. 2000. [28] T.-C. Zhang, C.-K. Wen, S. Jin, and T. Jiang, “Mixed-ADC massive MIMO detectors: Performance analysis and design optimization,” IEEE Trans. Wireless Commun., vol. 15, no. 11, pp. 7738–7752, 2016. [29] Q. Zou, A. Tarighat, and A. H. Sayed, “Joint compensation of IQ imbalance and phase noise in OFDM wireless systems,” IEEE Trans. Commun., vol. 57, no. 2, pp. 404–414, Feb. 2009. [30] G. Shippee, “Shared receive path for simultaneous received signals,” Aug. 2007, US Patent 7,260,416. [31] S. Boyd and L. Vandenberghe, Convex optimization. Cambridge University Press, 2004. [32] B. Martos, “The direct power of adjacent vertex programming methods,” Management Science, vol. 12, no. 3, pp. 241–252, 1965. [33] F. A. Potra and S. J. Wright, “Interior-point methods,” Journal of Computational and Applied Mathematics, vol. 124, no. 1, pp. 281–302, 2000.
7cs.IT
3D non-rigid registration using color: Color Coherent Point DriftI Marcelo Saval-Calvoa,∗, Jorge Azorı́n-Lópeza , Andrés Fuster-Guillóa , Vı́ctor Villena-Martı́neza , Robert B. Fisherb arXiv:1802.01516v1 [cs.CV] 5 Feb 2018 a University b School of Alicante, Carretera Sant Vicent del Raspeig s/n, 03690,Spain of Informatics, Univ. of Edinburgh, 10 Crichton St, Edinburgh EH8 9AB, UK Abstract Research into object deformations using computer vision techniques has been under intense study in recent years. A widely used technique is 3D non-rigid registration to estimate the transformation between two instances of a deforming structure. Despite many previous developments on this topic, it remains a challenging problem. In this paper we propose a novel approach to non-rigid registration combining two data spaces in order to robustly calculate the correspondences and transformation between two data sets. In particular, we use point color as well as 3D location as these are the common outputs of RGB-D cameras. We have propose the Color Coherent Point Drift (CCPD) algorithm (an extension of the CPD method [1]). Evaluation is performed using synthetic and real data. The synthetic data includes easy shapes that allow evaluation of the effect of noise, outliers and missing data. Moreover, an evaluation of realistic figures obtained using Blensor is carried out. Real data acquired using a general purpose Primesense Carmine sensor is used to validate the CCPD for real shapes. For all tests, the proposed method is compared to the original CPD showing better results in registration accuracy in most cases. Keywords: 3D non-rigid registration, 3D deformable registration, CCPD 1. Introduction The study of the evolution of shapes over time is under intense study in many areas, such as biology, health, etc. During evolution, objects are affected by multiple changes, disturbing both shape and appearance. To measure all the changes is a difficult and tedious task, due to the complexity of some shapes and the large amount of data necessary to have a complete study. Computer I Authors acknowledge the projects from University of Alicante (Gre16-28) and Spanish Ministry (TIN2017-89069-R) supported with Feder funds. ∗ Corresponding author Email address: [email protected] (Marcelo Saval-Calvo) URL: www.dtic.ua.es (Marcelo Saval-Calvo) Preprint submitted to Computer Vision and Image Understanding February 6, 2018 vision techniques can help provide methods which, given a set of data from a sensor, estimate the changes. In this paper, we propose a method to robustly estimate the deformation observed in an object. Concretely, non-rigid registration methods estimate the transformation between two shapes aligning the data using non-rigid transformations. There are many applications that require non-rigid alignment. For instance, face or body motion recovery where the different parts need to be tracked to perceive the motion or identify the action. Applications where shape evolution is studied require deformable alignment as well, and may also involve appearance changes, which commonly include color variations. Using machine intelligence to evaluate those changes requires using methods than can perceive them regardless the nature of the change. For example, intelligent farms can use these techniques to improve the quality of their products since they can be constantly supervised while growing. In health, automatic analysis of human body change will help specialists in treatment supervision (eg. for cancer therapy). There exist various kind of deformations: isometric deformation, where both topology and distances are preserved (e.g. articulated changes or flag movements); elastic deformation, where the topology is kept but distances can vary (e.g. balloon inflation); and free deformations where both topology and distances can change (e.g. growing objects or breaking situations). In this paper we focus on 3D point clouds without any previous filtering, only downsampling if necessary. For the specific case of this paper, the data comes from a low-cost RGB-D sensor, such as a Microsoft Kinect, which provides color and 3D information. The sensitivity of these sensors may be lower than the requirements of the problem, and usage may be difficult for some tasks. Nonetheless, they are widely used and a contribution suitable for working with data from both low and high quality sensors will be useful in many research tasks and industrial applications. The deformations considered in this work are not constrained. That is, they do not assume any prior restrictions to the deformations such as topology/size constraints, larger/smaller variations, etc. The objective is to develop a nonrigid registration method for non-constrained free deformations. Non-rigid registration methods for 3D point sets, such as the well-known Coherent Point Drift (CPD) [1], only use spatial 3D information (or location information) to register the data. Ignoring other information, such as color, increases the probability of misalignment. For instance, in cases where the object grows the number of points may increase or decrease in an irregular distribution. If only 3D spatial data is taken into account, those irregularities are harder to register. Those are situations where additional information can be used to robustly register. A practical example is the plant growth, where leaves change shape differently over their surface. Commonly, the central region remains similar whilst the edges enlarge significantly, but in the spatial data this variation in growth is not as obvious. It is necessary to use color information to perceive this difference. The leaf growth problem motivates our work, which extends the CPD algorithm to include color information in the process of registration to improve the estimation of the deformations. Although originally motivated 2 by the leaf growth problem, the developed Color Coherent Point Drift (CCPD) algorithm is a general algorithm usable for registering deforming colored point clouds. The main contribution of this paper is a novel approach for colored point cloud non-rigid registration combining various inputs in the correspondence estimation step. To handle real and adverse situations, the method has to deal with noise, outliers and missing data, common issues in real applications. The proposal makes use of the basis proposed in the CPD algorithm [1], because of its generality and because it has shown good results in point set non-rigid registration in presence of noise and outliers. The rest of the paper is organized as follow: Section 2 presents a review of the State-of-the-Art in 3D non-rigid registration methods for point sets. Section 3 details the proposed CCPD method. The evaluation is shown in Section 4 where synthetic and real data are used to validate the proposal. Finally, some discussion and conclusions are presented in Section 5. 2. Previous research Recently, the increasing interest in non-rigid registration has produced much research that improves existing algorithms or introduces new methods, but this is still a challenging problem to be solved. This interest comes from the need to improve reconstruction, mapping or other computer vision problems, where dynamic objects are treated. Tam et al. [2] surveyed different methods for point cloud and mesh registration, in both rigid and non-rigid situations. Chui and Rangarajan [3, 4] proposed the TPS-RPM non-rigid registration method for 3D point clouds based on Thin Plate Splines to stabilize the displacement of the points during the process of registration. This method uses softassign matches between each point set [5]. Softassign refers to the use of non-binary correspondences to handle noise and outliers because there is no imposing of a unique matching per point. Deterministic annealing [6] is also used in the kernel of TPS-RPM to gradually allow a less constrained movement of the individual points. Their proposal outperforms ICP in 2D, and also achieves better results in 3D than the main state-of-the-art methods. Yang revisited TPS-RPM in [7] demonstrating limited performance when outliers are present in both point sets simultaneously. He proposed a double-sided outlier handling approach obtaining better registration results. Li et al. [8] presented a non-rigid registration method that simultaneously estimated confidence weights, that measure the reliability of each correspondence, and identified non-overlapping areas. A warping field brings the source scan into alignment with the target geometry. Sang et al. [9] proposed the FDMM non-rigid registration method based on GMM and the use of features, that they called Gaussian soft shape context, based on radial distribution of the neighbourhood. This feature was initially presented in [10, 11], and they modified it adding a Gaussian distribution for avoiding the problem of non-real similarities. The algorithm takes into account 3 the relative distribution of all points with respect to the analysed point, making a histogram, which adds information to the registration process. Comparison to CPD, RPM and BEM [12] is provided using 2D data, outperforming the previous results. Yawen et al. [13] proposed also the use of this feature enhancement with CPD to handle noise and outliers with better results. Wang and Fei [14] proposed B-spline-based point matching (BPM), an extension of RPM, using a deterministic annealing scheme to regularize the registration process. The method was evaluated in different situations with accurate results in 2D and 3D data. Yang et al. proposed in [15] GLMD, a two step non-rigid registration method for point sets. They proposed the use of local and global distances combined to estimate the binary correspondences, and the transformation using the TPS kernel. The local distances are measured using a certain neighbourhood, which is provided initially. Experiments were provided using the proposed method against CPD, TPS-RPM and GMMreg for different levels of noise, outliers and rotations. Recently Chen et al. [16] proposed the Coherent Spatial Mapping (CSM) algorithm. They used the shape context [10] which describes the shape using a histogram of each point relative position to the others, and calculated correspondences with this information. The Hungarian method is also used to estimate the initial correspondences. The transformation is iteratively estimated with the EM method using a spatial mapping function of the correct matches, and TPS to provide smooth deformations. Hence, the improvement comes from the matching estimation. They compare CSM to CS [11], CPD, COA-RPM [17] and TPS-RPM with 2D data achieving better alignment with lowest RMS error with different levels of noise and outliers. In 3D they compare against CPD achieving lower registration error. S. Lin et al. presented in [18] a proposal for incorporating color in the registration process, both in rigid and non-rigid registration. The non-rigid approach is based on the paper of Li et al. [8], incorporating the color information in the vertex selection by evaluating 3D location and color distance in Euclidean space, using a neighborhood to improve robustness, between the two views. Moreover, after estimating the descriptors (Gabor and HOG) from the vertex, color is also used for rejecting wrong correspondences. This paper considers small deformations mainly related to orientation of views which deform the shapes due to the RGB-D sensor pattern projection. 2.1. Coherent Point Drift variants One of the most common algorithms used for non-rigid registration is the Coherent Point Drift (CPD) proposed by Myronenko et al. in [1, 19]. This method is based on a Gaussian Mixture Model (GMM) and Expectation Maximization (EM) to calculate the correspondences, and then the transformations, of the points to map one set of points into another. They used a GMM to represent the moving point set to be registered, and EM to evaluate the new parameters of the GMM and hence, the new position of the points. Moreover, in order to constrain the movement, they made use of Coherent Motion Theory that helps the translation of points to be regular. They compared their results 4 to the TPS-RPM outperforming the registration for 2D and 3D cases. Wang et al. [20] proposed an extended version of CPD to automatically evaluate the outlier percentage parameter, which is manually provided in the original version. They used a combination of Nelder-Mead simplex and genetic algorithms. The genetic algorithm provides good initial values for this parameter, while the Nelder-Mead simplex optimizer attempts to find an optimal solution. The experimentation showed an improvement of the original version for different levels of noise, where they initialized the outlier parameter to 0.7. A different approach called GMMreg was presented by Jian et al. in [21, 22]. Instead of representing a point set with a GMM and registering it to a point cloud using the EM technique, they align two GMMs each representing one of the point sets to be registered. They calculate the displacement between Mixtures of Gaussians and iteratively align them using the L2 distance. They provided rigid and non-rigid results for 2D and 3D data compared to the original CPD, LM-ICP [23], and TPS-RPM among others, resulting in more accurate results. Additionally, they apply the L2 distance to TPS and to Gaussian radial basis functions, improving the results. Gerogiannis et al. [24] proposed a different matching method using the Hungarian Algorithm instead of the posterior distribution used in CPD and RPM. Moreover, they used Bayesian regression for the Maximization step (i.e. the registration or transformation part). The experiments compared the proposed method with CPD, RPM and GMMreg for 2D and 3D cases. Gao et al. studied in [25] the main drawbacks of CPD related to outliers, which are a consequence of the way CPD keeps the distribution of outliers, and the input parameter for the outlier ratio. They proposed an ExpectationMaximization solution to iteratively evaluate the outlier ratio. TPS-RPM and the original CPD algorithms show less accurate results when the outlier ratio grows. The main advantage of this method is to avoid the need to indicate the outlier ratio initially. Ge et al. [26] presented a similar approach to the previous one, called GlobalLocal Topology Preservation (GLTP). The main motivation of this work is to handle non-rigid articulated deformations such as those of human movements. They added the principle of Local Linear Embedding to the original CPD to take into account local deformation coherence, apart from the global coherence intrinsic in the CPD algorithm. With large articulated deformations GLTP works better than the original CPD, which is not able to find a good registration. De Sousa and Kropatsch [27] proposed a variant of Coherent Point Drift (CPD) by integrating centrality information, a concept initially applied in social networks. It creates a graph (e.g. Delaunay triangulation), and applies different centralities (node degree, betweenness, eigenvector ...) to evaluate which results in a better solution. The proposal shows good performance with noisy data, improving the original CPD. Another variation of CPD was presented by Zhou et al. [28] using Student’s mixture model, which they claim to be more robust in the presence of high amounts of noise. The comparison they made against CPD and TPS-RPM shows better performance when the noise rate grows. Moreover, they auto5 matically estimated the probability of outliers whereas in CPD it is manually indicated. In conclusion, many studies have been done for non-rigid registration of point sets. Most of them focused their attention on outliers and noise handling. In order to do this, they proposed techniques to estimate automatically the outlier ratio or used descriptors which use point distributions to improve the matching. However, there still exist problems when there are large deformations. Another issue not studied is where the data does not have to move coherently in the whole space. For example, situations in which one set is a full model and the other is just a region. Moreover, there are no general proposals facing the problem from a generic perspective including several sources of data using individually the different spaces, e.g. using color and 3D location without using them as a 6D data set but being independent in the process for a more robust and generic combination. 3. Color Coherent Point Drift In this section, a framework for non-rigidly registering 3D colored points based on CPD [1, 19] is presented. We use the optimization algorithm of the original CPD algorithm, only replacing the original similarity matching formulation with one that takes account of having colored 3D points. The proposed Color Coherent Point Drift (CCPD) algorithm registers 3D points by using color and shape spaces to jointly estimate the best match. It improves upon the CPD algorithm by using the two input spaces together to handle situations where point position is not sufficient to adequately estimate the matches, e.g. aligning shapes with missing parts, or non-linear growth of the shape. In any registration problem it is normal to have one point set used as the anchor or reference point set which we will call Anchor, and the other as the moving points called Moving. The Moving set will be deformed and moved until it aligns with the Anchor. CCPD (following the basics of CPD) models the Moving set using a Gaussian Mixture Model (GMM) and estimates the transformation of the Moving set using the Expectation-Maximization (EM) technique. The use of a GMM to represent the Moving set will give soft correspondences, i.e. they are not binary, allowing a more robust estimation of the displacement by not requiring one-to-one matching. Moreover, in order to smooth the displacement, the Coherent Motion Theory is used to regularize the motion of the points in the process of the transformation. Here, we introduce the combination of color and shape (3D positions) spaces for non-rigid registration. Let AS , AC , M S and M C (Eq. 1) be four data sets representing two spaces (shape and color) of two data sets. AS and AC are the shape and color values of the Anchor set and M S and M C are the shape and color values of the Moving set. To simplify the notation, we will refer to 6 AS , AC as A, and M S , M C as M when we refer to both spaces together. AS = {aS1 , · · · , aSN } C AC = {aC 1 , · · · , aN } S S M = {m1 , · · · , mSM } C M C = {mC 1 , · · · , mM } (1) DC C . N and M are the number of points in where aSi , mSi ∈ RDS and aC i , mi ∈ R the Anchor and Moving point sets. M S and M C are the Moving to be aligned with the reference Anchor AS and AC . Each space has its own dimension e.g. DS = 3 for shape (3D points), but DC = 1 for monochrome or DC = 3 if we use 3 color components. The points M S and M C are appended to form the centroids of the components of a Gaussian Mixture Model (GMM) (m = 1..M ) that encodes the probability of the Moving point set, as described in Eq. 2. x and mi are vectors with the point’s position and color appended, p(x) = M X w(mi )p(x|mi ) (2) i=1 w(mi ) is the weight of each GMM component. Here, all points are treated 1 equally, so w(mi ) = M . Let D = DS + DC and Λ be the D dimensional covariance matrix. Then, each Gaussian is modelled using Eq. 3. p(x|mi ) = 1 (2π) D 2 0 −1 1 1 e− 2 (x−mi ) Λ (x−mi ) D det(Λ) (3) Eq. 3 will be modified later as all components have equal isotropic variance 2 (for the color components). The shape σS2 (for the shape components) and σC (S) and color (C) covariance matrices for the old and new (for z ∈ {o, n} for o:old and n:new which will be defined below) Gaussian distributions are: ΛzS = z 2 (σSz )2 IDS , ΛzC = (σC ) IDC . From these, we get (ΛzS )−1 = (σSz )−2 IDS , (ΛzC )−1 = z 2DC z −2 . ) ) IDC , and det(ΛzS ) = (σSz )2DS , det(ΛzC ) = (σC (σC In order to handle noise and outliers, an additional probability distribution 1 N , where N is the number of Anchor points, is included which is weighted with a predefined parameter α. Thus, Eq. 4 is the complete probability of the fit of the Anchor points to the Moving points. p(x) = α M M +1 X X 1 1 + (1 − α) p(x|mi ) = w(i)p(x|mi ) N M i=1 i=1 (4) α where w(M + 1) = P (X|mM +1 ) = N and otherwise w(i) = 1−α M . The GMM is parametrized by a set of parameters (θS , σS , σC ) which specify the transformation of the Moving point set (θS ), the standard deviation (σS ) of the points’ positions, and the standard deviation (σC ) of the points’ colors. Expectation-Maximization (EM) is used to register the Moving points to the Anchor points. 7 The function E finds the parameters (θS , σS ) that maximize the likelihood, or equivalently, minimize the negative log-likelihood (Eq. 5). In this paper we are registering only the shape vectors, but not the color vectors. We are using shape and color information in the similarity score to make the matching estimation more robust. Thus, the set of parameters is (θS , σS , σC ), where θS are the parameters that control the position of the Moving points. N X E(θS , σS ) = − log( n=1 M +1 X w(i)p(an |mi )) (5) i=1 Following the original formulation of CPD, the probability of correct correspondence between model point mi and anchor point an is the posterior probability of the GMM centroid given the anchor point: p(mi |an ), which by Bayes’ Rule equals p(mi )p(an |mi )/p(an ). Since the objective of the registration is to find the parameters to make model M best fit anchor A, the ExpectationMaximization (EM) algorithm is used. Given the value of the “old” (superscript ‘o’) position and tolerance parameters, we use Bayes’ theorem to estimate the posterior probability po (Eq. 13), known as Expectation or E-step; then we find the new parameters that Maximize (M-step) the probability. Here, we minimize the negative log-likelihood: Q(θS , σS ) = − +1 N M X X w(i)po (mi |an )log(pn (mi )pn (an |mi )) (6) n=1 i=1 Before we manipulate Q, we need some useful terms. Recalling that M + 1 refers to the background model: p(mM +1 ) = 1 and otherwise p(mi ) = 1 and p(x|mM +1 ) = N1 . The multivariate Gaussian distributions that we need for the shape term is (z ∈ {o, n} for o:old and n:new): pzS (xS |mi,S ) = 1 1 (2π) DS 2 (σSz )DS e z − 2(σ1z )2 ||xS −τ (mi,S ,θS )||2 S (7) and for the color term is: pzC (xC |mi,C ) = 1 1 (2π) DC 2 z )DC (σC e − 2(σ1z C )2 ||xC −mi,C ||2 (8) where τ (m, θS ) transforms the position of point m given the Moving point set pose parameters θS . Here, the transformation is only a Euclidean rigid motion. Note the color matching probability pzC (xC |mi,C ) uses the distance between the colors without any transformation. Combining Eq. 7 and 8 we get P z (x|mi ) = PSz (xS |mi,S ) · PCz (xC |mi,C ). The first manipulation addresses the background term M + 1. We split out the M + 1 term from the rest and analyze it: Q(θS , σS ) = Q0 (θS , σS ) − N X w(M + 1)po (mM +1 |an )log(pn (mM +1 )pn (an |mM +1 )) n=1 (9) 8 α We have: w(M + 1) = N , po (mM +1 ) = pn (mM +1 ) = 1, po (an |mM +1 ) = 1 n p (an |mM +1 ) = N , o )po (mM +1 ) 1 = N1 po (a . po (mM +1 |an ) = p (an |mMpo+1 (an ) n) Substituting, this gives: Q(θS , σS ) = Q0 (θS , σS ) + N αlog(N ) X 1 N 2 n=1 po (an ) (10) The latter term becomes small as N grows. Further, there are none of the ‘new’ parameters to optimize in that term. So, we can ignore it and find the parameters (θSn , σSn ) that minimizes only Q0 : Q0 (θSn , σSn ) = − N X M X w(i)po (mi |an )log(pn (mi )pn (an |mi )) (11) n=1 i=1 Since log(pn (mi )pn (an |mi )) 1 = log(pn (mi )) + log(pn (an |mi )) and log(pn (mi )) = log( M ) has none of the o optimization parameters, even when multiplied by p (mi |an ), we can ignore this term. Similarly, w(i) = 1−α M so it is ignored. Thus, we need to optimize: Q00 (θSn , σSn ) = − M N X X po (mi |an )log(pn (an |mi )) (12) n=1 i=1 By Bayes’s rule: po (mi |an ) = po (an |mi )po (mi ) PM j=1 w(j)po (an |mj )po (mj ) + w(M + 1)po (an |mM +1 )po (mM +1 ) Simplifying, we get: po (mi |an ) = M po (an |mi ) PM o 1 − α j=1 p (an |mj ) + α M 1−α N (13) This is evaluated using the ‘old’ parameters and does not change with the current M can also be omitted as an inessential optimization iteration. The initial 1−α scaling factor. Finally, we need to consider po (an |mi ) and pn (an |mi ). We will analyze both of these together for z ∈ {o, n} (for o:old and n:new). We assume that point shape and color are independent, and that the optimization affects only the position of the points, but not the color. Therefore, pz (an |mi ) = pzS (an |mi )pzC (an |mi ), and these terms were defined above. For operational reasons, we choose to weight the shape and color components with wS and wC . So our formula is: pz (an |mi ) = [pzS (an |mi )]wS [pzC (an |mi )]wC . 9 Substituting these derivations into Eq. 12, we get (where the first term is evaluated before optimization using Eq. 13): Q00 (θSn , σSn ) = − N X M X po (mi |an )× n=1 i=1 log([pnS (an |mi )]wS [pnC (an |mi )]wC ) Applying the ‘log’ function and then simplifying: 00 Q (θSn , σSn ) =− N X M X po (mi |an )× n=1 i=1 n [wS log(pS (an |mi )) + wC log(pnC (an |mi ))] And then applying the substitutions from Eq. 7 and Eq. 8, and then simplifying: Q00 (θSn , σSn ) = − N X M X po (mi |an )× n=1 i=1 [wS [log( 1 (2π) + wC [log( DS 2 1 1 )− ||an,S − τ (mi,S , θSn )||2 ] (σSn )DS 2(σSn )2 1 (2π) DC 2 1 1 2 n )DC ) − 2(σ n )2 ||an,C − mi,C || ]] (σC C Simplifying again and removing terms not involving the optimization parameters, we get Eq; 14 to be optimised in the EM ‘M’ step over the parameters: n ): (θSn , σSn , σC Q00 (θSn , σSn ) = M N X X po (mi |an )× n=1 i=1 wS ||an,S − τ (mi,S , θSn )||2 2(σSn )2 wC n 2 + wC DC log(σC )+ n )2 ||an,C − mi,C || ] 2(σC [wS DS log(σSn ) + (14) Since the parameters of the color GMM are not optimized in the EM process, the second term in the addition in Eq. 14 becomes a constant and can be removed along with the weighting operators. Thus, we end up with a simpler Q00 as next: Q00 (θSn , σSn ) = N X M X po (mi |an )× n=1 i=1 [DS log(σSn ) wS ||an,S − τ (mi,S , θSn )||2 + 2(σSn )2 10 (15) Therefore, the color information is involved only in the ‘old’ probability. Recalling that pz (an |mi ) = [pzS (an |mi )]wS [pzC (an |mi )]wC for z ∈ {o, n} (for o:old and n:new) and those terms were defined in Eq. 7 and 8, we substitute Eq. 13 by Eq 16: [pzS (an |mi )]wS [pzC (an |mi )]wC P o (mi |an ) = PM PM ( j=1 pzS (an |mj )]wS ( j=1 pzC (an |mj )wC + oC + oL (16) Outlier biases oC are calculated with Eq. 17 and oL with the outlier probaα M bility 1−α N 2 oC = M √ σC 2π · exp 1 −M o C kPM m PC (aC |mi )k 2σ 2 C (17) The general process of registration is summarized in the next pseudo-code Algorithm 1. Since we focus on modifying the matching probability (P o ), the general procedure is similar to the original CPD, but with modifying step E: Data: M and A pointsets, color M color A information Pand M,N Initialization: W = o, σ 2 = DN1 M m,n=1 ||xn − ym ||2 ; − 1 ||y −y ||2 Construct G: gij = exp 2β2 i j ; Expectation-Maximization while not converged do E-step: Compute P o , (contribution) • P o (mi |an ) = = ( [pzS (an |mi )]wS [pzC (an |mi )]wC PM wC +o +o z (a |m )]wS ( z p n j C L j=1 S j=1 pC (an |mj ) PM (see Eq. 16); M-step: • Solve (G + λσ 2 d(P 1)−1 )W = d(P 1)−1 P X − Y (see [1]); end The result of alignment: T = τ (Y, W ) = Y + GW ; Algorithm 1: Pseudo-code of the proposed Color Coherent Point Drift 4. Experiments A set of tests have been carried out to evaluate the performance of the proposed CCPD 1 compared to the original version. First, the dataset of the original CPD (Subsection 4.1), the fish and the face, has been used (Figure 1). The implementation of the code has been done in Matlab, using part of the toolbox provided by Myronenko 2 . Color information has been added to the 1 The code is available at tech4d.dtic.ua.es 2 www.bme.ogi.edu/∼myron/matlab/cpd 11 original data. The distribution of colors on the shape has been done in this way to distinguish its different parts, i.e. a region with same color corresponds to a specific part of the shape (e.g. mouth in the face, or tail in the fish). It is important for the non-rigid registration with color because it gives meaning to the relationship between color and shape. The second test (Subsection 4.2) presents two synthetic datasets with realistic color and shape (Figure 9). A face and a flower are used, which have been deformed using Blender and acquired using a plugin called Blensor [29]. This plugin emulates different sensors, including the general purpose RGB-D sensor Kinect. Finally, a real data evaluation using data provided by a Primesense Carmine RGB-D sensor is done in Subsection 4.3 to confirm that the algorithm is able to handle real data acquired from a general purpose RGB-D sensor (Figure 19). In this section we will use X to refer to the Anchor set and Y to refer to the Moving set. The experiments evaluate different aspects: • Outliers: points which are in Anchor X but do not have real matches in Moving Y . • Missing data: the opposite of outliers. Points which are in Moving Y but do not have real matches in Anchor X. This situation is not taken into account in the original CPD algorithm. • Large or non-linear deformation: deformations which involve a large displacement that may not be solved with traditional algorithms. Non-linear deformation could be seen as an abrupt change in the relative direction of the deformation. The experiments used Windows 7, an Intel i5 processor and 8 GB of RAM. The code was implemented in Matlab vR2013b. 4.1. Synthetic data experimentation The tests consider four issues: outliers, missing data, color distribution changes and large deformations. First, points from Y are removed. With this test the missing data handling is compared with the original CPD algorithm. Next, we remove data from Anchor X representing extra points, a situation which is not possible to parametrize in the original CPD (points in Y do not have a real correspondence in X). In this case, CCPD uses the color information to improve the probability evaluation to avoid wrong matches. Another test evaluates a different displacement in the color with respect to the shape, which evaluates situations where the color distribution in X and Y are different. An example of this could be moving the eyebrows up and down, where the shape in 3D largely remains the same, but the color changes its position. Lastly, large deformations are evaluated to show how the color facilitates the registration when the transformation is complex or semi-coherent. It is important to 12 Figure 1: Anchor X (left) and Moving Y (right) fishes based on the original work of CPD [1] including color information. highlight that the parameters have been adjusted individually to result in the best alignment for both the CPD and CCPD algorithms. The main difference between the original CPD and the proposed CCPD method comes when the Moving has missing data, which cannot be modelled as outliers in the CPD. As the color is a distinctive feature, the proposal is able to evaluate the correspondences properly and then provide better results. 4.1.1. 2D fish experimentation The 2D tests use different Anchor X and Moving Y fishes based on two initial shapes (dataset from the original work of CPD [1]). Nine colors using the H component of HSV are used to distinguish the different parts of the fish (see Figure 1). Table 1 presents the RMS error of the registration taking into account euclidean distances of real correspondences in location space. Figure 2 shows the visual result of the tests. In general, the registration achieves better alignment (minimize the error distance) in the CCPD results. Test 1 evaluates the effect of outliers by removing from Y the top and bottom tip of the fish. In this case, the proposal returns a slightly better registration because the color feature provides a more robust matching estimation and hence registration. Test 2 and Test 3 correspond to missing data testing where points in Anchor X are removed, while Y remains complete. The total amount of points is 91. For Test 2, 20 points are removed (20/91 = 21.9% of outliers) and for Test 3, 53 points are removed (53/91 = 58.2% of outliers). The results demonstrate the improved performance of CCPD in the alignment against CPD. Concretely, in 13 Test 2, CCPD achieves 0.747E-02 RMS error in registration being 4.82 times lower RMS than CPD, while in Test 3, CCPD achieves 0.624E-02 RMS error being 23.1 times lower than the original method. CCPD is more robust against outliers in the Moving Y (or missing data from the Data point of view). A large deformation test has been considered by registering a square to the Anchor fish in Test 4, where Matlab jet colormap is used. This color map provides colors in RGB = [0,0,0.562] to [1,1,0], which in H component used here are H = [0 0.0625 0.1250 0.1875 0.2500 0.3125 0.3750 0.4375 0.5000 0.5625 0.6250 0.6875 0.7500 0.8125 0.8750 0.9375 1.0000]. The RMS error is 26.62E02 in the CCPD method and 51.559E-02 in the original CPD, a 93.69% of improvement of CCPD against CPD. Furthermore, CPD on the low tip of the back tail (Figure 2 fourth-row right-image) misaligns the colors as it does not have this information, which also demonstrates the improvement in registration accuracy of the proposed color feature consideration in the registration process. Table 1: RMS registration error of fish shape tests. Test Test Test Test 1 2 3 4 CCPD 0.52064E-02 0.7468E-02 0.6239E-02 26.622E-02 CPD 0.53293E-02 3.5967E-02 14.406E-02 51.559E-02 The next test evaluates changes in the color distribution. In this situation both shapes have the same points as the original, but the colors are slightly different. The result is visually evaluated in Figure 3. The regions where the colors do not coincide are marked with a red circle to simplify the visualization. At the lower part of the upper tip, X has a larger region of brown towards the back while Y is green from the end of the tip. CCPD registers adequately this part. Similarly, the lower tip has larger part of orange on the X than in Y , and again the proposed method achieves better results. 4.1.2. 3D face experiments The 3D face experiments are presented here. Different Anchor X and Moving Y points are used based on two initial positions (data obtained from the original work of CPD [1]). The face coloring has been done using four tones in RGB, with main black part, red lips and eyebrows, blue ears and yellow forehead (see Figure 4). Table 2 presents the RMS error for the 3D tests. In Test 1 outlier handling is evaluated by removing all data points from the forehead (yellow part) of Y . Tests 2, 3 and 4 correspond to the missing data evaluation. Test 2 is similar to Test 1, but removing the data from X. As the unmatched data cannot be parametrized as outliers, the original CPD is not able to register it properly. Test 3 removes all color parts except the black one obtaining better results for the CCPD proposal. Finally, in Test 4 the algorithm registers the nonblack parts (i.e.: forehead, ears, lips and eyebrows), in the Anchor X with the 14 X Y CCPD CPD Figure 2: Tests 1 to 4 of fish shape from top to bottom respectively. The columns represent from left to right the Anchor X, the Moving Y , the CCPD registration result and the CPD result. 15 X Y CCPD CPD Figure 3: Registration result for different color distribution in Anchor X and Moving Y sets (see Fig. 2). The third and fourth columns are the results for the CCPD and the CPD algorithms. The red circles highlight the parts where the color distribution changes. complete Moving Y . Similarly to the 2D experiments, the proposed method is able to register more accurately. Figure 5 shows the result of the tests, where each row is a test from 1 to 4 respectively, to visually evaluate the performance of both methods. In the second row it is possible to see how CPD moves wrongly yellow points downward while the proposed method keeps the point in the top part as they do not have correspondences. The third row has only color points in the Anchor X, without the black part. The proposal aligns properly these remaining parts while CPD cannot align the parts properly. Similarly the fourth test is correctly aligned by CCPD as the corresponding points in the Anchor and Moving are properly aligned, while CPD returns an inaccurate result. A large test evaluation is presented in Table 3 where a set of 50 different changes are registered (dataset available from Myronenko [1]). The average RMS errors for the Tests 2, 3 and 4 are 0.36834E-02 for CCPD and 8.8453E-02 for CPD. The proposal’s RMS is 24 times lower than original method. A final test was carried out to evaluate a displacement of color and a large deformation. In this test, the eyebrows of Y are lower than in X. The movement should displace the eyebrows upward. This is considered a large deformation or a non-linear deformation as the movement is not coherent in the shape data space, but coherent in the color data space. Figure 6 shows this registration. In order to help in the visualization, a flow image is shown for both methods. The proposed method achieves a proper result moving up the eyebrows while Table 2: RMS registration error of face shape tests. Test Test Test Test 1 2 3 4 CCPD 0.37278E-02 0.28985E-02 0.21677E-02 0.5984E-02 16 CPD 1.62E-02 4.078E-02 12.051E-02 10.407E-02 Figure 4: Anchor X (first row) and Moving Y (second row) of face shape. There are 4 colors, yellow forehead, red eyebrows and lips, blue ears and the rest black. Table 3: RMS registation error of 50 face shapes. Test 2 Test 3 Test 4 CCPD 0.26E-02 0.32E-02 1.13E-02 17 CPD 3.93E-02 8.53E-02 11.54E-02 X Y CCPD CPD Figure 5: Rows 1 to 4 show Tests 1 to 4 of the face shape. The columns represent from left to right the Anchor X, the Moving Y , the CCPD result and the CPD result. 18 Figure 6: Eyebrow movement test. From the top to the bottom, the CCPD result, the CCPD flow, the CPD result and the CPD flow. In the flow pictures the red arrows show the most significant displacement, i.e. the eyebrows. the original CPD algorithm, as it does not take into account color, is not able to achieve the correct result. 4.1.3. Experiments with noise and outliers in color space In this section we evaluate the effect of noise and outliers in the color space on the non-rigid registration with the proposed CCPD. The experimentation is carried out using the fish and face data used in the previous experiments. The first experiment considers the noise in the color space adding random gaussian noise to each R, G, and B component in 4 different levels of Signal/Noise ratio (SNR): 20, 15, 10 and 5 dB (see Fig. 7). Initially, the experiment analyses the effect of choosing suitable parameters for CCPD to compensate for the color noise using the fish data. Later, using the face data, the parameters are fixed to those giving the best CCPD performance in the experiments carried out in Sect. 4.1.2 in order to analyse the color noise effects and tolerance of the proposal against that noise. Since the noise is assigned randomly, 5 iterations per level of noise have been performed to calculate the averaged RMS as the registration error. The results for the initial color noise experiment using the optimal set of parameters by experimentation are shown in Table 4. As can be seen from the results, even with high levels of noise, the performance of the CCPD method remains high being hardly affected by the color noise (the order of the RMS is the same regardless the SNR). Table 4: RMS registration error of fish shape with color noise. The Signal-to-Noise ratios are 20, 15, 10 and 5 dB. 20 0.41080e-02 15 0.40603e-02 10 0.59438e-02 19 5 0.69721e-02 Figure 7: Noisy point-clouds of the fish and face corresponding to Y the moving data. From left to right, the data without noise, 20, 15, 10 and 5 dB of SNR. The results for the second color noise experiment (using the optimal set of parameters obtained for the CCPD without noise presented in Sect. 4.1.2) are shown in Table 5. The data includes noise in the same four tests shown in Table 2 and Figure 5. For Tests 2 to 4 with 15 dB of SNR the error of CCPD is similar to CPD and decreases as SNR gets worse. In the case of Test 1, the performance is lower than CPD but remains similar for every level of noise due to the outliers are modelled with the original Eq. of outliers oL from the CPD. If we assign high σC or low wC , we will have the results similar to CPD. Furthermore, Figure 8 shows the same results for the full set of 50 faces that is part of the original CPD synthetic dataset. This experiment shows similar results as the previous one, confirming the results in a large set of deformations. On average, the CCPD method outperforms the CPD results even for large color noise (about 15 dB). Table 5: CCPD RMS registration error from the face shape tests with 20, 15, 10 and 5 dB Signal-To-Noise ratio. Columns CCPD and COD are from Table 2. Test1 Test2 Test3 Test4 CCPD no noise 0.0037 0.0029 0.0022 0.0060 CPD no noise 0.0162 0.0408 0.1205 0.1041 20 15 10 5 0.2176 0.0308 0.0332 0.1365 0.2141 0.0617 0.0830 0.1372 0.2150 0.1823 0.2606 0.1483 0.2159 0.4560 0.4304 0.2092 Finally, the effect of outliers in the color data is evaluated. In this case, the outliers are in the color space, hence to generate them we have chosen the color that is the furthest to the rest of colors, which in this case is white. We have randomly generated, over the data set, four percentages of outliers: 5%, 25%, 50% and 75%. The results are presented in Table 6. 20 RMS registration error CPD CCPD 0.5 RMS 0.4 0.3 0.2 0.1 0 5 10 15 Color noise (SNR dB) 20 >40 Figure 8: Average CCPD RMS registration error for 50 face deformations with 20, 15, 10 and 5 dB of color Signal-To-Noise ratio. 21 Table 6: RMS registration error of face shape for four levels of color outliers, 5%, 25%, 50% and 75% compared to the CCPD without noise (BL: Baseline). BL 0.0029 5% 0.0222 25% 0.0783 50% 0.1311 75% 0.2579 4.2. Synthetic realistic experiments In this section, we present the experiments to evaluate the method for nonrigid registration using realistic shapes. The dataset includes two different objects: a flower3 and a face4 . The synthetic models have been acquired using the Blensor tool [29], a Blender plugin which simulates a Microsoft Kinect RGB-D sensor. This tool uses raytracing to simulate 3D sensors, that in this particular case is an RGB-D, providing a PCD file with all the spatial coordinates of the points and the color information. The virtual sensor is oriented in the direction as it would be done with a real one. The only preprocessing is to deform the models using the Blender tools, to have in this case three shapes, original, small deformation and large deformation. Figure 9 and 10 show the face and flower models used for the experiments. The images are from left to right: the target, a first deformation, and a second larger deformation. The face deformations could be seen as elastic deformations, because the face remains the same except for displacement of some parts. The first deformation is a eyebrow rise and a mouth change. The second moves both eyebrows and the mouth, changes the nose and the chin. For the flower, it could be seen as growth deformations due to the size of the object changes. The first deformation enlarges a little the leaves and the second is a larger deformation. In order to reduce and enhance the data for the registration purpose, we have used different downsampling techniques to sample the data. Figure 11 shows two different kinds of sampling. The figure has in the middle the face example. At the left side a uniform sampling is presented, while at the right side a representation of a color-based sampling, which provide higher density of points at salient features, such as eyebrows, eyes or lips. In previous works, we have studied the use of downsampling as a method to enhance the quality of the data. These studies have been published in [30] [31]. In this paper we use the same methods, including: bilinear interpolation, normal-based sampling, color-based sampling, a combination of color and normal based technique, and GNG sampling approach proposed in [32]. 4.2.1. Non-rigid registration evaluation Here we present a comparative evaluation of CCPD and CPD registration using synthetic realistic subjects. The color information, used by CCPD, allows the registration method to achieve good accuracy when the surface is not very 3 https://www.turbosquid.com/3d-models/pink-primrose-flowering-3d-obj/516226 (last access: 11/08/2017) 4 http://eat3d.com/forum/art-gallery/models-face (last access: 11/08/2017) 22 Figure 9: The face model used in the experiments. Two viewpoints (each per row) of the faces used. From left to right, the original face shape as target for the small and larger deformations in second and third columns. 23 Figure 10: The flower model used in the experiments. Two viewpoints (each per row) of the flower used. From left to right, the original flower shape as target for the small and larger deformations in second and third columns. Figure 11: Two sampling examples. The image in the middle represents a point set of a face shape. At the left is a uniform sampling. At the right side is a representation of a color-based sampling, which provide higher density of points at salient features, such as eyebrows, eyes or lips. 24 detailed where the drift of points is not constrained by the irregularities of the shape. Using the data sampled, the non-rigid registration methods are qualitatively evaluated by visual inspection. Figure 13 shows the face shape for CCPD and the original CPD with 1000 points sampled with the different methods. More experiments have been performed with 250 and 500 data (which correspond to the experimentation in [30] [31]), but are not included as the results are similar to the presented experiment. Figure 16 shows the flower shape registration results for CCPD and the original CPD with the same point sampling (similarly, more experiments have been done with similar results). The figures show the registration for the second deformation (right of Fig. 9 and 10) of each shape as it is the larger one, and hence, the most difficult in terms of registration procedure. For each figure, the first row presents the CCPD method and the second the original CPD. From left to right, the sampling techniques are: bilinear, normal-based, color-based, NC-based, and GNG. To analyse the registration, we will pay special attention to a specific Regionof-Interest (ROI) for each model (i.e. those parts that are the aim of the study) depicted in Figure 12. In the face, the ROI will correspond to the mouth and eyebrows as they are the parts which are mainly displaced. The ROI in the flower will correspond to the central part, pink and yellow, as they do not deform in color unlike the rest of the leaves (i.e. the deformation produces an enlargement of the tip of leaves, but the center remains the same). This simulates the growth of a flower, where not all parts grow in the same way. Figure 13 and 16 show the registration result for all different sampling techniques using CCPD (first row) and CPD (second row). Figures 14 and 15 present a detailed view of this analysis for the face shape, and Figure 17 and 18 for the flower shape. For both shapes the first figure shows the registration using a GNG sampled dataset and the second the bilinear sampled dataset. We can make several conclusions from the results of the experiments for the face shape. From Figures 13, 14 and 15 we can see that the proposed CCPD achieves better alignment. If we pay attention to the eyebrows area, it can be seen that the alignment of CCPD results is better as it takes into account the color. In the detailed figures, it is easier to perceive this situation. The flower shape has similar behavior to the face in the registration results. When the data comes from either color-based or NC-based, both CCPD and CPD achieves similar results. Moreover, when the data has been sampled using GNG or bilinear, the proposed CCPD achieves higher registration accuracy than the original CPD. As the deformation in this shape is not isometric, the tips of some leaves are the parts that get larger, CCPD moves the points differently at the tip of the leaves than the ROI, achieving accurate results. However, as CPD moves coherently, the points shrink all together (the registration is from the larger to the original position) such that ROI ends with a wrong color alignment. This situation is presented in Figure 17 and Figure 18. Figures 17 and 18 show a detail of the registration to visually evaluate the accuracy of both methods. It is easy to appreciate that CCPD achieves better 25 Figure 12: Example of Region of Interest for both shapes. The ROI are highlighted with blue circles. Figure 13: Non-rigid registration result of face shape for a 1000 point sampling. The first row shows CCPD, and the original CPD in the second. Columns show different sampling algorithms that are from left to right, bilinear, normal-based, color-based, NC-based, GNG. 26 Figure 14: Enlarged example of the ROI for the face sampled with GNG. The first row shows the CCPD and the second the original CPD. The data size is, from left to right, 250, 500, and 1000 points for the GNG. Figure 15: Enlarged example of the ROI for the face sampled with bilinear sampling. The first row shows the CCPD and the second the original CPD. The data size is, from left to right, 250, 500, and 1000 points for the bilinear. Figure 16: Non-rigid registration result of flower shape for a 1000 point sampling. The first row shows CCPD, and the original CPD in the second. Columns shows different sampling algorithms that are from left to right, bilinear, normal-based, color-based, NC-based, GNG. 27 Figure 17: Enlarged example of the ROI for the flower sampled with GNG. The first row shows the CCPD and the second the original algorithm. The data size is, from left to right, 250, 500, and 1000 points for the GNG. Figure 18: Enlarged example of the ROI for the flower sampled with bilinear sampling. The first row shows the CCPD and the second the original algorithm. The data size is, from left to right, 250, 500, and 1000 points for the bilinear. 28 Table 7: Average processing time in seconds CCPD and CPD in face shape. bilinear normals color NC GNG bilinear normals color NC GNG Face deformation 1 CCPD 250 500 1000 11.7988 58.4475 560.6209 17.0563 114.3599 555.5070 11.7048 58.2177 703.9807 23.2824 141.5593 465.4034 35.1574 121.0136 541.7851 CPD 3.4144 13.3339 58.8231 7.5732 31.0907 173.2305 5.501 27.6411 174.1651 12.4572 36.2307 149.8286 11.3055 43.2056 171.6053 Face deformation 2 250 30.2463 24.3791 19.7996 25.8104 31.5702 500 98.0815 62.2356 69.2475 70.3541 181.0353 1000 654.7234 873.7409 809.8889 700.6084 698.8645 9.0456 12.1042 7.9162 7.1914 11.6725 44.0501 45.0169 29.5334 42.8539 44.3024 175.9423 181.4115 135.8508 193.599 183.5948 Table 8: Average time processing CCPD and CPD in flower shape. bilinear normals color NC GNG bilinear normals color NC GNG Flower deformation1 CCPD 250 500 1000 33.8404 100.1836 560.1712 18.9529 74.6561 369.0443 13.0186 129.9349 458.0764 52.0435 91.3152 388.7584 20.7716 112.4218 443.8667 CPD 9.8136 43.4829 175.2797 11.4153 45.7999 181.3168 11.5049 42.8385 175.7153 11.79 43.2504 174.0308 11.8023 45.2732 176.094 Flower deformation2 250 13.4003 20.0593 21.498 66.038 18.5236 500 153.0062 121.5026 74.1095 274.563 66.7437 1000 562.0116 537.5028 361.1847 267.593 615.4628 11.2072 11.8425 9.9246 11.2697 11.1835 43.2063 42.7337 42.8615 43.7694 43.7019 172.0116 172.5745 175.9582 174.9237 171.5101 results than the original version in the alignment. Finally, processing time of the registration process has been evaluated and shown in Table 7 for the face data, and Table 8 for the flower. The original CPD always achieves lower times due to the number of operations. To calculate the posterior probability in CCPD, it is necessary to estimate for each point both color and location probability. Moreover, the convergence is not the same in both methods, as CCPD commonly needs more iterations to achieve a more accurate result. The time of both tables is presented in seconds, and is shown for each sampling method. The columns are: first, the sampling method; from second to fourth, the sampling rates for the first deformation; and from fifth to seventh, the three sampling rates for the second deformation. As a rule-ofthumb, the CCPD computing times are about 3 times longer thatn the CPD times. 29 4.3. Real data experimentation To evaluate the method in real conditions, experiments with data from a general purpose RGB-D sensor has been carried out. In this case, a face with different expressions is used to evaluate the non-rigid registration using CCPD, against CPD. Due to the absence of ground truth, the data will be visually evaluated to analyse the performance of both methods. Figure 19 shows the data used in this experimentation. Figure 20 shows an eyebrow rising deformation. The target is a neutral expression and the deformation is a surprise expression. The registration results of CCPD accurately aligns the shapes. The right column shows the data flow. It clearly shows the movement of the eye region downward, from the surprise expression to the neutral one. In this case, CPD only takes into account the location, so it cannot align properly the eyebrows, resulting in a wrong homogeneous displacement. Figure 21 shows a cheek inflating deformation. The person inflates one cheek so the mouth also moves to the side, the target is a neutral expression. The CCPD outperforms the registration of CPD as it uses the beard color to properly align and move the points into a correct location, where correct means the color of both X and Y registered are the most similar over the data. CPD, despite the good result, produces an inaccurate registration because it can only use the location information. Figure 22 presents a large deformation. Here the face is highly deformed to one side and closing an eye. CCPD aligns the points better because the registered point set results in a correct location. CPD, however, cannot correctly move the points resulting in an inaccurate result (points registered have different color). 5. Discussion and conclusions In this paper, a novel non-rigid registration approach called Color Coherent Point Drift (CCPD) is presented. This proposal, based on the well-know CPD, introduces color information in the correspondence estimation of non-rigid registration. The combination of color and location (3D position) information in the estimated correspondence improves the result in the presence of noise, missing data and outliers. In general terms, the proposed CCPD algorithm outperforms the original CPD in most cases. The new input, color, provides information that disambiguates situations where the 3D space provides the wrong correspondences. For example, a flower that grows is used because some parts remain the same but the tips of the leaves expand. Here, CPD returns a coherent movement which moves the center points to a wrong position, while CCPD keeps the color in a good registration. The experiments included three parts: synthetic simple subjects, synthetic realistic subjects and real data. The simple subjects are those used in the original CPD but with added color information (a fish and a face). The realistic 30 Figure 19: Real data used for the non-rigid experiments. The first column shows the original color images, the second and third show the 3D point cloud data from front and side of the faces. 31 Figure 20: Real data registration, eyebrow rising. The top row is CCPD, and the second CPD. From left to right, original deformation, target shape, registered shape, and data flow Figure 21: Real data registration, left cheek inflation. The top row is CCPD, and the second CPD. From left to right, original deformation, target shape, registered shape, and data flow 32 Figure 22: Real data registration, large deformation. The top row is CCPD, and the second CPD. From left to right, original deformation, target shape, registered shape, and data flow subjects have been obtained using Blensor, and the real data has been acquired using a Primesense Carmine RGB-D sensor. The first experiments with a fish and a face shape show how the proposed method is able to overcome noise, outliers, missing data and large deformations. To evaluate the outliers and missing data, first the registered dataset Y is aligned to the target dataset X, this second set with outliers (points in X without correspondences in the registered set Y ), providing similar result for both CCPD and CPD. Secondly, missing data evaluation has been carried out by removing points in X, so that there are points in Y without correspondences in X. In this evaluation, for the fish shape, CCPD had 4.82 times lower RMS error than CPD in registration accuracy for 21.9% missing data and 23.1 times lower for 58.2% missing data. For the face, CCPD had 24 times lower RMS error on average for all missing data tests than the original method. For a large deformation evaluation, a square shape was registered to the fish shape, obtaining better alignment by CCPD than by CPD for the RMS error (23.1 times lower RMS). In the case of the face, the large deformation moves the eyebrow up while the rest of face remains the same, which forces a non-coherent movement in a specific region. It has been visually evaluated with CCPD outperforming CPD. Experimental results show that a balanced adjustment of both color and location parameters, using the proposed CCPD meets the requirements of these registration problems, dealing with difficult data conditions (very high levels of noise and outliers in color or location space), approaching to the optimal solution. Nevertheless, including color information (CCPD) improves the registration process even taking into account very difficult color input data conditions. 33 In the worst case, in presence of corrupt color data, the CCPD can become the original CPD with either large σC or assigning 0 to wC . For realistic data experiments, two subjects have been evaluated, a flower and a face. Both subjects have two deformations, one larger than the other. The face changes shape with expression. Ten eyebrow, and mouth are the regions that mainly deform, which can be treated as elastic deformations. The flower, with the growth of some leaves, can be seen as a free deformation as the subject changes both size and topology as new points appear in the deformation. CCPD has been evaluated and compared to CPD using the data provided by five downsampling methods which were used in previous works. The results have been visually evaluated, showing more accurate registration for the proposed method in most cases. The subjects, for all data (each downsampling method), are aligned not only by the point distribution, but also with a coherence in the color space (similar colors are aligned together). The real data includes three face deformations, from smaller to larger, returning more accurate registration results for the proposed method. The deformations of the shapes are better aligned by CCPD because the flow of the points is more similar and coherent to the expected (expected by visual inspection), by aligning the points using the shape and color information. Generalization for multiple (e.g.: include topology along with color and location) spaces combination is the next step to be done. Moreover, evaluating biological growth using CCPD is a short term future work that will provide a very useful tool for many applications. As long term future work, we are interested in modifying the method to accelerate the process by comparing neighbor points instead of the whole data set. Moreover, an implementation of the method in a massive parallel processing GPU is proposed as future work to speed up the process. References References [1] A. Myronenko, X. Song, Point set registration: coherent point drift., IEEE transactions on pattern analysis and machine intelligence 32 (12) (2010) 2262–75. doi:10.1109/TPAMI.2010.46. [2] G. K. L. Tam, Z.-Q. Cheng, Y.-K. Lai, F. C. Langbein, Y. Liu, D. Marshall, R. R. Martin, X.-F. Sun, P. L. Rosin, Registration of 3D point clouds and meshes: a survey from rigid to nonrigid., IEEE transactions on visualization and computer graphics 19 (7) (2013) 1199–217. doi:10.1109/TVCG.2012. 310. [3] H. Chui, A. Rangarajan, A New Algorithm for Non-Rigid Point Matching, CVPR 2 (2000) 44–51. [4] H. Chui, A. Rangarajan, A new point matching algorithm for non-rigid registration, Computer Vision and Image Understanding 89 (2-3) (2003) 114–141. doi:10.1016/S1077-3142(03)00009-2. 34 [5] A. Rangarajan, H. Chui, F. Bookstein, The softassign procrustes matching algorithm, in: J. Duncan, G. Gindi (Eds.), Information Processing in Medical Imaging, Vol. 1230 of Lecture Notes in Computer Science, Springer Berlin Heidelberg, 1997, pp. 29–42. [6] N. Ueda, R. Nakano, Deterministic annealing {EM} algorithm, Neural Networks 11 (2) (1998) 271 – 282. doi:http://dx.doi.org/10.1016/ S0893-6080(97)00133-0. [7] J. Yang, The thin plate spline robust point matching (TPS-RPM) algorithm: A revisit, Pattern Recognition Letters 32 (7) (2011) 910–918. doi:10.1016/j.patrec.2011.01.015. [8] H. Li, R. W. Sumner, M. Pauly, Global correspondence optimization for non-rigid registration of depth scans, Eurographics Symposium on Geometry Processing 27 (2008) 1421–1430. doi:10.1111/j.1467-8659.2008. 01282.x. [9] Q. Sang, J.-Z. Zhang, Z. Yu, Robust non-rigid point registration based on feature-dependant finite mixture model, Pattern Recognition Letters 34 (13) (2013) 1557–1565. doi:10.1016/j.patrec.2013.06.019. [10] S. Belongie, J. Malik, J. Puzicha, Shape Context: A new descriptor for shape matching and object recognition, In NIPS (2000) 831—-837. [11] S. Belongie, J. Malik, J. Puzicha, Shape matching and object recognition using shape contexts, IEEE Transactions on Pattern Analysis and Machine Intelligence 24 (4) (2002) 509–522. doi:10.1109/34.993558. [12] Q. Sang, J. Zhang, Z. Yu, Non-rigid point set registration: A bidirectional approach, in: 2012 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), IEEE, 2012, pp. 693–696. doi:10.1109/ ICASSP.2012.6287978. [13] Y. Yawen, Z. P. Peng, Q. Yu, Y. Jie, W. S. Zheng, A Robust CPD Approach Based on Shape Context, in: 33rd Chinese Control Conference, Nanjing, China, 2014, pp. 4930–4935. doi:10.1109/ChiCC.2014.6895776. [14] H. Wang, B. Fei, A Robust B-Splines-Based Point Match Method for Non-Rigid Surface Registration, in: 2008 2nd International Conference on Bioinformatics and Biomedical Engineering, IEEE, 2008, pp. 2353–2356. doi:10.1109/ICBBE.2008.921. URL http://ieeexplore.ieee.org/document/4535801/ [15] Y. Yang, S. H. Ong, K. W. C. Foong, A robust global and local mixture distance based non-rigid point set registration, Pattern Recognitiondoi: 10.1016/j.patcog.2014.06.017. 35 [16] J. Chen, J. Ma, C. Yang, L. Ma, S. Zheng, Non-rigid point set registration via coherent spatial mapping, Signal Processing 106 (2015) 62–72. doi: 10.1016/j.sigpro.2014.07.004. [17] W. Lian, L. Zhang, Robust Point Matching Revisited : A Concave Optimization Approach, in: Computer Vision ECCV 2012, 2012, pp. 259–272. doi:10.1007/978-3-642-33709-3\_19. [18] S. Lin, Y.-K. Lai, R. R. Martin, S. Jin, Z.-Q. Cheng, Color-aware surface registration, Computers & Graphics 58 (2016) 31–42. doi:10.1016/j. cag.2016.05.007. [19] A. Myronenko, X. Song, M. A. C.-P. nán, Non-rigid point set registration: Coherent point drift, in: B. Schölkopf, J. Platt, T. Hoffman (Eds.), Advances in Neural Information Processing Systems 19, MIT Press, 2007, pp. 1009–1016. [20] P. Wang, P. Wang, Z. Qu, Y. Gao, Z. Shen, A refined coherent point drift (CPD) algorithm for point set registration, Science China Information Sciences 54 (12) (2011) 2639–2646. doi:10.1007/s11432-011-4465-7. [21] B. Jian, B. C. Vemuri, A Robust Algorithm for Point Set Registration Using Mixture of Gaussians., Proceedings / IEEE International Conference on Computer Vision. IEEE International Conference on Computer Vision 2 (2005) 1246–1251. doi:10.1109/ICCV.2005.17. [22] B. Jian, B. C. Vemuri, Robust Point Set Registration Using Gaussian Mixture Models., IEEE transactions on pattern analysis and machine intelligence 33 (8) (2010) 1633–1645. doi:10.1109/TPAMI.2010.223. [23] A. W. Fitzgibbon, Robust registration of 2D and 3D point sets, Image and Vision Computing 21 (13-14) (2003) 1145–1153. doi:10.1016/j.imavis. 2003.09.004. [24] D. Gerogiannis, C. Nikou, A. Likas, Registering sets of points using Bayesian regression, Neurocomputing 89 (2012) 122–133. doi:10.1016/ j.neucom.2012.02.018. [25] Y. Gao, J. Ma, J. Zhao, J. Tian, D. Zhang, A robust and outlier-adaptive method for non-rigid point registration, Pattern Analysis and Applications 17 (2) (2013) 379–388. doi:10.1007/s10044-013-0324-z. [26] S. Ge, G. Fan, M. Ding, Non-rigid Point Set Registration with GlobalLocal Topology Preservation, The IEEE Conference on Computer Vision and Pattern Recognition (CVPR) Workshops (Ml) (2014) 245–251. [27] S. de Sousa, W. G. Kropatsch, Graph-based point drift: Graph centrality on the registration of point-sets, Pattern Recognition (2014) 1–12doi:10. 1016/j.patcog.2014.06.011. 36 [28] Z. Zhou, J. Zheng, Y. Dai, Z. Zhou, S. Chen, Robust non-rigid point set registration using student’s-t mixture model., PloS one 9 (3) (2014) e91381. doi:10.1371/journal.pone.0091381. [29] M. Gschwandtner, R. Kwitt, A. Uhl, W. Pree, Blensor blender sensor simulation toolbox, in: G. Bebis, R. Boyle, B. Parvin, D. Koracin, S. Wang, K. Kyungnam, B. Benes, K. Moreland, C. Borst, S. DiVerdi, C. Yi-Jen, J. Ming (Eds.), Advances in Visual Computing, Vol. 6939 of Lecture Notes in Computer Science, Springer Berlin Heidelberg, 2011, pp. 199–208. [30] M. Saval-Calvo, S. Orts-Escolano, J. Azorin-Lopez, J. Garcia-Rodriguez, A. Fuster-Guillo, V. Morell-Gimenez, M. Cazorla, A Comparative Study of Downsampling Techniques for Non-rigid Point Set Registration using Color, in: International Work-conference on the Interplay between Natural and Artificial Computation, 2015. [31] M. Saval-Calvo, J. Azorin-Lopez, A. Fuster-Guillo, J. Garcia-Rodriguez, S. Orts-Escolano, A. Garcia-Garcia, Evaluation of sampling method effects in 3D non-rigid registration, Neural Computing and Applicationsdoi:10. 1007/s00521-016-2258-z. URL http://link.springer.com/10.1007/s00521-016-2258-z [32] S. Orts-Escolano, V. Morell, J. Garcia-Rodriguez, M. Cazorla, Point cloud data filtering and downsampling using growing neural gas, in: The 2013 International Joint Conference on Neural Networks, IJCNN 2013, Dallas, TX, USA, August 4-9, 2013, 2013, pp. 1–8. 37
1cs.CV
280 Birds with One Stone: Inducing Multilingual Taxonomies from Wikipedia Using Character-level Classification Amit Gupta and Rémi Lebret and Hamza Harkous and Karl Aberer arXiv:1704.07624v2 [cs.CL] 12 Sep 2017 École Polytechnique Fédérale de Lausanne Route Cantonale, 1015 Lausanne Abstract We propose a novel fully-automated approach towards inducing multilingual taxonomies from Wikipedia. Given an English taxonomy, our approach first leverages the interlanguage links of Wikipedia to automatically construct training datasets for the is-a relation in the target language. Character-level classifiers are trained on the constructed datasets, and used in an optimal path discovery framework to induce high-precision, high-coverage taxonomies in other languages. Through experiments, we demonstrate that our approach significantly outperforms the state-of-the-art, heuristics-heavy approaches for six languages. As a consequence of our work, we release presumably the largest and the most accurate multilingual taxonomic resource spanning over 280 languages. 1 Introduction Motivation. Machine-readable semantic knowledge in the form of taxonomies (i.e., a collection of is-a1 edges) has proved to be beneficial in an array of Natural Language Processing (NLP) tasks, including inference, textual entailment, question answering, and information extraction (Biemann 2005). This has led to multiple large-scale manual efforts towards taxonomy induction such as WordNet (Miller 1994). However, manual construction of taxonomies is timeintensive, usually requiring massive annotation efforts. Furthermore, the resulting taxonomies suffer from low coverage and are unavailable for specific domains or languages. Therefore, in the recent years, there has been substantial interest in inducing taxonomies automatically, either from unstructured text (Velardi, Faralli, and Navigli 2013), or from semistructured collaborative content such as Wikipedia (Hovy, Navigli, and Ponzetto 2013). Wikipedia, the largest publicly-available source of multilingual, semi-structured content (Remy 2002), has served as a key resource for automated knowledge acquisition. One of its core components is the Wikipedia Category Network (hereafter referred to as WCN), a semantic network which links Wikipedia entities2 , such as Johnny Depp, with interconnected categories of different granularity (e.g., American actors, Film actors, Hollywood). The semi-structured nature of WCN has enabled the acquisition of large-scale 1 2 We use the terms is-a and hypernym interchangeably. We use Wikipedia page and entity interchangeably. taxonomies using lightweight rule-based approaches (Hovy, Navigli, and Ponzetto 2013), thus leading to a consistent body of research in this direction. The first line of work on taxonomy induction from Wikipedia mainly focuses on the English language. This includes WikiTaxonomy (Ponzetto and Strube 2008), WikiNet (Nastase et al. 2010), YAGO (Suchanek, Kasneci, and Weikum 2007; Hoffart et al. 2013), DBPedia (Auer et al. 2007), and Heads Taxonomy (Gupta et al. 2016). The second line of work aims to exploit the multilingual nature of Wikipedia. MENTA (de Melo and Weikum 2010), one of the largest multilingual lexical knowledge bases, is constructed by linking WordNet and Wikipedias of different languages into a single taxonomy. Similarly, YAGO3 (Mahdisoltani, Biega, and Suchanek 2015) extends YAGO by linking Wikipedia entities in multiple languages with WordNet. The most recent approach to multilingual taxonomy induction from Wikipedia is the Multilingual Wikipedia Bitaxonomy Project or MultiWiBi (Flati et al. 2016). MultiWiBi first induces taxonomies for English, which are further projected to other languages using a set of complex heuristics that exploit the interlanguage links of Wikipedia. Unlike MENTA and YAGO3, MultiWiBi is self-contained in Wikipedia, i.e., it does not require labeled training examples or external resources such as WordNet or Wikitionary. While MultiWiBi is shown to outperform MENTA and YAGO3 considerably, it still achieves low precision for non-English pages that do not have an interlanguage link to English (e.g., 59% for Italian). Contributions. In this paper, we propose a novel approach towards inducing multilingual taxonomies from Wikipedia. Our approach is fully-automated and language-independent. It provides a significant advancement over state of the art in multilingual taxonomy induction from Wikipedia because of the following reasons: • Most previous approaches such as MENTA or MultiWiBi rely on a set of complex heuristics that utilize custom hand-crafted features. In contrast, our approach employs text classifiers in an optimal path search framework to induce taxonomies from the WCN. The training set for text classifiers is automatically constructed using the Wikipedia interlanguage links. As a result, our approach is simpler, more principled and easily replicable. • Our approach significantly outperforms the state-of-the-art approaches across multiple languages in both (1) standard edge-based precision/recall measures and (2) pathquality measures. Furthermore, our taxonomies have significantly higher branching factor than the state-of-the-art taxonomies without incurring any loss of precision. • As a consequence of our work, we release presumably the largest and the most accurate multilingual taxonomic resource spanning over 280 languages. We also release edge-based gold standards for three different languages (i.e., French, Italian, Spanish) and annotated path datasets for six different languages (i.e., French, Italian, Spanish, Chinese, Hindi, Arabic) for further comparisons and benchmarking purposes. 2 Taxonomy Induction Background. We start by providing a description of the various components of Wikipedia, which will aid us in presenting the rest of this paper: • A Wikipedia page describes a single entity or a concept. Examples of pages include Johnny Depp, Person, or Country. Currently, Wikipedia consists of more than 44 million pages spanning across more than 280 different languages (Wikipedia 2017). • A Wikipedia category groups related pages and other categories into broader categories. For example, the category American actors groups pages for American actors, such as Johnny Depp, as well as other categories, such as American child actors. The directed graph formed by pages and categories as nodes, and the groupings as edges is known as the Wikpedia Category Network (WCN). A different WCN exists for each of the 280 languages of Wikipedia. WCN edges tend to be noisy, and are usually a mix of is-a (e.g., Johnny Depp→American actors) and not-is-a edges (e.g., Johnny Depp;Hollywood). • An Interlanguage link connects a page (or a category) with their equivalent page (or category) across different languages. For example, the English page for Johnny Depp is linked to its equivalent versions in 49 different languages including French (Johnny Depp) and Russian (Депп, Джонни). Two nodes linked by an interlanguage link are hereafter referred to as equivalent to each other. Algorithm. We now describe our approach for inducing multilingual taxonomies from the WCN. Given (1) a unified taxonomy of pages and categories in English (we use Heads Taxonomy publicly released by Gupta et al. (2016)3 ), (2) the interlanguage links, and (3) a target language, our approach aims to induce a unified taxonomy of pages and categories for the target language. Our approach runs in three phases: i) Projection phase: create a high-precision, lowcoverage taxonomy for the target language by projecting is-a edges from the given English taxonomy using the interlanguage links. 3 We note that our method is independent of the English taxonomy induction method. People (EN) Emperors (EN) Empereur (FR) Empereur Romain (FR) Ancestor Relation WCN Edge Interlanguage link Personne (FR) Augustus (EN) Rome (FR) Auguste (FR) Figure 1 – Example of projection phase. ii) Training phase: leverage the high-precision taxonomy to train classifiers for classifying edges into is-a or not-is-a in the target language. iii) Induction Phase: induce the final high-precision, highcoverage taxonomy by running optimal path search over the target WCN with edge weights computed using the trained classifiers. 2.1 Projection Phase Let Te be the given English taxonomy. Let Gf be the WCN and Tf be the output taxonomy (initially empty) for the target language f (such as French). For a node nf ∈ Gf with the English equivalent ne , for which no hypernym exists yet in Tf , we perform the following steps: i) Collect the set Ae of all ancestor nodes of ne in Te up to a fixed height k1 4 . ii) Fetch the set Af of equivalents for nodes in Ae in the target language f . iii) Find the shortest path between nf and any node in Af up to a fixed height k2 5 ; iv) Add all the edges in the shortest path to the output taxonomy Tf . If no English equivalent ne exists, the node nf is ignored. Figure 1 shows an example of the projection phase with French as the target language. For French node Auguste, its English equivalent (i.e., Augustus) is fetched via the interlanguage link. The ancestors of Augustus in English taxonomy (i.e., Emperors, People) are collected, and mapped to their French equivalents (i.e., Empereur, Personne). Finally, the WCN edges in the shortest path from Auguste to Empereur (i.e., Auguste→Empereur Romain, Empereur Romain→Empereur) are added to the output French taxonomy. 2.2 Training Phase Up till now, we constructed an initial taxonomy for the target language by simply projecting the English taxonomy using the interlanguage links. However, the resulting taxonomy suffers from low coverage, because nodes that do not have an English equivalent are ignored. For example, only 44.8% of the entities and 40.5% of the categories from the French WCN have a hypernym in the projected taxonomy. Therefore, to increase coverage, we train two different binary classifiers for classifying remaining target WCN 4 In our experiments, k1 = 14 sufficed as Heads taxonomy had a maximum height of 14 and no cycles. 5 k2 is set to 3 to maintain high precision. edges into is-a (positive) or not-is-a (negative). The first classifier is for Entity→Category edges and the other for Category→Category edges6 . We construct the training data for edge classification as follows: i) Assign an is-a label to the edges in Tf (i.e., the projected target taxonomy). ii) Assign a not-is-a label to all the edges in Gf (i.e., the target WCN) that are not in Tf but originate from a node covered in Tf . For example, in Figure 1, the edge Auguste→Empereur Romain is assigned the is-a label, and other WCN edges starting from Auguste (e.g., Auguste→Rome) are assigned the not-is-a label. Classifiers. To classify edges into is-a or not-is-a, we experiment with the following classifiers: i) Bag-of-words TFIDF: Given edge A→B, concatenate the features vectors for A and B computed using TFIDF over bag of words, and train a linear Support Vector Machine over the concatenated features. This method is hereafter referred to as Word TFIDF. ii) Bag-of-character-ngrams TFIDF: Same as Word TFIDF, except TFIDF is computed over bag of character n-grams7 (hereafter referred to as Char TFIDF). iii) fastText: A simple yet efficient baseline for text classification based on a linear model with a rank constraint and a fast loss approximation. Experiments show that fastText typically produces results on par with sophisticated deep learning classifiers (Grave et al. 2017). iv) Convolutional Neural Network (CNN): We use a single-layer CNN model trained on top of word vectors as proposed by Kim (2014). We also experiment with a character version of this model, in which instead of words, vectors are computed using characters and fed into the CNN. These models are referred to as Word CNN and Char CNN respectively. Finally, we experiment with a two-layer version of the character-level CNN proposed by (Zhang, Zhao, and LeCun 2015), hereafter referred to as Char CNN-2l. v) Long Short Term Memory Network (LSTM): We experiment with both word-level and character-level versions of LSTM (Hochreiter and Schmidhuber 1997). These models are hereafter referred to as Word LSTM and Char LSTM respectively. 2.3 Induction Phase In the last step of our approach, we discover taxonomic edges for nodes not yet covered in the projected taxonomy (Tf ). To this end, we first set the weights of Entity→Category and Category→Category edges in the target WCN as the probability of being is-a (computed using the corresponding classifiers). Further, for each node nf without a hypernym in Tf , we find the top k paths8 with the highest probabilities 6 Entity→Entity and Category→Entity edges are not present in the WCN. 7 n-values={2,3,4,5,6} worked best in our experiments. 8 k is set to 1 unless specified otherwise. originating from nf to any node in Tf , where the probability of a path is defined as the product of probabilities of individual edges9 . The individual edges of the most probable paths are added to the final taxonomy. 3 Evaluation In this section, we compare our approach against the state of the art using two different evaluation methods. In Section 3.1, we compute standard edge-level precision, recall, and coverage measures against a gold standard for three languages. In section 3.2, we perform a comprehensive path-level comparative evaluation across six languages. We compare our approach against MultiWiBi due to the following reasons: • Only MENTA, MultiWiBi, and our taxonomies are constructed in a fully language-independent fashion; hence, they are available for all 280 Wikipedia languages. • Unlike YAGO3, MENTA and most other approaches, MultiWiBi and ours are self-contained in Wikipedia. They do not require manually labeled training examples or external resources, such as WordNet or Wikitionary. • MultiWiBi has been shown to outperform all other previous approaches including YAGO3 and MENTA (Flati et al. 2016). 3.1 Edge-level Evaluation Experimental Setup. We faced a tough choice of selecting a Wikipedia snapshot since MultiWiBi, to which we compare, is constructed using a 2012 snapshot whereas Gupta et al. (2016), on which we build, uses a 2015 snapshot. Additionally, the code, executable, and gold standards used by MultiWiBi were not available upon request. Therefore, to advance the field and produce a more recent resource, we decided to use a 2015 snapshot of Wikipedia, especially given that Gupta et al. (2016) point out that there is no evidence that taxonomy induction is easier on recent editions of Wikipedia. We create gold standards for three languages (French, Spanish and Italian) by selecting 200 entities and 200 categories randomly from the November 2015 snapshot of Wikipedia and annotating the correctness of the WCN edges originating from them10 . Table 1 shows a sample of annotated edges from the French gold standard. In total, 4045 edges were annotated across the three languages. For evaluation, we use the same metrics as MultiWiBi: (1) Macro-precision (P ) defined as the average ratio of correct hypernyms to the total number of hypernyms returned (per node), (2) Recall (R) defined as the ratio of nodes for which at least one correct hypernym is returned, and (3) Coverage (C) defined as the ratio of nodes with at least one hypernym returned irrespective of its correctness. Training Details. All neural network models are trained on Titan X (Pascal) GPU using the Adam optimizer (Kingma 9 If multiple paths with the same probabilities are found, the shortest paths are chosen. 10 Two annotators independently annotated each edge. Interannotator agreement (Cohen’s Kappa) varied between 0.71 to 0.93 for different datasets. P Entity R C P Original WCN MENTA MultiWiBi UNIFORM Word TFIDF Char TFIDF fastText Word LSTM Char LSTM Word CNN Char CNN Char CNN-2l 72.0 81.4 84.5 80.6 86.5 88.0 86.5 87.8 86.2 86.3 86.2 87.7 100 48.8 80.9 83.2 90.1 91.7 90.1 91.5 89.8 90.0 89.9 91.0 100 59.8 94.1 100 100 100 100 100 100 100 100 100 78.8 82.6 80.7 85.7 82.1 92.3 90.5 91.6 93.9 92.8 93.3 92.2 100 55.0 80.7 86.7 83.1 93.4 91.6 92.7 95.1 93.9 94.4 93.3 100 65.7 100 100 100 100 100 100 100 100 100 100 Original WCN MENTA MultiWiBi UNIFORM Word TFIDF Char TFIDF fastText Word LSTM Char LSTM Word CNN Char CNN Char CNN-2l 74.5 79.7 80.1 77.7 90.0 88.4 86.8 90.9 89.8 89.6 92.6 87.7 100 53.2 79.4 81.6 94.4 92.8 91.1 95.4 94.4 94.3 97.2 92.1 100 66.7 96.3 100 100 100 100 100 100 100 100 100 76.2 77.1 89.7 86.6 84.1 89.2 87.3 83.1 83.3 83.1 86.9 86.1 100 25.4 89.0 88.3 85.7 90.9 89.0 84.8 83.8 84.8 88.7 87.8 100 32.8 99.2 100 100 100 100 100 100 100 100 100 Original WCN MENTA MultiWiBi UNIFORM Word TFIDF Char TFIDF fastText Word LSTM Char LSTM Word CNN Char CNN Char CNN-2l 81.4 81.0 87.0 88.0 89.9 92.5 93.0 93.4 92.3 92.9 92.9 93.3 100 42.9 82.0 90.7 92.7 95.4 95.9 96.3 95.3 95.8 95.8 96.3 100 52.7 93.7 100 100 100 100 100 100 100 100 100 80.9 80.5 84.8 83.0 78.9 88.3 88.9 88.2 88.8 87.6 92.9 89.9 100 54.2 84.4 85.0 80.8 90.4 91.0 90.3 90.3 89.7 95.1 92.1 100 66.4 100 100 100 100 100 100 100 100 100 100 is-a Naissance à Omsk→Naissance en Russie par ville Port d’Amérique du Sud→Port par continent Language not-is-a Naissance à Omsk;Omsk Port d’Amérique du Sud;Géographie de l’Amérique du Sud French Table 1 – Examples of Annotated Edges (French). and Ba 2014). Grid search is performed to determine the optimal values of hyper-parameters. For CNN models, we use an embedding of 50 dimensions. The number of filters is set to 1024 for word-level models and 512 for character-level models. For Char CNN-2l model, we use the same parameters used in Zhang, Zhao, and LeCun (2015). For LSTM models, we use an embedding of 128 dimensions, and 512 units in the LSTM cell. We also experimented with more complex architectures, such as stacked LSTM layers and bidirectional LSTMs. However, these architectures failed to provide any significant improvements over the simpler ones. Results. Table 2 shows the results for different methods including the state-of-the-art approaches (i.e., MENTA and MultiWiBi) and multiple versions of our three-phase approach with different classifiers. It also includes two baselines, i.e., WCN and UNIFORM. The WCN baseline outputs the original WCN as the induced taxonomy without performing any kind of filtering of edges. UNIFORM is a uniformly-random baseline, in which all the edge weights are set to 1 in the induction phase (cf. Section 2.3). Table 2 shows that all classifiers-based models achieve significantly higher precision than UNIFORM and WCN baselines, thus showing the utility of weighing with classification probabilities in the Induction phase. Interestingly, UNIFORM achieves significantly higher precision than WCN for both entities and categories across all three languages, hence, demonstrating that optimal path search in the Induction phase also contributes towards hypernym selection. All classifier-based approaches (except Word TFIDF) significantly outperform MultiWiBi for entities across all languages as well as for French and Spanish categories. Although MultiWiBi performs better for Italian categories, Char TFIDF achieves similar performance (89.2% vs 89.7%) 11 . Coverage is 100% for all the baselines and the classifiersbased approaches. This is because at least one path is discovered for each node in the induction phase, thus resulting in at least one (possibly incorrect) hypernym for each node in the final taxonomy. This also serves to demonstrate that the initial projected taxonomy (cf. Section 2.1) is reachable from every node in the target WCN. 11 We note that entity edges are qualitatively different for MultiWiBi and other methods, i.e., MultiWiBi has Entity→Entity edges whereas other methods have Entity→Category edges. Given that fact and the unavailability of the gold standards from MultiWiBi, we further support the efficacy of our approach with a direct path-level comparison in the next section. Italian Spanish Method Category R C Table 2 – Edge-level precision (P), recall (R) and Coverage (C) scores for different methods. MENTA and MultiWiBi results as reported by Flati et al. (2016). The top 3 results are shown in bold, and the best is also underlined. In general, character-level models outperform their wordlevel counterparts. Char TFIDF significantly outperforms Word TFIDF for both entities and categories across all languages. Similarly, Char CNN outperforms Word CNN. Char LSTM outperforms Word LSTM for categories, but performs slightly worse for entities. We hypothesize that this is due to the difficulty in training character LSTM models over larger training sets. Entity training sets are much larger, as the number of Entity→Category edges are significantly higher than the number of Category→Category edges (usually by a factor of 10). Neural Models vs. TFIDF. CNN-based models perform slightly better on average, followed closely by LSTM and TFIDF respectively. However, the training time for neural networks-based models is significantly higher than TFIDF models. For example, it takes approximately 25 hours to train the Char CNN model for French entities using a dedicated GPU. In contrast, the Char TFIDF model for the same data is trained in less than 5 minutes. Therefore, for the sake of efficiency, as well as to ensure simplicity and reproducibility MultiWiBi Patrimoine mondial en Équateur ; Conservation de la nature → Écologie → Biologie → Sciences naturelles → Subdivisions par discipline → Sciences → Discipline académique → Académie → Concept philosophique Char TFIDF Patrimoine mondial en Équateur → Patrimoine mondial en Amérique → Patrimoine mondial par continent → Patrimoine mondial → Infrastructure touristique → Lieu ; Géographie → Discipline des sciences humaines et sociales → Sciences humaines et sociales → Subdivisions par discipline Table 3 – Samples of generalization paths for French categories from MultiWiBi and Char TFIDF taxonomies. Correct path prefix (CPP) for each path is shown in bold. Language Method AL Entity ACPP ARCPP AL Category ACPP ARCPP French MultiWiBi Char TFIDF 8.24 11.08 2.96 5.08 0.49 0.49 8.92 8.36 3.6 3.76 0.56 0.49 Italian MultiWiBi Char TFIDF 7.36 8.32 2.68 4.88 0.45 0.61 14.84 8.32 3.72 4.52 0.27 0.57 Spanish MultiWiBi Char TFIDF 7.04 12.8 3.08 5.0 0.55 0.48 12.08 12.76 4.08 5.28 0.36 0.48 Arabic MultiWiBi Char TFIDF 8.96 7.48 2.12 5.88 0.31 0.81 14.64 6.96 4.12 5.04 0.31 0.74 Hindi MultiWiBi Char TFIDF 7.72 10.28 1.88 4.92 0.27 0.47 7.4 8.0 1.8 2.44 0.36 0.38 Chinese MultiWiBi Char TFIDF 7.4 6.32 2.56 3.92 0.47 0.68 8.0 6.95 4.43 4.48 0.63 0.68 Table 4 – Comparison of average path length (AL), average length of correct path prefix (ACPP), and average ratio of CPP to path lengths (ARCPP). across all languages, we choose Char TFIDF taxonomies as our final taxonomies for the rest of the evaluations. However, it is important to note that more accurate taxonomies can be induced by using our approach with neural-based models, especially if the accuracy of taxonomies is critical for the application at hand. 3.2 Path-level Evaluation In this section, we compare Char TFIDF against MultiWiBi using a variety of path-quality measures. Path-based evaluation of taxonomies was proposed by Gupta et al. (2016), who demonstrated that good edge-level precision may not directly translate to good path-level precision for taxonomies. They proposed the average length of correct path prefix (CPP), i.e., the maximal correct prefix of a generalization path, as an alternative measure of quality of a taxonomy. Intuitively, it aims to capture the average number of upward generalization hops that can be taken until the first wrong hypernym is encountered. Following this metric, we randomly sample paths originating from 25 entities and 25 categories from the taxonomies, and annotate the first wrong hypernym in the upward direction. In total, we annotated 600 paths across six different languages for Char TFIDF and MultiWiBi taxonomies. Table 3 shows examples of these generalization paths along with their CPPs12 . We report the average length of CPP (ACPP), as well as the average ratio of length of CPP to the full path (ARCPP). As an example, given the generalization path apple→fruit;farmer→human→animal with the not-is-a edge fruit;farmer, the path length is 5, length of CPP is 2, and ratio of length of CPP to total path is 0.4 (i.e., 25 ). Table 4 shows the comparative results. Char TFIDF taxonomies significantly outperform MultiWiBi taxonomies, achieving higher average CPP lengths (ACPP) as well as higher average ratio of CPP to path lengths (ARCPP). Therefore, compared to the state-of-the-art MultiWiBi taxonomies, Char TFIDF taxonomies are a significantly better source of generalization paths for both entities and categories across multiple languages. Figure 2 – Validation accuracies for Word TFIDF vs. Char TFIDF models. 4 4.1 Same starting entities and categories are used for all taxonomies per language. Word vs. Character Models To compare word and character-level models, we first report the validation accuracies for Word TFIDF and Char TFIDF models in Figure 2, as obtained during the training phase13 (cf. 13 12 Analysis In this section, we perform additional analyses to gain further insights into our approach. More specifically, in Section 4.1 and 4.2, we perform an in-depth comparison of the Word TFIDF and Char TFIDF models. In section 4.3, we show the effect of the parameter k, i.e., the number of paths discovered during optimal path search (cf. Induction Phase in Section 2.3), on the branching factor and the precision of the induced taxonomies. Validation set is constructed by randomly selecting 25% of the edges with each label (i.e., is-a and not-is-a) as discovered during the projection phase. Word TFIDF Char TFIDF dolphins, dolphins, miami miami, entraı̂neur, des s dol, s dolp, es dol hins, dolph, hins d Table 5 – Top features for not-is-a edge Entraı̂neur des Dolphins de Miami;Dolphins de Miami. (a) Word TFIDF Word TFIDF Char TFIDF dolphins, américain, miami entraı̂neur, sportif, entraı̂neur ur spor, r sport, eur sp tif am, if am, if amé Table 6 – Top features for is-a edge Entraı̂neur des Dolphins de Miami→Entraı̂neur sportif américain. (b) Char TFIDF Figure 3 – Confusion matrices for Word TFIDF vs. Char TFIDF for French categories. Each cell shows the total number of edges along with the ratios in brackets. Section 2.2). Char TFIDF models significantly outperform Word TFIDF models, achieving higher validation accuracies across six different languages. The improvements are usually higher for languages with non-Latin scripts. This can be partly attributed to the error-prone nature of whitespacebased tokenization for such languages. For example, the word tokenizer for Hindi splits words at many accented characters in addition to word boundaries, thus leading to erroneous features and poor performance. In contrast, character-level models are better equipped to handle languages with arbitrary scripts, because they do not need to perform text tokenization. 4.2 False Positives vs. False Negatives To further compare word and character models, we focus on the specific case of French categories. In Figure 3, we show the confusion matrices of Word TFIDF and Char TFIDF model computed using the validation set for French categories. While, in general, both models perform well, Char TFIDF outperforms Word TFIDF, producing fewer false positives as well as false negatives. We noticed similar patterns across most languages for both entities and categories. We hypothesize that the superior performance of Char TFIDF is because character n-gram features incorporate the morphological properties computed at the sub-word level as well as word boundaries, which are ignored by the wordbased features. To demonstrate this, we show in Tables 5 and 6 the top Word TFIDF and Char TFIDF features of a not-is-a and an is-a edge. These edges are misclassified by Word TFIDF, but correctly classified by Char TFIDF. While Word TFIDF features are restricted to individual words, Char TFIDF features can capture patterns across word boundaries. For example the 6-gram feature “ur spor” occurs in multiple hypernyms with different words: e.g., Commentateur sportif américain, Entraı̂neur sportif américain and Entraı̂neur sportif russe. Such features incorporate morphological information such as plurality and affixes, which can be important for the detection of an is-a relationship. This is also evidenced by previous approaches that utilize multiple hand-crafted features based on such morphological information (Suchanek, Kasneci, and Weikum 2007; Gupta et al. 2016). Therefore, character-level models equipped with such features perform better at the task of WCN edge classification than their word-level counterparts. 4.3 Precision vs. Branching Factor Along with standard precision/recall measures, structural evaluation also plays an important role in assessing the quality of a taxonomy. One of the important structural properties of a taxonomy is the branching factor, which is defined as the average out-degree of the nodes in the taxonomy. Taxonomies with higher branching factors are desirable, because they are better equipped to account for multiple facets of a concept or an entity (e.g., Bill Gates is both a philanthropist and an entrepreneur). However, there is usually a trade-off between branching factor and precision in automatically induced taxonomies (Velardi, Faralli, and Navigli 2013). Higher branching factor typically results in lowering of precision due to erroneous edges with lower scores being added to the taxonomy. Prioritizing the precision over the branching factor or vice-versa is usually determined by the specific use case at hand. Therefore, it is desirable for a taxonomy induction method to provide a control mechanism over this trade-off. In our approach, the number of paths discovered (k) in the optimal path search (cf. Section 2.3) serves as the parameter for controlling this trade-off. As k increases, the branching factor of the induced taxonomy increases because more paths per term are discovered. To demonstrate this effect, we plot the values of precision and branching factor of Char TFIDF taxonomies for varying values of k for French categories14 in Figure 4. Precision and branching factors for MultiWiBi taxonomies and the original WCN are also shown for comparison purposes. 14 Similar effects are observed for both entities and categories for all languages. Char TFIDF MultiWiBi WCN 0.925 Precision 0.900 0.875 0.850 0.825 0.800 1 2 Branching Factor Char TFIDF 3 Number of paths (k) 4 MultiWiBi 5 WCN 2.25 2.00 1.75 1.50 1.25 1.00 1 2 3 Number of paths (k) 4 5 Figure 4 – Precision vs. branching factor for different number of paths (k) in the Induction phase (cf. Section 2.3). Char TFIDF significantly outperforms MultiWiBi, either achieving higher precision (k≤2) or higher branching factor (k≥2). At k=2, Char TFIDF presents a sweet spot, outperforming MultiWiBi in both precision and branching factor. For k≥3, Char TFIDF taxonomies start to resemble the original WCN, because most of the WCN edges are selected by optimal path discovery. This experiment demonstrates that in contrast to MultiWiBi’s fixed set of heuristics, our approach provides a better control over the branching factor of the induced taxonomies. 5 Related Work and Discussion The large-scale and high quality of Wikipedia content has enabled multiple approaches towards knowledge acquisition and taxonomy induction over the past decade. Earlier attempts at taxonomy induction from Wikipedia focus on the English language. WikiTaxonomy, one of the first attempts to taxonomize Wikipedia, labels English WCN edges as isa or not-is-a using a cascade of heuristics based on handcrafted features (Ponzetto and Strube 2008). WikiNet extends WikiTaxonomy by expanding not-is-a relations into more fine-grained relations such as meronymy (i.e., part-of ) and geo-location (i.e., located-in). YAGO induces a taxonomy by linking Wikipedia categories to WordNet synsets using a set of simple heuristics (Suchanek, Kasneci, and Weikum 2007; Hoffart et al. 2013). DBPedia provides a fully-structured knowledge representation for the semi-structured content of Wikipedia, which is further linked to existing knowledge bases such as YAGO and OpenCyc (Auer et al. 2007; Lehmann et al. 2015). More recently, Gupta et al. (2016) induce a unified taxonomy of entities and categories from English WCN using a novel set of high-precision heuristics that classify WCN edges into is-a and not-is-a. A second line of work aims to extend the taxonomy induction process to other languages by exploiting the multilingual nature of Wikipedia content. MENTA, a large-scale multilingual knowledge base, is induced by linking WordNet with WCN of different languages into a unified taxonomy (de Melo and Weikum 2010). The most recent and the most notable effort towards this direction is MultiWiBi (Flati et al. 2016). MultiWiBi first simultaneously induces two separate taxonomies for English, one for pages and one for categories. To this end, it exploits the idea that information contained in pages are useful for taxonomy induction over categories and vice-versa. To induce taxonomies for other languages, MultiWiBi employs a set of complex heuristics, which utilize hand-crafted features (such as textual and network topology features) and a probabilistic translation table constructed using the interlanguage links. Our approach borrows inspiration from many of the aforementioned approaches. First, similar to WikiTaxonomy and Gupta et al. (2016), our approach also classifies WCN edges into is-a or not-is-a. Second, similar to MultiWiBi, our approach also projects an English taxonomy into other languages using the interlanguage links. However, unlike these approaches, our approach does not employ any heuristics or hand-crafted features. Instead, it uses text classifiers trained on an automatically constructed dataset to assign edge weights to WCN edges. Taxonomic edges are discovered by running optimal path search over the WCN in a fully-automated and language-independent fashion. Our experiments show that taxonomies derived using our approach significantly outperform the state-of-the-art taxonomies, derived by MultiWiBi using more complex heuristics. We hypothesize that it is because our model primarily uses categories as hypernyms, whereas MultiWiBi first discovers hypernym lemmas for entities using potentially noisy textual features derived from unstructured text. Categories have redundant patterns, which can be effectively exploited using simpler models. This has also been shown by Gupta et al. (2016), who use simple high-precision heuristics based on the lexical head of categories to achieve significant improvements over MultiWiBi for English. Additionally, for taxonomy induction in other languages, MultiWiBi uses a probabilistic translation table, which is likely to introduce further noise. The high-precision heuristics of Gupta et al. (2016) are not easily extensible to languages other than English, due to the requirement of a syntactic parser for lexical head detection. In contrast, our approach learns such features from automatically generated training data, hence resulting in high-precision, high-coverage taxonomies for all Wikipedia languages. 6 Conclusion In this paper, we presented a novel approach towards multilingual taxonomy induction from Wikipedia. Unlike previous approaches which are complex and heuristic-heavy, our approach is simpler, principled and easy to replicate. Taxonomies induced using our approach outperform the state of the art on both edge-level and path-level metrics across multiple languages. Our approach also provides a parameter for controlling the trade-off between precision and branching factor of the induced taxonomies. A key outcome of this work is the release of our taxonomies across 280 languages, which are significantly more accurate than the state of the art and provide higher coverage. References Auer, S.; Bizer, C.; Kobilarov, G.; Lehmann, J.; Cyganiak, R.; and Ives, Z. G. 2007. Dbpedia: A nucleus for a web of open data. In The Semantic Web, 6th International Semantic Web Conference, 2nd Asian Semantic Web Conference, ISWC 2007 + ASWC 2007, Busan, Korea, November 11-15, 2007., 722–735. Biemann, C. 2005. Ontology learning from text: A survey of methods. LDV Forum 20(2):75–93. de Melo, G., and Weikum, G. 2010. MENTA: inducing multilingual taxonomies from wikipedia. In Proceedings of the 19th ACM Conference on Information and Knowledge Management, CIKM 2010, Toronto, Ontario, Canada, October 26-30, 2010, 1099–1108. Flati, T.; Vannella, D.; Pasini, T.; and Navigli, R. 2016. Multiwibi: The multilingual wikipedia bitaxonomy project. Artif. Intell. 241:66–102. Grave, E.; Mikolov, T.; Joulin, A.; and Bojanowski, P. 2017. Bag of tricks for efficient text classification. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics, EACL 2017, Valencia, Spain, April 3-7, 2017, Volume 2: Short Papers, 427–431. Gupta, A.; Piccinno, F.; Kozhevnikov, M.; Pasca, M.; and Pighin, D. 2016. Revisiting taxonomy induction over wikipedia. In COLING 2016, 26th International Conference on Computational Linguistics, Proceedings of the Conference: Technical Papers, December 11-16, 2016, Osaka, Japan, 2300–2309. Hochreiter, S., and Schmidhuber, J. 1997. Long short-term memory. Neural Computation 9(8):1735–1780. Hoffart, J.; Suchanek, F. M.; Berberich, K.; and Weikum, G. 2013. YAGO2: A spatially and temporally enhanced knowledge base from wikipedia. Artif. Intell. 194:28–61. Hovy, E. H.; Navigli, R.; and Ponzetto, S. P. 2013. Collaboratively built semi-structured content and artificial intelligence: The story so far. Artif. Intell. 194:2–27. Kim, Y. 2014. Convolutional neural networks for sentence classification. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing, EMNLP 2014, 1746–1751. Kingma, D. P., and Ba, J. 2014. Adam: A method for stochastic optimization. CoRR abs/1412.6980. Lehmann, J.; Isele, R.; Jakob, M.; Jentzsch, A.; Kontokostas, D.; Mendes, P. N.; Hellmann, S.; Morsey, M.; van Kleef, P.; Auer, S.; and Bizer, C. 2015. Dbpedia - A large-scale, multilingual knowledge base extracted from wikipedia. Semantic Web 6(2):167–195. Mahdisoltani, F.; Biega, J.; and Suchanek, F. M. 2015. YAGO3: A knowledge base from multilingual wikipedias. In CIDR 2015, Seventh Biennial Conference on Innovative Data Systems Research, Asilomar, CA, USA, January 4-7, 2015, Online Proceedings. Miller, G. A. 1994. WORDNET: A lexical database for english. In Human Language Technology, Proceedings of a Workshop held at Plainsboro, New Jerey, USA, March 8-11, 1994. Nastase, V.; Strube, M.; Boerschinger, B.; Zirn, C.; and Elghafari, A. 2010. Wikinet: A very large scale multi-lingual concept network. In Proceedings of the International Conference on Language Resources and Evaluation, LREC 2010, 17-23 May 2010, Valletta, Malta. Ponzetto, S. P., and Strube, M. 2008. Wikitaxonomy: A large scale knowledge resource. In ECAI 2008 - 18th European Conference on Artificial Intelligence, Patras, Greece, July 21-25, 2008, Proceedings, 751–752. Remy, M. 2002. Wikipedia: The free encyclopedia. Online Information Review 26(6):434. Suchanek, F. M.; Kasneci, G.; and Weikum, G. 2007. Yago: a core of semantic knowledge. In Proceedings of the 16th International Conference on World Wide Web, WWW 2007, Banff, Alberta, Canada, May 8-12, 2007, 697–706. Velardi, P.; Faralli, S.; and Navigli, R. 2013. Ontolearn reloaded: A graph-based algorithm for taxonomy induction. Computational Linguistics 39(3):665–707. Wikipedia. 2017. List of wikipedias — wikipedia, the free encyclopedia. https://en.wikipedia.org/ w/index.php?title=List\_of\_Wikipedias\ &oldid773693902. [Online; accessed 9-April-2017]. Zhang, X.; Zhao, J. J.; and LeCun, Y. 2015. Characterlevel convolutional networks for text classification. In Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, 649–657.
2cs.AI
Saccade Sequence Prediction: Beyond Static Saliency Maps arXiv:1711.10959v1 [cs.CV] 29 Nov 2017 Calden Wloka Department of Electrical Engineering and Computer Science York University, Toronto, Canada [email protected] Iuliia Kotseruba Department of Electrical Engineering and Computer Science York University, Toronto, Canada yulia [email protected] John K. Tsotsos Department of Electrical Engineering and Computer Science York University, Toronto, Canada [email protected] Abstract Visual attention is a field with a considerable history, with eye movement control and prediction forming an important subfield. Fixation modeling in the past decades has been largely dominated computationally by a number of highly influential bottom-up saliency models, such as the Itti-Koch-Niebur model. The accuracy of such models has dramatically increased recently due to deep learning. However, on static images the emphasis of these models has largely been based on non-ordered prediction of fixations through a saliency map. Very few implemented models can generate temporally ordered human-like sequences of saccades beyond an initial fixation point. Towards addressing these shortcomings we present STAR-FC, a novel multi-saccade generator based on a central/peripheral integration of deep learning-based saliency and lower-level featurebased saliency. We have evaluated our model using the CAT2000 database, successfully predicting human patterns of fixation with equivalent accuracy and quality compared to what can be achieved by using one human sequence to predict another. This is a significant improvement over fixation sequences predicted by state-of-the-art saliency algorithms. 1. Introduction Most applications in computer vision function primarily in a passive way; algorithms are applied to static images or prerecorded video sequences without control over what visual data is acquired next. However, it has long been recognized that eye movements are an integral aspect to human vision [31], with diverse functionality ranging from the enhanced extraction of features via microsaccadic motion [33] through high-level strategies for optimal information gathering [43]. It is this latter aspect which is of particular interest to the field of computer vision; active control over the acquisition of image data is fundamental to efficiently developing more robust and general computer vision solutions for unconstrained environments [53, 4]. Our work presented here develops and extends the Selective Tuning Attentive Reference model Fixation Controller (STAR-FC): an explicit model of human saccadic control [54]. In order to more easily compare with prior efforts in fixation prediction, we concentrate on the free-viewing paradigm, but nevertheless specify our control network in a manner which provides explicit extensibility for task-based tuning and top-down attentional control. By providing an extensive model of human fixation control which includes a number of aspects normally neglected by the saliency literature, including an explicit transform to account for anisotropic retinal acuity, we are able to produce explicit fixation sequences with greater 1 Object/007.jpg human fix closest to SALICON human fix closest to STAR-FC SALICON (372) STAR-FC (203) After 3 fixations After 5 fixations Figure 1: An example image from the CAT2000 dataset with overlaid fixation sequences. We show sequences predicted by our STAR-FC model (green) and SALICON (red), along with the human sequence which best matches STAR-FC (solid blue with x’s) and which best matches SALICON (dashed blue with o’s). Euclidean distances between each model and its closest human sequences after five fixations are noted in parentheses of in the legend. fidelity to those of humans than is seen by traditional saliency approaches (see Figure 1 for an example, or Appendix E for more). Altogether, we offer the following contributions: • A novel computational fixation model which outperforms traditional saliency map models for explicit sequences prediction. • A descriptive model of fixation control which may be used to better explore the function of early human attention. • A flexible design which may be parametrically tuned to match the specific experimental conditions under which eye tracking data is obtained. 1.1. Background Eye movement control and early visual attention have frequently been conflated, particularly within the computational saliency literature. The term ”saliency map” was coined in [29] in the context of covert, pre-attentive visual processing. Due to the significant challenge of obtaining a suitable source of ground-truth data with which to validate a map of pre-attentive processing, focus shifted to predicting fixation locations [27]. Since then, many saliency algorithms have been proposed, ranging from information theoretic principles [9], efficient coding [19], spectral analysis [24], or processing pipelines driven largely by empirical performance [47], to name a few. One of the earliest machine learning efforts used a collection of low-, mid-, and high-level features as inputs to an SVM classifier in order to classify pixels as either salient or not [28]. More recently, however, deep learning networks have come to dominate the field [25, 34, 32, 39]. One schism which has formed within saliency research is whether the focus should be on locations or objects. Much of this split originated from the claim of Einhäuser et al. [14] that objects themselves actually predict fixations better than feature-based pixel saliency. This led to a number of approaches including those which seek to generate saliency maps based on class-generic object detectors (e.g. [3] and subsequent extensions to saliency [11]) and those which train and test saliency algorithms explicitly using object masks rather than fixation data (e.g., [38]). However, there has been push-back against this object-centric view, with Borji et al. [7] arguing that the original findings of Einhäuser et al. were based largely on the metric used to measure performance. Given the focus of this paper on the explicit generation of saccade sequences, we test our algorithm performance against fixation data rather than object masks, but do take the view that there is a balance to be struck between pixel-level feature effects and higher-level object detection. This is discussed further in Section 2.1. While our goal differs from the standard manner in which saliency algorithms are applied and evaluated, we compare performance against them in order to emphasize the importance of our novel perspective. Static saliency maps have previously been used to generate explicit fixation sequences, such as Itti and Koch’s [26] search system which couples Winner-TakeAll (WTA) selection to a simple inhibition of return scheme. The connection between explicit eye movement patterns and saliency maps was explored from a different direction by [51], in which a saliency algorithm independent of the visual input was based on statistical regularities in eye movements. Despite the lack of visual processing, it nevertheless demonstrated comparable or better performance than the Itti-Koch-Niebur (IKN) saliency model [27], suggesting that fixation location may be driven as much by the underlying motor control of the eye as it is by visual information. Outside of the saliency literature there are a number of eye movement control models. However, such models are usually dedicated to a specific subset of eye movements (such as smooth pursuit [45], the optokinetic reflex [13], or 3D gaze shifts [12]) or neural component (such as the role of the superior colliculus [58], cerebellum [41] or the basal ganglia [56]) without a clear path of extension or inclusion of attentional control. Tsotsos et al. [54] provide a more general formulation of attentional control with a focus on saccadic sequences. Nevertheless, the implementation of their model provides only a largely qualitative demonstration of efficacy over a single image. We build upon the theoretical formulation laid out by [54], extending the architecture to function over a broad range of natural images which allows for a quantitative analysis of performance. See Section 2.1 for a more thorough description of our model. 1.2. Applications of Fixation Prediction Early interest in saccadic sequences was heavily influenced by Noton and Stark’s scanpath theory [44], which posited that the explicit spatiotemporal structure of eye movements drove memory encoding for visual patterns and subsequent retrieval. However, challenges to this view have arisen over the years, with experimental evidence showing that there is no recognition advantage conferred by the use of one’s own fixation locations versus those of another viewer nor by the retention of the temporal order of fixation [17]. These results certainly support the traditional approach to saliency evaluation which predominantly seeks to evaluate algorithms on prediction effectiveness over a static ground-truth fixation cloud, disregarding individual source and temporal characteristics of the fixations. However, scanpath theory was largely devoted to the memory encoding and recall of images. Even if visual memory is not heavily influenced by scanpaths, there are nevertheless a number of applications for which explicit fixation sequence modeling and prediction is very valuable. For example, motivated by the very short window of consumer attention to most advertisements, commercial applications of saliency analysis already include predicted sequences of the first several fixations [2], despite validation using only traditional ROC methods which do not measure the efficacy of sequence prediction [1]. Understanding fixation locations has also gained recent interest in the area of science communication and policy making, particularly for graphical figures [23]. Even more so than in advertising, the sequence of fixations over a graphical figure becomes important for understanding whether and how viewers are understanding the information contained. As previously mentioned, understanding the control of human eye movements may additionally be highly instructive in robotic visual systems with active camera control such as robotic search [46]. This is particularly useful for applications with anisotropic sensors which could be considered analogous to the anisotropy present within the human retina, such as omnidirectional camera systems which introduce a high degree of spatial distortion unevenly across the visual field [20] or a two-camera visual input system which combines high- and low-resolution streams to effectively maintain a wide field of view without sacrificing the ability to acquire high acuity detail over a targeted region [15]. Furthermore, as robotic applications increase their focus on social interactions, it becomes important not only to accurately attend to relevant information during an interaction, but also to provide socially important cues through body language such as gaze location [40]. Robotic modelling of joint attention has previously been improved through the application of saliency [61], and can likely be further improved with a more complete gaze model. Accurate modelling of joint attention between parties has wide reaching ramifications, from self-driving vehicles [30] to the handover of physical objects [42]. 2. Methods 2.1. System Architecture Our gaze control model extends and generalizes the approach initially taken by Tsotsos et al. [54]. Their original implementation provided much of the theoretical basis for the design of our model, but was only qualitatively tested against the seminal eye tracking work of Yarbus [60]. Without compromising the theoretical motivations of the previous work, we have modified the network structure to generalize across natural images and thereby allow quantitative testing of the model performance. Figure 3 provides a schematic of our implementation. The primary motivation of our architecture is to construct a set of interactive modules which introduce an iterative temporal component to fixation prediction (i.e. an active approach to perception). When humans visually explore an image, each fixation is made in the context of the prior fixations, introducing a confounding difficulty for any static map attempting to predict fixation locations passively. Although it has long been pointed out that saliency maps predict fixations with differing efficacy over time [50], static maps predicting a probabilistic distribution of the likelihood of any particular region being fixated remain standard practice in saliency research [36, 25, 35]. In order to better simulate the temporal dependence of fixation order, STAR-FC processes an input image iteratively through a chain of interacting modules: 1. Retinal transform: Based on the cone distribution from [21] and rod distribution from [57], we recreate the acuity (a) Original image without retinal transform (b) Fixated figure with retinal transform Figure 2: An example of the retinal transform. The figure on the left shows the original input image, and the figure on the right shows the appearance of that image when fixated in the lower left location (marked with a red ‘X’) Figure 3: STAR-FC system architecture: Input images are first centrally fixated. A retinal transform is applied at the current fixation, and conspicuity is calculated within two streams: a peripheral stream which is dominated by low-level features, and a central stream which includes high-level and abstract features such as those learned by deep networks. The peripheral and central streams are then fused into a conspicuity map. The priority map combines the conspicuity map and input from a history map of all previous fixations (as well as any task-specific biases not further detailed here), providing an Inhibition of Return (IOR) mechanism. The next fixation point is selected from the maximum of the priority map, at which point the fixation is shifted to this new target location and the network repeats. field of the human eye through anisotropic blurring centered on the current fixation point. Each pixel in the image is sampled from the appropriate level of a Gaussian pyramid depending on the distance from fixation, increasing blur with distance from fixation (see Figure 2 for an example). Further details are provided in the Appendix A. 2. Central-peripheral split: To represent the different levels of cortical representation devoted to central versus peripheral processing, we split the image into two processing streams. Peripheral attentional capture is heavily dependent on low-level features, whereas central attentional capture is allocated at a higher level abstraction and tends to be more object-based (see [54] for justification). In the proposed architecture this is achieved by using a bottom-up algorithm based on low-level features (e.g. AIM [8], BMS [62], etc.) in the peripheral field and applying a CNN-based bottomup saliency algorithm such as SALICON in the central field. The radius of the central attentional field is set to 12.5 degrees. 3. Conspicuity map: The central and peripheral processing streams are recombined into a single map correspond to the original covert definition of a saliency map [29]. Since there is no standard procedure for performing this integration, we experimented with three strategies (subsequently labeled in the text as STAR-FC SAR, STAR-FC MCA, and STAR-FC WCA): (a) Separate Activation Regions (SAR): A binary mask was applied to both the peripheral and central attentional maps to confine activations to only their respective fields. A narrow overlap region is included within which the maximum value of either the peripheral or central activation is retained (as originally proposed in [54]). (b) Maximum Central Activation (MCA): The central attentional map is masked as in SAR, but no mask is applied to the peripheral map. Instead, the entire central region of the conspicuity map is equal to the maximum activation of either the peripheral or central maps. (c) Weighted Central Activation (WCA): The peripheral and central attentional maps are combined as follows: ( r rc −rp Cij + rpc P ij, if rp < rc rc CMij = rp −rc (1 + rmax −rc )[1 − gp ]Pij , otherwise (1) where CMij is the conspicuity map value at pixel (i, j), C and P are the central and peripheral maps, respectively, rc refers to the radius of the central field in pixels, rp is the distance to the center in pixels and rmax is the maximum distance from the center in pixels. Here, an optional peripheral gain factor gp is introduced to increase the importance of peripheral features most affected by the retinal transform. 4. Priority map: This combines the bottom-up activity of the conspicuity map with top-down spatial modulation. In our experiments this map only includes an inhibition of return (IOR) mechanism due to our focus on free-viewing. However, it could potentially be extended to incorporate other forms of modulation. 5. Fixation history map: This processing layer stores a history of previously fixated locations in image coordinates. These locations are inhibited with a circular zone of inhibition. Following [54] the radius of IOR is set to 1.5 degrees with suppression being maximal at the point of previous fixation and linearly decreasing towards the edge. IOR decays linearly within 100 fixations. In this paper IOR is applied by subtracting the fixation history map from the priority map. 6. Saccade control: This module is responsible for finding a new target within the priority map using a WTA scheme, shifting the gaze to a new location (by re-applying the retinal transform centered on the new fixation coordinates), as well as updating the fixation history map. As mentioned, our work has been heavily influenced by the proposed control architecture in [54], but makes a number of important modifications and extensions. The original approach utilizes manually-derived face filters in the central field, specific to the single test image used for illustration. In order to generalize performance across natural images, we remove the custom face filters and instead incorporate, as part of the central field, a deep convolutional neural network (CNN), namely the SALICON saliency detection model [25]. In our implementation we use a C++ conversion of the OpenSALICON [52]. Our choice of using a CNN-based saliency algorithm is motivated by the idea that such saliency models can be viewed as processing incoming visual information analogous to a full forward pass through the visual hierarchy in order to produce high-level feature abstraction and object-based conspicuity allocation [37]. This is consistent with the theoretical aims of the central field put forth in [54]. SALICON was specifically chosen due to the availability of an open-source implementation, but our formulation is agnostic to the specific saliency representations used in its construction. Furthermore, we experiment with several bottom-up saliency algorithms to demostrate the effect of using different lowlevel features for computing peripheral attentional maps. In addition to AIM, which was also used in [54], we tested BMS [62, 63] and VOCUS2 [18]. Despite the fact that BMS significantly outperforms AIM on the CAT2000 dataset using the traditional saliency metrics of the MIT Saliency Benchmark [10], when utilized in the peripheral component of STAR-FC both BMS and VOCUS2 achieve much worse fidelity to human fixation patterns than is achieved with AIM, leading us to focus most of our tests on optimizing the AIM-based architecture. Finally, we define two additional strategies for combining the central and peripheral attentional maps aiming to alleviate the sharp border between the central and peripheral fields. This allows our architecture to more smoothly transition its activity across the visual field. See Appendices B and D for further information on the different STAR-FC variants we tested. Although virtually any saliency algorithm can be used within the proposed architecture, both the choice of saliency algorithms for the central/peripheral fields and strategy for combining them have a dramatic effect on the produced fixation sequences. This will be discussed in more detail in Section 3. 2.2. Fixation Dataset We evaluated model performance over the CAT2000 dataset1 [6]. This dataset was chosen due to several positive attributes: it contains twenty different image categories (thereby representing a wide spectrum of visual stimuli), as well as one of the widest fields of view which we are aware of for a free-viewing eye tracking dataset (approximately 45◦ ). Larger fields of view better approximate natural scene exploration, and are also likely to be more greatly impacted by considerations of retinal anisotropy and motoric bias than a comparable dataset gathered over a narrow field of view. 2.3. Evaluation Metrics One major challenge in this work was determining the best method for evaluation. The output of our fixation control model is not directly comparable to that of saliency algorithms designed to predict human fixations, as we output a sparse set of explicitly predicted locations rather than a smooth map which can be treated as a probability distribution for likely fixation points over an image [36]. However, as mentioned in Section 1.2, there are applications for which an explicit sequence of fixation points is preferable to a probabilistic heat-map which lacks temporal structure. Given that the innovation of our work rests on providing an explicit, temporally ordered fixation sequence rather than on a novel representation of saliency, we focus on evaluation metrics which reflect the spatiotemporal structure of sequences. In order to compare against the static maps which are the standard output of saliency algorithms, we sampled fixation sequences from the maps by applying an iterative WTA procedure. IOR was applied to each selected location using the same parameters as those of our fixation control model. This technique is consistent with previous work which samples loci of attention from saliency maps [26]. Although saccade amplitude distributions provide a relatively coarse measure with which to compare fixation sequences (as there is no representation of positional differences over the visual field), they do provide a representation of the motoric bias in the prediction. An early criticism of saliency algorithms was that they fail to account for inherent motor biases in how humans move their eyes [51], and it has been suggested that this motor bias could implicitly contribute to the persistent challenge of center bias in saliency research [59]. We therefore examine this aspect of model function in Section 3.1, demonstrating a much more human-like distribution of saccade amplitude with our model than is found from the predictions of sampled from static saliency maps. To more explicitly explore the prediction performance of our model, we utilize trajectory-based scoring methods. These metrics focus on measuring the deviation between two spatiotemporal sequences. Trajectory comparison is a common problem in a wide range of fields, and can often rely on a number of different constraints or assumptions. Three common classifications of trajectory metrics are network-constrained, shape-based, and warping-based [5]. Network-constrained methods rely on an underlying path structure (such as a road network), and were therefore not appropriate for our purposes. However, both shape-based (which measure the spatial structure of trajectories) and warping-based (which take into account the temporal structure as well as the spatial) can provide meaningful insight for saccadic sequences, and we therefore utilized the following set in order to provide a comprehensive sense of performance (trajectory-based score results are found in Section 3.2): • Euclidean Distance (ED): ED is one of the most common and basic warping-based trajectory metrics, and is calculated by matching two sequences in temporal order and computing the average pairwise distance between corresponding fixation points. • Fréchet Distance (FD): FD is sometimes referred to as the ‘dog-walking distance’; it represents the maximum distance at any given point in time over the length of two trajectories. • Hausdorff Distance (HD): HD is the maximum distance of a point in one sequence to the nearest point in a second sequence. Unlike ED and FD, HD is purely spatial and does not take sequence order into account. 3. Results We compare the performance of our STAR-FC with a range of established saliency models: AIM [9], BMS [62], GBVS [22], LDS [16], SALICON [25, 52], SSR [48], and VOCUS2 [18]. For additional comparisons see Appendices B through D. 1 A number of fixations included in the individual sequences of observers for the CAT2000 dataset end up going outside the bounds of the image. In order to prevent spurious comparisons with out of bound fixations while still ensuring cohesive sequences, we groomed the CAT2000 data by truncating any sequence which went out of bounds to the final in-bounds fixation location. If this truncation left the sequence with fewer than ten total fixations, it was discarded completely. Of 36000 total recorded fixation sequences, this criterion led to the elimination of 6257 sequences. 0.6 human ground truth STAR-FC_MCA AIM BMS LDS VOCUS GBVS IKN SALICON 0.7 human ground truth STAR-FC_SAR STAR-FC_MCA STAR-FC_WCA 0.6 0.5 0.4 Proportion of fixations Proportion of fixations 0.5 0.4 0.3 0.3 0.2 0.2 0.1 0.1 0 <100 0 <100 200 300 400 500 600 700 800 900 >1000 Amplitude (px) 200 300 400 500 600 700 800 900 >1000 Amplitude (px) (a) STAR-FC variants compared to humans (b) Traditional saliency algorithms, STAR-FC, and human distributions Figure 4: A graphical depiction of the saccadic amplitude distributions over the CAT2000 dataset. Saccade lengths were assigned to bins of pixel ranges and the proportion of saccades falling in each bin are shown in the figures. Figure (a.) shows the effect of the different STAR-FC configurations on the resultant saccadic amplitude distribution (contrasted with the human distribution shown with a dashed line) Figure (b.) shows the distributions of a selection of traditional saliency algorithms contrasted with the MCA variant of STAR-FC and the human distribution. (a) Human (MSE Score) (b) STAR-FC, (0.002) (c) LDS, (0.027) (d) GBVS, (0.072) (e) SALICON, (0.122) Figure 5: 2D histograms of fixation locations over the CAT2000 dataset. Mean-squared-error (MSE) scores between model and human distributions are shown in parentheses under each model name; as can be seen, STAR-FC is an order of magnitude closer to the human distribution than the closest competing saliency model. 3.1. Spatial Distributions Saccadic amplitude distributions are shown in Figure 4. As can be seen in Figure 4a, the original central-peripheral integration strategy of Separate Activation Regions (SAR) used in [54] has a tendency to create a bimodal distribution not seen in the human data. This is likely due to the fact that the retinal anisotropy creates a biased gradient to the output of both the central and peripheral fields, meaning that near the border of the two the central field is weakest and the peripheral field is strongest. In order to facilitate a smoother transition of activation across the visual field, we tested two other integration strategies (described in Section 2.1): Maximum Central Activation (MCA) and Weighted Central Activation (WCA). Our motivation to allow for the low-level feature representation of the peripheral map to affect the central region but not the other way around is based on the fact that there do appear to be fundamental perceptual limitations in object perception and feature binding within peripheral vision [49], whereas low-level features do seem to have a persistent role in attentional guidance [37]. Despite blending peripheral and central activations in a smoothly merging fashion, the WCA strategy leads to an activation pattern remarkably similar to the original SAR strategy. This is likely due to the fact that a weighted blending will usually lead to penalizing the chances of both algorithms within the mid-central region to attract attention unless they both happen to achieve a high score, essentially requiring a target to attract both high and low level attention simultaneously. The closest distribution pattern to that of humans was achieved by the MCA integration strategy, and it is therefore the variant reported in Figure 7 and Table 1. Although it does match the human distribution more closely than WCA and SAR variants, MCA appears to over-emphasize short saccades, having a much shallower tail than seen in the distribution of human observers. As previously mentioned, one likely contribution to this over-emphasis is the difficulty of many algorithms which have not been explicitly designed or trained to deal with signal degradation to function effectively across the retinal transform. In contrast to the STAR-FC amplitude distributions, virtually all static saliency maps are skewed in the opposite direction with distributions which are much flatter than those seen with human data. Many algorithms do retain a small preference for shorter saccades, but this could also be an outcome of compositional bias in the underlying images. 2D histograms of fixation location produced with 64 × 64 sized blocks across the full CAT2000 dataset are shown for humans along with the MCA variant of STAR-FC as well as several representative saliency algorithms in Figure 5. As can be seen, there does appear to be a consistent spatial bias toward the center of the image which, at least in part, likely represents the underlying composition of the dataset images. Likewise, the saliency algorithms with the closest spatial distribution to the human distribution do tend to have a greater propensity for shorter saccades (as seen in Figure 4). 3.2. Trajectory Scores ×10 4 1.8 600 Euclidean (ED) Hausdorff (HD) Frechet (FD) 1.6 550 mean distance 1.4 500 distance (px) 450 400 1.2 1 350 0.8 300 Euclidean (ED) Hausdorff (HD) Frechet (FD) 200 150 2 5 8 11 14 17 20 23 26 29 A Af ctio fe n ct iv e Bl ac kW Ar t C hite ar to o Fr n ac In tal In doo ve r r Li Ju ted Lo neD mb w ra led R w es in ol g ut io O n ut N do or O oisy O M b ut a je do nM c or a t N de at ur Pa al R tter an n d Sa om te l Sk ite et c So h ci al 0.6 250 image categories length of fixation sequence (a) Average scores with sequence length (b) Average total sequence score by category Figure 6: Average scores computed for all metrics over pair-wise matches of human sequences. As can be seen in (a.), as sequence length increases observer agreement tends to diverge, leading to a saturation in score values for each metric. Figure (b.) shows average sequence score per category, showing agreement with [6] about which categories tend to have greatest inter-observer consistency. 800 800 650 human STAR-FC_MCA AIM BMS GBVS LDS SALICON SSR VOCUS2 center 600 700 700 500 400 distance (px) 500 450 Hausdor Euclidean distance (px) Frechet distance (px) 550 600 400 350 600 500 400 300 250 300 300 200 200 150 2 3 4 number of fixations (a) Mean FD 5 200 2 3 4 number of fixations (b) Mean ED 5 2 3 4 5 number of fixations (c) Mean HD Figure 7: A comparison of fixation prediction scores for static saliency maps and STAR-FC. A sequence formed by always picking the center pixel is shown in a dashed line to provide a performance baseline. Figure 6 shows the results of computing pair-wise scores across all combinations of human sequences for each image from the CAT2000 dataset. Figure 6a shows that the different trajectory metrics all tend to drift toward a saturated value; ED, FD, and HD all get larger as sequences diverge through time. Additionally, it has been shown that saliency tends to correlate best with early fixations [50], and both saliency correlation and inter-observer consistency degrade largely after the first five fixations. We therefore restrict our analysis to only this interval. Analysis of the full sequences may be found in Appendix D. Figure 6b shows the category-wise average total sequence scores per category. Here we can see that the trajectory metrics largely agree with the analysis done by Borji and Itti [6] on which categories have the greatest inter-observer consistency (such as Sketch, Low Resolution, and Black and White), and which categories tend to have poor inter-observer consistency (such as Satellite, Jumbled, and Cartoon). Model Human STAR-FC LDS GBVS BMS SALICON AIM VOCUS2 SSR center AUC ED 632 630 762 1068 1253 1281 1313 1347 1557 1875 AUC HD 844 841 918 1239 1447 1471 1525 1551 1755 2156 AUC FD 1004 1006 1067 1415 1629 1680 1758 1781 1966 2156 MSE 0 0.002 0.027 0.072 0.102 0.122 0.161 0.183 0.183 0.008 Table 1: Algorithm performance. Area-under-the-curve (AUC) scores are reported over the first five fixations for each plot in Figure 7. The last column shows the mean-square-error for the spatial histogram of predicted fixations versus the distribution of human fixations over the entire dataset. Note that our model (in bold) matches the inter-subject error of human observers. We compare STAR-FC against a wide selection of saliency algorithms in Figure 7, showing that STAR-FC consistently achieves trajectory scores more in line with human sequences over the critical range of the earliest fixations, followed by LDS and GBVS (see Table 1 for numerical scores). In fact, STAR-FC is the only model which is able to achieve near-parity with the natural heterogeneity found within human observers across all three trajectory metrics employed. LDS, the best performing saliency algorithm, has 20.6% increased ED, 8.8% increased HD, and 6.3% increased FD, with all other saliency algorithms increasing in average distance from the human trajectories. As is made clear in Figure 5, human fixations over CAT2000 are strongly biased toward the center, a distribution which is well-matched by STAR-FC. The best performing saliency algorithms (LDS [16] and GBVS [22]) likewise have correspondingly stronger biases toward predicting fixations near the image center. We therefore also tested the ”center” model, which is simply a sequence which always selects the central pixel for every fixation. This selection will minimize the upper error bound for all trajectory metrics, and can be qualitatively thought of as a similar performance baseline to a centered Gaussian for more traditional saliency metrics [28]. Nevertheless, as Figure 7 shows, the center model consistently achieves the worst score in all metrics, confirming that while a centrally focused distribution of fixation locations is appropriate for the CAT2000 dataset, it is not a sufficient characteristic to score well. 4. Conclusion Our Fixation Control model provides a powerful tool for predicting explicit fixation sequences. demonstrating fidelity to human fixation patterns equivalent to that of using one person’s fixation sequence to predict another. This performance is significantly better than what can be achieved by sequence sampling from static saliency maps (see Table 1), as the STAR-FC model is the only fixation prediction method capable of achieving average trajectory scores on par with human inter-observer comparisons. STAR-FC will therefore allow improved performance in saliency applications relying on explicit fixation prediction, including for commercial [2] and science communication [23] purposes. In addition to its performance, our model is also constructed to provide a descriptive model of fixation control, allowing further research into the interaction of the different cognitive control architectures which link gaze to higher order visual cognition [55]. While it is clear that retinal anisotropy has a significant effect on human visual performance, very few computational algorithms are developed with the aim of dealing with anisotropic acuity. This creates a significant challenge to accurately detect and ascribe conspicuity values across the visual field, and our model’s incorporation of retinal anisotropy represents an interesting platform for exploring this area of research. Additionally, free-viewing over static images represents only a very narrow range of task for which fixation prediction provides valuable information. Fixation prediction over video and under task demands are highly challenging domains for which explicit fixation control may prove extremely valuable. References [1] 3M Commercial Graphics Division. 3M Visual Attention Service Validation Study, 2010. 3 [2] 3M Visual Attention Service. 3M White Van VAS Sample Report, 2015. Version 5.2. 3, 9 [3] B. Alexe, T. Deselaers, and V. Ferrari. What is an object? In CVPR, 2010. 2 [4] R. Bajcsy, Y. Aloimonos, and J. K. Tsotsos. Revisiting active perception. Autonomous Robots, 2017. 1 [5] P. Besse, B. Guillouet, J.-M. Loubes, and F. Royer. Review and perspective for distance based clustering of vehicle trajectories. IEEE Transactions on Intelligent Transportation Systems, 2016. 6 [6] A. Borji and L. Itti. Cat2000: A large scale fixation dataset for boosting saliency research. CVPR 2015 workshop on ”Future of Datasets”, 2015. arXiv preprint arXiv:1505.03581. 6, 8, 12 [7] A. Borji, D. N. Sihite, and L. Itti. Objects do not predict fixations better than early saliency: A re-analysis of Einhäuser et al.’s data. Journal of Vision, 13(10):18, 2013. 2 [8] N. D. Bruce and J. K. Tsotsos. Attention based on information maximization. Journal of Vision, 9(7), 2007. 4 [9] N. D. B. Bruce and J. K. Tsotsos. An information theoretic model of saliency and visual search. In E. R. L. Paletta, editor, International Workshop on Attention and Performance in Computer Vision (WAPCV), pages 171–183, 2007. 2, 6 [10] Z. Bylinskii, T. Judd, A. Borji, L. Itti, F. Durand, A. Oliva, and A. Torralba. Mit saliency benchmark. http://saliency.mit.edu/. 5 [11] K.-Y. Chang, T.-L. Liu, H.-T. Chen, and S.-H. Lai. Fusing generic objectness and visual saliency for salient object detection. In ICCV, 2011. 2 [12] J. Crawford and E. Klier. Neural control of three-dimensional gaze shifts. In S. P. Liversedge, I. D. Gilchrist, and S. Everling, editors, The Oxford Handbook of Eye Movements, pages 339–356. Oxford University Press, 2011. 3 [13] C. Distler and K.-P. Hoffmann. The optokinetic reflex. In S. P. Liversedge, I. D. Gilchrist, and S. Everling, editors, The Oxford Handbook of Eye Movements, pages 65–83. Oxford University Press, 2011. 3 [14] W. Einhäuser, M. Spain, and P. Perona. Objects predict fixations better than early saliency. Journal of Vision, 8(14):18, 2008. 2 [15] J. Elder, Y. Hou, R. Goldstein, and F. Dornaika. Attentive panoramic visual sensor, Oct. 31 2006. US Patent 7,130,490. 3 [16] S. Fang, J. Li, Y. Tian, T. Huang, and X. Chen. Learning discriminative subspaces on random contrasts for image saliency analysis. IEEE Transactions on Neural Networks and Learning Systems, 28(5):1095–1108, 2017. 6, 9 [17] T. Foulsham and A. Kingstone. Fixation-dependent memory for natural scenes: An experimental test of scanpath theory. Journal of Experimental Psychology: General, 142(1):41, 2013. 3 [18] S. Frintrop, T. Werner, and G. M. Garca. Traditional saliency reloaded: A good old model in new shape. In CVPR, 2015. 5, 6 [19] A. Garcia-Diaz, X. R. Fdez-Vidal, X. M. Pardo, and R. Dosil. Saliency from hierarchical adaptation through decorrelation and variance normalization. Image and Vision Computing, 30(1):51–64, 2012. 2 [20] J. Gaspar, N. Winters, and J. Santos-Victor. Vision-based navigation and environmental representations with an omnidirectional camera. IEEE Transactions on Robotics and Automation, 16(6):890–898, 2000. 3 [21] W. S. Geisler and J. S. Perry. Real-time foveated multiresolution system for low-bandwidth video communication. In Proc. SPIE, volume 3299, pages 294–305, 1998. 3, 12 [22] J. Harel, C. Koch, and P. Perona. Graph-based visual saliency. In NIPS, volume 19, pages 545–552, 2007. 6, 9 [23] J. Harold, I. Lorenzoni, T. F. Shipley, and K. R. Coventry. Cognitive and psychological science insights to improve climate change data visualization. Nature Climate Change, 6(12):1080–1089, 2016. 3, 9 [24] X. Hou, J. Harel, and C. Koch. Image signature: Highlighting sparse salient regions. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 34:194–201, 2012. 2 [25] X. Huang, C. Shen, X. Boix, and Q. Zhao. SALICON: Reducing the semantic gap in saliency prediction by adapting deep neural networks. In ICCV, 2015. 2, 3, 5, 6 [26] L. Itti and C. Koch. A saliency-based search mechanism for overt and covert shifts of visual attention. Vision Research, 40:1489–1506, 2000. 2, 6 [27] L. Itti, C. Koch, and E. Niebur. A model of saliency-based visual attention for rapid scene analysis. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 20:1254–1259, 1998. 2 [28] T. Judd, K. Ehinger, F. Durand, and A. Torralba. Learning to predict where humans look. In ICCV, 2009. 2, 9 [29] C. Koch and S. Ullman. Shifts in selective visual attention: towards the underlying neural circuitry. Human Neurobiology, 4:219–227, 1985. 2, 4 [30] I. Kotseruba, A. Rasouli, and J. K. Tsotsos. Joint attention in autonomous driving (JAAD). CoRR, abs/1609.04741, 2016. 3 [31] E. Kowler. Eye movements: The past 25 years. Vision Research, 51:1457–1483, 2011. 1 [32] S. S. Kruthiventi, K. Ayush, and R. V. Babu. DeepFix: A fully convolutional neural network for predicting human eye fixations. IEEE Transactions on Image Processing, 2017. 2 [33] X. Kuang, M. Poletti, J. D. Victor, and M. Rucci. Temporal encoding of spatial information during active visual fixation. Current Biology, 22(6):510 – 514, 2012. 1 [34] M. Kümmerer, L. Theis, and M. Bethge. Deep Gaze I: Boosting saliency prediction with feature maps trained on ImageNet. In ICLR Workshop, 2015. 2 [35] M. Kümmerer, T. S. Wallis, and M. Bethge. DeepGaze II: Reading fixations from deep features trained on object recognition. arXiv preprint arXiv:1610.01563, 2016. 3 [36] M. Kümmerer, T. S. A. Wallis, and M. Bethge. Information-theoretic model comparison unifies saliency metrics. PNAS, 112(52):16054–16059, 2015. 3, 6 [37] M. Kümmerer, T. S. A. Wallis, L. A. Gatys, and M. Bethge. Understanding low- and high-level contributions to fixation prediction. In ICCV, 2017. 5, 7 [38] G. Li and Y. Yu. Deep contrast learning for salient object detection. In CVPR, 2016. 2 [39] N. Liu, J. Han, D. Zhang, S. Wen, and T. Liu. Predicting eye fixations using convolutional neural networks. In CVPR, 2015. 2 [40] N. Mavridis. Grounded situation models for situated conversational assistants. PhD thesis, Massachusetts Institute of Technology, 2007. 3 [41] F. Miles. The cerebellum. In R. Carpenter, editor, Eye Movements, pages 224–243. CRC Press, 1991. 3 [42] A. Moon, D. M. Troniak, B. Gleeson, M. K. Pan, M. Zheng, B. A. Blumer, K. MacLean, and E. A. Croft. Meet me where I’m gazing: How shared attention gaze affects human-robot handover timing. In Proceedings of the ACM/IEEE International Conference on Human-robot Interaction, 2014. 3 [43] J. Najemnik and W. S. Geisler. Optimal eye movmement strategies in visual search. Nature, 434:387–391, 2005. 1 [44] D. Noton and L. Stark. Scanpaths in eye movements during pattern perception. Science, 171(3968):308–311, 1971. 3 [45] J. Pola and H. J. Wyatt. Smooth pursuit: response characteristics, stimuli and mechanisms. In R. Carpenter, editor, Eye Movements, pages 138–157. CRC Press, 1991. 3 [46] A. Rasouli and J. K. Tsotsos. Visual saliency improves autonomous visual search. In Canadian Conference on Computer and Robot Vision (CRV), 2014. 3 [47] N. Riche, M. Mancas, B. Gosselin, and T. Dutoit. RARE: A new bottom-up saliency model. In IEEE International Conference on Image Processing (ICIP), pages 641–644, 2012. 2 [48] H. J. Seo and P. Milanfar. Static and space-time visual saliency detection by self-resemblance. Journal of vision, 9(12):15–15, 2009. 6 [49] H. Strasburger, I. Rentschler, and M. Jüttner. Peripheral vision and pattern recognition: A review. Journal of Vision, 11:1–82, 2011. 7 [50] B. W. Tatler, R. J. Baddeley, and I. D. Gilchrist. Visual correlates of fixation selection: effects of scale and time. Vision Research, 45:643–659, 2005. 3, 8 [51] B. W. Tatler and B. T. Vincent. The prominence of behavioural biases in eye guidance. Visual Cognition, 17:1029–1054, 2009. 2, 6 [52] C. L. Thomas. Opensalicon: An open source implementation of the salicon saliency model. Technical Report TR-2016-02, University of Pittsburgh, 2016. 5, 6 [53] J. K. Tsotsos. On the relative complexity of active vs. passive visual search. International Journal of Computer Vision, 7(2):127–141, 1992. 1 [54] J. K. Tsotsos, I. Kotseruba, and C. Wloka. A focus on selection for fixation. Journal of Eye Movement Research, 9:1–34, 2016. 1, 3, 4, 5, 7, 11, 12 [55] J. K. Tsotsos and W. Kruijne. Cognitive programs: Software for attention’s executive. Frontiers in Psychology, 5(1260), 2014. 9 [56] C. Vokoun, S. Mahamed, and M. Basso. Saccadic eye movements and the basal ganglia. In S. P. Liversedge, I. D. Gilchrist, and S. Everling, editors, The Oxford Handbook of Eye Movements, pages 215–234. Oxford University Press, 2011. 3 [57] A. B. Watson. A formula for human retinal ganglion cell receptive field density as a function of visual field location. Journal of Vision, 14(7):1–17, 2014. 3, 12 [58] B. White and D. Munoz. The superior colliculus. In S. P. Liversedge, I. D. Gilchrist, and S. Everling, editors, The Oxford Handbook of Eye Movements, pages 195–214. Oxford University Press, 2011. 3 [59] C. Wloka and J. Tsotsos. Spatially binned roc: A comprehensive saliency metric. In CVPR, 2016. 6 [60] A. L. Yarbus. Eye Movements and Vision. Plenum Press, 1967. 3 [61] Z. Ycel, A. Salah, C. Mericli, T. Mericli, R. Valenti, and T. Gevers. Joint attention by gaze interpolation and saliency. IEEE Transactions on Cybernetics, 43(3):829–842, 2013. 3 [62] J. Zhang and S. Sclaroff. Saliency detection: A Boolean map approach. In ICCV, 2013. 4, 5, 6 [63] J. Zhang and S. Stan. Exploiting surroundedness for saliency detection: A Boolean map approach. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 5(38):889–902, 2016. 5 Appendix A. Retinal Transform Our implementation follows the same steps as outlined in [54] with few minor changes. In particular, we refitted the generalized Gamma distribution to better adjust with respect to viewing parameters and reimplemented the interpolation function in CUDA. As with most foveation algorithms, our approach starts by building a Gaussian pyramid and then for each pixel the appropriate level of the pyramid is sampled depending on how far the pixel is from the current gaze point. The level of the pyramid to sample from is computed as follows Lx,y = π 180 (atan((Drad + dotpitch) D1view ) − atan((Drad − dotpitch) D1view )) 1 ) (2 (α ∗ (EC + 2 ))). ∗ log( CT 0 (2) where Drad is the radial distance between the point (x, y) and the current gaze point, EC is the eccentricity from the fovea center for point (x, y) in degrees, dotpitch is the size of the pixel of the monitor in meters and Dview refers to the viewing distance. α, 2 and CT0 are constants from [21]. In this equation the numerator represents the maximum spatial frequency that can be represented at the given distance from the current gaze point and the denominator is the maximum spatial resolution that can be resolved by the eye. However, [21] concentrated on cone vision. For a more complete and biologically consistent results we also provide the option of augmenting the cone model with rod vision following [54] using the generalized Gamma distribution as proposed in [57]. Since in [57] cell counts were used to fit a distribution function, we adjust the parameters to convert it to the units that we use, namely the levels of a Gaussian pyramid. Therefore, we set the parameters of the generalized Gamma distribution as follows: α = 2.46, β = 121.8, γ = 0.77, σ = 861.27 and µ = −1. To find corresponding levels of the pyramid for each pixel we compute the generalized gamma distribution for EC and plug it into the equation (1) as the denominator. Due to the severe drop off of cones in the far periphery, the rods function is of greater impact the larger the field of view, but has relatively little impact over the eccentricities present in the CAT2000 dataset. Finally we compute the foveated image using a bi-cubic interpolation routine for 3D volumes to sample the required level of the pyramid for each pixel. Our code is a CUDA reimplementation of the ba interp3 function 2 . Note that we compute cone distribution for each color channel separately, but rod distribution only for the intensity channel (the image is first converted to YCrCb color space), since rods are achromatic. When including rods, we use a default proportion of contribution from the rods and cones functions of 30% and 70%, respectively, to the final transformed image. The viewing conditions in all our experiments match the experimental conditions reported for the CAT2000 dataset [6], namely all stimuli span 45 degrees and the viewing distance is set to 1.06 m. Appendix B. Saccade amplitudes Figure 8 shows plots of the fixation amplitudes that demonstrate the effect of using different saliency algorithms in the periphery and blending strategies. Both SAR and WCA blending strategies (Figure 8a and Figure 8c) lead to a pronounced spike in the distribution, which approximately corresponds to the diameter of the central field. MCA, on the other hand, produces a more even distribution of the amplitudes (Figure 8b). Figure 9 shows fixation amplitudes for all tested bottom-up saliency algorithms. Note that all of them greatly underestimate the number of short saccades (< 100 px) and generally have a much flatter fall off than the human ground truth distribution. 0.7 0.8 human ground truth STAR-FC_AIM_21infomax950_SAR STAR-FC_AIM_31infomax975_SAR STAR-FC_BMS_SAR STAR-FC_VOCUS_SAR 0.6 0.7 human ground truth STAR-FC_AIM_21infomax950_MCA STAR-FC_AIM_31infomax975_MCA STAR-FC_BMS_MCA STAR-FC_VOCUS_MCA 0.7 human ground truth STAR-FC_AIM_21infomax950_WCA STAR-FC_AIM_31infomax975_WCA STAR-FC_BMS_WCA STAR-FC_VOCUS_WCA 0.6 0.6 0.5 0.4 0.3 0.5 Proportion of fixations Proportion of fixations Proportion of fixations 0.5 0.4 0.3 0.2 0.4 0.3 0.2 0.2 0.1 0 <100 0.1 0.1 200 300 400 500 600 700 800 900 >1000 0 <100 200 300 400 500 600 700 800 900 >1000 0 <100 200 300 400 500 600 Amplitude (px) Amplitude (px) Amplitude (px) (a) SAR (b) MCA (c) WCA 700 800 900 >1000 Figure 8: Plots of fixation amplitudes demonstrating the effects of different strategies for combining peripheral and central fields of STAR-FC (SAR, MCA and WCA), and different bottom-up saliency algorithms in the peripheral field (AIM, VOCUS and BMS). Appendix C. 2D Histograms of Fixations Figure 10 shows 2D histograms of fixations for all saliency algorithms with MSE scores. 2 https://www.mathworks.com/matlabcentral/fileexchange/21702-3d-volume-interpolation-with-ba-interp3--fast-interp3-r 0.4 human ground truth AIM AWS BMS CAS FES GBVS IKN LDS RARE2012 SALICON SSR VOCUS 0.35 Proportion of fixations 0.3 0.25 0.2 0.15 0.1 0.05 0 <100 200 300 400 500 600 700 800 900 >1000 Amplitude (px) Figure 9: Fixation amplitudes for 12 state-of-the-art bottom-up saliency algorithms. Appendix D. Trajectory Scores Figure 11 and Figure 12 show trajectory scores for full sequence length for various STAR-FC variants and all tested saliencey algorithms. Note that as the sequences get longer they begin to diverge and the trajectory scores saturate. Figure 13 shows the AUC score for the first 5 fixations for all saliency algorithms and our best performing STAR-FC model (using AIM with 21infomax950 basis and MCA blending strategy) split by category. For human fixations we report the AUC for the average pairwise distance. As we noted in the paper, it correlates well with inter-observer consistency for different categories of images (e.g. high IO consistency for Sketch translates to a smaller average pairwise distances across all metrics, whereas the opposite is true for the Jumbled category). Note that saliency algorithms tend to follow the same trends as human inter-observer scores. In general, categories with high IO consistency such as Affective or Sketch are not as challenging as categories with lower human to human fixation consistency. One major exception is the Low Resolution category, which has a high degree of IO consistency but is nevertheless extremely challenging for all saliency algorithms. This calls for more investigation of the effects that blurring has on the quality of saliency prediction. Appendix E. Examples of Predicted Fixation Sequences Below we show some examples of predicted fixations. For clarity we only compare STAR-FC and one saliency algorithm at a time and show only the closest human sequences to each of the predicted sequences. Furthermore, we show results only for the first 3 and 5 fixations. We selected FES as the top performing contrast-based algorithm and SALICON as the (a) Human (MSE Score) (f) IKN (0.07) (b) STAR-FC, (0.002) (c) FES, (0.01) (d) LDS, (0.026) (e) CAS, (0.067) (g) GBVS, (0.07) (h) RARE2012, (0.09) (i) BMS, (0.102) (j) AWS, (0.104) (k) SALICON, (0.12) (l) AIM, (0.16) (m) SSR, (0.183) (n) VOCUS, (0.183) Figure 10: 2D histograms of fixation locations over the CAT2000 dataset for all tested bottom-up saliency algorithms. Meansquared-error (MSE) scores between model and human distributions are shown in parentheses under each model name. The algorithms are sorted by MSE in ascending order, starting with STAR-FC (AIM with 21infomax950 basis and MCA blending strategy), which is an order of magnitude closer to the human distribution than the best bottom-up algorithm (FES). top performing CNN-based algorithm for comparison with our best performing STAR-FC model (21infomax950 bases and MCA blending strategy). In Figure 14 examples from categories with high IO consistency (Affective and Low Resolution) are shown. Figure 15 shows examples from the Satelite category which has low IO consistency. 500 450 mean eucl distance 400 350 human STAR-FC_AIM_21infomax950_SAR STAR-FC_AIM_21infomax950_MCA STAR-FC_AIM_21infomax950_WCA STAR-FC_AIM_21jade950_MCA STAR-FC_AIM_21jade950_WCA STAR-FC_BMS_SAR STAR-FC_BMS_MCA STAR-FC_BMS_WCA STAR-FC_VOCUS_SAR STAR-FC_VOCUS_MCA STAR-FC_VOCUS_WCA 300 250 200 150 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 all number of fixations (a) Euclidean distance 500 mean hausdorff distance 450 400 350 human STAR-FC_AIM_21infomax950_SAR STAR-FC_AIM_21infomax950_MCA STAR-FC_AIM_21infomax950_WCA STAR-FC_AIM_21jade950_MCA STAR-FC_AIM_21jade950_WCA STAR-FC_BMS_SAR STAR-FC_BMS_MCA STAR-FC_BMS_WCA STAR-FC_VOCUS_SAR STAR-FC_VOCUS_MCA STAR-FC_VOCUS_WCA 300 250 200 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 all number of fixations (b) Hausdorff distance 700 650 mean discret_frechet distance 600 550 500 450 human STAR-FC_AIM_21infomax950_SAR STAR-FC_AIM_21infomax950_MCA STAR-FC_AIM_21infomax950_WCA STAR-FC_AIM_21jade950_MCA STAR-FC_AIM_21jade950_WCA STAR-FC_BMS_SAR STAR_FC_BMS_MCA STAR_FC_BMS_WCA STAR-FC_VOCUS_SAR STAR-FC_VOCUS_MCA STAR-FC_VOCUS_WCA 400 350 300 250 200 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 all number of fixations (c) Frechet distance Figure 11: A comparison of fixation prediction scores over the full length of the fixation sequences for variants of STAR-FC. 700 600 eucl 500 human STAR-FC AIM AWS BMS CAS FES GBVS IKN LDS RARE2012 SALICON SSR VOCUS center 400 300 200 100 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 all number of fixations (a) Euclidean distance 1100 1000 900 hausdorff 800 700 human STAR-FC AIM AWS BMS CAS FES GBVS IKN LDS RARE2012 SALICON SSR VOCUS center 600 500 400 300 200 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 all number of fixations (b) Hausdorff distance 1100 1000 900 discret_frechet 800 700 human STAR-FC AIM AWS BMS CAS FES GBVS IKN LDS RARE2012 SALICON SSR VOCUS center 600 500 400 300 200 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 all number of fixations (c) Frechet distance Figure 12: A comparison of fixation prediction scores over the full length of the fixation sequences for all tested saliency algorithms and the best performing STAR-FC model (using AIM with 21infomax950 basis in the peripheral field and MCA blending strategy). 2200 human STAR-FC AIM AWS BMS CAS FES GBVS IKN LDS RARE2012 SALICON SSR VOCUS 2000 1800 mean eucl distance 1600 1400 1200 1000 800 600 al ci So e et ch Sk lit Sa te rn an do m tte R ra l O O ut ut do do o rN Pa at u bj or M an es Lo w R Li ne D M ad e ec t sy oi O N io n ol ra w ut in g ed d bl rte Ju m In ve ta l do or In on ac Fr C Bl ac k ar to W hi te Ar t e iv ct Af fe Ac tio n 400 image categories (a) Euclidean distance 2400 human STAR-FC AIM AWS BMS CAS FES GBVS IKN LDS RARE2012 SALICON SSR VOCUS 2200 2000 mean hausdorff distance 1800 1600 1400 1200 1000 800 ch ci al So et Sk e lit te do m Sa an tte rn R at N or do M or R O ut O ut do Lo w Pa ur ad an M O es ol al e bj ec t sy N io ut oi n d w in g Li Bl ne D Ju ra m bl e d or ve rte In do l to on ac ta Fr In ac C ar kW hi te Ar iv e fe ct Af Ac tio n t 600 image categories (b) Hausdorff distance 2600 human STAR-FC AIM AWS BMS CAS FES GBVS IKN LDS RARE2012 SALICON SSR VOCUS 2400 2200 mean discret_frechet distance 2000 1800 1600 1400 1200 1000 800 al h tc ci So Sk e te lit e m do an Sa rn te R Pa t ur O do O ut ut or do M or N an at M O bj ad al e ec t sy N ol R es w Lo ra D ne Li oi n ut in io g ed w bl m Ju rte d or ve In In do l ta on to ac Fr ar ck Bl a C W hi te Ar e iv ct fe Af Ac tio n t 600 image categories (c) Frechet distance Figure 13: Fixation prediction scores for all tested saliency algorithms and the best performing STAR-FC model (using AIM with 21infomax950 basis in the peripheral field and MCA blending strategy). For each category we measured the mean distance from the human fixation and plotted the area-under-the-curve (AUC) score for the first 5 fixations. Figure 14: Examples of fixations predicted by FES (left column) and SALICON (right column) compared to the proposed STAR-FC model (with AIM 21infomax basis and MCA blending strategy). Blue lines represent the closest human fixations to each of the compared algorithms and numbers in parentheses indicate the corresponding Euclidean distance. Figure 15: Examples of fixations predicted by FES (left column) and SALICON (right column) compared to the proposed STAR-FC model (with AIM 21infomax basis and MCA blending strategy). Blue lines represent the closest human fixations to each of the compared algorithms and numbers in parentheses indicate the corresponding Euclidean distance.
1cs.CV
Journal of the Physical Society of Japan LETTERS An exact algorithm exhibiting RS-RSB/easy-hard correspondence for the maximum independent set problem Jun Takahashi1 ∗ , Satoshi Takabe 1 arXiv:1704.06899v1 [cond-mat.dis-nn] 23 Apr 2017 2 2† and Koji Hukushima1 ‡ Graduate School of Arts and Sciences, The University of Tokyo, Meguro, Tokyo 153-8902, Japan Department of Computer Science, Nagoya Institute of Technology, Gokiso-cho, Showa-ku, Nagoya, Aichi, 466-8555, Japan A recently proposed exact algorithm for the maximum independent set problem is analyzed. The typical running time is improved exponentially in some parameter regions compared to simple binary search. The algorithm also overcomes the core transition point, where the conventional leaf removal algorithm fails, and works up to the replica symmetry breaking (RSB) transition point. This suggests that a leaf removal core itself is not enough for typical hardness in the random maximum independent set problem, providing further evidence for RSB being the obstacle for algorithms in general. KEYWORDS: maximum independent set, average case complexity, random graphs, scale free networks, replica symmetry breaking, dynamic programming, leaf removal Studies in the field of statistical physics dealing with spin glasses have developed in the 1970s resulting in fruitful applications to a number of areas.1) Computer science is one of them, and mean-field spin-glass theory has provided excellent tools for analyzing random combinatorial optimization problems.2) The central feature provided by the statistical physics frame work is, that many combinatorial optimization problems3–5) show a phase transition called replica symmetry breaking (RSB). Since the replica symmetric (RS) phase has a smooth and connected solution space, and RSB phases correspond to rugged, non-ergodic solution space, it is generally thought that an RS/RSB phase transition should make the random optimization problem hard. In this paper, we will refer to this perspective as the RS-RSB/easy-hard correspondence. Some of this RS-RSB/easy-hard correspondence has been made rigorous in few specific models,6, 7) which show that a certain algorithm takes only polynomial time to run in the RS phase, and takes exponentially long time in the RSB phase. However, extensions for general cases seem to be difficult, and whether if the correspondence generally holds or not remains as an open problem. Indeed, the most naive form of the correspondence is violated when we consider the XORSAT problem,8, 9) since although it exhibits an RSB transition, it always has a polynomial time algorithm. In order to restore the correspondence, it is likely that an analysis which takes the algorithmic aspect into account is needed. Conversely to the XORSAT case, some natural algorithms can fail even in the RS region, as we will discuss in the following. Thus, a good algorithm and a suited statistical physics analysis is needed in general to explore the validity of the correspondence. In this work we will focus on the randomized maximum independent set (MIS) problem, in which a previously discussed algorithm fails to achieve the corre- spondence. We examine a recently proposed exact algorithm,10) which solves the MIS problem exponentially faster compared to the previous algorithm in some parameter region, resulting in polynomial-time computation up to the RS/RSB transition point. The MIS problem could be formalized as follow. The input of the problem is a simple graph G = (V, E), where V is a vertex set and E ⊂ V 2 is an edge set. We denote the number of the vertices N := |V |, and label each vertex by i ∈ {1, 2, . . . , N }. A subset of the vertices I ∈ V such that no two vertices i, j in I are connected in graph G is called an independent set. The task of the problem is to find the maximum possible independent set for a given graph. We can think of a binary variable xi ∈ {0, 1} assigned to each vertex i. Then, the MIS problem could be thought of as an problem of finding the ground state of a Hamiltonian with X X H=− xi + α xi xj (1) i (i,j)∈E where α > 1 is a constant. In terms of computational complexity theory, the MIS problem is NP-hard. This implies that there is no algorithm that exactly solves the MIS problem with a polynomial upper bound on the running time, as long as if P6=NP. To consider random instances for the MIS problem, a probability distribution over the input graphs is introduced. This corresponds to random graphs, which we will discuss below in detail, focusing on two types of random graph ensembles. For Erdös-Rényi random graphs, previous study shows that a phase transition occurs when the average degree c crosses the Napier’s constant e ' 2.718.11) The transition could be understood in two different ways. Physically, it is a phase transition from the RS phase to the full RSB phase.12) From the algorithmic point of view, the RS/RSB transition point is where the Leaf Removal (LR) algorithm13) seizes to work, and leaves a so-called LRcore with O(N ) vertices undecided.14) We can simply express this as cRSB = cLR = e. Furthermore, it is also ∗ E-mail: [email protected] s [email protected] ‡ E-mail: [email protected] † E-mail: 1 J. Phys. Soc. Jpn. shown that linear relaxation, which is another type of algorithmic approach, fails at this point as well.15) The fact that the two algorithms starts to fail at the RS/RSB transition point, can be seen as a concrete example of the RS-RSB/easy-hard correspondence. However, the situation differs when other graph ensembles are considered. Below, we will focus on a configuration model16) with a power-law degree distribution   (k < m) 0 2(1−p) (k = m) pk = m+2   2m(m+1) (1 − p) + 2(m+1)(m+2) p (k > m), k(k+1)(k+2) k(k+1)(k+2) (2) where c is the average degree and m := bc/2c and p := c/2 − m. This could be seen as a generalization of the Barabási-Albert model17) by linear combination, but without any degree correlation. We will call this ensemble the CBA random graph model. The absence of degree correlation enables statistical mechanics analysis, and it is known that there is a RS/RSB transition at cRSB ' 5.239.18) However, all the vertices have degree ≥ 2 for c ≥ cLR = 4, where the entire graph becomes the LR core. Thus, cLR cRSB for this graph ensemble, meaning that the easy/hard transition for the LR algorithm does not correspond to the RS/RSB transition. The most natural way to interpret the disagreement is that the LR algorithm by itself is too poor and naive to illustrate the correspondence for CBA random graphs. We thus introduce a natural extension of the LR algorithm, achieving the correspondence. We will first explain the LR algorithm in detail. The LR algorithm decides which vertices to include in the independent set with a guarantee that at least one of the MIS indeed includes those vertices. Any vertex v with degree 0 is trivially included in the MIS, so it is labeled as included and is removed from the graph. Any vertex v with degree 1 is also labeled included and is removed as well. This is because there exists at least one pattern for the MIS which includes v, since either of vertex v or the neighboring vertex w must be included in order to achieve the maximum, and v could be chosen without harm. When a vertex v with degree 1 is removed, the neighboring vertex w will be removed as well, since if v is in the MIS, w cannot be. This will be expressed as w being labeled excluded. The procedure is continued until there are no longer any vertices with degree less than 2. Fig. 1 shows a schematic diagram for this algorithm. Intuitively, the LR algorithm removes the leaves from the graph, which are actually nonessential to the intrinsic hardness of the MIS problem. By removing the leaves, new leaves may emerge by the reduction of edges, and if most of the graph turns out to become a leaf, the LR algorithm is successful. The remaining vertices when the algorithm stops is called the LR-core, which is a subgraph of the original input graph G, only with vertices of degree ≥ 2. If the size of the LR-core is O(1), a simple brute force will be enough to further determine the MIS completely. If, on the other hand, the LR-core has O(N ) size, this will take exponential time, implying that a simple LR algorithm fails. LETTERS Fig. 1. A schematic diagram for the leaf removal algorithm. Black colored vertices are the ones decided to be included in the independent set. The shadowed vertices are the parts considered as the “leaves”, and are removed from the graph, becoming pale. Although we call any remaining subgraph as the LRcore indifferent to its statistical properties, it is possible that some LR-cores are actually easier to attack. For instance, it is possible that an LR-core is very fragile, in the sense that if we remove one vertex from it, the remaining graph will actually become manageable with the LR 17年4月22日土曜日 algorithm. If this is the case, the LR-core should not be considered as a fundamental obstacle. Weather if an LRcore of some type is fragile or not is nontrivial. In order to fully address the fragility of the LR-cores, we introduce the Dynamic Programming Leaf Removal (DPLR) algorithm, which is a combination of the LR algorithm with naive dynamic programming (DP), a common technique in computer science (Fig. 2).19) The DPLR algorithm is simply the LR algorithm, whenever the graph does not have an LR-core. Once when DPLR hits an LR-core, it chooses one vertex with the largest degree,20) and branches off for searching configurations including/excluding the selected vertex to the independent set. It then starts the LR algorithm again, continuing this process until all the vertices are determined and the size of the independent set is calculated. The algorithm then searches other branches left behind, always remembering the largest-so-far independent set. The algorithm is essentially conducting the perturbation we have argued above, until the graph is completely turned into leaves. In this way, we achieve a general protocol which reveals the fragility of the LR-core. This algorithm was used for probing the hardness of a particular model in previous research.10) Equipped with the DPLR algorithm, we are able to see the actual robustness of the LR-core. We first discuss the simple Erdös-Rényi random graph. Fig. 3 shows the median running time Tmed of the DPLR algorithm on ErdösRényi random graph among 1024 samples. The running time T is defined by the number of decisions made for vertices to be included/excluded from the independent set. All the lines for c < e fall into the common line Tmed = N , which is the lower bound. This means that at least half of the samples need no branching at all, which is consistent with the fact that they lie in the region solvable by the simple LR algorithm. On the other hand, we see convex curves for all c > e, which implies superpolynomial growth of Tmed , meaning that more than half of the LR-cores in all of the RSB region are actually very 2 J. Phys. Soc. Jpn. LETTERS 108 ? Tmed (i) Tmed=N c=3.1 c=3.0 c=2.9 106 c=2.8 c=2.7 5 10 c=2.6 c=2.5 c=2.4 104 c=2.3 3 10 107 (1) 102 101 (ii) 10 Fig. 3. The median running time Tmed of DPLR on 1024 ErdösRényi random graphs with different sizes and different average degree c. (2-A) 1010 109 104 108 (2-B) 107 103 Tqua (ii-b) 1000 N ? (ii-a) 100 106 105 104 Fig. 2. A schematic diagram for the dynamic programming leaf removal algorithm. The gray-colored vertices are where the branching occurs, represented by the arrows. The cross mark means that the vertex is excluded from the independent set. The configuration and the size of the (so-far) maximum independent set found is always recorded, and is replaced whenever a larger independent set is found. In this example, there are two branches (i,ii and a,b), resulting in three different independent set configurations (1, 2-A, and 2-B). The second one (2-A) has the same size as the first one (1), so a replacement will not occur until the third configuration (2-B) is found, which has the largest size. 102 100 1000 103 102 Tqua=N Tqua=2N 1 10 10 100 1000 N Fig. 4. The first quartile running time Tqua of DPLR on 1024 Erdös-Rényi random graphs with different sizes and different average degree c. Lines are expressed as the same as Fig. 3. The inset shows the third quartile running time similarly. 17年4月22日土曜日 robust. Fig. 4 similarly shows the size dependence of the first (third for inset) quartile of the running time Tqua for different c. No qualitative difference with Fig. 3 is present, which suggests that the typical behavior of random graphs is well-captured by the median value. The only quantitative difference is seen in the first quartile of c = 2.7 where Tqua = 2N which will be referred later. DPLR and LR exhibited similar behaviors for ErdösRényi random graphs, however the situation becomes different when we focus on scale free networks. Fig. 5 shows the median running time Tmed of the DPLR algorithm on the CBA random graphs among 1024 samples. Importantly, CBA graphs with 4 < c < cRSB ' 5.239 shows a linear growth of Tmed . This means the DPLR algorithm reduces the computation amount compared to the naive LR algorithm in this parameter region, from exponential to linear in N . For small systems sizes we see finite size effects that makes the Tmed larger than 2N , which seems as the asymptotic scaling. Scale free networks have few vertices with very high degree, which act as “hubs”. These hubs make the LR-core fragile to DPLR-type perturbations, since they have many neighboring vertices which will be affected when deciding the hub to be included/excluded to the independent set. Without these hubs, the graphs become robust against DPLR, which could be seen in the finite size effects. The finite size effect is plotted in Fig. 6, which shows when the ratio Tmed /2N becomes smaller than a certain value. The fitting suggests that the point where the finite size effect ends diverges at c = 5.222±0.057, in well agreement with cRSB ' 5.239. Thus, although the behavior for c = 5.2 apparently seems nonlinear in Fig. 5, it is likely that it just has a long-lasting finite size effect until N ∼ 105 as suggested by our scaling in Fig. 6. Either way, the curves for c > cRSB are convex where as those of c < cRSB are not, meaning that the DPLR algorithm explicitly shows the RS-RSB/easy-hard correspondence. We also see that the scaling of Tmed changes from N to 2N at cLR = 4, consistent with the emerging LR-core. When cLR < c, all vertices have degree ≥ 2, forcing DPLR to branch at the very beginning. Thus T ≥ 2N , meaning that asymptotic scaling of Tmed = 2N implies that the LR-core is as frag3 J. Phys. Soc. Jpn. LETTERS Tmed=N Tmed=2N c=5.4 c=5.3 c=5.2 4 10 c=5.1 c=5.0 c=4.9 c=4.6 3 c=4.1 10 c=3.9 5 sically. This emphasizes the necessity of an adequate algorithm which properly exhibits the RS-RSB/easy-hard correspondence. Secondly, the scale free CBA model has a finite range in the parameter space which DPLR exhibits asymptotic scaling of Tmed = 2N , suggesting that “easiest possible LR-cores” occur quite naturally. If c = 5.2 indeed has an asymptotically linear scaling, this means that the easy/hard transition is actually a linear-to-exponential transition, more severe than polynomial-to-exponential. Together with the fact that Erdös-Rényi model surely has linear-to-exponential transition, it is likely that “moderately hard” LR-cores which take nonlinear polynomial time are actually rare in random graphs. Finally, we should emphasize that the agreement of the point which DPLR starts to take exponential time and the RS/RSB transition point is nontrivial. The statistical mechanics analysis from which we obtain the RS/RSB transition does not rely on concepts such as the leaves. They simply exploit the structure of the Hamiltonian describing the MIS problem. The branching of DPLR, on the other hand, takes advantage of the property of MIS which is that leaves are actually structures where the problem could be simplified. The fact that these two different ways of analysis agree with each other on the phase transition point suggests the existence of RS-RSB/easyhard correspondence. Tmed 10 2 10 10 100 1000 N Fig. 5. The median running time Tmed of DPLR on 1024 scalefree CBA random graphs with different sizes and different average degree c. 4000 N* 3000 2000 103 Tmed(c*-c)-a 5000 100 Tmed=2N rescaled data 1 1000 5 Acknowledgment 25 125 -a data N(c*-c) fitting 0 4.2 4.4 4.6 4.8 5 We thank Y. Nishikawa for useful discus- sions. This research was supported by the Grants-in-Aid for Scientific Research from the JSPS, Japan (No. 25120010). 1) M. Mézard, G. Parisi, and M. Á. Virasoro, Spin Glass Theory and Beyond (World Scientific, Singapore, 1987). 2) M. Mézard, A. Montanari, Information, Physics and Computation (Oxford University Press, United States, 2009). 3) R. Monasson, R. Zecchina, S. Kirkpatrick, B. Selamn, and L. Troyansky, Nature 800, 133 (1999). 4) R. Mulet, A. Pagnani, M. Weigt, and R. Zecchina, Phys. Rev. Lett. 89, 268701 (2002). 5) M. Weigt and A. K. Hartmann, Phys. Rev. E 63, 056127 (2001). 6) D. Achlioptas and A. Coja-Oghlan, Proc. 49th FOCS, 793 (2008). 7) S. Cocco and R. Monasson, Eur. Phys. J. B 22, 505 (2001). 8) O. Dubois and J. Mandler, C. R. Acad. Sci. Paris, Ser. I 335, 963 (2002). 9) S. Cocco, O. Dubois, and R. Monasson, Phys. Rev. Lett. 90, 047205 (2003). 10) J. Takahashi and K. Hukushima, arXiv:1612.08554 (2016). 11) M. Weigt and A. K. Hartmann, Phys. Rev. Lett. 84, 6118 (2000). 12) H. Zhou, Eur. Phys. J. B 32, 265 (2003). 13) R. M. Karp and M. Sipser, in Proceedings of 22nd Annual Symposium on Foundations of Computer Science (IEEE Computer Society, Los Alamitos, 1981) p. 364. 14) M. Bauer and O. Golinelli, Eur. Phys. J. B 24, 339 (2001). 15) S. Takabe and K. Hukushima, J. Phys. Soc. Jpn 83, 043801 (2014). 16) E. A. Bender and E. R. Canfield, J. Comb. Theory, Ser. A 24, 296 (1978). 17) A. L. Barabási and R. Albert, Science 286, 509 (1999). 18) S. Takabe and K. Hukushima, J. Stat. Mech. 2016, 113401 (2016). 19) R. Bellman, Bulletin of the American Mathematical Society (1954). 20) D. Brelaz, Comm. ACM 22, 251 (1979). 21) C. Banderier, H. Hwang, V. Ravelomanana, and V. Zacharovas, in Proceedings of AofA’09 (2009). 5.2 c Fig. 6. The c dependence of the size N ∗ where the finite size effect becomes small enough, i.e. when Tmed /2N ≤ 1.05. The error bars were evaluated by bootstrap. The solid line indicates a result of least-squares fit to the form N ∗ (c) = b(c∗ − c)a , obtaining c∗ = 5.222±0.057, b = 117.8±11.5 and a = −2.07±0.25. The inset shows the median running time divided by the rescaling factor (c∗ − c)a . All data sets (c = 4.2, 4.3, . . . , 5.1) seize to have finite size effects at a common point N (c∗ − c)−a = b, shown by the vertical line. ile as is could possibly be. We believe that the situation is the same for Tqua at c = 2.7 for the Erdös-Rényi graphs. In conclusion, we have introduced a novel algorithm DPLR, which puts together the LR algorithm and DP. We show explicitly that while the simple LR algorithm fails within the regime of cLR < c < cRSB , DPLR moves in polynomial time (perhaps in linear time), fully exhibiting the RS-RSB/easy-hard correspondence. Our result has several important implications. First, we should mention that not only the LR algorithm, but naive dynamic programming itself (branchand-cut) takes exponential time in some parameter region within the RS phase.21) This means that although neither of the LR algorithm nor DP is enough to see the easy/hard transition induced by the RS/RSB transition, when put together, the DPLR algorithm reveals the true transition when the problem gets harder intrin4
8cs.DS
Accountability of AI Under the Law: The Role of Explanation arXiv:1711.01134v2 [cs.AI] 21 Nov 2017 Finale Doshi-Velez*, Mason Kortz*, for the Berkman Klein Center Working Group on Explanation and the Law: Ryan Budish, Berkman Klein Center for Internet and Society at Harvard University Chris Bavitz, Harvard Law School; Berkman Klein Center for Internet and Society at Harvard University Finale Doshi-Velez, John A. Paulson School of Engineering and Applied Sciences, Harvard University Sam Gershman, Department of Psychology and Center for Brain Science, Harvard University Mason Kortz, Harvard Law School Cyberlaw Clinic David O’Brien, Berkman Klein Center for Internet and Society at Harvard University Stuart Shieber, John A. Paulson School of Engineering and Applied Sciences, Harvard University James Waldo, John A. Paulson School of Engineering and Applied Sciences, Harvard University David Weinberger, Berkman Klein Center for Internet and Society at Harvard University Alexandra Wood, Berkman Klein Center for Internet and Society at Harvard University Abstract The ubiquity of systems using artificial intelligence or “AI” has brought increasing attention to how those systems should be regulated. The choice of how to regulate AI systems will require care. AI systems have the potential to synthesize large amounts of data, allowing for greater levels of personalization and precision than ever before—applications range from clinical decision support to autonomous driving and predictive policing. That said, our AIs continue to lag in common sense reasoning [McCarthy, 1960], and thus there exist legitimate concerns about the intentional and unintentional negative consequences of AI systems [Bostrom, 2003, Amodei et al., 2016, Sculley et al., 2014]. How can we take advantage of what AI systems have to offer, while also holding them accountable? In this work, we focus on one tool: explanation. Questions about a legal right to explanation from AI systems was recently debated in the EU General Data Protection Regulation [Goodman and Flaxman, 2016, Wachter et al., 2017a], and thus thinking carefully about when and how explanation from AI systems might improve accountability is timely. Good choices about when to demand explanation can help prevent negative consequences from AI systems, while poor choices may not only fail to hold AI systems accountable but also hamper the development of much-needed beneficial AI systems. Below, we briefly review current societal, moral, and legal norms around explanation, and then focus on the different contexts under which explanation is currently required under the law. We find that there exists great variation around when explanation is demanded, but there also exist important consistencies: when demanding explanation from humans, what we typically want to know is whether and how certain input factors affected the final decision or outcome. These consistencies allow us to list the technical considerations that must be considered if we desired AI systems that could provide kinds of explanations that are currently required of humans under the law. Contrary to popular wisdom of AI systems as indecipherable black boxes, we find that this level of explanation should generally be technically feasible but may sometimes be practically onerous—there are certain aspects of explanation that may be simple for humans to provide but challenging for AI systems, and vice versa. As an interdisciplinary team of legal scholars, computer scientists, and cognitive scientists, we recommend that for the present, AI systems can and should be held to a similar standard of explanation as humans currently are; in the future we may wish to hold an AI to a different standard. 1 Introduction AI systems are currently used in applications ranging from automatic face-focus on cameras [Ray and Nicponski, 2005] and predictive policing [Wang et al., 2013] to segmenting MRI scans [Aibinu et al., 2008] and 1 language translation [Chand, 2016]. We expect that they will be soon be applied in safety-critical applications such as clinical decision support [Garg et al., 2005] and autonomous driving [Maurer et al., 2016]. That said, AI systems continue to be poor at common sense reasoning [McCarthy, 1960]. Thus, there exist legitimate concerns about the intentional and unintentional negative consequences of AI systems [Bostrom, 2003, Amodei et al., 2016, Sculley et al., 2014]. How can we take advantage of what AI systems have to offer, while also holding them accountable? To date, AI systems are only lightly regulated: it is assumed that the human user will use their common sense to make the final decision. However, even today we see many situations in which humans place too much trust in AI systems and make poor decisions—consider the number of car accidents due to incorrect GPS directions [Wolfe, February 17, 2014], or, at a larger scale, how incorrect modeling assumptions were at least partially responsible for the recent mortgage crisis [Donnelly and Embrechts, 2010]. As AI systems are used in more common and consequential contexts, there is increasing attention on whether and how they should be regulated. The question of how to hold AI systems accountable is important and subtle: poor choices may result in regulation that not only fails to truly improve accountability but also stifles the many beneficial applications of AI systems. While there are many tools to increasing accountability in AI systems, we shall focus on one in this report: explanation. (We briefly discuss alternatives in Section 7.) By exposing the logic behind a decision, explanation can be used to prevent errors and increase trust. Explanations can also be used to ascertain whether certain criteria were used appropriately or inappropriately in case of a dispute. The question of when and what kind of explanation might be required of AI systems is urgent: details about a potential “right to explanation” were debated in the most recent revision of the European Union’s General Data Protection Regulation (GDPR) [Goodman and Flaxman, 2016, Wachter et al., 2017a]. While the ultimate version of the GDPR only requires explanation in very limited contexts, we expect questions around AI and explanation to be important in future regulation of AI systems—and, as noted above, it is essential that such regulation is implemented thoughtfully. In particular, there exist concerns that the engineering challenges surrounding explanation from AI systems would stifle innovation; that explanations might force trade secrets to be revealed; and that explanation would come at the price of system accuracy or other performance objective. In this document, we first examine what kinds questions legally-operative explanations must answer. We then look at how explanations are currently used by society and, more specifically, in our legal and regulatory systems. We find that while there is little consistency about when explanations are required, there is a fair amount of consistency in what the abstract form of an explanation needs to be. This property is very helpful for creating AI systems to provide explanation; in the latter half of this document, we describe technical considerations for designing AI systems to provide explanation while mitigating concerns about sacrificing prediction performance and divulging trade secrets. Under legally operative notions of explanations, AI systems are not indecipherable black-boxes; we can, and sometimes should, demand explanation from them. We also discuss the potential costs of requiring explanation from AI systems, situations in which explanation may not be appropriate, and finally other ways of holding AI systems accountable. This document is a product of over a dozen meetings between legal scholars, computer scientists, and cognitive scientists. Together, we are experts on explanation in the law, on the creation of AI systems, and on the capabilities and limitations of human reasoning. This interdisciplinary team worked together to recommend what kinds of regulation on explanation might be both beneficial and feasible from AI systems. 2 What is an Explanation? In the colloquial sense, any clarifying information can be an explanation. Thus, we can “explain” how an AI makes decision in the same sense that we can explain how gravity works or explain how to bake a cake: by laying out the rules the system follows without reference to any specific decision (or falling object, or cake). When we talk about an explanation for a decision, though, we generally mean the reasons or justifications for that particular outcome, rather than a description of the decision-making process in general. In this paper, when we use the term explanation, we shall mean a human-interpretable description of the process by which 2 a decision-maker took a particular set of inputs and reached a particular conclusion [Wachter et al., 2017a] (see Malgieri and Comande [2017] for a discussion about legibility of algorithmic systems more broadly). In addition to this formal definition of an explanation, an explanation must also have the correct type of content in order for it to be useful. As a governing principle for the content an explanation should contain, we offer the following: an explanation should permit an observer to determine the extent to which a particular input was determinative or influential on the output. Another way of formulating this principle is to say that an explanation should be able to answer at least one of the following questions: What were the main factors in a decision? This is likely the most common understanding of an explanation for a decision. In many cases, society has prescribed a list of factors that must or must not be taken into account in a particular decision. For example, we many want to confirm that a child’s interests were taken into account in a custody determination, or that race was not taken into account in a criminal prosecution. A list of the factors that went into a decision, ideally ordered by significance, helps us regulate the use of particularly sensitive information. Would changing a certain factor have changed the decision? Sometimes, what we want to know is not whether a factor was taken into account at all, but whether it was determinative. This is most helpful when a decision-maker has access to a piece of information that has both improper and proper uses, such as the consideration of race in college admissions. By looking at the effect of changing that information on the output and comparing it to our expectations, we can infer whether it was used correctly. Why did two similar-looking cases get different decisions, or vice versa? Finally, we may want to know whether a specific factor was determinative in relation to another decision. This information is useful when we need to assess the consistency as well as the integrity of a decision-maker. For example, it would be proper for a bank to take income into account, and even treat it as dispositive, when deciding whether to grant a loan. However, we might not want a bank to rely on income to different degrees in apparently similar cases, as this could undermine the predictability and trustworthiness of the decision-making process. 3 Societal Norms Around Explanation Before diving into the U.S. legal context, we discuss more broadly how we, as a society, find explanations are desirable in some circumstances but not others. In doing so, we lay the foundations for specific circumstances in which explanation are (or are not) currently demanded under the law (Section 4). When it comes to human decision-makers, we often want an explanation when someone makes a decision we do not understand or believe to be suboptimal [Leake, 1992]. For example, was the conclusion accidental or intentional? Was it caused by incorrect information or faulty reasoning? The answers to these questions permit us to weigh our trust in the decision-maker and to assign blame in case of a dispute. However, society cannot demand an explanation for every decision, because explanations are not free. Generating them takes time and effort, thus reducing the time and effort available to spend on other, potentially more beneficial conduct. Therefore, the utility of explanations must be balanced against the cost of generating them. Consider the medical profession. A doctor who explained every diagnosis and treatment plan to another doctor might make fewer mistakes, but would also see fewer patients. And so, we required newly graduated doctors to explain their decisions to more senior colleagues, but we do not require explanation from more experienced doctors—as the risk of error decreases and the value of the doctor’s time increases, the cost-benefit analysis of generating explanations shifts. In other circumstances, an explanation might obscure more information than it reveals—humans are notoriously inaccurate when providing post-hoc rationales for decisions [Nisbett and Wilson, 1977]— and even if an explanation is accurate, we cannot ensure that it will be used in a socially responsible way. Explanations can also change an individual’s judgment: the need to explain a decision can have both positive and negative effects on the decision-maker’s choices [Messier et al., 1992], and access to an explanation might 3 decrease observers’ trust in some decisions [de Fine Licht, 2011]. Last but not least, social norms regarding individual autonomy weigh against demanding explanations for highly personal decisions. What, then, are the circumstances in which the benefits of an explanation outweigh the costs? We find that there are three conditions that characterize situations in which society considers a decision-maker is obligated—morally, socially, or legally—to provide an explanation: The decision must have been acted on in a way that has an impact on a person other than the decision maker. If a decision only impacts the decision-maker, social norms generally will not compel an explanation, as doing so would unnecessarily infringe upon the decision-maker’s independence. For example, if an individual invests their own funds and suffers losses, there is no basis to demand that the investor disclose their strategy. But if an investor makes a decision that loses a client’s money, the client may well be entitled to an explanation. There must be value to knowing if the decision was made erroneously. Assuming the decision affects entities other than the decision-maker, society still will not demand on explanation unless the explanation can be acted on in some way. Under the law, this action usually corresponds to assigning a blame and providing compensation for injuries caused by past decisions. However, as noted in Wachter et al. [2017b], explanations can also be useful if they can positively change future decision-making. But if there is no recourse for the harm caused, then there is no justification for the cost of generating an explanation. For example, if a gambler wins a round of roulette, there is no reason to demand an explanation for the bet: there is no recourse for the casino and there is no benefit to knowing the gambler’s strategy, as the situation is not repeatable. There must be some reason to believe that an error has occurred (or will occur) in the decisionmaking process. We only demand explanations when some element of the decision-making process—the inputs, the output, or the context of the process—conflicts with our expectation of how the decision will or should be made: • Unreliable or inadequate inputs. In some cases, belief that an error has occurred arises from our knowledge of the decision-maker’s inputs. An input might be suspect because we believe it is logically irrelevant. For example, if a surgeon refuses to perform an operation because of the phase of the moon, society might well deem that an unreasonable reason to delay an important surgery [Margot, 2015]. An input might also be forbidden. Social norms in the U.S. dictate that certain features, such as race, gender, and sexual identity or orientation, should not be taken into account deciding a person’s access to employment, housing, and other social goods. If we know that a decision-maker has access to irrelevant or forbidden information—or a proxy for such information—it adds to our suspicion that the decision was improper. Similarly, there are certain features that we think must be taken into account for particular decision: if a person is denied a loan, but we know that the lender never checked the person’s credit report, we might suspect that the decision was made on incomplete information and, therefore, erroneous. • Inexplicable outcomes. In other cases, belief that an error occurred comes from the output of the decision-making process, that is, the decision itself. If the same decision-maker renders different decisions for two apparently identical subjects, we might suspect that the decision was based on an unrelated feature, or even random. Likewise, if a decision-maker produces the same decision for two markedly different subjects, we might suspect that it failed to take into account a salient feature. Even a single output might defy our expectations to the degree that the most reasonable inference is that the decision-making process was flawed. If an autonomous vehicles suddenly veers off the road, despite there being no traffic or obstacles in sight, we could reasonably infer that an error occurred from that single observation. 4 • Distrust in the integrity of the system. Finally, we might demand an explanation for a decision even if the inputs and outputs appear proper because of the context in which the decision is made. This usually happens when a decision-maker is making highly consequential decisions and has the ability or incentive to do so in a way that is personally beneficial but socially harmful. For example, corporate directors may be tempted to make decisions that benefit themselves at the expense of their shareholders. Therefore, society may want corporate boards to explain their decisions, publicly and preemptively, even if the inputs and outputs of the decision appear proper [Hopt, 2011]. We observe that the question of when it is reasonable to demand an explanation is more complex than identifying the presence or absence of these three factors. Each of these three factors may be present in varying degree, and no single factor is dispositive. When a decision has resulted in a serious and plainly redressable injury, we might require less evidence of improper decision-making. Conversely, if there is a strong reason to suspect that a decision was improper, we might demand an explanation for even a relatively minor harm. Moreover, even where these three factors are absent, a decision-maker may want to voluntarily offer an explanation as a means of increasing trust in the decision-making process. To further demonstrate the complexity of determining when to requiring explanations, we now look at a concrete example: the U.S. legal system. 4 Explanations in the U.S. Legal System The principles described in Section 3 describe the general circumstances in which we, as a society, desire explanation. We now consider how they are applied in existing laws governing human behavior. We confine our research to laws for two reasons. First, laws are concrete. Reasonable minds can and do differ about whether it is morally justifiable or socially desirable to demand an explanation in a given situation. Laws on the other hand are codified, and while one might argue whether a law is correct, at least we know what the law is. Second, the United States legal system maps well on to the three conditions from Section 3. The first two conditions–that the decision have an actual effect and that there is some benefit to obtaining an explanation—are embodied in the doctrine of standing within the constitutional injury, causation, and redressability requirements [Krent, 2001]. The third condition, reason to believe that an error occurred, corresponds to the general rule that the complaining party must allege some kind of mistake or wrongdoing before the other party is obligated to offer an explanation—in the legal system, this is called “meeting the burden of production” [Corpus Juris Secundum, c. 86 §101]. Indeed, at a high level, the anatomy of many civil cases involve the plaintiff presenting evidence of an erroneous decision, forcing the defendant to generate an innocent explanation or concede that an error occurred. However, once we get beyond this high-level model of the legal system, we find significant variations in the demand for explanations under the law, including the role of the explanation, who is obligated to provide it, and what type or amount of evidence is needed to trigger that obligation. A few examples that highlight this variation follow: • Strict liability: Strict liability is a form of legal liability that is imposed solely on the fact that the defendant caused an injury; there is no need to prove that the defendant acted wrongfully, intentionally, or even negligently. Accordingly, the defendant’s explanation for the decision to act in a certain way is irrelevant to the question of liability. Strict liability is usually based on risk allocation policies. For example, under U.S. product liability law, a person injured as a result of a poor product design decision can recover damages without reaching the question of how that decision was made. The intent of the strict product liability system is to place the burden of inspecting and testing products on manufacturers, who have the resources and expertise to do so, rather than consumers, who presumably do not [Owen and Davis, 2017, c. 1 §5:1]. • Divorce: Prior to 1969, married couples in the U.S. could only obtain a divorce by showing that one of the spouses committed some wrongful act such as abuse, adultery, or desertion—what are called “grounds for divorce.” Starting with California in 1969, changing social norms around around privacy 5 and autonomy, especially for women, led states to implement no-fault divorce laws, under which a couple can file for divorce without offering a specific explanation. Now, all states provide for no-fault divorce, and requiring a couple to explain their decision to separate is perceived as archaic [Guidice, 2011]. • Discrimination: In most discrimination cases, the plaintiff must provide some evidence that some decision made by the defendant—for example, the decision to extend a government benefit to the plaintiff—was intentionally biased before the defendant is required to present a competing explanation [Strauss, 1989]. But in certain circumstances, such as criminal jury selection, employment, or access to housing, statistical evidence that the outputs of a decision-making process disproportionately exclude a particular race or gender is enough to shift the burden of explanation on the decision-maker [Swift, 1995, Cummins and Isle, 2017]. This stems in part from the severity and prevalence of certain types of discrimination, but also a moral judgment about the repugnance of discriminating on certain characteristics. • Administrative decisions: Administrative agencies are subject to different explanation requirements at different stages in their decision-making. When a new administrative policy is being adopted, the agency must provide a public explanation for the change [Corpus Juris Secundum, c. 73 §231]. But once the policies are in place, a particular agency decision is usually given deference, meaning that a court reviewing the decision will assume that the decision is correct absent countervailing evidence. Under the deferential standard, the agency only needs to show that the decision was not arbitrary or random [Corpus Juris Secundum, c. 73A §497]. Highly sensitive decisions, like national security related decisions, may be immune from any explanatory requirement at all. • Judges and juries: Whether and how a particular judicial decision must be explained varies based on a number of factors, including the important of the decision and the nature of the decision-maker. For example, a judge ruling on a motion to grant a hearing can generally do so with little or no explanation; the decision is highly discretionary. But a judge handing down a criminal sentence—one of the most important decisions a court can make—must provide an explanation so that the defendant can detect and challenge any impropriety or error [O’Hear, 2009]. On the other hand, a jury cannot be compelled to explain why it believed a certain witness or drew a certain inference, even though these decisions may have an enormous impact on the parties. One justification given for not demanding explanations from juries is that public accountability could bias jurors in favor of making popular but legally incorrect decisions; another is that opening jury decisions to challenges would weaken public confidence in the outcomes of trials and bog down the legal system [Landsman, 1999]. As the foregoing examples show, even in the relatively systematic and codified realm of the law, there are numerous factors that affect whether human decision-makers will be required to explain their decisions. These factors include the nature of the decision, the susceptibility of the decision-maker to outside influence, moral and social norms, the perceived costs and benefits of an explanation, and a degree of historical accident. 5 Implications for AI systems With our current legal contexts in mind, we now turn to technical considerations for extracting explanation from AI systems. That is, how challenging would it be to create AI systems that provide the same kinds of explanation that are currently expected of humans, in the contexts that are currently expected of humans, under the law? Human decision-makers are obviously different from AI systems (see Section 6 for a comparison), but in this section we answer this question largely in the affirmative: for the most part, it is technically feasible to extract the kinds of explanations that are currently required of humans from AI systems. Legally-Operative Explanations are Feasible. The main source of this feasibility arises from the fact that explanation is distinct from transparency. Explanation does not require knowing the flow of bits through 6 an AI system, no more than explanation from humans requires knowing the flow of signals through neurons (neither of which would be interpretable to a human!). Instead, explanation, as required under the law, as outlined in Section 2, is about answering how certain factors were used to come to the outcome in a specific situation. These core needs can be formalized by two technical ideas: local explanation and local counterfactual faithfulness. Local Explanation. In the AI world, explanation for a specific decision, rather than an explanation of the system’s behavior overall, is known as local explanation [Ribeiro et al., 2016, Lei et al., 2016, Adler et al., 2016, Fong and Vedaldi, 2017, Selvaraju et al., 2016, Smilkov et al., 2017, Shrikumar et al., 2016, Kindermans et al., 2017, Ross et al., 2017, Singh et al., 2016]. AI systems are naturally designed to have their inputs varied, differentiated, and passed through many other kinds of computations—all in a reproducible and robust manner. It is already the case that AI systems are trained to have relatively simple decision boundaries to improve prediction accuracy, as we do not want tiny perturbations of the input changing the output in large and chaotic ways [Drucker and Le Cun, 1992, Murphy, 2012]. Thus, we can readily expect to answer the first question in Section 2—what were the important factors in a decision—by systematically probing the inputs to determine which have the greatest effect on the outcome. This explanation is local in the sense that the important factors may be different for different instances. For example, for one person, payment history may be the reason behind their loan denial, for another, insufficient income. Counterfactual Faithfulness. The second property, counterfactual faithfulness, encodes the fact that we expect the explanation to be causal. Counterfactual faithfulness allows us to answer the remaining questions from Section 2: whether a certain factor determined the outcome, and related, what factor caused a difference in outcomes. For example, if a person was told that their income was the determining factor for their loan denial, and then their income increases, they might reasonably expect that the system would now deem them worthy of getting the loan. Importantly, however, we only expect that counterfactual faithfulness apply for related situations—we would not expect an explanation in a medical malpractice case regarding an elderly, frail patient to apply to a young oncology patient. However, we may expect it to still hold for a similar elderly, less frail patient. Recently Wachter et al. [2017b] also point out how counterfactuals are the cornerstone of what we need from explanation. Importantly, both of these properties above can be satisfied without knowing the details of how the system came to its decision. For example, suppose that the legal question is whether race played an inappropriate role in a loan decision. One might then probe the AI system with variations of the original inputs changing only the race. If the outcomes were different, then one might reasonably argue that gender played a role in the decision. And if it turns out that race played an inappropriate role, that constitutes a legally sufficient explanation—no more information is needed under the law (although the company may internally choose decide to determine the next level of cause, e.g. bad training data vs. bad algorithm). This point is important because it mitigates concerns around trade secrets: explanation can be provided without revealing the internal contents of the system. Explanation systems should be considered distinct from AI systems. We argue that regulation around explanation from AI systems should consider the explanation system as distinct from the AI system. Figure 1 depicts a schematic framework for explainable AI systems. The AI system itself is a (possibly proprietary) black-box that takes in some inputs and produces some predictions. The designer of the AI system likely wishes the predictions (ŷ) to match the real world (y). The designer of the explanation system must output a human-interpretable rule ex () that takes in the same input x and outputs a prediction ỹ. To be locally faithful under counterfactual reasoning formally means that the predictions ỹ and ŷ are the same under small perturbations of the input x. This framework renders concepts such as local explanation and local counterfactual faithfulness readily quantifiable. For any input x, we can check whether the prediction made by the local explanation (ỹ) is the same as the prediction made by the AI system (ŷ). We can also check whether these predictions remain consistent over small perturbations of x (e.g. changing the race). Thus, not only can we measure what proportion of the time an explanation system is faithful, but we can also identify the specific instances in which it is not. From a regulatory perspective, this opens the door to regulation that requires that an AI 7 Figure 1: Diagram of a Framework for Explainable AI Systems. system be explainable some proportion of the time or in certain kinds of contexts—rather than all the time. Loosening the explanation requirement in this way may allow for the AI system to use a much more complex logic for a few cases that really need it. More broadly, thinking of an explanation system as distinct from the original AI system also creates opportunities for industries that specialize in explanation systems. There will exist challenges in mapping inputs and intermediate representations in AI systems to human-interpretable concepts. While the notion of how explanations are used under the law can be formalized computationally, there remains a key technical challenge of converting the inputs to an AI system—presumably some large collection of variables, such as pixel values—into human-interpretable terms such as age or gender. For example, self-driving cars may have multitudes of sensors, each with highdimensional range and vision inputs; the human brain already converts its visual inputs into higher-level concepts such as trees or street signs. Clinical decision support systems may take in tens of thousands of variables about a patient’s diagnoses, drugs, procedures, and concepts extracted from the clinical notes; the human doctor has terms like sepsis or hypertension to describe constellations of these variables. While there do exist methods to map the high-dimensional inputs to an AI system to human-interpretable concepts, the process generally requires training the system with large amounts of data in which both the raw input and the associated concept are given. As such, explanations from AI systems will be most straight-forward if the relevant terms are known in advance. In this case, the AI system can be trained to map its inputs to the relevant terms. For example, in the medical sphere, there are a number of algorithms for determining whether a patient has diabetes from a multitude of inputs [Newton et al., 2013]; recent work has identified ways to weigh the importance of much more general terms [Kim et al., 2017]. There will be some technical innovation required, but by and large we see relatively few difficulties for AI systems to provide the kinds of explanation that are currently required in the case where legislation or regulation makes it clear what terms may be asked for ex ante; there is also an established process for companies to adapt new standards as legislation and regulation change. That said, there are subtleties. While it is relatively straightforward to identify what inputs are correlated with certain terms, and verify whether predictions of terms are correlated with decisions, it will require some work to determine ways to test counterfactuals. For example, how can we show that a security system that uses images of a face as input does not discriminate against gender? One would need to consider an alternate face that was similar in every way except for gender. Another subtlety is that, to create the required terms, the AI system will need access to potentially sensitive information. Currently, we often assume that if the human did not have access to a particular term, such as race, then it could not have been used in the decision. However, it is very easy for AI systems 8 to reconstruct sensitive terms from high-dimensional inputs. Data about shopping patterns can be used to identify term such as age, gender, and socio-economic status, as can data about healthcare utilization. Especially with AI systems, excluding a protected category does not mean that a proxy for that category is not being created. Thus, a corollary to the arguments above is that we must measure any terms that we wish to protect against, to be able to ensure that we are not generating proxies for them. Our legal system must allow them to be collected, and AI system designers should build ways to test whether systems are creating that term and using it inappropriately. Regulation must be put in place so that any protected terms collected by AI system designers are used only to ensure that the AI system is designed correctly, and not for other purposes within the organization. (It would be unfortunate, to say the least, if we can verify that an AI system is not discriminating against a protected term, only to find that a human decision-maker is accessing and combining the forbidden information with the AI system’s recommendation to make a final choice.) The challenges increase if the relevant terms cannot be determined in advance. For example, in litigation scenarios, the list of relevant terms is generally only determined ex post. In such cases, AI systems may struggle; unlike humans, they cannot be asked to refine their explanations after the fact without additional training data. For example, we cannot identify what proxies there are for age in a data set if age itself has never been measured. For such situations, we first note that there is precedent for what to do in litigation scenarios when some information is not available, ranging from drawing inferences against the party that could have provided the information to imposing civil liability for unreasonable record-keeping practices [Nolte, 1994, Cicero, 1988]. Second, while not always possible, in many cases it may be possible to quickly train a proxy—especially if AI designers have designed the system to be updated—or have the parties mutually agree (perhaps via a third party) what are acceptable proxies. The parties may also agree to assessment via non-explanation-based tools. In summary, to build AI systems that can provide explanation in terms of human-interpretable terms, we must both list those terms and allow the AI system access to examples to learn them. System designers should design systems to learn these human-interpretable terms, and also store data from each decision so that is possible to reconstruct and probe a decision post-hoc if needed. Policy makers should develop guidelines to ensure that the explanation system is being faithful to the original AI. 6 A Comparison of Human and AI Capability for Explanation So far, we have argued that explanation from AI is technically feasible in many situations. However, there are obviously salient differences between AI systems and humans. Should this affect the extent to which AI explanations should be the subject of regulation? We begin with the position that, in general, AIs should be capable of providing an explanation in any situation where a human would be legally required to do so. This approach would prevent otherwise legally accountable decision-makers from “hiding” behind AI systems, while not requiring the developers of AI systems to spend resources or limit system performance simply to be able to generate legally unnecessary explanations. That said, given the differences between human and AI processes, there may be situations in which it is possible to demand more from humans, and other situations in which it might be possible to hold AI systems to a higher standard of explanation. There are far too many factors that go into determining when an explanation should be legally required to analyze each of them with respect to both humans and AIs in this paper. At the most general level, though, we can categorize the factors that go into such a determination as either extrinsic or intrinsic to the decision-maker. Extrinsic factors—the significance of the decision, the relevant social norms, the extent to which an explanation will inform future action—are likely to be the same whether the decision-maker is a human or an AI system. Intrinsic factors, though, may vary significantly between humans and AIs (see Table 1), and will likely be key in eventually determining where demands for human and AI explanations under the law should overlap and where they should diverge. One important difference between AIs and humans is the need to pre-plan explanations. We assume that humans will, in the course of making a decision, generate and store the information needed to explain that decision later if doing so becomes useful. A doctor who does not 9 explain the reasons for a diagnosis at the time it is made can nevertheless provide those reasons after the fact if, for example, diagnosis is incorrect and the doctor gets sued. A decision-maker might be required to create a record to aid in the subsequent generation of an explanation—to continue the prior example, many medical providers require doctors to annotate patient visits for this very reason, despite the fact that it takes extra time. However, requiring human decision-makers to document their decisions is the exception, not the norm. Therefore, the costs and benefits of generating an human explanation can be assessed at the time the explanation is requested. In contrast, AI systems do not automatically store information about their decisions. Often, this feature is considered an advantage: unlike human decision-makers, AI systems can delete information to optimize their data storage and protect privacy. However, an AI system designed this way would not be able to generate ex post explanations the way a human can. Instead, whether resources should to be allocated to explanation generation becomes a question of system design. This is analogous to the question of whether a human decision-maker should be required to keep a record. The difference is that with an AI system this design question must always be addressed explicitly. That said, AI systems can be designed to store their inputs, intermediate steps, and outputs exactly (although transparency may be required to verify this). Therefore, they do not suffer from the cognitive biases that make human explanations unreliable. Additionally, unlike humans, AI systems are not vulnerable to the social pressures that could alter their decision-making processes. Accordingly, there is no need to shield AI systems from generating explanations, for example, the way the law shields juries. Table 1: Comparison of Human and AI Capabilities for Explanation 7 Human AI Strengths Can provide explanation post-hoc Reproducible, no social pressure Weaknesses May be inaccurate and irreliable, feel social pressure Requires up-front engineering, explicit taxonomies and storage Alternatives to Explanation Explanation is but one tool to hold AI systems accountable. In this section, we discuss the trade-offs associated with three core classes of tools: explanation, empirical evidence, and theoretical guarantees. Explanation. In Section 5, we noted that an explanation system may struggle if a new factor is suddenly needed. In other cases, explanation may be possible but undesirable for other reasons: Designing a system to also provide explanation is a non-trivial engineering task, and thus requiring explanation all the time may create a financial burden that disadvantages smaller companies; if the decisions are low enough risk, we may not wish to require explanation. In some cases, one may have to make trade-offs between the proportion of time that explanation can be provided and the accuracy of the system; that is, by requiring explanation we might cause the system to reject a solution that cannot be reduced to a human-understandable set of factors. Obviously, both explanation and accuracy are useful for preventing errors, in different ways. If the overall number of errors is lower in a version of the AI system that does not provide explanation, then we might wish to only monitor the system to ensure that the errors are not targeting protected groups and the errors even out over an individual. Similar situations may occur even if the AI is not designed to reject solutions that fall below a threshold of explicability; the human responsible for implementing the solution may discard it in favor of a less optimal decision with a more appealing—or legally defensible—explanation. In either case, society would lose out on an optimal solution. Given that one of the purported benefits of AI decision-making is the ability to identify patterns that humans cannot, this would be counterproductive. Empirical Evidence. Another tool for accountability is empirical evidence, that is measures of a system’s overall performance. Empirical evidence may justify (or implicate) a decision-making system by demonstrat10 ing the value (or harm) of the system, without providing an explanation for any given decision. For example, we might observe that an autonomous aircraft landing system has fewer safety incidents than human pilots, or that the use of a clinical diagnostic support tool reduces mortality. Questions of bias or discrimination can be ascertained statistically: for example, a loan approval system might demonstrate its bias by approving more loans for men than women when other factors are controlled for. In fact, in some cases statistical evidence is the only kind of justification that is possible; certain types of subtle errors or discrimination may only show up in aggregate. While empirical evidence is not unique to AI systems, AI systems, as digesters of data used in highly reproducible ways, are particularly well-suited to provide empirical evidence. However, such evidence, by its nature, cannot be used to assign blame or innocence surrounding a particular decision. Theoretical Guarantees. In rarer situations, we might be able to provide theoretical guarantees about a system. For example, we trust our encryption systems because they are backed by proofs; neither explanation or evidence are required. Similarly, if there are certain agreed-upon schemes for voting and vote counting, then it may be possible to design a system that provably follows those processes. Likewise, a lottery is shown to be fair because it abides by some process, even though there is no possibility of fully explaining the generation of the pseudo-random numbers involved. Theoretical guarantees are a form of perfect accountability that only AI systems can provide, and ideally will provide more and more often in the long term; however, these guarantees require very cleanly specified contexts that often do not hold in real-world settings. We emphasize that the trade-offs associated with all of these methods will shift as technologies change. For example, access to greater computational resources may reduce the computational burden associated with explanation, but enable even more features to be used, increasing the challenges associated with accurate summarization. New modes of sensing might allow us to better measure safety or bias, allowing us to rely more on empirical evidence, but they might also result in companies deciding to tackle even more ambitious, hard-to-formalize problems for which explanation might be the only available tool. We summarize considerations for choosing an accountability tool for AI systems in Table 2. Table 2: Considerations for Approaches for Holding AIs Accountable Approach Well-suited Contexts Poorly-suited Contexts Theoretical Guarantees Situations in which both the problem and the solution can be fully formalized (gold standard, for such cases) Problems in which outcomes can be completely formalized, and we take a strict liability view; problems where we can wait to see some negative outcomes happen so as to measure them Problems that are incompletely specified, where the objectives are not clear and inputs might be erroneous Any situation that cannot be sufficiently formalized (most cases) Statistical evidence Explanation 8 Situations where the objective cannot be fully formalized in advance Situations in which other forms of accountability are not possible Recommendations In the sections above, we have discussed the circumstances in which humans are required to provide explanation under the law, as well as what those explanations are expected to contain. We have also argued that 11 it should be technically feasible to create AI systems that provide the level of explanation that is currently required of humans. The question, of course, is whether we should. The fact of the matter is that AI systems are increasing in capability at an astounding rate, with optimization methods of black-box predictors that far exceed human capabilities. Making such quickly-evolving systems be able to provide explanation, while feasible, adds an additional amount of engineering effort that might disadvantage less-resourced companies because of the additional personnel hours and computational resources required; these barriers may in turn result in companies employing suboptimal but easily-explained models. Thus, just as with requirements around human explanation, we will need to think about why and when explanations are useful enough to outweigh the cost. Requiring every AI system to explain every decision could result in less efficient systems, forced design choices, and a bias towards explainable but suboptimal outcomes. For example, the overhead of forcing a toaster to explain why it thinks the bread is ready might prevent a company from implementing a smart toasting feature—either due to the engineering challenges or concerns about legal ramifications. On the other hand, we may be willing to accept the monetary cost of an explainable but slightly less accurate loan approval system for the societal benefit of being able to verify that it is nondiscriminatory. As discussed in Section 3, there are societal norms around when we need explanation, and these norms should be applied to AI systems as well. For now, we posit that demanding explanation from AI systems in such cases is not so onerous that we should ask of our AI systems what we ask of humans. Doing so avoids AI systems from getting a “free pass” to avoid the kinds of scrutiny that may come to humans, and also avoids asking so much of AI systems that it would hamper innovation and progress. Even this modest step will have its challenges, and as they are resolved, we will gain a better sense of whether and where demands for explanation should be different between AI systems and humans. As we have little data to determine the actual costs of requiring AI systems to generate explanations, the role of explanation in ensuring accountability must also be re-evaluated from time to time, to adapt with the ever-changing technology landscape. Acknowledgements The BKC Working Group on Interpretability acknowledges Elena Goldstein, Jeffrey Fossett, and Sam Daitzman for helping organize our meetings. We also are indebted to countless conversations with our colleagues, who helped question and refine the ideas presented in this work. References John McCarthy. Programs with common sense. RLE and MIT Computation Center, 1960. Nick Bostrom. Ethical issues in advanced artificial intelligence. Science Fiction and Philosophy: From Time Travel to Superintelligence, pages 277–284, 2003. Dario Amodei, Chris Olah, Jacob Steinhardt, Paul Christiano, John Schulman, and Dan Mané. Concrete problems in ai safety. arXiv preprint arXiv:1606.06565, 2016. D Sculley, Todd Phillips, Dietmar Ebner, Vinay Chaudhary, and Michael Young. Machine learning: The high-interest credit card of technical debt. 2014. Bryce Goodman and Seth Flaxman. EU regulations on algorithmic decision-making and a ’right to explanation’. In ICML workshop on human interpretability in machine learning (WHI 2016), New York, NY. http://arxiv. org/abs/1606.08813 v1, 2016. Sandra Wachter, Brent Mittelstadt, and Luciano Floridi. Why a right to explanation of automated decisionmaking does not exist in the general data protection regulation. International Data Privacy Law, 7(2): 76–99, 2017a. Lawrence A Ray and Henry Nicponski. Face detecting camera and method, September 6 2005. US Patent 6,940,545. 12 Tong Wang, Cynthia Rudin, Daniel Wagner, and Rich Sevieri. Learning to detect patterns of crime. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pages 515–530. Springer, 2013. Abiodun M Aibinu, Momoh JE Salami, Amir A Shafie, and Athaur Rahman Najeeb. Mri reconstruction using discrete fourier transform: a tutorial. World Academy of Science, Engineering and Technology, 42: 179, 2008. Sunita Chand. Empirical survey of machine translation tools. In Research in Computational Intelligence and Communication Networks (ICRCICN), 2016 Second International Conference on, pages 181–185. IEEE, 2016. Amit X Garg, Neill KJ Adhikari, Heather McDonald, M Patricia Rosas-Arellano, PJ Devereaux, Joseph Beyene, Justina Sam, and R Brian Haynes. Effects of computerized clinical decision support systems on practitioner performance and patient outcomes: a systematic review. Jama, 293(10):1223–1238, 2005. Markus Maurer, J Christian Gerdes, Barbara Lenz, and Hermann Winner. Autonomous driving: technical, legal and social aspects. Springer Publishing Company, Incorporated, 2016. Sarah Wolfe. Driving into the ocean and 8 other spectacular fails as gps turns 25. Public Radio International, February 17, 2014. Catherine Donnelly and Paul Embrechts. The devil is in the tails: actuarial mathematics and the subprime mortgage crisis. ASTIN Bulletin: The Journal of the IAA, 40(1):1–33, 2010. Gianclaudio Malgieri and Giovanni Comande. Why a right to legibility of automated decision-making exists in the general data protection regulation. International Data Privacy Law, 2017. David Leake. Evaluating Explanations: A Content Theory. New York: Psychology Press, 1992. Richard E Nisbett and Timothy D Wilson. Telling more than we can know: Verbal reports on mental processes. Psychological Review, 84(3):231–259, 1977. William F. Messier, Jr, William C. Quilliam, D. E. Hirst, and Don Craig. The effect of accountability on judgment: Development of hypotheses for auditing; discussions; reply. Auditing, 11:123, 1992. URL http://search.proquest.com.ezp-prod1.hul.harvard.edu/docview/216730107?accountid=11311. Jenny de Fine Licht. Do we really want to know? the potentially negative effect of transparency in decision making on perceived legitimacy. Scandinavian Political Studies, 34(3):183–201, 2011. ISSN 1467-9477. doi: 10.1111/j.1467-9477.2011.00268.x. URL http://dx.doi.org/10.1111/j.1467-9477.2011.00268.x. Sandra Wachter, Brent Mittelstadt, and Chris Russell. Counterfactual explanations without opening the black box: Automated decisions and the gdpr. arXiv preprint arXiv:1711.00399, 2017b. Jean-Luc Margot. No evidence of purported lunar effect on hospital admission rates or birth rates. Nursing research, 64(3):168, 2015. Klaus J Hopt. Comparative corporate governance: The state of the art and international regulation. The American Journal of Comparative Law, 59(1):1–73, 2011. Harold Krent. Laidlaw: Redressing the law of redressability. Duke Environmental Law and Policy Forum, 12(1):85–117, 2001. Corpus Juris Secundum. David G. Owen and Mary J. Davis. Owen & Davis on Prodcut Liability, 4th edition, 2017. 13 Lauren Guidice. New york and divorce: Finding fault in a no fault system. Journal of Law and Policy, 19 (2):787–862, 2011. David A Strauss. Discriminatory intent and the taming of brown. The University of Chicago Law Review, 56(3):935–1015, 1989. Joel H. Swift. The unconventional equal protection jurisprudence of jury selection. Northern Illinois University Law Review, 16:295–341, 1995. Justin D. Cummins and Belle Isle. Toward systemic equality: Reinvigorating a progressive application of the disparate impact doctrine. Mitchell Hamline Law Review, 43(1):102–139, 2017. Michael M O’Hear. Appellate review of sentence explanations: Learning from the wisconsin and federal experiences. Marquette Law Review, 93:751–794, 2009. Stephan Landsman. The civil jury in America. Law and Contemporary Problems, 62(2):285–304, 1999. Marco Tulio Ribeiro, Sameer Singh, and Carlos Guestrin. “why should i trust you?”: Explaining the predictions of any classifier. In KDD, 2016. Tao Lei, Regina Barzilay, and Tommi Jaakkola. arXiv:1606.04155, 2016. Rationalizing neural predictions. arXiv preprint Philip Adler, Casey Falk, Sorelle A Friedler, Gabriel Rybeck, Carlos Scheidegger, Brandon Smith, and Suresh Venkatasubramanian. Auditing black-box models for indirect influence. In Data Mining (ICDM), 2016 IEEE 16th International Conference on, pages 1–10. IEEE, 2016. Ruth Fong and Andrea Vedaldi. Interpretable explanations of black boxes by meaningful perturbation. arXiv preprint arXiv:1704.03296, 2017. Ramprasaath R Selvaraju, Abhishek Das, Ramakrishna Vedantam, Michael Cogswell, Devi Parikh, and Dhruv Batra. Grad-cam: Why did you say that? visual explanations from deep networks via gradientbased localization. arXiv preprint arXiv:1610.02391, 2016. Daniel Smilkov, Nikhil Thorat, Been Kim, Fernanda Viégas, and Martin Wattenberg. Smoothgrad: removing noise by adding noise. arXiv preprint arXiv:1706.03825, 2017. Avanti Shrikumar, Peyton Greenside, Anna Shcherbina, and Anshul Kundaje. Not just a black box: Interpretable deep learning by propagating activation differences. ICML, 2016. Pieter-Jan Kindermans, Kristof T Schütt, Maximilian Alber, Klaus-Robert Müller, and Sven Dähne. Patternnet and patternlrp–improving the interpretability of neural networks. arXiv preprint arXiv:1705.05598, 2017. Andrew Ross, Michael C Hughes, and Finale Doshi-Velez. Right for the right reasons: Training differentiable models by constraining their explanations. In International Joint Conference on Artificial Intelligence, 2017. Sameer Singh, Marco Tulio Ribeiro, and Carlos Guestrin. Programs as black-box explanations. arXiv preprint arXiv:1611.07579, 2016. Harris Drucker and Yann Le Cun. Improving generalization performance using double backpropagation. IEEE Transactions on Neural Networks, 3(6):991–997, 1992. Kevin P Murphy. Machine learning: a probabilistic perspective. Cambridge, MA, 2012. 14 Katherine M Newton, Peggy L Peissig, Abel Ngo Kho, Suzette J Bielinski, Richard L Berg, Vidhu Choudhary, Melissa Basford, Christopher G Chute, Iftikhar J Kullo, Rongling Li, et al. Validation of electronic medical record-based phenotyping algorithms: results and lessons learned from the emerge network. Journal of the American Medical Informatics Association, 20(e1):e147–e154, 2013. Been Kim, Justin Gilmer, Ulfar Erlingsson, Fernanda Viegas, and Martin Wattenberg. Tcav: Relative concept importance testing with linear concept activation vectors. 2017. Steffen Nolte. The spoliation tort: An approach to underlying principles. . Mary’s LJ, 26:351, 1994. Michael Cicero. Drug testing of federal government employees: Is harm resulting from negligent record maintenance actionable. U. Chi. Legal F., page 239, 1988. 15
2cs.AI
International Journal on Computational Science & Applications (IJCSA) Vol.5, No.4, August 2015 A HYBRID COA-DEA METHOD FOR SOLVING MULTI-OBJECTIVE PROBLEMS Mahdi Gorjestani1, Elham shadkam2, Mehdi Parvizi3 and Sajedeh Aminzadegan4 1,3,4 Department of Industrial Engineering, Faculty of Eng., Khayyam University, Mashhad, Iran 2 Ph.D. Candidate of Department of Industrial and Systems Engineering, Isfahan University of Technology, Isfahan, Iran, and Faculty Member of Industrial Engineering Department, Faculty of Eng, Khayyam University, Mashhad, Iran Abstract The Cuckoo optimization algorithm (COA) is developed for solving single-objective problems and it cannot be used for solving multi-objective problems. So the multi-objective cuckoo optimization algorithm based on data envelopment analysis (DEA) is developed in this paper and it can gain the efficient Pareto frontiers. This algorithm is presented by the CCR model of DEA and the output-oriented approach of it. The selection criterion is higher efficiency for next iteration of the proposed hybrid method. So the profit function of the COA is replaced by the efficiency value that is obtained from DEA. This algorithm is compared with other methods using some test problems. The results shows using COA and DEA approach for solving multi-objective problems increases the speed and the accuracy of the generated solutions. Keywords Multi-objective decision making (MODM), Data Envelopment Analysis (DEA), Cuckoo Optimization Algorithm (COA), Optimization. 1.Introduction Finding the best solution for an objective subject to some conditions calls optimization. In multiobjective problems, there is not an optimal solution that can optimize all objectives simultaneously. So, in order to solve problems the concept of Pareto frontiers is provided. Usually, there are some Pareto optimized solutions that the best solution will be selected from them by decision maker. Many practical problems in real world are multi-objective problem. Several researches developed for solving multi-objective problem. Ehrgott and Gandibleux studied on the approximate and the accurate problems related to the combination method of multi-objective problems [1]. Arakawa et al. combined the General DEA and the Genetic Algorithm to generate the efficient frontier in multi-objective optimization problems [2]. Deb used the evolutionary algorithms for solving the multi-objective problem [3]. DOI:10.5121/ijcsa.2015.5405 51 International Journal on Computational Science & Applications (IJCSA) Vol.5, No.4, August 2015 Nakayama et al. drew the Pareto frontier of the multi-objective optimization problems using DEA in 2001 [4]. Deb et al. obtained the Pareto frontier of the multi-objective optimization problem using Genetic Algorithm [5]. Kristina Vincova gained the Pareto frontier using DEA [6]. ReyesSierra and Coello Coello investigated the method to solve the multi-objective optimization using the particle swarm algorithm [7]. Cooper et al. and Tone improved the multi-objective optimization algorithm using DEA and developed related software [8]. Pham and Ghanbarzadeh solved the multi-objective optimization algorithm using the Bees Algorithm [9]. Nebro et al. investigated a new method for multi-objective optimization algorithm based on the particle swarm algorithm [10]. Yun et al. studied the solution of multi-objective optimization algorithm using the GA and DEA. Also, they applied their method to generating the Pareto efficient frontiers [11]. Yang and Deb used the Cuckoo optimization algorithm in order to solve the multi objective-problem [12]. In this article, it is tried to use the meta-heuristic Cuckoo algorithm with the DEA approach for solving multi-objective problems and draw the Pareto frontiers for efficient points of the considered objective functions. Because of using CCR model of DEA, proposed method only applicable to generating the convex efficient frontier. In the second section, the Cuckoo algorithm is introduced. In the third section the multi-objective problems are defined. In the fourth section, the concept of DEA is explained. The fifth section expresses the proposed hybrid method and in the sixth section the test problems are given. At last the desired conclusion is provided. 2.Introducing the Cuckoo optimization algorithm The COA is one of the best and newest evolutionary algorithms. After early evolutionary methods like Genetic algorithm (GA), Simulated Annealing algorithm, so many evolutionary methods that inspired from the nature, have been developed. Some of the useful algorithms for solving complicated optimization problems are Particle Swarm Optimization (PSO), Ant Colony Optimization (ACO), Artificial Bee Colony algorithm (ABC) and the Artificial Fish Swarm algorithm. One of the other evolutionary algorithms that are developed in Iran is Imperialist Competitive Algorithm (ICA). This algorithm is inspired from the competitive system of the empires in order to get more colonies. After the ICA, the Cuckoo optimization algorithm is presented that has the ability to find the general optimized solutions. This algorithm is inspired from the life of a bird calls Cuckoo. The cuckoo living and egg laying method is a suitable inspiration for inventing an evolutionary algorithm. The survival with the least effort is the base of this method. This lazy bird forces other birds to play an important role in her survival so nicely. The Cuckoo optimization algorithm expanded by Yang and Deb in 2009. This algorithm is inspired by the egg laying method of cuckoos combined with the Levy Flight instead of simple random isotropic walk. The COA investigated with more details by Rajabioun in 2011 [13]. The flowchart of the COA is given in the Figure 1. 52 International Journal on Computational Science & Applications (IJCSA) Vol.5, No.4, August 2015 Figure1. The flowchart of COA algorithm For more information refers to [13]. 3.The multi-objective optimization problem The general form of a multi-objective optimization problem is as (1):    =  , , … ,   . .  =    ≤  ,  ≥ 0,   = 1, … , ! (1) $ = 1, . . . ,  As it shown, we encounter to several numbers of the objectives in multi-objective problem. K is the number of objective functions that can be min or max type, m is the number of constraints and n is the number of decision variables. In multi-objective algorithms, there is not an optimal solution that can optimize all of the objective functions simultaneously. So the concept of Pareto optimized solution is provided. The Pareto optimal concept is explicable this way. &∗ =  ... , ,   is an optimal Pareto, if for each allowable x( and i={1,2,..k}, we have (for minimizing problem is as (2)): 53 International Journal ournal on Computational Science & Applications (IJCSA) Vol.5, No.4, August 2015 (2) In other words, x* is an optimal Pareto solution when no other x exist that make at least one objective function in order to optimizing some of the objective functions. Data Envelopment Analysis 4.Data DEA is a linear programming technique. Its main purpose is comparing and evaluating the efficiency of a number of similar decision making units like banks, hospitals, schools, refineries, power plants etc. that the amount of their consum consumed input and production tion output are different. DEA shows the concept of evaluating the efficiency within a group of DMUs.. In this method the efficiency of each DMU is calculated according to other DMUs that have the most operations. The first model of DEA is CCR, defining the efficiency according to the ratio of an output on an input, is the base of this method [6]. In other words, calculating the ratio of total weighed of outputs on total weighed of inputs instead of the ratio of an output on an input is used for evaluating the efficiency in CCR model. The CCR model The CCR model is the first model of DEA and its named is the first letters of the names of its providers (Charnes, Cooper, Rhodez) [4]. For determining the best efficient unit, the amounts of inputs and outputs of other decision m making units in finding the optimal imal weights for each unit is evaluated. This basic model is suggested as (3): m Min ∑ Vi x io i =1 k m ∑ u r y rj − r =1 ∑v x i ij ≤0 j = 1,..., n (3) i =1 k ∑u y s.t . r ro =1 r =1 ur ≥ 0 vi ≥ 0 Where ur is the weight of output r, vi is the weight of input i and o is the index of under reviewed DMU, (o ∈ {1, 2,..., n}) . yro is the amount of output r and xio is the amount of input i for DMUo. Also yij is the amount of output r and xij is the amount of input i for the unit j. k is the number of outputs; m is the number of inputs and n is the number of units. 54 International Journal on Computational Science & Applications (IJCSA) Vol.5, No.4, August 2015 5.The proposed hybrid algorithm In this paper, it is tried to present a hybrid method in order to solve the multi-objective problems using COA and DEA methods. This hybrid method finds the efficient points using DEA method and gains the Pareto frontiers for multi-objective problems. The steps of hybrid COA_DEA algorithm 1. In the first step of implementing the Cuckoo algorithm, the desired matrix will be formed from habitats according to the initial population of cuckoos and the initial egg laying radiuses. 2. The “profit function” of the Cuckoo algorithm will be replaced by the “efficiency value”. This function take the habitat matrix as its input according to this matrix, the CCR model will be produced for each habitats of the matrix and determines the efficiency for each habitat. 3. The habitats will be sorted according to their efficiency values and other steps will be as the explanations that are given in the references [13]. 4. In each iteration, the habitats with the efficiency of one will be selected as good solutions for transferring to next iteration. 5. At last iteration of the proposed algorithm, The Pareto frontiers for the main multiobjective optimization problem will be drawn out based on the obtained values of f1 and f 2. 6.SOLVING TEST PROBLEMS A number of test functions have been provided that can help to validate the proposed method in Table 1. Table 1. Test problems Parameters setting for cuckoo algorithm are as follow: 55 International Journal ournal on Computational Science & Applications (IJCSA) Vol.5, No.4, August 2015 Number of initial population=5, =5, minimum number of eggs for each cuckoo=2, maximum number of eggs for each cuckoo=6, maximum iterations of the Cuckoo Algorithm Algorithm=8, number of clusters that we want to make=2, maximum number of cuckoos that can live at the same time=50. time Test problem 1: [16] COA_DEA method Figure 1. Comparing the proposed method with other methods 56 International Journal ournal on Computational Science & Applications (IJCSA) Vol.5, No.4, August 2015 Test problem 2: [14] COA_DEA method GDEA method Ranking method Figure2.. Comparing the proposed method with other methods Test problem 3: [15] 57 International Journal ournal on Computational Science & Applications (IJCSA) Vol.5, No.4, August 2015 Figure 3.Comparing Comparing the proposed method with other methods Test problem 4: [15] Figure 4. Comparing the proposed method with other methods 7.Conclusion In this paper, it is tried to solve multi multi-objective objective problems with a new creative approach. This approach is a combination of the Cuckoo optimization algorithm and DEA method. As it shown this method is one of the fastest, most accurate and most logical met method hod for solving multimulti objective problems because it is a logical combination of both efficiency and finding the optimal solutions. We conclude that the proposed method not only finds optimal answers and more efficient points, but also it is faster in proce processing ssing time than other algorithms. The obtained Pareto 58 International Journal on Computational Science & Applications (IJCSA) Vol.5, No.4, August 2015 frontiers of this method were compared with the answers of similar algorithms like GA-DEA, Ranking method, GA-GDEA, etc. The algorithm’s convergence rate in order to find the answer is evident. So the suggested method is suitable and reliable method for solving multi-objective optimization problems. For further work, we can use another clustering method instead of current method for grouping the cuckoos. References [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] Ehrgott, M., Gandibleux, X., Bound Sets for Biobjective Combinatorial Optimization Problems, Computers & Operations Research, Vol. 34, Issue 9, pp. 2674-2694, 2007. Arakawa, M., Nakayama, H., Hagiwara, I., Yamakawa, H., Multiobjective Optimization using adaptive range genetic algorithms with data envelopment analysis, Symposium on Multidisciplinary Analysis and Optimization, 1998. Deb, K., Multi-Objective Optimization using Evolutionary Algorithms, John & Wiley Sons, Ltd., 2001. Yun, Y.B., Nakayama, H., Tanino, T., Arakawa, M., Generation of efficient frontiers in multiobjective optimization problems by generalized data envelopment analysis, European Journal of Operational Research, Vol.129, No.3, pp.586-595, 2001. Deb, K., Pratap, A., Agarwal, S., Meyarivan, T., A fast and elitist multiobjective genetic algorithm: NSGA-II. IEEE Trans. Evol. Comput.6(2), 182–197, 2002. Kristina Vincova, Using DEA Models to Measure Efficiency, 2005. Reyes-Sierra, M., Coello Coello, C.A., Multiple objective particle swarm optimizers: A survey of the state-of-art. International Journal of Computational Intelligence Research 2(3), 287–308, 2006. Cooper, W.W., Seiford, L.M., Tone, K., Data Envelopment Analysis: A Comprehensive Text with Models, Applications, References and DEA Solver Software. Springer, New York, 2007. Pham, D.T., Ghanbarzadeh, A., multi-objective optimization using the bees algorithm. In: Third international virtual conference on intelligent production machines and systems (IPROMS 2007): Whittles, Dunbeath, Scotland, 2007. Nebro, A.J., Durillo, J.J., Garc´ıa-Nieto, J., Coello Coello, C.A., Luna, F., Alba, E., SMPSO: A new PSO-based metaheuristic for multi-objective optimization. 2009 IEEE Symposium on Computational Intelligence in Multicriteria Decision-Making, IEEE Press, New York, pp. 66-73, 2009. Yun, Y., Nakayama, H., Utilizing expected improvement and generalized data envelopment analysis in multi-objective genetic algorithm, Journal of Global Optimization, Vol. 57, No. 2, pp. 367-384 2013. Yang, X.S. Deb, S., Multiobjective cuckoo search for design optimization, Computers & Operations Research, 40, 1616-1624, 2013. Rajabioun, R., (2011), Cuckoo Optimization Algorithm, Applied Soft Computing, Vol 1, pp 55085518, 2011. Yun, Y.B., Nakayama, H., Tanino, T., Arakawa, M., Generation of efficient frontiers in multi objective optimization problems by generalized data envelopment analysis, European Journal of Operational Research, 129, 586-595, 2001. Kalyanmoy Deb, Associate Member, IEEE, AmritPratap, Sameer Agarwal, and T. Meyarivan, A Fast and Elitist Multiobjective Genetic Algorithm: NSGA-II , IEEE TRANSACTIONS ON EVOLUTIONARY COMPUTATION, VOL. 6, NO. 2, 2002. Yun, Y., Nakayama, H., Arakdwa, M., Fitness Evaluation using Generalized Data Envelopment Analysis in MOGA, Evolutionary Computation, 2004. CEC2004. Congress on, 464 – 471, 2004. 59
9cs.NE
On the Covariance of ICP-based Scan-matching Techniques arXiv:1410.7632v3 [cs.CV] 16 Mar 2016 Silvère Bonnabel, Martin Barczyk and François Goulette Abstract— This paper considers the problem of estimating the covariance of roto-translations computed by the Iterative Closest Point (ICP) algorithm. The problem is relevant for localization of mobile robots and vehicles equipped with depthsensing cameras (e.g., Kinect) or Lidar (e.g., Velodyne). The closed-form formulas for covariance proposed in previous literature generally build upon the fact that the solution to ICP is obtained by minimizing a linear least-squares problem. In this paper, we show this approach needs caution because the rematching step of the algorithm is not explicitly accounted for, and applying it to the point-to-point version of ICP leads to completely erroneous covariances. We then provide a formal mathematical proof why the approach is valid in the pointto-plane version of ICP, which validates the intuition and experimental results of practitioners. I. I NTRODUCTION This paper considers the covariance of relative rototranslations obtained by applying the well-known Iterative Closest-Point (ICP) algorithm [1], [2] to pairs of successive point clouds captured by a scanning sensor moving through a structured environment. This so-called scan matching [3], [4], [5] is used in mobile robotics, and more generally autonomous navigation, to incrementally compute the global pose of the vehicle. The resulting estimates are typically fused with other measurements, such as odometry, visual landmark detection, and/or GPS. In order to apply probabilistic filtering and sensor fusion techniques such as the extended Kalman filter (EKF) e.g. [6], [7], EKF variants [8], [9], particle filtering methods, or optimization-based smoothing techniques to find a maximum likelihood estimate as in Graph SLAM [10], the probability distribution of the error associated to each sensor is required. Since these errors are typically assumed to be zero-mean and normally distributed, only a covariance matrix is needed. Contrarily to conventional localization sensors, the covariance of relative roto-translation estimates will not only depend on sensor noise characteristics, but also on the geometry of the environment. Indeed, when using ICP for scan matching, several sources of errors come into play: 1) the presence of geometry in one scan not observed in the subsequent one(s), that is, lack of overlapping. 2) mismatching of points, that is, if scans start far from each other the ICP may fall into a local (not global) minimum, yielding an erroneous roto-translation estimate. Silvère Bonnabel and François Goulette are with MINES ParisTech, PSL - Research University, Centre de robotique, 60 Bd St Michel 75006 Paris, France {firstname.lastname}@mines-paristech.fr Martin Barczyk is with the Department of Mechanical Engineering, University of Alberta, Edmonton AB, T6G 1H9, Canada [email protected] 3) even if 1) and 2) do not occur, the computed estimate will still possess uncertainty due to sensor noise and possibly underconstrained environments, such as a long featureless corridor. In practice, the first problem can be addressed by rejecting point pairs with excessive distance metrics or located close to the scanning boundaries [11], and the second by using dead reckoning estimates to pre-align scans or employing a sufficiently fast sampling rate. We will thus focus on the third source of error. The covariance of estimates obtained from a scan matching algorithm (such as ICP) can be obtained as follows [12], [13]. The estimated transformation x̂ output by the algorithm is defined as a local argmin of a cost function J(x, z) of the transformation x and the data z (scanned point clouds). As ∂ J(x̂, z) = 0. By the implicit a result we always have ∂x function theorem x̂ is a function of the data z around this minimum. Because of the above identity, a small variation δz in the data will imply a small variation δx in the estimate 2 2 ∂2J ∂2J as ∂∂xJ2 δx + ∂z∂x δz = 0, so that δx = −( ∂∂xJ2 )−1 ∂z∂x δz. As a result if δz denotes the (random) discrepancy in the measurement due to sensor noise, the corresponding variability in the estimates δx = x̂ − x gives E(δxδxT ) = cov(x̂) as  2 −1 2 T  2 −1 ∂ J ∂ J ∂2J ∂ J cov(x̂) := cov(z) (1) 2 ∂x ∂z∂x ∂z∂x ∂x2 Our goal is to point out the potential lack of validity of this formula for ICP covariance computation, but also to characterize situations where it can safely be used. Specifically, the 2 ∂2J problem with (1) is that it relies on δx = −( ∂∂xJ2 )−1 ∂z∂x δz, which is based on the local implicit function theorem, and which only holds for infinitesimal variations δx, δz. In the case of ICP, infinitesimal means sub-pixel displacements. Indeed when matching scans, the rematching step performed by the ICP makes the cost function far from smooth, so that the Taylor expansion ∂J ∂J(x̂, z) ∂ 2 J(x̂, z) (x̂ + ∆x, z) = + ∆x + O(∆x2 ) (2) ∂x ∂x ∂x2 which is true in the limit ∆x → 0 may turn out to be completely wrong for displacements ∆x larger than only a few pixels. An example of this will be given in Section II-A.2. On the other hand, if the registration errors are projected onto a reference surface as in point-to-plane ICP [2], Equation (1) will provide valid results. This will be formally proven in Section III. Our paper is an extension and rigorous justification of the results of [13] and [14]. Our main contributions are to point out the potential shortcomings of a blind application of (1) to point-to-point ICP in Section II, and then to provide a formal mathematical proof based on geometry arguments in Section III for the validity of (1) for point-to-plane ICP. Finally the results are illustrated on a simple 3D example in Section IV. II. M ATHEMATICAL FRAMEWORK Consider using ICP for scan matching (either in 2D or 3D). We seek to find the transformation between two clouds of points {pk }1≤k≤N and {qi }1≤i≤M . This transformation is X = (R, p), a roto-translation such that the action of X on a vector p is Xp := Rp + T . Let π(k, X) denote the label j of the point qj in the second cloud which is the closest to Xpk . The basic point-to-point ICP [1] consists of the following steps: 1) initialize Xold = (I, 0) 2) choose a set of N indices k and define π(k, Xold ) such that qπ(k,Xold ) is the point in the second cloud which is the closest to Xold pk P 3) find Xnew as the argmin of k ||Xnew pk − qπ(k,Xold ) ||2 4) if Xnew converged to Xold then quit, else Xold = Xnew and goto 2) We see that the goal pursued by the ICP is to minimize the function X J({pi }, {qi }; σ, X) := ||Xpk − qσ(k) )||2 (3) k over the roto-translation X and the matching σ : {1, · · · , N } 7→ {1, · · · , M }. As a result, ICP acts as a coordinate descent which alternatively updates X as the argmin X of J for a fixed π, and the argmin π of J for a fixed X (the latter being true only for point-to-point ICP). This is what allows to prove local convergence of point-to-point ICP as done in [1]. Because of the huge combinatorial problem underlying the optimization task of jointly minimizing J over the transformation and the matching, ICP provides a simple and tractable (although computationally heavy) approach to estimate X. The ICP algorithm possesses many variants, such as the point-to-plane version where the cost function is replaced by X J({pi }, {qi }; σ, X) := ||(Xpk − qσ(k) ) · nσ(k) ||2 (4) k that is, the registration error is projected onto the surface unit normal vector of the second cloud at qσ(k) . An alternative to this in 2D exploited in [13] consists of creating a reference surface Sr in R2 by connecting adjacent points in the second cloud {qi } with segments, and then employing cost function X J(Sr , {pk }; X) := ||Xpk − Π(Sr , Xpk )||2 (5) k where Π(Sr , ·) is the projection onto the surface Sr . Definition 1 We define the ICP cost function as J({pi }, {qi }; π(·, X), X), that is, the error function J({pi }, {qi }; σ, X) with closest neighbor matching. Definition 2 The stability of the ICP in the sense of [14] is defined as the variation of the ICP cost function when X moves a little away from the argmin X̂. Definition 2’s terminology comes from the theory of dynamical systems. Indeed, the changes in the ICP cost indicate the ability (and speed) of the algorithm to return to its minimum when it is initialized close to it. If the argmin X̂ is changed to X̂ +δX and the cost does not change, then the ICP algorithm output will remain at X̂ + δX and will not return to its original value X̂. Meanwhile, although closely related, the covariance is rooted in statistical considerations and not in the dynamical behavior of the algorithm: Definition 3 The covariance of the ICP algorithm is defined as the statistical dispersion (or variability), due to sensor noise, of the transformation X̂ computed by the algorithm over a large number of experiments. A. Potential lack of validity of (1) 1) Mathematical insight: Consider the ICP cost function J({pi }, {qi }; π(X, ·), X). To simplify notation we omit the point clouds and we let F (X) be the function X → J(π(X, ·), X). At convergence we have by construction of the ICP algorithm at the argmin ∂2 J(π(X̂, ·), X̂) = 0, where the ∂2 denotes the derivative with respect to the second argument. As the closest point matching X → π(X, ·) is locally constant (except on a set of null measure), since an infinitesimal change of each point does not change the nearest neighbors except if the point is exactly equidistant to two distinct points, we have d2 F (X̂) = ∂22 J(π(X̂, ·), X̂) dX 2 that is, the matching can be considered as fixed when computing the Hessian of X → J(π(X, ·), X) at the argmin. But the first-order approximation ∂2 J(π(X̂ + δX, ·), X̂ + δX) ≈ ∂2 J(π(X̂, ·), X̂) + ∂22 J(π(X̂, ·), X̂)δX can turn out to very poorly model the stability of the algorithm at the scale δX = ∆X of interest to us, precisely because when moving away from the current argmin, rematching occurs and thus π(X̂ + ∆X, ·) 6= π(X̂, ·). Whereas a closed form estimate of ∂22 J(π(X̂, ·), X̂) is easy to calculate, obtaining a Taylor expansion around the minimum which accounts for rematching would require sampling the error function all around its minimum, leading to high computational cost [15]. 2) Illustration: Consider a simple 2D example of a scanner moving parallel to a flat wall using point-to-point ICP. Figures 1 and 2 illustrate the fallacy of considering a secondorder Taylor expansion of the cost, i.e. computing the cost with fixed matching. Indeed, Fig. 2 displays the discrepancy between the true ICP cost and its second-order approximation around the minimum when moving along a 2D wall. We see that rematching with closest point correctly reflects the underconstraint/inobservability of the environment, since the cost function is nearly constant as we move along the featureless wall. On the other hand, the second-order approximation ∂2J does not. This proves the Hessian ∂X 2 to the cost at the minimum does not correctly reflect the change in the cost function value, and thus the stability of the algorithm. parameter and wi a noise, the covariance of the least squares estimate over a great number of experiments is cov(x̂) = E (x̂ − x)(x̂ − x)T  X X  T  −1 T −1 T =E A Bi wi A Bj wj i = A−1 XX i j  BiT E(wi wjT )Bj A−1 (8) j which indeed agrees with (1). Furthermore, if the wi ’s are identically distributed independent noises with covariance matrix E(wi wjT ) = σ 2 Iδij , we recover the well-known result [16, Thm. 4.1] that X  cov(x̂) = σ 2 A−1 BiT Bi A−1 = σ 2 A−1 Fig. 1. Point-to-point ICP illustration. (a) The first cloud is made of 10 equally spaced collinear points (e.g., scans of a flat wall), the second cloud is obtained by duplication. To ensure overlap we focus on the central points. (b) While translating the second cloud to the right, no re-matching occurs. (c) Translation and re-matching with closest points. The costs J corresponding to cases b and c are shown in Fig. 2. i meaning the (half) Hessian to the cost function A encodes the covariance of the estimate. C. Application to point-to-point ICP The application of the least-squares covariance formulas to point-to-point ICP can be done as follows [17]. Note in the 3D case the roto-translation X is a member of SE(3), the Special Euclidean Lie group with associated Lie algebra se(3) 3 ξ. Using homogeneous coordinates this writes   R p X= , R ∈ SO(3), p ∈ R3 0 1   S(xR ) xT ξ= , xR ∈ R3 , xT ∈ R3 0 0 Fig. 2. Point-to-point ICP results from Fig. 1. Dashed line: plot of the second-order approximation to the cost J(π(X̂, ·), X̂) + 0 + ∂2 J(π(X̂, ·), X̂)(X − X̂)2 versus translations. Due to the quadratic ∂X 2 form of the cost (3) the second-order approximation is also equal to J(π(X̂, ·), X), i.e. the cost with matching held fixed (Fig 1 case b). Solid line: Plot of the true ICP cost J(π(X, ·), X), i.e. accounting for re-matching with closest points (Fig 1 case c). Regarding covariance, it is easy to see that Equation (1) will not reflect the true covariance of the ICP either, as the true covariance should be very large (ideally infinite) along ∂2J the wall’s direction, which can only happen if ∂X 2 is very small, but which is not the case here. B. Covariance of linear least-squares Consider the linear least-squares minimization problem with cost function X J(x) = ||di − Bi x||2 (6) i The solution is of course X −1  X  T T x̂ = Bi Bi Bi di i (7) i P Let A := ( i BiT Bi ), which represents the (half) Hessian 1 2 T = A. If the 2 ∂2 J of the cost function J. Note that A measurement di satisfies di = Bi x + wi where x is the true where S(·) is the 3 × 3 skew-symmetric matrix S(a)T = −S(a) such that S(a)b = a × b, a, b ∈ R3 . The map exp : se(3) → SE(3) is the matrix exponential eξ := I + ξ + (1/2!)ξ 2 + · · · . As explained in Section I, we can assume the scans to be aligned by ICP start out close to each other. This means X ∈ SE(3) is close to identity and ξ ∈ se(3) is close to zero, such that X = eξ ≈ I + ξ =⇒ Xp ≈ p + xR × p + xT . (9) We can thus consider the ICP estimate X̂ as parameterized by x̂ = (x̂R , x̂T ) ∈ R6 . Specifically we define the linear map L : R6 → se(3), L(x̂) = ξˆ such that I +L(x̂) ≈ X̂ 3 SE(3) for X̂ close to identity. The output model Ym of the ICP is then written as Ym = X̂ = I + L(x̂) = I + L(x) + L(δx) = X + L(δx) where δx = x̂ − x and L(δx) can be viewed as a zero-mean noise term with associated covariance E(δxδxT ) = cov(x̂) by (1). Using (9) in the point-to-point ICP, the cost function (3) with matching fixed at its convergence value x̂ writes X J(π(x̂, ·), x) = kpi + S(xR )pi + xT − qπ(x̂,i) k2 i which can be rewritten in the sum-of-squares form (6) with di = pi − qπ(x̂,i) , Bi = [S(pi ) − I] P The Hessian A = 12 ∂22 J = i BiT Bi is then equal to X −S(pi )2 S(pi ) i −S(pi ) I D. Application to point-to-plane ICP For point-to-plane ICP, the cost function (4) with matching fixed at its convergence value x̂ and approximation (9) is given by X 2 J(π(x̂, ·), x) = (xR × pi + xT + pi − qπ(x̂,i) ) · nπ(x̂,i) i Using the scalar triple product circular property (a × b) · c = (b × c) · a, this can also be rewritten in form (6) with di = nTπ(x̂,i) (pi − qπ(x̂,i) ) h i Bi = −(pi × nπ(x̂,i) )T −nTπ(x̂,i) P and the Hessian A = 12 ∂22 J = i BiT Bi is equal to " # X (pi × nπ(x̂,i) )(pi × nπ(x̂,i) )T (pi × nπ(x̂,i) )nT π(x̂,i) nπ(x̂,i) (pi × nπ(x̂,i) ) nπ(x̂,i) nTπ(x̂,i) i The above expression models the Hessian of J({pi }, {qi }; x, π(x̂, ·)) and was given in [14], who argue by intuition that it models the stability of the point-toplane ICP algorithm. We will formally prove this fact — that the point-to-plane Hessian correctly captures the behavior of the true ICP cost function J({pi }, {qi }; x, π(x, ·)) around x̂ — in Section III. III. A RIGOROUS MATHEMATICAL RESULT FOR POINT- TO - PLANE ICP The present section is devoted to prove that as far as pointto-plane ICP is concerned, and unlike the point-to-point case, Equation (2) and hence (1) is indeed valid, even for large ∆x. In fact, a bound on ∆x depending on the curvature of the scanned surface is given, allowing to characterize the domain of validity of the formula. This result is novel and provides a rigorous framework to justify the intuitive arguments in [14]. Theorem 1 Consider a 2D environment made of (an ensemble of disjoint) smooth surface(s) Sr having maximum curvature κ. Consider a cloud of points {ai } obtained by scanning the environment. Consider the cost J(π(x, ·), x) obtained by matching the cloud {ai } with the displaced cloud {ai } + xR × {ai } + xT where x := (xR , xT ) are the motion parameters. As 0 is a global minimum the gradient vanishes at x = 0. The following second-order Taylor expansion J(π(x + ∆x, ·), x + ∆x) = J(π(0, ·), 0) + ∂22 J(π(0, ·), 0)||∆x||2 + O(κ||∆x||3 ) (10) is valid for ∆x sufficiently small, but large enough to let rematching occur. Note that if the environment is made of disjoint planes, we have κ = 0 and both cost functions agree exactly. The remainder of this section is devoted to the proof of the theorem, and a corollary proving the result remains true in 3D. A. Details of result The proof of the previous theorem is based on the following. Proposition Consider the assumptions of Theorem 1. Around the minimum x = 0 the cost with fixed matching J(π(0, ·), x) X 2 = (ai + xR × ai + xT − aπ(0,i) ) · ni i differs from the true ICP cost in the following way J(π(x, ·), x) X 2 = (ai + xR × ai + xT − aπ(x,i) ) · ni + ψi i where the approximation error ψi is already second order in the function arguments as |ψi | ≤ 8κ(kxR × ai + xT k)2 as long as κ|si − sπ(x,i) | ≤ 1 where si and sπ(x,i) denote the curvilinear abscissae of the points ai and aπ(x,i) along the surface Sr . To begin with, note that the condition κ|si − sπ(x,i) | ≤ 1 is independent of the chosen units as κ|si − sπ(x,i) | is dimensionless. To fix ideas about the validity condition, assume the environment is circular with an arbitrary radius. The above condition means that the Taylor expansion is proved valid as long as the displacement yields a rematching with the nearest neighbor at most 1 rad (57.3◦ ) along the circle from the initial point. We see this indicates a large domain of validity. Note that in case where the environment is a line both functions coincide exactly. Fig. 3. Illustration for the proof. To prove the result, assume the surface where point i lies is parameterized by γ(s) with curvilinear abscissa s, and with maximum curvature κ. Such a curve has tangent vector γ 0 (s) with kγ 0 (s)k = 1 and normal vector γ 00 (s) with kγ 00 (s)k ≤ κ, the curvature. The point cloud {ai } ∈ R2 is obtained by scanning this environment at discrete points γ(s1 ), γ(s2 ), · · · . We assume the surfaces (here curves) are sufficiently disjoint so that under the assumptions of the Proposition, ai and its closest point aπ(x,i) lie on the same curve of maximum curvature κ. By writing xR × ai + xT + ai −aπ(x,i) = xR ×ai +xT +ai −aπ(0,i) +aπ(x,i) we see the error made for each term i is ψ := (aπ(0,i) − aπ(x,i) ) · ni = (ai − aj ) · ni where we let j := π(x, i) and we used the obvious fact that π(0, i) = i. To study ψi expand γ(s) about s = si using Taylor’s theorem with remainder: Z s 0 γ 00 (u)(u − si )du γ(s) = γ(si ) + γ (si )(s − si ) + si Take s = sπ(x,i) := sj and project along the normal ni : (γ(sj ) − γ(si )) · ni = (sj − si )γ 0 (si ) · ni Z sj γ 00 (u) · ni (u − si )du + si Note γ 0 (si ) · ni = 0 since γ 0 (si ) is the (unit) tangent vector to the curve at s = si . Taking absolute values of both sides, 1 [max kγ 00 (ũ)k]|sj − si |2 2 u 1 ≤ κ|sj − si |2 2 1 2 ≤ κ (4kxR × ai + xT k) 2 |ψi | = |(bj − bi ) · ni | ≤ IV. I LLUSTRATION OF THE RESULTS IN 3D The covariance of scan matching estimates is computed using Equation (8), which requires a model of the measurement noise wi via its covariance E(wi wjT ). Modeling noise of depth sensors is a separate topic and will not be considered in the present paper. Regardless, it’s clear from (8) that the Hessian A of the cost function plays a key role in this computation. We now demonstrate using a very simple numerical example in 3D that the Hessian of the point-toplane correctly models the behavior of the ICP algorithm. Consider a 3D scan {pi } of a plane wall by a depth camera located perpendicularly d units away as shown in Figure 4. A depth image of NH by NV pixels (function of the hardware) captures a surface measuring H by V units (function of the optical field of view and distance d) such that ai = [xi yi d]T where −H/2 ≤ xi ≤ H/2, −V /2 ≤ yi ≤ V /2. H as claimed. Only the last inequality needs be justified. It stems from the following result: (0,0,d) Lemma If no rematching occurs, i.e. i = j, then ψi = 0. If i 6= j, we have for κ|si − sj | ≤ 1 the inequality |si − sj | ≤ 4kxR × ai + xT k. Indeed, rematching occurs only if the displaced point xR × ai + xT is closer to aj , as illustrated in Fig. 3. But this implies the distance between the displaced point and ai is greater than half the distance between ai and aj (see Fig. 3), that is kaj − ai k ≤ 2kai + xR × ai + xT − ai k. Now, another 0 Taylor R sj 00 expansion yields γ(sj ) −0 γ(si ) = γ (si )(s00j − si ) + γ (u)(u − si )du. Using kγ (s)k = 1 and kγ (s)k ≤ κ si we get kγ(sj ) − γ(si )k ≥ |sj − si | − 12 κ(sj − si )2 ≥ 12 |sj − si |, the latter inequality steming from the assumption that κ|sj − si | ≤ 1. Gathering those results we have thus proved 2kxR ×ai +xT k ≥ kaj −ai k := kγ(sj )−γ(si )k ≥ 1 |sj −si | 2 which allows to prove the Lemma, and in turn the Proposition. B. Extension to the 3D case Corollary The results hold in 3D where κ denotes the maximum of the Gauss principal curvatures. The corollary can be proved in exactly the same way as the theorem, by studying the discrepancy between both cost functions term-by-term. The idea is then merely to consider the plane spanned by the unit normal ni and the segment relating ai and aj . This plane intersects the surface Sr at a curve, and the same process can be applied as in the 2D case. The curvature of this curve is by definition less than the maximum Gauss principal curvature of the surface. V z x y Fig. 4. Scan of 3D plane wall with NH horizontal and NV vertical points distributed symmetrically about origin. Assume a previous scan {qi } with associated surface normals {ni } was captured with the same camera orientation at distance d0 such that qi = [x0i yi0 d0 ]T , ni = [0 0 −1]T where −H 0 /2 ≤ x0i ≤ H 0 /2, −V 0 /2 ≤ yi0 ≤ V 0 /2. From Section II-D we have  2  yi −xi yi 0 0 0 yi −xi yi x2i 0 0 0 −xi   X  0 0 0 0 0 0    A=  0 0 0 0 0 0   i   0 0 0 0 0 0  yi −xi 0 0 0 1   Ψ 0 0 0 0 0 0 Ξ 0 0 0 0    0 0 0 0 0 0    =  0 0 0 0 0 0  0 0 0 0 0 0  0 0 0 0 0 N P 2 P 2 P where xi := Ξ, yi := Ψ and 1 := N are non-zero. By inspection this A possesses three zero eigenvalues with associated eigenvectors (e3 , e4 , e5 ) ∈ R6 , indicating that in this case rotations about the z axis and translations along the x and y axes are unobservable to scan matching, which agrees with physical intuition about Figure 4. Although A is singular, (8) can still be computed by removing x3 , x4 and x5 from the state vector x = [xR xT ], thus deleting the third, fourth and fifth columns of Bi or equivalently rows and columns of A. In this way only the covariance of observable parameters will be estimated. Now consider using the point-to-point Hessian given in Section II-C. In this case we have  2  d + yi2 −xi yi −dxi 0 −d yi  −xi yi d2 + x2 −dyi d 0 −xi  i   2 2 X  −dxi −dyi xi + yi −yi xi 0    A=  0 d −yi 1 0 0    i  −d 0 xi 0 1 0  yi −xi 0 0 0 1   2 Nd + Ψ 0 0 0 −N d 0  0 N d2 + Ξ 0 Nd 0 0    0 0 Ξ + Ψ 0 0 0   = 0 Nd 0 N 0 0    −N d 0 0 0 N 0 0 0 0 0 0 N By inspection this A is full rank and so it does not have zero eigenvalues. Since we know there are three unobservable directions, the point-to-point ICP Hessian provides a completely wrong model of the scan matching observability (and in turn covariances), exactly as predicted. V. C ONCLUSION In this paper we have provided a rigorous mathematical proof — a novel result to the best of our knowledge — why the closed-form formula (1) and its linearized version (8) provide correct roto-translation estimate covariances only in the point-to-plane variant of ICP, but not point-to-point. This paper has not investigated the modeling of the noise term wi which appears in the linearized covariance formula (8). We know that assuming this term to be independent and identically distributed Gaussian noise will lead to erroneous (overly optimistic) estimates of covariance, as noted in [17] for instance. We are currently investigating how to rigorously derive a closed-form expression to obtain a valid and realistic covariance matrix for 3D depth sensorbased scan matching. ACKNOWLEDGMENTS The work reported in this paper was partly supported by the Cap Digital Business Cluster TerraMobilita Project. R EFERENCES [1] P. J. Besl and N. D. McKay, “A method for registration of 3-D shapes,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 14, no. 2, pp. 239–256, February 1992. [2] Y. Chen and G. Medioni, “Object modelling by registration of multiple range images,” Image and Vision Computing, vol. 10, no. 3, pp. 145– 155, April 1992. [3] F. Lu and E. E. Milios, “Robot pose estimation in unknown environments by matching 2D range scans,” in Proceedings of the 1994 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, Seattle, WA, June 1994, pp. 935–938. [4] A. V. Segal, D. Haehnel, and S. Thrun, “Generalized-ICP,” in Robotics: Science and Systems V, J. Trinkle, Y. Matsuoka, and J. Castellanos, Eds. MIT Press, 2009, pp. 161–168. [5] M. Jaimez and J. Gonzalez-Jimenez, “Fast visual odometry for 3-D range sensors,” IEEE Transactions on Robotics, vol. 31, no. 4, pp. 809–822, August 2015. [6] J. Nieto, T. Bailey, and E. Nebot, “Recursive scan-matching SLAM,” Robotics and Autonomous Systems, vol. 55, no. 1, pp. 39–49, January 2007. [7] A. Mallios, P. Ridao, D. Ribas, F. Maurelli, and Y. Petillot, “EKFSLAM for AUV navigation under probabilistic sonar scan-matching,” in Proceedings of the 2010 IEEE/RSJ International Conference on Intelligent Robots and Systems, Taipei, Taiwan, October 2010, pp. 4404–4411. [8] T. Hervier, S. Bonnabel, and F. Goulette, “Accurate 3D maps from depth images and motion sensors via nonlinear kalman filtering,” in Proceedings of the 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, Vilamoura, Algarve, Portugal, October 2012, pp. 5291–5297. [9] M. Barczyk, S. Bonnabel, J.-E. Deschaud, and F. Goulette, “Invariant EKF design for scan matching-aided localization,” IEEE Transactions On Control Systems Technology, vol. 23, no. 6, pp. 2440–2448, November 2015. [10] G. Grisetti, R. Kümmerle, C. Stachniss, and W. Burgard, “A tutorial on graph-based SLAM,” IEEE Intelligent Transportation Systems Magazine, vol. 2, no. 4, pp. 31–43, 2010. [11] S. Rusinkiewicz and M. Levoy, “Efficient variants of the ICP algorithm,” in Proceedings of the Third International Conference on 3-D Digital Imaging and Modeling, Quebec City, Canada, May 2001, pp. 145–152. [12] A. K. R. Chowdhury and R. Chellappa, “Stochastic approximation and rate-distortion analysis for robust structure and motion estimation,” International Journal of Computer Vision, vol. 55, no. 1, pp. 27–53, 2003. [13] A. Censi, “An accurate closed-form estimate of ICP’s covariance,” in Proceedings of the 2007 IEEE International Conference on Robotics and Automation, Roma, Italy, April 2007, pp. 3167–3172. [14] N. Gelfand, L. Ikemoto, S. Rusinkiewicz, and M. Levoy, “Geometrically stable sampling for the ICP algorithm,” in Proceedings of the Fourth International Conference on 3–D Digital Imaging and Modeling, Banff, Canada, October 2003, pp. 260–267. [15] O. Bengtsson and A.-J. Baerveldt, “Robot localization based on scanmatching — estimating the covariance matrix for the IDC algorithm,” Robotics and Autonomous Systems, vol. 44, no. 1, pp. 29–40, July 2003. [16] S. M. Kay, Fundamentals of Statistical Signal Processing: Estimation Theory. Prentice Hall, 1993. [17] O. Bengtsson and A.-J. Baerveldt, “Localization in changing environments – estimation of a covariance matrix for the IDC algorithm,” in Proceedings of the 2001 IEEE/RSJ International Conference on Intelligent Robots and Systems, Maui, Hawaii, USA, October 2001, pp. 1931–1937.
3cs.SY
ON BOUSFIELD’S PROBLEM FOR SOLVABLE GROUPS OF FINITE PRÜFER RANK arXiv:1704.02212v1 [math.KT] 7 Apr 2017 SERGEI O. IVANOV Abstract. For a group G and R = Z, Z/p, Q we denote by ĜR the R-completion of G. We study the map Hn (G, K) → Hn (ĜR , K), where (R, K) = (Z, Z/p), (Z/p, Z/p), (Q, Q). We prove that H2 (G, K) → H2 (ĜR , K) is an epimorphism for a finitely generated solvable group G of finite Prüfer rank. In particular, Bousfield’s HK-localisation of such groups coincides with the K-completion for K = Z/p, Q. Moreover, we prove that Hn (G, K) → Hn (ĜR , K) is an epimorphism for any n if G is a finitely presented group of the form G = M ⋊ C, where C is the infinite cyclic group and M is a C-module. Introduction Throughout the paper R denotes one of the rings Z, Q, Z/p and K denotes one of the fields Q or Z/p, where p is prime. If R and K occur together, we assume that K is a quotient of R. In other words, there are three variants for (R, K) ∶ (R, K) ∈ { (Z, Z/p), (Z/p, Z/p), (Q, Q) }. Bousfield in [6] introduces the R-homological localization XR of a space X. It is a space XR with an R-homology equivalence X → XR , which is universal among all R-homology equivalences X → Y. He proves that the R-localization exists for any space. The R-localization is well understood for 1-connected spaces. However, if X is not 1-connected, even the computation of π1 (XR ) can be a very difficult problem. Bousfield reduces the problem to a purely algebraic problem introducing the HR-localization GHR of a group G. It is a group GHR together with a homomorphism G → GHR that induces an isomorphism on the level of the first homology H1 (G, R) ≅ H1 (GRH , R), an epimorphism on the level of the second homology H2 (G, R) ↠ H2 (GHR , R) and which is universal among such homomorphisms G → H. He proves that the HR-localization exists for any group and π1 (XR ) = π1 (X)HR . The construction of the HR-localization is not explicit and it is still difficult to compute it. But we can compare the HR-localization with the more explicit construction of R-completion of a group G, which is defined as follows ⎧ ⎪ if R ∈ {Z, Z/p} ⎪lim G/γiR G, ĜR = ⎨←Ð Q ⎪ lim G/γi G ⊗ Q, if R = Q, ⎪ ⎩←Ð where γiR G is the lower R-central series of G and − ⊗ Q denotes the Malcev completion (P localization, where P is the set of all primes, in terms of [12]) of a nilpotent group. There is The research is supported by the Russian Science Foundation grant N 16-11-10073. 1 2 SERGEI O. IVANOV a natural homomorphism (0.1) GHR Ð→ ĜR . If the map (0.1) is an isomorphism, the group G is called HR-good (similarly to R-good spaces). Otherwise, it is called HR-bad. In the book of Bousfield [7] there is only one problem: Problem (Bousfield): Is there an HK-bad finitely presented group for K = Q or K = Z/p? It is known that a group G is HR-good if and only if the map H1 (G, R) → H1 (ĜR , R) is an isomorphism and H2 (G, R) → H2 (ĜR , R) is an epimorphism. If G is finitely generated, then H1 (G, R) → H1 (ĜR , R) is an isomorphism (because GHR /γωR (GHR ) = ĜR [7]). So the problem of Bousfield can be reformulated as follows: Is there a finitely presented group G such that H2 (G, K) → H2 (ĜK , K) is not an epimorphism for K = Q or K = Z/p? We are interested not only in ĜK for K = Z/p, Q. The pronilpotent completion ĜZ is interesting as well. It is easy to find an example of an HZ-bad finitely presented group (for example, Klein bottle group Z ⋊ C). However, the homomorphism on the level of homology with finite coefficients H2 (G, Z/p) → H2 (ĜZ , Z/p) is usually an epimorphism for all examples that we know. So we generalise the problem of Bousfield and formulate it in the form of conjecture. Conjecture: If G is a finitely presented group, then the map (0.2) H2 (G, K) Ð→ H2 (ĜR , K) is an epimorphism for (R, K) ∈ {(Z/p, Z/p), (Z, Z/p), (Q, Q)}. In [13] Roman Mikhailov and I proved that the conjecture is true for the class of metabelian groups. Generally we do not believe that the conjecture is true for all finitely presented groups. We tried to find a counterexample among those solvable groups, for which we can compute H2 (ĜR , K). For example, for Abels’ group [1] (which is known as a counterexample for some conjectures that are true for metabelian groups) or for finitely presented groups of the form N ⋊ C, where C is the infinite cyclic group and N is nilpotent. But in all these cases the map turns out be an epimorphism. Then I found a reason why in all these cases the map is an epmorphism. All these groups are of finite Prüfer rank. The first goal of the paper is to study homological properties of ĜR for solvable groups G of finite Prüfer rank and prove the conjecture for them. Recall that a group is of type Fn if it has a classifying space, whose n-skeleton is finite. A group is of type F1 if and only if it is finitely generated. A group is of type F2 if and only if it is finitely presented. It seems, it is natural to look at the homomorphism Hn (G, K) → Hn (ĜR , K) for a group G of type Fn for any n and ask, when it is an epimorphism. So the most general problem in this direction is the following. Problem: Describe groups G of type Fn such that the map (0.3) is an epimorphism. Hn (G, K) Ð→ Hn (ĜR , K) ON BOUSFIELD’S PROBLEM FOR SOLVABLE GROUPS OF FINITE PRÜFER RANK 3 Bousfield proofs [8] that one of the groups H2 (F̂Z/p , Z/p), H3 (F̂Z/p , Z/p) is not trivial for a free group F , and hence, not for all groups of type Fn the map (0.3) is an epimorphism. However, it seems the class of groups of type Fn such that the map (0.3) is an epimorphism is very large. We denote by C the infinite cyclic group. If M is a C-module, we can consider the semidirect product M ⋊ C. Bieri and Strebel describe all modules M such that M ⋊ C is finitely presented [3, Th. C]. It can be shown, and we will show this later, that if M ⋊ C is finitely presented, then M ⋊C is of type Fn for any n. The second goal of the article is to prove that for any finitely presented metabelian group of the form G = M ⋊ C the homomorphism (0.3) is an epimorphism for any n. Usually we look at the R-completion ĜR as on a discrete group. But it turned out that for our purposes it is useful to look on this group as on a topological group with the topology of inverse limit. Unfortunately, the standard continuous cohomology of topological groups [17] behave well enough only for compact groups. Because of this, we introduce unform cohomology Hu∗(G , K) of a topological group G , which are defined similarly to continuous cohomology, but instead of continuous chains we consider uniform chains. Here we consider only topological groups, whose left and right uniform structures coincide. We like the uniform cohomology more then the continuous cohomology because they send inverse limits to direct limits in a more general case (see Proposition 2.6). A topological group G is said to be n-cohomologically discrete over K if the obvious map is an isomorphism Hum (G , K) ≅ H m (G , K) for any m ≤ n. If a topological group is n-cohomologically discrete over K for any n, we call it just cohomologically discrete over K. This definition is interesting for us because of the following statement that we prove. Proposition. Let G be a finitely presented group. If ĜR is 2-cohomologically discrete over K, then the map (0.2) is an epimorphism. For more detailed version and the proof see Proposition 4.3. A group G is of finite Prüfer rank (special rank, reduced rank) if there is a number r such that any finitely generated subgroup of G can be generated by r generators. The minimal r = r(G) with this property is called Prüfer rank of G. If there is a short exact sequence of groups G′ ↣ G ↠ G′′ , then G is of finite Prüfer rank if and only if G′ and G′′ are of finite Prüfer rank and r(G) ≤ r(G′ ) + r(G′′ ) [15, Lemma 1.44]. Let A be an abelian group. For prime p we set p A = {a ∈ A ∣ pa = 0}. The group A is of finite Prüfer rank if and only if A ⊗ Q is finite dimensional over Q, p A is finite dimensional over Z/p and the dimensions are bounded over all p [15, pp. 33-34]. In this case r(A) = dimQ (A ⊗ Q) + max{dimZ/p (p A) ∣ p is prime}. Obviously, a solvable group G is of finite Prüfer rank if and only if there is a finite sequence of normal subgroups G = U1 ⊇ ⋅ ⋅ ⋅ ⊇ Us = 1 such that Ui /Ui+1 is an abelian group of finite Prüfer rank. For example, the group Z[1/2] ⋊ C, where C = ⟨t⟩ is the infinite cyclic group acting on Z[1/2] by the multiplication on 2, is a finitely generated non-polycyclic metabelian group of Prüfer rank 2. We prove the following theorem. 4 SERGEI O. IVANOV Theorem. Let G be a solvable group of finite Prüfer rank. Then ĜR is cohomologically discrete over K. Moreover, if G is finitely generated, then the map (0.2) is surjective and G is HK-good. For a more detailed version and the proof see Proposition 4.7 and Theorem 4.9. We denote by C the infinite cyclic group. A finitely generated C-module M is called tame if: (1) the torsion subgroup tor(M) is finite; (2) M ⊗ Q is finite dimensional; (3) there exists a generator t of C such that the characteristic polynomial of t ⊗ Q ∈ GL(M ⊗ Q) is integral. Bieri and Strebel proved [3, Th. C] that the group G = M ⋊ C is finitely presented if and only if the C-module M is tame. Note that a tame C-module is of finite Prüfer rank. Hence, G = M ⋊ C is a metabelian group of finite Prüfer rank. It follows from the main theorem of [2] that G is of type F Pn for any n. By [4] we know that F Pn implies Fn . Therefore, if M is a tame C-module, M ⋊ C is of type Fn for any n. We prove the following theorem. Theorem. Let M be a tame C-module and G = M ⋊ C. Then the map (0.3) is an epimorphism for any n. For more detailed version see Proposition 5.7 and Theorem 5.8. Moreover, we prove the following. If C = ⟨t⟩ and M(t−1) ⊆ pM, then the map (0.3) gives an isomorphism H∗ (G, Z/p) ≅ H∗ (ĜZ/p , Z/p) and it follows that the Z/p-localization of the classifying space is the classifying space of the Z/p-completion (0.4) (BG)Z/p ≅ B(ĜZ/p ). In particular, the isomorphism (0.4) holds in the case G = Zn ⋊a C, where C acts on Zn by a matrix a ∈ GLn (Z) such that entries of a − 1 are divisible by p. A lot of things can be done much simpler here, if we assume that K ≠ Z/2 ≠ R and use the natural isomorphism H∗ (A, Z/p) ≅ Λ∗ (A/p) ⊗ Γ∗/2 (p A) for an abelian group A and p ≠ 2 (see [9, Ch. V, Th. 6.6], [10]). But we intentionally do not use it because we want to cover the case of K = Z/2. The paper is organised as follows. In Section 1 we prove some lemmas that generalise the standard fact that, if a morphism of converging spectral sequences is an isomorphism on some page, then it converges to an isomorphism. In Section 2 we study inverse systems of groups. Namely, we study relations between cohomology of the inverse limit, the direct limit of cohomology and the uniform cohomology of the inverse limit. In section 3 we study mod-p homology of a completion of a solvable group of finite Prüfer rank with respect to any filtration. In Section 4 we study R-completions of groups. In particular, we prove here that, if R-completion is 2-cohomologically discrete, then the map H2 (G, K) → H2 (ĜR , K) is an epimorphism, and the main result that the R-completion of a solvable group of finite Prüfer rank is cohomologically discrete over K. In Section 5 we prove that, for a tame C-module M, if we set G = M ⋊ C, then Hn (G, K) → Hn (ĜR , K) is an epimorphism. 1. Lemmas about spectral sequences Lemma 1.1. Let f ∶ E → E ′ be a morphism between two spectral sequences of cohomological type converging to a morphism of graded abelian groups ϕ ∶ H → H ′ and r, n be natural numbers. Assume that the spectral sequences are concentrated in the first quadrant. If for ON BOUSFIELD’S PROBLEM FOR SOLVABLE GROUPS OF FINITE PRÜFER RANK 5 any pair of integers (k, l) such that (r − 1)k ≤ r(n − l) the morphism on the level of rth pages m m ′ m is an isomorphism for m ≤ n. frk,l ∶ Erk,l → E ′ k,l r is an isomorphism, then ϕ ∶ H → H Proof. Fix n. Note that for any pair (k, l) such that k + l ≤ n and any r the inequality k,l (r − 1)k ≤ r(n − l) holds. First, assume that r ≥ n + 2. In this case, if k + l ≤ n, then Erk,l = E∞ m ′ k,l and E ′ k,l r = E ∞ . It follows that ϕ is an isomorphism for m ≤ n. Prove now the statement for r ≤ n + 2 by induction on n + 2 − r. We already proved the base step n + 2 − r = 0. Prove the inductive step. The direct sum ⊕(k,l)∶(r−1)k≤r(n−l) Erk,l is a direct summand of the differential module (Er , dr ) because the bidegree of dr is (r, −r +1) and, if (k, l) satisfies (r −1)k ≤ r(n−l), then (k + r, l − r + 1) satisfies (r − 1)(k + r) ≤ r(n − (l − r + 1)). The same for E ′ and fr ∶ Er → Er′ respects this decomposition. It follows that fr induces an isomorphism on (r + 1)st page k,l k,l fr+1 ∶ Erk,l → E ′ k,l r for indexes (k, l) such that (r − 1)k ≤ r(n − l). In particular, fr+1 is an isomorphism for the smaller set of indexes satisfying ((r + 1) − 1)k ≤ (r + 1)(n − l). The assertion follows from the inductive hypothesis.  There is a dual version. Formally it does not follow from the previous, but the proof is the same. Lemma 1.2. Let f ∶ E → E ′ be a morphism between two spectral sequences of homological type converging to a morphism of graded abelian groups ϕ ∶ H → H ′ and r, n be natural numbers. Assume that the spectral sequences are concentrated in the first quadrant. If for any pair of integers (k, l) such that (r − 1)k ≤ r(n − l) the morphism on the level of rth pages r r → E ′ rk,l is an isomorphism, then ϕm ∶ Hm → H ′ m is an isomorphism for m ≤ n. ∶ Ek,l fk,l Proof. The proof is the same.  There are two corollaries for the second page. Corollary 1.3. Let f ∶ E → E ′ be a morphism between two spectral sequences of cohomological type converging to a morphism of graded abelian groups ϕ ∶ H → H ′ and n be a natural number. Assume that the spectral sequences are concentrated in the first quadrant. If for any pair of integers (k, l) such that k ≤ 2(n − l) the morphism f2k,l ∶ E2k,l → E ′ k,l 2 is an isomorphism, then ϕm ∶ H m → H ′ m is an isomorphism for m ≤ n. Corollary 1.4. Let f ∶ E → E ′ be a morphism between two spectral sequences of homological type converging to a morphism of graded abelian groups ϕ ∶ H → H ′ and n be a natural number. Assume that the spectral sequences are concentrated in the first quadrant. If for any pair of 2 2 ∶ Ek,l → E ′ 2k,l is an isomorphism, then integers (k, l) such that k ≤ 2(n − l) the morphism fk,l ϕm ∶ Hm → H ′ m is an isomorphism for m ≤ n. 2. Cohomology of inverse limits Throughout the section we denote by P a fixed filtered partially ordered set (=directed set). The word “filtered” means that for any i, j ∈ P there exists k ∈ P such that k ≥ i and k ≥ j. The main example of P for us is N but occasionally we use other examples like all finitely generated subgroups of a group. By a directed system in a category C we mean a functor C ∶ P → C, where P is treated as a category. For i ∈ P we set C i ∶= C(i). Dually we define an inverse system C ∶ P op → C. In the case of inverse systems we use the dual notation Ci ∶= C(i). We say that a property holds for big enough i if there exists k ∈ P such that the property holds for any i ≥ k. 6 SERGEI O. IVANOV We use directed limits (=filtered colimits) lim of directed systems and inverse limits lim of Ð→ ←Ð inverse systems. The important advantage of directed limits in contrast to inverse limits is that lim ∶ AbP → Ab is an exact functor. Ð→ Throughout the section G denotes an inverse system groups and epimorphims. We set Gi ∶= G(i). So we assume that the homomorphism Gj → Gi is an epimorphism for any i ≤ j. Let S be a commutative ring. A direct S[G]-module M is a direct system of abelian groups, together with a structure of S[Gi ]-module on M i such that M i → M j is a homomorphism of S[Gj ]-modules for any i ≤ j. In the case S = Z we call them just direct G-modules. If we set Ĝ ∶= lim Gi , M̆ = lim M i , ←Ð Ð→ then M̆ has a natural structure of a S[Ĝ]-module. Note that if G ′ ↣ G ↠ G ′′ is a short exact sequence of groups and epimorphisms, then by Mittag-Leffler condition the sequence of inverse limits Ĝ ′ ↣ Ĝ ↠ Ĝ ′′ is short exact. 2.1. Cohomologically discrete direct modules. A direct G-module M is said to be ncohomologically discrete, if the homomorphism lim H m (Gi , M i ) Ð→ H m (Ĝ, M̆) Ð→ is an isomorphism for any m ≤ n (further we will prove that this definition is equivalent to a definition given on the language of uniform cohomology for some class of direct modules Proposition 2.7). The inverse system G is said to be n-cohomologically discrete over K if the constant G-module K is n-cohomologically discrete. If G is n-cohomologically discrete K for any n, it is called cohomologically discrete over K. Proposition 2.1. Let G ′ ↣ G ↠ G ′′ be a short exact sequence of inverse systems of groups and epimorphisms and M be a direct G-module. Assume that (1) M is n-cohomologically discrete as a direct G ′ -module; (2) the direct G ′′ -module H m (G ′ , M) = {H m (G′i , M i )} is 2(n − m)-cohomologically discrete for any 0 ≤ m ≤ n. Then M is n-cohomologically discrete as a direct G-module. Proof. For any fixed i the morphism of short exact sequences 1 Ĝ ′ Ĝ Ĝ ′′ 1 1 G′i Gi G′′i 1 and the homomorphism of Ĝ-modules M̂ → M i yield a morphism of Lyndon–Hochschild–Serre spectral sequences, whose second page component is H ∗ (G′′i , H ∗ (G′i , M i )) Ð→ H ∗ (Ĝ ′′ , H ∗ (Ĝ ′ , M̆ )) and that converges to the morphism H ∗ (Gi , M i ) → H ∗ (Ĝ, M̆). On the left hand we have a direct system of spectral sequences. Since direct limit is an exact functor, we obtain the spectral sequence of direct limits, whose second page is lim H ∗ (G′′i , H ∗ (G′i , M i )) and that Ð→ converges to lim H ∗ (Gi , M i ). Moreover, we obtain a morphism of spectral sequences, whose Ð→ second page component is lim H ∗ (G′′i , H ∗ (G′i , M i )) Ð→ H ∗ (Ĝ ′′ , H ∗ (Ĝ ′ , M̆)) Ð→ ON BOUSFIELD’S PROBLEM FOR SOLVABLE GROUPS OF FINITE PRÜFER RANK 7 and that converges to the homomorphism lim H ∗ (Gi , M i ) → H ∗ (Ĝ, M̆). Assume that (k, l) is Ð→ a pair of non negative integers such that k ≤ 2(n − l). Then lim H k (G′′i , H l (G′i , M i )) Ð→ H k (Ĝ ′′ , lim H l (G′i , M i )) Ð→ Ð→ is an isomorphism because H l (G ′ , M) is 2(n − l)-cohomologically discrete. The map lim H l (G′i , M i ) → H l (Ĝ ′ , M̆) is an isomorphism because M is n-homologically discrete as Ð→ a direct G ′ -module. It follows that lim H k (G′′i , H l (G′i , M i )) Ð→ H k (Ĝ ′′ , H l (Ĝ ′ , M̆)) Ð→ is an isomorphism for pairs (k, l) such that k ≤ 2(n − l). The assertion follows from Corollary 1.3.  Corollary 2.2. Let G ′ ↣ G ↠ G ′′ be a short exact sequence of inverse systems of groups and epimorphisms. Assume that (1) G ′ is n-cohomologically discrete over K; (2) the direct G ′′ -module H m (G ′ , K) = {H m (G′i , K)} is 2(n − m)-cohomologically discrete for any 0 ≤ m ≤ n. Then G is n-cohomologically discrete. 2.2. Quasiconstant direct systems. Let A be an abelian category. A direct system A in A is said to be zero-equivalent if for any i there is j > i such that the morphism Ai → Aj vanishes. In this case lim Ai exists and vanishes. Ð→ Let A be a direct system in A. Assume that Ă = lim Ai exists. Consider the kernels B i = Ð→ Ker(Ai → Ă). They form a direct system of groups B. Then A is called quasiconstant if B is zero-equivalent and the morphism Ai → Ă is an epimorphism for big enough i. Equivalently, A is quasiconstant if there exists a short exact sequence of direct systems B ↣ A ↠ C such that B is zero-equivalent and C i → C j is an isomorphism for big enough i and any j ≥ i. In this case Ă ≅ C i for big enough i. Dually one can define zero-equivalent inverse systems and quasiconstant inverse systems. Lemma 2.3. Let F ∶ Aop → B be an exact contravariant functor from an abelian category A to an abelian category B. If A is a quasiconstant inverse system in A, then F(A) is a quasiconstant direct system in B and Proof. Obvious. lim F(Ai ) = F(lim Ai ). Ð→ ←Ð  Lemma 2.4. Let A be an inverse system (resp. directed system) of S-modules of finite length over S. Assume that the lengths of the modules are bounded above i.e. there exists n such that length(Ai ) ≤ n (resp. length(Ai ) ≤ n) for any i. Then A is quasiconstant and length(lim Ai ) ≤ n. ←Ð Proof. For any fixed i the system of images Im(Aj → Ai ) for j ≥ i stabilises because Ai has finite length. In other words there exists Ci ⊆ Ai such that Ci = Im(Aj → Ai ) for big enough j ≥ i. Note that the inverse system Ai /Ci is zero-equivalent. It is easy to see that Ci+1 → Ci is an epimorphism. Hence, length(Cj ) ≥ length(Ci ) for j ≥ i. Since the lengths are bounded above, Cj → Ci is an isomorphism for big enough i. The proof for directed systems is similar.  8 SERGEI O. IVANOV A direct S[G]-module is called quasiconstant if it is qasiconstant as a direct system of abelian groups. Lemma 2.5. Let M be a direct S[G]-module such that each M i is a Noetherian S[Gi ]-module. Then the following are equivalent. (1) M̆ is a Noetherian S[Ĝ]-module. (2) M is quasiconstant. Proof. (2)⇒(1) is obvious because M̆ is a quotient of M i for big enough i. i i (1)⇒(2). Since M̆ = ⋃∞ i=1 Im(M → M̆) and M̆ is Noetherian, we obtain Im(M → M̆) = M̆ for big enough i. Hence M i → M̆ is an epimorphism for big enough i. Without loss of generality we can further assume that it is an epimorphism for all i. Set N i = Ker(M i → M̆). Then we have a short exact sequence of direct modules N ↣ M ↠ M̆. It follows that lim N i = 0. Hence Ð→ i j i i for any fixed i we have ⋃∞ j>i Ker(N → N ) = N . Using that M is Noetherian, we obtain N i = Ker(N i → N j ) for big enough j.  2.3. Cohomologically discrete inverse limits. Let G be a topological group, whose right and left uniform structures coincide. For a topological G -module M we define uniform cohomology of G with coefficients in M Hun (G , M ) similarly to continuous cohomology [17] but instead of the complex of continuous cochains we consider the complex of uniform cochains Cun (G , M ) = {f ∶ G n → M ∣ f is uniform }. If G is a compact topological group, uniform cohomology coincide with continuous cohomology. A discrete G -module M is said to be n-cohomologically discrete if the morphism Hum (G , M ) Ð→ H m (G , M ) is an isomorphism for m ≤ n. The topological group A is said to be n-cohomologically discrete over a commutative ring S if S is a n-cohomologically discrete G -module. Proposition 2.6. Let M be a quasiconstant direct G-module. Consider Ĝ as a topological group with the topology of inverse limit and M̆ as a discrete Ĝ-module. Then Hu∗ (Ĝ, M̆) = lim H ∗ (Gi , M i ). Ð→ Proof. Without loss of generality, we can assume that M i → M̆ is an epimorphism for any i. Set N i ∶= Ker(M i → M̆ ). The short exact sequence N i ↣ M i ↠ M̆ gives rise a long exact sequence H n−1 (Gi , N i ) → H n (Gi , M̆) → H n (Gi , M i ) → H n (Gi , N i ). Since N is zero-equivalent, H ∗ (Gi , Ni ) is zero-equivalent as well. Since the functor of direct limit is exact, it follows that lim H n (Gi , M̆) ≅ lim H n (Gi , M i ). Ð→ Ð→ Now we need to prove that H ∗ (Ĝ, M̆) = lim H ∗(Gi , M̆). Since the functor of direct limit Ð→ is exact, it is enough to prove that Cun (Ĝ, M̆) = lim C n (Gi , M̆). Consider the morphism Ð→ lim C n (Gi , M̆) → Cun (Ĝ, M̆). Since the maps Ĝ → Gi are epimorphisms, we get that it is Ð→ a monomorphism. In order to prove that it is an epimorphism, we need to prove that for any f ∈ Cun (Ĝ, M̆) there exists i and f¯ ∈ C n (Gi , M̆) such that f is a composition of f¯ ON BOUSFIELD’S PROBLEM FOR SOLVABLE GROUPS OF FINITE PRÜFER RANK 9 and the projection Ĝ n → Gni . Set Hi ∶= Ker(Ĝ → Gi ). Then the uniform structure on Ĝ is generated by sets Ui = {(g, g ′ ) ∣ gHi = g ′ Hi }. It follows that for any f there exists i such that f (g1 , . . . , gn ) = f (g1′ , . . . , gn′ ) whenever gk Hi = gk′ Hi for any k. Then, if we identify Gi with Ĝ/Hi , we can define f¯(g1 Hi , . . . , gn Hi ) = f (g1 , . . . , gn ).  Corollary 2.7. Let M be a quasiconstant direct G-module. Then M is n-cohomologically discrete as a direct G-module if and only if M̆ is n-cohomologically discrete as a discrete Ĝ-module. Proposition 2.8. Let G ′ ↣ G ↠ G ′′ be a short exact sequence of inverse systems of groups and epimorphisms and M be a quasiconstant direct G-module. Assume that (1) M̆ is n-cohomologically discrete as a discrete Ĝ ′ -module; (2) the discrete Ĝ ′′ -module H m (Ĝ ′ , M̆) is 2(n − m)-cohomologically discrete for any 0 ≤ m ≤ n. (3) the direct system H m (G′i , M i ) is quasiconstant for any 0 ≤ m ≤ n. Then M̆ is n-cohomologically discrete as a discrete Ĝ-module. Proof. By Corollary 2.7 we obtain that M is n-cohomologically discrete as a direct G ′ -module. Then by Proposition 2.1 and the Corollary 2.7 it is enough to prove that {H m (G′i , M i )} is 2(n − m)-cohomologically discrete direct G ′′ -module for any 0 ≤ m ≤ n. Fix k ≤ 2(n − m). Then we need to prove that lim H k (G′′i , H m (G′i , M i )) ≅ H k (Ĝ ′′ , lim H m (G′i , M i )). We have Ð→ Ð→ ′′ i k m ′ k ′′ lim H (Gi , H (Gi , M )) ≅ Hu (Ĝ , lim H m (G′i , M i )) Ð→ Ð→ because H m (G′i , M i ) is quasiconstant. We have Huk (Ĝ ′′ , lim H m (G′i , M i )) ≅ Huk (Ĝ ′′ , H m (Ĝ ′ , M̆)) Ð→ because M is n-cohomologically discrete over G ′ . We have Huk (Ĝ ′′ , H m (Ĝ ′ , M̆)) ≅ H k (Ĝ ′′ , H m (Ĝ ′ , M̆)) because H m (Ĝ ′ , M̆) is 2(n − m)-cohomologically discrete as a discrete Ĝ ′′ -module. And using again that M is n-cohomologically discrete over G ′ we get H k (Ĝ ′′ , H m (Ĝ ′ , M̆)) ≅ H k (Ĝ ′′ , lim H m (G′i , M i )). Ð→ m Composing these isomorphisms we obtain that {H (G′i , M i )} is 2(n − m)-cohomologically discrete direct G ′′ -module for any 0 ≤ m ≤ n.  3. Mod-p homology of completions of abelian and solvable groups of finite Prüfer rank For an abelian group A we set nA = {a ∈ A ∣ na = 0}, ∞ (n) A = ⋃ ni A, i=1 ∞ tor(A) = ⋃ n A, n=1 A/n = A/nA. We freely use that for a torsion free abelian group A there are isomorphisms H∗ (A) ≅ Λ∗ (A) and H∗ (A, Z/p) ≅ Λ∗ (A/p). If we set V ∨ = HomZ/p (V, Z/p), then H ∗ (A, M ∨ ) = H∗ (A, M)∨ for a Z/p[A]-module M. If M is finite, (M ∨ )∨ = M. Then for a finite Z/p[A]-module there is an 10 SERGEI O. IVANOV isomorphism H ∗ (A, M) = H∗ (A, M ∨ )∨ . Using this, one can obtain cohomological versions of all homological statements in the section. 3.1. Lemmas about abelian groups. Lemma 3.1. Let f ∶ A → B be a homomorphism of abelian groups. (1) If f induces isomorphisms A/p ≅ B/p and p A ≅ p B, then it induces an isomorphism H∗ (A, Z/p) ≅ H∗ (B, Z/p). 0 0 0 (2) If f induces trivial maps A/p Ð → B/p and p A Ð → p B, then the map Hn (A, Z/p) Ð → Hn (B, Z/p) is trivial for n ≥ 1. Proof. (1) First assume that B = 0 and prove that Hn (A, Z/p) = 0 for n ≥ 1. Consider the torsion subgroup tor(A) ⊆ A and the torsion free quotient tf(A) = A/tor(A). Then tf(A)/p = 0, and hence, H∗ (tf(A), Z/p) = Λ∗ (tf(A)/p) = 0. Since p A = 0, we have (p) A = 0, and then tor(A) consists of non-p-torsion. Then Hn (tor(A), Z/p) = 0. Then the second page of the spectral sequence H∗ (tf(A), H∗ (tor(A), Z/p)) consists of zeros except the position (0, 0). If f is a monomorphism, the cokernel D has the properties p D = 0 and D/p = 0 because of the exact sequence 0 → p A → p B → p D → A/p → B/p → D/p → 0. Then Hn (D, Z/p) = 0 for n ≥ 1, and using the spectral sequence H∗ (D, H∗ (A, Z/p)) ⇒ H∗ (B, Z/p) we obtain the result. The proof is similar if f is an epimorphism. Consider the general case. Denote by I the image of f. Since f induces isomorphisms A ≅ p B and A/p ≅ B/p, the maps p A → p I and A/p → I/p are monomorphisms and the maps p p I → p B and I/p → B/p are epimorphisms. Using that − ⊗ Z/p is right exact and Tor(−, Z/p) is left exact, we obtain that A/p → I/p and p I → p B are isomorphisms. Then all these four maps are isomorphisms and, using that we proved above, we get H∗ (A, Z/p) ≅ H∗ (I, Z/p) ≅ H∗ (B, Z/p). (2) Denote by P the set of couples of finitely generated abelian groups (A′ , B ′ ) such that ′ A ≤ A, B ′ ≤ B and f (A′ ) ≤ pB ′ . Consider P with the natural filtered order. Obviously we have B = ⋃(A′ ,B′ )∈P B ′ . Prove that A = ⋃(A′ ,B′ )∈P A′ . Indeed, for any finitely generated subgroup A′ ≤ A generated by a1 , . . . , am we have f (ai ) ∈ pB because the map A/p → B/p is trivial. Hence, we can find b1 , . . . , bm ∈ B such that pbi = f (ai ) and consider the subgroup B ′ generated by them. Therefore (A′ , B ′ ) ∈ P and A = ⋃(A′ ,B′ )∈P A′ . Then A = lim ′ ′ A′ Ð→(A ,B )∈P and B = lim ′ ′ B ′ . So, using that homology commute with direct limits, we deduce the Ð→(A ,B )∈P statement to finitely generated abelian groups. Prove the statement for finitely generated abelian groups. Using the functorial isomorphism H1 (A, Z/p) = A/p we obtain the result for n = 1. Prove it for n ≥ 2. Using the Künneth formula, we obtain that it is enough to prove this for three cases A = Z, A = Z/pk and A = Z/q k for q ≠ p. For A = Z/q k and A = Z it is obvious because Hn (Z/q k , Z/p) = 0 and Hn (Z, Z/p) for n ≥ 2. Consider the case A = Z/pk . The assumptions on f imply that f factors through the homomorphism ϕ ∶ Z/pk → Z/pk of multiplication by p ∶ ϕ(a) = pa. Then it is enough to prove that ϕ∗ ∶ Hn (Z/pk , Z/p) → Hn (Z/pk , Z/p) is trivial for n ≥ 2. Consider the functorial short exact sequence Λ2 (A/p) ↣ H2 (A, Z/p) ↠ p A. Using that Λ2 (Z/p) = 0, that ϕ induces the trivial map p (Z/pk ) → p (Z/pk ) and that the sequence is functoral, we obtain the result for n = 2. Since homology in our case are dual to cohomology, it is enough to prove for cohomology. The map ϕ ∶ H ∗ (Z/pk , Z/p) → H ∗ (Z/pk , Z/p) is an algebra homomorphism. For odd p or p = 2 and k > 1 we have isomorphism of algebras H ∗ (Z/pk , Z/p) ≅ Z/p[x, y]/(x2 ), and for p = 2 for k = 1 we have H ∗ (Z/2, Z/2) ≅ Z/2[x], where ∣x∣ = 1 and ∣y∣ = 2. Then H ∗ (Z/pk , Z/p) is generated in ON BOUSFIELD’S PROBLEM FOR SOLVABLE GROUPS OF FINITE PRÜFER RANK 11 the first and the second degree. Then, using that the maps H n (Z/pk , Z/p) → H n (Z/pk , Z/p) are trivial for n = 1, 2, we obtain that they are trivial for all n.  Lemma 3.2. Let A1 ← A2 ← . . . be an inverse sequence of abelian groups and epimorphisms such that Ai /p is finite for any i. Then the obvious maps are isomorphisms p (lim Ai ) ≅ lim(p Ai ), (lim Ai )/p ≅ lim(Ai /p). ←Ð ←Ð ←Ð ←Ð Proof. It follows from [13, Prop. 2.4.] and the Mittag-Leffler condition.  Lemma 3.3. Let A be an abelian group such that A/p is finite for any p and A ⊇ A1 ⊇ A2 ⊇ . . . be a sequence of subgroups. Set  = lim A/Ai and Âi = Ker( → A/Ai ). Then for any n there Ð→ exists i such that Âi ⊆ nÂ. Proof. First we prove it for prime n = p. By Lemma 3.2 we get that Â/p = lim (A/Ai )/p. More←Ði over, dim((A/Ai )/p) ≤ dim(A/p), and hence, the sequence stabilises: (A/Ai )/p = (Â/Âi )/p = Â/p for big enough i. Thus p = p + Âi for big enough i. It follows that for any p there is i such that Âi ⊆ pÂ. Now we prove the general case. Let n = p1 . . . pl , where p1 , . . . , pl are primes. Prove by induction on l. We already proved the base step. Set n′ = p2 . . . pl . Assume we proved the statement for n′ . Then there is i such that Ai ⊆ n′ Â. Set A′ = n′ A and A′j = A′ ∩ Aj . It is easy ̂′ = nÂ. ̂′ . Then there is j such that Aj = Â′ ⊆ p1 A  to see that n′  = A j 3.2. Lemmas about abelian groups of finite Prüfer rank. Recall that an abelian group is of finite Prüfer rank if and only if the Q-vector space A ⊗ Q is finite dimensional, the Z/pvector space p A is finite dimensional for any p and the dimensions are bounded above for all p [15, pp. 33-34]. In other words, dimQ (A ⊗ Q) + max{dimZ/p (p A) ∣ p is prime } < ∞. For for an abelian group A of finite Prüfer rank we set dQ (A) = dimQ (A ⊗ Q), dp (A) = dimZ/p (p A), Dp (A) = dQ (A) + dp (A). Lemma 3.4. Let A be an abelian group of finite Prüfer rank. Then dimZ/p (A/p) ≤ Dp (A) and for any subgroup B ≤ A Dp (B) ≤ Dp (A), Dp (A/B) ≤ Dp (A). Proof. The inequality Dp (B) ≤ Dp (A) is obvious because dQ (B) ≤ dQ (A) and dp (B) ≤ dp (A). We set E = A/B and prove Dp (E) ≤ Dp (A) and dim(A/p) ≤ Dp (A). First we prove it in the case E ≅ (Z/p)n . Take a p-basic subgroup A′ of A. Then A′ /p ≅ A/p, the sequence p A′ ↣ p A ↠ p (A/A′ ) is short exact and A′ ≅ Z⊕k ⊕ Z/pm1 ⊕ ⋅ ⋅ ⋅ ⊕ Z/pml . Using the monomorphisms A′ ⊗Q ↣ A⊗Q and p A′ ↣ p A, we obtain k ≤ dimQ (A⊗Q) and l ≤ dimZ/p (p A). Using the isomorphism A′ /p ≅ A/p, we get dimZ/p (A/p) = k + l ≤ Dp (A). The epimorphism A ↠ E induces an epimorphism A/p ↠ E. It follows that Dp (E) = n ≤ k + l ≤ dimQ (A ⊗ Q) + dimZ/p (p A) = Dp (A). Now we prove the general case. Denote the preimage of p E in A by Ã. Then we have an epimorphism à ↠ p E. As we proved above, dimZ/p (p E) ≤ dimQ (à ⊗ Q) + dimZ/p (p Ã). Consider 12 SERGEI O. IVANOV the diagram with exact rows 0 à A A/à 0 0 pE E E/p E 0 Tensoring by Q we obtain the following. 0 à ⊗ Q (A/Ã) ⊗ Q A⊗Q ≅ E⊗Q 0 (E/p E) ⊗ Q Hence, dimQ (E ⊗ Q) ≤ dimQ ((A/Ã) ⊗ Q). Using the two obtained inequalities and the equality dimQ (A ⊗ Q) = dimQ ((A/Ã) ⊗ Q) + dimQ (à ⊗ Q) we get dimQ (E ⊗ Q) + dimZ/p (p E) ≤ ≤ dimQ ((A/Ã) ⊗ Q) + dimQ (à ⊗ Q) + dimZ/p (p A) = dimQ (A ⊗ Q) + dimZ/p (p A).  Lemma 3.5. Let A be an abelian group of finite Prüfer rank, M be a finite Z/p[A]-module and n ≥ 0. Then dimZ/p (Hn (A, M)) ≤ nDp (A)−1 ⋅ dimZ/p (M). Proof. We denote by (non-p) A the sum of q-power torsion subgroups for q ≠ p (non-p) A =⊕ (q) A. q≠p Any finitely generated subgroup of A′ ≤ (non-p) A is a finite group of order prime to p. Then by Maschke’s theorem we obtain Hn (A′ , M) = 0 for n ≥ 1. Since homology commute with direct limits and the group is the direct limit of its finitely generated subgroups, we get Hn ((non-p) A, M) = 0 for n ≥ 1. Using the spectral sequence of the short exact sequence (non-p) A ↣ A ↠ A/(non-p) A, we obtain H∗ (A, M) ≅ H∗ (A/(non-p) A, M(non-p) A ). Moreover, Dp (A) = Dp (A/(non-p) A). Then we can assume that A is q-torsion free for q ≠ p. Further in the proof we assume that A is q-torsion free for a prime number q distinct from p. Prove for the case where A is one of the cyclic groups Z, Z/pk . If A = Z, then H1 (A, M) = M A ≤ M, Hn (A, M) = 0 for n ≥ 2 and Dp (A) = 1. If A = Z/pk = ⟨t⟩, then, if we set N = k 1 + t + t2 + ⋅ ⋅ ⋅ + tp −1 ∈ Z/p[A], we get H2m+1 (A, M) = M A /M ⋅ N , H2m (A, M) = {m ∈ M ∣ m ⋅ N = 0}/M(1 − t) and Dp (A) = 1. In all these cases the equation holds. Now we prove for the case of finitely generated A. Then A = A1 × ⋅ ⋅ ⋅ × Am , where Ai is one of the groups Z, Z/pk . The proof is by induction on m. Note that Dp (A) = m. The base step was proved above. Set à = A2 × ⋅ ⋅ ⋅ × Am . Consider the spectral sequence H∗ (A1 , H∗ (Ã, M)) ⇒ H∗ (A, M). By induction hypothesis we have dim(Hi (Ã, M)) ≤ (n + 1)m−2 ⋅ dim(M) for i ≤ n. Then dim(Hn−i (A1 , Hi (Ã, M))) ≤ (n + 1)m−2 ⋅ dim(M). It follows that dim(Hn (A, M)) ≤ (n + 1) ⋅ (n + 1)m−2 ⋅ dim(M) = (n + 1)m−1 ⋅ dim(M). Prove the general case. Consider a finitely generated subgroup A′ ≤ A. Since Dp (A′ ) ≤ Dp (A), using that we proved above, we obtain that dim(Hn (A′ , M)) ≤ (n + 1)Dp (A)−1 ⋅ dim(M). ON BOUSFIELD’S PROBLEM FOR SOLVABLE GROUPS OF FINITE PRÜFER RANK 13 Then the assertion follows from Lemma 2.4, the fact that homology commute with direct filtered limits and that A is the direct limit of its finitely generated subgroups.  Corollary 3.6. Let A be an abelian group of finite Prüfer rank, M be a finite Z/p[A]-module and n ≥ 0. Then for any subgroup B ≤ A dimZ/p (Hn (A/B, MB )) ≤ (n + 1)Dp (A)−1 ⋅ dimZ/p (M). In particular, for fixed A, M, n the dimensions of Hn (A/B, MB ) are bounded over all subgroups B ≤ A. Corollary 3.7. If A is an abelian group such that A/p and p A are finite for any p, then Hn (A, Z/p) is finite. Proof. Take the torsion subgroup tor(A) = ⊕ (p) A of A. Then (p) A is a an abelian group of finite Prüfer rank. By Lemma 3.5 Hn (tor(A), Z/p) = Hn ((p) A, Z/p) is finite for any n. Take the quotient tf(A) = A/tor(A). Then Hn (tf(A), Z/p) = Λn (tf(A)/p), and hence, it is finite for any n. It follows that for any finite Z/p-vector space Hn (tf(A), V ) is finite. Consider the spectral sequence of the short exact sequence tor(A) ↣ A ↠ tf(A). Components of its second page H∗ (tf(A), H∗ (tor(A), Z/p)) are finite. Then Hn (A, Z/p) is finite.  Lemma 3.8. Let A be a abelian group of finite Prüfer rank and A = A1 ⊇ A2 ⊇ . . . a sequence of subgroups. Set  = lim A/Ai . Then Â/p and p  are finite and ←Ð dimZ/p (Â/p) ≤ Dp (A), dimZ/p (p Â) ≤ Dp (A). Proof. Set Bi = A/Ai . Lemma 3.2 implies that Â/p = lim(Bi /p) and p  = lim(p Bi ). By Lemma ←Ð ←Ð 3.4 we obtain that dimensions of Bi /p and p Bi are bounded by Dp (A). Then Lemma 2.4 implies that the sequences p Bi and Bi /p are quasistable and the dimensions of p  and Â/p are bounded by Dp (A).  3.3. Completions of abelian and solvable groups of finite Prüfer rank. Proposition 3.9. Let A be an abelian group such that A/p and p A are finite for any p and A = A1 ⊇ A2 ⊇ . . . be a sequence of subgroups and M be an Z/p[A]-module. Assume that (1) the groups p (A/Ai ) and Ai /p are finite for any i; (2) for any i there is j > i such that Aj ⊆ pAi ; (3) p Ai = 0 for big enough i; (4) Ai acts trivially on M for big enough i. Then the obvious morphisms are isomorphisms H∗ (A, M) ≅ lim H∗ (A/Ai , MAi ), H ∗ (A, M) ≅ lim H ∗ (A/Ai , M Ai ). ←Ð Ð→ Proof. Since Ai acts trivially on M for big enough i, we have Hn (Ai , M) ≅ Hn (Ai , Z/p) ⊗ M for big enough i. By assumption for any fixed i there exist j > i such that Aj ⊆ pAi and p Aj = 0. Then by Lemma 3.1 we obtain that for any n and big enough i (so big that M is a trivial Ai -module) there exists j > i such that the map Hn (Aj , M) → Hn (Ai , M) is trivial. Therefore, the sequence Hn (Ai , M) is zero-equivalent for any n. For any i we have a spectral sequence H∗ (A/Ai , H∗ (Ai , M)) ⇒ H∗ (A, M). Since p (A/Ai ), Ai /p are finite, we have that the second page consists of finite groups (Corollary 3.7). The functor of inverse limit is exact on the category of finite abilian groups, and hence, we get the spectral sequence lim H∗ (A/Ai , H∗ (Ai , M)) ⇒ H∗ (A, M). Since the inverse sequence ←Ð 14 SERGEI O. IVANOV Hn (Ai , M) is zero-equivalent, we obtain lim H∗ (A/Ai , Hn (Ai , M)) = 0 for n ≥ 1. Then ←Ð lim H∗ (A/Ai , M) ≅ H∗ (A, M). ←Ð For cohomology the proof is similar, if we use the formula H ∗ (A, M) ≅ H∗ (A, M ∨ )∨ for a group A and a finite Z/p[A]-module M.  Proposition 3.10. Let A be an abelian group of finite Prüfer rank and let A ⊇ A1 ⊇ A2 ⊇ . . . be a sequence of subgroups. Set  = lim A/Ai and Âi = Ker( → A/Ai ). Assume that M is ←Ð a finite Z/p[Â]-module. Then Âi acts trivially on M for big enough i, the dimensions of the sequences Hn (A/Ai , MÂi ) and H n (A/Ai , M Âi ) are bonded for any n, the groups Hn (Â, M) and H n (Â, M) are finite for any n, and the obvious maps are isomorphisms H∗ (Â, M) ≅ lim H∗ (A/Ai , MÂi ), ←Ð H ∗ (Â, M) ≅ lim H ∗ (A/Ai , M Âi ) ≅ Hu∗ (Â, M). Ð→ In particular, M is a cohomologically discrete Â-module. Proof. It is easy to see that Âk = lim Ak /Ai , that Â/Âk ≅ A/Ak are of finite Prüfer rank ←Ði>k and ⋂ Âi = 0. In particular, p Âi = 0 for big enough i. By Lemma 3.8 we obtain that Âk /p and p (Âi ) are finite. By Lemma 3.3 we obtain that for any i there is j > i such that Âj ⊆ pÂi . Since M is finite, G = AutZ (M) is finite. The action of  on M is given by a homomorphism  → G. Since ∣G∣ ⋅  is in the kernel of the homomorphism, Âi acts trivially on M for big i (Lemma 3.3). Then we can use Proposition 3.9 for the sequence  ⊇ Â1 ⊇ Â2 . . . and obtain the isomorphisms H∗ (Â, M) ≅ lim H∗ (A/Ai , MÂi ) and H ∗ (Â, M) ≅ lim H ∗(A/Ai , M Âi ). Ð→ ←Ð Moreover, we obtain M = MÂi = M Âi for big enough i. By Corollary 3.6 we obtain that the dimensions of Hn (A/Ai , MÂi ) and H n (A/Ai , M Âi ) are bounded for a fixed n. Then Lemma 2.4 implies that these sequences are quasiconstant. The last isomorphism follows from Proposition 2.6.  Note that solvable group G is of finite Prüfer rank if and only if there is a finite sequence of normal subgroups G = U1 ⊇ U2 ⊇ ⋅ ⋅ ⋅ ⊇ Us = 1 such that Ui /Ui+1 are abelian groups of finite Prüfer rank. Theorem 3.11. Let G be a solvable group group of finite Prüfer rank and let G ⊇ G1 ⊇ G2 ⊇ . . . be a sequence of normal subgroups. Set Ĝ = lim G/Gi and Ĝi = Ker(Ĝ → G/Gi ). Assume that M ←Ð is a finite Z/p[Ĝ]-module. Then Ĝi acts trivially on M for big enough i, the dimensions of the sequences Hn (G/Gi , MĜi ) and H n (G/Gi , M Ĝi ) are bounded for any n, the groups Hn (Ĝ, M) and H n (Ĝ, M) are finite for any n, and the obvious maps are isomorphisms H∗ (Ĝ, M) ≅ lim H∗ (G/Gi , MĜi ), ←Ð H ∗ (Ĝ, M) ≅ lim H ∗ (G/Gi , M Âi ) ≅ Hu∗ (Ĝ, M). Ð→ In particular, M is a cohomologically discrete Ĝ-module. Proof. Let G = U1 ⊇ U2 ⊇ ⋅ ⋅ ⋅ ⊇ Us = 1 be a finite sequence of normal subgroups such that Ui /Ui+1 are abelian groups of finite Prüfer rank and M be a finite Z/p[Ĝ]-module. The proof is by induction on s. If s = 1, it follows from Proposition 3.10. Prove the induction step. Set A = Us−1 , Ai = A ∩ Gi ,  = lim A/Ai , G′ = G/A, G′i = Gi A/A, Ĝ′ = lim G′ /G′i . Then there are ←Ð ←Ð ON BOUSFIELD’S PROBLEM FOR SOLVABLE GROUPS OF FINITE PRÜFER RANK 15 short exact sequences  ↣ Ĝ ↠ Ĝ′ . Note that G′ /G′i = G/Gi A. It follows that there is a short exact sequence A/Ai ↣ G/Gi ↠ G′ /G′i . We set Âi = Ker( → A/Ai ), Ĝi = Ker(Ĝ → G/Gi ) and Ĝ′i = Ker(Ĝ′ → G′ /G′i ). Then we obtain a commutative diagram, whose columns are short exact sequences and the second and third rows are short exact sequences. Âi Ĝi Ĝ′i  Ĝ Ĝ′ A/Ai G/Gi G′ /G′i . Using 3×3-lemma, we obtain that Âi ↣ Ĝi ↠ Ĝ′i is a short exact sequence. By Proposition 3.10 Âi acts trivially on M for big enough i. It follows that the action of Ĝi on M factors through Ĝ′i for big enough i. Then using the induction hypothesis, we obtain Ĝ′j acts trivially on M for big enough j. Therefore, Ĝj acts trivially on M for big enough j. By Proposition 3.10 we obtain that there is an isomorphism H ∗ (Â, M) ≅ lim H ∗ (A/Ai , M Âi ), all these groups are finite Ð→ Z/p[Ĝ′ ]-modules, where Ĝ′ = lim G/Gi A, and the sequences H ∗ (A/Ai , M Âi ) have bounded ←Ð dimensions, and hence, they are quasiconstant. Then by induction hypothesis we have H ∗ (Ĝ′ , H ∗ (Â, M)) ≅ Hu∗ (Ĝ′ , H ∗ (Â, M)). By Proposition 2.6 we have Hu∗ (Ĝ′ , H ∗ (Â, M)) ≅ lim H ∗ (G′ /G′i , H ∗ (A/Ai , M)). It follows that H ∗ (Ĝ, M) ≅ lim H ∗(G/Gi , M Ĝi ). Proposition Ð→ Ð→ 2.6 implies that lim H ∗(G/Gi , M Ĝi ) ≅ Hu∗ (Ĝ, M). The proof for homology is similar.  Ð→ 4. R-completions 4.1. Definitions. Let R ∈ {Z, Z/p, Q}. Following Bousfield [7] we define lower R-central series of a group G by recursion R G = Ker(γiR G → γiR G/[γiR G, G] ⊗ R), γi+1 where γ1R G = G. Then R-completion of G is defined as follows ⎧ ⎪ if R ∈ {Z, Z/p} ⎪ lim G/γiR G, ĜR = ⎨ ←Ð Q ⎪ lim(G/γi G ⊗ Q), if R = Q, ⎪ ⎩ ←Ð where − ⊗ Q is Malcev completion functor. Remark 4.1. It is easy to prove by induction that √ γiQ G = γiZ G ∶= {g ∈ G ∣ g n ∈ γiZ G for some n}. It follows that G/γiQ G ⊗ Q = G/γiZ G ⊗ Q. Then ĜQ = lim(G/γiZ G ⊗ Q). ←Ð A group G is said to be HR-good if the map H2 (G, R) → H2 (ĜR , R) is an epimorphism. Moreover, it is interesting when the map H2 (G, Z/p) → H2 (ĜZ , Z/p) is an epimorphism. R G for big enough i. In this case ĜR = G/γiR G for G is called R-prenilpotent if γiR G = γi+1 R ∈ {Z, Z/p} and ĜQ = G/γiQ ⊗ Q for big enough i. It follows that ĜR is discrete, and in particular, cohomomologically discrete over any ring. 16 SERGEI O. IVANOV 4.2. 2-cohomologicaly discrete R-completions. We are interested in the map Hn (G, K) Ð→ Hn (ĜR , K). (4.1) We denote by ΦR α Hn (G, K) αth term of Dwyer filtration, which is defined as R ΦR α Hn (G, K) = Ker(Hn (G, K) → Hn (G/γα G, K)). Using that Hn (G/γiQ G, Q) = Hn (G/γiQ G ⊗ Q, Q) (Proposition 2.5 of [12]) we obtain that the map (4.1) factors through Hn (G/γiR G, K) for any finite i. On the other hand, the map G → ĜR factors through G/γω G. Hence ∞ (4.2) R ΦR ω Hn (G, K) ⊆ Ker(Hn (G, K) → Hn (ĜR , K)) ⊆ ⋂ Φi Hn (G, K). i=1 Lemma 4.2. Let G be a group and S be a quotient of R. Set Φi ∶= ΦR i H2 (G, S). R (1) Then lim H2 (G, S)/Φi = lim H2 (G/γi G, S) and there is an exact sequence ←Ð ←Ð ∞ 0 → ⋂ Φi → H2 (G, S) → lim H2 (G/γiR G, S) → lim1 Φi → 0. ←Ð ←Ð i=1 (2) Moreover, if S = K and H2 (G, K) is finite dimensional, then there are short exact sequences 0 Ð→ Φj Ð→ H2 (G, K) Ð→ lim H2 (G/γiR G, K) Ð→ 0 ←Ð for big enough j, and the inverse sequence H2 (G/γiR G, K) is quasiconstant. Proof. The 5-term exact sequence gives the exact sequence (4.3) 0 Ð→ H2 (G, S)/Φi Ð→ H2 (G/γiR G, S) Ð→ γiR G/γiR G ⊗ S Ð→ 0. Since γiR G/γiR G ⊗ S is zero-equivalent, lim H2 (G, S)/Φi = lim H2 (G/γiR G, S). Then the (1) ←Ð ←Ð follows from the short exact sequence Φi ↣ H2 (G, S) ↠ H2 (G, S)/Φi . If S = K and H2 (G, K) is finite dimensional, then Vi and Φi stabilises. Hence lim 1 Φi = 0 ←Ð  and (4.3) implies that H2 (G/γiR G, K) is quasiconstant. Proposition 4.3. Let G be a group such that H1 (G, R) is finitely generated over R and H2 (G, K) is finite dimensional. Set Φi ∶= ΦR i H2 (G, K). Then the following are equivalent. (1) ĜR is 2-cohomologically discrete over K. (2) The obvious maps give a short exact sequence 0 Ð→ Φi Ð→ H2 (G, K) Ð→ H2 (ĜR , K) Ð→ 0 for big enough i. (3) H2 (ĜR , K) ≅ lim H2 (G/γiR G, K). ←Ð Proof. Since H1 (G, R) is finitely generated over R, we have H1 (G, R) ≅ H1 (ĜR , R) (see [7]). Thus H 1 (G, K) = H 1 (G/γiR G, K) = H 1 (ĜR , K) for any i > 1. Hence we need to think only about the second (co)homology. Lemma 4.2 implies that (2) and (3) are equivalent. Moreover, it implies that H2 (G/γiR G, K) is quasiconstant and its inverse limit is finite dimensional. By Lemma 2.3 we get that H 2 (G/γiR G, K) in a quasiconstant direct sequence with a finite dimensional inverse limit. It follows that (lim H2 (G/γiR G, K))∗ = lim H 2 (G/γiR G, K) ≅ Hu2 (ĜR , K) and Ð→ ←Ð (lim H 2 (G/γiR G, K))∗ = lim H2 (G/γiR G, K), where (−)∗ = HomK (−, K). Using this, we get ←Ð Ð→ that (3) is equivalent to (1).  ON BOUSFIELD’S PROBLEM FOR SOLVABLE GROUPS OF FINITE PRÜFER RANK 17 Remark 4.4. Using Proposition 4.3, the main result of [13] can be reformulated as follows. If G is a finitely presented metabelian group, then ĜR is 2-cohomologically discrete over K. 4.3. Q-prenilpotent groups. Note that by definition G/γiQ G is torsion free. Lemma 4.5. A group G is Q-prenilpotent if and only if the sequence G/γiQ G ⊗ Q stabilises. Proof. If G is Q-prenilpotent, then obviously the sequence G/γiQ G ⊗ Q stabilises. Assume now that G/γiQ G⊗Q stabilises and prove that G is Q-prenilpotent. Since −⊗Q is an exact functor, Q Q this means that γiQ G/γi+1 G ⊗ Q = 0 for big enough i. Using that γiQ G/γi+1 G is torsion free, we Q Q  obtain that γi G/γi+1G = 0 for big enough i. Thus G is Q-prenilpotent. Lemma 4.6. Let A ↣ G ↠ G′′ be a short exact sequence of groups such that (1) G′′ is Q-prenilpotent. (2) A is an abelian group such that A ⊗ Q is finite dimensional. Then G is Q-prenilpotent. Proof. We assue that A is a normal subgroup in G and A ↣ G is the embedding. Set Vi = (A/A ∩ γiQ G) ⊗ Q. Then Vi is a quotient of A ⊗ Q. Consider the short exact sequence 0 Ð→ Vi Ð→ G/γiQ G ⊗ Q Ð→ G′′ /γiQ G′′ ⊗ Q Ð→ 1. Using that G′′ is Q-prenilpotent and A ⊗ Q is finitedimensional, we get that G′′ /γiQ G′′ ⊗ Q and Vi stabilise. Then G/γiQ G ⊗ Q stabilises. Then by Lemma 4.5 we obtain that G is Q-prenilpotent.  Proposition 4.7. Let G be a solvable group with a finite sequence of normal subgroups G = U1 ⊇ U2 ⊇ ⋅ ⋅ ⋅ ⊇ Us = 1 such that Ui /Ui+1 are abelian and Ui /Ui+1 ⊗ Q are finite dimensional. Then G is Q-prenilpotent. In particular, ĜQ is cohomologically discrete over Q. Moreover, if G is finitely generated, then it is HQ-good. Proof. Using the Lyndon–Hochschild–Serre spectral sequence and induction on s, it is easy to see that H2 (G, Q) is finite dimensional. Then the assertion follows from Lemma 4.6 by induction and Proposition 4.3.  Remark 4.8. Note that we can not replace Q by Z or Z/p in Proposition 4.7. For example, consider the group G = Z ⋊ Z/2 with the sign action of Z/2 on Z. Then we have a short exact sequence Z ↣ G ↠ Z/2, where Z/2 ⊗ R and Z ⊗ R are finitely generated over R for R = Z, Z/2. Z/2 But G is not R-prenilpotent for R = Z, Z/2 because γiZ (G) = γi (G) = 2i−1 Z ⋊ 0 for i ≥ 2. 4.4. Completions of solvable groups of finite Prüfer rank. Recall that a solvable group G is of finite Prüfer rank if there is a finite sequence of normal subgroups G = U1 ⊇ ⋅ ⋅ ⋅ ⊇ Us = 1 such that for any i the group Ui /Ui+1 is an abelian group of finite Prüfer rank. Theorem 4.9. Let G be a solvable group of finite Prüfer rank. Then ĜZ and ĜZ/p are cohomologically discrete over Z/p. Moreover, if G is finitely generated, then H2 (G, Z/p) → H2 (ĜR , Z/p) is an epimorphism for R ∈ {Z, Z/p}. Proof. Cohomological discreteness follows from Theorem 3.11. Using that Hn (A, Z/p) is finite for an abelian group A of finite Prüfer rank, by induction, it is easy to check that Hn (G, Z/p) is finite. Then the epimorphism follows from Proposition 4.3.  18 SERGEI O. IVANOV Proposition 4.10. Let A be a abelian group such that A/p and p A are finite. Then ÂZ/p is a finitely generated Zp -module. Moreover, if tor(A) is finite and M is a finite Z/p[ÂZ/p ]-module, then (4.4) H∗ (A, M) = H∗ (ÂZ/p , M). Proof. The multiplication by pi gives an epimorphism A/p ↠ pi A/pi+1 A. It follows that pi A/pi+1 A is finite and A/pi is finite for any i. Then ÂZ/p is a profinite abelian group. Note that A/pi is a product of cyclic p-groups, and the number of the factors does not depend on i because (A/pi )/p = A/p. It follows that ÂZ/p has a finite set of generators converging to 1 (see Lemma 2.5.3 of [16]). For any other prime number q ≠ p we have (ÂZ/p )/q = lim(A/pi )/q = 0 ←Ð (Lemma 3.2). Then by Theorem 4.3.5 of [16] we obtain ÂZ/p is a finitely generated Zp -module. Assume that tor(A) is finite. Hence p (pi A) = 0 for big enough i. Note that pi A/pi+1 A is finite and A/pi is finite. Consider the group of automorphisms G = AutZ (M) and assume that pt is the largest power of p that divides ∣G∣. Hence pt ÂZ/p ⊆ Ker(ÂZ/p → G). It follows that pt ÂZ/p acts trivially on M. Then we can use Proposition 3.9 both for A and ÂZ/p . The assertion follows.  Remark 4.11. If A is an abelian group of finite Prüfer rank but the torsion subgroup is not finite, the isomorphism (4.4) fails. For example, if Z/p∞ = lim Z/pi , then (Z/p∞ )∧Z/p = 0 and Ð→ ∞ ∞ ∧ Z/p = H2 (Z/p , Z/p) ≠ H2 ((Z/p )Z/p , Z/p) = 0. 5. Metabelian groups over C 5.1. Completion of modules. Let Λ be a Noetherian commutative ring and a ◁ Λ be an ideal. The a-adic completion of a Λ-module M is the inverse limit M̂a = lim M/Mai . Denote ←Ð by ϕM ∶ M → M̂a the obvious map. The completion of the ring itself Λ̂a is a Noetherian commutative ring [5, III, §3, Cor. of Prop.8] and M̂a has a natural structure of Λ̂a -module. Moreover, M̂a = ϕM (M) ⋅ Λ̂a (5.1) [5, III, §3, Cor.1]. The functor M ↦ M̂a is exact on the category of finitely generated Λmodules, there is an isomorphism M̂a ≅ M ⊗Λ Λ̂a (5.2) for a finitely generated module M [5, III, §3, Th.3]. In particular, if N ≤ M, we can identify N̂a with the submodule in M̂a . Consider the ring homomorphism ϕ = ϕΛ ∶ Λ → Λ̂a . Denote by â = Ker(Λ̂a ↠ Λ/a). Applying the functor of the a-adic completion to the short exact sequence a ↣ Λ ↠ Λ/a we get â = âa . ̂ i ) with the ideal of Λ̂ and use (5.1), we Using (5.1) we obtain â = Λ̂a ⋅ ϕ(a). If we identify (a a a obtain ̂ i ) = ϕ i (ai ) ⋅ Λ̂ = Λ̂ ⋅ ϕ(ai ) = âi . (5.3) (a a a a a Tensoring the short exact sequence âi ↣ Λ̂a ↠ Λ/ai on M, we obtain the exact sequence M ⊗Λ âi → M̂ → M/Mai → 0, which implies M/Mai = M̂a /M̂a âi . ON BOUSFIELD’S PROBLEM FOR SOLVABLE GROUPS OF FINITE PRÜFER RANK 19 In particular, Λ/ai = Λ̂a /âi . It follows that (Λ̂a )∧â = Λ̂a . Assume that M is a finitely generated Λ̂a -module. Using (5.3) we obtain M⋅âi = M⋅ai . Then, using (5.2), the isomorphism (Λ̂a )∧â = Λ̂a and the equality M ⋅ âi = M ⋅ ai , we get M̂â = M̂a = M. (5.4) Lemma 5.1. Let Λ be a Noetherian commutative ring, a, b are ideals of Λ and M be a finitely generated Λ-module. Then (M̂a )∧b = M̂a+b = (M̂b )∧a . Proof. Note that M̂ ai = M̂ âi . Then we have M̂a /M̂a ai = M/Mai . It follows that Mai M M̂a = . j i + Mb M̂a a + M̂a bj If we take M = M̂a /M̂a bj , then (5.4) implies M̂a lim = M̂a /M̂a bj . i ←Ð M̂a a + M̂a bj i Therefore we have M = (M̂a )∧b . lim lim i ←Ð ←Ð Ma + Mbj j i Using that a double inverse limit is the limit over the ordered set N2 and that the diagonal {(i, i) ∣ i ∈ N} is a cofinal subset, we obtain M = (M̂a )∧b . lim i ←Ð Ma + Mbi i Finally, using that M(a + b)2i ⊆ Mai + Mbi ⊆ M(a + b)i , we obtain M̂a+b = (M̂a )∧b .  Let A be a finitely generated abelian group and Λ be a Noetherian commutative ring. Then the group ring Λ[A] is a Noetherian commutative ring. We denote by IΛ the augmentation ideal of Λ[A], denote by p ⋅ Λ[A] the ideal of Z[A] generated by p ∈ Λ ⊂ Λ[A] and set Ip,Λ ∶= IΛ + p ⋅ Λ[A] = Ker(Λ[A] ↠ Λ/p). Moreover, we set I = IZ , Ip = Ip,Z . It is easy to see that, if M is a Λ[A]-module, then its Z/p-completion as an abelian group coincides with the p ⋅ Λ[A]-adic completion M̂Z/p = M̂p⋅Λ[A] . In particular, it does not depend on Λ. Moreover, if A is generated by t1 , . . . , tn , then IΛ = ∑ Λ[A](ti − 1) and MIΛ = ∑ M(ti − 1) = MI, MIp,Λ = MI + pM = MIp . It follows that the completions do not depend on Λ M̂IΛ = M̂I , M̂Ip,Λ = M̂Ip and we can use the notations M̂I and M̂Ip for any Λ. 20 SERGEI O. IVANOV Corollary 5.2. Let A be a finitely generated abelian group, Λ be a Noetherian commutative ring and M be a finitely generated Λ[A]-module. Then (M̂Z/p )∧I = M̂Ip = (M̂I )∧Z/p . By Zp we denote the ring of p-adic integers Zp = lim Z/pi = ẐZ/p . ←Ð Corollary 5.3. Let A be a finitely generated abelian group and M be a Zp [A]-module, which is finitely generated over Zp . Then lim (M/pi )∧I = M̂I = M̂Ip . ←Ð ̂ i Proof. It follows from the equation (M/pi )∧I = (Z/pi ⊗ M) ⊗Zp [A] Z p [A]I = Z/p ⊗ (M ⊗Zp [A] ̂ i Z  p [A]I ) = (M̂I )/p , the equation M̂Z/p = M and Corollary 5.2. By C we denote the infinite cyclic group. Lemma 5.4. Let K be an Artinian commutative ring and M be a K[C]-module, which is finitely generated over K. Then the C-module M̂I is nilpotent, the homomorphism M → M̂I is a split homomorphism of C-modules and there is an isomorphism M = MI ∞ ⊕ M̂I , i which is natural by M, where MI ∞ = ⋂∞ i=1 MI . Proof. We denote by a ∶ M → M the multiplication on t and set b ∶= a − 1. Then there is positive integer n such that Im(bn ) = Im(bn+1 ), Ker(bn ) = Ker(bn+1 ) and V = Im(bn ) ⊕ Ker(bn ) [14, Cor. 6.4.2]. Moreover, it is easy to see that MI i = Im(bi ). It follows that MI i = Im(bn ) for i ≥ n, V̂I = Ker(bn ) and V ≅ V̂I ⊕ V I i .  Lemma 5.5. Let M be a Zp [C]-module, which is finitely generated over Zp . Then MI = MIp the homomorphism M → M̂I splits in the category of C-modules and there is a natural isomorphism M = MI ∞ ⊕ M̂I , where MI ∞ = ⋂ MI i . Moreover, if C = ⟨t⟩ and M(t − 1) ⊆ pM, then M ≅ M̂I . kj as an Proof. Since M is a finitely generated Zp -module, M is isomorphic to Znp ⊕ ⊕m j=1 Z/p abelian group. The quotient M/pi is a Z/pi [C]-module, which is finitely generated over Z/pi . It follows that the map M/pi → (M/pi )∧I is a split epimorphism of Z/pi [C]-modules. Denote the section by si ∶ (M/pi )∧I → M/pi . Moreover, using that the section is natural, we obtain that the diagram si (M/pi )∧I M/pi (M/pi−1 )∧I si−1 M/pi−1 is commutative. It follows that {si } induce a section on the level of inverse limits. Using Corollary 5.3, we obtain that M → M̂I is a split epimorphism of C-modules and the section is natural. The kernel of the epimorphism equals to MI ∞ . Then M = MI ∞ ⊕ M̂I . If MI = M(t − 1) ⊆ pM, then MI i ⊆ pi M, and hence, MI ∞ = 0 and M = M̂I .  ON BOUSFIELD’S PROBLEM FOR SOLVABLE GROUPS OF FINITE PRÜFER RANK 21 5.2. Completion of metabelian groups over C. Lemma 5.6. Let G be a group, N be a nilpotent G-module and X be an abelian group. Then Hn (N, X) is a nilpotent G-module. Proof. Let N be a nilpotent G-module of class m. The proof is by induction on m. If m = 1, then N is a trivial G-module, and hence, Hn (N, X) is trivial. Prove the inductive step. Consider a short exact sequence T ↣ N ↠ N ′ , where T is a trivial module and N ′ is a nilpotent module of class m − 1. By inductive hypothesis the second page of the spectral sequence consists of nilpotent modules Hi (N ′ , Hj (T, X)). It follows that Hn (N, X) is nilpotent.  By C we denote the infinite cyclic group. A group G is said to be metabelian over C if there is a short exact sequence M ↣ G ↠ C, where M is abelian. Then M can be considered as a C-module, where the action of C is induced by the conjugation. It is easy to see that G = M ⋊ C. Hence the group structure on G depends only on the C-module M. Then the completions can be described as follows ĜZ = M̂I ⋊ C, (5.5) ĜZ/p = M̂Ip ⋊ Zp , ĜQ = (M ⊗ Q)∧I ⋊ Q, where I is the augmentation ideal of Z[C] and Ip = I + p ⋅ Z[C] (see Prop. 4.7 and Prop. 4.12 of [13]). Proposition 5.7. Let M be a C-module such that M ⊗Q is finite dimensional and G = M ⋊C. Then the map is an epimorphism for any n. Hn (G, Q) ↠ Hn (ĜQ , Q) Proof. Set V = M ⊗ Q. The homomorphism G → ĜQ induces a morphism of the spectral sequences Hi (C, Hj (M, Q)) Ð→ Hi (Q, Hj (V̂I , Q)). Note that Hi (C, −) = 0 and Hi (Q, −) = 0 for i ≥ 2. Indeed, for C it is obvious and for Q it follows from the fact that homology commutes with direct limits (H∗ (lim Gi , M) = lim H∗ (Gi , M)) and Ð→ Ð→ Q = lim Z. Then the spectral sequences have only two nontrivial columns and the morphism Ð→ of spectral sequences gives a morphism of the short exact sequences 0 H0 (C, Hn (M, Q)) Hn (G, Q) H1 (C, Hn−1 (M, Q)) 0 0 H0 (Q, Hn (V̂I , Q)) Hn (ĜQ , Q) H1 (Q, Hn−1 (V̂I , Q)) 0. Therefore, it is enough to prove that Hi (C, Hn (M, Q)) Ð→ Hi (Q, Hn (V̂I , Q)) is an epimorphism for any n and i = 0, 1. Note that H∗ (C, Q) = H∗ (Q, Q). Using this and the long exact sequence associated with a short exact sequence of modules, we obtain H∗ (C, N ) = H∗ (Q, N ) 22 SERGEI O. IVANOV for any nilpotent Q[Q]-module N . If N is a nilpotent Q[C]-module, there is a unique way to lift the action of C = ⟨t⟩ to the action of Q = {tα ∣ α ∈ Q} on N ∶ ∞ α xtα = ∑ ( )x(t − 1)n , n=0 n where α ∈ Q, x ∈ N (see Lemma 4.4 of [13]). The sum is finite because N (t − 1)n = 0 for big enough n. It is easy to see from the formula that N (tα − 1) ⊆ N (t − 1). It follows that the Q[Q]-module N is nilpotent if and only if it is nilpotent as a Q[C]-module. The module V̂I is nilpotent as a Q[C]-module (Lemma 5.4). Then Hn (V̂I , Q) is nilpotent as Q[C]-module (Lemma 5.6), and hence, it is nilpotent as a Q[Q]-module. It follows that Hi (C, Hn (V̂I , Q)) = Hi (Q, Hn (V̂I , Q)). Hence it is sufficient to prove that the homomorphism Hn (M, Q) Ð→ Hn (V̂I , Q) is a split epimorphism in the category of C-modules. Note that Hn (M, Q) = Λn (V ) and Hn (V̂I , Q) = Λn (V̂I ). Then the assertion follows from the fact that V → V̂I is a split epimorphism of C-modules (Lemma 5.4).  Theorem 5.8. Let M be a finitely generated C-module such that tor(M) is finite and M ⊗ Q is finite dimensional. Set G = M ⋊ C. Then and the morphism H∗ (ĜZ , Z/p) = H∗ (ĜZ/p , Z/p) Hn (G, Z/p) Ð→ Hn (ĜZ/p , Z/p) is an epimorphism for any n. Moreover, if C = ⟨t⟩ and M(t − 1) ⊆ pM, then H∗ (G, Z/p) ≅ H∗ (ĜZ/p , Z/p) and (BG)Z/p ≅ B(ĜZ/p ). Proof. Set M = M̂Z/p . Then M is a finitely generated Zp -module (Proposition 4.10) and it is m kj as an abelian group. Using Corollary 5.2 and Lemma 5.5 we isomorphic to Zm p ⊕ ⊕j=1 Z/p obtain M = MI ∞ ⊕ M̂I . M̂I = M̂Ip = (M̂I )∧Z/p = M̂Ip , It follows that (5.6) H∗ (M, Z/p) Ð→ H∗ (M̂I , Z/p) is a split epimorphism of C-modules. By Proposition 4.10 we obtain H∗ (M, Z/p) = H∗ (M, Z/p) and H∗ (M̂Ip , Z/p) = H∗ (M̂I , Z/p) = H∗ (M̂I , Z/p). It follows that (5.7) H∗ (M, Z/p) Ð→ H∗ (M̂I , Z/p) is a split epimorphism of C-modules and H∗ (M̂I , Z/p) = H∗ (M̂Ip , Z/p). By Theorem 3.11 we get that Hn (M̂Ip , Z/p) is a finite Z/p[Zp ]-module. Using Proposition 4.10, we obtain H∗ (C, Hn (M̂I , Z/p)) = H∗ (C, Hn (M̂Ip , Z/p)) = H∗ (Zp , Hn (M̂Ip , Z/p)). Since ĜZ = M̂I ⋊ C and ĜZ/p = M̂Ip ⋊ Zp , it follows that H∗ (ĜZ , Z/p) = H∗ (ĜZ/p , Z/p). ON BOUSFIELD’S PROBLEM FOR SOLVABLE GROUPS OF FINITE PRÜFER RANK 23 The homomorphism G → ĜZ induces a morphism of the spectral sequences Hi (C, Hj (M, Z/p)) Ð→ Hi (C, Hj (M̂I , Z/p)). The spectral sequences have only two nontrivial columns and the morphism of spectral sequences gives a morphism of the short exact sequences (5.8) 0 H0 (C, Hn (M, Z/p)) Hn (G, Z/p) H1 (C, Hn−1 (M, Z/p)) 0 0 H0 (C, Hn (M̂I , Z/p)) Hn (ĜZ , Z/p) H1 (C, Hn−1 (M̂I , Z/p)) 0. Using that the left and the right vertical arrows are split epimorphisms, we obtain that the middle vertical arrow is an epimorphism. Assume now M(t − 1) ⊆ pM. Then M(t − 1) ⊆ pM. Hence, MI ∞ = 0. It follows that the map (5.6) is an isomorphism. Then (5.7) is an isomorphism. Then the left and the right vertical arrows in the diagram (5.8) are isomorphisms. Then H∗ (G, Z/p) = H∗ (ĜZ , Z/p) = H∗ (ĜZ/p , Z/p). Then BG → B(ĜZ/p ) is a Z/p-homological equivalence. Moreover, the space B(ĜZ/p ) is Z/p-local because the group ĜZZ/p is HZ/p-local. It follows that (BG)Z/p = B(ĜZ/p ).  Corollary 5.9. Let M be a C-module such that M ⋊ C is finitely presented. Set G = M ⋊ C. Then H∗ (ĜZ , Z/p) = H∗ (ĜZ/p , Z/p) and the morphism Hn (G, Z/p) Ð→ Hn (ĜZ/p , Z/p) is an epimorphism for any n. Moreover, if C = ⟨t⟩ and M(t − 1) ⊆ pM, then H∗ (G, Z/p) ≅ H∗ (ĜZ/p , Z/p) and (BG)Z/p ≅ B(ĜZ/p ). Corollary 5.10. Let a ∈ GLn (Z) such that entries of a − 1 are divisible by p. Set G = Zn ⋊a C. Then (BG)Z/p = B(ĜZ/p ). References [1] H. Abels: An example of a finitely presented solvable group, Homological group theory (Proc. Sympos., Durham, 1977), London Math. Soc. Lecture Note Ser., vol. 36, Cambridge Univ. Press, Cambridge, 1979, pp. 205–211. [2] H. Åberg: Bieri–Strebel valuations (of finite rank), Proc. London. Math. Soc. (3) 52 (1986), pp. 269–304. [3] R. Bieri and K. Strebel: Almost finitely presented soluble groups, Comm. Math. Helv. 53 (1978), pp. 258-278. [4] R. Bieri and R. Strebel: Valuations and finitely presented metabelian groups, Proc. London Math. Soc. (3) 41 (1980), pp. 439–464. [5] N. Bourbaki, Commutative Algebra, Addison–Wesley, Paris, 1972. [6] A.K. Bousfield: The localization of spaces with respect to homology, Topology Volume 14, Issue 2, June 1975, pp. 133-150. [7] A. K. Bousfield: Homological localization towers for groups and π-modules, Mem. Amer. Math. Soc, no. 186, 1977. [8] A. K. Bousfield, On the p-Adic Completions of Nonnilpotent Spaces, Transactions of the American Mathematical Society Vol. 331, No. 1 (May, 1992), pp. 335-359. [9] K. Brown, Cohomology of Groups, Springer-Verlag GTM 87, 1982. 24 SERGEI O. IVANOV [10] H. Cartan et al.: Algébre d’Eilenberg-Maclane et homotopie: seminaire, 7e annee, École normale supérieure (Paris), 1954/1955. [11] L. Fuchs: Infinite abelian groups, Academic Press, New York and London. [12] P. Hilton, Localization and cohomology of nilpotent groups, Math. Z. 132 (1973), pp. 263–286. [13] S.O. Ivanov, R. Mikhailov: On a problem of Bousfield for metabelian groups, Advances in Mathematics, Volume 290 (2016), pp. 552–589. [14] F. Kash: Modules and Rings, Academic Press (1982). [15] D.J.S. Robinson: Finiteness condition and generalized soluble groups, Part 1, Springer (1972). [16] L. Ribes, P. Zalesskii: Profinite Groups, A Series of Modern Surveys in Mathematics, Volume 40 (2010). [17] J.D. Stasheff: Continuous cohomoloyg of groups and classifying spaces, Bull. Amer. Math. Soc. 84 (1978), pp. 513-530. Chebyshev Laboratory, St. Petersburg State University, 14th Line, 29b, Saint Petersburg, 199178 Russia E-mail address: [email protected]
4math.GR
arXiv:1401.0799v1 [physics.soc-ph] 4 Jan 2014 User Equilibrium Route Assignment for Microscopic Pedestrian Simulation Tobias Kretz (corresponding author)1 , Karsten Lehmann1,2 , Ingmar Hofsäß1 1 : PTV Group, Haid-und-Neu-Straße 15, D-76131 Karlsruhe, Germany {Firstname.Lastname}@ptvgroup.com phone: +49 721 9651 7280 2 : init AG, Käppelestraße 4-6, D-76131 Karlsruhe, Germany January 26, 2018 Abstract For the simulation of pedestrians a method is introduced to find routing alternatives from any origin position to a given destination area in a given geometry composed of walking areas and obstacles. The method includes a parameter which sets a threshold for the approximate minimum size of obstacles to generate routing alternatives. The resulting data structure for navigation is constructed such that it does not introduce artifacts to the movement of simulated pedestrians and that locally pedestrians prefer to walk on the shortest path. The generated set of routes can be used with iterating static or dynamic assignment methods. Keywords: dynamic assignment, pedestrians, microsimulation 1 Introduction A model of pedestrian dynamics in the simplest case has to include three separate elements: 1) a method to determine the main walking direction towards the destination, 2) a method to avoid collisions respectively to resolve conflicts between pedestrians and 3) a method to avoid bumping into walls and even more important to avoid passing through walls. Issues 2) and 3) have been addressed in various ways, with forces [1–5], in velocity space [6–8] or directly in space [9–13]. These operational models of pedestrian dynamics usually also address issue 1). They might apply different methods to solve it, but normally they assume that it is the direction of the shortest path (fewest meters) to destination which pedestrians are heading for. Quote from [1]: “He/She wants to reach a certain destination ~rα0 as comfortable as possible. Therefore he/she normally takes a way without detours, i.e., the shortest possible way.” See subsection 3.3 for a description of two very common ways to implement this principle. This idea may be correct or at least a good approximation in situations with a very low pedestrian density. However, at higher densities and in particular with locally varying densities collision avoidance and conflict resolution imply discomfort and time delays. If collision avoidance and conflict resolution are required over proportionally often along the shortest path the more comfortable and/or the quicker path to destination may be along some detour. Obviously when pedestrian density is moderate to high only few, if any, pedestrians can really walk on the shortest path. Everyone else has to do some additional meters. In models of pedestrian dynamics as referenced above these extra meters result from collision avoidance or conflict resolution which in the simplest case is just a hard-core exclusion. However, such deviations from the shortest path are not detours in the sense of the previous paragraph. Detours in the sense of the previous paragraph are paths which result from pedestrians trying to spread out to reduce density, increase comfort, and reduce travel times. For the matter of models of pedestrian dynamics: a simplest case model of pedestrian dynamics is extended by an element which makes pedestrians avoid having to avoid collisions or prevents pedestrians having to resolve conflicts. 1 There are various approaches to address this problem. Some of these will be discussed in section 3 on previous work. The approach adopted in this work is to create a relatively small set of routing alternatives between origin and destination. With the help of intermediate destinations each pedestrian is made to walk along one of the routes. While approaching an intermediate destination a pedestrian can be controlled with one of the operational models mentioned above. In particular each pedestrian can walk into the direction of the shortest path. Navigation along the shortest path is simple and computationally cheap because the map of distance to (intermediate) destination is a constant contrary to the metric of estimated travel time to (intermediate) destination [14–17]. The detour compared to the shortest path between origin and destination only results as a consequence of sequentially approaching a number of intermediate destinations. Therefore the proposed approach aims at combining the efficient navigation along the shortest path with pedestrians who are able to walk detours between origin area and destination area by passing a sequence of intermediate destinations. Two routes between the same origin and destination can be different, but are still not perceived as actual routing alternatives by a pedestrian or car driver because they are not sufficiently distinct [18–23]. An example from road traffic can easily exemplify this: let’s say the best or at least a good route – judged on travel time or distance or some other factor or a combination of many factors – from Paris to Berlin passes by Cologne. A naı̈ve computation of the second best route would probably bring up a solution where some 100 meters of the highway are replaced by the parallel section via a highway parking place. However, the user of a navigation device would not actually perceive this as a real (substantial, relevant) alternative to the first solution, but rather a route maybe via Antwerp or Frankfurt although both of these routes have a higher expected travel time than the route via the highway parking place near Cologne. The routing alternatives computed by the method proposed in this work are mutually distinct not only in the sense that they cannot be transformed one into the other with a homotopic operation, but mutually distinct by a configurable minimum degree – they are substantially different, respectively pose relevant alternatives. Last but not least the intermediate destinations are computed geometrically such that locally they do not change pedestrian behavior in particular not introduce unnatural artifacts into the movement dynamics. I.e. someone observing an animated visualization of the simulation could not tell the presence of an intermediate destination. In the remainder first a motivation for the proposed method is given. The consequent section contains a discussion of preceding relevant work. This is followed by the section which defines the method. Finally the method is applied to an example. In the appendix we give definitions for the phrases we use in this work. A note to readers who are not entirely familiar with all topics which are touched in this paper: it may be easier to read first the section giving an example (6) as it should give an intuitive understanding of the properties of the simulation system as well as the results of the method which is proposed and only then proceed here. 2 Motivation: Computing User-Equilibria Finding and evaluating the user equilibrium network load for road networks (traffic assignment) is one of the core tasks of traffic planning. After Wardrop had formulated the principles nowadays named after him [24] various algorithms to solve this problem have been developed over the years [25–28]. The main hindrance for the application of these algorithms with pedestrian traffic is that all these algorithms are formulated for application with discrete networks, i.e. they compute flows on a node-edge graph. Pedestrians on the contrary can and do move continuously in two spatial dimensions. Their walking area can have holes (obstacles), but this does not change the fact that even when loops are excluded there are infinitely many possible paths for a pedestrian to walk from an origin to a destination. There are two ways to face the resulting challenge: either one develops an entirely different assignment algorithm for pedestrian traffic – this was done for example in [29, 30] – or one extracts from the pedestrian walking area in a well-grounded suitable way a graph structure which can be used with existing assignment methods. The routes computed with the method presented in this contribution can be seen to be such a graph structure. A user equilibrium can only be found in a mathematically thorough way with an iterative method. Any non-iterative (one-shot) method can only come close to an equilibrium by chance and will work better in one scenario and worse in a different one. “Iterative” means that the results of one iteration step are used to 2 determine the route choice ratios (i.e. the loads for the routes) in the next iteration step1 . “Non-iterative” means that route decision ratios are dependent on what happens or has happened in the same simulation run. The resulting graph of the method proposed in this paper cannot only be used with such iterated methods that aim for the user equilibrium, but also with other route choice problems and methods. However, iterated assignment aiming to find a user equilibrium can be seen as the “core business” of the method presented in this paper2 . The reason for this is that there are more non-iterative (“one-shot”) approaches for route choice. The section on existing work will discuss some of these and clarify this claim. With more alternative options available the method presented in this work appears to be less essential. For that reason in the following three paragraphs we motivate the formulation of the routing graph generation method of this paper by emphasizing the relevance of the user equilibrium in pedestrian traffic. So, how relevant is user equilibrium in pedestrian traffic? After all on vehicular road networks a nearequilibrium state occurs day by day because of the commuters’ workday by workday experience with a traffic system which is near or beyond its capacity. Are there comparable situations (repeated near-systemcapacity demand which makes pedestrians accept to walk considerable detours to reduce walking time) for pedestrians as well? It is probably safe to say that there are less such situations and that they can be less clearly spotted compared to the daily vehicular rush hour. However, they can exist for example in large metropolitan stations [31] and will more often occur there in the future considered the contemporary global urbanization dynamics [32]. Even in situations where one cannot assume that a user equilibrium is realized because there is no repeated experience with the situation there can be a clear benefit in knowing the user equilibrium. Take as example emergency evacuations. Emergency evacuations are a highly relevant application case for pedestrian simulations and emergency evacuations are the exact opposite of commuting regarding experience: even if emergency evacuation trainings are held frequently one can say that a real emergency evacuation usually is the first time experience for all occupants at least concerning the particular building. For usually the user equilibrium will be the more efficient solution than the distribution which emerges naturally in an emergency evacuation, a planner can take measures to shift the system toward the user equilibrium. In emergency evacuation planning this could for example be done with additional or different route signage. 3 As a third argument in favor of the relevance of user equilibrium assignment for pedestrian traffic simulations one can hypothesize that pedestrians at least in certain situations have an intuitive understanding of how a pedestrian flow situation will evolve even if they are faced with the particular situation for the first time and that they will distribute close to the user equilibrium. Of course pedestrians do not in all situations distribute according to the user equilibrium. Pedestrian route choice can depend on many other factors, including the availability and distribution of landmarks as well as social aspects [36]. Universality, however, is not required that a method to compute it is relevant. It is sufficient if these situations exist and planners have an understanding which situations these are. 1 An iteration step can comprise of one or more simulation runs. In the latter case the results are aggregated over the various runs to get the foundation for the next iteration step. 2 At least this is currently the authors’ opinion. Time might show that the routes computed with the methods of this article are more often used outside the scope of iterated assignment. This would not limit the relevance of the method at all. Just for the moment we are excited to have the foundation to combine long standing models of pedestrian dynamics with iterated assignment. 3 One might ask if it was more desirable then to know the system optimum distribution (for which the routes computed with the method of this article could also serve as a base). However, particularly for emergency evacuation planning attempting to implement with signage the system-optimal distribution rather than the user equilibrium raises an ethical question: is it allowed to send a few people on paths which are suboptimal for them to benefit many others? The second argument against going for the system optimum is a question of its relevance: the experience in vehicular road traffic is that in realistic networks often there is not much of a difference between user equilibrium and system optimum [33]. Despite the existence of Braess’ Paradox in vehicular road traffic [34] and despite the fact that one can construct examples with counter-intuitive effects for pedestrian traffic as well [35] one can suspect that for realistic examples the user equilibrium can serve as a good solution and thus as benchmark to compare other solutions with. 3 3 3.1 Existing Work Models of Operational Pedestrian Dynamics There is a great number of models of operational pedestrian dynamics which route pedestrians on the spatially shortest path. These models fall into a number of categories. For example so-called Cellularautomata models are manifestly formulated in discrete space and discrete time [9, 13, 37]. Different to these force-based models as the Social Force Model [1, 4] and most other force-based models [3, 5] are formulated in discrete time and discrete space. Usually their temporal aspect can be discretized or has to be discretized as the only way to solve the system equations is a numerical integration [38]. For an overview of these and other operational models of pedestrian dynamics see for example [39, 40]. These models are interesting here in so far as – according to the motivation stated above – they lack an important element which is supplied with the method proposed in this paper. The sheer number of these models underlines the relevance of our method yet on the other side makes it impossible to discuss or even just mention all of them here. Instead we will shortly discuss some models and methods which address the same issue as our method does. 3.2 Models of Pedestrian Dynamics which Include Elaborate Route Planning Methods To the authors’ knowledge so far there has not been proposed another general method that analyzes and computes pedestrian routing alternatives in a thorough way such that it can be used with existing methods for iterated assignment of a microscopic pedestrian simulation without introducing artifacts into the movement of pedestrians. However, if the stated properties are contrasted with their opposite – iterated vs. one-shot, microscopic vs. macroscopic, discrete route vs. continuous space, and time interval vs. continuous time – then there has been a number of contributions which aim in the same direction of making simulated pedestrians avoid having to avoid conflicts. An iterated assignment in continuous space and time with a macroscopic approach has been proposed Hoogendoorn and Bovy in [30]. The paper – together with [29] – also gives a good problem formulation and overview of the fundamentals of pedestrian assignment. Different to our method and as usual for continuous space approaches this method does not make route choices explicit in the sense that it generates routes as identifiable data objects. One can assume that such a method is computationally very demanding as it considers infinitely many routes instead of singling out relevant route choices to work with these. Earlier Hughes proposed a one-shot macroscopic method [41, 42]. As it is different from our approach in two aspects (one-shot and macroscopic) we will not discuss it further here. Kemloh Wagoum et al. proposed a dynamic one-shot route choice method with discrete routes which distinguishes between locally and globally optimal routes and between shortest and quickest path [43]. A node-link network structure is extracted from the geometry where rooms are nodes and doors or corridors are links. Pedestrians with a (locally) quickest routing strategy observe other pedestrians in the same node (room) and their current speed. Based on this they make an estimation on what is the quickest route. The focus of the work clearly is set on modeling the “internal state” of a pedestrian – if he or she is in a hurry or not or patient or not – and thus applies a shortest or a quickest path strategy. It is furthermore modeled in an elaborate way how he or she selects a reference pedestrian and draws conclusions from this pedestrian’s current walking speed. There is on the contrary no discussion of the semantics of a walking infrastructure. It is implicitly assumed that rooms and corridors (or doors) can always be identified easily and uniquely, hereby assuming that doors or corridors are the bottlenecks, i.e. the capacity limiting elements and that rooms are spill-back and jamming areas, which have no effects on capacity. These assumptions hold for functional building infrastructure as for example office buildings. Station halls, airport terminals and urban public spaces as examples on the contrary usually are comprised of a mixture of obstacles and walking spaces which does not allow such a clear distinction between room and corridor respectively node and link. As a consequence the possibility to distinguish – in the sense of the algorithm – between global and local gets lost. The algorithm proposed by Kemloh et al. may be applicable in such a scenario or at least a share of such scenarios. Then, however, the node-link network would have to be created specifically for this application in a particular scenario. The paper does not give a general method for its construction, i.e. the focus of this paper is not a method to produce routing alternatives, but on the method to decide which route to take. Another approach is to base navigation on a visibility graph [44] or a graph derived from it [45] and either 4 use – in a one-shot approach – the pedestrian densities in the vicinity of the links to estimate current travel times and thus navigate pedestrians on the instantaneously estimated quickest route [46, 47] or the travel times on the links in the previous time interval of the same simulation run or the travel times on the links in a previous iteration in an iterative approach. Problems arise from the visibility graph only offering navigation points. This inescapably leads to problems which will be discussed below. Furthermore a visibility graph also includes route alternatives generated by very small obstacles like litter bins which can be handled by the operational part of a simulation model. A continuous space, continuous-time, one-shot method was introduced by Treuille et al. in [48]. Crowd movement here is determined by the computation of an optimal path under consideration of distance, travel time (resp. speed), and discomfort, which results in one single “dynamic potential” respectively its differential form the “unit cost field”. While pedestrians are represented microscopically the interaction between them is exclusively transferred via the common dynamic potential i.e. in a macroscopic manner. The model therefore can arguably be referred to as a mesoscopic model. This method as well does not generate routes as identifiable data objects. Based on the principle of least effort referring to energy consumption Guy et al. proposed a related continuous-time, one-shot method in which a strong congestion avoidance behavior emerges [49]. In this model it is the current average speed in the vicinity of the links of a precomputed node-link roadmap4 which determines the expected energy to traverse a link and thus route choice. One could consider this method as “almost continuous space” as the pedestrians are moving in this way, while the route choice determining effects are transmitted via a node-link graph. Another continuous space, (almost) continuous time, one-shot method for use with microscopic simulation has been introduced by Kretz et al. in [50, 51]. In this approach a map of estimated remaining travel time to destination (called “dynamic potential”) of which the pedestrians use the negative gradients as their desired walking direction to walk into the direction of the quickest path. This desired walking direction then is used in a variant of the Social Force Model [4]. This implies interaction between identified individuals and therefore that the whole model is truly microscopic. The dynamic potential is computed in instantaneous time, i.e. for locations ahead of a pedestrian the current conditions are used as input for the computation and not (estimated) future conditions of the time when the pedestrian (potentially) will be there. This is not necessarily a drawback for the degree of realism, as real pedestrians also have only a very limited capacity to guess future conditions beyond a few seconds unless the situation can be recognized to be about steady-state in which the dynamic potential approach also works fine. While the simulation results appear realistic, the approach does not indicate if the evolution of the simulation is close to an equilibrium solution. Related to the continuous space, one-shot methods is an idea by van Toll et al. to explicitly measure density on polygon-shaped, discrete, non-overlapping areas and compute from these densities expected travel times along a navigation map [52]. Other related work includes [53] and [54]. 3.3 Navigation Methods There is a large amount of literature on navigation methods for the simulation of pedestrians or control of robots [55]. Navigation means to guide a simulated pedestrian or a robot to a given destination while considering obstacles. A simulated pedestrian or a robot should neither bump into obstacles nor get trapped in a dead-end and not find out anymore. There are mainly two methods to solve this problem: with sparse navigation graphs or with distance maps also called static potentials. We understand navigation here as the element of a method which sets the basic direction of movement. There can be other elements in a model of pedestrian dynamics which modify this basic direction. For example for the Social Force Model we think of the driving force term as incorporating the navigation aspect while the forces from other pedestrians are a refinement which one could call “sub-navigational”. The idea of navigation graphs is to have a small set of vertices – navigation points – of which at each time each pedestrian has one where (s)he is heading for. The vertices are connected to a graph in a way that a link exists, if two vertices are mutually visible, i.e. there is no obstacle in the direct line of sight. As visibility is the guiding principle in the construction of such a graph it is usually called a visibility graph [44]5 . 4 Only few details on the nature of the roadmap are given in the paper. variant to construct a basic graph is to compute the (generalized) Voronoi diagram of the obstacles [56]. An 5 Another 5 Further construction principles are that the graph should have as few nodes as possible and that navigating a single pedestrian from node to node allows navigation on the shortest path6 to the destination for any origin position. Once a navigation graph is computed the shortest paths on it can easily be computed using for example Dijkstra’s algorithm [58] Figure 1 shows a simple example of a navigation graph which leads the shortest way around one single obstacle to a destination. Figure 1: Left: Example of a visibility graph, resp. navigation graph. Walking areas of pedestrians are shown black, an obstacle in the middle is marked with diagonal red stripes on white ground. The destination at the lower edge is shown as green and black checkerboard pattern. The navigation graph and the navigation nodes are marked yellow. Note that on the destination area a number of navigation nodes have to be put such that pedestrians for which the destination area is visible from the start walk the about the shortest path to the destination area and not a longer way to one of its corners. The right image shows in addition two possible origin positions (cyan dots) and links to the nodes which are visible (magenta and cyan). The shortest navigation paths to the destination area are marked cyan. Navigation graphs are an intuitive and almost self-suggesting approach for navigation in simulation of pedestrians and control of robots [59]. The method works well to navigate individuals. Problems occur when it is used to navigate groups – crowds or swarms. As swarms of robots are rare – although this has begun to change [60] – the method usually works well in the field of robotics. To navigate crowds of pedestrians (or swarms of robots) the method can become problematic. Having the navigation graph and the correct sequence of nodes to the destination is not sufficient. At each time step of a simulation one has to select one of the nodes as current destination node. The simplest way is to define an arrival distance to which a pedestrian has to get close to a navigation node and if the pedestrian has come that close or closer in later simulation time steps the next node is used as destination node. If only a single pedestrian is moving in the vicinity of a navigation node the arrival distance can be set at a small value (about a body diameter). It even has to be set such small as a larger arrival distance would make the pedestrian proceed too early with the subsequent node and eventually make him bump into a wall, even get trapped in a dead-end. If on the contrary there is a large group of pedestrians heading for a navigation node in reality not all pedestrians pass by the node really close. If one has set a small arrival distance a navigation node poses an artificial bottleneck: one after the other pedestrian of the group has to pass by close to the navigation point to be able to proceed – compare the discussion in [61] and for example figure 6 of [45]. One might attempt to fix the problem by adjusting for each navigation elaborate variant introduced in [57] for example largely reduces the problem of artificial bottlenecks, but still navigation elements (in said paper called‘navigation graph edges) generally introduce artifacts to the local motion as illustrated in section 4. 6 A navigation graph could also be applied with a different paradigm for example that the walking direction should have a minimum angle with some landmark. However, most of the time walking distance is the decisive criterion. 6 node individually the arrival distance depending on the surrounding pedestrian density, but this is a rather complicated and computation intensive fix which takes away much attractiveness from the original approach drawn from its simplicity. A second possible way to select a navigation point is to make pedestrians always head for that navigation node which is a) visible from the pedestrians current position and b) closest to the destination area. This immediately fixes the problem of pedestrians possibly getting stuck or bumping into a wall at the cost of having to permanently do costly visibility computation throughout the simulation. For the purpose of this contribution this second way to choose navigation node is ruled out for another reason which is illustrated and explained in figure 2. Figure 2: This figure shows the origin position of a pedestrian (cyan dot) who is assigned to walk a detour on a path which has a higher capacity compared to the shortest possible path (which is what the facing contribution is about). Assume a crowded scenario where some pedestrians have to walk the detour as the shortest path has not enough capacity. The first navigation node where a detouring pedestrian has to head for is the one which is linked to the origin position with the cyan link. Then the pedestrian at some later time during the simulation will be located at the magenta spot. If the rule “move toward that visible node which is closest to the destination” is applied the pedestrian will cancel his detour and walk through the narrow corridor, i.e. the shortest path instead of the intended detour. This implies that for the purpose of this contribution one would have to steadily monitor if the rule can be applied or not and decide how else to choose a navigation node if not according to said rule. As a consequence of these difficulties the approach of a navigation graph is discarded as a whole for the purpose of this contribution. Distance maps respectively potential fields are chosen instead as base method. The method of distance maps or static potentials has been popular for modeling pedestrian dynamics in particular in use with cellular automata models [9–12, 62–66]. The reason for this is probably that the data structure of the distance map fits well to the spatial representation of cellular automata models: a regular usually rectangular grid. Figure 3 visualizes an example of a distance map. In cellular automata models the distance maps are usually used such that pedestrians move with higher probability to a cell which is closer to the destination. In other modeling approaches which do not directly operate with space, but rather with velocity or acceleration as for example the force-based models do7 , pedestrians follow the negative gradient of the distance map at their current position. “Follow” here means that this direction is used as preferred or desired or base direction and may be subject to modifications as consequence of influence of for example other pedestrians or limited acceleration ability. Figure 4 shows an example for the field of gradients. For reasons of simplicity and computation speed some models of pedestrian dynamics compute the distance map using a simple flood fill method: at the destination area all grid values are set to zero. Then a “flood” is driven outward simply either moving only over common edges or over common edges and common corners from cell to cell. In each of these steps a counting parameter is increased by one. The value of this counting parameter is set as grid cell value when the flood front passes the grid cell. The resulting metric 7 An example for a model where the gradients are used for the velocity instead of he acceleration (as in force-based models) is discussed in [67] 7 Figure 3: The left figure shows a distance map with the brightness of a spot directly proportional to the value of the grid point, i.e. the distance of that spot to the destination area. The destination area is shown as a green-black checkerboard, the obstacle is marked with diagonal red lines on white ground. In the right figure the brightness is computed modulo to some distance value d. Figure 4: Field of negative gradients (white). This figure shows an excerpt of the geometry of figure 3. Shown is the area around the upper left corner of the obstacle. It is a general mathematical property of gradients that they are orthogonal to lines of equal value (equi-potential lines) of the field from which they are derived. Therefore the negative gradients give the direction which for a given step distance most reduces the distance to destination. Basically following the negative gradients pedestrians are also guided around the obstacle. 8 is not Euclidean, but either Manhattan metric (if in the flooding process only common edges are passed) or checkerboard metric (if also common corners are passed). A detailed discussion of these methods and variants can be found in [68]. The most common method to compute a nearly Euclidean distance map is the one of [69] for which meanwhile also variants exist which promise lower computation times under certain conditions [70, 71] and there has been proposed a flood fill-like method which also produces a Euclidean metric [72]. 4 Problem Illustration Imagine a walking geometry as shown in figure 5. In this case it is easy to make pedestrians pass the obstacle on either side by introducing on each side of the obstacle an intermediate destination area. This is shown in figure 6. With the intermediate areas and the routes which include them, it is possible to route pedestrians locally into the direction of the shortest path, but still make a given fraction of pedestrians detour. Figure 5: Walking area (black), obstacle (diagonal red lines on white ground), origin area to the left (red and black diagonal checkerboard pattern) and destination area to the right (green and black checkerboard pattern). The yellow line shows the path a pedestrian (set into the simulation at some arbitrary coordinate on the origin area) would follow if a distance map is used to determine his basic direction. The route data simply would be some information (e.g. an area ID) identifying the destination area. In figure 6 the lower intermediate destination area was not necessary. Having a route directly leading from the origin to the destination area would have the same effect as long as pedestrians basically follow the direction of the spatially shortest path. In this case the lower intermediate destination area does not change the path of the pedestrians on that route compared to the case without any intermediate destination area. This is not in general the case. In general it is difficult to shape the intermediate destinations such that the path on the in principal shortest route is not distorted compared to the case without intermediate destination. Figure 7 shows such a case. It is concluded that the intermediate destination areas cannot be of trivial shape (rectangles) in general. The basic idea is now that the intermediate destination areas need to be shaped along the equi-distance (equi-potential) lines of the destination area distance map (static potential). This is shown in figure 9. For if an intermediate destination area is shaped along the equi-distance lines of the next downstream (intermediate) destination area the equi-distance it produces itself are – in some surrounding of the intermediate destination – in line with the ones of the next downstream (intermediate) destination. This implies that the gradients of both distance fields locally are identical. Thus the preferred walking direction remains unchanged no matter which of the two (intermediate) destinations a pedestrian is heading for. 9 Figure 6: Compared to figure 6 the black-blue areas mark intermediate destination areas. There are now two routes, one leading over each of the intermediate destination areas. Figure 7: Example with necessarily non-trivial geometry for the intermediate destination areas. Walking area (black), obstacle (diagonal red stripes on white ground), two origin areas to the left (red and black diagonal checkerboard), destination area to the right (green and black checkerboard), and shortest paths (yellow and orange). Compare figure 8. Figure 8: For the example of figure 7 simple rectangular areas are used as intermediate destination areas (light and dark blue checkerboard pattern). With none of the three variants the shortest paths as shown in figure 7 are reproduced. 10 Figure 9: The left side shows the distance map of the destination area. Brighter pixels show larger distance. However, about at half the maximum distance the brightness is set back to zero to better display one distinct equi-distance line. The right side shows the geometry with two intermediate destination areas added which are shaped along that particular equi-distance line with their upstream (left) side. The exact shape of the downstream (right) side is not relevant. With these intermediate destination areas the shortest paths of figure 7 are reproduced necessarily and exactly up to the limited precision in the numerical definition of the intermediate destination areas (smooth curves need to be approximated with polygons). 5 Method Formulation This section introduces a method for usage in simulations of pedestrian dynamics that computes for a given origin and a given destination area the shape of intermediate destination areas. as well as the routes which these are a part of. The method includes a parameter which determines the approximate diameter above which an obstacle or a hole in the walking area creates a routing alternative. Figure 10 shows as an overview the steps which are explained in the following subsections. 5.1 Basics The first step is to compute a distance map for the destination (respectively for all destinations; this option is implied in the following) for which alternative routes ought to be computed. Next the modulo display of this potential as it is shown on the right side of Figure 3 is computed. This is not only a useful display to see the properties of the distance map clearer, but its structure also plays a crucial role in finding the intermediate destination areas. Figure 11 shows the same potential for various modulo values d. Figure 12 shows a modification of Figure 11. The gradual color change from black to white has been omitted. Instead one range from black to white is shown in one and the same color and the next range in a different one. In this way areas which are within some distance range from the destination are grouped. The coloring of Figure 12 (left and center figure) is the key for the further steps in the method. All regions which share the property of the magenta colored region have to be identified. These are regions, which are unique for their range of distances to destination, but which have two unconnected regions directly neighbored which are closer to the destination than they are. Relevant origin positions of a pedestrian in a simulation of the scenario of Figure 12 are the light and dark orange and the magenta regions as well as the light and dark cyan regions which are further away from the destination than the magenta area. If a pedestrian’s origin position is on a cyan area which is closer to the destination than the closest orange area no route alternatives are generated. In almost all simulation models of pedestrian dynamics the base direction is set into the direction of the shortest path. This implies that it is determined by the origin position if a pedestrian passes the (red) obstacle to the right or to the left side. If we want to choose freely if a pedestrian passes the obstacle either to the left or the right side, the magenta region in Figure 12 is the critical one. Once a pedestrian has passed it on the intended side of the obstacle, the shortest path paradigm will take the pedestrian on this very side to the destination; the pedestrian will not turn around anymore and pass the obstacle on the other side. Therefore the two light orange regions immediately neighbored to the magenta region are made intermediate destination areas. Each of the two is assigned to one route, generating a route choice. Sending a pedestrian over one of the two routes ensures that he passes the obstacle on the intended side. 11 Figure 10: Overview of the algorithm. The intended part is applied for each unhandled intermediate destination area (all related to one downstream intermediate destination area). The loop which is indicated marks the recursion (proceeding intermediate destination by intermediate destination from final destination owards origin). 12 Figure 11: One potential displayed with three different modulo values d. The ratio of the modulo values of the middle and the left display is 2, the one of the right vs. the left one is 8. The destination is colored as black and green checkerboard, diagonal red lines on white ground depict an obstacle. Figure 12: The destination is shown as green and black checkerboard, an obstacle is colored with diagonal red lines on white ground. Light and dark cyan mark regions which are simply connected and which lie within a range of distances to destination and which have exactly one simply connected area as direct neighbor which is closer to destination. Light and dark orange mark regions where there is more than one (here and usually: two) unconnected (split by an obstacle) regions which are within a range of distances to destination. The magenta region is simply connected and has more than one (here: exactly two) directly neighboring areas which are closer to destination than the magenta region is itself. 13 Obviously not only the shape of the additional intermediate destination areas depends on parameter d, but first and foremost if it exists at all. The right figure of Figure 12 shows no additional intermediate destination areas because the value of parameter d has been chosen too large. Parameter d therefore has the role of a wave length: just as an object cannot be seen if it is smaller than the wave length of light which is shed on it. Just as a ship which is smaller than the wave length in the surrounding sea is just going up and down but not disturbing and reflecting the waves, an obstacle which is smaller than the value of parameter d remains invisible in the sense that it has no effect (of creating an additional intermediate destination). The choice of the value of parameter d at first might appear to be arbitrary and its existence therefore as a major downside of the method. However, first, simulation models of pedestrian dynamics usually contain elements to deal with obstacles: pedestrians walking around them, keeping some distance, etc.. For small obstacles these elements can make pedestrians pass on either side even if the model of pedestrian dynamics has no elaborate route choice method included. Thus, for small obstacles no additional route choice method is required. Second, for the purpose of computational efficiency and limited computation resources, in large simulation projects it can be desirable to not consider every existing routing alternative, but only the major ones. Then one may set the value of parameter d to larger values to maintain a feasible simulation efforts. At the very end of this contribution we show that there are geometries where it would be favorable to have a small value for parameter d. However, for the reason to be able to select the size of obstacles which create route alternatives and because we think that the approach with the areas created by integer division of distances is very illustrative we stick with it and will discuss later also how to fix the emerging problem. The left side of Figure 12 suggests that there is some arbitrariness in selecting the regions which are directly neighbored to the magenta region as intermediate destination areas. Why not two of the dark orange or the other two light orange regions? The answer can be found by considering pedestrians who have an origin position somewhere on the dark orange or light orange regions. It is desired to be able to also assign such pedestrians a route which leads over an intermediate destination area on the opposite side of the obstacle. If that intermediate destination area was moved toward the destination, some pedestrians would approach the intermediate destination from the back side. This implies an unrealistic trajectory and is therefore not desired. In fact because any intermediate destination area has a finite depth, there can be a small area where this occurs although the region closest to the magenta region has been made an intermediate destination area. This problematic region is the larger, the larger the value of parameter d is. Realizing this it is important to realize as well that only the shape of the front side of an intermediate destination is relevant. The function of parameter d is to determine existence of intermediate destination areas not their depth. The depth can be reduced to the point that it is still guaranteed that any pedestrian heading to the intermediate destination does not have to slow down to step on it for at least one time step. Nevertheless for the remainder of this contribution we will not modify the shape of intermediate destination areas in this way. The unmodified shape simply gives a clearer impression of the idea. 5.2 Multiple Obstacles In the previous subsection the basic idea of the method was demonstrated in an example with just one obstacle. One has to give some additional thoughts on the usual case with more than one obstacle. If there is more than one obstacle in a scenario the basic idea presented above has to be applied recursively. This is shown in Figures 13 to 15. Figure 13 shows the initial computation step for and with the potential. The dark orange regions are identified as intermediate destinations to pass the downstream obstacle, the light orange regions have the same role for the upstream obstacle. However, the shape of the upstream regions is computed with respect to the destination. If we want to be able to send pedestrians without artifacts in their trajectories on routes which lead from an upstream intermediate destination area to that downstream intermediate area which is more remote respectively, we have to calculate the shape of the upstream intermediate destination areas with respect to the downstream intermediate destination areas. For one of the two downstream intermediate destination areas this is demonstrated in Figure 14 The brown region in Figure 14 – the region which is closer to the destination than the downstream intermediate destination area – marks the region where pedestrians’ origin positions do not generate routing alternatives. Also when the map of distances – the potential – is computed beginning at the downstream intermediate destination area, the brown region must not be intruded. For the computation of routing alternatives – not later in the simulation – it is therefore treated as if it was an obstacle. If the brown region 14 Figure 13: Compared to the previous example a second obstacle has been added. Figure 14: Computation of the upstream intermediate destination areas with respect to one of the downstream intermediate destination areas. The region where pedestrians’ origin positions do not generate route alternatives is shown brown. It is a virtual obstacle into which in the further recursions of the algorithm not anymore a potential (resp. distance map) will spread. 15 was intruded during the computation of the potential then short cut paths could result which would lead to unrealistic movement and thus spoil the intended effect of the method. Figure 15 finally shows all resulting intermediate destination areas and resulting routes. In Figure 15 one can see that the original route without intermediate destinations is preserved – it is the route which ends at the central of the nine destination dots which are depicted in green. Of the nine routes the one to the first green destination point from bottom, second, third, and fifth from bottom basically are identical as they either have no intermediate destination point or if they have then they are along the globally shortest path. The third, fifth, and seventh route from bottom (those with only one yellow marked intermediate destination, no intermediate destination, and only one cyan marked intermediate destination) can be identified easily within the algorithm as ones which multiply existing routes. As within the first iteration step on the search for upstream intermediate destinations four results are found (yellow and cyan downstream as well as the two magenta ones) one can erase the route without intermediate destination. As within the second iteration step starting at the downstream yellow (cyan) area two more intermediate destinations are found, one can erase the route with just one yellow (cyan) intermediate destination. Put in a different way: said three routes only result if one considers an intermediate destination area which was dealt with in the n-th recursion step also in the n+1-th recursion step, even if in the n-th step one or more upstream intermediate destinations were found. What remains are the two magenta intermediate destinations. These cannot so easily be identified as routes which only double the effect of other routes as they could be required if route choice was nested (see next subsection). For these remaining double routes the question is if they imply a problem or an inefficiency in an assignment method? It is surely not a serious problem with respect to assignment methods. Most assignment methods can deal with multiple identical routes. In realistic networks there are always routes which overlap. Assignment methods have to cope with this. Identical routes are simply routes which overlap by 100%. Generally the recursive search for further upstream intermediate destination areas comes to an end when the potential (the distance map) covers the entire walking area8 , but no further area with properties as the magenta areas in the example is found. The next two subsections consider further termination considerations for the recursion. 5.3 Nested route choices Figure 15 raises the question, if the intermediate destination areas whose edges are colored magenta could be dropped together with their routes. Obviously the two routes do not actually add an alternative path choice. So is it sufficient to always just consider that routing alternative which is currently closest to destination (in Figure 13 marked by the dark orange areas in the lower figure) for further process and omit any more remote one (the light orange areas in Figure 13)? The answer is“no” and the reason for this is that there are cases where route alternatives are nested; or in other words: it cannot necessarily be decided what is “upstream” and what “downstream”. Figure 16 demonstrates this with an example. Note that this example is not much different from the one in the previous subsection. The topological genus is the same. One can transfer one example into the other one by stretching and shrinking the geometry. It can – of course – always be decided which of two points is spatially closer to a destination. However, in terms of travel time this is different. One can easily imagine in the third and fourth figure of Figure 16 where there has to be a jamming crowd of pedestrians to make the indicated path the quickest to destination although it implies and includes a spatial detour. 5.4 Loops In reality people can walk loops. However, in planning tools – be it for vehicular or pedestrian traffic – one wants to exclude the emergence of loops from the algorithms unless the planner takes explicit measures to force loops occurring with a specified frequency. The method proposed so far produces sequences of 8 In principle one can already stop when the starting area (or all starting areas) is covered. For this, however, one has to know for sure when executing the algorithm where the starting area is. If this is not known or if it can change one has to consider the whole walking area. 16 Figure 15: Shown here are the edge of the destination area (green), the edges of the obstacles (red), the edge of some origin area (gray), the edges of the downstream intermediate destination areas (cyan and yellow) and the upstream intermediate destination areas (cyan, yellow, magenta). Upstream and downstream intermediate destination areas which follow in a sequence on one route are shown in the same color (cyan or yellow). Furthermore this figure shows the routes in blue. The origin area is marked with a gray dot, the destination area with green dots. All intermediate destination areas are marked with the color that corresponds to the color of the edge of the area where they are attached. The dots only mark the area which is an intermediate destination area. Their position on the area has no impact on the movement of pedestrians in the simulation. It is interesting to note that the magenta intermediate destinations share part of their edge with the cyan and another part with the yellow intermediate destinations (this makes the common edges partly appear white). This is not a coincidence, but a typical consequence of the algorithm. 17 Figure 16: In this example the route choices are nested. The destination is on the right side. The first computation of the potential (first figure) brings up two route alternatives, respectively two local maxima of distance to destination (as it was the case in the example of the previous subsection). These are manifest by the existence of the two regions marked with magenta in the second figure. The third and fourth figure show two different possible trajectories (black; from red to green) of pedestrians where the two magenta regions are passed in different sequence. 18 intermediate destinations which lead to pedestrians walking in loops. This and how to avoid this will be discussed in this subsection. The intermediate destination areas which are computed in the examples of this work share some properties: one could describe them as slightly distorted rectangles. Each rectangle has an upstream edge which is mainly adjacent to pedestrian walking space and in some cases partly to obstacles. The opposing side is the downstream side, also neighbored to walking spaces and maybe partially to obstacles. The other two mutually opposing edges – and that is the relevant point here – are neighbored to obstacles or more general to spaces where pedestrians cannot walk. These common properties are not accidental in the examples of this contribution. Only when the intermediate destination areas are clamped between two obstacles they clearly separate the local environment into upstream and downstream. In other words: only when two opposing sides “touch” obstacles the other two sides can take the role of an upstream and a downstream side, only than can the area implicitly define a direction. This raises the question how to deal with intermediate destinations where one or even both “obstacle edges” do not touch real obstacles, but a virtual obstacle – an area as the one marked brown in Figure 14 – emerging from the algorithm itself. Figure 17 shows that and how this can actually happen. If such an intermediate destination area emerges from the algorithm it can and needs to be ignored together with the route which is linked with it. The algorithm recursion can terminate at this point. The reason for this is that such a construct can be interpreted as a loop in the route. The virtual obstacle in fact is a more downstream region. An intermediate destination area which is immediately neighbored to such a region implies that a pedestrian who is located on the intermediate destination area immediately next to the virtual obstacle with one small side step could skip a part of his route, respectively if he or she still would carry it out would walk a loop. Any pedestrian who is located somewhere else on the intermediate destination area could move on the intermediate destination area toward the virtual obstacle area. This should always be possible as intermediate destination areas are constructed to guide around bottlenecks, but do not contain some themselves. Therefore the reasoning applies for the whole intermediate destination area and not only the part next to the virtual obstacle. 5.5 Location and the finite extent of intermediate destination areas Finally we have to come back to the previously mentioned problem that there are geometries, where the value for parameter d in principle has to be very small. Figures 18 and 19 shows such an example. In fact it is not just an arbitrary example, but one of a class where the problem is most pronounced. This is the case when one or more of the detouring routes includes a u-turn. Put in different words: scenarios are problematic which include sharp turns respectively strong zig-zagging. This problem is for three reasons not as severe for the method presented in this contribution as it might appear at first. The first reason is one of relevance: typically structures where pedestrians move are built such that pedestrian paths are curved but principally forward-bound, i.e. looking at Figure 18 one has rather to deal with situations similar to movement from the origin on the right side to the destination than from the origin on the left side. In these cases there is no problem no matter how large the value of parameter d might be. The second argument is that albeit in this contribution for purely illustrative reasons we have determined the extend – to be precise: the depth – of the intermediate destination areas from the value of parameter d this is anything but required. The depth of the intermediate destination areas can be set independent of the value of parameter d. The downstream edge does not even have to be bended in line with equi-distance lines, but could be a straight line. In many cases the problem will vanish if one chooses a depth for the intermediate destination areas which is just large enough so a pedestrian cannot jump over it within one simulation time step. In the extreme case of a simulation time step of one second and a pedestrian speed of 3 m/s the required depth would be 3 m. More typical would be a simulation time step of 0.1 seconds and a speed of 1.5 m/s resulting in a minimum required depth of 15 cm. Reducing the depth of the intermediate destination area will not help for the example of Figure 18 as already the upstream edge is located too far downstream. However, these cases can be found and can also be fixed. One first has to check if every point on the edge of the starting area – or more general: the next upstream intermediate destination area – is closer to the upstream edge of the particular intermediate destination area. If this is not the case one has to shift the intermediate destination area upstream. So the third argument is: in those rare cases when the problem occurs it can reliably be found and fixed. 19 Figure 17: The upper left figure shows an example geometry with the destination in the upper left corner. The origin could for example be located in the lower left or right corner. Upper right figure: in the first step the distances are computed for the destination. A route alternative emerges and with it two areas – marked orange – which in later routes would become intermediate destination areas. Lower left figure: computing the distance maps for one of the two intermediate destination areas brings up another route alternative. Lower right figure: one of the two intermediate destination areas that have emerged in the previous step has only one common edge with a real obstacle. The opposite edge is (partially) immediately adjacent to downstream area – marked brown. This is considered to be the equivalent of a route including a loop which is prohibited by definition. Therefore this branch is not followed further and no route is generated. However, the other intermediate destination area shown in the lower left figure may well result in a route. 20 Still the issue might re-enforce doubts on the benefit of parameter d. To accept the additional effort described in this subsection that has to be done as a consequence of this approach, we have to recall that with the function related to parameter d we can determine the order of size of obstacles which trigger an explicit routing alternative. In other words: it is in this way possible to define for agents (pedestrians) moving not on links but freely in 2D which two routes are sufficiently distinct. The modulo approach with parameter d is about the existence or non-existence of intermediate destinations. This is highly beneficial. The side-effects concerning the position of the intermediate destinations compared to that are small and can furthermore be fixed. Figure 18: The figure on the left shows the geometry. Walls are colored red-white, areas to walk on black, the destination is shown green, origins magenta. The way from the left origin poses the problem, the origin on the right has been added to show that the problem does not occur for all origin positions. The figure on the right shows the result of a computation as described above, where the magenta area is used to identify the two orange areas as intermediate destinations of a routing alternative. 6 A small example As this contribution focuses on the construction of the intermediate destination areas and the route alternatives we only present a minimal example of application with an assignment calculation. Figure 20 shows the geometry of the example. There are two large obstacles which have just an intermediate size that they can be seen as obstacles in one large room or as walls separating two different rooms. In addition there are four smaller obstacles which we want to have handled by the operational simulation model of pedestrian dynamics. The algorithm proposed above gives the routes and intermediate destinations as shown in figure 21. It can easily be seen in figure 21 that for the origin area as existing in this scenario routes 1, 3, and 6 as well as routes 2 and 5 in general imply the same routing for pedestrians9 . Transferring a concept from road traffic network assignment we can say they have a commonality factor of 1 [73], although a strict and general definition of the commonality factor for pedestrian routes will not be given here. Whereas the problem of routes with a high commonality factor is known from and relevant in vehicular traffic assignment, routes with a commonality factor of 1 do not exist there, respectively the problem is irrelevant. Such routes in road traffic could easily be spotted and eliminated as the data defining them would typically be identical (the same set of links). With the line of argumentation pointed out in subsection 5.2 one could drop routes 1, 2, and 3. So in this example all routes with a commonality factor of 1 could be dropped. For this initial example we will, however, also investigate the case with six routes to get an idea of the effect of routes with a commonality factor of 1. 9 However, note that if the origin area was located somewhere else, for example in the upper left corner this would be different. 21 Figure 19: From figure 18 (right side) here on the left side only the intermediate destination area of the detouring route is shown. In addition there are two paths shown from the origin to the front (yellow line) and to the back side (cyan line) of the intermediate destination area. Obviously the yellow path is the one which a pedestrian ought to walk (approximately). However, it can clearly be seen that the cyan path is the shorter one. Thus simulated pedestrians would walk to the wrong side of the intermediate destination area, turn around and proceed to the destination. Needless to say that this is highly unrealistic. The problem cannot be solved by only making the intermediate destination area narrower as the cyan line would even be shorter if the intermediate destination would only consist of its front edge. The core of the problem is that the front edge is not placed as far upstream as possible. The most possible upstream position is shown in the right figure. It is there where the upstream edges (one shown white, one shown gray) of the two intermediate destination areas just meet – or more precise: just not yet meet. That this is really the most possible upstream position can easily be understood: if one would push them further upstream they would cross and a pedestrian arriving at a certain point would be closer to the destination via the other route. Figure 20: The example scenario. Walking areas are shown dark gray with a black edge, non-walking light gray, obstacles (i.e. also non-walking) dark red with a white edge. The origin is to the left (light red), the destination to the right (green). Of course both are walking areas as well. 22 Figure 21: Resulting intermediate destinations and routes, plus IDs to identify routes in the remainder. The four small columns to the right do not create route alternatives, only the two larger obstacles in the center / to the right do. First we will present the results of assignments iterations with only the routes 1, 2, and 4 respectively 4, 5, and 6. In these two cases no two routes do identical routing. The former case (1, 2, 4) includes routes with as few intermediate destinations as possible (i.e. much “freedom” for pedestrians or better said for the operational simulation model of pedestrian dynamics), the latter case includes routes with a maximum of intermediate destinations (i.e. as few freedom as possible). In each computation the inflow on the origin area is on average 12,000 pedestrians per hour. This is over the capacity of the shortest path, but well below the total capacity of all paths. The relevant time interval is t=300 .. 600 seconds after simulation start. In each iteration only one simulation run has been carried out. The travel times of all pedestrians who arrive in this interval are considered for the assignment in the next iteration. The iteration process was continued until the difference between the longest and the shortest average route travel time was 0.5 seconds or less or until the shifted route choice ratio was smaller than 0.0005. These are rather strict conditions for termination. Yet for this example we are interested in all effects that occur in the course of many iterations. The computation of the route choice ratios from the travel times was deliberately done rather simple. Between the pair with the longest and the shortest travel times (tM ax and tM in ) the following probability ∆p was shifted (obviously from the route with the longer to the route with the shorter travel time):  δ tM ax − tM in ∆p = α (1) tM ax + tM in where α is a general sensitivity factor which was chosen to be α = 0.1 in all computations and δ is a dynamic adaptation factor which usually was δ = 1, but was decreased when the routes with the longest and the shortest travel time were identical in subsequent iterations and which was increased when they exchanged roles in subsequent iterations. Figures 22 and 23 show the results for two different initial distributions when only routes 1, 2, and 4 are utilized. When nearly all pedestrians are assigned to route 1 (i.e. the original route without intermediate destinations) in the first iteration the process terminates after iteration 19 with a weighted average travel time of 61.4 seconds. Beginning with equal distribution results in a travel time of 62.2 seconds after 15 iterations. Figures 24 and 25 show the corresponding results when only routes 4, 5, and 6 are utilized. When nearly all pedestrians are assigned to route 6 in the first iteration the process terminates after iteration 23 with a weighted average travel time of 62.0 seconds. Beginning with equal distribution results in a travel time of 61.2 seconds after 8 iterations. Table 1 summarizes the results of the cases when only three routes are utilized. It can be seen that under different conditions the results of the assignment process agree closely. This is a good sign for the quality of the algorithm that computes the intermediate destination areas: obviously it does not make a difference if pedestrians are sent via route 1 or 6 and respectively route 2 or 5. Figure 26 shows a comparison of the 1, 2, 4 and the 4, 5, 6 routes computations during the first iteration step when nearly all pedestrians are sent via route 1 respectively 6. 23 Figure 22: Weighted average travel time and weighted standard deviations of travel times – both in [s] – in the course of iterations when only routes 1, 2, and 4 are utilized. As a consequence of having set parameter d to a value of d = 2 m the two lines show the results when (blue line) in the first iteration 98% of pedestrians choose route 1 (and the other two routes are used by 1% each) and (red line) when the initial distribution is equal. 24 Figure 23: Travel times on each of the routes and route choice ratios vs. iteration number in the case when only routes 1, 2, and 4 are utilized. The case with 98% on route 1 in the first iteration is shown blue, equal distribution in the first iteration red. 25 Figure 24: Weighted average travel time and weighted standard deviations of travel times – both in [s] – in the course of iterations when only routes 4, 5, and 6 are utilized. The two lines show the results when (blue line) in the first iteration 98% of pedestrians choose route 1 (and the other two routes are used by 1% each) and (red line) when the initial distribution is equal. 26 Figure 25: Travel times on each of the routes and route choice ratios vs. iteration number when only routes 4, 5, and 6 are utilized. The case with 98% on route 1 in the first iteration is shown blue, equal distribution in the first iteration red. 27 To get an estimation what the remaining differences for mean travel times in table 1 imply we have done four more computations with different initialization values for the random number generator of the pedestrian simulation for the “4, 5, 6, equal” case. The minimum average travel time of the overall ten computations was 61.2 s, the maximum 65.6 s and the average 63.7 s with a standard deviation of 1.3 s. This shows that the results given in table 1 are not more disperse than for one and the same case with only different random numbers. initial distribution 98% route 1 equal dist. 98% Route 6 equal dist. Route 1 r.c.r. t.t. 0.480 61.5 0.482 62.2 Route 6 r.c.r. t.t. 0.480 62.0 0.480 61.2 Route 2 r.c.r. t.t. 0.399 61.4 0.402 62.1 Route 5 r.c.r. t.t. 0.411 62.0 0.394 61.2 Route 4 r.c.r. t.t. 0.121 61.1 0.117 62.4 Route 4 r.c.r. t.t. 0.109 62.4 0.126 61.3 Mean t.t. 61.4 62.2 Mean t.t. 62.0 61.2 Table 1: Summary of results when only three routes are utilized (1, 2, and 4 or 4, 5, and 6): the route choice ratios (r.c.r.) and travel times (t.t.) per route and in the last column the weighted average travel time. As route 6 corresponds to route 1 and route 5 corresponds to route 2 in the lower half of the table the sequence of columns does not follow the sequence of route IDs. If the iteration process is done utilizing all six routes, there is the additional difficulty that three routes (1, 3, and 6) and two routes (2 and 5) effectively contain identical navigation information as long as no phenomenons as shown in figures 26 occur. We have started the assignment process three times with different initial assignment: a) 95% on route 1 and 1% on each of the other routes; b) 34% resp. 33% on routes 1, 3, and 6 and 1% on each of the three remaining routes; c) equal distribution for all routes. Table 2 shows the results init. distr. R1 a) b) c) 63,2 61,4 63,3 a) b) c) 0,487 0,435 0,439 R2 R3 R4 R5 R6 Travel Times [s] 63,4 63,8 63,2 61,5 61,4 61,6 61,1 63,5 63,5 63,4 63,4 Route Choice Ratios 0,016 0 0,062 0,436 0 0,320 0 0,105 0,085 0,056 0,246 0 0,065 0,193 0,057 Mean 63,24 61,43 63,39 Final Iteration 160 152 175 Table 2: Results when all six routes are utilized. The table shows the average travel times per route and the route loads of the final iteration (the number which is shown in the lower right column). Reading table 2 carefully one sees that for initial conditions a) the maximum travel time difference is 0.6 and not 0.5 or smaller as required for termination of the process. This is not because there were no more changes to the route choice ratios. Instead the reason is that for initial conditions a) starting at about iteration 165 the assignment process entered a loop in which the termination condition was not fulfilled and thus the iteration process would continue forever. An effect of that phenomenon can be seen in figure 27. This is a problem of a) having strict termination conditions10 and b) the assignment method which we deliberately chose to be simple for this initial work on the topic. To fix this one could do more than one simulation run per iteration and calculate rout choice ratios based on the averages of these runs. Another fix would be to elaborate the assignment method by for example considering not only the last iteration step when calculating new route choice ratios but also the second last or even more to the extreme of considering all iterations. Here we do not elaborate the assignment method, but simply chose to take that iteration step as result for initial conditions which a) which was as close as possible to the termination conditions. 10 If the termination condition had been 1.0 seconds then termination had occurred after at most 21 iterations instead of something between 160 and infinity. 28 Figure 26: Still images from the first iteration step of the case with routes 1, 2, and 4 (upper figure) and 4, 5, and 6 (lower figure). Nearly all pedestrians are sent along route 1 or 6 respectively. As the demand clearly exceeds the capacity of these two routes a jam forms. In the former case at some point it is shorter (fewer meters) for pedestrians to pass the largest obstacle on the left side. I.e. although they are sent on route 1, they move on route 2, disturbing the assignment algorithm. In the latter case the second intermediate destination of route 6 which is located between the two larger obstacles prevents this from happening for a long time and when it happens pedestrians do not walk directly to the destination, but first have to approach the back side of the second intermediate destination area of route 6 also disturbing the assignment process. 29 Figure 27: Weighted average travel time and weighted standard deviations of travel times – both in [s] – in the course of iterations when all routes are utilized. For reasons of clarity the diagrams are cut and do not show all values. For initial conditions b) the maximum mean value of travel times was 175.2 s and the maximum standard deviation 35.4 s. 30 Interesting in table 2 is also that – while the sum of both is similar – the route choice ratios for routes 2 and 5 show large differences with respect to the initial conditions: for initial condition a) route 5 is used heavier, while for b) and c) route 2 is made more use of. This is different for routes 1, 3, and 6 for which the route choice ratios end up comparable if they are compared across all three initial conditions. Looking in figure 28 at the evolution of the route choice ratios in the course of iterations one can recognize another difference: while the sums of route choice ratios (1, 3, and 6 as well as 2 and 5) both quickly are very stable this is only the case for the individual routes 2 and 5 while the ratios for particularly the routes 3 and 6 keep changing for many iterations for at least two of the three initial conditions. That there is no unique solution for the route choice ratios of routes 2 and 5 when the iteration process terminates does not indicate a problem. It rather confirms that in fact and as intended the intermediate destinations which were introduced have no artificial impact on local walking behavior. If they had, they would most probably also have an impact on travel times and if that was the case the travel times for routes 2 and 5 would not be identical. Only if they are identical there is no unique solution for their choice ratios. Put in different words: The intermediate destination which is part of route 5, but not of route 2 does neither de- nor increase the travel time of pedestrians on route 5 compared to pedestrians on route 2. If it would do so route 5 would always be a better or always be a worse choice than route 2. Than route 5 over the iterations would by and by gain or lose choice ratio compared to route 2 and this in all three cases of initial conditions. That this is not the case is a good indication that the intermediate destination area which is part of route 5 but not of route 2 is shaped such that it does not introduce artifacts to the movement of pedestrians. Strictly speaking we have this indication only for this one single intermediate destination area, but one can be confident that this is as well the case for all other intermediate destination areas. Does this on the contrary imply that on routes 3 and 6 there is a delay due to locally different movement behavior introduced by the intermediate destinations? This cannot be the case, as route 6 for two of the initial conditions has a higher load than route 3, although it has an additional intermediate destination. The cause is rather the phenomenon shown in figure 26. Particularly the intermediate destination between the rectangle wall and the largest circular obstacle – which is part of routes 3 and 6, but not 1 – imposes reduced flexibility for all pedestrians who have to reach for it. This can increase the average travel time on routes 3 and 6 because of a few pedestrians who experience extended delay times instead of passing the largest obstacle to the left, effectively walking on route 2 or 5. Still, their travel time will be recorded as belonging to route 1. If a pedestrian at the very same spot had been assigned to walk route 3 or 6 instead of route 1, he or she had not turned around (proceeding effectively on route 2 or 5), but had waited long to walk the intended path. Thus in this high demand situation average travel times on routes 1, 3, and 6 are different. This is an indication that generally in a case with a number of routes with a commonality factor of 1 it might be more consequent to keep the route with most intermediate destinations and drop the others. 7 Summary and Conclusions We have introduced a method to generate the geometry of intermediate destinations and routes utilizing these in a two dimensional movement (walking) environment. Simulated pedestrians can follow the routes intermediate destination by intermediate destination from their origin to their destination. The shape of the intermediate destination is such that the pedestrians do not make turns when they reach an intermediate destination. This is because the intermediate destination is shaped along equi-distance lines of the next downstream (intermediate) destination. Thus someone following the animation of a simulation would not realize where intermediate destinations are located but just see pedestrians utilize many different instead of just the spatially shortest route. For one example the resulting route set was applied in an assignment computation: a travel-time based user equilibrium was found by iterative simulation. The result was similar for different initial conditions. The example showed that the method works as intended. Future work includes finding a method to eliminate the remaining routes with a commonality factor of 1 and the development of a more efficient assignment method specifically for pedestrian simulation. In the latter task one has to consider that here we do not start with a node-link network as it is the case in road traffic assignment methods where the available routes are typically computed with a classical shortest path search. Instead we already set out with a set of routes, but lack the node-link network. This is one of the reasons for another important fact to consider: the capacities on each route are unknown which in turn is 31 Figure 28: Route choice ratios in the course of iterations for the three initial conditions a, b, and c. 32 one of the reasons why no differentiable volume-delay functions are available. From this follows that there is no other way to get information on travel times than to carry out the full simulation which is expensive in terms of computation time. Thus it can be concluded that assignment methods are best suited which first adapt the route choice ratios of all routes in the network and only than carry proceed with another iteration step, i.e. simulation run. A Definitions Microscopic simulation is understood here as an algorithm in which the movement of individual entities is computed according to a given scheme. For our purpose this scheme is defined in some way such that the entities move locally similar as pedestrians move in reality (simulation of pedestrians). The interaction between entities is at least in parts computed individually (as opposed to interaction of an individual with a mean field). Simple polygon is understood in this contribution not only as the line segments defining the polygon, but also as the enclosed region. It is assumed that areas in which pedestrians walk as well as obstacles which exclude access can be defined with a principally unlimited number of simple polygons. The total walking area is the unification of all polygons defining walking areas subtracting the unification of all polygons defining obstacles. In other words: if one or more polygons defining walking space and one or more polygons defining an obstacle overlap the overlap area cannot be accessed by pedestrians. It is assumed that the space in which pedestrians move can be modeled two-dimensionally. This implies that it is neglected that in reality in a projection along the z-axis a pedestrian and an obstacle may overlap. Stairwells and multiple floors could be connected piecewise in this way, i.e. the third spatial dimension can be approximated for all planning needs with a number of distinct sets of two-dimensional planes. However, higher floors and stairwells are not considered further in this paper. The origin of a particular pedestrian i is the coordinate (xi (To,i )/yi (To,i )) at which he is set into the simulation at time t = To,i . This coordinate can be one of a set which is as well a simple polygon called origin area. Different pedestrians will be set into the simulation at different times and at coordinates within the origin area. Concerning the assignment computation aspect in this paper: the origin time To is an extrinsic parameter for all pedestrians, i.e. demand is inelastic. The destination is as well modeled as a simple polygon called destination area. The actual destination (xi (Td )/yi (Td )) of a particular pedestrian i is a coordinate within the destination area. A pedestrian is considered to have arrived at his destination when he is for the first time (time t = Td,i ) located on a coordinate which is element of the destination area. This implies that each part of the destination area11 is of equal value for a pedestrian. Which coordinate of the destination area the pedestrian is heading for is not a property of the destination area. An intermediate destination area is a simple polygon to which pedestrians are heading for before they are walking towards the destination area. Therefore intermediate destination areas have a very similar purpose as destination areas and they have the same effect on pedestrians except that pedestrians are not taken out of the simulation when they have arrived at a destination area. Instead they continue to walk to the next destination area or to their (final) destination area. A route is a sequence of simple polygons which begins with an origin area, then has an arbitrary number of intermediate destination areas and ends with a destination area. Contrary to trajectories routes are understood to be extrinsic parameters for the operational simulation model, i.e. routes are input data. To be distinguished from a route has to be a trajectory. A trajectory of a pedestrian is defined as a curve in space which is parametrized with time. In a microscopic simulation which progresses in constant, discrete time steps – as is the case here – a trajectory of pedestrian i is a set of coordinates (xi (t)/yi (t)) with To,i ≤ t ≤ Td,i . This implies that a route – or better the set of all routes – is input data for the simulation, while trajectories are output data. For completeness: a path is a trajectory stripped of its time aspect and relation to a specific pedestrian. Route decisions are objects which hold two or more routes and a probability for each route that it is chosen by a pedestrian. When a pedestrian is set into the simulation a route decision is carried out for 11 respectively each part of the edge of the destination area 33 him. This means that among a defined set of routes which usually is different for each origin area one is chosen probabilistically and assigned to the pedestrian. Like routes route decisions are input data for the operational level of the simulation. The route decision probabilities are numbers which are external input data. The values are not affected by anything which happens within a simulation run, they are in principle fixed over time. However, there can be different time intervals in which the route decision probabilities have different values. Concerning the assignment computation aspect in this paper: if there is more than one time interval for the route decision probabilities, i.e. if the route decision probabilities are not constant throughout the simulation, the assignment is a dynamic assignment. As it is a micro-simulation the time intervals in principle can be arbitrarily small which is an advantage if demand varies on short time scales. However, for usage with an iterated assignment method the time intervals need to be sufficiently long to produce a meaningful statistics (average) of travel times. If this is not given one cannot expect convergence of the assignment process. An OD matrix is the integrated representation of demand, routes, and route decisions. The lines of the matrix comprise of the origin areas, the columns of the destination areas. Each entry of the matrix contains the absolute demand volume that within a given time interval is meant to move from origin area to destination area. References [1] D. Helbing and P. Molnar, “Social force model for pedestrian dynamics”, Phys. Rev. E 51 (1995) 4282–4286, cond-mat/9805244. [2] D. Helbing, I. Farkas, and T. Vicsek, “Simulating dynamical features of escape panic”, Nature 407 no. 6803, (2000) 487–490, cond-mat/0009448. [3] W. Yu, R. Chen, L. Dong, and S. Dai, “Centrifugal force model for pedestrian dynamics”, Physical Review E 72 no. 2, (2005) 26112. [4] A. Johansson, D. Helbing, and P. Shukla, “Specification of the Social Force Pedestrian Model by Evolutionary Adjustment to Video Tracking Data”, Advances in Complex Systems 10 no. 4, (2007) 271–288, arXiv:0810.4587 [physics.soc-ph]. [5] M. Chraibi, A. Seyfried, and A. Schadschneider, “Generalized centrifugal-force model for pedestrian dynamics”, Physical Review E 82 no. 4, (2010) 046111, arXiv:1008.4297 [physics.soc-ph]. [6] P. Fiorini and Z. Shiller, “Motion planning in dynamic environments using velocity obstacles”, The International Journal of Robotics Research 17 no. 7, (1998) 760–772. [7] J. van den Berg, M. Lin, and D. Manocha, “Reciprocal velocity obstacles for real-time multi-agent navigation”, in Robotics and Automation, 2008. ICRA 2008. IEEE International Conference on, pp. 1928–1935, IEEE. 2008. [8] J. van den Berg, S. Guy, M. Lin, and D. Manocha, “Reciprocal n-body collision avoidance”, in Robotics Research, pp. 3–19. Springer, 2011. [9] C. Burstedde, K. Klauck, A. Schadschneider, and J. Zittartz, “Simulation of pedestrian dynamics using a two-dimensional cellular automaton”, Physica A: Statistical Mechanics and its Applications 295 no. 3-4, (2001) 507–525, arXiv:cond-mat/0102397. [10] A. Kirchner and A. Schadschneider, “Simulation of evacuation processes using a bionics-inspired cellular automaton model for pedestrian dynamics”, Physica A: Statistical Mechanics and its Applications 312 no. 1, (2002) 260–276, cond-mat/0203461. [11] H. Klüpfel, A Cellular Automaton Model for Crowd Movement and Egress Simulation. PhD thesis, Universität Duisburg-Essen, 2003. [12] K. Nishinari, A. Kirchner, A. Namazi, and A. Schadschneider, “Extended Floor Field CA Model for Evacuation Dynamics”, IEICE Trans. Inf. & Syst. E87-D (2004) 726–732, arXiv:cond-mat/0306262. 34 [13] T. Kretz and M. Schreckenberg, “F.A.S.T. – Floor field- and Agent-based Simulation Tool”, in Transport simulation: Beyond traditional approaches, E. Chung and A. Dumont, eds., ch. 8, pp. 125–135. CRC press, Lausanne, CH, 2009. arXiv:physics/0609097 [physics.comp-ph]. [14] T. Kretz, “Pedestrian Traffic: on the Quickest Path”, Journal of Statistical Mechanics: Theory and Experiment P03012 (2009) , arXiv:0901.0170 [physics.soc-ph]. [15] T. Kretz, “The use of dynamic distance potential fields for pedestrian flow around corners”, in First International Conference on Evacuation Modeling and Management. TU Delft, 2009. arXiv:0906.2667 [cs.MA]. [16] T. Kretz, “Applications of the Dynamic Distance Potential Field Method”, in Traffic and Granular Flow ’09, N.N., ed. 2010. arXiv:0911.3723 [cs.MA]. (accepted for publication). [17] T. Kretz, “The Dynamic Distance Potential Field in a Situation with Asymmetric Bottleneck Capacities”, in Bandini et. al. [75], pp. 480–488. ISBN:978-3-642-15978-7. [18] Y. Chen, M. Bell, and K. Bogenberger, “Reliable pretrip multipath planning and dynamic adaptation for a centralized road navigation system”, Intelligent Transportation Systems, IEEE Transactions on 8 no. 1, (2007) 14–20. [19] I. Abraham, D. Delling, A. Goldberg, and R. Werneck, “Alternative Routes in Road Networks”, in Proceedings of the 9th International Symposium on Experimental Algorithms (SEA’10), P. Festa, ed., pp. 23–34. 2010. [20] J. Dees, R. Geisberger, P. Sanders, and R. Bader, “Defining and Computing Alternative Routes in Road Networks”, tech. rep., Fakultät für Informatik, Karlsruher Institut fr Technologie, 2010. arXiv:1002.4330 [cs.DS]. [21] R. Bader, J. Dees, R. Geisberger, and P. Sanders, “Alternative route graphs in road networks”, in Theory and Practice of Algorithms in (Computer) Systems, pp. 21–32. Springer, 2011. [22] D. Luxen and D. Schieferdecker, “Candidate sets for alternative routes in road networks”, in Experimental Algorithms, pp. 260–270. Springer, 2012. [23] I. Abraham, D. Delling, A. Goldberg, and R. Werneck, “Alternative routes in road networks”, Journal of Experimental Algorithmics 18 no. 1, (2013) 1–3. [24] J. Wardrop, “Road Paper. Some theoretical aspects of road traffic research”, ICE Proceedings: Engineering Divisions 1 (1952) . [25] M. Beckmann, C. McGuire, and C. Winsten, “Studies in the Economics of Transportation”, tech. rep., Yale University Press, 1956. [26] L. LeBlanc, E. Morlok, and W. Pierskalla, “An efficient approach to solving the road network equilibrium traffic assignment problem”, Transportation Research 9 no. 5, (1975) 309–318. [27] H. Bar-Gera, “Origin-based algorithm for the traffic assignment problem”, Transportation Science 36 no. 4, (2002) 398–417. [28] G. Gentile and K. Noekel, “Linear User Cost Equilibrium: the new algorithm for traffic assignment in VISUM”, in Proceedings of European Transport Conference 2009. 2009. [29] S. Hoogendoorn and P. Bovy, “Pedestrian route-choice and activity scheduling theory and models”, Transportation Research Part B: Methodological 38 no. 2, (2004) 169–190. [30] S. Hoogendoorn and P. Bovy, “Dynamic user-optimal assignment in continuous time and space”, Transportation Research Part B: Methodological 38 no. 7, (2004) 571–592. [31] J. van den Heuvel, A. Voskamp, W. Daamen, and S. Hoogendoorn, “Using Bluetooth to estimate the impact of congestion on pedestrian route choice in train stations”, in Traffic and Granular Flow 2013, M. Boltes, M. Chraibi, A. Schadschneider, and A. Seyfried, eds., p. to be published. 2014. 35 [32] Department of Economic and Social Affairs (DESA), “World Urbanization Prospects The 2011 Revision”, tech. rep., United Nations, New York, 2012. http://esa.un.org/unup/. [33] L. LeBlanc and M. Abdulaal, “A comparison of user-optimum versus system optimum traffic assignment in transportation network design”, Transportation Research Part B: Methodological 18B no. 2, (1984) 115–121. [34] D. Braess, “Über ein Paradoxon aus der Verkehrsplanung”, Unternehmensforschung 12 no. 1, (1968) 258–268. [35] T. Kretz, “Counterflow in Evacuations”, in Traffic and Granular Flow 2011, V. Kozlov, A. Buslaev, A. Bugaev, M. Yashina, A. Schadschneider, and M. Schreckenberg, eds., p. in press. 2011. arXiv:1110.1494 [physics.soc-ph]. [36] F. Gräßle and T. Kretz, “An Example of Complex Pedestrian Route Choice”, in Pedestrian and Evacuation Dynamics, R. Peacock, E. Kuligowski, and J. Averill, eds., pp. 767–771. Springer US, New York Dordrecht Heidelberg London, 2011. arXiv:1001.4047 [physics.soc-ph]. [37] H. Klüpfel, T. Meyer-König, J. Wahle, and M. Schreckenberg, “Microscopic simulation of evacuation processes on passenger ships”, in Theory and Practical Issues on Cellular Automata – Proc. Fourth Int. Conf. on Cellular Automata for Research and Industry, S. Bandini and T. Worsch, eds., pp. 63–71. 2001. [38] A. Seyfried, B. Steffen, and T. Lippert, “Basics of modelling the pedestrian flow”, Physica A: Statistical Mechanics and its Applications 368 no. 1, (2006) 232–238, arXiv:physics/0506189. [39] A. Schadschneider, H. Klüpfel, T. Kretz, C. Rogsch, and A. Seyfried, “Fundamentals of Pedestrian and Evacuation Dynamics”, in Multi-Agent Systems for Traffic and Transportation Engineering, A. Bazzan and F. Klügl, eds., ch. VI, pp. 124–154. Information Science Reference, Hershey, PA, USA, 2009. ISBN:978-1-60566-226-8. [40] A. Johansson and T. Kretz, “Applied Pedestrian Modeling”, in Agent-Based Models of Geographical Systems, A. Heppenstall, A. Crooks, L. See, and M. Batty, eds., pp. 451–462. Springer-Verlag, 2012. [41] R. Hughes, “A continuum theory for the flow of pedestrians”, Transportation Research Part B: Methodological 36 no. 6, (2002) 507–535. [42] L. Huang, S. Wong, M. Zhang, C. Shu, and W. Lam, “Revisiting Hughes dynamic continuum model for pedestrian flow and the development of an efficient solution algorithm”, Transportation Research Part B: Methodological 43 no. 1, (2009) 127–141. [43] A. Kemloh Wagoum, A. Seyfried, and S. Holl, “Modeling The Dynamic Route Choice Of Pedestrians To Assess The Criticality Of Building Evacuation”, Advances in Complex Systems 15 no. 07, (2012) , arXiv:1103.4080 [cs.OH]. [44] M. de Berg, M. van Kreveld, M. Overmars, and O. Schwarzkopf, Computational Geometry. Springer, Berlin Heidelberg New York, 1997. [45] A. Kneidl, A. Borrmann, and D. Hartmann, “Generation and use of sparse navigation graphs for microscopic pedestrian simulation models”, Advanced Engineering Informatics (2012) 669–680. [46] M. Blümel, “Optimierung des taktischen Verhaltens in der Simulation von Fußgängern”, Master’s thesis, Karlsruhe Institute of Technology, Chair for Intelligent Sensor-Actuator-Systems, 2008. [47] M. Höcker, V. Berkhahn, A. Kneidl, A. Borrmann, and W. Klein, “Graph-based approaches for simulating pedestrian dynamics in building models”, in 8th European Conference on Product & Process Modelling (ECPPM), University College Cork, Cork, Ireland, vol. 2. 2010. [48] A. Treuille, S. Cooper, and Z. Popović, “Continuum crowds”, in ACM Transactions on Graphics (TOG), vol. 25, pp. 1160–1168, ACM. 2006. 36 [49] S. Guy, J. Chhugani, S. Curtis, M. Dubey, P.and Lin, and D. Manocha, “Pledestrians: a least-effort approach to crowd simulation”, in Proceedings of the 2010 ACM SIGGRAPH/Eurographics Symposium on Computer Animation, pp. 119–128, Eurographics Association. 2010. [50] T. Kretz, A. Große, S. Hengst, L. Kautzsch, A. Pohlmann, and P. Vortisch, “Quickest Paths in Simulations of Pedestrians”, Advances in Complex Systems 14 (2011) 733, arXiv:1107.2004 [physics.soc-ph]. [51] T. Kretz, “The Effect of Integrating Travel Time”, in Pedestrian and Evacuation Dynamics 2012, U. Weidmann, U. Kirsch, and M. Schreckenberg, eds. 2014. arXiv:1204.5100 [physics.soc-ph]. (in press). [52] W. van Toll, A. Cook IV, and R. Geraerts, “Realistic Crowd Simulation with Density-Based Path Planning”, in ICT.OPEN, pp. 3–9. 2012. [53] A. Abdelghany, K. Abdelghany, H. Mahmassani, and A. Al-Zahrani, “Dynamic Simulation Assignment Model for Pedestrian Movements in Crowded Networks”, Transportation Research Record: Journal of the Transportation Research Board 2316 no. 1, (2012) 95–105. [54] Z. Gao, Y. Qu, J. Long, H.-J. Huang, and X. Li, “Simulating Dynamic Escape Process in Large-scale Public Places”, in preparation (in preparation) . [55] O. Khatib, “The Potential Field Approach and Operational Space Formulation in Robot Control”, in Adaptive and Learning Systems – Theory and Application, K. Narendra, ed., pp. 367–377. Plenum Press, New York and London, 1986. [56] I. Karamouzas, R. Geraerts, and M. Overmars, “Indicative routes for path planning and crowd simulation”, in Proceedings of the 4th International Conference on Foundations of Digital Games, pp. 113–120, ACM. 2009. [57] J. Pettré, J.-P. Laumond, and D. Thalmann, “A navigation graph for real-time crowd animation on multilayered and uneven terrain”, in First International Workshop on Crowd Simulation, p. 194. 2005. [58] E. Dijkstra, “A Note on Two Problems in Connexion with Graphs”, Numerische Mathematik 1 (1959) 269–271. [59] J.-C. Latombe, Robot Motion Planning. Kluwer Academic Publishers, 7th ed., 1991. [60] L. Marcolino and L. Chaimowicz, “No robot left behind: Coordination to overcome local minima in swarm navigation”, in Robotics and Automation, 2008. ICRA 2008. IEEE International Conference on, pp. 1904–1909, IEEE. 2008. [61] G. Köster, F. Treml, and M. Gödel, “Avoiding numerical pitfalls in social force models”, Physical Review E 87 no. 6, (2013) 063305. [62] T. Kretz and M. Schreckenberg, “The F.A.S.T.-Model”, in Cellular Automata - 7th International Conference on Cellular Automata for Research and Industry, ACRI 2006, S. El Yacoubi, B. Chopard, and S. Bandini, eds., pp. 712–715. Springer-Verlag Berlin Heidelberg, Perpignan, France, September, 2006. arXiv:0804.1893 [cs.MA]. ISBN:3-540-40929-7. [63] D. Yanagisawa and K. Nishinari, “Mean-field theory for pedestrian outflow through an exit”, Physical review E 76 no. 6, (2007) 061117, arXiv:0708.3476 [cond-mat]. [64] E. Kirik, T. Yurgel’yan, and D. Krouglov, “An intelligent floor field cellular automation model for pedestrian dynamics”, in Proceedings of the 2007 summer computer simulation conference, p. 21, Society for Computer Simulation International. 2007. [65] E. Dudek-Dyduch, J. Was, and B. Gudowski, “The application of the idea of extended cellular automata for some pedestrian behaviors”, Advances in Artificial Life (2007) 996–1005. 37 [66] S. Ali and M. Shah, “Floor fields for tracking in high density crowd scenes”, Computer Vision–ECCV 2008 (2008) 1–14. [67] F. Dietrich and G. Köster, “How navigation according to a distance function improves pedestrian motion in ODE-based models”, in Traffic and Granular Flow 2013, M. Boltes, M. Chraibi, A. Schadschneider, and A. Seyfried, eds., p. to be published. 2014. [68] T. Kretz, C. Bönisch, and P. Vortisch, “Comparison of Various Methods for the Calculation of the Distance Potential Field”, in Pedestrian and Evacuation Dynamics 2008, W. Klingsch, C. Rogsch, A. Schadschneider, and M. Schreckenberg, eds., pp. 335–346. Springer-Verlag, Berlin Heidelberg, 2010. arXiv:0804.3868 [physics.comp-ph]. ISBN: 978-3-642-04503-5. [69] R. Kimmel and J. Sethian, “Computing geodesic paths on manifolds”, in Proc. Natl. Acad. Sci. USA, pp. 8431–8435. 1998. [70] H. Zhao, “A fast sweeping method for eikonal equations”, Mathematics of computation 74 no. 250, (2005) 603–628. [71] W.-K. Jeong and R. Whitaker, “A fast eikonal equation solver for parallel systems”, in SIAM conference on Computational Science and Engineering. February, 2007. [72] M. Schultz, T. Kretz, and H. Fricke, “Solving the Direction Field for Discrete Agent Motion”, in Cellular Automata - 9th International Conference on Cellular Automata for Research and Industry, ACRI 2010, S. Bandini, S. Manzoni, H. Umeo, and G. Vizzari, eds. Springer Berlin / Heidelberg, 2010. arXiv:1008.3990 [physics.soc-ph]. [73] E. Cascetta, A. Nuzzolo, F. Russo, and A. Vitetta, “A modified logit route choice model overcoming path overlapping problems: Specification and some calibration results for interurban networks”, in Proceedings of the 13th International Symposium on Transportation and Traffic Theory, pp. 697–711, Lyon, France. 1996. [74] R. Meyers, ed., Encyclopedia of Complexity and Systems Science. SpringerScience+BuisinessMedia, New York, 2009. ISBN:978-0-387-75888-6. [75] S. Bandini, S. Manzoni, H. Umeo, and G. Vizzari, eds., Cellular Automata – 9th International Conference on Cellular Automata for Research and Industry, ACRI 2010, vol. 6350 of Lecture Notes in Computer Science. Springer, Heidelberg, 2010. ISBN:978-3-642-15978-7. 38
5cs.CE
GROUP C∗ -ALGEBRAS AS DECREASING INTERSECTION OF NUCLEAR C∗ -ALGEBRAS arXiv:1410.8347v3 [math.OA] 11 Jan 2016 YUHEI SUZUKI Abstract. We prove that for every exact discrete group Γ, there is an intermediate C∗ -algebra between the reduced group C∗ -algebra and the intersection of the group von Neumann algebra and the uniform Roe algebra which is realized as the intersection of a decreasing sequence of isomorphs of the Cuntz algebra O2 . In particular, when Γ has the AP (approximation property), the reduced group C∗ algebra is realized in this way. We also study extensions of the reduced free group C∗ -algebras and show that any exact absorbing or unital absorbing extension of it by any stable separable nuclear C∗ -algebra is realized in this way. 1. Introduction It is well-known that every exact discrete group admits an amenable action on a compact space [17], and each such action gives rise to an ambient nuclear C∗ algebra of the reduced group C∗ -algebra via the crossed product construction [1]. More generally, it is known that every separable exact C∗ -algebra is embeddable into the Cuntz algebra O2 [11]. Motivated by these phenomena, we are interested in the following question. How small can we take an ambient nuclear C∗ -algebra/ Cuntz algebra O2 for a given exact C∗ -algebra? In the present paper, we give an answer to the question for the reduced group C∗ -algebras of discrete groups with the AP. The next theorem states that an ambient nuclear C∗ -algebra of the reduced group C∗ -algebras with the AP can be arbitrarily small in a certain sense. Theorem A. Let Γ be a countable discrete exact group. Then there is an intermediate C∗ -algebra A between the reduced group C∗ -algebra C∗r (Γ) and the intersection of the group von Neumann algebra L(Γ) and the uniform Roe algebra C∗u (Γ) satisfying the following properties. • There is a decreasing sequence of isomorphs of the Cuntz algebra O2 whose intersection is isomorphic to A. ∗ • There is a decreasing sequence (An )∞ n=1 of separable nuclear C -algebras whose intersection is isomorphic to A and the sequence admits compatible multiplicative conditional expectations (En : A1 → An )∞ n=1 . Here the compatibility means that the equality En ◦ Em = En holds for all n ≥ m. In particular, when the group Γ has the AP, the statements hold for the reduced group C∗ -algebra C∗r (Γ). As a consequence of Theorem A, we obtain the following result. 2000 Mathematics Subject Classification. Primary 20F67, Secondary 46L05. Key words and phrases. Reduced group C∗ -algebras; amenable actions; approximation property. 1 2 YUHEI SUZUKI Corollary B. The decreasing intersection of nuclear C∗ -algebras need not have the following properties. (1) The OAP, hence nuclearity, the CBAP, the WEP, and the SOAP. (2) The local lifting property. They can happen simultaneously. The statements are true even when the decreasing sequence admits a compatible family of multiplicative conditional expectations. For the implication stated in (1), recall that for exact C∗ -algebras, nuclearity is equivalent to the WEP [3, Exercise 2.3.14]. Thus the decreasing intersection of nuclear C∗ -algebras can lost most of good properties. Since the decreasing intersection of injective von Neumann algebras is injective, the analogous results for von Neumann algebras can never be true. We also give a geometric construction of a decreasing sequence of Kirchberg algebras whose intersection is isomorphic to the hyperbolic group C∗ -algebra. Although the result follows from Theorem A, this approach has good points. Our decreasing sequence is taken inside the boundary algebra C(∂Γ) ⋊ Γ. Moreover, the proof does not depend on Kirchberg–Phillips’s O2 -absorption theorem and the theory of reduced free products, both of which are used in the proof of Theorem A. Using the sequence constructed by this method, we also study absorbing extensions of the reduced free group C∗ -algebra by a stable separable nuclear C∗ -algebras, and prove the following theorem. Theorem C. Let A be a stable separable nuclear C∗ -algebra and let 0 → A → B → C∗r (Fd ) → 0 be an extension of C∗r (Fd ) by A (2 ≤ d ≤ ∞). Assume B is exact and the extension is either absorbing or unital absorbing. Then B is realized as a decreasing intersection of isomorphs of the Cuntz algebra O2 . In particular, any exact extension of C∗r (Fd ) by K is realized in this way. The proof of Theorem C is based on the KK-theory. Organization of the paper. In Section 2, we review some notions and facts used in the paper. In Section 3, we prove Theorem A. We also give few more examples satisfying the conditions in Theorem A. In Section 4, we deal with the hyperbolic groups. Based on the study of the boundary action, we construct a decreasing sequence of nuclear C∗ -algebras inside the boundary algebra C(∂Γ) ⋊ Γ whose intersection is the reduced group C∗ -algebra C∗r (Γ). In Section 5, using the decreasing sequence constructed in Section 4, we prove Theorem C. In Section 6, we study some amenable dynamical systems of the free groups constructed in Section 4. Notation. The symbol ‘⊗’ stands for the minimal tensor product. The symbol ‘⋊’ stands for the reduced crossed product of C∗ -algebras. For a discrete group Γ and g ∈ Γ, denote by λg the unitary element of the reduced group C∗ -algebra C∗r (Γ) corresponding to g. For a unital Γ-C∗ -algebra A and g ∈ Γ, denote by ug the canonical implementing unitary element of g in the reduced crossed product A ⋊ Γ. With the same setting, for x ∈ A ⋊ Γ and g ∈ Γ, the gth coefficient E(xu∗g ) of x is denoted by Eg (x). Here E : A ⋊ Γ → A denotes the canonical conditional AMBIENT NUCLEAR C∗ -ALGEBRAS 3 expectation of the reduced crossed product. We denote by K and B the C∗ -algebras of all compact operators and all bounded operators on ℓ2 (N) respectively. For a set X, denote by ∆X the diagonal set {(x, x) : x ∈ X} of X × X. For a subset Y of a topological space X, denote by int(Y ) and cl(Y ) the interior and the closure of Y in X respectively. 2. Preliminaries 2.1. Amenability of group actions on compact spaces and C∗ -algebras. Recall that an action Γ y X of a group Γ on a compact Hausdorff space is said to be amenable if there is a net (ζi : X → Prob(Γ))i∈I of continuous maps satisfying   lim sup kg.ζi (x) − ζi (g.x)k1 = 0 for all g ∈ Γ. i∈I x∈X Here Prob(Γ) is the space of probability measures on Γ equipped with the pointwise convergence topology. More generally, an action of Γ on a unital C∗ -algebra A is said to be amenable if the induced action of Γ on the spectrum of the center Z(A) of A is amenable. Here we only review a few properties of amenability of group actions. We refer the reader to [3, Section 4.3] for the details. Proposition 2.1. Let Γ y A be an amenable action of a group Γ on a unital C∗ -algebra A. Then the following hold. • The full and the reduced crossed products coincide. • The (reduced) crossed product A ⋊ Γ is nuclear if and only if A is nuclear. 2.2. Approximation properties for C∗ -algebras and groups. For C∗ -algebras A, B and a closed subspace X of B, we define a subspace F (A, B, X) ⊂ A ⊗ B by F (A, B, X) := {x ∈ A ⊗ B : (ϕ ⊗ idB )(x) ∈ X for all ϕ ∈ A∗ }. A triplet (A, B, X) is said to have the slice map property if the equality F (A, B, X) = A ⊗ X holds. Here A ⊗ X denotes the closed subspace of A ⊗ B spanned by elements of the form a ⊗ x; a ∈ A, x ∈ X. We give a definition of the SOAP (strong operator approximation property) and the OAP (operator approximation property) in terms of the slice map property. See [3, Section 12.4] for the detail. Definition 2.2. A C∗ -algebra A is said to have the SOAP (resp. the OAP) if for any C∗ -algebra B (resp. for B = K) and for any closed subspace X of B, the triplet (A, B, X) has the slice map property. Obviously, we have the implications Nuclearity ⇒ CBAP ⇒ SOAP⇒ OAP, Exactness. All implications are known to be proper. However, for the reduced group C∗ algebras, the SOAP and the OAP are equivalent. The SOAP and the OAP have the strong connection with the property of groups called the AP (approximation property). Here we give the following equivalent condition as a definition of the AP. Definition 2.3. A discrete group Γ is said to have the AP if there exists a net (ϕi )i∈I of finitely supported complex valued functions on Γ such that mϕi ⊗ idB 4 YUHEI SUZUKI converges to the identity map in the pointwise norm topology. Here, for a finitely supported function ϕ on Γ, denote by mϕ : C∗r (Γ) → C∗r (Γ) the completely bounded map defined by the formula mϕ (λg ) := ϕ(g)λg for g ∈ Γ. This property is characterized in the following way. Proposition 2.4. Let Γ be a discrete group. Then the following are equivalent. (1) The group Γ has the AP. (2) The C∗ -algebra C∗r (Γ) has the SOAP. (3) The C∗ -algebra C∗r (Γ) has the OAP. (4) There is an intermediate C∗ -algebra between C∗r (Γ) and L(Γ) which has the SOAP or the OAP. See [3, Section 12.4] for the proof. Note that the implication (4)⇒(1) follows from the proof of (2), (3)⇒ (1). Next recall that the group von Neumann algebra of a group Γ is the von Neumann algebra L(Γ) generated by the image of the left regular representation of Γ. We also recall that the uniform Roe algebra of Γ is the C∗ -algebra C∗u (Γ) on ℓ2 (Γ) generated by ℓ∞ (Γ) and the reduced group C∗ -algebra of Γ. Note that both algebras contain the reduced group C∗ -algebra by definition. A group Γ is said to have the ITAP (invariant translation approximation property [23]) if we have the equality L(Γ) ∩ C∗u (Γ) = C∗r (Γ). Here the above equality makes sense by regarding all algebras as C∗ -algebras on ℓ2 (Γ) in the canonical way. We remark that under the canonical isomorphism C∗u (Γ) ∼ = ∞ ∗ ℓ (Γ) ⋊ Γ (cf. Proposition 5.1.3 in [3]), the intersection L(Γ) ∩ Cu (Γ) is identified with the C∗ -subalgebra of ℓ∞ (Γ) ⋊ Γ consisting of elements whose coefficients sit in C. It is shown by Zacharias [30] that every group with the AP has the ITAP. See also Proposition 3.4. We do not know either the ITAP holds or not for groups without the AP. 2.3. Reduced free product. We refer the reader to [3, Section 4.7] for the definition of the reduced free product. First we recall a few terminology related to theorems we will use. Let A be a C∗ -algebra and ϕ be a state on A. Recall that ϕ is said to be non-degenerate if its GNS-representation is faithful. Recall that the centralizer of ϕ is the set of all elements a ∈ A satisfying the equality ϕ(ab) = ϕ(ba) for all b ∈ A. An abelian C∗ -subalgebra D of A is said to be diffuse with respect to ϕ if ϕ|D is a diffuse measure on the spectrum of D. In the proofs of Theorems A and C, we use the reduced free product to make ∗ C -algebras simple. The following two theorems are important in our proof. The first theorem guarantees the nuclearity of the reduced free product under certain conditions. The second one gives a sufficient condition for the simplicity of the reduced free product. Theorem 2.5 (Dykema–Smith [3, Exercise 4.8.2]). Let (A, ϕ) be a pair of a unital nuclear C∗ -algebra and a non-degenerate state on A. Let ψ be a pure state on the matrix algebra Mn (n ≥ 2). Then the reduced free product (A, ϕ)∗(Mn, ψ) is nuclear. AMBIENT NUCLEAR C∗ -ALGEBRAS 5 Theorem 2.6 (Dykema [5, Theorem 2]). Let (A, ϕ) and (B, ψ) be pairs of a unital C∗ -algebra and a non-degenerate state on it. Assume that B 6= C and the centralizer of ϕ contains a diffuse abelian C∗ -subalgebra D containing the unit of A. Then the reduced free product (A, ϕ) ∗ (B, ψ) is simple. A good aspect of these theorems is that we only need to force a condition on one of the states. Thus we can apply these theorems at the same time in many situations. 2.4. Extensions of C∗ -algebras. Here we recall basic facts and terminologies related to the extensions of C∗ -algebras. We refer the reader to [2, Sections 15, 17] for the details. Let A be a unital separable C∗ -algebra, B be a separable stable (i.e., B∼ = B ⊗ K) nuclear C∗ -algebra. Let 0→B→C→A→0 be an essential extension of A by B. Here essential means that the ideal B of C is essential (i.e., cB = 0 implies c = 0 for c ∈ C). Let σ : A → Q(B) := M(B)/B be the Busby invariant of the above extension. Here M(B) denotes the multiplier algebra of B. As usual, we identify an extension with its Busby invariant. To define the addition of two extensions, we fix an isomorphism B ∼ = B ⊗ K. (Note that up to canonical identifications, the choice of the isomorphism does not affect to the following definitions.) Then any isomorphism K∼ = M2 (Q(B)). Using this isomorphism, = M2 (K) induces the isomorphism Q(B) ∼ we can identify the direct sum of two Busby invariants with a Busby invariant. This is independent on the choice of the isomorphism K ∼ = M2 (K) up to strong equivalence (defined below). An extension σ is said to be trivial (resp. strongly unital trivial) if it has a ∗homomorphism (resp. unital ∗-homomorphism) lifting σ̃ : A → M(B). Two extensions σ1 and σ2 are said to be strongly equivalent if there is a unitary element u in M(B) satisfying ad(π(u)) ◦ σ1 = σ2 . An extension σ is said to be absorbing (resp. unital absorbing) if for any trivial extension (resp. strongly unital trivial extension) τ , σ ⊕τ is strongly equivalent to σ. On the class of extensions of A by B, we define an equivalence relation as follows. Two extensions σ1 and σ2 are equivalent if there are trivial extensions τ1 and τ2 such that the direct sums σi ⊕ τi are strongly equivalent. The quotient Ext(A, B) of the class of all extensions by this equivalence relation naturally becomes an abelian semigroup. Kasparov showed that there exists a unital absorbing strongly unital trivial extension τ of A by B [9, Theorem 6]. Therefore any [σ] ∈ Ext(A, B) has a unital absorbing representative. Moreover, if [σ] contains a unital extension, then [σ] has a unital absorbing unital representative. Note that an element [σ] ∈ Ext(A, B) contains a unital extension if and only if [σ(1)]0 = 0 in K0 (Q(B)). A theorem of Kasparov [9, Theorem 2] shows that for a unital absorbing extension σ, the direct sum σ ⊕ 0 is an absorbing extension. Thus, by the same reason as above, any element of Ext(A, B) has an absorbing representative. By definition, such a representative is unique up to strongly equivalence. 6 YUHEI SUZUKI It follows from [9, Theorem 6] that for any unital C∗ -subalgebra C ⊂ A, the restriction of the absorbing (resp. unital absorbing) extension to C again has the same property. Let Ext(A, B)−1 be the subsemigroup of Ext(A, B) consisting of invertible elements. Then there is a natural group isomorphism between Ext(A, B)−1 and KK 1 (A, B) [2, Corollary 18.5.4]. Note that thanks to Kasparov’s Stinespring type theorem [9], an extension σ : A → Q(B) is invertible in Ext(A, B) if and only if it has a completely positive lifting σ̃ : A → M(B). See Section 15.7 in [2] for details. 3. Proof of Theorem A Let Γ be a countable exact group.Q Take an amenable action Γ y X on a compact ∞ metrizable space. Define A := C( n k=n X) ⋊ Γ for each n ∈ N. Here the action Q∞ Γ y k=n X is given by the diagonal action. Q We regard An+1 as a C∗ -subalgebra ∞ of An in the canonical way. Since the Γ-space T k=n X is metrizable and amenable, each An is separable and nuclear. Put A := ∞ n=1 An . We will show that A is isomorphic to an intermediate C∗ -algebra between C∗r (Γ) and Q C∗u (Γ) ∩ L(Γ). To Q∞ ∞ ∞ see this, take an arbitrary point x k=1 X and define ρ : C( k=1 X) → ℓ (Γ) Q∈ ∞ by ρ(f )(s) := f (s.x) for f ∈ C( k=1 X) and s ∈ Γ. Then ρ is a Γ-equivariant ∞ ∗-homomorphism. Q∞ it induces a ∗-homomorphism ρ̃ : A1 → ℓ (Γ) ⋊ Γ. Note T∞ Hence that theQ equality that T∞ Eg (a) Q∞∈ n=1 C( k=n X) for all a ∈ A and g ∈ Γ. We claim T ∞ ∞ n=1 C( k=n X) = C holds. Indeed, any function contained in n=1 C( k=n X) is independent on each coordinates. Such a continuous function must be constant. This proves the claim. From this, it follows that ρ̃ is injective on A and that the image ρ̃(A) is contained in C∗u (Γ) ∩ L(Γ). Thus A is isomorphic to the desired C∗ -algebra. Next we show that there is a compatible family of multiplicative conditional expectations (En : A1 → An )∞ n=1 . Define En : A1 → An to be the ∗-homomorphism induced from the Γ-equivariant ∗-homomorphism En : C( ∞ Y X) → C( k=1 defined by ∞ Y X) k=n En (f )(xn , xn+1 , xn+2 , . . .) := f (xn , . . . , xn , xn+1 , xn+2 , . . .), where, in the right hand side, xn is iterated n times. Then it is not difficult to check that they satisfy the desired conditions. To make terms isomorphic to the Cuntz algebra O2 , we first make terms simple. To do this, take a faithful state ν on A1 . Take a compact metric Y consistNspace ∞ ing at least two points and a faithfulNmeasure µ on Y . On ( k=1 C(Y )) ⊗ A1 , define a faithfulNstate ϕ by ϕ := ( ∞ Then define a faithful state k=1 µ) ⊗ ν. ∞ ϕn on Bn := ( k=n C(Y )) ⊗ An to be the restriction of ϕ. Now take a pure state ψ on M2 and put Cn := (Bn , ϕn ) ∗ ( ∞ k=n (M2 , ψ)). Then by Theorem 2.6, each Cn is simple. Moreover, since Cn is the increasing union of finite free prod∞ ucts ((Bn , ϕn ) ∗ ( m k=n (M2 , ψ)))m=n , each Cn is nuclear by Theorem 2.5. For each ∗ ∗ AMBIENT NUCLEAR C∗ -ALGEBRAS 7 n ∈ N, by Theorem 4.8.5 in [3], we have a conditional expectation from C1 onto (B1 , ϕ) ∗ ( nk=1 (M2 , ψ)) which maps Cn+1 onto Bn+1 . This proves the equalities ∗ ∞ \ Cn = n=1 ∞ \ Bn = n=1 ∞ \ An = A. n=1 Finally, to make terms isomorphic to O2 , we apply Kirchberg–Phillips’s O2 absorption theorem [11]. We define a new sequence (Dn )∞ n=1 by Dn := Cn ⊗ N∞ ( k=n O2 ) . Then each D to O2 .  Take a state ξ on O2 . For each Nn is isomorphic N∞ n ∈ N, set En := idC1 ⊗ ( nk=1 idO2 ) ⊗ k=n+1 ξ . Then En maps Dm onto Cm for ∞ m > n and the sequence (En )n=1 converges to the identity in the pointwise norm topology. Therefore we have ∞ ∞ \ \ Dn = Cn = A. n=1 n=1  Remark Q 3.1. There is an isomorphism between the decreasing intersection A = T ∞ ∗ (C( n∈N k=n X) ⋊ Γ) and the C -algebra B = {b ∈ C(X) ⋊ Γ : Eg (b) ∈ C for all g ∈ Γ} that preserves the reduced group C∗ -algebra. To see this, consider the quotient Q map Q∞ π : C( k=1 X)⋊Γ → C(X)⋊Γ induced from the diagonal embedding X → ∞ k=1 X. Note that π is compatible with the coefficient maps and preserves the reduced group C∗ -algebra. Since all elements of A take the coefficients in C, we have the injectivity of π on A. To see theQequality π(A) = B, for each n ∈ N, consider the embedding Q∞ ρn : C(X) ⋊ Γ → C( ∞ k=n X) ⋊ Γ induced from the quotient map from k=1 X onto the nth product component. Then, by comparing the coefficients, we have T ρ (B) ⊂ A. By comparing ρn |B = ρm |B for all n, m ∈ N. Hence ρ1 (B) = ∞ n=1 n the coefficients, we further have B = π(ρ1 (B)) ⊂ π(A). The converse inclusion is obvious by the definition of B. Therefore, the question either the equation ! ∞ Y \ X) ⋊ Γ = C∗r (Γ) C( n∈N k=n holds or not seems difficult when the group Γ does not have the AP. Indeed, if the equation holds for every compact metrizable Γ-space X (when Γ is exact, we only need to consider the amenable one), then Γ has the ITAP. However, we do not know either a given group has the ITAP or not for groups without the AP. Now we can prove Corollary B. Proof of Corollary B. We apply Theorem A to Γ := SL(3, Z). (See [3, Section 5.4] for the exactness of Γ.) This gives an intermediate C∗ -algebra A between C∗r (Γ) and L(Γ) ∩ C∗u (Γ) satisfying the conditions in Theorem A. We show that A does not have the OAP and the local lifting property. Since Γ does not have the AP [13], Proposition 2.4 yields that A does not have the OAP. 8 YUHEI SUZUKI Next take a subgroup Λ of Γ isomorphic to SL(2, Z). Denote by p the orthogonal projection from ℓ2 (Γ) onto the subspace ℓ2 (Λ). Then the compression by p gives a conditional expectation EΛΓ : C∗u (Γ) → C∗u (Λ). It is clear from the definition that EΛΓ maps L(Γ) ∩ C∗u (Γ) onto L(Λ) ∩ C∗u (Λ). Since Λ has the AP [3, Corollary 12.3.5], we obtain the conditional expectation Φ : A → C∗r (Λ). Since C∗r (Λ) does not have the local lifting property [3, Corollary 3.7.12], neither does A.  Other examples. We end this section by giving few more examples satisfying the conditions in Theorem A. Proposition 3.2. Let A be a unital separable nuclear C∗ -algebra, Γ be a group with the AP. Then for any action of Γ on A, the reduced crossed product A ⋊ Γ satisfies the conditions mentioned in Theorem A. Let A be a unital C∗ -algebra. Let Γ be a group and S be a Γ-set. Consider the reduced crossed product A⊗S ⋊ Γ where Γ acts on A⊗S by the shift of tensor components. We say it the generalized wreath product of A with respect to S and denote it by A ≀S Γ. We assume that Γ and S are countable. Proposition 3.3. The class of unital C∗ -algebras with the SOAP satisfying the conditions in Theorem A is closed under taking the following operations. (1) The generalized wreath product with respect to any Γ-set with Γ the AP. (2) Countable minimal tensor products. We note that the second condition in Theorem A implies the first one by the proof of Theorem A. Therefore to prove these propositions, we only need to check the second condition in Theorem A. To prove Propositions 3.2 and 3.3, we need the following proposition. The idea of the proof is essentially contained in [30]. Proposition 3.4. Let Γ be a group with the AP. Let A be a Γ-C∗ -algebra and let X be a closed subspace of A. Assume that an element x ∈ A ⋊ Γ satisfies Eg (x) ∈ X for all g ∈ Γ. Then x is contained in the closed subspace X ⋊ Γ := span{xug : x ∈ X, g ∈ Γ}. Conversely, if the above implication always holds for any Γ-C∗ -algebra and its closed subspace, then the group Γ has the AP. Proof. Since Γ has the AP, there is a net (ϕi )i∈I of finitely supported functions on Γ satisfying the condition in P Definition 2.3. For i ∈ I, define the linear map Φi : A ⋊ Γ → A ⋊ Γ by Φi (y) := g∈Γ ϕi (g)Eg (y)ug . We claim that the net (Φi )i∈I converges to the identity map in the pointwise norm topology. To show this, consider the embedding ι : A ⋊ Γ → (A ⋊ Γ) ⊗ C∗r (Γ) induced from the maps a ∈ A 7→ a ⊗ 1 and ug ∈ Γ 7→ ug ⊗ λg . (This indeed defines an embedding by Fell’s absorption principle [3, Prop.4.1.7].) Then the composite ι ◦ Φi coincides with the composite (idA⋊Γ ⊗ mϕi ) ◦ ι. This proves the convergence condition. Now let x be as stated. AMBIENT NUCLEAR C∗ -ALGEBRAS 9 Then for any i ∈ I, we have Φi (x) ∈ X ⋊ Γ. Since the net (Φi (x))i∈I converges in norm to x, we have x ∈ X ⋊ Γ. To show the converse, for any C∗ -algebra A, consider the trivial Γ-action on A. Then we have an isomorphism ϕ : A ⋊ Γ ∼ = C∗r (Γ) ⊗ A satisfying ϕ(aug ) = λg ⊗ a for a ∈ A and g ∈ Γ. For any closed subspace X of A, the isomorphism ϕ maps X ⋊ Γ onto C∗r (Γ) ⊗ X. Now take an element x ∈ F (C∗r (Γ), A, X). To show the AP of Γ, by Proposition 2.4, it suffices to show x ∈ C∗r (Γ) ⊗ X. For any g ∈ Γ, let τg be the bounded linear functional on C∗r (Γ) satisfying τg (λh ) := δg,h for h ∈ Γ. Then by the choice of x, we have (τg ⊗idA )(x) ∈ X for all g ∈ Γ. Since Eg (ϕ−1 (x)) = (τg ⊗idA )(x), we conclude that ϕ−1 (x) ∈ X ⋊ Γ. Thus we have x ∈ C∗r (Γ) ⊗ X as desired.  As a consequence, we obtain a permanence property of the SOAP and the OAP. Corollary 3.5. The SOAP and the OAP are preserved under taking the reduced crossed product of a group with the AP. Proof. We only give a proof for the SOAP. Let A be a Γ-C∗ -algebra with the SOAP. Let B be a C∗ -algebra and X be its closed subspace. To show the SOAP of A ⋊ Γ, it suffices to prove the inclusion F (A⋊Γ, B, X) ⊂ (A⋊Γ)⊗X. Let x ∈ F (A⋊Γ, B, X). Then (Eg ⊗ idB )(x) ∈ F (A, B, X) for all g ∈ Γ. Since A has the SOAP, we have F (A, B, X) ⊂ A ⊗ X. Then from Proposition 3.4, we conclude x ∈ (A ⋊ Γ) ⊗ X. Here we use the canonical identification of (A ⋊ Γ) ⊗ B with (A ⊗ B) ⋊ Γ.  Remark 3.6. The similar proofs also show the W∗ -analogues of Proposition 3.4 and Corollary 3.5. We note that the W∗ -analogue of Corollary 3.5 is shown by Haagerup and Kraus for locally compact groups with the AP [8, Theorem 3.2]. Q Q∞ Proof of Proposition 3.2. Replace C( ∞ k=n X) by C( k=n X) ⊗ A with the diagonal Γ-action in the proofQof Theorem A. Then as in the proof of Theorem A, the of multidecreasing sequence ((C( ∞ k=n X) ⊗ A) ⋊ Γ)n admits a compatible Qfamily ∞ plicative conditional expectations. By Theorem 2.1, each term (C( k=n X)⊗A)⋊Γ is nuclear. Their intersectionT containsQ A ⋊ Γ, and the coefficients of elements in the ∞ intersection are contained in n=1 (C( ∞ k=n X) ⊗ A) = A. Here the last equality follows from a similar argument to that in the proof of Theorem A. Now by Proposition 3.4, we conclude the equality ! ∞ ∞ \ Y X) ⊗ A) ⋊ Γ = A ⋊ Γ. (C( n=1 k=n  Proof of Proposition 3.3. (1): First take a decreasing sequence (An )∞ n=1 of separable nuclear C∗ -algebras whose intersection is isomorphic to A and that admits Q∞ a compatible family ofQ multiplicative conditional expectations. We will use C( k=n X)⊗A⊗S n instead of C( ∞ k=n X) in the proof of Theorem A. To complete the proof, it is enough to show the equality ! ∞ ∞ \ Y  X) ⊗ A⊗S = A⊗S . C( n n=1 k=n 10 YUHEI SUZUKI Indeed, holds, then, thanks to Proposition 3.4, the decreasing sequence Q∞if the equality ⊗S ∞ ((C( Tk=n X) ⊗ n ) ⋊ Γ)n=1 gives the desired sequence. The inclusion ‘⊃’ is clear. QA ∞ ∞ Since n=1 C( k=n X) = C, by a similar argument to that in the proof of Theorem A, we have ! ∞ ∞ ∞ \ \ Y  ⊗S X) ⊗ An = A⊗S C( n . n=1 n=1 k=n Fix a state ϕ on A1 . For a subset T of S, consider the conditional expectation ⊗T ET := (idA1 )⊗T ⊗ ϕ⊗(S\T ) : A⊗S 1 → A1 . The net (EF )F , where F runs over finite subsets of S, then converges to the identity in the pointwise norm convergence. Moreover, for any n and T , we have ET (A⊗S n ) = ⊗T An . Hence, to showT the above equality, it suffices to show the following claim. For ⊗m any m ∈ N, we have ∞ = A⊗m . We show the claim by induction. The case n=1 An m = 1 is trivial. Suppose the claim is true for m. Then for any k ∈ N, we have ∞ \ ⊗m An⊗(m+1) ⊂ F (A⊗m ⊗ A. k , A1 , A) = Ak n=1 Here the last equality follows from the nuclearity of A⊗m k . Then by the SOAP of A and our inductive hypothesis, we further have ∞ ∞ \ \ ⊗(m+1) (A ⊗ A⊗m ) ⊂ F (A, A , A⊗m . 1 k k ) = A k=1 k=1 This completes the proof. (2): Let An be a sequence of C∗ -algebras whose terms satisfy the conditions in Theorem A and have the SOAP. For each n, take a decreasing sequence (Bn,m )∞ m=1 of nuclear C∗ -algebras with a compatible family of multiplicative conditional expectations N whose intersection coincides with An . For each m ∈ N, set Bm := ∞ n=1 Bn,m . Then it is not hard to check that each Bm is nuclear and the decreasing sequence (Bm )∞ m=1 admits a compatible family of multiplicative conditional expectations. Moreover, by aTsimilar argument N∞ to that in the previous paragraph, it can be shown the equality ∞  m=1 Bm = n=1 An . This completes the proof. 4. Hyperbolic group case In this section, we give a geometric construction of a decreasing sequence of Kirchberg algebras whose decreasing intersection is isomorphic to the hyperbolic group C∗ -algebra. We construct such a sequence inside the boundary algebra C(∂Γ) ⋊ Γ. To find such a sequence, we construct amenable quotients of the boundary space. The proof does not depend on both the reduced free product theory and Kirchberg– Phillips’s O2 -absorption theorem. We also use the sequence constructed in this section for the free group case in the next two sections. For the definition and basic properties of hyperbolic groups, we refer the reader to [3, Section 5.3] and [7]. (For the reader who is only interested in the free group case, we recommend to concentrate on that case. In this case, some arguments related to geodesic paths become much simpler.) Here we only recall a few facts. (See 8.16, AMBIENT NUCLEAR C∗ -ALGEBRAS 11 8.21, 8.28, and 8.29 in [7].) For a torsion free element t of a hyperbolic group Γ, the sequence (tn )∞ n=1 is quasi-geodesic. The boundary action of t has exactly two fixed points. They are the points represented by the quasi-geodesic paths (tn )∞ n=1 +∞ and (t−n )∞ and t−∞ respectively. For any neighborhoods n=1 . We denote them by t U± of t±∞ , there is n ∈ N such that for any m ≥ n, tm (∂Γ \ U− ) ⊂ U+ holds. For a metric space (X, d) and its points x, y, z ∈ X, we denote by hy, zix the Gromov product (d(y, x) + d(z, x) − d(y, z))/2 of y, z with respect to x. We recall the following criteria for the Hausdorffness of a quotient space. We left the proof to the reader. Proposition 4.1. Let X be a compact Hausdorff space. Let R be an equivalence relation on X. Assume that the quotient map π : X → X/R is closed. Then the quotient space X/R is Hausdorff. The next lemma guarantees the amenability of certain quotients of amenable dynamical systems. We are grateful to Narutaka Ozawa for letting us know Lusin’s theorem [26, Theorem 5.8.11]. Lemma 4.2. Let Γ be a group, X be an amenable compact metrizable Γ-space. Let R be a Γ-invariant equivalence relation on X such that the quotient space X/R is Hausdorff. Assume that each equivalence class of R is finite. Then X/R is again an amenable compact Γ-space. To prove Lemma 4.2, we need the following characterization of amenability due to Anantharaman-Delaroche [1, Theorem 4.5]. See also [3, Prop.5.2.1] for a generalized version. Proposition 4.3. Let α : Γ y X be an action of Γ on a compact metrizable space X. Then α is amenable if and only if there exists a net (ζi : X → Prob(Γ))i∈I of Borel maps with the following condition. Z lim kg.ζi (x) − ζi (g.x)k1 dµ = 0 for all µ ∈ Prob(X) and g ∈ Γ. i∈I X Here Prob(X) denotes the set of all Borel probability measures on X. Proof of Lemma 4.2. First note that R must be closed in X × X, otherwise the quotient space X/R cannot be Hausdorff. Then, since each equivalence class is finite, Lusin’s theorem [26, Theorem 5.8.11] tells us that R is presented as a countable disjoint union of graphs of Borel maps between Borel subsets of X. Then it is not hard to check that for each f ∈ C(X), the function f˜ on X/R defined by 1 X f˜([x]) := f (y) ♯[x] y∈[x] is Borel. By the same reason, the similar formula also defines the map Φ from C(X, Prob(Γ)) to B(X/R, Prob(Γ)). Here C(X, Prob(Γ)) denotes the set of all continuous maps from X into Prob(Γ) and B(X/R, Prob(Γ)) denotes the set of all Borel maps from X/R into Prob(Γ). 12 YUHEI SUZUKI Let (ζi : X → Prob(Γ))i∈I be a net of continuous maps that satisfies the condition in the definition of amenability for Γ y X. Consider the net (Φ(ζi ))i∈I . Then for any g ∈ Γ, x ∈ X, and i ∈ I, we have 1 X k(g.Φ(ζi ))([x]) − Φ(ζi )(g.[x])k1 ≤ kg.ζi (y) − ζi (g.y)k1. ♯[x] y∈[x] Thus, for each g ∈ Γ, the norms k(g.Φ(ζi ))([x]) − Φ(ζi )(g.[x])k1 converge to 0 uniformly on X/R as i tends to ∞. In particular, the net (Φ(ζi ))i∈I satisfies the condition in Proposition 4.3.  Lemma 4.4. Let Γ be a hyperbolic group. Let T be a finite set of torsion free elements of Γ. Then the set  RT := ∆∂Γ ∪ (g.t+∞ , g.t−∞ ) : g ∈ Γ, t ∈ T ∪ T −1 is a Γ-invariant equivalence relation on ∂Γ. Moreover, the quotient space ∂Γ/RT is a Hausdorff space. Proof. Clearly RT is Γ-invariant. Let s and t be torsion free elements of Γ. Then the two sets {s±∞ } and {t±∞ } are either disjoint or the same [7, 8.30]. Therefore the set RT is an equivalence relation. Note that this shows that each equivalence class of RT contains at most two points. For the Hausdorffness of the quotient space, it suffices to show that the quotient map π : ∂Γ → ∂Γ/RT is closed. Let A be a closed subset of ∂Γ. Then π −1 (π(A)) = A ∪ B, where  B := g.t−∞ ∈ ∂Γ : g ∈ Γ, t ∈ T ∪ T −1 , g.t+∞ ∈ A . To show the closedness of π(A), which is equivalent to that of π −1 (π(A)), it suffices to show that cl(B) ⊂ A ∪ B. Fix a finite generating set S of Γ and denote by | · | and d(·, ·) the length function and the left invariant metric on Γ determined by S respectively. Take δ > 0 with the property that every geodesic triangle in (Γ, d) is δ∞ thin [3, Proposition 5.3.4]. Let x ∈ cl(B) and take a sequence (gn .t−∞ n )n=1 in B which converges to x. By passing to a subsequence, we may assume that there is t ∈ T ∪T −1 with tn = t for all n ∈ N. Replace gn by gn tl(n) for some l(n) ∈ Z for each n ∈ N, we may further assume |gn | ≤ |gn tk | for all k ∈ Z and n ∈ N. If the sequence (gn )∞ n=1 has a bounded subsequence, then it has a constant subsequence. Hence we have x ∈ B. Assume |gn | → ∞. For each k ∈ Z, take a geodesic path [e, tk ] from e to tk . Since t −n ∞ )n=1 are quasi-geodesic. Therefore, by is torsion free, the sequences (tn )∞ n=1 and (t [3, Prop.5.3.5], there is D > 0 such that the Hausdorff distance between [e, tk ] and (tn )kn=0 is less than D for all k ∈ Z. Now consider a geodesic triangle ∆ with the vertices {e, gn−1 , tk }. Let f denote the comparison tripod of ∆ (see Section 5.3 of [3] for the definition.) Let u, v, w be (unique) points in ∆ lying on the geodesic paths [e, gn−1], [gn−1 , tk ], [tk , e] ⊂ ∆ respectively that satisfy f (u) = f (v) = f (w). Put l1 := d(e, u) = d(w, e), l2 := d(u, gn−1) = d(gn−1 , v), and l3 := d(v, tk ) = d(tk , w). Then, since ∆ is δ-thin, we have l2 + δ ≥ dist(gn−1 , [e, tk ]) ≥ |gn | − D. Since l1 + l2 = |gn |, this implies l1 ≤ D + δ. Then since l1 + l3 = |tk |, we further obtain l3 ≥ |tk | − D − δ. AMBIENT NUCLEAR C∗ -ALGEBRAS 13 Combining these inequalities, we have |gn tk | = l2 + l3 ≥ |tk | + |gn | − 2(D + δ). This yields hgn tk , gn t−l ie ≥ |gn | − 2(D + δ) for all n, k, l ∈ N. −k ∞ Since both (tk )∞ k=1 and (t )k=1 are quasi-geodesic and the left multiplication action −k ∞ of Γ on itself is isometric, the paths {(gn tk )∞ k=1 , (gn t )k=1 : n ∈ N} are uniformly quasi-geodesic (i.e., there are constants C ≥ 1 and r > 0 such that all paths in the set are (C, r)-quasi-geodesic). This with the above inequality shows that the limits −∞ ∞ of (gn .t+∞ )∞ )n=1 coincide. (Cf. Lemmas 5.3.5, 5.3.8 in [3] and the n=1 and (gn .t definition of the topology on ∂Γ.) Since A is closed, we have x ∈ A as required.  For a subgroup Λ of a hyperbolic group Γ, we define the limit set LΛ of Λ to be the closure of the set {t+∞ ∈ ∂Γ : t ∈ Λ torsion free} in ∂Γ. Recall that any hyperbolic group does not contain an infinite torsion subgroup [7, 8.36]. Therefore the limit set LΛ is nonempty when Λ is infinite. Since the equality (sts−1 )+∞ = s.t+∞ holds for any torsion free element t ∈ Γ and any s ∈ Γ, the limit set LΛ is Λ-invariant. Hence Λ acts on LΛ in the canonical way. Next we give two lemmas on the action on the limit set, which are familiar to specialists. We recall a few terminology. Let α : Γ y X be an action of a group Γ on a compact Hausdorff space X. The action α is said to be minimal if all Γ-orbits are dense in X. The action α is said to be topologically free if for any g ∈ Γ \ {e}, the set of all points of X fixed by α(g) has the trivial interior. Lemma 4.5. Let Λ be an ICC subgroup of a hyperbolic group Γ. Then the action ϕΛ of Λ on its limit set LΛ is amenable, minimal, and topologically free. Proof. The amenability of the boundary action shows that the action ϕΛ is amenable. Since Λ is ICC, it is neither finite nor virtually cyclic. Hence Λ contains a free group of rank 2 by Theorem 8.37 of [7]. Hence there are two torsion free elements s and t of Λ which do not have a common fixed point. This shows that any Λ-invariant closed non-empty subset X of LΛ contains at least four points, i.e., s±∞ and t±∞ . Therefore, for any torsion free element u of Λ, we can find an element of X which is not equal to u−∞ . This shows that X contains the set {u+∞ : u ∈ Λ torsion free}, which is dense in LΛ . Therefore X = LΛ and we conclude the minimality of ϕΛ . Assume now that ϕΛ is not topologically free. Take an element g1 ∈ Λ \ {e} such that the set Fg1 := {x ∈ LΛ : g1 .x = x} has a nontrivial interior. Then note that LΛ does not have an isolated point, since ϕΛ is minimal and LΛ is infinite. (Here the infiniteness of LΛ follows from the amenability of ϕΛ and the non-amenability of Λ.) Since any torsion free element of Λ has only two fixed points in LΛ , the order of g1 must be finite. Assume Fg1 = LΛ . This means that the kernel of ϕΛ is nontrivial. Since any torsion free element of Λ acts on LΛ non-trivially, the kernel is a nontrivial torsion subgroup. Therefore it must be Tfinite. This contradicts to the ICC condition. For a subgroup G of Λ, we set FG := g∈G Fg . Note that for a subgroup G of Λ and g ∈ Λ, we have FgGg−1 = gFG . Set G1 := hg1 i. Then int(FG1 ) = int(Fg1 ) 6= ∅. We will show that there is g2 ∈ Λ satisfying ∅= 6 g2 (int(FG1 )) ∩ int(FG1 ) ( int(FG1 ). 14 YUHEI SUZUKI Indeed, if such g2 does not exist, then the family {g(int(FG1 )) : g ∈ Λ} makes an open covering of LΛ whose members are mutually disjoint. (Note that if g ∈ Λ satisfies int(FG1 ) ( g(int(FG1 )), then g −1 satisfies the required condition.) This forces that the subgroup Λ0 := {g ∈ Λ : g(int(FG1 )) = int(FG1 )} has finite index in Λ. Since Λ is ICC, the subgroup G := hgG1g −1 : g ∈ Λ0 i must be infinite. Moreover, by definition, we have int(FG ) = int(FG1 ) 6= 0. Hence G must be an infinite torsion subgroup, a contradiction. Thus we can take g2 ∈ Λ as above. Set G2 = hG1 , g2 G1 g2 −1 i. Then we have ∅ = 6 int(FG2 ) ( int(FG1 ). This shows that G2 is still finite and is larger than G1 . Continuing this argument inductively, we obtainSa strictly increasing sequence (Gn )∞ n=1 of finite subgroups of Λ. Then the union ∞ G is an infinite torsion subgroup of Λ, again a contradiction.  n=1 n Remark 4.6. Conversely, if Λ is not ICC, then the action on the limit set LΛ is not faithful. In this case, Λ contains a finite index subgroup Λ0 with the nontrivial center. Since LΛ0 = LΛ , the center of Λ0 acts on LΛ trivially. Lemma 4.7. For Λ as in Lemma 4.5, the equivalence relation ! [ R := R{t} ∩ (LΛ × LΛ ) t∈Λ, torsion free on LΛ is dense in LΛ × LΛ . Proof. Let s and t be two torsion free elements in Λ which do not have a common fixed point. For any neighborhoods U± of s±∞ and neighborhoods V± of t±∞ with the properties U+ ∩V− = ∅ and U− ∩V+ = ∅, take a natural number N satisfying sN (∂Γ\ U− ) ( U+ and tN (∂Γ\V− ) ( V+ . Then, for any m ∈ N, we have (sN tN )m (∂Γ\V− ) ( U+ and (sN tN )−m (∂Γ \ U+ ) ( V− . This shows that the element sN tN is torsion free, (sN tN )+∞ ∈ cl(U+ ), and (sN tN )−∞ ∈ cl(V− ). Thus cl(U+ ) × cl(V− ) intersects with R. Since both U+ and V− can be arbitrarily small, this proves the density of R.  Recall that an action Γ y X of a group on a compact Hausdorff space is said to be a locally boundary action if for any nonempty open set U ⊂ X, there is an open set V ⊂ U and an element t ∈ Γ satisfying cl(t.V ) ( V [12, Definition 6]. Lemma 4.8. Let Λ and Γ be as in Lemma 4.5. Let T be a finite set of torsion free elements of Λ. Then the action Λ y LΛ /(RT ∩ (LΛ × LΛ )) is a locally boundary action. Proof. Let s be a torsion free element of Λ whose fixed points are not equal to g.t±∞ for any g ∈ Λ and t ∈ T . Then π(s+∞ ) 6= π(s−∞ ). Hence, on the set π(LΛ \ {s+∞ }), +∞ the sequence (sn .x)∞ ) uniformly on compact subsets. Thus n=1 converges to π(s +∞ for any neighborhood U of π(s ) whose closure does not contain π(s−∞ ), there is n ∈ N such that sn (cl(U)) ( U. From the minimality of Λ y LΛ , now it is easy to conclude that the action is a locally boundary action.  Theorem 4.9. Let Λ be a subgroup of a hyperbolic group Γ. Then there is a decreasing sequence of nuclear C∗ -subalgebras of C(LΛ ) ⋊ Λ whose intersection is equal AMBIENT NUCLEAR C∗ -ALGEBRAS 15 to C∗r (Λ). Moreover, if Λ is ICC, then we can find such a sequence with the terms Kirchberg algebras in the UCT class. Proof. Let (Fn )∞ n=1 be an increasing sequence of finite subsets of torsion free elements of Λ whose union contains all torsion free elements. Define Rn := RFn ∩(LΛ ×LΛ ) for each n. Note that for each n, the quotient space LΛ /Rn is Hausdorff by Lemma 4.4. Put An := C(LΛ /Rn )T⋊ Λ. Then by Lemma 4.2, each An is nuclear. Moreover, by Lemma 4.7, we have ∞ n=1 C(LΛ /Rn ) = C. Since every hyperbolic group is weakly amenable [18], we have the equality ∞ \ An = C∗r (Λ). n=1 When Λ is ICC, a similar proof to that of Lemma 4.5 shows the topological freeness of Λ y LΛ /Rn . Now by Lemma 4.8 and Theorem 9 of [12], each An is a Kirchberg algebra. Since each An is the groupoid C∗ -algebra of an amenable étale groupoid, they are in the UCT class by Tu’s theorem [28].  5. Extensions of C∗r (Fd ) by nuclear C∗ -algebras In this section, we prove Theorem C. We first consider the case d is finite. We deal with the case d = ∞ in the end of this section. Denote by S the set of all canonical generators of Fd . Denote by | · | the length function on Fd determined by S. To prove Theorem C, first we compute the K-theory of the crossed product C(∂Fd /RS ) ⋊ Fd . We always use the following standard picture of the Gromov boundary ∂Fd . ) ( Y S ⊔ S −1 : xn 6= x−1 ∂Fd := (xn )∞ n+1 for all n ∈ N n=1 ∈ n∈N equipped with the relative product topology. For w ∈ Fd , we denote by p[w] the characteristic function of the clopen set  (xn )∞ n=1 ∈ ∂Fd : x1 · · · x|w| = w and set q[w] := p[w] + p[w −1]. Throughout this section, we identify C(∂Fd /RS ) with the Fd -C∗ -subalgebra of C(∂Fd ) in the canonical way. Under this identification, it is not difficult to check that for s ∈ S, q[s] is contained in C(∂Fd /RS ). We denote the action Fd y C(∂Fd ) by wf for w ∈ Fd and f ∈ C(∂Fd ). Lemma 5.1. The C∗ -algebra C(∂Fd /RS ) is generated by the set P := {wq[s] : w ∈ Fd , s ∈ S}. In particular, the space ∂Fd /RS is homeomorphic to the Cantor set. Proof. By the Stone–Weierstrass theorem, it suffices to show that the set P separates ∞ the points of ∂Fd /RS . Let x = (xn )∞ n=1 and y = (yn )n=1 be two elements in ∂Fd satisfying (x, y) 6∈ RS . If x 6∈ {ws+∞ : w ∈ Fd , s ∈ S ⊔ S −1 }, then take n ∈ N with xn 6= yn . Let m be the smallest integer greater than n satisfying xm 6= xn (which exists by assumption). Then the projection (x1 · · · xm−1 )(q[xm ]) separates x and y. Next consider the case x = zs+∞ , y = wt+∞ , where s, t ∈ S ⊔ S −1 and z, w are 16 YUHEI SUZUKI elements of Fd whose last alphabets are not equal to s±1 , t±1 , respectively. Assume |z| ≥ |w|. Since the last alphabet of z is neither s nor s−1 , we have (zq[s]) ≤ p[z] and (zq[s])(x) = 1. When z 6= w, the above inequality with the assumption |z| ≥ |w| shows (zq[s])(y) = 0. Otherwise we have z = w and s 6= t±1 , which again yield (zq[s])(y) = 0. Therefore P satisfies the required condition. The last assertion now follows from the following fact. A topological space is homeomorphic to the Cantor set if and only if it is compact, metrizable, totally disconnected, and does not have an isolated point.  Lemma 5.2. The K0 -group of C(∂Fd /RS ) ⋊ Fd is generated by {[q[s]]0 : s ∈ S}. Proof. By Lemma 5.1 and the Pimsner–Voiculescu exact sequence [20], the K0 -group is generated by the elements represented by a projection in C(∂F P d /RS ). Let r be a projection in C(∂Fd /RS ). Then r can be presented as a sum w∈F p[w], where F is a subset of Fd \{e} whose elements have the same lengths. Let w be an element of Fd n(1) n(k) whose reduced form is s1 · · · sk , where si ∈ S ⊔ S −1 , n(i) ∈ N, and si 6= si+1 for n(1) n(k−1) −n(k) all i. We define ŵ ∈ Fd by s1 · · · sk−1 sk . We will show that w ∈ F implies +∞ ŵ ∈ F . Indeed, if w ∈ F , then r(wsk ) = 1. Hence we must have r(ws−∞ k ) = 1. n(k) This implies ŵ ∈ F as desired. Since w 6= ŵ and [p[w]+p[ŵ]]0 = [q[sk ]]0 , it suffices to show that for s ∈ S and n ∈ N, the element [q[sn ]]0 is contained in the subgroup generated by [q[s]]0 , s ∈ S. This follows from the equations q[s2 ] = sq[s] + s−1 q[s] + q[s] − 2 and q[sk ] = sq[sk−1 ] + s−1 q[sk−1 ] − q[sk−2] for s ∈ S and k > 2.  We denote the triplet (K0 , [1]0 , K1 ) by K∗ . Theorem 5.3. The K∗ (C(∂Fd /RS ) ⋊ Fd ) is isomorphic to (Zd , (1, 1, . . . , 1), Zd ). Proof. We first compute the pair (K0 , [1]0 ). By Lemma 5.2, it suffices to show the linear independence of the family ([q[s]]0 )s∈S . Let η : C(∂Fd , Z)⊕S → C(∂Fd , Z) P be the additive map defined by (fs )s∈S 7→ s∈S (fs − sfs ) and denote by τ the ⊕S restriction of η to C(∂Fd /RS , Z) . Then the Pimsner–Voiculescu exact sequence [20] shows that the canonical map C(∂Fd /RS , Z) → K0 (C(∂Fd /RS ) ⋊ Fd ) is surjective and its kernel is equal to im(τ ). Hence it suffices to show that im(τ ) does not contain a nontrivial linear combination of the projections q[s], s ∈ S. The (see [4, 20, 25]) show that ker(η) = isomorphisms ker(η) ∼ = Zd P = K1 (C(∂Fd ) ⋊ Fd ) ∼ {(fs )s∈S : each fs is constant}. Now let r = s∈S n(s)q[s] be a nontrivial linear P combination of q[s]’s. If s∈S n(s) 6≡ 0 mod (d − 1), then r 6∈ im(η) P by [4, 25]. (See also the second paragraph ofP[27, Section 4] for the detail.) If s∈S n(s) = (d − 1)m for some m ∈ Z, then s∈S n(s)q[s] = η((gs )s∈S ), where gs := (n(s) − AMBIENT NUCLEAR C∗ -ALGEBRAS 17 m)p[s−1 ] for s ∈ S. Hence η −1 ({r}) = (gs )s∈S + ker(η), which does not intersect with C(∂Fd /RS , Z)⊕S . Thus we have r 6∈ im(τ ) in either case. The isomorphism of the K1 -group follows from the Pimsner–Voiculescu exact sequence [20] and the equality ker(τ ) = ker(η).  Proof of Theorem C: the case d is finite. Let A be a stable separable nuclear C∗ algebra. Let ι : C∗r (Fd ) → C(∂Fd /RS ) ⋊ Fd be the inclusion map. Then the proof of Theorem 5.3 yields that the homomorphism ι∗,0 has a left inverse and the homomorphism ι∗,1 is an isomorphism. Consequently, the homomorphism Hom(Ki (C(∂Fd /RS ) ⋊ Fd ), K1−i (A)) → Hom(Ki (C∗r (Fd )), K1−i (A)) induced from ι is surjective for i = 0, 1. Recall that both C∗r (Fd ) and C(∂Fd /RS )⋊Fd satisfy the universal coefficient theorem [24, Corollary 7.2]. Since Ki (C∗r (Fd )) is a free Z-module for i = 0, 1, the universal coefficient theorem [24] yields that the canonical homomorphism M Ext(C∗r (Fd ), A)−1 → Hom(Ki (C∗r (Fd )), K1−i (A)) i=0,1 is an isomorphism. Combining these facts, we see that the homomorphism ι∗ : Ext(C(∂Fd /RS ) ⋊ Fd , A) → Ext(C∗r (Fd ), A)−1 induced from ι is surjective. Now let B be the exact C∗ -algebra obtained by an extension σ of C∗r (Fd ) by A which is either absorbing or unital absorbing. Since A is nuclear and C∗r (Fd ) is exact, the Effros–Haagerup lifting theorem [6, Theorem B and Prop. 5.5] shows that [σ] ∈ Ext(C∗r (Fd ), A) is invertible in the semigroup Ext(C∗r (Fd ), A). Note that in either case, the direct sum σ ⊕ 0 is absorbing. Thus, by the surjectivity of ι∗ and the unicity of absorbing representative, the direct sum σ ⊕ 0 extends to a ∗homomorphism ϕ : C(∂Fd /RS ) ⋊ Fd → M2 (Q(A)). Then, since ϕ(1) = σ(1) ⊕ 0 ≤ 1 ⊕ 0, the map σ̃ : C(∂Fd /RS ) ⋊ Fd ∋ x 7→ ϕ(x)1,1 ∈ Q(A) defines a ∗-homomorphism which extends σ. We next show that B is realized as a decreasing intersection of separable nu∗ clear C∗ -algebras. Take a decreasing sequence (An )∞ n=1 of nuclear C -subalgebras of ∗ C(∂Fd /RS ) ⋊ Fd whose intersection is equal to Cr (Fd ). Put Bn := π −1 (σ̃(An )) for each n, where π : M(A) → Q(A) denotes the quotient map. Then, since nuclearity is preserved under taking the extension, each Bn is nuclear. Moreover, we have ∞ \ n=1 Bn = ∞ \ π −1 (σ̃(An )) = B. n=1 For the unital case, the rest of the proof is similarly done to the proof of Theorem A. For the non-unital case, let (Bn )∞ n=1 be a decreasing sequence of separable nuclear 18 YUHEI SUZUKI f1 of C∗ -algebras whose intersection is B. Denote by 1 the unit of the unitization B f1 ⊕ ℓ∞ (N) by B1 . Define C∗ -subalgebras Cn of B Cn := C∗ (Bn , {1 ⊕ pk : k ∈ N}), whereN pk is the characteristic function of the set {l ∈ N : l ≥ k}. Set Dn := Cn ⊗ ∞ k=n C(X) for each n, where X is a compact metrizable space consisting at least two points. Take a faithful stateN φ on C1 and a faithful measure µ on X. Then define a state ϕ on D1 by ϕ := φ ⊗ ∞ k=1 µ. Now take a pure state ψ on M2 and define En := qn ((Dn , ϕ|Dn ) ∗ ( ∞ k=n (M2 , ψ))) qn , where qn := (1 ⊕ pn ) ∈ Dn . Then, being as a corner of a simple unital N separable ∗ nuclear C -algebra, each En also has these properties. Now put Fn := En ⊗ ∞ k=n O2 . Then each Fn is isomorphic to O2 [11]. Now by a similar argument to that in the T∞ last paragraph of the proof of Theorem A, we have n=1 Fn = B. Finally, when A = K, by Voiculescu’s theorem [29], any essential unital extension is unital absorbing and any essential non-unital extension is absorbing. Moreover, since C∗r (Fd ) is simple [21], the only non-essential extension is the zero extension C∗r (Fd ) ⊕ K. In this case, the claim follows from the above argument.  ∗ We remark that in the proofs of Theorems A and C, the following is implicitly proved. Here we record it as a proposition. Proposition 5.4. Let A be a (possibly non-unital) C∗ -algebra which is realized as a decreasing intersection of separable nuclear C∗ -algebras. Then it is realized as a decreasing intersection of isomorphs of the Cuntz algebra O2 . Now consider the case d = ∞. Proof of Theorem C: the case d = ∞. Let Λ be the commutator subgroup of F2 . Then Λ is isomorphic to F∞ . Therefore we only need to show the claim for Λ. Let S be the canonical generator of F2 and consider the restriction α of the action F2 y ∂F2 /RS to Λ. Let ι : C∗r (Λ) → C(∂F2 /RS ) ⋊ Λ denote the inclusion. We will show that the induced homomorphism ι∗ on the Ktheory is left invertible. To show the claim for the K0 -group, consider the following inclusion map ι̃ : C∗r (Λ) → C(∂F2 /RS ) ⋊ F2 . Then by Theorem 5.3, the homomorphism ι̃∗,0 is left invertible. This proves the left invertibility of ι∗,0 . To show the claim for the K1 -group, first take a free basis A of Λ ∼ = F∞ . Define the homomorphism η : C(∂F2 /RS , Z)⊕A → C(∂F2 /RS , Z) P by η((fa )a∈A ) := a∈A (fa − afa ). Then by the Pimsner–Voiculescu six term exact sequence, we obtain an isomorphism K1 (C(∂F2 /RS ) ⋊ Λ) ∼ = ker(η) AMBIENT NUCLEAR C∗ -ALGEBRAS 19 which maps [ua ]1 to (δa,b 1)b∈A for each a ∈ A. Since the subgroup generated by 1 is a direct summand of the group C(∂F2 /RS , Z), the homomorphism Z⊕A → ker(η) given by δa 7→ (δa,b 1)b∈A is left invertible. Consequently, the homomorphism ι∗,1 is left invertible. Now the rest of the proof is similarly done to the case d is finite.  Remark 5.5. Let σ be a Busby invariant as before. Denote by ϕi : Ki (C∗r (Fd )) → K1−i (A) the homomorphisms corresponding to σ. Then the six-term exact sequence gives the formula of the K-groups of the extension B as follows. Ki (B) ∼ = coker(ϕ1−i ) ⊕ Z⊕di (i = 0, 1) where di := rank(ker(ϕi )). Furthermore, when B is unital, the unit element [1]0 corresponds to the element  0 if d0 = 0, u= 0 ⊕ (1, 0, . . . , 0) otherwise. (j) (j) (j) Next consider two triplets (G0 , u(j) , G1 ), j = 1, 2, where Gi are countable (j) abelian groups and u(j) ∈ G0 . Then, by Theorem 4.1 of [19], every homomorphism between them is implemented by a unital ∗-homomorphism between unital Kirchberg algebras in the UCT class. Combining this fact with our results in this section, we obtain the following consequence. Corollary 5.6. For any countable free group F, there is a unital embedding of C∗r (F) into a Kirchberg algebra which implements the KK-equivalence. 6. Consequences to amenable minimal Cantor systems of free groups Let d be a natural number greater than 1. Again let S denote the set of canonical generators of Fd . Let F ⊂ S be a nonempty proper subset. Then a similar proof to Theorem 5.3 shows that the space ∂Fd /RF is the Cantor set and K∗ (C(∂Fd /RF )⋊Fd ) is isomorphic to (Zd , (1, 0, . . . , 0), Zd ). (The set {[1]0 , [p[s]]0 , [q[t]]0 : s ∈ S \ F, t ∈ F′ } is a basis of the K0 -group for any subset F′ ofPF with the cardinality ♯F − 1. We remark that the equality (d − ♯F − 1)[1]0 = − s∈F [q[s]]0 holds in the K0 -group.) The classification theorem of Kirchberg and Phillips [10, 19] shows that the crossed products of the dynamical systems ϕF : Fd y ∂Fd /RF are mutually isomorphic for nonempty subsets F of S. Moreover, these crossed products are isomorphic to a Cuntz–Krieger algebra [14, Lemma 3.7]. Recall that two minimal topologically free actions on the Cantor set is continuously orbit equivalent if and only if their transformation groupoids are isomorphic as étale groupoids [27, Def.5.4]. See [16] and [27] for relevant topics. We will show that they are not continuously orbit equivalent. Hence we obtain examples of amenable minimal Cantor Fd -systems which are not continuously orbit equivalent but have isomorphic crossed products. Let α : Γ y X be an action of a group on the Cantor set. Recall that the topological full group [[α]] of α is the group consisting homeomorphisms h on X satisfying the following condition. For any x ∈ X, there is a neighborhood U of x and g ∈ Γ such that h(y) = g.y for all y ∈ U. 20 YUHEI SUZUKI Theorem 6.1. Let F and F′ be nonempty subsets of S. Then ϕF and ϕF′ are continuously orbit equivalent if and only if ♯F = ♯F′ . Proof. Let F be a nonempty subset of S and denote by [y] the element of ∂Fd /RF represented by y ∈ ∂Fd . Set X := {x ∈ ∂Fd /RF : there is g ∈ Fd \ {e} with g.x = x} . Notice that the definition of X only depends on the structure of the transformation groupoid ∂Fd /RF ⋊ Fd . It is clear from the definition that X = {[w +∞ ] : w ∈ Fd \ {e}}. For each x ∈ X, consider the following condition. (∗) There is F ∈ [[ϕF ]] such that x is an isolated point of the set of fixed points −n ∞ of F , and both (F n )∞ )n=1 do not uniformly converge to the n=1 and (F constant map y 7→ x on any neighborhood of x. Then it is easy to check that  Y := {x ∈ X : x satisfies the condition (∗)} = [gw +∞ ] : g ∈ Fd , w ∈ F . Now the cardinality of F is recovered as the number of the Fd -orbits in Y .  Remark 6.2. It follows from Matui’s theorem [16, Theorem 3.10] and Theorem 6.1 that the topological full groups of ϕF and ϕF′ are not isomorphic when ♯F 6= ♯F′ . Now consider a one-sided irreducible finite shift σA with K∗ (OA ) ∼ = (Zd , (1, 1, . . . , 1), Zd ). (Such one exists [14, Lemma 3.7] and is unique up to continuously orbit equivalence [14, Theorem 3.6].) Then, thanks to the classification theorem of Kirchberg and Phillips [10, 19], for each nonempty subset F of S, the crossed product C(∂Fd /RF ) ⋊ Fd is isomorphic to the Cuntz–Krieger algebra OA . Thus the Cartan subalgebra C(∂Fd /RF ) ⊂ C(∂Fd /RF ) ⋊ Fd provides a Cartan subalgebra of OA whose spectrum is the Cantor set. On the other hand, the transformation groupoid GA of σA (see [14, Section 2.2] for instance) does not admit a point satisfying the condition (∗) stated in the proof of Theorem 6.1. Thus our Cartan subalgebras are not conjugate to the canonical one C(XA ) ⊂ OA [22, Prop. 4.13] (see also [15, Theorem 5.1]). Acknowledgement. The author would like to thank Hiroki Matui, who turns the author’s interest to amenable quotients of the boundary actions. He also thanks Narutaka Ozawa for helpful discussions on hyperbolic groups and approximation theory. He also thanks Caleb Eckhardt who raised a question about properties of the decreasing intersection of nuclear C∗ -algebras with conditional expectations. Finally, he is grateful to the referee, whose comments and suggestions improve the presentation of the paper. He was supported by Research Fellow of the JSPS (No.257810) and the Program of Leading Graduate Schools, MEXT, Japan. AMBIENT NUCLEAR C∗ -ALGEBRAS 21 References [1] C. Anantharaman-Delaroche, Systèmes dynamiques non commutatifs et moyennabilité. Math. Ann. 279 (1987), 297–315. [2] B. Blackadar, K-theory for operator algebras. Cambridge University Press, Cambridge (1998). [3] N. P. Brown, N. Ozawa, C∗ -algebras and finite-dimensional approximations. Graduate Studies in Mathematics 88. American Mathematical Society, Providence, RI, 2008. xvi+509 pp. [4] J. Cuntz, A class of C∗ -algebras and topological Markov chains II: reducible chains and the Ext-functor for C∗ -algebras. Invent. Math. 63 (1981), 25–40. [5] K. Dykema, Simplicity and the stable rank of some free product C*-algebras. Trans. Amer. Math. Soc. 351 (1999), 1–40. [6] E. G. Effros, U. Haagerup, Lifling problems and local reflexivity for C∗ -algebras. Duke Math. J. 52 (1985), 103–128. [7] E. Ghys, P. de la Harpe, Sur les groupes hyperboliques d’aprés Mikhael Gromov. Progress in Math. 83, (1990), Birkhäuser. [8] U. Haagerup, J. Kraus, Approximation properties for group C∗ -algebras and group von Neumann algebras. Trans. Amer. Math. Soc. 344 (1994), 667–699. [9] G. Kasparov, Hilbert C∗ -modules: Theorems of Stinespring and Voiculescu. J. Operator Theory 4 (1980), 133–150. [10] E. Kirchberg, The classification of purely infinite C∗ -algebras using Kasparov’s theory. Preprint. [11] E. Kirchberg, N. C. Phillips, Embedding of exact C∗ -algebras in the Cuntz algebra O2 . J. reine angew. Math. 525 (2000), 17-53. [12] M. Laca, J. Spielberg, Purely infinite C∗ -algebras from boundary actions of discrete groups. J. reine angew. Math. 480 (1996), 125–139. [13] V. Lafforgue, M. de la Salle, Noncommutative Lp -spaces without the completely bounded approximation property. Duke Math. J. 160 (2011), 71–116. [14] K. Matsumoto, H. Matui, Continuous orbit equivalence of topological Markov shifts and Cuntz– Krieger algebras. Kyoto J. Math. 54 (2014), 863–877. [15] H. Matui, Homology and topological full groups of etale groupoids on totally disconnected spaces. Proc. London Math. Soc. 104 (2012), 27–56. [16] H. Matui, Topological full groups of one-sided shifts of finite type. J. reine angew. Math. 705 (2015), 35–84. [17] N. Ozawa, Amenable actions and exactness for discrete groups. C. R. Acad. Sci. Paris Ser. I Math. 330 (2000), 691–695. [18] N. Ozawa, Weak amenability of hyperbolic groups. Groups Geom. Dyn. 2 (2008), 271–280. [19] N. C. Phillips. A classification theorem for nuclear purely infinite simple C∗ -algebras. Doc. Math. 5 (2000), 49–114. [20] M. Pimsner, D. Voiculescu, K-groups of reduced crossed products by free groups. J. Operator Theory 8 (1982), 131–156 [21] R. T. Powers, Simplicity of the C∗ -algebra associated with the free group on two generators. Duke Math. J. 42 (1975). 151–156. [22] J. Renault, Cartan subalgebras in C∗ -algebras. Irish Math. Soc. Bull. 61 (2008). 29–63. [23] J. Roe, Lectures on coarse geometry. University Lecture Series, vol. 31, American Mathematical Society, Providence, RI, 2003. [24] J. Rosenberg, C. Schochet, The Kunnëth theorem and the universal coefficient theorem for Kasparov’s generalized K-functor. Duke Math. J. 55 (1987), no. 2, 431–474. [25] J. Spielberg, Free product groups, Cuntz–Krieger algebras, and covariant maps. Internat. J. Math. 2 (1991), 457–476. [26] S. M. Srivastava, A course on Borel Sets. Grad. Texts in Math. 180 (1998), Springer. [27] Y. Suzuki, Amenable minimal Cantor systems of free groups arising from diagonal actions. To appear in J. reine angew. Math. arXiv:1312.7098. 22 YUHEI SUZUKI [28] J.-L. Tu, La conjecture de Baum–Connes pour les feuilletages moyennables. K-theory 17 (1999), 215–264. [29] D. Voiculescu, A non-commutative Weyl–von Neumann theorem. Rev. Roumaine Math. Pures Appl. 21 (1976), no. 1, 97–113. [30] J. Zacharias, On the invariant translation approximation property for discrete groups. Proc. Amer. Math. Soc. 134 (2006), 1909–1916. Department of Mathematical Sciences, University of Tokyo, Komaba, Tokyo, 153-8914, Japan Research Institute for Mathematical Sciences, Kyoto University, Kyoto, 6068502, Japan E-mail address: [email protected]
4math.GR
arXiv:1710.10299v1 [math.GR] 27 Oct 2017 SEMI-EXTRASPECIAL GROUPS WITH AN ABELIAN SUBGROUP OF MAXIMAL POSSIBLE ORDER MARK L. LEWIS Abstract. Let p be a prime. A p-group G is defined to be semiextraspecial if for every maximal subgroup N in Z(G) the quotient G/N is a an extraspecial group. In addition, we say that G is ultraspecial if G is semi-extraspecial and |G : G′ | = |G′ |2 . In this paper, we prove that every p-group of nilpotence class 2 is isomorphic to a subgroup of some ultraspecial group. Given a prime p and a positive integer n, we provide a framework to construct of all the ultraspecial groups order p3n that contain an abelian subgroup of order p2n . In the literature, it has been proved that every ultraspecial group G order p3n with at least two abelian subgroups of order p2n can be associated to a semifield. We provide a generalization of semifield, and then we show that every semi-extraspecial group G that is the product of two abelian subgroups can be associated with this generalization of semifield. 1. Introduction Let p be a prime, and let G be a p-group. We say that G is semiextraspecial if for every subgroup N having index p in Z(G), then G/N is an extraspecial group. This definition seems to have originated by Beisiegel in [1]. Also following Beisiegel, we say that a semi-extraspecial group G is ultraspecial if |G′ | = |G : G′ |1/2 . If G is an ultraspecial group, then there is a positive integer n so that |G| = p3n . We will say that G is ultraspecial group of degree n. We will often refer to semi-extraspecial groups as s.e.s. groups. In our recent expository paper, [6], we collect many of the known results regarding semi-extraspecial and ultraspecial groups and present them in a unified fashion. We refer the reader to that paper for background and references for these groups. For this paper, one key result that was presented in [6] is the following result of Verardi that any abelian subgroup of a s.e.s. group G has order at most |G : G′ |1/2 |G′ | (Theorem 1.8 of [8]). Notice that when G is an ultraspecial group, this bound is |G : G′ |. When we mention an abelian subgroup of maximal 2010 Mathematics Subject Classification. 20D15 . Key words and phrases. semi-extraspecial groups, ultraspecial groups, semifields. 1 2 MARK L. LEWIS possible order, we mean an abelian subgroup of G which has order |G : G′ |1/2 |G′ | when G is a s.e.s. group and |G′ | when G is ultraspecial. In the second half of [6], we focused on the case when G is an ultraspecial group with at least two abelian subgroups of order |G : G′ |. That paper gives references to a number of results that show when G is a ultraspecial group that has at least two abelian subgroups of order |G : G′ | which both have exponent p, then G can be identified with a finite semifield of order |G′|. In Section 2, we will give details on the construction of semifield groups and we will detail the relationship between semifield groups and ultraspecial groups with at least two abelian subgroups of the maximal possible order. In the main theorem of this paper, Theorem 3.1, we present a generalization of the construction of semifield groups. We will see that this construction has a number of profound consequences. One application of this construction shows that the class of ultraspecial groups is “large.” This is the content of the following theorem. Theorem 1.1. Let p be an odd prime. If H is a p-group of nilpotence class 2 and exponent p, then there is an ultraspecial group G that has a subgroup isomorphic to H. We also use Theorem 3.1 to construct ultraspecial groups G having exactly one abelian subgroup of order |G : G′ |. We note that our construction is related to Verardi’s method of constructing an ultraspecial group with one abelian subgroup from an ultraspecial p-group with exponent p and having at least two abelian subgroups of order |G : G′ | that appears in Section 4 of [8]. Theorem 1.2. Let p be a prime. If n ≥ 3 is an integer, then there exists an ultraspecial group of order p3n having only one abelian subgroup of order p2n . Also, we will show that every ultraspecial group G with one abelian subgroup of order |G : G′ | is associated with a unique semifield up to isotopism. (We will define isotopism in Section 2.) We also use our construction in a different direction. To generalize semifield groups, we change our view of semifields. Instead of viewing a semifield as a set with two binary operations, we instead view a semifield as a nonsingular map from a direct product of additive group to itself. Because this definition is technical, we do not present it here, but we will give a formal definition in Sections 3. We will then define a generalized nonsingular map where we allow the image to be a different additive group. With this definition we are able to prove the following. SEMI-EXTRASPECIAL GROUPS 3 Theorem 1.3. Let V and W be elementary abelian p-groups of orders pn and pm respectively. If α : V × V → W is a generalized nonsingular map, then we can associate a unique s.e.s. group G = G(α) to α so that |G : G′ | = p2n , |G′ | = pm , G has abelian subgroups A and B of order pn+m so that G = AB, and A and B are elementary abelian p-groups. If p is odd, then G has exponent p. We can also show that every s.e.s. group that is generated by two elementary abelian subgroups can be obtained this way. Theorem 1.4. Let G be a s.e.s. group with |G : G′ | = p2n and |G′ | = pm and exponent p. If G contains elementary abelian subgroups A and B so that G = AB, then there exists a generalized nonsingular map α : V × V → W where V and W are elementary abelian p-groups of orders pn and pm respectively so that G ∼ = G(α). When we modify our construction to incorporate a bilinear map β : V × V → W in addition to the generalized nonsingular map α : V × V → W where V and W are elementary abelian p-groups of orders pn and pm , we obtain a s.e.s. group G = G(α, β) where |G : G′ | = p2n , |G′ | = pm , G has an elementary abelian subgroup A of order pn+m , and when p is odd, G has exponent p. We will show that if G is any s.e.s. group with |G : G′ | = p2n , |G′ | = pm , and exponent p so that G has an abelian subgroup A of order pn+m , then there exist α and β as above so that G ∼ = G(α, β). We will show in Section 8 that ideas of isotopism and anti-isotopism can be extended to these generalized nonsingular maps. In Theorem 5.1 of [4] and Theorem 6.6 of [5] (see also Theorem 9.1 of [6]), it is shown two semifield groups are isomorphic if and only if the semifields are isotopic or anti-isotopic. We will generalize this result as follows. Theorem 1.5. Let V and W be elementary abelian p-groups of order pn and pm respectively where m > n/2, and let α1 , α2 : V × V → W be generalized nonsingular maps. Then G(α1 ) ∼ = G(α2 ) if and only if α1 and α2 are either isotopic or anti-isotopic. Furthermore, in Proposition 4.2 of [4], Lemma 4.3 of [5], and Theorem 3.14 of [8] (see also Theorem 10.1 of [6]), it is proved that a semifield group has more than two abelian subgroups of the maximal order if and only if the semifield that is isotopic to commutative semifield. Translating to generalized nonsingular maps, we will define symmetric maps in Section 5, and we obtain the following result. Theorem 1.6. Let V and W be elementary abelian p-groups of order pn and pm respectively, and let α : V ×V → W be a generalized nonsingular 4 MARK L. LEWIS map. Then G(α) has three distinct abelian subgroups A, B, C so that G = AB = AC = BC if and only if α is isotopic to a symmetric generalized nonsingular map. 2. semifield groups We say (F, +, ∗) is a pre-semifield if (F, +) is an abelian group with at least two elements whose identity is 0 and ∗ is a binary operation so that a ∗ (b + c) = a ∗ b + a ∗ c and (a + b) ∗ c = a ∗ c + b ∗ c for all a, b, c ∈ F and a ∗ b = 0 implies that either a = 0 or b = 0. If F has an identity under ∗, then we say that F is a semifield. Given a (pre)-semifield (F, +, ∗), we can define the semifield group G(F, ∗) to be the group with the set {(a, b, c) | a, b, c ∈ F } where the multiplication is given by (a1 , b1 , c1 )(a2 , b2 , c2 ) = (a1 + a2 , b1 + b2 , c1 + c2 +a1 ∗b2 ). When the multiplication is clear, we will drop the ∗ and just write G(F ) for G(F, ∗). Observe that the subgroups A1 = {(a, 0, c) | a, c ∈ F } and A2 = {(0, b, c) | b, c ∈ F } will be abelian subgroups of G(F ). When |F | is finite, it is not difficult to show that G(F ) will be an ultraspecial group with at least two abelian subgroups of maximal order |F |2 . (See Lemma 3 of [1].) We say that two pre-semifields (F1 , +1 , ∗1 ) and (F2 , +2 , ∗2 ) are isotopic if there exist additive group isomorphisms α, β, γ : F1 → F2 so that γ(a∗1 b) = α(a)∗2 β(b) for all a, b ∈ F1 . It has been shown that being isotopic is an equivalence relation on semifields and pre-semifields, and also, that every pre-semifield is isotopic to some semifield. If ∗ is associative, then F is a field, and when |F | is finite, this semifield is obviously isomorphic to the unique field with order |F |. We say that the associated semifield group G(F ) is the Heisenberg group of order |F |. In particular, we reserve the name Heisenberg group for G(F ) when F is a field. We note that in some places in the literature the name Heisenberg groups is used for G(F ) when F is any semifield. Any semifield that is isotopic to a field will have an associative multiplication, and thus, will be isomorphic to that field. We now suppose that F is an arbitrary (pre)-semifield. The group G(F ) will have more than two abelian subgroups of maximal order if and only if F is isotopic to a commutative semifield this was proved by Verardi as Theorem 3.14 of [8] when p is odd, and by Hiranime as Proposition 4.2 (i) of [4] and Knarr and Stroppel as Lemma 4.3 of [5] for all primes including p = 2. Let F be a (pre)-semifield, then we define ∗op by a ∗op b = b ∗ a. It is not difficult to see that F op = (F, +, ∗op) is a (pre)-semifield. Obviously, if F is commutative, then F = F op . On the other hand, SEMI-EXTRASPECIAL GROUPS 5 it is possible to have F isotopic to F op when F is not isotopic to a commutative semifield. When F is isotopic to F op , we say that F is self-dual. We say that F1 and F2 are anti-isotopic if F1 is isotopic to F2op . It is not difficult to show that F and F op are isotopic if and only if F is anti-isotopic to itself. In Theorem 5.1 of [4] and Theorem 6.6 of [5], it is proved that G(F1 ) and G(F2 ) are isomorphic if and only if F1 and F2 are either isotopic or anti-isotopic. It is quite clear that F and F op are always anti-isotopic, so G(F ) ∼ = G(F op ) whether or not F is self-dual. 3. Generalized semifield groups Let V be a finite additive group. Suppose that α : V × V → V is a biadditive map so that α(v1 , v2 ) = 0 implies either v1 = 0 or v2 = 0. It is not very difficult to see that defining a multiplication ∗α by v1 ∗α v2 = α(v1 , v2 ) will make (V, +, ∗α) a pre-semifield. Conversely, if (F, +, ∗) is a (pre)-semifield, then by defining αF (a, b) = a ∗ b, we see that αF : F × F → F is a biadditive map so that αF (a, b) = 0 implies a = 0 or b = 0. With this in mind, we will say that α is a nonsingular map if α : V × V → V is biadditive so that α(v1 , v2 ) = 0 implies either v1 = 0 or v2 = 0. Suppose that α is a nonsingular map. It is not difficult to see that the property that α(v1 , v2 ) = 0 implies that v1 = 0 or v2 = 0 is equivalent to saying when v1 6= 0 that the kernel of the map v2 7→ α(v1 , v2 ) is 0 and when v2 6= 0 that the kernel of the map v1 7→ α(v1 , v2 ) is 0. This says that when α is a nonsingular map, the map v2 7→ α(v1 , v2 ) is one-to-one when v1 6= 0 and the map v1 7→ α(v1 , v2 ) is one-to-one when v2 6= 0. Since V is finite, this implies that that the map v2 7→ α(v1 , v2 ) is onto when v1 6= 0 and v1 7→ α(v1 , v2 ) is onto when v2 6= 0. In particular, if α : V × V → V is a biadditive map, then α is a nonsingular map if and only if α(v, V ) = V and α(V, v) = V for all 0 6= v ∈ V . Thus, we obtain the following generalization: let V and W be additive groups. We say that α : V × V → W is a generalized nonsingular map if α is biadditive and α(v, V ) = α(V, v) = W whenever v 6= 0 for v ∈ V . Note that when we apply these definitions V and W will be elementary abelian p-groups for some prime p, and so, they may be viewed as vector spaces over the field of order p and we may assume that α is a bilinear map. We now generalize the semifield groups from Section 2 in two ways. First, we replace the semifield with a generalized nonsingular map. Second, we add a second biadditive map β that only involves elements 6 MARK L. LEWIS of the second coordinate. If β : V × V → W is a biadditive map, then we define β(b1 , b2 ) = β(b1 , b2 ) − β(b2 , b1 ) for all b1 , b2 ∈ V . Theorem 3.1. Let p be a prime, let m ≤ n be integers, and let V and W be elementary abelian groups of orders pn and pm respectively viewed additively. Let α : V × V → W be a generalized nonsingular map and let β : V × V → W be a biadditive map. Consider the set G = V × V × W and define a multiplication on G by (a1 , b1 , c1 )(a2 , b2 , c2 ) = (a1 + a2 , b1 + b2 , c1 + c2 + α(a1 , b2 ) + β(b1 , b2 )). Then the following hold: (1) G is a semi-extraspecial group with G′ = Z(G) = {(0, 0, c) | c ∈ W }. (2) [(a1 , b1 , c1 ), (a2 , b2 , c2 )] = (0, 0, α(a1, b2 ) − α(a2 , b1 ) + β(b1 , b2 )). (3) If p is odd, G has exponent p. (4) A = {(a, 0, c) | a ∈ V, c ∈ W } is an abelian subgroup of order pn+m . (5) B = {(0, b, c) | b ∈ V, c ∈ W } is a subgroup of order pn+m . (6) G = AB and A ∩ B = G′ . (7) For an element v ∈ V \ {0}, we have β(u, v) = 0 for all u ∈ V if and only if (0, v, c) ∈ Z(B) for all c ∈ W . In particular, B ≤ CG (0, v, c) if and only if β(u, v) = 0 for all u ∈ V . (8) β(u, v) = 0 for all u, v ∈ V if and only if B is abelian. Proof. It is a not difficult, but somewhat tedious calculation to see that the multiplication is associative. Also, it is not difficult to see that (0, 0, 0) is an identity and (a, b, c)−1 = (−a, −b, −c + α(a, b) + β(b, b)). Thus, G is a group. In addition, one can easily complete the computation to see that conclusion (2) holds. Using conclusion (2), we have that Z(G) ≥ C = {(0, 0, c | c ∈ W } and G′ ≤ C. Note that one of the many conditions equivalent to a p-group G being semi-extraspecial is that G is special and for every element g ∈ G \ G′ and every element z ∈ G′ there exists an element g ′ ∈ G so that [g, g ′] = z (see Theorem 3.1 of [3] or Theorem 5.5 of [6]). Thus, to show that G is semi-extraspecial and that Z(G) = G′ = C, we show for every element g = (a, b, c) ∈ G \ C and every element (0, 0, z) ∈ C that there exists an element g ′ = (a′ , b′ , c′ ) ∈ G so that [g, g ′] = (0, 0, c). Suppose b 6= 0. Since α(V, b) = W , there exists a′ ∈ V so that α(a′ , b) = −z. Taking b′ = 0 and c′ = 0, we obtain [g, g ′] = (0, 0, α(a, 0)−α(a′, b)+β(b, 0)) = (0, 0, 0−(−z)+0) = (0, 0, z). SEMI-EXTRASPECIAL GROUPS 7 Now, assume b = 0. Since α(a, V ) = W , there exists b′ ∈ V so that α(a, b′ ) = z. Taking a′ = 0 and c′ = 0, we see that [g, g ′] = (0, 0, α(a, b′) − α(0, 0) + β(0, b′ )) = (0, 0, z). This proves conclusion (1). We prove that   n (α(a, b) + β(b, b))) (a, b, c) = (na, nb, nc + 2 by induction on n. Observe that n (a, b, c)2 = (2a, 2b, 2c + α(a, b) + β(b, b)). Since  2 = 1, the base case holds. By induction,   n−1 n−1 (α(a, b) + β(b, b))). (a, b, c) = ((n − 1)a, (n − 1)b, (n − 1)c + 2 2 We see that the first and second coordinates of (a, b, c)n will be (n − 1)a + a = na and (n − 1)b + b = nb. The third coordinate of (a, b, c)n will be   n−1 (α(a, b) + β(b, b)) + c + α((n − 1)a, b) + β((n − 1), b). (n − 1)c + 2 Observe that   (n − 1)(n − 2) n−1 α(x, y) = α(x, y) 2 2 and α((n − 1)x, y) = (n − 1)α(x, y) for all x, y. Also,   (n − 1)(n − 2) (n − 1)2 (n − 1)n n . + = = 2 2 2 2 It follows that     n n−1 α(x, y) α(x, y) + α((n − 1)x, y) = 2 2 for all x, y. Using these observations, we determine that the third   n n n coordinate of (x, y, z) is nc + 2 α(a, b) + 2 β(b, b)). When p is odd, we know p divides p2 , and so conclusion (3) holds. It is easy to see that A is an abelian subgroup of G and |A| = |V ||W | = pn+m so this is conclusion (4). Similarly, B is a subgroup of G and |B| = |V ||W | = pn+m yielding conclusion (5). Conclusion (6) is immediate. Notice that (0, v, c) will commute with every element (0, u, c′) ∈ B if and only if β(v, u) = 0 for all u ∈ V . This implies that β(v, u) = β(u, v) for all u ∈ V if and only if (0, v, c) ∈ Z(B) \ Z(G). 8 MARK L. LEWIS This yields conclusion (7). Observe that conclusion (8) is an immediate consequence of conclusion (7).  Given a generalized nonsingular map α : V × V → W and a bilinear map β : V × V → W , we write G(V, W, α, β) for the group G in Theorem 3.1. When V and W are clear, we will write G(α, β) in place of G(V, W, α, β). If β = 0, then A and B will be two abelian subgroups of order |V ||W | in G = G(α, β) whose product is G and whose intersection is G′ . Notice that if V = W , then α is a nonsingular map. If both V = W and β = 0, then G(α, β) is the semifield group associated with the (pre)-semifield given by α. In all cases, we will write G(α) to denote the group G(α, 0). Also, note that this proves Theorem 1.3. If F is a pre-semifield and αF is the associated nonsingular map determined by F , then G(F ) = G(αF ). Thus, we can view the groups G(α, β) as generalizations of semifield groups, and we call them generalized semifield groups. The situation of generalized semifield groups will arise in a number of places, so we set the following hypotheses: Hypothesis 1: Let p be a prime. Let V and W be elementary abelian p-groups of orders pn and pm respectively viewed additively. Let α : V ×V → W be a generalized nonsingular map. Let β : V ×V → W be a biadditive map. Let A and B be the subgroups of G(α, β) that are defined in Theorem 3.1. 4. Proof of Theorem 1.1 In this section, we will prove Theorem 1.1. We will actually prove a stronger result. To do this we need the following well-known definition of Hall. Recall that two groups G and H are isoclinic if there exist isomorphisms a : G/Z(G) → H/Z(H) and b : G′ → H ′ so that [a(g1 Z(G)), a(g2 Z(G))] = b([g1 , g2 ]) for all g1 , g2 ∈ G. It is not difficult to show that isoclinic determines an equivalence relation on groups. It is easy to see that if G and H are isomorphic, then G and H are isoclinic. On the other hand, it is well known that if G and H are two extraspecial groups of the same order, then G and H are isoclinic. Since G and H need not be isomorphic, being isoclinic is weaker than being isomorphic. Let p be an odd prime, and let P be a p-group with a subgroup X so that X is central in P , Z(P ) and P/X are elementary abelian, |X| = pm , |P : X| = pn , and n ≥ m. Take V and W to be vector SEMI-EXTRASPECIAL GROUPS 9 spaces of dimensions n and m respectively over Zp , the field of order p. We can find linear isomorphisms δ : V → P/X and τ : X → W . Since p is odd, we know that 2 has a unique multiplicative inverse in Zp , and we write 2−1 for this element. We define the bilinear map βP : V × V → W by β(v1 , v2 ) = 2−1 τ ([δ(v1 ), δ(v2 )]) for all v1 , v2 ∈ V . Let α be any generalized nonsingular map from V × V to W . Since m ≤ n, we know that there exists such an α. Take G = G(α, βP ), and let B be the subgroup B found in the conclusion of Theorem 3.1. It is not difficult to see that P will be isoclinic to the subgroup B. Using the Universal Coefficients Theorem (see Chapter 5 of [9]), one can show that if P and Q are p-groups with exponent p, then P is isomorphic to Q if and only if P is isoclinic to Q. In particular, in the situation of the previous paragraph, if P has exponent p, then H is isomorphic to B since B necessarily has exponent p. We are now ready to prove Theorem 3.1. We have that H is a p-group with nilpotence class two and exponent p. If |H : Z(H)| = |Z(H)| take P = H and X = Z(H) = Z(P ). If |H : Z(H)| < |Z(H)|, then let A be an elementary abelian group of order |Z(H)|2/|H|. In this case, take P = H × A and X = Z(H) ≤ Z(P ). When |H : Z(H)| > |Z(H)|, we take A to be an elementary abelian group of order |H|/|Z(H)|2. We take P = A × H and X = Z(P ) = A × Z(H). Notice that in all cases, we have |P : X| = |X|. Let V and W be elementary abelian p-groups of order |P : X| = |X|. Finally, let α be a generalized nonsingular map from V × V to W . Using the previous two paragraphs, we see that we now have that H is isomorphic to a subgroup of an ultraspecial group. This proves Theorem 1.1. 5. Complements modulo G′ We now work to determine which choices for β imply that G(α, β) will be the product of two abelian subgroups. We start at the level of complements in a vector space. The work in this section is probably well-known, but include it here to make the argument more selfcontained. Lemma 5.1. Let V be a finite additive p-group for some prime p, let H = V ⊕ V , and let A = {(v, 0) | v ∈ V }. Then the following are true: (1) If f is an additive map from V to V , then Bf = {(f (v), v) | v ∈ V } is a complement for A in H. (2) If C is a complement for A in H, then C = Bf for some additive map f : V → V . 10 MARK L. LEWIS (3) Bf = Bg if and only if f = g, for additive maps f, g : V → V . Proof. It is easy to see that A ∩ Bf = 0 and |Bf | = |B|, so |ABf | = |A||Bf | = pn pn = p2n = |H|. We deduce that H = ABf , and so, Bf is a complement for A in H. Let B = {(0, v) | v ∈ V }. If 0 is the map sending every element of V to 0, then B = B0 , so B is a complement for A in H. We know that every complement for A in H is a transversal for A in H. Let C be a complement for A in H. Then for each element b ∈ B, we see that C ∩ A + b will be a single element. Thus, we can define a function f : V → V so that C ∩ A + b = {(f (v), v)} where b = (0, v). It follows that C = {(f (v), v) | v ∈ V }. Since both (f (v1 ) + f (v2), v1 + v2 ) and (f (v1 + v2 ), v1 + v2 ) lie in C and in the same coset of A, we deduce that f (v1 ) + f (v2 ) = f (v1 + v2 ), and hence, f is an additive map. We conclude that C = Bf . Obviously, if f = g, then Bf = Bg . On the other hand, if Bf = Bg , then (f (v), v) and (g(v), v) are in the coset A + (0, v) and lie in the same transversal, so they must be equal. This implies that f (v) = g(v) for all v ∈ V , and so, f = g.  We now apply Lemma 5.1 to the quotient of G = G(α, β) by its center. If we assume Hypothesis 1, then G/G′ = A/G′ ⊕ B/G′ , so we can apply the notation of Lemma 5.1 to G/G′ . Observe that A/G′ = {(v, 0, 0)G′ | v ∈ V } and B/G′ = {(0, v, 0)G′ | v ∈ V }. If f is an additive map from V to V , we can then define Bf = {(f (v), v, 0) | v ∈ V }. It is not difficult to see that Bf will be a subgroup of G of order pn+m . Also, it is not difficult to see that Bf /G′ will correspond to the subgroup labeled as Bf when Lemma 5.1 is applied to G/G′ , and we will use the same notation to denote both the subgroup of G and its quotient in G/G′ . We believe the meaning of the notation will always be clear from context. In this next lemma, we gather some facts about Bf as a subgroup of G. Lemma 5.2. Assume Hypothesis 1 with G = G(α, β). Then the following are true: (1) If f : V → V is an additive map, then G = ABf and A ∩ Bf = G′ . (2) If D ≤ G satisfies G = AD and A ∩ D = G′ , then D = Bf for some unique additive map f : V → V . (3) Finally, [(f (v1 ), v1 , w1), (f (v2 ), v2 , w2)] = = (0, 0, α(f (v1), v2 ) − α(f (v2 ), v1 ) + β(v1 , v2 )) SEMI-EXTRASPECIAL GROUPS 11 for all elements v1 , v2 ∈ V, w1 , w2 ∈ W determines the commutation for elements in Bf where f : V → V is an additive map. Proof. Observe that the first two conclusions follow from Lemma 5.1 applied in G/G′ . The third conclusion arises from Theorem 3.1 (2).  Notice that Lemma 5.2 (2) implies that if G = G(α, β), then there is a bijection between the set of additive maps from V to V and comp(G, A) = {D ≤ G | G = DA, D ∩ A = G′ } defined by f 7→ Bf , the subgroup of G. The map 0V : V → V defined by 0V (v) = 0 is an additive map from V to V , and B0V = B from above. Thus, when β = 0, then B0V is abelian. When α : V ×V → W is a biadditive map, we say that α is symmetric if α(v1 , v2 ) = α(v2 , v1 ) for all v1 , v2 ∈ V . Observe that if F is a semifield, then F is commutative if and only if αF is symmetric. Recall that a semifield group G(F ) has more than two abelian subgroups if and only if F is isotopic to a commutative semifield. Notice that if we consider G(F ) = G(αF ) in view of Theorem 3.1 and fix the subgroup A as in that theorem, this would say that comp(G(F ), A) contains at least two abelian subgroups if and only if F is isotopic to a commutative semifield. We know that distinct abelian subgroups of maximal order in a semifield group must have a product that is the whole group. (See Theorem 1.9 of [8].) Hence, if B and C are distinct abelian subgroups that lie in comp(A), then G = BC and B ∩ C = G′ . When we consider G = G(α) where α is a generalized nonsingular map and A is the subgroup found in Theorem 3.1, we know that comp(G, A) contains at least one abelian subgroup. In this next corollary, we show if α is symmetric, then there will be more than one and their product will be G. Note that if |W |2 ≤ |V |, then we do not know that the product of abelian subgroups of order |V ||W | is necessarily G, so this result obtains a stronger conclusion than just that comp(G, A) has at least two abelian members. We will obtain a converse later. Corollary 5.3. Assume Hypothesis 1 with β = 0. If α is symmetric and G = G(α), then comp(G, A) contains at least two abelian subgroups B and C that satisfy G = BC and B ∩ C = G′ . Proof. Define 1V : V → V by 1V (v) = v for all v ∈ V . It is easy to see that 1V is an additive map. We see that α(1V (v1 ), v2 ) = α(v1 , v2 ) = α(v2 , v1 ) = α(1V (v2 ), v1 ) for all v1 , v2 ∈ V . Since β = 0, we have β = 0, and we can use Lemma 5.2 (3) to see that C = B1V will be abelian. We previously noted that 12 MARK L. LEWIS B = B0V is abelian. It is easy to see that B ∩ C = G′ so G = BC. This gives the two subgroups in comp(G, A) that have the properties stated.  We now can identify all of the choices for β that imply that G(α, β) has an abelian subgroup B ∈ comp(G, A). Lemma 5.4. Assume Hypothesis 1 with G = G(α, β). Then there exists an abelian subgroup C ∈ comp(G, A) if and only if there exists an additive map f : V → V so that β(v1 , v2 ) = α(f (v2 ), v1 ) − α(f (v1 ), v2 ) for all v1 , v2 ∈ V . If this occurs, then C = Bf . Proof. First, suppose there exists an additive map f : V → V so that β(v1 , v2 ) = α(f (v2 ), v1 ) − α(f (v1 ), v2 ) for all v1 , v2 ∈ V . This implies that α(f (v1 ), v2 ) − α(f (v2 ), v1 ) + β(v1 , v2 ) = 0 for all v1 , v2 ∈ V . Notice we may apply Lemma 5.2 (1) and (3) to see that this implies that Bf is abelian and G = ABf , so we have C = Bf . Conversely, suppose that C is abelian so that G = AC and A ∩ C = ′ G . By Lemma 5.2 (2), it follows that C = Bf for some additive map f : V → V . Since C is abelian, we use Lemma 5.2 (3) to see that α(f (v1), v2 ) − α(f (v2 ), v1 ) + β(v1 , v2 ) = 0 for all v1 , v2 ∈ V , and thus, β(v1 , v2 ) = α(f (v2 ), v1 ) − α(f (v1 ), v2 ) for all v1 , v2 ∈ V .  6. Cosets in the group of alternating maps Let V be an additive group, and let add(V ) be the set of all additive maps from V to V . Note that using pointwise addition, we can make add(V ) a group. When V is an elementary abelian p-group of order 2 pn , it is not difficult to see that |add(V )| = (pn )n = p(n ) . Let V and W be additive groups. Recall that a biadditive map γ : V × V → W is alternating if γ(v, v) = 0 for all v ∈ V . When |W | is odd, it is not difficult to see that γ being alternating is equivalent to γ(v1 , v2 ) = −γ(v2 , v1 ) for all v1 , v2 ∈ V . We let alt(V, W ) be the set of all alternating biadditive maps γ : V × V → W . Recall that if β is any biadditive map, then β ∈ alt(V, W ). Also, it is not difficult to see that if β ∈ alt(V, W ), then β = 2β ∈ alt(V, W ). When |W | is odd and β ∈ alt(V, W ), we see that β = 0 if and only if β = 0. Using pointwise addition, we see that alt(V, W ) is a group. When V is elementary abelian of order pn and W is elementary abelian of order pm , we deduce that |alt(V, W )| = pmn(n−1)/2 . We continue to let V and W be additive groups. Suppose that α is a generalized nonsingular map from V × V to W . For each f ∈ add(V ), we define φα (f ) : V × V → W by φα (f )(v1 , v2 ) = α(f (v1), v2 ) − α(f (v2 ), v1 ). Observe that φα (f ) ∈ alt(V, W ), so φα : SEMI-EXTRASPECIAL GROUPS 13 add(V ) → alt(V, W ). Also, note that φα (f + g) = φα (f ) + φα (g), so φα is a group homomorphism. In particular, φα (add(V )) is a subgroup of alt(V, W ). Recall that Lemma 5.2 (2) implies that if G = G(α, β), then there is a bijection between alt(V ) and comp(G, A). Furthermore, using Lemma 5.2 (3), commutation in Bf is given by φα (f ) + β. Lemma 6.1. Assume Hypothesis 1. Then the following are true: (1) If β1 is a biadditive map from V × V to W that satisfies β1 ∈ φα (add(V )) + β, then G(α, β) ∼ = G(α, β1). (2) Let G = G(α, β). Then comp(G, A) contains abelian subgroups if and only if β ∈ φα (add(V )). (3) If β ∈ φα (add(V )), then G(α, β) ∼ = G(α) and the number of abelian subgroups in comp(G, A) equals |ker(φα )| where G = G(α). Proof. Suppose β1 ∈ φα (add(V )) + β. Then there is a map f ∈ add(V ) so that β1 = φα (f )+β. We take A and B as above in G(α, β) = G, and the corresponding subgroups in G(α, β1 ) are A and Bf by Lemma 5.2. Since G = AB = ABf ∼ = G(α, β1 ), we have the desired isomorphism for conclusion (1). Conclusion (2) follows immediately from Lemma 5.4. For conclusion (3), we know that if f ∈ add(V ), then Bf ∈ comp(G, A) is abelian if and only if φα (f ) = 0 by Lemmas 5.2 and 5.4. This gives a bijection between abelian elements of comp(G, A) and elements of ker(φα ).  Notice that Lemma 6.1 (1) shows that if β and β1 lie in the same coset of ker(φα ) in alt(V, W ), then G(α, β) and G(α, β1 ) are isomorphic. If β ∈ φα (add(V )), then this implies that G(α, β) is isomorphic to G(α, 0). In particular, this generalizes Lemma 5.4 and we see that the number of abelian subgroups of G(α, 0) whose product with A is G equals |ker(φα )| by Lemma 6.1 (3). If W = V and α is commutative, Verardi showed in Corollary 5.9 of [8] that the number of abelian complements of A equals the size of the middle nucleus of the semifield (V, α). The middle nucleus of (V, α) is the set {v ∈ V | α(α(u, v), w) = α(u, α(v, w)), ∀u, w ∈ V }. Thus, it seems likely that there is a connection between ker(φα ) and this middle nucleus of (V, α), but at this time, we have not determined this connection. 14 MARK L. LEWIS When W has order p, we know that G = G(α, β) will be an extraspecial group of order p2n+1 where |V | = pn . This implies in this 2 case that φα (add(V )) = alt(V, W ). Notice that |add(V )| = pn and |alt(V, W )| = pn(n−1)/2 in this case. Since n2 − n(n − 1)/2 = n(n + 1)/2, we have |ker(φα )| = pn(n+1)/2 . This shows that in G there are pn(n+1)/2 abelian subgroups whose product with A gives G. This implies that G has at least 1+pn(n+1)/2 abelian subgroups of order pn+1 in G. However, it is not difficult to see when n ≥ 2 that there exist abelian subgroups of order pn+1 in G whose product with A is not all of G, so this does not give a complete count of all of the abelian subgroups of G of order pn+1 . Let V and W be elementary abelian p-groups of order pn and pm respectively where p is a prime and n ≥ m are positive integers. Let α : V × V → W be a generalized nonsingular map. If φα (add(V )) < alt(V, W ), then there will exist a biadditive map β ∈ alt(V, W ) \ φα (add(V )). Applying Lemma 6.1 (2), we see that comp(G(α, β), A) contains no abelian subgroups, and so there exist no abelian subgroups of G whose product with A is G(α, β). We now show when m ≥ 3 that there exist s.e.s. groups G where |G : G′ | = p2n , |G′ | = pm , and G has an abelian subgroup A of order pm+n whose product with any other abelian subgroup of G is proper in G. When m > n/2, we can use a result of Verardi to see that A will be the only abelian subgroup of order pm+n in G. Notice that the following result gives Theorem 1.2 when n = m. Corollary 6.2. For every prime p and for all integers n ≥ m ≥ 3, there exists an s.e.s. groups G where |G : G′ | = p2n , |G′ | = pm , and G has an abelian subgroup A of order pm+n whose product with any other abelian subgroup of G is proper in G. When m > n/2, we have that A will be the only abelian subgroup of order pm+n in G. Proof. For every prime p and integers n ≥ m ≥ 3, we need to find a generalized nonsingular map α : V × V → W so that φα (add(V )) < alt(V, W ). When either m ≥ 4 or n ≥ 4 and m = 3, we have that n(n − 1)m/2 > n2 , so |add(V )| < |alt(V, W )| and hence, any α will work. When m = 3 = n, we see that |add(V )| = p9 = |alt(V, W )|. Hence, it suffices to find α so that |ker(φα )| > 1. To see that there exists an α in all cases, let F be the field of order pn . Take V to be the additive group of F , write U for a subgroup of V of order pn−m , and set W = V /U. We define α by α(v1 , v2 ) = v1 v2 + U where the multiplication is the multiplication from F . It is easy to see that α will be a nonsingular map. If n = m = 3, then U = 0 and W = V . We saw earlier that |ker(φα )| equals the size of the middle nucleus of F , but SEMI-EXTRASPECIAL GROUPS 15 since F is a field, the middle nucleus is F , so |ker(φα )| = |V | = p3 > 1. This proves the corollary.  As can be seen by the proof of Corollary 6.2, when either m ≥ 4 or n > m = 3, we see that for every generalized nonsingular map α, that φα (add(V )) < alt(V, W ). When n = m = 3, we can find for p = 5, p = 7, and probably larger primes α’s that have |φα(add)| = |alt(V, W )|, so not all α’s will work. Interestingly, we can find when m = 2 and n = 4 an α so that |φα (add)| < |alt(V, W )|. Given a generalized nonsingular map α : V × V → W , we have shown that if β̂1 and β̂2 are in the same coset φα (add(V )) in alt(V, W ), then G(α, β1 ) and G(α, β2) are isomorphic, and if β̂1 does not lie in φα (add(V )), then G(α, β1 ) is not isomorphic to G(α, 0). However, in general if β̂1 and β̂2 lies in different cosets of φα (add(V )) it need not be the case that G(α, β1 ) and G(α, β2 ) are not isomorphic. In particular, when p = 3 and α is the nonsingular map coming from the field of order 33 , so |V | = 33 . In this case, it is not difficult to see that |alt(V, V )| = 39 and |φα (add(V ))| = 36 . Hence, there are 27 cosets in this case. Josh Maglione has written a program in the computer algebra system Magma [2] that computes the 27 cosets and the associated generalized semifield groups using the package eMagma [7]. Also, using Magma and eMagma, Josh was able to show that the 26 generalized semifield groups that are not the semifield group are all isomorphic. On the other hand, when |V | = 34 , we can find semifields where the associated generalized semifield groups are not all isomorphic. 7. Obtaining generalized nonsingular maps from groups We have seen how to construct s.e.s. groups with an abelian subgroup of maximal possible order. We now show that every s.e.s. group with an abelian subgroup of maximal possible order can be be obtained this way. We begin by determining the generalized nonsingular map for such a group. Lemma 7.1. Let G be a semi-extraspecial group where |Z(G)| = pm and |G : Z(G)| = p2n . Suppose A is an abelian subgroup of order pn+m . Then the following are true: (1) The map [, ] : A/Z(G) ×G/A → Z(G) defined by [aZ(G), gA] = [a, g] is well-defined and bilinear. (2) For every element a ∈ A\G′ and every element z ∈ Z(G), there exists an element g ∈ G such that [a, g] = [aZ(G), gA] = z. 16 MARK L. LEWIS (3) For every element g ∈ G \ A, we have G = ACG (g). Furthermore, for every element z ∈ Z(G), there exists an element a ∈ A so that [a, g] = [aZ(G), gA] = z. Proof. Fix elements a ∈ A and g ∈ G. Suppose z ∈ Z(G) and b ∈ A, then [az, gb] = [a, gb]z [z, gb] = [a, gb] = [a, b][a, g]b = [a, g] where since A is abelian we have [a, b] = 1 and [a, g] ∈ G′ = Z(G) implies [a, g]b = [a, g]. This shows that the map is well-defined. Suppose a1 , a2 ∈ A, then [a1 a2 , g] = [a1 , g]a2 [a2 , g] = [a1 , g][a2 , g] and if g1 , g2 ∈ G, then [a, g1 g2 ] = [a, g2 ][a, g1 ]g2 = [a, g2 ][a, g1 ] = [a, g1 ][a, g2 ]. Thus, the map is bilinear. Since G is semi-extraspecial, for every element a ∈ A \ G′ and z ∈ Z(G), there exist an element g ∈ G so that [a, g] = z. Suppose for g ∈ G \ A. We claim that G = ACG (g). If m = n, then A = CG (a) for every a ∈ A \ Z(G). It follows that CG (g) ∩ A = G′ , and since pn = |G : CG (g)| = |A : G′ |, we conclude that G = ACG (g). We may assume that m < n. Observe that [A, g] = [A, hg, Z(G)i] is a subgroup of Z(G) = G′ , and so, it is a normal subgroup of G. We claim that Z(G) = [A, g]. If [A, g] < Z(G), then hA, gi/[A, g] will be an abelian subgroup of G/[A, g]. Notice that G/[A, g] is a semiextraspecial group and |hA, gi/[A, g]| = p|A : [A, g]| = ppn |G′ : [A, g]|. We saw in the Introduction that the maximal size of abelian subgroup of G/[A, g] is |G : G′ |1/2 |G′ : [A, g]| = pn |G′ : [A, g]|, so this is a contradiction. It follows that Z(G) = [A, g]. Notice that the map a 7→ [a, g] is a surjective homomorphism from A to Z(G) whose kernel is CA (g). This implies that |A : CA (g)| = |Z(G)| = pm . Since |G : CG (g)| = pm and CA (g) = CG (g) ∩ A, we conclude that G = ACG (g). This proves the claim. Fix the element z ∈ Z(G). Since G is semi-extraspecial, there exists an element x ∈ G so that [x, g] = z. We can write x = ab for some a ∈ A and b ∈ CG (g). We have [x, g] = [ab, g] = [a, g]b [b, g] = [a, g] where the last equality holds since b ∈ CG (g). We conclude that [a, g] = [x, g] = z as desired.  Note that if G is the group G(α, β) considered in Theorem 3.1, then [(a, 0, 0), (a′, b, 0)] = (0, 0, α(a, b)) for all a, a′ , b ∈ V . Corollary 7.2. Let G be a s.e.s. group where |Z(G)| = pm and |G : Z(G)| = p2n . Suppose A is an abelian subgroup of order pn+m . Let V be an elementary abelian p-group of order pn and W an elementary abelian p-group of order pm . Let δ, σ, τ be isomorphisms so that δ : V → A/Z(G), σ : V → G/A, and τ : Z(G) → W . If αG,A : V × V → W is defined by αG,A (v, w) = τ ([δ(v), σ(w)]), then αG,A is a generalized nonsingular map from V to W . SEMI-EXTRASPECIAL GROUPS 17 Let B be a subgroup of G so that A ∩ B = Z(G) and G = AB, and let η : V → B/Z(G) be the map obtained by composing σ with the natural map from G/A to B/Z(G). Assume p is odd. Define βB : V × V → W by βB (v1 , v2 ) = 1/2(τ ([η(v1 ), η(v2 )])). Then G is isoclinic to G(αG,A , βB ). If A and B have exponent p, then G is isomorphic to G(αG,A , βB ). Proof. Fix w ∈ W and fix v ∈ V . Let z = τ −1 (w). First, we have δ(v) = aZ(G) for some a ∈ A. By Lemma 7.1 (2), there exists g ∈ G so that [aZ(G), gA] = z. Let u = σ −1 (gA). Then αG,A (v, u) = τ ([δ(v), σ(u)]) = τ ([aZ(G), gA]) = τ (z) = w. This shows that αG,A (v, V ) = W . Next, we have σ(v) = hA for some h ∈ G. By Lemma 7.1 (3), there exists b ∈ A so that [bZ(G), hA] = z. Let u′ = δ −1 (bZ(G)). Then, αG,A (u′ , v) = τ ([δ(u′ ), σ(v)]) = τ ([bZ(G), hA]) = τ (z) = w. This shows that αG,A (V, v) = W . This proves that αG,A is a generalized nonsingular map. Since A ∩ B = Z(G), we see that G/Z(G) = A/Z(G) × B/Z(G). Thus, the map γ : (v, w, z) 7→ (δ(v), η(w) is an isomorphism from G(αG:A , βB )/Z(G(αG:A, βB )) → A/Z(G) × B/Z(G). We claim that (γ, τ −1 ) is an isoclinism from G(αG:A , βB ) to G. We have [γ(v1 , w1 , z1 ), γ(v2 , w2 , z2 )] = [(δ(v1 ), η(w1 )), (δ(v2 ), η(w2))] = [δ(v1 ), η(w2)] + [η(w1), δ(v2 )] + [η(w1 ), η(w2)] = τ (αG,A (v1 , w2 )) − τ −1 (αG,A (v2 , w1 )) + [η(w1 ), η(w2 )]. On the other hand, −1 [(v1 ,w1 ,z1), (v2 ,w2 ,z2)] = (0, 0, αG,A (v1 , w2 )−αG,A (v2 , w1 )+βB (w1 , w2)). Notice that 1 1 βB (w1 , w2 ) = βB (w1 , w2 )−βB (w2 , w1 ) = [η(w1), η(w2 )]− [η(w2 ), η(w1)]. 2 2 Since [η(w2 ), η(w1 )] = −[η(w1 ), η(w2 )], we get the required equality for the isoclinism.  Notice that if B is abelian, then βB = 0 and so G(αA , βB ) ∼ = G(αA ). Hence, Theorem 1.4 may be viewed as a corollary of Corollary 7.2. 18 MARK L. LEWIS 8. Two abelian subgroups whose product is G Notice that αG,A in Corollary 7.2 depends on the choice of δ, σ, and τ . With this in mind, we make the following definition. Let α1 and α2 be generalized nonsingular maps from V × V to W . We say that α1 and α2 are isotopic if there exist isomorphisms a, b : V → V and c : W → W so that α2 (a(v1 ), b(v2 )) = c(α1 (v1 , v2 )) for all v1 , v2 ∈ V . Note that when α1 and α2 are nonsingular maps and we translate to the associated semifields this is the normal definition of isotopism of semifields. It is not difficult to see that this definition of isotopism will yield an equivalence relation on generalized nonsingular maps. In light of Corollary 7.2, αG,A is uniquely defined up to isotopism. We now show that isotopic generalized nonsingular maps yields isomorphisms of generalized semifield groups. Lemma 8.1. Let V and W be elementary abelian p-groups of order pn and pm respectively where p is a prime and m ≤ n are positive integers. Let α1 and α2 be generalized nonsingular maps from V × V to W , and let (a, b, c) be an isotopism from α1 to α2 . If β1 and β2 are biadditive maps from V × V to W that satisfy β2 (b(v1 ), b(v2 )) = c(β1 (v1 , v2 )) for all v1 , v2 ∈ V , then the map γ : G(α1 , β1 ) → G(α2 , β2 ) defined by γ(u, v, w) = (a(u), b(v), c(w)) is an isomorphism of groups. Proof. It is easy to see that γ will be a bijection. Consider g1 = (u1, v1 , w1 ), g2 = (u2 , v2 , w2 ) ∈ G(α1 , β1 ). Observe that γ(g1 g2 ) equals (a(u1 + u2 ), b(v1 + v2 ), c(w1 + w2 + α1 (u1 , v2 ) + β1 (v1 , v2 ))). On the other hand, γ(g1 )γ(g2 ) equals (a(u1) + a(u2), b(v1) + b(v2), c(w1) + c(w2)+α2(a(u1), b(v2 ))+β2 (b(v1 , b(v2)))). The equality of these two equations follows since a and b are isomorphisms and in the third coordinate, we use the fact c is an isomorphism along with the fact that α1 and α2 are isotopic and the equation relating β1 and β2 .  We next see that isoclinisms preserve the generalized nonsingular map coming from an abelian subgroup of maximal possible order. Lemma 8.2. Let G1 and G2 be s.e.s. groups with |Gi : G′i | = p2n and |G′i | = pm where p is a prime and m ≤ n are positive integers. Suppose A1 is an abelian subgroup of G1 of order pn+m . Suppose (σ, δ) is an isoclinism from G1 to G2 . If A2 /G′2 = σ(A1 /G′1 ), then A2 is an abelian subgroup of G2 of order pn+m . Furthermore, αG1 ,A1 and αG2 ,A2 are isotopic. SEMI-EXTRASPECIAL GROUPS 19 Proof. Since (σ, δ) is the isoclinism from G1 to G2 , we know that σ : G1 /Z(G1 ) → G2 /Z(G2) and δ : G′1 → G′2 so that [σ(g), σ(h)] = δ([g, h]) for all g, h ∈ G1 . Notice that if a, b ∈ A, then [σ(a), σ(b)] = δ([a, b]) = δ(1) = 1. It follows when A2 /G′2 = σ(A1 /G′1 ) that A2 must be an abelian subgroup of G2 . Let V and W be elementary abelian groups of orders pn and pm respectively. Fix isomorphisms η1 : V → A1 /Z(G1 ), ζ1 : V → G1 /A1 , and κ1 : Z(G1 ) → W . Define η2 : V → A2 /Z(G2) by η2 (v) = σ(η1 (v)) for all v ∈ V . Since σ is a homomorphism and maps A1 to A2 , it follows that σ maps cosets of A1 to cosets of A2 . Thus, we can define ζ2 : V → G2 /A2 by ζ2 (v) = σ(ζ1 (v)). Also, we define κ2 : Z(G2 ) → W by κ2 (z2 ) = κ1 (δ −1 (z2 )). We see that αG2 ,A2 (v1 , v2 ) = κ2 ([η2 (v1 ), ζ2 (v2 )]) = κ1 (δ −1 ([σ(η1 (v1 )), σ(ζ1(v2 ))]) = = κ1 (δ −1 (δ([η1 (v1 ), ζ( v2 )]))) = κ1 ([η1 (v1 ), η2 (v2 )]) = αG1 ,A1 (v1 , v2 ). We can now conclude that αG1 ,A1 and αG2 ,A2 are isotopic.  We saw in Corollary 5.3 that if α is a commutative generalized nonsingular map, then G(α, 0) has an abelian subgroup C that satisfies G = AC = BC and A ∩ C = B ∩ C = G′ . We now prove a sort of converse. Note that this is Theorem 1.6. Lemma 8.3. Assume Hypothesis 1 with β = 0. Then G = G(α) has an abelian subgroup C so that G = AC = BC and A ∩ C = B ∩ C = G′ if and only if α is isotopic to an associative generalized nonsingular map. Proof. Suppose α is isotopic to the associative generalized nonsingular map α1 . By Lemma 8.1, we see that G(α) and G(α1 ) are isomorphic. Applying Corollary 5.3, we see that the subgroup C exists as stated. This proves the desired conclusion. Conversely, suppose that a group C exists as given in the statement. By Lemma 5.2, there is an additive map f : V → V so that C = Bf . Since C ∩ B = G′ , it is not difficult to see that f (v) 6= 0 for all v ∈ V \ {0}. This implies that f is an isomorphism from V to V . Using Lemma 5.2, we see since C is abelian that α(f (v1 ), v2 ) = α(f (v2 ), v1 ) for all v1 , v2 ∈ V . Define αf by αf (v1 , v2 ) = α(f (v1 ), v2 ). It is not difficult to see that αf is a symmetric nonsingular map and that αf is isotopic to α.  Note that Lemmas 6.1 and 8.3 together can be viewed as a generalization of Theorem 3.14 of [8], Proposition 4.2 (i) of [4], and Lemma 4.3 of [5] which proved that a semifield group had at least three abelian subgroups of the maximal possible order if and only if the semifield 20 MARK L. LEWIS is isotopic to a commutative semifield. Combining Lemmas 6.1 and 8.3 with Corollary 5.3, we see that a generalized nonsingular map α is commutative if and only if ker(φα ) = 1. We now look at the relationship between the generalized nonsingular maps arising from different abelian subgroups. With this in mind, we say that two generalized nonsingular maps α1 , α2 : V × V → W are anti-isotopic if there exist linear isomorphisms a, b : V × V and c : W → W so that α2 (b(v2 ), a(v1 )) = c(α1 (v1 , v2 )) for all v1 , v2 ∈ V . Observe that if G is a s.e.s. group with abelian subgroups A and B such that G = AB and A ∩ B = G′ , then αG,A and αG,B are anti-isotopic. To see this, we take a and b to be the identity maps and c to be the map taking every element to its negative. Notice that if α2 is anti-isotopic to both α1 and α3 , then α1 and α3 are isotopic. The following should be compared to Proposition 3.2 (2) of [5]. Lemma 8.4. Suppose α1 , α2 : V ×V → W are generalized nonsingular maps. If (a, b, c) is an anti-isotopism from α1 to α2 , then the map G(α1 ) → G(α2 ) given by (v, w, z) 7→ (b(w), a(v), c(α1 (v, w) − z)) is an isomorphism. Proof. Let f be our map and let g1 = (v1 , w1 , z1 ) and g2 = (v2 , w2 , z2 ). Then f (g1g2 ) = (b(w1 +w2 ), a(v1 +v2 ), c(α1 (v1 +v2 , w1 +w2 )−(z1 +z2 + α1 (v1 , w2))). On the other hand, f (g1 )f (g2 ) = (b(w1 ) + b(w2 ), a(v1 ) + a(v2 ), c(α1 (v1 , w1 ) − z1 ) + c(α1 (v2 , w2 ) − z2 ) + α2 (b(w1 ), a(v2 ))). Notice that α1 (v1 +v2 , w1 +w2 ) = α1 (v1 , w1 )+α1 (v1 , w2 )+α1 (v2 , w1 )+α(v2, w2 ), so that third coordinate of f (g1 g2 ) = c(α1 (v1 , w1 )) + c(α1 (v2 , w1 )) + c(α1 (v2 , w2)) − c(z1 ) − c(z2 ). Since α2 (b(w1 ), a(v2 )) = c(α1 (v2 , w1)), we see that the third coordinate of f (g1)f (g2 ) is c(α1 (v1 , w1 ) − c(z1 ) + c(α1 (v2 , w2) − c(z2 ) + c(α1 (v2 , w1 ), and we see we have the equality needed for f to be an isomorphism.  Let G be a s.e.s. group with |G : G′ | = p2n and |G′ | = pm . Define A(G) to be the set of abelian subgroups of G with order pm+n . We attach a graph to A(G) as follows. We take A(G) to be the set of vertices. We put an edge between A and B if G = AB and A ∩ B = G′ . It is not difficult to see that if there is an edge between A and B, then αG,A and αG,B are anti-isotopic. It follows that if A and B are the same connected component of this graph, then αG,A and αG,B are either isotopic or anti-isotopic. Notice that if m > n/2, then we know that A(G) is a complete graph. With this in mind, the following result which is Theorem 1.5 is immediate. Corollary 8.5. Suppose α1 , α2 : V × V → W are generalized nonsingular maps and that G(α1 ) and G(α2 ) are isomorphic. If A(G) has SEMI-EXTRASPECIAL GROUPS 21 one connected component, then α1 and α2 are either isotopic or antiisotopic. In particular, if m > n/2, then α1 and α2 are either isotopic or anti-isotopic. We close by noting that Corollary 8.5 generalizes a similar result for semifield groups that was proved as Theorem 5.1 of [4] and Theorem 6.6 of [5]. References [1] B. Beisiegel, Semi-extraspezielle p-Gruppen, Math. Z. 156 (1977), 247-254. [2] W. Bosma, J. Cannon, and C. Playoust. The Magma algebra system I: The user language, J. Symbolic Comput. 24 (1997), 235-265. [3] D. Chillag and I. D. MacDonald, generalized Frobenius groups, Israel J. Math. 47 (1984), 111-122. [4] Y. Hiramine, Automorphisms of p-groups of semifield type, Osaka J. Math. 20 (1983), 735-746. [5] N. Knarr and M. J. Stroppel, Heisenberg groups, semifields, and translation planes, Beitr. Algebra Geom. 56 (2015), 115-127. [6] M. L. Lewis, Semi-extraspecial groups, submitted. h arXiv:1709.03857 i [7] J. Maglione and J. B. Wilson, Experimental Multilinear Algebra Group, version 1.2.2, GitHub, 2017. With contributions from Peter A. Brooksbank, https://github.com/algeboy/eMAGma. [8] L. Verardi, Gruppi semiextraseciali di esponente p, Ann. Mat. Pura Appl. 148 (1987), 131-171. [9] R. B. Warfield, Jr., “Nilpotent groups,” Lecture Notes in Mathematics, Vol. 513, Springer-Verlag, Berlin-New York, 1976. Department of Mathematical Sciences, Kent State University, Kent, OH 44242 E-mail address: [email protected]
4math.GR
TIME-VARYING LINEAR MODEL APPROXIMATION: APPLICATION TO THERMAL AND AIRFLOW BUILDING SIMULATION Thierry BERTHOMIEU, Harry BOYER Laboratoire de Génie Industriel – Université de la Réunion ABSTRACT Considering the natural ventilation, the thermal behavior of buildings can be described by a linear time varying model. In this paper, we describe an implementation of model reduction of linear time varying systems. We show the consequences of the model reduction on computing time and accuracy. Finally, we compare experimental measures and simulation results using the initial model or the reduced model. The reduced model shows negligible difference in accuracy, and the computing time shortens. INTRODUCTION Nowadays, most of the numerical tools dedicated to simulating the thermal behavior of buildings, consider a lot of physical phenomena : airflow, humidity transfers… They can solve miscellaneous problems for very different users : designers, architecs or researchers. They handle complex multizones buildings and automatically generate the very detailed numeric models. The complexity of the problems grows simultaneously with the calculation possibilities. Actually, the power of the available computers is a limitation. Thus, to reduce the computing time is still an open challenge. After spacial discretisation, the thermal model of a building is a large linear system. Robust and accurate methods of model reduction are available for timeinvariant systems (Menezo,1998)(Déqué, 1997). But, in the particular case of airflow taken into account, the thermal model becomes a time varying system because of the varying airflow rates between zones. CODYRUN is a software dedicated to thermal simulation, including natural ventilation and humidity transfers (Boyer, 1996, 1998, 1999)(Garde, 2000). The paper is centered on the integration of balanced reduction routines within CODYRUN, in the particular context of a time varying model. The effectiveness of the approach is demonstrated by its application to the simulation of a multi-zones building. THERMAL AND AIRFLOW MODELS A building may be decomposed into several zones. The thermal behavior of each zone is homogeneous, and described by a differential system : - Equations with constant coefficients describe the evolution of the field of temperatures in walls and glazings. - One equation describes the evolution of the dry air temperature. Its coefficients are not constant if airflow rates are time dependant. Written in matrix form, the following linear equation describes the thermal behaviour of a zone : T = A T + B u (1) Where T is the vector of the nodal temperatures u is the vector of the applied sollicitations. This system is time-invariant if the convective coefficients are not time dependant and if airflow is neglected or constant. Thereafter, we will take account of the airflow, and A(t) and B(t) will be time-varying matrices. T = A(t) T + B(t)u (2) In CODYRUN, B(t) and u was framed together as a single vector B(t)u. In order to implement the classical numerical schemes of reduction, our first step was to dissociate B(t) and u in the standard form (2). We chose for u the following frame : - meteorological sollicitations - short wave flux densities on envelopes surfaces - air contribution - variables for thermal coupling between zones The order the system (2) is usually about a few dozen. Users often need to calculate the variables (temperatures, heat power) every hour, over a season or a year : model reduction may efficiently reduce the computing time. Notice that the matrix Dr must preserve the static gain of the original system. Indeed, at every step of time, CODYRUN solves apart two models (thermal and airflow). The two modules are coupled, thanks to an iterative algorithm. The coupling variables are the air mass flows. We have implemented in CODYRUN balanced reduction tool that is available in the numerical library SLICOT (Varga, 2002). The airflow model is non linear and based on pressure variables. It take into account the principal driving effects : the wind and the thermal buoyancy. It allows the determination of the airflow network in the building (Boyer, 1999). Reduction of the thermal model has no incidence on the equations of the airflow model. Our approach for reducing the computing time is to reduce the order of the thermal model. Balanced model reduction was originally developed for timeinvariant models. In the next section, we briefly describe the balanced model reduction process. BALANCED REDUCTION OF THERMAL MODEL Equation (2) is transformed by a change of coordinates to the new state space formulation (Gille, 1984) :  = [M-1AM] X + [M-1B] u X T = [M ] X Where M is the coordinate transformation matrix, X(t) is the new state vector, u(t) the input and T(t) the output of the system. The problem is to extract a subsystem of this full order system which works on that part of the state space which is most involved in the input-output behavior of the original system. Two matrices (called the observability Gramian and the controllability Gramian) enable to identify which part of the state space is controlled most strongly and which part is most strongly observed. We describe in the next sections several methods for adapting this numerical tool to our time-varying case. MODEL REDUCTION OF TIMEVARYING SYSTEMS To compute the reduced order model requires more operations than to solve the original system. Thus, considering a time-varying system, model reduction cannot be achieved at each step of time. We found two solutions for this problem : conditional model reduction When the global model of the building is not very sensitive to airflow (closed building, known flow rates …), the reduced order model remains a good approximation during a large time of simulation. We need a criterion of precision in order to test the validity of the initial model. This criterion determines the updating of the reduced order model when necessary. For exemple, we compute the reduced order model, when variation of one inter-zone airflow exceeds a given tolerance. For implementation, notice that the numerical differentiation algorithm uses Xr(k-1) – the state vector at previous step of time - to compute the current vector Xr(k). Every time the model is updated, Xr(k-1) is no longer valid and must be estimated from sollicitations u(k-1) and temperatures T(k-1) at previous step. We have T (k-1) = Cr Xr(k-1) + Dr u(k-1) Thus, minimize || Cr Xr(k-1) - (T (k-1) - Dr u(k-1) ) ||2 give Xr(k-1). This is a classical least squares problem. It is possible to construct a coordinate transformation matrix M so that the two gramians become equal and diagonal. The diagonal terms are the Hankel singular values which evaluate the observability and the controllability of each state variable. The resulting state model is a “balanced realization”. separate model reduction The reduced order model is obtained by extracting a subsystem from the balanced realization (Moore, 1981)(Tombs, 1987) : In the differential system (2), let X1 be the vector of temperatures of the envelopes and X2 the dry temperature of the zone.  r = Ar Xr + Br u X  1  X  = 2 X T = Cr Xr + Dr u In our case, most of the equations of the thermal system have constant coefficients. Thus, we previously separate the time-invariant part. This method yields a time-invariant sub-system which can be reduced only one time.   A11   A21(t) A12   A 22(t)  Xr(t) is the reduced state vector. A11, A12, et B1 are constants,  X1    +  X 2    B1   u B 2 (t)   A21, A22, et B2 are time-varying terms. To obtain the equation of evolution of X1 we extend the input vector u with an estimation X̂ 2 of X2  1 = A11 X1 +  B1 X  u  A12     X̂ 2    (3) Model reduction of this time-invariant linear system presents no difficulty and is computed only once. To obtain the evolution equation of X2 we extend the input vector u with an estimation X̂1 of X1  2 = A22(t).X2 +  B2(t) X  Reduced model  Dr r X u X̂2 Xr ∫ Br X1 Cr Ar   (4)  u  A 21(t)     X̂1    It is necessary to refine the estimation X̂ 2 , in an iterative way : the result X2 of the equation (4) is returned in input of the equation (3), until || X̂ 2 - X2|| <  given. 2 X u X̂1 [B2|A21] X2 ∫ A22 Figure 1 represents the partitioned system Figure 2 represents the algorithm using the reduced order model. Figure 2 : reduced model u X̂2 REDUCTION ORDER Time-invariant system 1 X [B1|A12] ∫ X1 A 11 A building is composed of thermal zones, which are described by systems of different orders ni. We have to choose a set of reduced order nri. The computing time and the precision of the simulation depend on this choice. Notice that the computing time of a simulation is about : 2 X u X̂1 [B2|A21] X2 ∫ A 22 tg = t f  c.  nr i 3 every zones where tf and c are constants. Balanced reduction have explicit error bounds : Let [G] and [Gr] be the transfer-function matrices of the original and reduced systems respectively. We have|| [G] – [Gr] ||∞ ≤ 2 * (nr + 1 + … + n) Figure 1 : partition of state variables where 1 ≥ 2 … ≥ n ≥ 0 are the Hankel singular values. Thus nr >  can be a useful criterion to automatically select a reduced order nr. If the same precision is required for every zones, the same tolerance  can be applied to every system. Figure 3 shows the performances of the reduced order model of a 5-zones closed building. For some values of the tolerance , the figure shows : The dwelling was uninhabited. Various measurement sequences were organized : windows closed, then partially open, during the extreme climatic period of the tropical summer. - the computing time of a simulation (relatively to the computing time with the initial system) - the reduction error, ie the difference between the temperatures computed with the initial model and the reduced model (standard deviation) computing time (%) reduction error (°C) 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 0.2 0.4 0.6 0.8  = minimal Hankel singular value Fig. 3 : Performance of reduced model A compromise time/precision appears and we find no necessity of a severe reduction. EXPERIMENTATION Our goal is not to validate the software CODYRUN. This validation is the purpose of many previous works (Garde, 2001). We will compare measured and simulated temperatures in order to relativize the differences between the initial model and the reduced model. Figure 4 shows a typical dwelling of collective building in Reunion Island. It includes three bedrooms and a living room. A measurement campaign took place in this dwelling, for experimental confrontations of CODYRUN (Lauret, 2001). A weather station placed on the roof of the dwelling has recorded the meteorological datas (every 30 mn) : outdoor dry air temperature, sky temperature, relative humidity, global and diffuse horizontal radiation, speed and direction of the wind. In each room, dry air and resultant temperature (in different locations), relative humidity, some surface temperatures and global radiation for the west side were measured. Fig. 4 : Instrumented dwelling We consider two sequences: Closed building All the doors and windows of the dwelling were closed and sealed, during 7 days. The building being closed, airflow model is of no use. The thermal model is time invariant. The model of the dwelling is composed of five thermal zones. (the 3 bedrooms, the living room, the kitchen + bathroom + toilets). Figure 5 shows the evolution of the dry temperature in the living room. The simulation is carried out by using the initial model. The figure shows the modelling error : the maximum difference between measures and the simulation results is about +/- 1.2 °C, and the standard deviation is 0.55 °C. living room temperature (°C) measures It consists of 5 systems, orders are 38, 45, 48, 69 and 27. simulation 34 - using the separate model reduction. 33 The order of the reduced models are automatically selected with a tolerance e = 0.4. Orders of the reduced systems become respectively 7, 6, 6, 11 and 5. 32 31 30 29 28 Hours 24 48 72 96 120 Because of the iterative procedure, the reduction of the computing time is less important than noticed previously. Computing time is divided by 2. 144 - using the conditional reduction. Fig. 5 : comparison measures / initial model On figure 6 we compare a simulation results during 3 days, carried out by using first the initial model and then the reduced model. Actually, this method is very slow for this case. Indeed, because of the natural airflow, the reduced model is very often computed. The 3 simulated curves are very close. The orders of the reduced models are automatically selected with a tolerance  = 0.2. Orders become Computing time is divided by 3. living room temperature (°C) Reduction errors (ie. the maximum difference between initial model result and reduced model result) are not significant, less than 0.2 °C. initial model reduced model 34 living room temperature (°C) The initial model consists of 5 sub-systems (i.e. 5 zones), orders are 33, 36, 37, 68 and 28. measures initial model separate reduction conditional reduction 37 36 35 34 33 32 Hours 24 48 33 32 simulations. 31 CONCLUSION 30 Hours 24 48 72 Fig. 6 : comparison initial model / reduced model We implemented balanced model reduction within a software dedicated to thermal behavior and airflow simulation. Open building. Hence, we are able to reduce half the global computing time required for a simulation. The sliding door in the living room and window of bedroom 2 were open outwards, the sliding door between bedroom 2 and living room was open. Thus, air could circulate through the dwelling Then, we compared experimental measures and simulation results using the full order model or the reduced model. The comparison shows very small reduction errors relatively to modelling errors. In this case the thermal model is a time varying model. We used the separate model reduction method that we previously described. Therefore, we have shown the effectiveness of balanced reduction tools for time varying systems. On Figure 7 we compare dry temperature measured in the living room, and simulations carried out by using different methods : - using the initial model. REFERENCES BOYER H., LAURET P., ADELARD A., MARA T.A. Building ventilation : a pressure airflow model computer generation and elements of validation, Energy and Buildings, 29, 283-292, 1999 BOYER H., Garde F., Gatina J.C., Brau J. A multi model approach of thermal building simulation for design and research purposes. Energy and Buildings 28 (1):71-79, 1998 BOYER H. & al , Thermal building simulation and computer generation of nodal model, Building and Environment, Vol. 31, n° 3, 207-214, 1996 DÉQUÉ F., DELILLE S., DAUTIN S.. Réduction d’un système linéaire et invariant par la technique de Moore. Application à la thermique du bâtiment, Int Journ. Of Thermal Science, (prev. Revue Générale de Thermique), 36, 170-179, 1997. GARDE F., Validation de codes de simulation thermo-aéraulique du complexe bâtiment/systèmes de climatisation. Application à la conception termique des bâtiments. Mémoire pour l’obtention du grade de Docteur Habilité à Diriger des Recherches, 18 décembre 2001 GARDE F., BOYER H., CELAIRE R. 2000. Elaboration d’un label de conception thermique des bâtiments dans les départements d’outremer français. Annales du BTP 2 : 27-40 ISSN 1270-9840, avril 2000 GILLE JC, CLIQUE JM, Systèmes linéaires et équations d’état. EYROLLES 1984 LAURET A.J.P. & AL, A validation methodology aid for improving a thermal building model : how to account for diffuse radiation in a tropical climate, Energy and Buildings, (33), 711-718, 2001. MENEZO C, Contribution à la modélisation du comportement thermique de bâtiments par couplage de modèles réduits, Thèse INSA Lyon, 1998 MOORE B.C., Principal component analysis in linear system : controllability, observability and model reduction. IEEE Trans. Autom. Control, AC-26:1732, 1981 TOMBS M.S. AND POSTLETHWAITE I. Truncated balanced realization of stable, nonminimal state-space systems. Int. J. Control, Vol. 46, pp. 1319-1330, 1987 VARGA, A. New numerical software for model and controller reduction. SLICOT Working Note SLWN2002-5, June 2002.
5cs.CE
arXiv:1612.02184v3 [cs.CV] 17 Jan 2018 Saliency Driven Image Manipulation Roey Mechrez Technion Eli Shechtman Adobe Research Lihi Zelnik-Manor Technion [email protected] [email protected] [email protected] Abstract Have you ever taken a picture only to find out that an unimportant background object ended up being overly salient? Or one of those team sports photos where your favorite player blends with the rest? Wouldn’t it be nice if you could tweak these pictures just a little bit so that the distractor would be attenuated and your favorite player will stand-out among her peers? Manipulating images in order to control the saliency of objects is the goal of this paper. We propose an approach that considers the internal color and saliency properties of the image. It changes the saliency map via an optimization framework that relies on patch-based manipulation using only patches from within the same image to maintain its appearance characteristics. Comparing our method to previous ones shows significant improvement, both in the achieved saliency manipulation and in the realistic appearance of the resulting images. 1. Introduction Saliency detection, the task of identifying the salient and non-salient regions of an image, has drawn considerable amount of research in recent years, e.g., [14, 18, 22, 33, 35]. Our interest is in manipulating an image in order to modify its corresponding saliency map. This task has been named before as attention retargeting [24] or re-attentionizing [27] and has not been explored much, even though it could be useful for various applications such as object enhancement [25, 27], directing viewers attention in mixed reality [26] or in computer games [3], distractor removal [13], background de-emphasis [30] and improving image aesthetics [15, 31, 34]. Imagine being able to highlight your child who stands in the chorus line, or making it easier for a person with a visual impairment to find an object by making it more salient. Such manipulations are the aim of this paper. Image editors use complex manipulations to enhance a particular object in a photo. They combine effects such as increasing the object’s exposure, decreasing the background exposure, changing hue, increasing saturation, or blurring the background. More importantly, they adapt the manipu- (a) Input image (b) Input saliency map (c) Manipulated image (d) Manipulated saliency map Figure 1: Our saliency driven image manipulation algorithm can increase or decrease the saliency of a region. In this example the manipulation highlighted the bird while obscuring the leaf. This can be assessed both by viewing the image before (a) and after (c) manipulation, and by the corresponding saliency maps (b),(d) (computed using [22]). lation to each photo – if the object is too dark they increase its exposure, if its colors are too flat they increase its saturation etc. Such complex manipulations are difficult for novice users that often do not know what to change and how. Instead, we provide the non-experts an intuitive way to highlight objects. All they need to do is mark the target region and tune a single parameter, that is directly linked to the desired saliency contrast between the target region and the rest of the image. An example manipulation is presented in Figure 1. The approach we propose makes four key contributions over previous solutions. First, our approach handles multiple image regions and can either increase or decrease the saliency of each region. This is essential in many cases to achieve the desired enhancement effect. Second, we produce realistic and natural looking results by manipulating the image in a way that is consistent with its internal characteristics. This is different from many previous methods that enhance a region by recoloring it with a preeminent color that is often very non-realistic (e.g., turning leaves to cyan and goats to purple). Third, our approach provides the user with an intuitive way for controlling the level of enhancement. This important feature is completely missing from all previous methods. Last, but not least, we present the first benchmark for object enhancement that consists of over 650 images. This is at least an order of magnitude larger than the test-sets of previous works, that were satisfied with testing on a very small number of cherry-picked images. The algorithm we propose aims at globally optimizing an overall objective that considers the image saliency map. A key component to our solution is replacing properties of image patches in the target regions with other patches from the same image. This concept is a key ingredient in many patch-bases synthesis and analysis methods, such as texture synthesis [11], image completion [1], highlighting irregularities [5], image summarization [29], image compositing and harmonization [9] and recently highlighting non-local variations [10]. Our method follows this line of work as we replace patches in the target regions with similar ones from other image regions. Differently from those methods, our patch-to-patch similarity considers the saliency of the patches with respect to the rest of the image. This is necessary to optimize the saliency-based objective we propose. A key observation we make is that these patch replacements do not merely copy the saliency of the source patch to the target location as saliency is a complex global phenomena (similar idea was suggested in [7] for saliency detection). Instead, we interleave saliency estimation within the patch synthesis process. In addition, we do not limit the editing to the target region but rather change (if necessary) the entire image to obtain the desired global saliency goal. we propose a new quantitative criteria to assess performance of saliency editing algorithms by comparing two properties to previous methods: (i) The ability to manipulate an image such that the saliency map of the result matches the user goal. (ii) The realism of the manipulated image. These properties are evaluated via qualitative means, quantitative measures and user studies. Our experiments show a significant improvement over previous methods. We further show that our general framework is applicable to two other applications: distractor attenuation and background decluttering. 2. Related Work Attention retargeting methods have a mutual goal – to enhance a selected region. They differ, however, in the way the image is manipulated [15, 25, 27, 30, 31]. We next briefly describe the key ideas behind these methods. A more thorough review and comparison is provided in [24]. Some approaches are based solely on color manipula- tion [25, 27]. This usually suffices to enhance the object of interest, but often results in non-realistic manipulations, such as purple snakes or blue flamingos. Approaches that integrate also other saliency cues, such as saturation, illumination and sharpness have also been proposed [15, 26, 30, 31]. While attempting to produce realistic and aesthetic results, they do not always succeed, as we show empirically later on. Recently Yan et al. [34] suggested a deep convolutional network to learn transformations that adjust image aesthetics. One of the effects they study is Foreground Pop-Out, which is similar in spirit to object saliency enhancement. Their method produces aesthetic results, however, it requires intensive manual labeling by professional artists in the training phase and it is limited to the labeled effect used by the professional. 3. Problem Formulation Our Object Enhancement formulation takes as input an image I, a target region mask R and the desired saliency contrast ∆S between the target region and the rest of the image. It generates a manipulated image J whose corresponding saliency map is denoted by SJ . We pose this task as a patch-based optimization problem over the image J. The objective we define distinguishes between salient and non-salient patches and pushes for manipulation that matches the saliency contrast ∆S. To do this we extract from the input image I two databases of patches of size w×w: D+ = {p; SI (p) ≥ τ + } of patches p with high saliency and D− = {p; SI (p) ≤ τ − } of patches p with low saliency. The thresholds τ + and τ − are found via our optimization (explained below). To increase the saliency of patches ∈ R and decrease the saliency of patches ∈ / R we define the following energy function: E(J, D+ , D− ) = E + (J, D+ ) = E+ + E− + λ · E∇ X min+ D(q, p) q∈R E − (J, D− ) = X q ∈R / E ∇ (J, I) = (1) p∈D min D(q, p) p∈D − k∇J − ∇Ik2 where D(q, p) is the sum of squared distances (SSD) over {L, a, b} color channels between patches q and p. The role of the third term, E ∇ , is to preserve the gradients of the original image I. The balance between the color channels and the gradient channels is controlled by λ. Recall, that our goal in minimizing (1) is to generate an image J with saliency map SJ , such that the contrast in saliency between R and the rest of the image is ∆S. The key to this lies in the construction of the patch sets D+ and Algorithm 1 Saliency Manipulation 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: Input: Image I; object mask R; saliency contrast ∆S. Output: Manipulated image J. Initialize τ + , τ − and J = I. while kψ(SJ , R) − ∆Sk >  * do 1. Database Update → Increase τ + and decrease τ − . 2. Image Update → Minimize (1) w.r.t. J, holding D+ ,D− fixed. end while Fine-scale Refinement * the iterations also stopped when the τ + and τ − stop changing between subsequent iterations. D− . The higher the threshold τ + the more salient will be the patches in D+ and in return those in R. Similarly, the lower the threshold τ − the less salient will be the patches in D− and in return those outside of R. Our algorithm performs an approximate greedy search over the thresholds to determine their values. To formulate mathematically the affect of the user control parameter ∆S we further define a function ψ(SJ , R) that computes the saliency difference between pixels in the target region R and those outside it: ψ(SJ , R) = mean{SJ ∈ R} − mean{SJ ∈ / R} βtop βtop (2) and seek to minimize the saliency-based energy term: E sal = kψ(SJ , R) − ∆Sk (3) For robustness to outliers we only consider the βtop (= 20%) most salient pixels in R and outside R in the mean calculation. 4. Algorithm Overview The optimization problem in (1) is non-convex with respect to the databases D+ , D− . To solve it, we perform an approximate greedy search over the thresholds τ + , τ − to determine their values. Given a choice of threshold values, we construct the corresponding databases and then minimize the objective in (1) w.r.t. J, while keeping the databases fixed. Pseudo-code is provided in Algorithm 1. Image Update: Manipulate J to enhance the region R. Patches ∈ R are replaced with similar ones from D+ , while, patches ∈ / R are replaced with similar ones from D− . Database Update: Reassign the patches from the input image I into two databases, D+ and D− , of salient and nonsalient patches, respectively. The databases are updated at every iteration by shifting the thresholds τ + , τ − , in order to find values that yield the desired foreground enhancement and background demotion effects (according to ∆S). Fine-scale Refinement: We observed that updating both the image J and the databases D+ , D− , at all scales, does not contribute much to the results, as most changes happen already at coarse scales. Similar behavior was observed by [29] in retargeting and by [1] in reshuffling. Hence, the iterations of updating the image and databases are performed only at coarse resolution. After convergence, we continue and apply the Image Update step at finer scales, while the databases are held fixed. Between scales, we down-sample the input image I to be of the same size as J, and then reassign the patches from the scaled I into D+ and D− using the current thresholds. In our implementation we use a Gaussian pyramid with 0.5 scale gaps, and apply 5-20 iterations, more at coarse scales and less at fine scales. The coarsest scale is set to be 150 pixels width. 5. Detailed Description of the Algorithm Saliency Model Throughout the algorithm when a saliency map is computed for either I or J we use a modification of [22]. Because we want the saliency map to be as sharp as possible, we use a small patch size of 5 × 5. In addition, we omit the center prior which assumes higher saliency for patches at the center of the image. We found it to ambiguate the differences in saliency between patches, which might be good when comparing prediction results to smoothed ground-truth maps, but not for our purposes. We selected the saliency estimation of [22] since its core is to find what makes a patch distinct. It assigns a score∈[0, 1] to each patch based on the inner statistics of the patches in the image, which is a beneficial property to our method. Image Update In this step we minimize (1) with respect to J, while holding the databases fixed. This resembles the optimization proposed by [9] for image synthesis. It differs, however, in two important ways. First, [9] consider only luminance gradients, while we consider gradients of all three {L, a, b} color channels. This improves the smoothness of the color manipulation, preventing generation of spurious color edges, like those evident in Figure 2c. It guides the optimization to abide to the color gradients of the original image and often leads to improved results (Figure 2d). As was shown in [9], the energy terms in (1) can be optimized by combining a patch search-and-vote scheme and a discrete Screened Poisson equation that was originally suggested by [4] for gradient domain problems. At each scale, every iteration starts with a search-and-vote scheme that replaces patches of color with similar ones from the appropriate patch database. For each patch q ∈ J we search for the Nearest Neighbor patch p. Note, that we perform two separate searches, for the target region in D+ and for the background in D− . This is the second difference from [9] where a single search is performed over one source region. (a) Input image I (b) Mask R the most salient patches in D+ and the most non-salient in D− . This, however, could lead to non-realistic results and might not match the user’s input for a specific saliency contrast ∆S. To find a solution which considers realism and the user’s input we seek the maximal τ − and minimal τ + that minimize the saliency term E sal . At each iteration we continue the search over the thresholds by gradually updating them: + τn+1 − τn+1 (c) Without color gradients (d) With color gradients Figure 2: Chromatic gradients. A demonstration of the importance of chromatic gradients. (c) When not using color gradients - artifacts appear: orange regions on the flutist’ hat, hands and face. (d) By solving the screened Poisson equation on all three channels we improve the smoothness of the color manipulation, stopping it from generating spurious color edges, and the color of the flute is more natural looking. To reduce computation time the databases are represented as two images: ID+ = I ∩ (SI ≥ τ + ) and ID− = I ∩ (SI ≤ τ − ). The search is performed using PatchMatch [1] with patch size 7×7 and translation transformation only (we found that rotation and scale were not beneficial). In the vote step, every target pixel is assigned the mean color of all the patches that overlap with it. The voted color image is then combined with the original gradients of image I using a Screened Poisson solver to obtain the final colors of that iteration. We fixed λ = 5 as the gradients weight. Having constructed a new image J, we compute its saliency map SJ to be used in the database update step explained next. Database Update The purpose of the database update step is to search for the appropriate thresholds that split the patches of I into salient D+ and non-salient D− databases. Our underlying assumption is that there exist threshold values that result in minimizing the objective E sal of (3). Recall that the databases are constructed using two thresholds on the saliency map SI such that D+ = {p; SI (p) ≥ τ + } and D− = {p; SI (p) ≤ τ − }. An exhaustive search over all possible threshold values is nontractable. Instead, we perform an approximate search that starts from a low value for τ + and a high value for τ − and then gradually increases the first and reduces the second until satisfactory values are found. Note, that D+ and D− could be overlapping if τ + < τ − . The naive thresholds τ + ≈ 1, τ − ≈ 0, would leave only = τn+ + η · kψ(SJ , R) − ∆Sk (4) = τn− (5) − η · kψ(SJ , R) − ∆Sk where R is the inverse of the target region R. Since the values of the thresholds are not bounded, we trim them to be in the range of [0, 1]. Convergence is declared when E sal = kψ − ∆Sk < , i.e., when the desired contrast is reached. If convergence fails the iterations are stopped when the thresholds stop changing between subsequent iterations. In our implementation η = 0.1 and  = 0.05. An important property of our method is that if τ − = 1 (or very high) and τ + = 0 (or very low) the image would be left unchanged as the solution where all patches are replaced by themselves will lead to a zero error of our objective energy function (1). Robustness to parameters The only parameter we request the user to provide is ∆S which determines the enhancement level. We argue that this parameter is easy and intuitive to tune as it directly relates to the desired saliency contrast between the target region and the background. We used a default value of ∆S = 0.6, for which convergence was achieved for 95% of the images. In only a few cases the result was not aesthetically pleasing and we used other values in the range [0.4, 0.8]. Throughout the paper, if not mentioned otherwise, ∆S = 0.6. An additional parameter is λ, which was fixed to λ = 5 in our implementation. In practice, we found that for any value λ > 1 we got approximately the same results, while for λ < 1 the manipulated images tend to be blurry (mathematical analysis can be found in [4], since our λ is equivalent to that of the screened Poisson). Convergence and speed Our algorithm is not guaranteed to reach a global minima. However we found that typically the manipulated image is visually plausible, and pertains a good match to the desired saliency. It takes around 2 minutes to run our algorithm on a 1000 × 1000 image – the most time demanding step of our method is solving the screened Poisson equation at each iteration. Since our main focus was on quality we did not optimize the implementation for speed. Significant speed-up could be achieved by adopting the method of [12]. As was shown by [9] replacing these fast pyramidal convolutions with our current solver, will reduce run-time from minutes to several seconds. 6. Empirical Evaluation To evaluate object enhancement one must consider two properties of the manipulated image: (i) the similarity of its saliency map to the user-provided target, and, (ii) whether it looks realistic. Through these two properties we compare our algorithm to HAG [15], OHA [25], and WSR [31], that were identified as top performers in [24]. 1 . We start by providing a qualitative sense of what our algorithm can achieve in Figure 9. Many more results are provided in the supplementary, and we encourage the reader to view them. Comparing to OHA, it is evident that our results are more realistic. OHA changes the hue of the selected object such that its new color is unique with respect to the color histogram of the rest of the image. This often results in unrealistic colors. The results of WSR and HAG, on the other hand, are typically realistic since their manipulation is restricted not to deviate too much from the original image in order to achieve realistic outcomes. This, however, comes at the expense of often failing to achieve the desired object enhancement altogether. The ability of our approach to simultaneously reduce and increase saliency of different regions is essential in some cases, e.g. Figure 9, rows 1 and 4. In addition, it is important to note that our manipulation latches onto the internal statistics of the image and emphasizes the objects via a combination of different saliency cues, such as color, saturation and illumination. Examples of these complex effects are presented in Figure 9, rows 2, 6 and 7, respectively. A new benchmark: To perform quantitative evaluation we built a corpus of 667 images gathered from previous papers on object enhancement and saliency [2, 8, 13, 16, 20, 25] as well as images from MS COCO [19]. Our dataset is the largest ever built and tested for this task and sets a new benchmark in this area. Our dataset, code and results are publicly available 2 . Enhancement evaluation: To measure how successful a manipulated image is, we do the following. We take the user provided mask as the ground-truth saliency map. We then compute the saliency map of the manipulated image and compare it to the ground-truth. To provide a reliable assessment we use five different salient object detection methods: MBS [35], HSL [33], DSR [18], PCA [22] and MDP[17], each based on different principles (patch based, CNN, geodesic distance etc.). The computed saliency maps are compared to the ground-truth using two commonly-used metrics for saliency evaluation: (i) Pearsons-CorrelationCoefficient (CC) which was recommended by [6] as the best option for assessing saliency maps, and, (ii) Weighted F1 Code for WSR and HAG is not publicly available, hence we used our own implementation that led to similar results on examples from their papers. This code publicly available for future comparisons in our webpage. For OHA we used the original code. 2 http://cgm.technion.ac.il/people/Roey/ Figure 3: Enhancement evaluation: The bars represent the (right) Correlation-Coefficient (CC) and (left) the Weighted F-beta (WFB) [23] scores obtained when comparing the ground-truth masks with saliency maps computed using five different saliency estimation algorithms (see text). The longer the bar, the more similar the saliency maps are to the ground-truth. It can be seen that the saliency maps of our manipulated images are consistently more similar to the ground-truth. Figure 4: Realism evaluation. Realism scores obtained via a user survey (see text for details). The curves show the fraction of images with average score greater than Realism score. The Area-Under-Curve (AUC) values are presented in the legend. Our manipulated images are ranked as more realistic than those of OHA and similar to those of WSR and HAG. this is while our enhancement effects are more robust, as shown in Figure 9. beta (WFB) [23] which was shown to be a preferred choice for evaluation of foreground maps. The bar plots in Figure 3 show that the saliency maps of our manipulated images are more similar to the groundtruth than those of OHA, WSR and HAG. This is true for both saliency measures and for all five methods for saliency estimation. Realism: As mentioned earlier, being able to enhance a region does not suffice. We must also verify that the manipulated images look plausible and realistic. We measure this via a user survey. Each image was presented to human participants who were asked a simple question: “Does the image look realistic?” The scores were given on a scale of [1-9], where 9 is ’definitely realistic’ and 1 is ’definitely (a) Input Image (b) ∆S = 0.4 (c) ∆S = 0.6 (d) ∆S = 0.8 Figure 5: Controlling the level of enhancement. (Top) (a) Input image. (b,c,d) The manipulated image J with ∆S = 0.4, 0.6, 0.8, respectively. (Bottom) the corresponding saliency maps. As ∆S is increased, so does the saliency contrast between the foreground and the background. As mask, the user marked the rightmost house and its reflection on the water. unrealistic’. We used Amazon Mechanical Turk to collect 20 annotations per image, where each worker viewed only one version of each image out of five. The survey was performed on a random subset of 20% of the data-set. Figure 4 shows for each enhancement method the fraction of images with average score larger than a realism score ∈ [1, 9] and the overall AUC values. OHA results are often non-realistic, which is not surprising given their approach uses colors far from those in the original image. Our manipulated images are mostly realistic and similar to WSR and HAG in the level of realism. Recall, that this is achieved while our success in obtaining the desired enhancement effect is much better. Controlling the Level of Enhancement: One of the advantages of our approach over previous ones is the control we provide the user over the degree of the manipulation effect. Our algorithm accepts a single parameter from the user, ∆S, which determines the level of enhancement. The higher ∆S is, the more salient will the region of interest become, since our algorithm minimizes E sal , i.e., it aims to achieve ψ(SJ , R) = ∆S. While we chose ∆S = 0.6 for most images, another user could prefer other values to get more or less prominent effects. Figure 5 illustrates the influence ∆S on the manipulation results. The user-provided mask: In our dataset, the mask was marked by users to define a salient object in the scene. In order to use our method on a new image the user is required to mark the region that input region. Note that similarly to other imaging tasks, such as, image completion, compositing, recoloring and warping, the definition of the target region is up to the user to determine and is not part of the method. To facilitate the selection the user can utilize interactive methods such as [21, 28, 32] to easily generate region-of-interest masks. 6.1. Other Applications Since our framework allows both increasing and decreasing of saliency it enables two additional applications: (i) Distractor Attenuation, where the target’s saliency is decreased, and (ii) Background Decluttering, where the target is unchanged while salient pixels in the background are demoted. A nice property of our approach is that all that is required for these is using a different mask setup, as illustrated in Figure 6. (a) (b) (c) Figure 6: Mask setups. Illustration of the setups used for: (a) object enhancement, (b) distractor attenuation and (c) decluttering. We increase the saliency in red, decrease it in blue and apply no change in gray. Distractor Attenuation: The task of getting rid of distractors was recently defined by Fried et al. [13]. Distractors are small localized regions that turned out salient against the photographer’s intentions. In [13] distractors were removed entirely from the image and the holes were filled by inpainting. This approach has two main limitations. First, it completely removes objects from the image thus changing the scene in an obtrusive manner that might not be desired by the user. Second, hole-filling methods hallucinate data and sometimes produce weird effects. Instead, we propose to keep the distractors in the image while reducing their saliency. Figure 7 presents some of our results and comparisons to those obtained by inpainting. We succeed to attenuate the saliency of the distractors, without having to remove them from the image. (a) Example 1 (b) Example 2 (c) Example 3 (d) Example 4 (e) Inpainting 1 (f) Inpainting 2 Figure 7: Distractor Attenuation. (a)-(d) Top: Input images. The distractors were the balloon, the red flag, the shiny lamp and the red roof. Bottom: our manipulated images after reducing the saliency of the distractors. (e)-(f) Top: Zoom in on our result. Bottom: Zoom in on the inpainting result by Adobe Photoshop showing typical artifacts of inpainting methods. (a) Input image (b) Manipulated image (c) Input image (d) Manipulated image (e) Masks Figure 8: Background DeCluttering. Often in cluttered scenes one would like to reduce the saliency of background regions to get a less noisy image. In such cases it suffices to loosely mark the foreground region as shown in (e), since the entire background is manipulated. In (a,b) saliency was reduced for the boxes on the left and red sari on the right. In (c,d) the signs in the background were demoted thus drawing attention to the bride and groom. Background Decluttering: Reducing saliency is also useful for images of cluttered scenes where one’s gaze dynamically shifts across the image to spurious salient locations in the background. Some examples of this phenomena and how we attenuate it are presented in Figure 8. This scenario resembles that of removing distractors, with one main difference. Distractors are usually small localized objects, therefore, one could potentially use inpainting to remove them. Differently, when the background is cluttered, marking all the distractors could be tedious and removing them would result in a completely different image. Our approach easily deals with cluttered background. The user is requested to loosely mark the foreground region. We then leave the foreground unchanged and manipulate only the background, using D− to automatically decrease the saliency of clutter pixels. The optimization modifies only background pixels with high saliency, since those with low saliency are represented in D− and therefore are matched to themselves. 7. Conclusions and Limitations We propose a general visual saliency retargeting framework that manipulates an image to achieve a saliency change, while providing the user control over the level of change. Our results outperform the state of the art in object enhancement, while maintaining realistic appearance. Our framework is also applicable to other image editing tasks such as distractors attenuation and background decluttering. Moreover, We establish a benchmark for measuring the effectiveness of algorithms for saliency manipulation. Our method is not without limitations. First, since we rely on internal patch statistics, and do not augment the patch database with external images, the color transformations are limited to the color set of the image. Second, since our method is not provided with semantic information, in some cases the manipulated image may be non-realistic. For example, in Figure 7, the balloon is colored in gray, which is an unlikely color in that context. Despite its limitations, our technique often produces visually appealing results that adhere to the user’s wish. Acknowledgements This research was supported by the Israel Science Foundation under Grant 1089/16, by the Ollendorf foundation and by Adobe masks (1) (2) (3) (4) (5) (6) (7) (a) Input image (b) OHA (c) HAG (d) WSR (e) Ours Figure 9: Object Enhancement In these examples the user selected a target region to be enhanced (top row). To qualitatively assess the enhancement effect one should compare the input images in (a) to the manipulated images in (b,c,d,e), while considering the input mask (top). The results of OHA in (b) are often non realistic as they use arbitrary colors for enhancement. HAG (c) and WSR (d) produce realistic results, but sometimes (e.g., rows 1,2,6 and 7) they completely fail at enhancing the object and leave the image almost unchanged. Our manipulation, on the other hand, consistently succeeds in enhancement while maintaining realism. Our enhancement combines multiple saliency effects: emphasis by illumination (rows 1 and 7), emphasis by saturation (rows 2, 3 and 4) and emphasis by color (rows 1, 4-7). References [1] C. Barnes, E. Shechtman, A. Finkelstein, and D. Goldman. PatchMatch: A randomized correspondence algorithm for structural image editing. ACM TOG, 28(3):24, 2009. 2, 3, 4 [2] S. Bell, K. Bala, and N. Snavely. Intrinsic images in the wild. ACM TOG, 33(4):159, 2014. 5 [3] M. Bernhard, L. Zhang, and M. Wimmer. Manipulating attention in computer games. In Ivmsp workshop, 2011 ieee 10th, pages 153–158, 2011. 1 [4] P. Bhat, B. Curless, M. Cohen, and C. L. Zitnick. Fourier analysis of the 2D screened poisson equation for gradient domain problems. In ECCV, pages 114–128. 2008. 3, 4 [5] O. Boiman and M. Irani. Detecting irregularities in images and in video. IJCV, 74(1):17–31, 2007. 2 [6] Z. Bylinskii, T. Judd, A. Oliva, A. Torralba, and F. Durand. What do different evaluation metrics tell us about saliency models? arXiv preprint arXiv:1604.03605, 2016. 5 [7] M.-M. Cheng, N. J. Mitra, X. Huang, P. H. Torr, and S.-M. Hu. Global contrast based salient region detection. TPAMI, 37(3):569–582, 2015. 2 [8] M.-M. Cheng, J. Warrell, W.-Y. Lin, S. Zheng, V. Vineet, and N. Crook. Efficient salient region detection with soft image abstraction. In ICCV, pages 1529–1536, 2013. 5 [9] S. Darabi, E. Shechtman, C. Barnes, D. B. Goldman, and P. Sen. Image Melding: Combining inconsistent images using patch-based synthesis. ACM TOG, 31(4):82:1–82:10, 2012. 2, 3, 4 [10] T. Dekel, T. Michaeli, M. Irani, and W. T. Freeman. Revealing and modifying non-local variations in a single image. ACM TOG, 34(6):227, 2015. 2 [11] A. A. Efros and T. K. Leung. Texture synthesis by nonparametric sampling. In ICCV, volume 2, pages 1033–1038, 1999. 2 [12] Z. Farbman, R. Fattal, and D. Lischinski. Convolution pyramids. ACM TOG, 30(6):175, 2011. 4 [13] O. Fried, E. Shechtman, D. B. Goldman, and A. Finkelstein. Finding distractors in images. In CVPR, pages 1703–1712, 2015. 1, 5, 6 [14] S. Goferman, L. Zelnik-Manor, and A. Tal. Context-aware saliency detection. TPAMI, 34(10):1915–1926, 2012. 1 [15] A. Hagiwara, A. Sugimoto, and K. Kawamoto. Saliencybased image editing for guiding visual attention. In Proceedings of international workshop on pervasive eye tracking & mobile eye-based interaction, pages 43–48. ACM, 2011. 1, 2, 5 [16] T. Judd, K. Ehinger, F. Durand, and A. Torralba. Learning to predict where humans look. In ICCV, 2009. 5 [17] G. Li and Y. Yu. Visual saliency based on multiscale deep features. In CVPR, June 2015. 5 [18] X. Li, H. Lu, L. Zhang, X. Ruan, and M.-H. Yang. Saliency detection via dense and sparse reconstruction. In ICCV, pages 2976–2983, 2013. 1, 5 [19] T.-Y. Lin, M. Maire, S. Belongie, J. Hays, P. Perona, D. Ramanan, P. Dollár, and C. L. Zitnick. Microsoft coco: Common objects in context. In ECCV, pages 740–755. 2014. 5 [20] H. Liu and I. Heynderickx. Tud image quality database: Eyetracking release 1, 2010. 5 [21] J. Long, E. Shelhamer, and T. Darrell. Fully convolutional networks for semantic segmentation. In CVPR, pages 3431– 3440, 2015. 6 [22] R. Margolin, A. Tal, and L. Zelnik-Manor. What makes a patch distinct? In CVPR, pages 1139–1146, 2013. 1, 3, 5 [23] R. Margolin, L. Zelnik-Manor, and A. Tal. How to evaluate foreground maps? In CVPR, pages 248–255, 2014. 5 [24] V. A. Mateescu and I. Bajić. Visual attention retargeting. IEEE MultiMedia, 23(1):82–91, 2016. 1, 2, 5 [25] V. A. Mateescu and I. V. Bajić. Attention retargeting by color manipulation in images. In Proceedings of the 1st International Workshop on Perception Inspired Video Processing, pages 15–20. ACM, 2014. 1, 2, 5 [26] E. Mendez, S. Feiner, and D. Schmalstieg. Focus and context in mixed reality by modulating first order salient features. In International Symposium on Smart Graphics, pages 232– 243, 2010. 1, 2 [27] T. V. Nguyen, B. Ni, H. Liu, W. Xia, J. Luo, M. Kankanhalli, and S. Yan. Image Re-attentionizing. IEEE Transactions on Multimedia, 15(8):1910–1919, 2013. 1, 2 [28] C. Rother, V. Kolmogorov, and A. Blake. Grabcut: Interactive foreground extraction using iterated graph cuts. In ACM TOG, volume 23, pages 309–314, 2004. 6 [29] D. Simakov, Y. Caspi, E. Shechtman, and M. Irani. Summarizing visual data using bidirectional similarity. In CVPR, pages 1–8, 2008. 2, 3 [30] S. L. Su, F. Durand, and M. Agrawala. De-emphasis of distracting image regions using texture power maps. In Proceedings of IEEE International Workshop on Texture Analysis and Synthesis, pages 119–124. ACM, October 2005. 1, 2 [31] L.-K. Wong and K.-L. Low. Saliency retargeting: An approach to enhance image aesthetics. In WACV, pages 73–80, 2011. 1, 2, 5 [32] N. Xu, B. Price, S. Cohen, J. Yang, and T. S. Huang. Deep interactive object selection. In CVPR, pages 373–381, 2016. 6 [33] Q. Yan, L. Xu, J. Shi, and J. Jia. Hierarchical saliency detection. In CVPR, pages 1155–1162, 2013. 1, 5 [34] Z. Yan, H. Zhang, B. Wang, S. Paris, and Y. Yu. Automatic photo adjustment using deep neural networks. ACM TOG, 2015. 1, 2 [35] J. Zhang, S. Sclaroff, Z. Lin, X. Shen, B. Price, and R. Mech. Minimum barrier salient object detection at 80 FPS. In ICCV, pages 1404–1412, 2015. 1, 5
1cs.CV
Deep Embedding for Spatial Role Labeling arXiv:1603.08474v1 [cs.CL] 28 Mar 2016 Oswaldo Ludwig, Xiao Liu, Parisa Kordjamshidi, Marie-Francine Moens March 29, 2016 Abstract This paper introduces the visually informed embedding of word (VIEW), a continuous vector representation for a word extracted from a deep neural model trained using the Microsoft COCO data set to forecast the spatial arrangements between visual objects, given a textual description. The model is composed of a deep multilayer perceptron (MLP) stacked on the top of a Long Short Term Memory (LSTM) network, the latter being preceded by an embedding layer. The VIEW is applied to transferring multimodal background knowledge to Spatial Role Labeling (SpRL) algorithms, which recognize spatial relations between objects mentioned in the text. This work also contributes with a new method to select complementary features and a fine-tuning method for MLP that improves the F 1 measure in classifying the words into spatial roles. The VIEW is evaluated with the Task 3 of SemEval-2013 benchmark data set, SpaceEval. 1 Introduction One of the essential functions of natural language is to describe location and translocation of objects in space. Spatial language can convey complex spatial relations along with polysemy and ambiguity inherited in natural language. Therefore, a formal spatial model is required, to focus on some particular spatial aspects. This paper address a layer of linguistic conceptual representation, called spatial role labeling (SpRL), which predicts the existence of spatial information at the sentence level by identifying the words that play a particular spatial role as well as their spatial relationship Kordjamshidi & Moens (2015). An issue in extracting spatial semantics from natural language is the lack of annotated data on which machine learning can be employed to learn and extract the spatial relations. Current SpRL algorithms rely strongly on feature engineering, which has the advantage of encoding human knowledge, thus compensating for the lack of annotated training data. This work preserves the previous contributions on feature engineering of Kordjamshidi & Moens (2015) while adding a new set of features learned from multimodal data, i.e. the visually informed embedding of word (VIEW). Multimodal data is usually associated with multimodal representation learning, which has been studied by various authors, such as Srivastava & Salakhut1 dinov (2012), which uses deep Boltzmann machines for representing joint multimodal probability distributions over images and sentences, Karpathy et al. (2014), which then embed fragments of images (objects) and fragments of sentences (dependency tree relations) into a common space for bidirectional retrieval of images and sentences, and Kiros et al. (2014), which unify joint imagetext embedding models with multimodal neural language models to rank images and sentences (as well as to generate descriptions for images) using a long short term memory (LSTM) network to process text and deep convolutional network (CNN) to process images. Similar to the work Kiros et al. (2014) our model learns embedding from multimodal data and applies LSTM to process textual information. However, unlike most of the works on multimodal representation learning, which jointly map visual and textual information into a common embedding space, our work aims at providing embeddings only for words, but encoding spatial information extracted from the image annotations. The idea is to learn VIEW by pipelining an embedding layer into a deep architecture trained by back propagation to predict the spatial arrangement between the visual objects annotated in the pictures, given the respective textual descriptions. In this sense, unlike Karpathy et al. (2014) and Kiros et al. (2014), we don’t need a CNN, because the spatial information which is relevant for our purpose is provided directly by the position of the bounding boxes containing the visual objects annotated in the images, as detailed in Section 3. Our VIEW is used as a vehicle to transfer spatial information from multimodal data to SpRL algorithms. The paper is organized as follows. Section 3, we describe the model setting, from the annotation style through the modeling of the deep neural network, whose training algorithm is described in Section 4. Section 5 describes how the spatial embedding is applied in SpRL, as well as the algorithm developed to select the best complementary embedding features and the fine-tuning method able to deal with the tradeoff of precision and recall, aiming at the largest F 1. Section 6 reports and discusses the experiments, while Section 7 summarizes the major findings. 2 Problem definition and research questions The SpRL algorithm recognizes spatial objects in language (i.e. trajector and landmark) and their spatial relation signaled by the spatial indicator. The trajector is a spatial role label assigned to a word or a phrase that denotes an object of a spatial scene, more specifically, an object that moves. A landmark is a spatial role label assigned to a word or a phrase that denotes the location of this trajector object in the spatial scene. The spatial indicator is a spatial role label assigned to a word or a phrase that signals the spatial relation trajector and landmark. In this work we apply the SpRL algorithm developed for the work Kordjamshidi & Moens (2015), which models this problem as a structured prediction task Taskar et al. (2005), that is, it jointly recognizes the spatial relation and its 2 composing role elements in text. The SpRL algorithm receives as input a natural language sentence, such as “There is a white large statue with spread arms on a hill”, having a number of words, in this case identified as w = {w1 , . . . , w12 }, where wi is the ith word in the sentence. Each word in the sentence that can be part of a spatial relation (e.g., nouns, prepositions) is described by a vector of the local features denoted by φword (wi ), including linguistically motivated lexical, syntactical and semantical features of words, such as the lexical surface form, its semantic role, its part-of-speech and the lexical surface form of words in the neighborhood. This feature vector is used to relate a word with its spatial role, i.e. spatial indicator, trajector or landmark, hence further represented by sp, tr and lm, respectively. There are also descriptive vectors of pairs of words, referred to as φpair (wi , wj ), encoding the linguistically motivated features of pairs of words and their relational features, such as their relative position in the sentence, their distance in terms of number of words and the path between them obtained with a syntactic parser. The SpRL model is trained on a training set of sentences annotated with the above output labels. Following training, the system outputs all spatial relations found in a sentence of a test set composed of the sentences and their corresponding spatial roles. The main research question approached in this paper regards the possibility of improving the quality of φword (wi ) by concatenating the VIEW in this feature vector. It derives a secondary research question on the possibility of encoding visual information from COCO images into the word embeddings by learning a model able to map from the captions to a simplified representation of the visual objects annotated in the corresponding image and their relative position. We assume that the necessary condition to correctly forecast the visual output, given the textual description, is that the embedding layer (which is in the model pipeline) is successfully encoding the spatial information of the textual description, assuring a suitable word embedding for this specific task related with SpRL. Another research question regards the importance of feature selection in order to discard embedding features that are not directly related to the SpRL task, since our data set derived from COCO is not created for SpRL; therefore, some features can act as noise for SpRL. 3 The model setting The Microsoft COCO data set Lin et al. (2014) is a collection of images featuring complex everyday scenes which contain common visual objects in their natural context. COCO contains photos of 91 object types with a total of 2.5 million labeled instances in 328k images. Each image has five written caption descriptions. The visual objects within the image are tight-fitted by bounding boxes from annotated segmentation masks, as can be seen in Fig.1. Our annotation system automatically derives a less specific spatial annotation about the relative position between the center points of the bounding 3 1. A man who appears to be herding sheep is closing two big fence doors. 2. A man that is standing in front of a group of sheep. 3. A man is with some sheep in a field. 4. A man stands in front of a herd of sheep . 5. A man herding sheep with two red sticks while dog herds them from behind. Figure 1: This figure shows an image from COCO with annotated bounding boxes and captions Lin et al. (2014). boxes containing visual objects, given COCO’s annotation of the coordinates of the bounding boxes. Our annotation style is ruled by the predicates alone(v1 ), below(v1 , v2 ) and beside(v1 , v2 ), where v1 and v2 are visual objects, see Fig.2. This information is encoded in a sparse target vector, Y , where the first three positions encode the predicate in one-hot vector style, and the ensuing positions encode the index of the visual objects, also in one-hot vector style, i.e. 3 positions to encode the predicates plus 91 positions to encode the index of the first argument (visual object) plus other 91 positions for the second argument, totalizing 185 positions in the target vector. If the predicate is alone(v1 ), i.e. when a single visual object is annotated in the image, the last 91 positions are all zeros. Despite having a large number of annotated objects per image, MS-COCO has several objects belonging to the same category per image, and so, a small number of categories per image. On average MS-COCO data set contains 3.5 categories per image, yielding 7.7 instances per image (see Section 5 of Lin et al. (2014)). Our annotation system is based on two assumptions: 1) learning the spatial arrangement between visual objects belonging to the same category is not useful: 2) objects placed at the center of the image are more salient, and 4 visual object A 45° visual object B 90° visual object D visual object C Figure 2: This figure exemplifies the center of four bounding boxes containing the visual objects A, B, C and D, whose spatial annotations yield triplets such as below(C, A), beside(B, A), beside(D, A). so, they are likely to be present in the captions. Therefore, our system ranks the bounding boxes from the most centered box to the least centered box and starts by selecting the most centered bounding box as the first visual object. Then, it searches from the second higher ranked bounding box to those with a lower rank, until it reaches a visual object belonging to a different category or the end of the list of instances, i.e. our system selects only a pair of visual objects belonging to different categories. In summary, the system learns how to map the captions to the spatial relation between the most salient pair of objects belonging to different categories. For instance, in Fig.1 the system selects the man and the most centered sheep (not the dog in the corner of the image) to generate the target output for all the five captions, yielding five training examples. Notice that the dog is only cited in one of the five captions. 3.1 The embedding model The input of our deep model is the textual information provided by COCO’s captions, i.e., a sequence1 of words encoded in a set of K-dimensional one-hot vectors, where K is the vocabulary size, here assumed as 8000 words. Since COCO’s captions are shorter than 30 words, our system cuts texts after the limit of 30 words; therefore, the data pair for the ith caption is composed by a sparse matrix Xi of dimension 8000×30 per target vector, yi , of 185 dimensions, as explained in the previous paragraph. Captions with less than 30 words are 1 The words, encoded in one-hot vectors, are provided sequentially to the model. 5 encoded into a matrix Xi whose the first columns are filled with all-zeros. Each figure has five associated captions, which yields five training examples with the same target vector, but different input vectors. Our deep model is trained to forecast the visual objects and their spatial relation (i.e. alone(v1 ), below(v1 , v2 ) and beside(v1 , v2 )), given the textual description in the caption. The model was implemented in Keras2 and it is pipeline composed of a linear embedding layer, an original version of LSTM network, as proposed in Hochreiter & Schmidhuber (1997), and a deep multilayer perceptron (MLP), see Fig.3. The embedding layer receives the sparse input Xi , representing a sentence, and encodes the one-hot vector representation of the words (i.e. the columns of Xi ) into a set of 30 dense vectors of Nw dimensions that are provided sequentially to the LSTM, which extracts a Ns -dimensional vector from the sentence (after 30 iterations). This vector representation of the sentence (i.e. a sentence-level embedding) is mapped to the sparse spatial representation yi by the MLP. Figure 3: The deep neural model, where red border boxes represent sets of neurons, as exemplified for the box σf . We also evaluated an architecture where the LSTM directly predicts the sparse output vector (without MLP), but the result was better using the MLP. The latent representation of sentences, i.e. the sentence-level embedding, makes possible the choice of a suitable dimension for the LSTM output, rather than forcing the LSTM output to be the sparse 185-dimensional target vector. The ith caption yields a matrix Xi from which a set of 30 input vectors, here represented by xt (t = 1, . . . , 30), are sequentially given to the model. 2 http://keras.io/ 6 Our model starts by computing the word embedding: et = W e xt (1) where the adjustable embedding matrix, We , has the dimension of 8000 × Nw , i.e. it maps from the 8000-dimensional one-hot vector representation of words to a Nw -dimensional continuous vector representation et . Then the system calculates the state variables of the LSTM, starting by the input gate it and the ft at iteration t, as follows: candidate value for the states of the memory cells C it = σ(Wi et + Ui ht−1 + bi ) (2) ft = tanh(Wc et + Uc ht−1 + bc ) C (3) where σ(·) represents the sigmoid function, Wi , Ui , Wc , Uc , bi and bc are adjustable parameters and ht−1 is the LSTM output at the previous iteration. ft the system can compute the activation of the memory forget Having it and C gates, ft , at iteration t: ft = σ(Wf et + Uf ht−1 + bf ) (4) where Wf , Uf and bf are adjustable parameters. Having it , ft and the candidate ft , the system can compute the new state of the memory cells, Ct , state value C at iteration t: ft + ft ∗ Ct−1 Ct = it ∗ C (5) where ∗ represents the point-wise multiplication operation. With the new state of the memory cells, Ct , the system can compute the value of their output gates, ot : ot = σ(Wo et + Uo ht−1 + bo ) (6) were Wo , Uo and bo are adjustable parameters. Having ot , the system can finally calculate the output of the LSTM, ht : ht = ot ∗ tanh(Ct ) (7) At this point we have both word-level and sentence-level embeddings, given by (1) and (7), respectively. Each Ns -dimensional sentence embedding is produced after 30 iteration of LSTM (the adopted sentence length), when it is ready to be processed by the MLP. Therefore, the LSTM output is sub-sampled in the rate of 1/30, yielding hi , i.e. the input for the MLP (note the changing of the index variable in relation to (7)). The adopted MLP has two sigmoidal hidden layers and a sigmoidal output layer. The optimal number of hidden layers was empirically determined based on the performance on MS-COCO. The MLP model is given by: yh(1,i) = σ (W1 hi + b1 )  yh(2,i) = σ W2 yh(1,i) +  b2 ŷi = σ W3 yh(2,i) + b3 (8) where Wj and bj are the weight matrix and bias vector of layer j, respectively, and yh(j,i) is the output vector of the hidden layer j. 7 4 Model Training After evaluating different objective functions combined with different activity and weight regularizers available in Keras, we decided to implement a custom objective function, gathering some ideas from the support vector learning. Our training method yields the following constrained optimization problem: min We ,θl ,θm Ne X No   1 X max 1 − ŷ(i,j) 2y(i,j) − 1 , 0 Ne No i=1 j=1 (9) subject to: kWlneu k ≤ 1, l=1,2,3 ∀neu (10) where the objective function (9) is the Hinge loss with the j th position of the intended output vector for the ith caption, y(i,j) ∈ {0, 1}, scaled and shifted to assume the values −1 or 1, Ne is the cardinality of the training data set, No = 185 is the dimension of the output vector, We is the weight matrix of the embedding, θl = {Wi , Wf , Wc , Wo , Ui , Uf , Uc , Uo , bi , bf , bc , bo } is the set of adjustable LSTM parameters, θm = {W1 , W2 , W3 , b1 , b2 , b3 } is the set of adjustable MLP parameters, ŷ(i,j) is the j th position of the output vector estimated by our model for the ith caption and Wlneu is the vector of synaptic weights of the neuron neu of the layer l. Keras allows to set constraints on network parameters during optimization. The adopted set of constraints (10) regularizes the model by upper bounding the norm of the vector of synaptic weights of the MLP neurons. Note that the adopted loss function (9) only penalizes examples that violate a given margin or are misclassified, i.e. an estimated output smaller than 1 in response to a positive example or an estimated output larger than -1 in response to a negative example (these training examples can be understood as support vectors). The other training examples are ignored during the optimization, i.e. they don’t participate in defining the decision surface. The best optimization algorithm for our model was Adam Kingma & Ba (2014), an algorithm for first-order gradient-based optimization based on adaptive estimates of lower-order moments. 5 Applying the spatial-specific embedding in SpRL We apply VIEW in SpRL by simply concatenating it with the original feature vector, φword (wi ), generated by the SpRL algorithm Kordjamshidi & Moens (2015) for the words that are candidate for sp, tr and lm. 5.1 Selecting complementary Features Our aim is to select complementary features from the VIEW so as to maximize the mutual information between the target output, here represented by 8 the scalar random variable r, and the selected features, represented by the random variables x1 ∈ X1 , . . . , xn ∈ Xn , while minimizing the mutual information between the selected features and the original SpRL features, φword (·). The method introduced in this section requires a scalar random variable, r, as target output. However, the target output of SemEval is a 3-dimensional one-hot vector indicating the spatial roles, i.e. sp, tr and lm. Therefore, we convert this binary number with 3 binary digits into a decimal number, i.e. a scalar. The mutual information is given by: I(x1 , . . . , xn ; r) = H(x1 , . . . , xn ) + H(r) − H(x1 , . . . , xn , r) (11) where n is the arbitrary number of selected features and H(.) represents the entropy of a set of random variables, given by: H(x R 1 , . . .R, xn ) = − X1 . . . Xn p(x1 , . . . , xn ) log p(x1 , . . . , xn )dx1 . . . dxn (12) Even assuming a discrete approximation for the joint density, p(x1 , . . . , xn ), e.g. normalized histograms, the calculation of (12) for several random variables is computationally unfeasible. Therefore, we adopt an indirect approach by applying the principle of Max-Relevance and Min-Redundancy Peng et al. (2005). According to this principle it is possible to maximize (12) by jointly solving the following two problems: (13) max φ(i1 , . . . , in ) i1 ,...,in where in is the index of the nth selected feature, φ(i1 , . . . , in ) = V (i1 , . . . , in ) − D(i1 , . . . , in ), n 1X I(xik ; r), (14) V (i1 , . . . , in ) = n k=1 D(i1 , . . . , in ) = 1 n2 n n X X I(xij ; xik ) (15) j=1 k=1 The idea is to find the set of indexes, i1 , . . . , in , that simultaneously maximize the relevance (14) and minimize the redundancy (15). Notice that this procedure requires the calculation of a matrix S ∈ Rn×n whose the elements are the mutual information values I(xij ; xik ). However, this is a naive approach, since this method doesn’t take into account the redundancy between the embedding features and the original 8099 SpRL features of φword (·). The computational cost increases significantly by considering the whole problem. Let xSpRL be the k k th original feature from φword (·), then the complete problem can be modeled as: max φ(i1 , . . . , in ) (16) i1 ,...,in 9 V (i1 , . . . , in ) = n X 1 n+m I(xik ; r)+ k=1 m X  I(xSpRL ; r) , ij (17) j=1 D(i1 , . . . , in ) = n X m X 1 n2 + nm + m2 I(xil ; xSpRL ) iz + l=1 z=1  n X n X  I(xij ; xik )+ j=1 k=1 m X m X ! I(xSpRL ; xSpRL ) iw iq (18) w=1 q=1 where m is the number of original features from φword (·). Fortunately, the Pm Pm Pm terms j=1 I(xSpRL ; y) and w=1 q=1 I(xSpRL ; xSpRL ) are constant in relaij iw iq tion to the manipulated indexes, i.e. the mutual information between the original SpRL features and the output, as well as the mutual information between pairs of SpRL features, don’t matter for this optimization problem, alleviating the computational cost. Therefore, (16)-(18) can be simplified as follows: max φ(i1 , . . . , in ) i1 ,...,in (19) n V (i1 , . . . , in ) = 1X I(xik ; r), n (20) k=1  n n X X 1  I(xij ; xik )+ D(i1 , . . . , in ) = 2 n + nm j=1 k=1 ! n X m X SpRL I(xil ; xiz ) (21) l=1 z=1 The optimization problem (19)-(21) requires the calculation of a matrix with the pairwise mutual information values of dimension n × m, in the place of the m × m matrix required by (18). In our case it means a computational effort around 100 times smaller. We solved (19)-(21) by slightly adapting the Feature Selector based on Genetic Algorithm and Information Theory3 Ludwig & Nunes (2010). 5.2 Maximizing the F 1 After having the selected features from the embedding concatenated with the original SpRL features, we train an MLP on SemEval annotated data to predict 3 http://www.mathworks.com/matlabcentral/ 10 the spatial role of the words. The adopted MLP has a single sigmoid hidden layer and a linear output layer. One of the issues that we observe in applying MLP trained with MSE on SpRL data is the unbalanced relation between precision and recall that worsens with the use of the embedding, resulting in damage on the F 1. This issue is usually solved by manipulating the threshold; however, a larger gain on F 1 can be obtained by manipulating all the parameters of the output layer. Therefore, we propose a fine-tuning of the output layer, by maximizing an approximation of F 1 squared. We start by analyzing the simplest approach: max F 12 w,b (22) where w and b are the adjustable parameters of the linear output layer of the MLP. F 1 is function of the true positive (T P ) and true negative examples (T N ), as follows: 2T P (23) F1 = N + TP − TN Np TP = 1X (1 + ϕ(wxpi + b)) 2 i=1 (24) TN = Nn  1X 1 − ϕ(wxnj + b) 2 j=1 (25) where ϕ(·) = sign(·) returns 1 or −1 according to the sign of the argument, N is the number of examples, Np and Nn are the number of positive and negative examples, respectively, and xpi and xnj are the outputs of the hidden layer of the MLP (i.e. the inputs of the output layer) for the ith positive example and the j th negative example, respectively. Unfortunately, the sign function is not suitable for gradient based optimization methods; therefore, we approximate this function by hyperbolic tangent, yielding the approximate T˜P , T˜N and F˜1, whose relation is given by: F˜1 = 2T˜P N + T˜P − T˜N (26) To derive a lower bound on F 1 as a function of F˜1, T˜P and T˜N , let us analyze the bounds on the difference (sign(·) − tanh(·)) by one-sided limit: lim (sign(v) − tanh(v)) = −1 (27) lim (sign(v) − tanh(v)) = 1 (28) v→0− v→0+ From (27), (28) and (24) we can derive bounds on T P as a function of its approximation T˜P : Np Np T˜P − < T P < T˜P + (29) 2 2 11 Notice that we can relax these bounds by substituting Np by the largest value between Np and Nn , henceforward called Nl , i.e.: Nl Nl T˜P − < T P < T˜P + 2 2 (30) Similar bounds can be derived for T N : Nl Nl T˜N − < T N < T˜N + 2 2 (31) By substituting the lower bounds of (30) and (31) into (23) and using (26) we can derive a lower bound on F 1: F 1 > (1 − Nl ˜ )F 1 2T˜P (32) l From (32) we conclude that it is desirable to have (1 − 2N ) > 0, since this is a T˜P necessary condition (but not sufficient) to have the lower bound of F 1 increasing together with F˜1. Therefore, we propose the constrained optimization problem: 2 max F˜1 + Cζ w,b,ζ Nl T˜P > +ζ 2 s.t. (33) where ζ is a slack variable. To solve this optimization problem we need the following derivatives: 2 −1 ∂ F˜1 ∂ T˜P  = 2F˜1 2 N + T˜P − T˜N + ∂w ∂w !!  −2 ∂ T˜N ∂ T˜P ˜ ˜ ˜ − 2T P T N − T P − N ∂w ∂w 2 −1 ∂ F˜1 ∂ T˜P  = 2F˜1 2 N + T˜P − T˜N + ∂b ∂b !!  −2 ∂ T˜N ˜P ∂ T 2T˜P T˜N − T˜P − N − ∂b ∂b (34) (35) Np ∂ T˜P 1X = (tanh0 (wxpi + b)xpi ) ∂w 2 i=1 (36) N n  1X ∂ T˜N =− tanh0 (wxnj + b)xnj ∂w 2 j=1 12 (37) Np ∂ T˜P 1X = (tanh0 (wxpi + b)) ∂b 2 i=1 (38) Nn  ∂ T˜N 1X =− tanh0 (wxnj + b) ∂b 2 j=1 (39) where tanh0 (·) = 1 − tanh2 (·). 6 Experimental Settings In this section our methods are evaluated by means of experiments in the SemEval-2013 benchmark data set, the Task 3, SpaceEval. We start by evaluating the embedding model on COCO, then we evaluate the contribution of the spatial-specific embedding in the multiclass classification of words into spatial roles and finally in the structured prediction of spatial triplets by using the algorithm of Kordjamshidi & Moens (2015). 6.1 Evaluating the embedding model on COCO This subsection reports the performance indexes of the deep model described in Section 3.1 in predicting our annotation on the COCO testing data. The model was trained on 135015 captions and evaluated on a test set composed by 67505 captions. According to our experiments, the deep model has its best performance on the test data when having a 200-dimensional word embedding and a 300dimensional sentence embedding, meaning that the embedding matrix has dimension 8000×200 and the LSTM receives a 200-dimensional vector and outputs a 300-dimensional vector, i.e. Nw = 200 and Ns = 300. The best setup for the MLP is 300 × 250 × 200 × 185, i.e. with two sigmoidal hidden layers containing 250 and 200 neurons, respectively. The performance indexes on the test data are provided for the model trained with mean squared error (MSE) and our Hinge-like multiclass loss (9) for the sake of comparison, as shown in Table 1. Table 1: Results on test data using the model trained with MSE and the Hingelike loss (9). class acc (MSE) acc (Hinge loss) spatial relation 0.997 0.997 visual object #1 0.831 0.863 visual object #2 0.735 0.747 As can be seen in Table 1, the model has a better performance in predicting the spatial relation, since it can assume only 3 discrete values, while the visual 13 object can assume 91 discrete values. The Hinge-like multiclass loss presents slightly better performance indexes. After training, the word embedding extracted from We enables the clustering of words into classes, as can be seen in Fig.4, which shows the PCA projection on the two first eigen directions of the embedding representing visual objects. Figure 4: PCA projection on the two first eigen directions of the VIEW of words representing visual objects. Fig.5 shows the PCA projection of the sentence-level embedding of four pairs of sentences describing the same scene in different manners, except for a pair of sentences whose spatial meaning was changed, in order to check the sensitivity of the model to the spatial information, i.e. (“A red book on the top of a bottle of wine”, “A bottle of wine on top of a red book”), which was plotted with a larger dispersion than the other pairs. 6.2 Multiclass classification of word roles on SemEval In this set of experiments on multiclass classification an MLP is trained to classify words into spatial roles. The adopted MLP has a single sigmoid hidden layer with 10 neurons and a linear output layer with 3 neurons, which encode the output (i.e. the predicted class: sp, tr, lm or no spatial role) in one-hot vector 14 Figure 5: PCA projection of the sentence-level embedding of four pair of sentences describing the same scene in different manners. style. The MLP receives as input the original features, φword (·), extracted by the same feature function as used by the SpRL algorithm of Kordjamshidi & Moens (2015). These features are concatenated with features from the VIEW, in order to access the gains of using the embedding. The MLP was trained using 15092 sentences and evaluated using 3711 sentences which compose the train and test data sets of SemEval, Task 3, SpaceEval. The results are summarized in Tables 2 and 3. The gains obtained by using Table 2: Results of multiclass classification using the original features. role precision recall F 1 sp 0.636 0.839 0.724 tr 0.541 0.723 0.619 lm 0.405 0.684 0.509 VIEW are improved by selecting only 100 complementary features from the embedding employing the method explained in Section 5.1, as can be seen in Table 4. Table 5 presents the results after the application of the fine tuning method 15 Table 3: Results of original features + VIEW. role precision recall F 1 sp 0.625 0.894 0.735 tr 0.650 0.743 0.693 lm 0.569 0.775 0.656 Table 4: Results of original features + VIEW + tures. role precision recall sp 0.656 0.871 tr 0.633 0.838 lm 0.550 0.853 selection complementary feaF1 0.748 0.721 0.669 introduced in Section 5.2 to improve the F 1 measure. To compare the perforTable 5: Results of original features + VIEW + tures + F 1 maximization. role precision recall sp 0.658 0.869 tr 0.666 0.813 lm 0.600 0.778 selection complementary feaF1 0.749 0.732 0.678 mance of VIEW with the usual Word2Vec embedding Mikolov et al. (2013), we trained a skip-gram model4 on the same COCO captions as we trained VIEW (but without visual information) and concatenated it to the original SpRL features to generate the results of Table 6. The VIEW yields performance gains in Table 6: Results of original features + Word2Vec embedding. role precision recall F 1 sp 0.612 0.871 0.719 tr 0.602 0.648 0.624 lm 0.461 0.552 0.503 predicting all the spatial roles. These gains are improved by the application of the methods described in Sections 5.1 and 5.2. 6.3 Structured prediction of spatial triplets on SemEval In this set of experiments on structured prediction we used the original SpRL algorithm of Kordjamshidi & Moens (2015) not only to predict the spatial role of the words, but also to compose words into triplets (sp, tr, lm), i.e. the structured 4 https://code.google.com/p/word2vec/ 16 output. As explained in Section 2, the algorithm uses descriptive vectors of words, φword (·), and pairs of words, φpair (·, ·). The VIEW is concatenated only to φword (·), having a secondary role in this set of experiments. The VIEW yields performance gains in classifying words into the roles sp and lm, as can be seen in Tables 7 and 8, which summarize the performance indexes using only the original features from φword (·) and φpair (·, ·) and using φword (·) concatenated with the VIEW. Table 9 shows the performance of the Table 7: Results of structured prediction using original features and algorithm of Kordjamshidi & Moens (2015). role/structure precision recall F 1 sp 0.758 0.722 0.739 tr 0.534 0.718 0.613 lm 0.316 0.431 0.364 (sp, tr, lm) 0.245 0.226 0.235 Table 8: Results of original features + VIEW. role/structure precision recall F 1 sp 0.727 0.757 0.741 tr 0.513 0.755 0.611 lm 0.354 0.555 0.432 (sp, tr, lm) 0.228 0.242 0.235 usual Word2Vec embedding Mikolov et al. (2013) concatenated to the original SpRL features, using the SpRL algorithm with the same setup assumed for the experiments with VIEW. Table 9: Results of original features + Word2Vec embedding. role/structure precision recall F 1 sp 0.693 0.726 0.709 tr 0.496 0.772 0.604 lm 0.303 0.462 0.366 (sp, tr, lm) 0.170 0.184 0.177 7 Conclusion This paper introduces a new approach in transferring spatial knowledge from multimodal data through the VIEW. The experiments provide evidence for the effectiveness of our method in transferring information useful in improving the performance of SpRL algorithms, specially in classifying words into spatial roles. 17 The experiments also provide evidence for the effectiveness of the algorithms for complementary feature selection and F 1 maximization, introduced in Sections 5.1 and 5.2, in improving the gains obtained by using the VIEW. As for future work we aim at developing a method for F 1 optimization in the structured prediction setting by extending the work Joachims (2005) for the structured classification setting. We believe that the results reported in this paper may improve with the increasing amount of annotated data. Notice that despite having a large cardinality, the COCO data set has a small variety of visual objects in its gold standard, i.e. it has only 91 object categories (including the super-categories). References Hochreiter, Sepp and Schmidhuber, Jürgen. Long short-term memory. Neural computation, 9(8):1735–1780, 1997. Joachims, Thorsten. A support vector method for multivariate performance measures. In Proceedings of the 22Nd International Conference on Machine Learning, ICML ’05, pp. 377–384. ACM, 2005. Karpathy, Andrej, Joulin, Armand, and Li, Fei Fei F. Deep fragment embeddings for bidirectional image sentence mapping. In Advances in neural information processing systems, pp. 1889–1897, 2014. Kingma, Diederik and Ba, Jimmy. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. Kiros, Ryan, Salakhutdinov, Ruslan, and Zemel, Richard S. Unifying visualsemantic embeddings with multimodal neural language models. arXiv preprint arXiv:1411.2539, 2014. Kordjamshidi, Parisa and Moens, Marie-Francine. Global machine learning for spatial ontology population. Web Semantics: Science, Services and Agents on the World Wide Web, 30:3–21, 2015. Lin, Tsung-Yi, Maire, Michael, Belongie, Serge, Hays, James, Perona, Pietro, Ramanan, Deva, Dollár, Piotr, and Zitnick, C Lawrence. Microsoft coco: Common objects in context. In Computer Vision–ECCV 2014, pp. 740–755. Springer, 2014. Ludwig, Oswaldo and Nunes, Urbano. Novel maximum-margin training algorithms for supervised neural networks. Neural Networks, IEEE Transactions on, 21(6):972 –984, jun. 2010. Mikolov, Tomas, Chen, Kai, Corrado, Greg, and Dean, Jeffrey. Efficient estimation of word representations in vector space. arXiv preprint arXiv:1301.3781, 2013. 18 Peng, H., Long, F., and Ding, C. Feature selection based on mutual information criteria of max-dependency, max-relevance, and min-redundancy. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 27(8):1226–1238, Aug. 2005. Srivastava, Nitish and Salakhutdinov, Ruslan R. Multimodal learning with deep boltzmann machines. In Advances in neural information processing systems, pp. 2222–2230, 2012. Taskar, Ben, Chatalbashev, Vassil, Koller, Daphne, and Guestrin, Carlos. Learning structured prediction models: A large margin approach. In Proceedings of the 22nd international conference on Machine learning, pp. 896–903. ACM, 2005. 19
9cs.NE
Proving Liveness of Parameterized Programs arXiv:1605.02350v1 [cs.LO] 8 May 2016 (extended version) Azadeh Farzan Zachary Kincaid Andreas Podelski University of Toronto Princeton University University of Freiburg Abstract Correctness of multi-threaded programs typically requires that they satisfy liveness properties. For example, a program may require that no thread is starved of a shared resource, or that all threads eventually agree on a single value. This paper presents a method for proving that such liveness properties hold. Two particular challenges addressed in this work are that (1) the correctness argument may rely on global behaviour of the system (e.g., the correctness argument may require that all threads collectively progress towards “the good thing” rather than one thread progressing while the others do not interfere), and (2) such programs are often designed to be executed by any number of threads, and the desired liveness properties must hold regardless of the number of threads that are active in the program. 1. Introduction Many multi-threaded programs are designed to be executed in parallel by an arbitrary number of threads. A challenging and practically relevant problem is to verify that such a program is correct no matter how many threads are running. Let us consider the example of the ticket mutual exclusion protocol, pictured in Figure 1. This protocol is an idealized version of the one used to implement spin-locks in the Linux kernel. The protocol maintains two natural-typed variables: s (the service number) and t (the ticket number), which are both initially zero. A fixed but unbounded number of threads simultaneously execute the protocol, which operates as follows. First, the thread acquires a ticket by storing the current value of the ticket number into a local variable m and incrementing the ticket number (atomically). Second, the thread waits for the service number to reach m (its ticket value), and then enters its critical section. Finally, the thread leaves its critical section by incrementing the service number, allowing the thread with the next ticket to enter. Mutual exclusion, a safety property, is perhaps the first property that comes to mind for this protocol: no two threads should be in their critical sections at the same time. But one of the main reasons that the ticket protocol came to replace simpler implementations of spin-locks in the Linux kernel was because it satisfies nonstarvation [11] (a liveness property): no thread that acquires a ticket waits forever to enter its critical section (under the fairness assumption that every thread is scheduled to execute infinitely often). Intuitively, the argument for non-starvation in the ticket protocol is obvious: tickets are assigned to threads in sequential order, and whenever a thread exits its critical section, the next thread in the sequence enters. However, it is surprisingly difficult to come up with a formal correctness argument manually, let alone automatically. This paper presents a theoretical foundation for algorithmic verification of liveness properties of multi-threaded programs with any number of threads. global nat s, t local nat m while(true): m=t++ // Acquire a ticket while(m>s): // Busy wait skip // Critical section s++ // Exit critical [m>s] 1 m=t++ 2 [m<=s] 3 s++ Figure 1. Ticket mutual exclusion protocol The core of our method is the notion of well-founded proof spaces. Well-founded proof spaces are a formalism for proving properties of infinite traces. An infinite trace is an infinite sequence of program commands paired with thread identifiers, where a pair hσ : ii indicates that the command σ is executed by thread i. We associate with each well-founded proof space a set of infinite traces that the space proves to be terminating. A well-founded proof space constitutes a proof of program termination if every trace of the program is proved terminating. A well-founded proof space constitutes a proof of a liveness property if every trace of the program that does not satisfy the liveness property is proved terminating. The main technical contribution of the paper is an approach to verifying that a well-founded proof space proves that all program traces terminate. Checking this condition is a language inclusion problem, which is complicated by the fact that the languages consist of words of infinite length, and are defined over an infinite alphabet (since each command must be tagged with an identifier for the thread that executed it). This inclusion problem is addressed in two steps: first, we show how the inclusion between two sets of infinite traces of a particular form can be proven by proving inclusion between two sets of finite traces (Theorems 3.8 and 4.2). This is essentially a reduction of infinite trace inclusion to verification of a safety property; the reduction solves the infinite length aspect of the inclusion problem. Second, we develop quantified predicate automata, a type of automaton suitable for representing these languages that gives a concrete characterization of this safety problem as an emptiness problem (Theorem 4.5). In this context, quantification is used as a mechanism for enforcing behaviour that all threads must satisfy. This solves the infinite alphabet aspect of the inclusion problem. The overall contribution of this paper is a formal foundation for automating liveness proofs for parameterized programs. We investigate its theoretical properties and pave the way for future work on exploring efficient algorithms to implement the approach. 1.1 Related work There exist proof systems for verifying liveness properties of parameterized systems (for example, [28]). However, the problem of automatically constructing such proofs has not been explored. To the best of our knowledge, this paper is the first to address the topic of automatic verification of liveness properties of (infinitestate) programs with a parameterized number of threads. Parameterized model checking considers systems that consist of unboundedly many finite-state processes running in parallel [1, 2, 13–15, 24]. In this paper, we develop an approach to the problem of verifying liveness properties of parameterized programs, in which processes are infinite state. This demands substantially different techniques than those used in parameterized model checking. The techniques used in this paper are more closely related to termination analysis and parameterized program analysis. Termination analysis an active field with many effective techniques [8, 10, 12, 19, 23, 31]. One of the goals of the present paper is to adapt the incremental style of termination analysis pioneered by Cook et al. [7, 8] to the setting of parameterized programs. The essence of this idea is to construct a termination argument iteratively via abstraction refinement: First, sample some behaviours of the program and prove that those are terminating. Second, assemble a termination argument for the example behaviours into a candidate termination argument. Third, use a safety checker to prove that the termination argument applies to all behaviours of the program. If the safety check succeeds, the program terminates; if not, we can use the counter-example to improve the termination argument. Termination analyses have been developed for the setting of concurrent programs [9, 22, 26]. Our work differs in two respects. First, our technique handles the case that there are unboundedly many threads operating simultaneously in the system. Second, the aforementioned techniques prove termination using thread-local arguments. A thread-local termination argument expresses that each thread individually progresses towards some goal assuming that its environment (formed by the other threads) is either passive or at least does not disrupt its progress. In contrast, the technique proposed in the paper is able to reason about termination that requires coordination between all threads (that is, all threads together progress towards some goal). This enables our approach to prove liveness for programs such as the Ticket protocol (Figure 1): proving that some distinguished thread will eventually enter its critical section requires showing that all other threads collectively make progress on increasing the value of the service number until the distinguished thread’s ticket is reached. Parameterized safety analysis deals with proving safety properties of infinite state concurrent programs with unboundedly many threads [20, 21, 29, 30]. Safety analysis is relevant to liveness analysis in two respects: (1) In liveness analysis based on abstraction refinement, checking the validity of a correctness argument is reduced to the verification of a safety property [7, 8] (2) An invariant is generally needed in order to establish (or to support) a ranking function. Well-founded proof spaces can be seen as an extension of proof spaces [16], a proof system for parameterized safety analysis, to prove liveness properties. A more extensive comparison between proof spaces and other methods for parameterized safety analysis can be found in [16]. 2. Parameterized Program Termination This section defines parameterized programs and parameterized program termination in a language-theoretic setting. A parameterized program is a multi-threaded program in which each thread runs the same code, and where the number of threads is an input parameter to the system. A parameterized program can be specified by a control flow graph that defines the code that each thread executes. A control flow graph is a directed, labeled graph P = hLoc, Σ, `init , src, tgti where Loc is a set of program locations, Σ is a set of program commands, `init is a designated initial location, and src, tgt : Σ → Loc are functions mapping each program command to its source and target location. Let P be a program as given above. An indexed command hσ : ii ∈ Σ × N of P is a pair consisting of a program command σ and an identifier i for the thread that executes the command.1 For any natural number N , define Σ(N ) to be the set of indexed commands hσ : ii with i ∈ {1, ..., N }. Let Σ be a set of program commands and N ∈ N be a natural number. A trace over Σ(N ) is a finite or infinite sequence of indexed commands. We use Σ(N )∗ to denote the set of all finite traces over Σ(N ) and Σ(N )ω to denote the set of infinite traces over Σ(N ). For a finite trace τ , we use |τ | to denote the length of τ . For a (finite or infinite) trace τ , we use τk to denote the kth letter of τ and τ [m, n] to denote the sub-sequence τm τm+1 · · · τn . For a finite trace τ , and a (finite or infinite) trace τ 0 , we use τ · τ 0 to denote the concatenation of τ and τ 0 . We use τ ω for the infinite trace obtained by the infinite repeated concatenation of the finite trace τ (τ · τ · τ · · ·). For a parameterized program P and a number N ∈ N, we use P (N ) to denote a Büchi automaton that accepts the traces of the N -threaded instantiation of the program P . Formally, we define P (N ) = hQ, Σ(N ), ∆, q0 , F i where • Q = {1, ..., N } → Loc (states are N -tuples of locations) • ∆ = {(q, hσ : ii, q 0 ) : q(i) = src(σ) ∧ q 0 = q[i 7→ tgt(σ)]} • q0 = λi.`init (initially, every thread is at `init ) • F = Q (every state is accepting) We use L(P (N )) to denote the language recognized by P (N ), and S define the set of traces of P to be L(P ) = N ∈N L(P (N )). We call the traces in L(P ) program traces. Fix a set of global variables GV and a set of local variables LV. For any N ∈ N, we use LV(N ) to denote a set of indexed local variables of the form l(i), where l ∈ LV, and i ∈ {1, ..., N }. Var(N ) denotes the set GV ∪ LV(N ). We do not fix the syntax of program commands. A program assertion (program term) is a formula (term) over the vocabulary of some appropriate theory augmented with a symbol for each member of GV and LV(N ) (for all N ). For example, the program term (x(1) + y(2) + z) refers to the sum of Thread 1’s copy of the local variable x, Thread 2’s copy of the local variable y, and the global variable z, and can be evaluated in a program state with at least the threads {1, 2}; the program assertion (x(1) > x(2)) is satisfied by any state (with at least the threads {1, 2}) where Thread 1’s value for x is greater than Thread 2’s. We do not explicitly formalize the semantics of parameterized programs, but will rely on an intuitive understanding of some standard concepts. We write s |= ϕ to indicate that the program state s hσ:ii satisfies the program assertion ϕ. We write s −−−→ s0 to indicate that s may transition to s0 when thread i executes the command σ. Lastly, we say that a program state s is initial if the program may begin in state s. A trace hσ1 : i1 ihσ2 : i2 i· · · is said to be feasible if there exists a corresponding infinite execution starting from some initial state s0 : hσ1 :i1 i hσ2 :i2 i s0 −−−−→ s1 −−−−→ · · · . A trace for which there is no corresponding infinite execution is said to be infeasible. Finally, we may give our definition of parameterized program termination as follows: 1 In the following, we will use typewriter font i as a meta-variable that ranges over thread identifiers (so i is just a natural number, but one that is intended to identify a thread). Definition 2.1 (Parameterized Program Termination). We say that a parameterized program P terminates if every program trace of P is infeasible. That is, for every N , every τ ∈ L(P (N )) is infeasible. ⌟ This definition captures the fact that a counter-example to parameterized termination involves only finitely many threads (i.e., a counter example is a trace τ ∈ L(P (N )) for some N ). This is due to the definition of the set of traces of a parameterized program L(P ) (which is a language over an infinite alphabet) as an infinite union of languages L(P (N )), each over a finite alphabet. The next two sections concentrate on parameterized program termination. We will return to general liveness properties in Section 5. 3. Well-founded Proof Spaces A well-founded proof space is a formalism for proving parameterized termination by proving that its set of program traces are infeasible. This section defines well-founded proof spaces, establishes a sound proof rule for parameterized program termination, and describes how well-founded proof spaces can be used in an incremental algorithm for proving parameterized program termination. 3.1 Overview We motivate the formal definitions that will follow in this section by informally describing the role of well-founded proof spaces in an incremental strategy (á la [7, 8]) for proving termination of parameterized programs. The pseudo-code for this (semi-)algorithm is given in Algorithm 1. The algorithm takes as input a parameterized program P and returns “Yes” if P terminates, “No” if P has a trace that can be proved non-terminating, and “Unknown” if the algorithm encounters a trace it cannot prove to be terminating or non-terminating. (There is also a fourth possibility that the algorithm runs forever, repeatedly sampling traces but never finding a termination argument that generalizes to the whole program). Input : Parameterized program P B←∅ /* Initialize the basis, B */ /* Has every program trace been proved infeasible? */ 2 while L(P ) * ω(hhBii) do /* Sample a possibly-feasible trace */ 3 Pick τ ∈ L(P ) \ ω(hhBii) 4 switch FindInfeasibilityProof(τ ) do 5 case Infeasibility proof Π 6 Construct B 0 from Π so that τ ∈ ω(hhB 0 ii) 7 B ← B + B0 8 case Feasibility proof Π 9 return No /* P is non-terminating */ 10 otherwise 11 return Unknown /* Inconclusive */ 12 return Yes /* P is terminating */ Algorithm 1: Incremental algorithm for parameterized program termination 1 Algorithm 1 builds a well-founded proof space by repeatedly sampling traces of P , finding infeasibility proofs for the samples, and then assembling the proofs into a well-founded proof space. More precisely, the algorithm builds a basis B for a proof space, which can be seen as a finite set of axioms that generates a (typically infinite) well-founded proof space hhBii. The wellfounded proof space hhBii serves as an infeasibility proof for a set of traces, which is denoted ω(hhBii) (Definition 3.3). The goal of the algorithm is to construct a basis for a well-founded proof space that proves the infeasibility of every program trace (at line 2, L(P ) ⊆ ω(hhBii)): if the algorithm succeeds in doing so, then P terminates. We will illustrate the operation of this algorithm on the simple example pictured in Figure 2. The algorithm begins with an empty basis B (at line 1): the empty basis generates an empty wellfounded proof space hhBii that proves infeasibility of an empty set of traces (i.e., ω(hhBii) = ∅). Since the inclusion L(P ) ⊆ ω(hhBii) does not hold (at line 2), we sample (at line 3) a possiblyfeasible program trace τ ∈ L(P ) \ ω(hhBii) (we delay the discussion of how to verify the inclusion L(P ) ⊆ ω(hhBii) to Section 4). Suppose that our choice for τ is the trace pictured in Figure 3(a), in which a single thread (Thread 1) executes the loop forever. This trace is ultimately periodic: τ is of the form π · ρω , where π (the stem) and ρ (the loop) are finite traces. Under reasonable assumptions (that we formalize in Section 3.3) we ensure that sample traces (counter-examples to the inclusion L(P ) ⊆ ω(hhBii)) are ultimately periodic. The importance of ultimate periodicity is two-fold: first, ultimately periodic traces have a (non-unique) finite representation: a pair of finite words hπ, ρi. Second, ultimately periodic traces correspond to a simple class of sequential programs, allowing Algorithm 1 to leverage the wealth of techniques that have been developed for proving termination [3, 18, 25] and nontermination [17]. The auxiliary procedure FindInfeasibilityProof denotes an (unspecified) algorithm that uses such techniques to prove feasibility or infeasibility of a given trace. Suppose that calling FindInfeasibilityProof on the sample trace τ gives the infeasibility proof pictured in Figure 3(b) and (c). The infeasibility proof has two parts. The first part is an invariance proof, which is a Hoare proof of an inductive invariant (d(1) > 0) that supports the termination argument. The second part is a variance proof, which is a Hoare proof that (assuming the inductive invariant holds at the beginning of the loop) executing the loop causes the state of the program to decrease in some well-founded order. This well-founded order is expressed by the ranking formula old(x) > x ∧ old(x) ≥ 0 (the post-condition of the variance proof). This formula denotes a (well-founded) binary relation between the state of the program and its old state (the program state at the beginning of the loop) that holds whenever the value of x decreases and was initially non-negative. Since there is no infinite descending sequence of program states in this well-founded order, the trace τ (which executes the loop infinitely many times) is infeasible. We use the termination proof for τ to construct a basis B 0 for a well-founded proof space (at line 6). This is done by breaking the termination proof down into simpler components: the Hoare triples that were used in the invariance and variance proofs, and the ranking formula that was used in the variance proof. The basis B 0 constructed from Figure 3 is pictured in Figure 4. We then add B 0 to the incrementally constructed basis B (at line 7) and begin the loop again, sampling another possibly-feasible trace τ 0 ∈ L(P ) \ ω(hhBii). The incremental algorithm makes progress in the sense that it never samples the same trace twice: if τ is sampled at some loop iteration, then τ ∈ ω(hhBii) for all future iterations. But in fact, ω(hhBii) contains infinitely many other traces, whose termination proofs can be derived from the same basic building blocks (Hoare triples and ranking formulas) as τ . For example, ω(hhBii) contains all traces of the form ω hx=pos() : iihd=pos() : ii h[x>0] : iihx=x-d : ii (all of which are, intuitively, infeasible for the same reason as τ ). The essential idea is that new Hoare triples and ranking formulas can be deduced from the ones that appear in the basis B by applying some simple inference rules. The resulting collections of Hoare triples and ranking formulas (which are closed under these inference rules) forms a well-founded proof space hhBii. Thus in Algorithm 1, well-founded proof spaces serve as a mechanism for gener- global int x local int d x = pos() d = pos() while (x > 0): x = x - d Hoare triples: [x>0] x=pos() 1 d=pos() 3 2 4 x=x-d Figure 2. Decrement example, pictured along side its control flow graph. The expression pos() denotes a non-deterministically generated positive integer, and the command [x>0] is an assumption; its execution does not change the state of the program, but it can only proceed when x is greater than 0. hx=pos() : 1ihd=pos() : 1i (h[x>0] : 1ihx=x-d : 1i)ω | {z } | {z } Stem Loop (a) An ultimately periodic trace of Figure 2 {true} hx=pos() : 1i {true} hd=pos() : 1i {d(1) > 0} h[x>0] : 1i {d(1) > 0} hx=x-d : 1i {d(1) > 0} {d(1) > 0 ∧ old(x) = x} h[x>0] : 1i {d(1) > 0 ∧ old(x) = x ∧ old(x) ≥ 0} hx=x-d : 1i {old(x) > x ∧ old(x) ≥ 0} (b) Invariance proof (c) Variance proof Figure 3. An ultimately periodic trace and termination proof. alizing infeasibility proofs: they provide an answer to the question given infeasibility proofs for a finite set of sample traces, how can we re-arrange the ingredients of those proofs to form infeasibility proofs for other traces? We will stop our demonstration of Algorithm 1 here, concluding with a listing of the remaining Hoare triples that must be discovered by the algorithm to complete the proof (that is, if those triples are added to the basis B, then ω(hhBii) contains L(P )): {d(1) > 0} hx=pos() : 2i {d(1) > 0} {d(1) > 0} hd=pos() : 2i {d(1) > 0} {d(1) > 0} h[x>0] : 2i {d(1) > 0} {d(1) > 0} hx=x-d : 2i {d(1) > 0} {old(x) ≥ 0} h[x>0] : 1i {old(x) ≥ 0} {old(x) ≥ 0} hx=x-d : 1i {old(x) ≥ 0} {old(x) > x} h[x>0] : 1i {old(x) ≥ 0} {d(1) > 0 ∧ old(x) > x} hx=x-d : 1i {old(x) > x} . The remainder of this section is organized as follows: in Section 3.2, we give the formal definition of well-founded proof spaces, and describe how a well-founded proof space proves infeasibility of an infinite set of traces. This section treats well-founded proof spaces as a mathematical object, divorcing it from its algorithmic side. In Section 3.3, we describe regular well-founded proof spaces, a restricted form of well-founded proof spaces. The key result in this section (Theorem 3.8) is that to prove parameterized program termination, it is sufficient for a regular proof space to prove that the ultimately periodic traces of the program terminate. 3.2 Formal definition of Well-founded proof spaces A well-founded proof space is a set of Hoare triples and a set of ranking terms, both closed under certain rules of inference. They serve two roles. First, they are the core of a proof rule for parameterized program termination. A well-founded proof space acts as a termination certificate for a set of infinite traces (Definition 3.3); we may prove that a program P terminates by showing that all traces {true} hx=pos() : 1i {true} {true} hd=pos() : 1i {d(1) > 0} {d(1) > 0} h[x>0] : 1i {d(1) > 0} {d(1) > 0} hx=x-d : 1i {d(1) > 0} {old(x) = x} h[x>0] : 1i {old(x) = x} {old(x) = x} h[x>0] : 1i {old(x) ≥ 0} {d(1) > 0 ∧ old(x) = x} hx=x-d : 1i {old(x) > x} {old(x) ≥ 0} hx=x-d : 1i {old(x) ≥ 0} Ranking formula: old(x) > x ∧ old(x) ≥ 0 Figure 4. Basis computed from the termination proof in Figure 3 of L(P ) are contained inside this set. Second, well-founded proof spaces are a mechanism for proof generalization: starting from a (finite) basis of Hoare triples, we can take the closure of the basis under some simple inference rules to form a well-founded proof space that proves the termination of a larger set of traces (Definition 3.2). We will now define these notions formally. We begin by formalizing the components of well-founded proof spaces, Hoare triples and ranking formulas, and their inference rules. A Hoare triple {ϕ} hσ : ii {ψ} consists of an indexed command hσ : ii and two program assertions ϕ and ψ (the pre- and post-condition of the triple, respectively). We say that such a triple is valid if for any pair of program hσ:ii states s, s0 such that s |= ϕ and s −−−→ s0 , we have s0 |= ψ. We can infer new valid Hoare triples from a set of given ones using the inference rules of proof spaces, namely S EQUENCING, S YMMETRY, and C ONJUNCTION [16]. We will recall the definition of these three rules below. S EQUENCING is a variation of the classical sequencing rule of Hoare logic. For example, we may sequence the two triples {true} hd=pos() : 1i {d(1) > 0} and {d(1) > 0} h[x>0] : 1i {d(1) > 0} to yield {true} hd=pos() : 1i · h[x>0] : 1i {d(1) > 0} . Two triples may be sequenced only when the post-condition of the first entails the pre-condition of the first, according to a combinatorial entailment rule. The combinatorial entailment relation is defined as ϕ1 ∧ ... ∧ ϕn ψ1 ∧ ... ∧ ψm iff {ϕ1 , ..., ϕn } ⊇ {ψ1 , ..., ψm } (i.e., ϕ ψ iff, viewed as sets of conjuncts, ϕ is a superset of ψ). Combinatorial entailment is a weaker version of logical entailment (which is used in the classical sequencing rule in Hoare logic). Our sequencing rule can be written as follows: S EQUENCING {ϕ0 } τ0 {ϕ1 } ϕ1 ϕ01 {ϕ01 } τ1 {ϕ2 } {ϕ0 } τ0 · τ1 {ϕ2 } S YMMETRY allows thread identifiers to be substituted uniformly in a Hoare triple. For example, from {true} hd=pos() : 1i {d(1) > 0} we may derive {true} hd=pos() : 2i {d(2) > 0} via the symmetry rule. Given a permutation π ∈ N → N and a program assertion ϕ, we use ϕ[π] to denote the result of substituting each indexed local variable l(i) in ϕ with l(π(i)). The symmetry rule may be written as follows: S YMMETRY {ϕ} hσ1 : i1 i· · · hσn : in i {ψ} {ϕ[π]} hσ1 : π(i1 )i· · · hσn : π(in )i {ψ[π]} π:N→N is a permutation C ONJUNCTION is precisely the conjunction rule of Hoare logic. For example, from the triples {d(1) > 0} h[x>0] : 1i {d(1) > 0} and {old(x) = x} h[x>0] : 1i {old(x) ≥ 0} we may derive {d(1) > 0 ∧ old(x) = x} h[x>0] : 1i {d(1) > 0 ∧ old(x) ≥ 0} . The conjunction rule can be written as follows: C ONJUNCTION {ϕ1 } τ {ψ1 } {ϕ2 } τ {ψ2 } {ϕ1 ∧ ϕ2 } τ {ψ1 ∧ ψ2 } A proof space is defined to be a set of valid Hoare triples that is closed under these three rules [16]. Proof spaces were used in [16] to prove infeasibility of a set of finite traces. To form a well-founded proof space, which proves infeasibility of a set of infinite traces, we enrich a proof space with a set of ranking formulas. A ranking formula is a logical representation of a well-founded order on program states. We suppose that each program variable x has an associated old version old(x) that allows formulas to refer to the value of x in some “previous” state. Any such formula ϕ can be interpreted as a binary relation Rϕ on states, with s Rϕ s0 iff ϕ holds in the interpretation that uses s to interpret the old variables and s0 to interpret the rest. A ranking formula is defined to be a formula w over the program variables and their old copies such that the relation Rw is a well-founded order. The only inference rule that we consider for ranking formulas is a symmetry rule: if w is a ranking formula and π : N → N is a permutation of thread identifiers, then w[π] is a ranking formula. We may now define well-founded proof spaces formally: Definition 3.1 (Well-founded proof space). A well-founded proof space hH , W i is a pair consisting of a set of Hoare triples H and a set of ranking formulas W such that H is closed under S EQUENCING, S YMMETRY, and C ONJUNCTION, and W is closed under permutations of thread identifiers. ⌟ We may present a well-founded proof as the closure of some basis (perhaps constructed from termination proofs of some small set of sample traces). Formally, Definition 3.2. Let H be a set of valid Hoare triples, and let W be a set of ranking formulas. H and W generate a well-founded proof space hhH, W ii, defined to be the smallest well-founded proof space hH , W i such that H ⊆ H and W ⊆ W . We say that hH, W i is a basis for hH , W i. ⌟ The fact that hhH, W ii is well-defined (i.e., contains only valid Hoare triples and ranking functions) follows immediately from the soundness of the inference rules for well-founded proof spaces. We associate with each well-founded proof space the set of all infinite traces that it proves infeasible. Intuitively, a well-founded proof space proves that a trace τ is infeasible by exhibiting a ranking formula w and a decomposition of τ into (infinitely many) finite segments τ = τ0 τ1 τ2 · · · such that for each i, the program state decreases in the order w along each segment τi . More formally, Definition 3.3. Let hH , W i be a well-founded proof space. We define the set ω(H , W ) of infinite traces recognized by hH , W i to be the set of infinite traces τ = hσ1 : i1 ihσ2 : i2 i· · · ∈ Σ(N )ω such that {ik : k ∈ N} is finite and there exists a sequence of naturals {αk }k∈N , and a ranking formula w ∈ W such that: 1. For all k ∈ N, αk < αk+1 2. For all k ∈ N, there exists some formula ϕ such that {true} τ [1, αk ] {ϕ} ∈ H , and ^ {ϕ ∧ old(x) = x} τ [αk + 1, αk+1 ] {w} ∈ H ⌟ x∈Var(N ) The fundamental property of interest concerning the definition of ω(H , W ) is the following soundness theorem: Theorem 3.4 (Soundness). Let hH , W i be a well-founded proof space. Then every infinite trace in ω(H , W ) is infeasible. ⌟ Theorem 3.4 is the basis of our proof rule for termination: for a given program P , if we can derive a well-founded proof space hH , W i such that ω(H , W ) contains all the traces of P , then P terminates. This proof rule justifies the soundness of Algorithm 1. 3.3 Ultimately periodic traces Algorithm 1 relies on an auxiliary procedure FindInfeasibilityProof to prove infeasibility of sample traces (counter-examples to the inclusion L(P ) ⊆ ω(hhBii)). An attractive way of implementing FindInfeasibilityProof is to use existing sequential program termination techniques [3, 18, 25] that are very good at proving termination by synthesizing ranking functions for programs of a restricted form, namely so-called lasso programs. To take advantage of these techniques, we must ensure that the sample traces given to FindInfeasibilityProof are ultimately periodic, so that they may be represented by lasso programs. This section defines a regularity condition on well-founded proof spaces that enables us to ensure that ultimately periodic counter-examples always exist. An ultimately periodic trace is an infinite trace of the form π · ρω , where π and ρ are finite traces. Such a trace corresponds to a lasso program, a sequential program that executes the sequence π followed by ρ inside of a while loop (since only finitely many threads are involved in π and ρ, the local variables of each thread may be renamed apart). The question in this sub-section is x=0 how can we prove parameterized pro- while(true): i = 0 gram termination while sampling only while(i < x): the counter-example traces to the suffii++ ciency of the proof argument that are ulx++ timately periodic? Phrased differently, is proving termination of ultimately periodic traces enough to prove parameterized program termination? The (sequential) program to the right illustrates the potential pitfall: even though every ultimately periodic trace of the program is infeasible, the program does not terminate. We place restrictions on well-founded proof spaces so that any (suitably restricted) well-founded proof space that proves termination of all ultimately periodic program traces inevitably proves termination of all program traces (i.e., if ω(H , W ) includes all ultimately periodic traces in L(P ), it inevitably contains all of L(P )). These restrictions are somewhat technical, and can be skipped on a first reading. First, we exclude Hoare triples in which local variables “spontaneously appear”, such as x(2) in: {true} hx = 0 : 1i {x(1) = x(2) ∨ x(1) = 0} This triple is valid, but the appearance of x(2) in the post-condition is arbitrary. This technical restriction is formalized by well-formed Hoare triples: Definition 3.5 (Well-formed Hoare triple). A Hoare triple {ϕ} τ {ψ} is well-formed if for each i ∈ N such that an indexed local variable of the form x(i) appears in the post-condition ψ, then either i executes some command along τ or x(i) or some other indexed local variable y(i) with the same index i appears in the precondition ϕ. ⌟ The second restriction we make is to require that the wellfounded proof space is generated by a finite basis in which there are no “weak” Hoare triples. There are two types of weakness we prohibit. First, we exclude Hoare triples with conjunctive postconditions {ϕ} τ {ψ1 ∧ ψ2 } because such a triple can be derived from the pair {ϕ} τ {ψ1 } and {ϕ} τ {ψ2 } via the C ONJUNCTION rule. Second, we exclude Hoare triples for traces of length greater than one {ϕ} τ · hσ : ii {ψ} because such a triple can be derived from the pair {ϕ} τ {ϕ0 } and {ϕ0 } hσ : ii {ψ} (for some choice of ϕ0 ) via the S EQUENCING rule. We formalize these restrictions with basic Hoare triples: Definition 3.6 (Basic Hoare triple). A Hoare triple {ϕ} hσ : ii {ψ} is basic if it is valid, well-formed, and the post-condition ψ is atomic in the sense that it cannot be constructed by conjoining two other formulas. ⌟ We call a well-founded proof space that meets all of these technical restrictions regular. Formally: Definition 3.7 (Regular). We say that a well-founded proof space hH , W i is regular if there exists a finite set of basic Hoare triples H and a finite set of ranking formulas W such that hH, W i generates hH , W i. ⌟ The justification for calling such proof spaces regular is that if hH , W i is regular, then ω(H , W ) is “nearly” ω-regular, in the sense that ω(H , W ) ∩ Σ(N )ω is ω-regular (accepted by a Büchi automaton) for all N ∈ N. Finally, we state the main result of this sub-section: regular well-founded proof spaces guarantee the existence of ultimately periodic counter-examples. More precisely, if there is a sample program trace that cannot be proved terminating by a given regular well-founded proof space, then there is also an ultimately periodic counter-example. Theorem 3.8. Let P be a parameterized program and let hH , W i be a regular well-founded proof space. If every ultimately periodic program trace π · ρω ∈ L(P ) is included in ω(H , W ), then every program trace τ ∈ L(P ) is included in ω(H , W ). ⌟ S Proof. For any set of traces L ⊆ N Σ(N )ω , we define UP(L) to be the set of ultimately periodic traces that belong to L: UP(L) = {τ ∈ L : ∃π, ρ ∈ Σ(N )∗ .τ = πρω )} . We must prove that if UP(L(P )) ⊆ ω(H , W ) then L(P )) ⊆ ω(H , W ). We suppose that UP(L(P )) ⊆ ω(H , W ) and (reS calling the definition L(P ) = N L(P (N ))) prove that for all N ∈ N, the inclusion L(P (N )) ⊆ ω(H , W ) holds. Let N be an arbitrary natural number. Since UP(L(P (N ))) ⊆ UP(L(P )) ⊆ ω(H , W ) we have UP(L(P (N ))) ∩ Σ(N )ω ⊆ ω(H , W ) ∩ Σ(N )ω . Since (by definition) L(P (N )) ⊆ Σ(N )ω , we can simplify: UP(L(P (N ))) ⊆ ω(H , W ) ∩ Σ(N )ω . (1) It is a well known fact that if L1 and L2 are ω-regular languages (over a finite alphabet), then UP(L1 ) ⊆ L2 implies L1 ⊆ L2 . The language L(P (N )) is ω-regular by definition, so if we can show that ω(H , W ) ∩ Σ(N )ω is ω-regular, then Inclusion (1) implies L(P (N )) ⊆ ω(H , W ) ∩ Σ(N )ω and thus the desired result L(P (N )) ⊆ ω(H , W ). It remains only to show that ω(H , W ) ∩ Σ(N )ω is ω-regular. Here we will sketch the intuition why there exists a Büchi automaton that recognizes ω(H , W ) ∩ Σ(N )ω . Since hH , W i is regular, every Hoare triple in H is well-formed: this can be proved by induction on the derivation of the triple from the (well-formed) basis. As a result, there are only finitely many program assertions that are relevant to the acceptance condition of a trace τ ∈ Σ(N )ω in ω(H , W ). Intuitively, we can construct from this finite set of relevant assertions the finite state space of a Büchi automaton that recognizes ω(H , W ) ∩ Σ(N )ω . Discussion of Theorem 3.8. The example program above shows that it would not be sound to prove program termination by proving termination of only its ultimately periodic program traces. However, it is sound to check sufficiency of a candidate regular wellfounded proof space by inspecting only the ultimately periodic program traces. This soundness boils down to the fact that each infinite execution involves only finitely many threads; more technically, the premise of our proof rule (the inclusion between two sets of traces over an infinite alphabet) is equivalent to the validity of an infinite number of inclusions between ω-regular languages over finite alphabets. 4. Checking Proof Spaces The previous section defines a new proof rule for proving termination of parameterized programs: given a parameterized program P , if there is some well-founded proof space hH , W i such that ω(H , W ) contains every trace of P , then P terminates. This section addresses two problems: (1) how can we verify that the premise of the proof rule holds?, and (2) how can we generate an ultimately periodic counter-example if it does not? The key idea in this section is to reduce the problem of checking the premise (an inclusion problem for sets of infinite traces over an unbounded alphabet) to a non-reachability problem for a particular type of abstract machine (namely, quantified predicate automata). The first step in our reduction to non-reachability is to reduce the inclusion L(P ) ⊆ ω(H , W ) to an inclusion problem on finite traces. By Theorem 3.8, we know that it is sufficient to check that the ultimately periodic traces of L(P ) are included in ω(H , W ). Ultimately periodic traces can be represented as finite traces which we call lassos. A lasso is a finite trace of the form τ $ρ, where τ, ρ ∈ Σ(N )∗ (for some N ) and $ is a special character not appearing in Σ(N ). A lasso τ $ρ can be seen as a finite representation of the ultimately periodic trace τ · ρω . Note, however, that the correspondence between lassos and ultimately periodic traces is not one-to-one: an ultimately periodic trace τ ρω is represented by infinitely many lassos, for example τ $ρ, τ $ρρ, τ ρ$ρ, and so on. For a set of traces L, we define its lasso language as $(L) = {τ $ρ : τ · ρω ∈ L} It is easy to show (using Theorem 3.8) that the inclusion L(P ) ⊆ ω(H , W ) holds if and only if $(L(P )) ⊆ $(ω(H , W )). However, it is not easy to give a direct definition of $(ω(H , W )) that lends itself to recognition by an automaton of some variety. Instead, we give an alternate lasso language $(H , W ) that is not exactly equal to $(ω(H , W )), but (as we will see in the following) is suitable for our purpose: Definition 4.1. Let hH , W i be a well-founded proof space. Define $(H , W ) to be the set of lassos τ $ρ such that there is some N ∈ N so that τ, ρ ∈ Σ(N )∗ and there exists some assertion ϕ and some ranking formula w ∈ W such that: i) {true}Vτ {ϕ} ∈ H ii) {ϕ ∧ x∈Var(N ) old(x) = x} τ {w} ∈ H ⌟ Note that $(H , W ) is neither a subset nor a superset of the set of lassos $(ω(H , W )) that correspond to ultimately periodic words in ω(H , W ). In fact, $(H , W ) may even contain lassos τ $ρ such that τ · ρω is feasible: consider for example the lasso hy = 1 : 1i$hx = x - y : 1ihy = -1 : 1i: a well-founded proof space can prove that x decreases across the loop of this lasso, but this holds only for the first iteration of the loop, and says nothing of subsequent iterations. Despite this, if the inclusion $(L(P )) ⊆ $(H , W ) holds, then every trace of P is proved infeasible by the well-founded proof space hH , W i. The intuition behind this argument is that if the inclusion $(L(P )) ⊆ $(H , W ) holds, then for any ultimately periodic trace τ ·ρω of L(P ) every representation of τ · ρω as a lasso is included in $(L(P )), and thus in $(H , W ). Theorem 4.2 (Inclusion Soundness). Let P be a parameterized program, and let hH , W i be a regular well-founded proof space. If $(L(P )) ⊆ $(H , W ), then L(P ) ⊆ ω(H , W ). ⌟ Proof. Suppose that the inclusion $(L(P )) ⊆ $(H , W ) holds. By Theorem 3.8, it is sufficient to prove that every ultimately periodic trace of L(P ) is in ω(H , W ). So let τ · ρω ∈ L(P ), and we will prove that τ · ρω ∈ ω(H , W )). Since τ ρω ∈ L(P ), we must have τ ρn $ρk ∈ $(L(P )) ⊆ $(H , W ) for all naturals n and positive naturals k. From the membership of τ ρn $ρk in $(H , W ) and the definition of $(H , W ), there must exist some program assertion ϕn,k and some ranking formula wn,k ∈ W such that: {true} τ ρn {ϕn,k } ∈ H , and ^ {ϕn,k ∧ old(x) = x} ρk {wn,k } ∈ H x∈Var(N ) Define an equivalence relation ∼ on the set of pairs (n, m) ∈ N2 such that n < m by defining (n, m) ∼ (n0 , m0 ) iff the ranking formulas wn,m−n and wn0 ,m0 −n0 are equal. Since the set of ranking formulas {wn,k ∈ W : n, k ∈ N ∧ k ≥ 1} is finite (following the same reasoning as in the proof of Theorem 3.8), the equivalence relation ∼ has finite index. We use [w] to denote the equivalence class consisting of all (n, m) such that wn,m−n = w. By Ramsey’s theorem [27], there is some ranking formula w and some infinite set of naturals D ⊆ N such that for all d, d0 ∈ D with d < d0 , we have (d, d0 ) ∈ [w]. We conclude that τ ρω ∈ ω(H , W ) by observing (c.f. Definition 3.3) that there is an infinite sequence of naturals {αi }i∈N defined by αi = |τ | + di · |ρ| (where di is the ith smallest element of D) such that the following hold: i) For any i ∈ N, since (by definition) di < di+1 , we have αi = |τ | + di · |ρ| < |τ | + di+1 · |ρ| = αi+1 ii) Let i ∈ N, and define n = (αi − |τ |)/|ρ| k = (αi+1 − αi )/|ρ| . Observe that: τ ρω [1, αi ] = τ · ρn τ ρω [αi + 1, αi+1 ] = ρk . Recalling that w = wn,k , it holds that {ϕn,k ∧ {true} τ ρn {ϕn,k } ∈ H ^ old(x) = x} ρk {wn,k } ∈ H x∈Var(N ) Remark 4.3. We note that the reverse of the Inclusion Soundness theorem does not hold: if L(P ) ⊆ ω(H , W ), it is not necessarily the case that $(L(P )) ⊆ $(H , W ). ⌟ 4.1 Quantified Predicate Automata The previous section establishes that a sufficient condition for verifying the premise L(P ) ⊆ ω(H , W ) of our proof rule (an inclusion problem for sets of infinite traces) is to verify the inclusion $(L(P )) ⊆ $(H , W ) (an inclusion problem for sets of finite traces). In this section, we define quantified predicate automata, a class of automata that are capable of recognizing the difference $(L(P )) \ $(H , W ). This allows us to characterize the problem of checking the inclusion $(L(P )) ⊆ $(H , W ) as a safety problem: non-reachability of an accepting configuration in a quantified predicate automaton (that is, the emptiness problem). Quantified predicate automata (QPA) are infinite-state and recognize finite traces. QPAs extend predicate automata ([16]) with quantification, enabling them to recognize the lasso language $(L(P )). Predicate automata are themselves an infinite-state generalization of alternating finite automata [4, 6]. Our presentation of QPA will follow the presentation of predicate automata from [16]. Fix an enumeration {i0 , i1 , ...} of variable symbols. Every quantified predicate automaton is equipped with a finite relational vocabulary hQ, ari, consisting of a finite set of predicate symbols Q and a function ar : Q → N that maps each predicate symbol to its arity. We use F(Q, ar) to denote the set of positive first-order formulas over the vocabulary hQ, ari, defined as follows: ϕ, ψ ∈ F (Q, ar) ::= q(ij1 , ..., ijar(q) ) | ij = ik | ij 6= ik | ϕ ∧ ψ | ϕ ∨ ψ | ∀ij .ϕ | ∃ij .ϕ Quantified predicate automata are defined as follows: Definition 4.4 (Quantified predicate automata). A quantified predicate automaton (QPA) is a 6-tuple A = hQ, ar, Σ, δ, ϕstart , F i where • hQ, ari is a finite relational vocabulary, • Σ is a finite alphabet, • ϕstart ∈ F(Q, ar) is a sentence over the vocabulary hQ, ari, • F ⊆ Q is a set of accepting predicate symbols, and • δ : Q × Σ → F (Q, ar) is a transition function that satisfies the property that for any q ∈ Q and σ ∈ Σ, the free variables of the formula δ(q, σ) belong to the set {i0 , ..., iar(q) }. The transition function δ can be seen as a symbolic rewrite rule hσ:i0 i q(i1 , ..., iar(q) ) −−−−→ δ(q, σ) , so the free variable restriction enforces that all variables on the right-hand-side are bound on the left-hand-side. ⌟ A QPA A = hQ, ar, Σ, δ, ϕstart , F i defines an infinite-state non-deterministic transition system, with transitions labeled by indexed commands. The configurations of the transition system are the set of finite structures over the vocabulary hQ, ari. That is, a configuration C of A consists of a finite universe U C ⊆fin N (where U C should be interpreted as a set of thread identifiers) along with an interpretation q C ⊆ (U C )ar(q) for each predicate symbol q ∈ Q. A configuration C is initial C |= ϕstart , and accepting if for all q ∈ / F, q C = ∅. Given A-configurations C and C 0 , σ ∈ Σ, and k ∈ U C , C σ:k transitions to C 0 on reading hσ : ki, written C −−→ C 0 , if C and C 0 0 have the same universe (U C = U C ), and for all predicate symbols q ∈ Q and all hi1 , ..., iar(q) i ∈ q C , we have C 0 |= δ(q, σ)[i0 7→ k, i1 7→ i1 , ..., iar(q) 7→ iar(q) ] . For a concrete example of a transition, suppose that δ(p, a) = p(i1 , i2 ) ∨ (i0 6= i1 ∧ q(i2 )) . To make variable binding more explicit, we will write this rule in the form δ(p(i, j), ha : ki) = p(i, j) ∨ (k 6= i ∧ q(j)) . For example, if C is a configuration with C |= p(3, 4), then a transia:1 tion C −−→ C 0 is possible only when C 0 |= p(3, 4) ∨ (1 6= 3 ∧ q(4)). QPAs read input traces from right to left. A trace τ = hσ1 : i1 i· · · hσn : in i is accepted by A if there is a sequence of configurations Cn , ..., C0 such that Cn is initial, C0 is accepting, and for each r ∈ {1, ..., n}, σr :ir −→ Cr−1 . We define L(A) to be the set all traces we have Cr −− that are accepted by A. Recall that the goal stated at the beginning of this section was to develop a class of automaton capable of recognizing the difference $(L(P )) \ $(H , W ) (for any given parameterized program P and regular well-founded proof space hH , W i), and thereby arrive at a sufficient automata-theoretic condition for checking the premise of the proof rule established in Section 3. The following theorem states that quantified predicate automata achieve this goal. Theorem 4.5. Let P be a parameterized program and a let hH , W i be a regular well-founded proof space. Then there is a QPA that accepts $(L(P )) \ $(H , W ). ⌟ The proof of this theorem proceeds in three steps: (I) $(L(P )) is recognizable by a QPA (Proposition 4.6), (II) $(H , W ) is recognizable by a QPA (Proposition 4.6), and (III) QPAs are closed under Boolean operations (Proposition 4.8). Starting with step (I), we need the following proposition. Proposition 4.6. Let P be a parameterized program. Then there is a QPA A(P ) that accepts $(L(P )). ⌟ Proof. Let P = hLoc, Σ, `init , src, tgti be a parameterized program. For a word τ ∈ Σ(N )∗ and a thread i, define τ |i to be a the sub-sequence of τ consisting of the commands executed by thread i. A word τ $ρ is a lasso of P if for each thread i, (1) τ |i corresponds to a path in P , and (2) ρ|i corresponds to a loop in P . We construct the QPA A(P ) = hQ, ar, Σ, δ, ϕstart , F i as follows: • Q = Loc ∪ (Loc × Loc) ∪ {$}, where $ is a nullary predicate symbol and the rest are monadic. The intuitive interpretation of propositions over this vocabulary are as follows: A trace is accepted starting from a configuration C with C |= $ if the next letter is not $. This predicate is used to enforce the condition that the loop of a lasso is not empty. For each ` ∈ Loc and each thread i, a trace τ is accepted starting from a configuration C with C |= `(i) if τ |i corresponds to a path in P ending at `. For each `1 , `2 ∈ Loc and each thread i, a trace τ $ρ is accepted starting from a configuration C with C |= h`1 , `2 i(i) if τ |i corresponds to a path in P ending at `1 and ρ|i corresponds to a path in P from `1 to `2 . W • ϕstart = $ ∧ ∀i. `∈Loc h`, `i(i) • F = {`init } (the automaton accepts when every thread returns to the initial location) The transition function δ is defined as follows. For any location `1 , command σ, and thread i, if tgt(σ) = `1 and i is at `1 , then reading hσ : ii causes thread i to move from `1 to src(σ) while other threads stay put: δ(h`1 , `2 i(i), hσ : ji) = (i = j ∧ htgt(σ), `2 i(i)) ∨ (i 6= j ∧ h`1 , `2 i(i)) δ(`1 (i), hσ : ji) = (i = j ∧ tgt(σ)(i)) ∨ (i 6= j ∧ `1 (i)) For any location `1 , command σ, and thread i, if thread i is at `1 and `1 6= tgt(σ), then the automaton rejects when it reads hσ : ii, but stays put when executing the command of another thread: δ(h`1 , `2 i(i), hσ : ji) = (i 6= j ∧ h`1 , `2 i(i)) δ(`1 (i), hσ : ji) = (i 6= j ∧ `1 (i)) . Upon reading $, the automaton transitions from h`1 , `1 i(i) to `1 (i): δ(h`1 , `1 i(i), h$ : ji) = `1 (i) ; but for `1 6= `2 , the automaton rejects: δ(h`1 , `2 i(i), h$ : ji) = false . Finally, the nullary predicate $ ensures that the next letter in the word is not $: δ($, h$ : ji) = false δ($, hσ : ji) = true . Moving on to step (II): Proposition 4.7. Let hH , W i be a regular well-founded proof space with basis hH, W i. Then there is a QPA A(H, W ) that accepts $(H , W ). ⌟ The construction is similar to the construction of a predicate automaton from a proof space [16]. Intuitively, each Hoare triple in the basis of a regular proof space corresponds to a transition of a QPA. For example, the Hoare triple {d(1) > 0 ∧ old(x) = x} hx=x-d : 1i {old(x) > x} corresponds to the transition δ([old(x) > x], hx=x-d : ii) = [d(1) > 0](i) ∧ [old(x) = x] . Details can be found in the appendix. Finally, we conclude with step (III): Proposition 4.8. QPA languages are closed under Boolean operations (intersection, union, and complement). ⌟ The constructions follow the classical ones for alternating finite automata. Again, details can be found in the appendix. 4.2 QPA Emptiness We close this section with a discussion of the emptiness problem for quantified predicate automata. First, we observe that the emptiness problem for QPA is undecidable in the general case, since emptiness is undecidable even for quantifier-free predicate automata [16]. In this respect, our method parallels incremental termination provers for sequential programs: the problem of checking whether a candidate termination argument is sufficient is reduced to a safety problem that is undecidable. Although the emptiness problem is undecidable, safety is a relatively well-studied problem for which there are existing logics and algorithmic techniques. In particular, inductive invariants for QPA can serve as certificates of their emptiness. In the remainder of this section we detail emptiness certificates, which formalize this idea. Intuitively, an emptiness certificate for a QPA is a positive formula that is entailed by the initial condition, inductive with respect to the transition relation, and that has no models that are accepting configurations. A problem with this definition is that the transition relation is infinitely-branching (we must verify that the emptiness certificate is inductive with respect to the transition relation labeled with any indexed command, of which there are infinitely many). So first we define a symbolic post-condition operator that gives a finite representation of these infinitely many transitions. Given a QPA A = hQ, ar, Σ, δ, ϕstart , F i, we define a symbolic post-condition operator δ̂ : F(Q, ar) × Σ → F (Q, ar) as follows: δ̂(ϕ, σ) = ∃i.δ̂(ϕ, hσ : ii), where i is a fresh variable symbol not appearing in ϕ and δ̂(ϕ, hσ : ii) is the result of substituting each proposition q(j1 , ..., jar(q) ) that appears in ϕ with δ(q, σ)[i0 7→ i, i1 7→ j1 , ..., iar(q) 7→ jar(q) ] . We may now formally define emptiness certificates: Definition 4.9. Let A = hQ, ar, Σ, δ, ϕstart , F i be a QPA. An emptiness certificate for A is a positive first-order formula ϕ ∈ F(Q, ar) along with proofs of the following entailments: 1. Initialization: ϕstart ` ϕ 2. Consecution: For W all σ ∈ Σ, δ̂(ϕ, σ) ` ϕ 3. Rejection: ϕ ` q∈Q\F ∃i1 , ..., iar(q) .q(i1 , ..., iar(q) ). ⌟ The following result establishes that that emptiness certificates are a sound proof system for verifying emptiness of a QPA. Theorem 4.10. Let A = hQ, ar, Σ, δ, ϕstart , F i be a QPA. If there is an emptiness certificate for A, then L(A) is empty. ⌟ 5. Beyond Termination In the last two sections presented a technique that uses wellfounded proof spaces to prove that parameterized programs terminate. This section extends the technique so that it may be used to prove that parameterized programs satisfy general liveness properties. The class of liveness properties we consider are those that are definable in (thread) quantified linear temporal logic (QLTL), which extends linear temporal logic with thread quantifiers to express properties of parameterized systems. Given a finite alphabet Σ, a QLTL(Σ) formula is built using the connectives of first-order and linear temporal logic, where quantifiers may not appear underneath temporal modalities, and where every proposition is either i = j (for some thread variables i, j) or hσ : ii (for some σ ∈ Σ and thread variable i). A satisfaction relation |= defines when a trace τ satisfies a QLTL(Σ) formula, using a map µ to interpret free variables: τ, µ |= i = j ⇐⇒ µ(i) = µ(j) τ, µ |= hσ : ii ⇐⇒ τ1 = hσ : µ(i)i τ, µ |= ϕUψ ⇐⇒ ∃k ∈ N.(∀i < k.τ [i, ω], µ |= ϕ) ∧ (τ [k, ω], µ |= ψ) τ, µ |= Xϕ ⇐⇒ τ [2, ω] |= ϕ τ, µ |= ∃i.ϕ ⇐⇒ ∃i ∈ {1, ..., N }.τ, µ[i 7→ i] |= ϕ τ, µ |= ϕ ∧ ψ ⇐⇒ τ, µ |= ϕ ∧ τ, µ |= ψ τ, µ |= ¬ϕ ⇐⇒ τ, µ 6|= ϕ The rest of the connectives are defined by the usual equivalences (∀i.ϕ ≡ ¬∃i.¬ϕ, Fϕ ≡ trueUϕ, Gϕ ≡ ¬F¬ϕ, ϕ ∨ ψ ≡ ¬(¬ϕ ∧ ¬ψ)). For a concrete example, the following formula expresses the liveness property of the ticket protocol (Figure 1), “if every thread executes infinitely often, then no thread is starved”: _   ∀i.GF hσ : ii ⇒ ∀i.GFh[m<=s] : ii σ∈Σ The theorem enabling well-founded proof spaces to verify QLTL(Σ) properties is the following: Theorem 5.1. Let Σ be a finite alphabet, and let ϕ be a QLTL(Σ) sentence. There is a QPA A(ϕ) that recognizes the language: [ $(L(ϕ)) = {τ $ρ ∈ Σ(N )ω : τ ρω |= ϕ} ⌟ N Proof. See appendix. This theorem allows us to employ a classical idea for temporal verification [32]: to show that every execution of a program satisfies a QLTL property ϕ, we show that every program trace that violates ϕ is infeasible. Thus, we have the following proof rule: given a QLTL sentence ϕ and a parameterized program P , if there exists regular well-founded proof space hH , W i with basis hH, W i such that the language L(A(P ) ∧ A(¬ϕ) ∧ ¬A(H, W )) is empty, then P satisfies ϕ. Example 5.2. To illustrate the idea behind Theorem 5.1, we give a manual construction of a QPA for the (negated) liveness property of the ticket protocol. The negated liveness property can be written as a conjunction of a fairness constraint and a negated liveness constraint: _   ∀i.GF hσ : ii ∧ ∃i.FG¬h[m<=s] : ii σ∈Σ Given a lasso τ $ρ, the ultimately periodic word τ ρω satisfies the above property iff each thread executes some command along ρ (left conjunct) and there is some thread that does not execute [m<=s] along ρ (right conjunct). We construct a QPA with two monadic predicates exec and enter and one nullary predicate $ such that • τ $ρ is accepted from a configuration C with C |= exec(i) iff ρ contains a command of thread i, • τ $ρ is accepted from a configuration C with C |= enter(i) iff ρ does not contain h[m<=s] : ii, and • τ is accepted from a configuration C with C |= $ iff τ does not contain h$ : ii for any thread i. The initial formula of the QPA is (∀i.exec(i)) ∧ (∃i.enter(i)) and the only accepting predicate symbol is $. The transition relation of the QPA is as follows: δ(enter(i), h[m<=s] : ji) = i 6= j ∧ enter(i) δ(enter(i), h$ : ji) = $ δ(enter(i), hm=t++ : ji) = enter(i) δ(enter(i), hs++ : ji) = enter(i) δ(enter(i), h[m>s] : ji) = enter(i) δ(exec(i), h$ : ji) = false δ($, h$ : ji) = false and for all σ 6= $, δ(exec(i), hσ : ji) = i = j ∨ exec(i) δ($, hσ : ji) = $ . 6. ⌟ Discussion Although well-founded proof spaces are designed to prove termination of parameterized concurrent programs, a natural question is how they relate to existing methods for proving termination of sequential programs. This section investigates this question. We will compare with the method of disjunctively well-founded transition invariants, as exemplified by Terminator [7], and the language-theoretic approach, as used by Automizer [19]. Terminator, Automizer, and our approach using well-founded proof spaces employ the same high-level tactic for proving termination. The termination argument is constructed incrementally in a sample-synthesize-check loop: first, sample a lasso of the program, then synthesize a candidate termination argument (using a ranking function for that lasso), then check if the candidate argument applies to the whole program. However, they are based on fundamentally different proof principles. Terminator is based on the principle i = pos() of disjunctively well-founded transition if(0 ≤ i ≤ 1): i = 2*i - 1 invariants. Terminator proves termina// i is either 1 or -1 tion by showing that the transitive clowhile(x>0 ∧ z>0): sure of a program’s transition relation x = x + i is contained inside the union of a finite z = z - i number of well-founded relations. As a concrete example, consider the program to the right. Assuming that we restrict ourselves to linear ranking functions, well-founded proof spaces (and Automizer) cannot prove that this program terminates, because there is no linear term that decreases at every loop iteration. Terminator can prove this program terminates by showing that no matter how many iterations of the loop are executed, x decreases or z decreases. Like well-founded proof spaces, Automizer flag = true is based on a language-theoretic view of ter- while(z > 0): if(flag): mination. Automizer proves termination by x = z exhibiting a family of Büchi automata, each z = pos() of which recognizes a language of traces that else: terminate “for the same reason” (some given z = x - 1 ranking function decreases infinitely often), x = pos() and such that every trace of the program is flag = ¬flag recognized by one of the automata. Assuming that we restrict ourselves to linear ranking functions, Terminator cannot prove the program to the right terminates because there is no linear disjunctively well-founded relation that includes the odd loop iterations. Automizer (and well-founded proof spaces) can prove the program terminates using the linear ranking function z, which decreases infinitely often along any infinite trace (at every even loop iteration). In the case of non-parameterized concurrent programs, wellfounded proof spaces are equivalent in power to Automizer. Suppose that P is a program that is intended to be executed by a fixed number of threads N (i.e., we are interested only proving that every trace in P (N ) terminates). In this case, the premise of the proof rule (L(P ) ⊆ ω(H , W )) can be checked effectively using algorithms for Büchi automata, due to the fact that both L(P (N )) and ω(H , W ) ∩ Σ(N )ω are ω-regular. To cope with parameterized programs in which the number of threads is arbitrary, Section 4 describes a lasso variation of the proof rule (wherein we check $(L(P )) ⊆ $(H , W ) as a means to prove that L(P ) ⊆ ω(H , W )). The lasso proof rule is strictly weaker than Automizer’s, and the above program cannot be verified for the same reason that Terminator fails: there is no ranking function that decreases after odd iterations of the loop. That is, we cannot construct a well-founded proof space such that $(H , W ) contains τ $ρi for odd i (where τ represents the stem flag = true and ρ represents one iteration of the while loop). There is an interesting connection between the lasso variant of well-founded proof spaces and disjunctively well-founded transition invariants. Terminator checks that the transitive closure of the transition relation is contained inside a given disjunctively well-founded relation by proving safety of a transformed program. The transformed program executes as the original, but (at some point) non-deterministically saves the program state and jumps to another (disconnected) copy of the program, in which at every loop iteration the program asserts that the “saved” and “current” state are related by the disjunctively well-founded relation. Intuitively, this jump corresponds to exactly the $ marker in lasso languages: the traces that perform the jump in the transformed program can be put in exact correspondence with the traces of the lasso language $(L(P )). Thus, well-founded proof spaces relate to both the Terminator and Automizer proof rules. Section 3 is aligned with the languagetheoretic view of program termination used by Automizer. Section 4 mirrors the program transformation employed by Terminator to cope with transitive closure. 7. Conclusion This paper introduces well-founded proof spaces, a formal foundation for automated verification of liveness properties for parameterized programs. Well-founded proof spaces extend the incremental termination proof strategy pioneered in [7, 8] to the case of concurrent programs with unboundedly many threads. This paper investigates a logical foundation of an automated proof strategy. We leave for future work the problem of engineering heuristic techniques to make the framework work in practice. References [1] P. A. Abdulla, Y. Chen, G. Delzanno, F. Haziza, C. Hong, and A. Rezine. Constrained monotonic abstraction: a CEGAR for param- eterized verification. In CONCUR, pages 86–101, 2010. [2] P. A. Abdulla, B. Jonsson, M. Nilsson, J. d’Orso, and M. Saksena. Regular model checking for LTL(MSO). STTT, 14(2):223–241, 2012. [3] A. R. Bradley, Z. Manna, and H. B. Sipma. Linear ranking with reachability. In CAV, pages 491–504, 2005. [4] J.A. Brzozowski and E. Leiss. On equations for regular languages, finite automata, and sequential networks. Theoretical Computer Science, 10(1):19 – 35, 1980. [5] H. Calbrix, M. Nivat, and A. Podelski. Ultimately periodic words of rational ω-languages. In MFPS, pages 554–566, 1994. [6] A. K. Chandra, D. C. Kozen, and L. J. Stockmeyer. Alternation. J. ACM, 28(1):114–133, January 1981. [7] B. Cook, A. Podelski, and A. Rybalchenko. Abstraction refinement for termination. In SAS, pages 87–101, 2005. [8] B. Cook, A. Podelski, and A. Rybalchenko. Termination proofs for systems code. In PLDI, pages 415–426, 2006. [9] B. Cook, A. Podelski, and A. Rybalchenko. Proving thread termination. In PLDI, pages 320–330, 2007. [10] B. Cook, A. See, and F. Zuleger. Ramsey vs. lexicographic termination proving. In TACAS, pages 47–61, 2013. [11] J. Corbet. Ticket spinlocks. https://lwn.net/Articles/ 267968/. [12] P. Cousot and R. Cousot. An abstract interpretation framework for termination. In POPL, pages 245–258, 2012. [13] A. Durand-Gasselin, J. Esparza, P. Ganty, and R. Majumdar. Model checking parameterized asynchronous shared-memory systems. CoRR, abs/1505.06588, 2015. [14] Y. Fang, N. Piterman, A. Pnueli, and L. D. Zuck. Liveness with incomprehensible ranking. In TACAS, pages 482–496, 2004. [15] Y. Fang, N. Piterman, A. Pnueli, and L. D. Zuck. Liveness with invisible ranking. In VMCAI, pages 223–238, 2004. [16] A. Farzan, Z. Kincaid, and A. Podelski. Proof spaces for unbounded parallelism. In POPL, pages 407–420, 2015. [17] A. Gupta, T. A. Henzinger, R. Majumdar, A. Rybalchenko, and R.-G. Xu. Proving non-termination. In POPL, pages 147–158, 2008. [18] M. Heizmann, J. Hoenicke, J. Leike, and A. Podelski. Linear ranking for linear lasso programs. In ATVA, pages 365–380, 2013. [19] M. Heizmann, J. Hoenicke, and A. Podelski. Termination analysis by learning terminating programs. In CAV, pages 797–813, 2014. [20] J. Jaffar and A. E. Santosa. Recursive abstractions for parameterized systems. In FM, pages 72–88. 2009. [21] A. Kaiser, D. Kroening, and T. Wahl. Lost in abstraction: Monotonicity in multi-threaded programs. In CONCUR, pages 141–155, 2014. [22] J. Ketema and A. F. Donaldson. Automatic termination analysis for GPU kernels. In Workshop on Termination, pages 50–55, 2014. [23] W. Lee, B.-Y. Wang, and K. Yi. Termination analysis with algorithmic learning. In CAV, pages 88–104, 2012. [24] A. Pnueli, S. Ruah, and L. D. Zuck. Automatic deductive verification with invisible invariants. In TACAS, pages 82–97, 2001. [25] A. Podelski and A. Rybalchenko. A complete method for the synthesis of linear ranking functions. In VMCAI, pages 239–251, 2004. [26] C. Popeea and A. Rybalchenko. Compositional termination proofs for multi-threaded programs. In TACAS, pages 237–251, 2012. [27] F. P. Ramsey. On a problem of formal logic. In Proc. London Math. Soc., volume 30, pages 264–285, 1930. [28] A. Sánchez and C. Sánchez. Parametrized verification diagrams. In TIME, pages 132–141, 2014. [29] A. Sanchez, S. Sankaranarayanan, C. Sánchez, and B-Y. E. Chang. Invariant generation for parametrized systems using self-reflection. In SAS, pages 146–163. Springer, 2012. [30] M. Segalov, T. Lev-Ami, R. Manevich, R. Ganesan, and M. Sagiv. Abstract transformers for thread correlation analysis. In APLAS, pages 30–46, 2009. [31] C. Urban. Function: An abstract domain functor for termination - (competition contribution). In Christel Baier and Cesare Tinelli, editors, TACAS, pages 464–466, 2015. [32] M. Y. Vardi and P. Wolper. An automata-theoretic approach to automatic program verification. In LICS, pages 322–331, 1986. [33] M.Y. Vardi and P. Wolper. Reasoning about infinite computations. Inf. Comput., 115(1):1–37, November 1994. A. Proofs Theorem 3.4 (Soundness). Let hH , W i be a well-founded proof space. Then every infinite trace in ω(H , W ) is infeasible. ⌟ δ(`(i), hσ : ji) = ( if i = j then src(σ)(i) else `(i) i 6= j ∧ `(i) if tgt(σ) = ` otherwise δ(∆(i), hσ : ji) = if i = j then hsrc(σ), tgt(σ)i(i) else ∆(i) Proof. For a contradiction, suppose that there is an execution hσ1 :i1 i hσ2 :i2 i s0 −−−−→ s1 −−−−→ · · · such that hσ1 : i1 ihσ2 : i2 i· · · ∈ ω(H , W ). Then there is a sequence of naturals {αk }k∈N and a ranking formula w ∈ W which satisfy the conditions of Definition 3.3. It is straightforward to show that {sαk }k∈N is an infinite descending sequence of program states in the order w, contradicting the fact that w defines a well-founded order. δ(loc(i), hσ : ji) = if i = j then src(σ)(i) else loc(i) δ($, hσ : ji) = true ( `1 (i) if `1 = `2 δ(h`1 , `2 i(i), $) = false otherwise δ(`(i), $) = false δ(∆(i), $) = loc(i) δ(loc(i), $) = false δ($, $) = false Proposition 4.6. Let P be a parameterized program. Then there is a QPA A(P ) that accepts $(L(P )). ⌟ Proof. Let P = hLoc, Σ, `init , src, tgti be a parameterized program. Intuitively, we can recognize that τ $ρ is a lasso of the program P (reading τ $ρ from right to left) as follows: • While reading the loop ρ, we keep track of the control location of every thread, but also “remember” the control location in which each thread started. This is accomplished with unary predicates of the form h`1 , `2 i(i) (with `1 , `2 ∈ Loc), so that h`1 , `2 i(i) holds when thread i is at location `1 and started in location `2 • When reading the separator symbol $, we verify that each thread is in a loop by transitioning from h`1 , `2 i(i) to `1 (i) if `1 = `2 (i.e., thread i is currently at the same location it started in), and otherwise rejecting by transitioning to false. • When reading the stem τ , we track the control location of each thread using unary predicates of the form `(i). • To verify that after reading τ $ρ every thread is in the initial control location (equivalently, no thread is at a location other than the initial one) by making every predicate symbol except `init rejecting. Formally, we construct the QPA A(P ) = hQ, ar, Σ, δ, ϕstart , F i as follows: • Q = Loc ∪ (Loc × Loc) ∪ {∆, $, loc}. Intuitively, W ∆(i) stands for the disjunction `∈Loc h`, `i(i) W loc(i) stands for the disjunction `∈Loc `(i) $ is used to enforce the condition that the loop of a lasso may not be empty (i.e., $ does not appear at the end of an accepted word) • The arity of each predicate symbol is 1, except $ which has arity 0. • ϕstart = $ ∧ ∀i.∆(i) (i.e., initially every thread is currently where it started) • F = {`init , loc} The transition function δ is defined as follows: δ(h` (1 , `2 i(i), hσ : ji) = if i = j then hsrc(σ), `2 i(i) else h`1 , `2 i(i) if tgt(σ) = `1 i 6= j ∧ h`1 , `2 i(i) otherwise Proposition 4.7. Let hH , W i be a regular well-founded proof space with basis hH, W i. Then there is a QPA A(H, W ) that accepts $(H , W ). ⌟ Proof. Our construction follows a similar structure to the construction of a (quantifier-free) predicate automaton from a proof space [16]. Let hH , W i be a regular well-founded proof space, and let hH, W i be a basis for hH , W i. The intuition behind the construction of a QPA A(H, W ) which recognizes $(H , W ) is that the predicate symbols in A correspond to program assertions in H, and the transition function corresponds to the Hoare triples in H. More explicitly, we define a QPA A(H, W ) = hQ, ar, Σ, δ, ϕstart , F i as follows. The set of predicate symbols Q is the set of canonical names for the assertions which appear in H. A canonical name is a representation of an equivalence class of program assertions, where two assertions ϕ and ψ are equivalent if there is a permutation of thread identifiers π : N → N so that ϕ[π] = ψ. For example, the assertions m(4) < m(2) and m(2) < m(9) are both represented by the same canonical assertion, which we write as [m(2) < m(9)]. The arity of a predicate symbol is the number of distinct thread indices which appear in it (e.g., ar([m(2) < m(9)]) = 2). Each Hoare triple in H corresponds to a transition rule of A(H, W ). For example, the Hoare triple {m(1) < t} hm=t++ : 2i {m(1) < m(2)} corresponds to the transition δ([m(1) < m(2)](i, j), hm=t++ : ki) = k = j ∧ [m(1) < t](i) If there are multiple Hoare triples with the same command and canonical post-condition, then the transition rules are combined via disjunction. For example, if the following Hoare triple also belongs to the basis: {m(2) < m(1)} hm=t++ : 3i {m(2) < m(1)} then the transition rule is: δ([m(1) < m(2)](i, j), hm=t++ : ki) = k = j ∧ [m(1) < t](i) ∨k 6= i ∧ k 6= j ∧ [m(1) < m(2)](i, j) For any global variable g, by reading $ we may transition from [old(g) = g] to true (and similarly for local variables l): δ([old(g) = g], h$ : i0 i) = true δ([old(l(1)) = l(1)](i1 ), h$ : i0 i) = true For all other predicate symbols q, reading $ has no effect: δ(q(i1 , ..., iar(q) ), h$ : i0 i) = q(i1 , ..., iar(q) ) The initial formula of A(H, W ) expresses the desired postcondition that the some ranking formula decreases. Formally, ϕinit is defined as follows: ϕinit = _ ∃~i.w(~i) w∈W Lastly, there are no accepting predicate symbols (F = ∅), which expresses the desired pre-condition true. Proposition 4.8. QPA languages are closed under Boolean operations (intersection, union, and complement). ⌟ Proof. Let A and A0 be PAs. We form their intersection A ∩ A0 by taking the vocabulary to be the disjoint union of the vocabularies of A and A0 , and define the transition relation and accepting predicates accordingly. The initial formula is obtained by conjoining the initial formulas of A and A0 . The union A ∪ A0 is formed similarly, except the initial formula is the disjunction of the initial formulas of A and A0 . Given a PA A = hQ, ar, Σ, δ, ϕinit , F i, we form its complement A = hQ, ar, Σ, N, δ, ϕinit , F i as follows. We define the vocabulary (Q, ar) to be a “negated copy” of (Q, ar): Q = {q : q ∈ Q} and ar(q) = ar(q). The set of accepting predicate symbols is the (negated) set of rejecting predicate symbols from A: F = {q ∈ Q : q ∈ Q\F }. For any formula ϕ in F(Q, ar) in the vocabulary of A, we use ϕ to denote the “De Morganization” of ϕ in the vocabulary of A, defined recursively by: q(ij1 , ..., ijar(q) ) = q(ij1 , ..., ijar(q) ) ij = ik = (i 6= j) ij 6= ik = (i = j) ϕ∧ψ =ϕ∨ψ ϕ∨ψ =ϕ∧ψ ∃i.ϕ = ∀i.ϕ ∀i.ϕ = ∃i.ϕ We define the transition function and initial formula of A by De Morganization: δ(q, σ) is defined to be δ(q, σ) and the initial formula is defined to be ϕinit . Theorem 4.10. Let A = hQ, ar, Σ, δ, ϕstart , F i be a QPA. If there is an emptiness certificate for A, then L(A) is empty. ⌟ Proof. Let A = hQ, ar, Σ, δ, ϕstart , F i be a QPA and let ϕ be an emptiness certificate for A. Intuitively, the Initialization and Consecution conditions for ϕ express that ϕ is an inductive invariant for the transition system on A-configurations, while the Rejection condition expresses that no model of ϕ is accepting. The non-standard part of argument is proving the soundness of the consecution condition, since the consecution condition expresses that ϕ is inductive under δ̂ rather than the transition relation on A-configurations. In other words, we must establish that if C, C 0 are A-configurations, σ ∈ Σ and k ∈ N so that that C |= ϕ σ:k and C −−→ C 0 , then C 0 |= δ̂(ϕ, σ). This property can be proved by induction on ϕ. Theorem 5.1. Let Σ be a finite alphabet, and let ϕ be a QLTL(Σ) sentence. There is a QPA A(ϕ) that recognizes the language: [ $(L(ϕ)) = {τ $ρ ∈ Σ(N )ω : τ ρω |= ϕ} ⌟ N Proof. Any QLTL(Σ) formula is equivalent to one written as a disjunction of QLTL(Σ) formulas of the form ^  Q1 i1 .Q2 i2 , ...Qk ik . ij 6= ij 0 ∧ ϕm (i1 , ..., ik ) , j6=j 0 where each Qj is either ∃ or ∀, and ϕm (i1 , ..., ik ) is quantifier-free. It is sufficient to construct the QPA for a single disjunct of this form, since QPA languages are closed under union (Proposition 4.8). Since the formula ϕm [i1 7→ 1, . . . , ik 7→ k] is equivalent to an LTL formula, the the set of all infinite traces τ ∈ Σ(k + 1)ω such that τ |= ϕm [i1 7→ 1, . . . , ik 7→ k] can be recognized by a Büchi automaton [33]. Let Aω (ϕm ) denote this Büchi automaton. From Aω (ϕm ), we may derive a deterministic finite automaton A$ (ϕm ) = hQm , Σ(k + 1), δm , sm , Fm i which recognizes $(L(Aω (ϕ))), following the construction from [5]. From A$ (ϕm ), we may construct a QPA A(ϕ) = hQ, ar, Σ, δ, ϕstart , F i which recognizes the language ^  $(L(Q1 i1 .Q2 i2 , ...Qk ik . ij 6= ij 0 ∧ ϕm (i1 , ..., ik ))) j6=j 0 as follows: • Q = Qm • For each predicate symbol q ∈ Q, define ar(q) = k  W  V • ϕinit = Q1 i1 .· · · Qk ik . 0 j6=j 0 ij 6= ij ∧ q∈Fm q(i1 , ..., ik ) • For every q ∈ Qm and σ ∈ Σ ∪ {$}, δ is defined by:  W 0 δ(q(~i), hσ : i0 i) = i0 = i1 ∧ {q (~i) : δm (q 0 , hσ : 1i) = q} .. .W  ∨i0 = ik ∧ {q 0 (~i) : δm (q 0 , hσ : ki) = q}  Vk W 0 ∨ j=1 i0 6= ij ∧ {q (~i) : δm (q 0 , hσ : k + 1i) = q} • F = {q0 }
6cs.PL
1 Finite Sample Analysis of Approximate Message Passing Algorithms arXiv:1606.01800v4 [cs.IT] 16 Mar 2018 Cynthia Rush, Member, IEEE, and Ramji Venkataramanan, Senior Member, IEEE Abstract—Approximate message passing (AMP) refers to a class of efficient algorithms for statistical estimation in highdimensional problems such as compressed sensing and low-rank matrix estimation. This paper analyzes the performance of AMP in the regime where the problem dimension is large but finite. For concreteness, we consider the setting of high-dimensional regression, where the goal is to estimate a high-dimensional vector β0 from a noisy measurement y = Aβ0 + w. AMP is a low-complexity, scalable algorithm for this problem. Under suitable assumptions on the measurement matrix A, AMP has the attractive feature that its performance can be accurately characterized in the large system limit by a simple scalar iteration called state evolution. Previous proofs of the validity of state evolution have all been asymptotic convergence results. In this paper, we derive a concentration inequality for AMP with i.i.d. Gaussian measurement matrices with finite size n×N . The result shows that the probability of deviation from the state evolution prediction falls exponentially in n. This provides theoretical support for empirical findings that have demonstrated excellent agreement of AMP performance with state evolution predictions for moderately large dimensions. The concentration inequality also indicates that the number of AMP iterations t can grow no faster than order logloglogn n for the performance to be close to the state evolution predictions with high probability. The analysis can be extended to obtain similar non-asymptotic results for AMP in other settings such as low-rank matrix estimation. Index Terms—Approximate message passing, compressed sensing, state evolution, non-asymptotic analysis, large deviations, concentration inequalities. I. I NTRODUCTION C Onsider the high-dimensional regression problem, where the goal is to estimate a vector β0 ∈ RN from a noisy measurement y ∈ Rn given by y = Aβ0 + w. (1.1) Here A is a known n × N real-valued measurement matrix, and w ∈ Rn is the measurement noise. The sampling ratio n N ∈ (0, ∞) is denoted by δ. Approximate Message Passing (AMP) [1]–[6] is a class of low-complexity, scalable algorithms to solve the above problem, under suitable assumptions on A and β0 . AMP algorithms are derived as Gaussian or quadratic approximations of loopy belief propagation algorithms (e.g., min-sum, sum-product) on the dense factor graph corresponding to (1.1). This work was supported in part by a Marie Curie Career Integration Grant under Grant Agreement Number 631489. This paper was presented in part at the 2016 IEEE International Symposium on Information Theory. C. Rush is with the Department of Statistics, Columbia University, New York, NY 10027, USA (e-mail: [email protected]). R. Venkataramanan is with Department of Engineering, University of Cambridge, Cambridge CB2 1PZ, UK (e-mail: [email protected]). Given the observed vector y, AMP generates successive estimates of the unknown vector, denoted by β t ∈ RN for t = 1, 2, . . .. Set β 0 = 0, the all-zeros vector. For t = 0, 1, . . ., AMP computes z t = y − Aβ t + N z t−1 X ′ η ([A∗ z t−1 + β t−1 ]i ), (1.2) n i=1 t−1 β t+1 = ηt (A∗ z t + β t ), (1.3) for an appropriately-chosen sequence of functions {ηt }t≥0 : R → R. In (1.2) and (1.3), A∗ denotes the transpose of A, ηt acts component-wise when applied to a vector, and ηt′ denotes its (weak) derivative. Quantities with a negative index are set to zero throughout the paper. For a demonstration of how the AMP updates (1.2) and (1.3) are derived from a min-sum-like message passing algorithm, we refer the reader to [1]. For a Gaussian measurement matrix A with entries that are i.i.d. ∼ N (0, 1/n), it was rigorously proven [1], [7] that the performance of AMP can be characterized in the large system limit via a simple scalar iteration called state evolution. This result was extended to the class of matrices with i.i.d. subGaussian entries in [8]. In particular, these results imply that performance measures such as the L2 -error N1 kβ0 − β t k2 and the L1 -error N1 kβ0 − β t k1 converge almost surely to constants that can be computed via the distribution of β0 . (The large n system limit is defined as n, N → ∞ such that N = δ, a constant.) AMP has also been applied to a variety of other highdimensional estimation problems. Some examples are lowrank matrix estimation [9]–[14], decoding of sparse superposition codes [15]–[17], matrix factorization [18], and estimation in generalized linear and bilinear models [5], [19], [20]. Main Contributions: In this paper, we obtain a nonasymptotic result for the performance of the AMP iteration in (1.2)–(1.3), when the measurement matrix A has i.i.d. Gaussian entries ∼ N (0, 1/n). We derive a concentration inequality (Theorem 1) that implies that the probability of ǫ-deviation between various performance measures (such as 1 t 2 N kβ0 − β k ) and their limiting constant values fall exponentially in n. Our result provides theoretical support for empirical findings that have demonstrated excellent agreement of AMP performance with state evolution predictions for moderately large dimensions, e.g., n of the order of several hundreds [2]. In addition to refining earlier asymptotic results, the concentration inequality in Theorem 1 also clarifies the effect of the iteration number t versus the problem dimension n. One implication is that the actual AMP performance is close to the state evolution prediction with high probability as long as t is 2 of order smaller than logloglogn n . This is particularly relevant for settings where the number of AMP iterations and the problem dimension are both large, e.g., solving the LASSO via AMP [6]. We prove the concentration result in Theorem 1 by analyzing the following general recursion: bt = Aft (ht , β0 ) − λt gt−1 (bt−1 , w), ht+1 = A∗ gt (bt , w) − ξt ft (ht , β0 ). (1.4) Here, for t ≥ 0, the vectors bt ∈ Rn , ht+1 ∈ RN describe the state of the algorithm, ft , gt : R → R are Lipschitz functions that are separable (act component-wise when applied to vectors), and λt , ξt are scalars that can be computed from the state of the algorithm. The algorithm is initialized with f0 (h0 = 0, β0 ). Further details on the recursion in (1.4), including how the AMP in (1.2)–(1.3) can be obtained as a special case, are given in Section IV-A. For ease of exposition, our analysis will focus on the recursion (1.4) and the problem of high-dimensional regression. However, it can be extended to a number of related problems. A symmetric version of the above recursion yields AMP algorithms for problems such as solving the TAP equations in statistical physics [21] and symmetric low-rank matrix estimation [10], [12]. This recursion is defined in terms of a symmetric matrix G ∈ RN ×N with entries {Gij }i<j i.i.d. ∼ N (0, N1 ), and {Gii } i.i.d. ∼ N (0, N2 ) for i ∈ [N ]. (In other words, G can be generated as (A + A∗ )/2, where A ∈ RN ×N has i.i.d. N (0, N1 ) entries.) Then, for t ≥ 0, let mt+1 = A pt (mt ) − bt pt−1 (mt−1 ). (1.5) Here, for t ≥ 0, the state of the algorithm is represented by a single vector mt ∈ RN , the function pt : R → R is Lipschitz and separable, and bt is a constant computed from the state of the algorithm (see [1, Sec. IV] for details). The recursion (1.5) is initialized with a deterministic vector m1 ∈ RN . Our analysis of the recursion (1.4) can be easily extended to obtain an analogous non-asymptotic result for the symmetric recursion in (1.5). Therefore, for problems of estimating either symmetric or rectangular low-rank matrices in Gaussian noise, our analysis can be used to refine existing asymptotic AMP guarantees (such as those in [9]–[11]), by providing a concentration result similar to that in Theorem 1. We also expect that the non-asymptotic analysis can be generalized to the case where the recursion in (1.4) generates matrices rather than vectors, i.e, bt ∈ Rn×q and ht+1 ∈ RN ×q (where q remains fixed as n, N grow large; see [7] for details). Extending the analysis to this matrix recursion would yield nonasymptotic guarantees for the generalized AMP [5] and AMP for compressed sensing with spatially coupled measurement matrices [22]. Since the publication of the conference version of this paper, the analysis described here has been used in a couple of recent papers: an error exponent for sparse regression codes with AMP decoding was obtained in [23], and a non-asymptotic result for AMP with non-separable denoisers was given in [24]. A. Assumptions Before proceeding, we state the assumptions on the model (1.1) and the functions used to define the AMP. In what follows, K, κ > 0 are generic positive constants whose values are not exactly specified but do not depend on n. We use the notation [n] to denote the set {1, 2, . . . , n}. Measurement Matrix: The entries of measurement matrix A ∈ Rn×N are i.i.d. ∼ N (0, 1/n). Signal: The entries of the signal β0 ∈ RN are i.i.d. according to a sub-Gaussian distribution pβ . We recall that a zero-mean random variable X is sub-Gaussian if there exist 2 positive constants K, κ such that P (|X−EX| > ǫ) ≤ Ke−κǫ , ∀ǫ > 0 [25]. Measurement Noise: The entries of the measurement noise vector w are i.i.d. according to some sub-Gaussian distribution pw with mean 0 and E[wi2 ] = σ 2 < ∞ for i ∈ [n]. The subGaussian assumption implies that, for ǫ ∈ (0, 1),   2 1 P kwk2 − σ 2 ≥ ǫ ≤ Ke−κnǫ , (1.6) n for some constants K, κ > 0 [25]. The Functions ηt : The denoising functions, ηt : R → R, in (1.3) are Lipschitz continuous for each t ≥ 0, and are therefore weakly differentiable. The weak derivative, denoted by ηt′ , is assumed to be differentiable, except possibly at a finite number of points, with bounded derivative everywhere it exists. Allowing ηt′ to be non-differentiable at a finite number of points covers denoising functions like soft-thresholding which is used in applications such as the LASSO [6]. Functions defined with scalar inputs are assumed to act component-wise when applied to vectors. The remainder of the paper is organized as follows. In Section II we review state evolution, the formalism predicting the performance of AMP, and discuss how knowledge of the signal distribution pβ and the noise distribution pw can help choose good denoising functions {ηt }. However, we emphasize that our result holds for the AMP with any choice of {ηt } satisfying the above condition, even those that do not depend on pβ and pw . In Section II-A, we introduce a stopping criterion for termination of the AMP. In Section III, we give our main result (Theorem 1) which proves that the performance of AMP can be characterized accurately via state evolution for large but finite sample size n. Section IV gives the proof of Theorem 1. The proof is based on two technical lemmas: Lemmas 3 and 5. The proof of Lemma 5 is long; we therefore give a brief summary of the main ideas in Section IV-F and then the full proof in Section V. In the appendices, we list a number of concentration inequalities that are used in the proof of Lemma 5. Some of these, such as the concentration inequality for the sum of pseudo-Lipschitz functions of i.i.d. sub-Gaussian random variables (Lemma B.4), may be of independent interest. II. S TATE E VOLUTION AND THE C HOICE OF ηt In this section, we briefly describe state evolution, the formalism that predicts the behavior of AMP in the large system limit. We only review the main points followed by 3 a few examples; a more detailed treatment can be found in [1], [4]. Given pβ , let β ∈ R ∼ pβ . Let σ02 = E[β 2 ]/δ > 0, where δ = n/N . Iteratively define the quantities {τt2 }t≥0 and {σt2 }t≥1 as i 1 h τt2 = σ 2 + σt2 , σt2 = E (ηt−1 (β + τt−1 Z) − β)2 , δ (2.1) where β ∼ pβ and Z ∼ N (0, 1) are independent random variables. The AMP update (1.3) is underpinned by the following key property of the vector A∗ z t + β t : for large n, A∗ z t + β t is approximately distributed as β0 + τt Z, where Z is an i.i.d. N (0, 1) random vector independent of β0 . In light of this property, a natural way to generate β t+1 from the “effective observation” A∗ z t + β t = s is via the conditional expectation: β t+1 (s) = E[ β | β + τt Z = s ], (2.2) i.e., β t+1 is the MMSE estimate of β0 given the noisy observation β0 + τt Z. Thus if pβ is known, the Bayes optimal choice for ηt (s) is the conditional expectation in (2.2). In the definition of the “modified residual” z t , the third term on the RHS of (1.2) is crucial to ensure that the effective observation A∗ z t + β t has the above distributional property. For intuition about the role of this ‘Onsager term’, the reader is referred to [1, Section I-C]. We review two examples to illustrate how full or partial knowledge of pβ can guide the choice of the denoising function ηt . In the first example, suppose we know that each element of β0 is chosen uniformly at random from the set {+1, −1}. Computing the conditional expectation in (2.2) with this pβ , we obtain ηt (s) = tanh(s/τt2 ) [1]. The constants τt2 are determined iteratively from the state evolution equations (2.1). As a second example, consider the compressed sensing problem, where δ < 1, and pβ is such that P (β0 = 0) = 1−ξ. The parameter ξ ∈ (0, 1) determines the sparsity of β0 . For this problem, the authors in [2], [4] suggested the choice ηt (s) = η(s; θt ), where the soft-thresholding function η is defined as   (s − θ), if s > θ, η(s; θ) = 0 if − θ ≤ s ≤ θ,  (s − θ), if s < −θ. The threshold θt at step t is set to θt = ατt , where α is a tunable constant and τt is determined by (2.1), making the threshold value proportional to the standard deviation of the noise in the effective observation. However, computing τt using (2.1) requires knowledge of pβ . In the absence of such knowledge, we can estimate τt2 by n1 kz t k2 : our concentration result (Lemma 5(e)) shows that this approximation is increasingly accurate as n grows large. To fix α, one could run the AMP with several different values of α, and choose the one that gives the smallest value of n1 kz t k2 for large t. We note that in each of the above examples ηt is Lipschitz, and its derivative satisfies the assumption stated in Section I-A. A. Stopping Criterion To obtain a concentration result that clearly highlights the dependence on the iteration t and the dimension n, we include a stopping criterion for the AMP algorithm. The intuition is that the AMP algorithm can be terminated once the expected squared error of the estimates (as predicted by state evolution equations in (2.1)) is either very small or stops improving appreciably. For Bayes-optimal AMP where the denoising function ηt (·) is the conditional expectation given in (2.2), the stopping criterion is as follows. Terminate the algorithm at the first iteration t > 0 for which either σt2 < ε0 , or σt2 > 1 − ε′0 , 2 σt−1 (2.3) where ε0 > 0 and ε′0 ∈ (0, 1) are pre-specified constants. Recall from (2.1) that σt2 is expected squared error in the estimate. Therefore, for suitably chosen values of ε0 , ε′0 , the AMP will terminate when the expected squared error is either small enough, or has not significantly decreased from the previous iteration. For the general case where ηt (·) is not the Bayes-optimal choice, the stopping criterion is: terminate the algorithm at the first iteration t > 0 for which at least one of the following is true: σt2 < ε1 , or (σt⊥ )2 < ε2 , or (τt⊥ )2 < ε3 , (2.4) where ε1 , ε2 , ε3 > 0 are pre-specified constants, and (σt⊥ )2 , (τt⊥ )2 are defined in (4.19). The precise definitions of the scalars (σt⊥ )2 , (τt⊥ )2 are postponed to Sec. IV-B as a few other definitions are needed first. For now, it suffices to note that (σt⊥ )2 , (τt⊥ )2 are measures of how close σt2 and τt2 are 2 2 to σt−1 and τt−1 , respectively. Indeed, for the Bayes-optimal case, we show in Sec IV-C that     σt2 τt2 ⊥ 2 2 ⊥ 2 2 (σt ) := σt 1 − 2 , (τt ) := τt 1 − 2 . σt−1 τt−1 Let T ∗ > 0 be the first value of t > 0 for which at least one of the conditions is met. Then the algorithm is run only for 0 ≤ t < T ∗ . It follows that for 0 ≤ t < T ∗ , σt2 > ε1 , τt2 > σ 2 + ε1 , (σt⊥ )2 > ε2 , (τt⊥ )2 > ε3 . (2.5) In the rest of the paper, we will use the stopping criterion to implicitly assume that σt2 , τt2 , (σt⊥ )2 , (τt⊥ )2 are bounded below by positive constants. III. M AIN R ESULT Our result, Theorem 1, is a concentration inequality for pseudo-Lipschitz (PL) loss functions. As defined in [1], a function φ : Rm → R is pseudo-Lipschitz (of order 2) if there exists a constant L > 0 such that for all x, y ∈ Rm , |φ(x) − φ(y)| ≤ L(1 + kxk + kyk)kx − yk, where k·k denotes the Euclidean norm. Theorem 1. With the assumptions listed in Section I-A, the following holds for any (order-2) pseudo-Lipschitz function 4 φ : R2 → R, ǫ ∈ (0, 1) and 0 ≤ t < T ∗ , where T ∗ is the first iteration for which the stopping criterion in (2.4) is satisfied. ! N 1 X t+1 φ(βi , β0i ) − E[φ(ηt (β + τt Z), β)] ≥ ǫ P N i=1 2 ≤ Kt e−κt nǫ . (3.1) In the expectation in (3.1), β ∼ pβ and Z ∼ N (0, 1) are independent, and τt is given by (2.1). The constants Kt , κt 1 are given by Kt = C 2t (t!)10 , κt = c2t (t!) 22 , where C, c > 0 are universal constants (not depending on t, n, or ǫ) that are not explicitly specified. The probability in (3.1) is with respect to the product measure on the space of the measurement matrix A, signal β0 , and the noise w. Remarks: 1. By considering the pseudo-Lipschitz function φ(a, b) = (a−b)2 , Theorem 1 proves that state evolution tracks the mean square error of the AMP estimates with exponentially small probability of error in the sample size n. Indeed, for all t ≥ 0,   2 1 t+1 2 kβ − β0 k2 − δσt+1 ≥ ǫ ≤ Kt e−κt nǫ . (3.2) P N Similarly, taking φ(a, b) = |a − b| the theorem implies that the normalized L1 -error N1 kβ t+1 − β0 k1 is concentrated around E|ηt (β + τt Z) − β|. 2. Asymptotic convergence results of the kind given in [1], [6] are implied by Theorem 1. Indeed, from Theorem 1, the sum N ∞   1 X X φ(βit+1 , β0i ) − E[φ(ηt (β + τt Z), β)] ≥ ǫ P N i=1 N =1 is finite for any fixed t ≥ 0. Therefore the Borel-Cantelli lemma implies that for any fixed t ≥ 0: N 1 X a.s. φ(βit+1 , β0i ) = E[φ(ηt (β + τt Z), β)]. N →∞ N i=1 lim 3. Theorem 1 also refines the asymptotic convergence result by specifying how large t can be (compared to the dimension n) for the state evolution predictions to be meaningful. Indeed, if we require the bound in (3.1) to go to zero with growing n, we need κt nǫ2 → ∞ as n → ∞. Using for  the expression  κt from the theorem then yields t = o logloglogn n . Thus, when the AMP is run for a growing number of iterations, the state evolution predictions are guaranteed to be valid until iteration t if the problem dimension grows faster than exponentially in t. Though the constants Kt , κt in the bound have not been optimized, we believe that the dependence of these constants on t! is inevitable in any induction-based proof of the result. An open question is whether this relationship between t and n is fundamental, or a different analysis of the AMP can yield constants which allow t to grow faster with n. 4. As mentioned in the introduction, we expect that nonasymptotic results similar to Theorem 1 can be obtained for other estimation problems (with Gaussian matrices) for which rigorous asymptotic results have been proven for AMP. Examples of such problems include low-rank matrix estimation [9]–[11], robust high-dimensional M-estimation [26], AMP with spatially coupled matrices [22], and generalized AMP [7], [27]. As our proof technique depends heavily on A being i.i.d. Gaussian, extending Theorem 1 to AMP with sub-Gaussian matrices [8] and to variants of AMP with structured measurement matrices (e.g., [28]–[30]) is non-trivial, and an interesting direction for future work. IV. P ROOF OF T HEOREM 1 We first lay down the notation that will be used in the proof, then state two technical lemmas (Lemmas 3 and 5) and use them to prove Theorem 1. A. Notation and Definitions For consistency and ease of comparison, we use notation similar to [1]. To prove the technical lemmas, we use the general recursion in (1.4), which we write in a slightly different form below. Given w ∈ Rn , β0 ∈ RN , define the column vectors ht+1 , q t+1 ∈ RN and bt , mt ∈ Rn for t ≥ 0 recursively as follows, starting with initial condition q 0 ∈ RN : bt := Aq t − λt mt−1 , ht+1 := A∗ mt − ξt q t , mt := gt (bt , w), q t := ft (ht , β0 ). (4.1) where the scalars ξt and λt are defined as n ξt := 1X ′ t g (b , wi ), n i=1 t i λt := N 1 X ′ t f (h , β0 ). δN i=1 t i i (4.2) In (4.2), the derivatives of gt : R2 → R and ft : R2 → R are with respect to the first argument. The functions ft , gt are assumed to be Lipschitz continuous for t ≥ 0, hence the weak derivatives gt′ and ft′ exist. Further, gt′ and ft′ are each assumed to be differentiable, except possibly at a finite number of points, with bounded derivative everywhere it exists. Let σ02 := E[f02 (0, β)] > 0 with β ∼ pβ . We let q 0 = f0 (0, β0 ) and assume that there exist constants K, κ > 0 such that   2 1 0 2 2 P kq k − σ0 ≥ ǫ ≤ Ke−κnǫ . (4.3) n Define the state evolution scalars {τt2 }t≥0 and {σt2 }t≥1 for the general recursion as follows.    1  τt2 := E (gt (σt Z, W ))2 , σt2 := E (ft (τt−1 Z, β))2 , δ (4.4) where β ∼ pβ , W ∼ pw , and Z ∼ N (0, 1) are independent random variables. We assume that both σ02 and τ02 are strictly positive. The AMP algorithm is a special case of the general recursion in (4.1) and (4.2). Indeed, the AMP can be recovered by defining the following vectors recursively for t ≥ 0, starting with β 0 = 0 and z 0 = y. ht+1 = β0 − (A∗ z t + β t ), bt = w − z t , q t = β t − β0 , mt = −z t . (4.5) 5 It can be verified that these vectors satisfy (4.1) and (4.2) with ft (a, β0 ) = ηt−1 (β0 − a) − β0 , gt (a, w) = a − w. (4.6) Using this choice of ft , gt in (4.4) yields the expressions for σt2 , τt2 given in (2.1). Using (4.6) in (4.2), we also see that for AMP, λt = − and N 1 X ′ η ([A∗ β t−1 + z t−1 ]i ), δN i=1 t−1 ξt = 1. (4.7) B. Concentrating Values Let {Z̆t }t≥0 and {Z̃t }t≥0 each be sequences of of zeromean jointly Gaussian random variables whose covariance is defined recursively as follows. For r, t ≥ 0, E[Z̆r Z̆t ] = For the analysis, we work with the general recursion given by (4.1) and (4.2). Notice from (4.1) that for all t, ht+1 + ξt q t = A∗ mt . Ĕr,t Thus we have the matrix equations Xt = A Mt and Yt = AQt , where Xt := [h1 + ξ0 q 0 | h2 + ξ1 q 1 | . . . | ht + ξt−1 q t−1 ], Yt := [b0 | b1 + λ1 m0 | . . . | bt−1 + λt−1 mt−2 ], Mt := [m0 | . . . | mt−1 ], (4.9) The notation [c1 | c2 | . . . | ck ] is used to denote a matrix with columns c1 , . . . , ck . Note that M0 and Q0 are the allzero vector. Additionally define the matrices Ξt := diag(ξ0 , . . . , ξt−1 ), Λt := diag(λ0 , . . . , λt−1 ). (4.10) Note that B0 , H0 , Λ0 , and Ξ0 are all-zero vectors. Using the above we see that Yt = Bt +[0|Mt−1 ]Λt and Xt = Ht +Qt Ξt . We use the notation mtk and qkt to denote the projection of m and q t onto the column space of Mt and Qt , respectively. Let t αt := (αt0 , . . . , αtt−1 )∗ , t γ t := (γ0t , . . . , γt−1 )∗ (4.11) be the coefficient vectors of these projections, i.e., mtk := t−1 X 1 E[fr (τr−1 Z̃r−1 , β)ft (τt−1 Z̃t−1 , β)], δ := E[gr (σr Z̆r , W )gt (σt Z̆t , W )], αti mi , i=0 qkt := t−1 X γit q i . (4.12) i=0 The projections of mt and q t onto the orthogonal complements of Mt and Qt , respectively, are denoted by mt⊥ := mt − mtk , t q⊥ := q t − qkt . (4.13) Lemma 5 shows that for large n, the entries of αt and γ t are concentrated around constants. We now specify these constants and provide some intuition about their values in the special case where the denoising function in the AMP recursion is the Bayes-optimal choice, as in (2.2). (4.15) t t C̃i+1,j+1 = Ẽi,j , and C̆i+1,j+1 = Ĕi,j , 0 ≤ i, j ≤ t − 1. (4.16) With these definitions, the concentrating values for γ t and αt (if C̃ t and C̆ t are invertible) are γ̂ t := (C̃ t )−1 Ẽt , and α̂t := (C̆ t )−1 Ĕt , (4.17) with Ẽt := (Ẽ0,t . . . , Ẽt−1,t )∗ , and Ĕt := (Ĕ0,t . . . , Ĕt−1,t )∗ . (4.18) Let (σ0⊥ )2 := σ02 and (τ0⊥ )2 := τ02 , and for t > 0 define (σt⊥ )2 := σt2 − (γ̂ t )∗ Ẽt = Ẽt,t − Ẽt∗ (C̃ t )−1 Ẽt , Qt := [q 0 | . . . | q t−1 ]. (4.14) where β ∼ pβ and W ∼ pw are independent random variables. In the above, we take f0 (·, β) := f0 (0, β), the initial condition. Note that Ẽt,t = σt2 and Ĕt,t = τt2 , thus E[Z̃t2 ] = E[Z̆t2 ] = 1. Define matrices C̃ t , C̆ t ∈ Rt×t for t ≥ 1 such that (4.8) ∗ Bt := [b0 | . . . |bt−1 ], Ĕr,t , τr τt Ẽr,t := Recall that β0 ∈ R is the vector we would like to recover and w ∈ Rn is the measurement noise. The vector ht+1 is the noise in the effective observation A∗ z t + β t , while q t is the error in the estimate β t . The proof will show that ht and mt are approximately i.i.d. N (0, τt2 ), while q t is approximately i.i.d. with zero mean and variance σt2 . Ht := [h1 | . . . |ht ], E[Z̃r Z̃t ] = where N bt + λt mt−1 = Aq t , Ẽr,t , σr σt (τt⊥ )2 := τt2 − (α̂t )∗ Ĕt = Ĕt,t − Ĕt∗ (C̆ t )−1 Ĕt . (4.19) Finally, we define the concentrating values for λt and ξt as 1 E[ft′ (τt−1 Z̃t−1 , β)], and ξˆt = E[gt′ (σt Z̆t , W )]. δ (4.20) Since {ft }t≥0 and {gt }t≥0 are assumed to be Lipschitz continuous, the derivatives {ft′ } and {gt′ } are bounded for t ≥ 0. Therefore λt , ξt defined in (4.2) and λ̂t , ξˆt defined in (4.20) are also bounded. For the AMP recursion, it follows from (4.6) that 1 ′ (4.21) (β − τt−1 Z̃t−1 )], and ξ̂t = 1. λ̂t = − E[ηt−1 δ λ̂t := Lemma 1. If (σk⊥ )2 and (τk⊥ )2 are bounded below by some positive constants (say c̃ and c̆, respectively) for 1 ≤ k ≤ t, then the matrices C̃ k and C̆ k defined in (4.16) are invertible for 1 ≤ k ≤ t. Proof: We prove the result using induction. Note that C̃ 1 = σ02 and C̆ 1 = τ02 are both strictly positive by assumption and hence invertible. Assume that for some k < t, C̃ k and C̆ k are invertible. The matrix C̃ k+1 can be written as   M1 M2 k+1 , C̃ = M3 M4 where M1 = C̃ k ∈ Rk×k , M4 = Ẽk,k = σk2 , and M2 = M∗3 = Ẽk ∈ Rk×1 defined in (4.18). By the block inversion formula, C̃ k+1 is invertible if M1 and the Schur complement M4 − M3 M−1 1 M2 are both invertible. By the induction hypothesis 6 M1 = C̃ k is invertible, and M4 − M3 M−1 1 M2 = Ẽk,k − Ẽk∗ (C̃ k )−1 Ẽk = (σk⊥ )2 ≥ c̃ > 0. (4.22) is invertible is Hence C̃ t+1 is invertible. Showing that C̆ t+1 very similar. We note that the stopping criterion ensures that C̃ t and C̆ t are invertible for all t that are relevant to Theorem 1. C. Bayes-optimal AMP The concentrating constants in (4.14)–(4.19) have simple representations in the special case where the denoising function ηt (·) is chosen to be Bayes-optimal, i.e., the conditional expectation of β given the noisy observation β + τt Z, as in (2.2). In this case: 1) It can be shown that Ẽr,t in (4.15) equals σt2 for 0 ≤ r ≤ t. This is done in two steps. First verify that the following Markov property holds for the jointly Gaussian Z̃r , Z̃t with covariance given by (4.14): E[β | β+τt Z̃t , β+τr Z̃r ] = E[β | β+τt Z̃t ], 0 ≤ r ≤ t. We then use the above in the definition of Ẽr,t (with ft given by (4.6)), and apply the orthogonality principle to show that Ẽr,t = σt2 for r ≤ t. 2) Using Ẽr,t = σt2 in (4.14) and (4.15), we obtain Ĕr,t = σ 2 + σt2 = τt2 . 3) From the orthogonality principle, it also follows that for 0 ≤ r ≤ t, E[kβ t k2 ] = E[β ∗ β t ], E[kβ r k2 ] = E[(β r )∗ β t ], and where β t = E[β | β + τt−1 Z̃t−1 ]. 4) With Ẽr,t = σt2 and Ĕr,t = τt2 for r ≤ t, the quantities in (4.17)–(4.19) simplify to the following for t > 0: 2 ], γ̂ = [0, . . . , 0, σt2 /σt−1   2 σt ⊥ 2 2 (σt ) := σt 1 − 2 , σt−1 t 2 ], α̂ = [0, . . . , 0, τt2 /τt−1   2 τt ⊥ 2 2 (τt ) := τt 1 − 2 , τt−1 t (4.23) where γ̂ t , α̂t ∈ Rt . For the AMP, mt = −z t is the modified residual in iteration t, and q t = β t − β is the error in the estimate β t . Also recall that γ t and αt are the coefficients of the projection of mt and q t onto {m0 , . . . , mt−1 } and {q 0 , . . . , q t−1 }, respectively. The fact that only the last entry of γ̂ t is non-zero in the Bayes-optimal case indicates that residual z t can be well approximated as a linear combination of z t−1 and a vector that is independent of {z 0 , . . . , z t−1 }; a similar interpretation holds for the error q t = β t − β. norms of the deviation vectors are small with high probability, and provides concentration inequalities for various inner products and functions involving {ht+1 , q t , bt , mt }. We use the following notation in the lemmas. Given two d random vectors X, Y and a sigma-algebra S , X|S = Y denotes that the conditional distribution of X given S equals the distribution of Y . The t × t identity matrix is denoted by It . We suppress the subscript on the matrix if the dimensions are clear from context. For a matrix A with full column rank, k PA := A(A∗ A)−1 A∗ denotes the orthogonal projection matrix k onto the column space of A, and P⊥ A := I − PA . If A does ∗ −1 not have full column rank, (A A) is interpreted as the pseudoinverse. Define St1 ,t2 to be the sigma-algebra generated by b0 , ..., bt1 −1 , m0 , ..., mt1 −1 , h1 , ..., ht2 , q 0 , ..., q t2 , and β0 , w. A key ingredient in the proof is the distribution of A conditioned on the sigma algebra St1 ,t where t1 is either t + 1 or t from which we are able to specify the conditional distributions of bt and ht+1 given St,t and St+1,t , respectively. Observing that conditioning on St1 ,t is equivalent to conditioning on the linear constraints1 AQt1 = Yt1 , A∗ Mt = Xt , the following lemma from [1] specifies the conditional distribution of A|St1 ,t . Lemma 2. [1, Lemma 10, Lemma 12] The conditional distributions of the vectors in (4.8) satisfy the following, provided n > t and Mt , Qt have full column rank. d A∗ mt |St+1,t = Xt (Mt∗ Mt )−1 Mt∗ mtk d ∗ t ∗ + Qt+1 (Q∗t+1 Qt+1 )−1 Yt+1 mt⊥ + P⊥ Qt+1 à m⊥ , t Aq t |St,t = Yt (Q∗t Qt )−1 Q∗t qkt + Mt (Mt∗ Mt )−1 Xt∗ q⊥ t + P⊥ Mt Âq⊥ , t where mtk , mt⊥ , qkt , q⊥ are defined in (4.12) and (4.13). Here d Ã,  = A are random matrices independent of St+1,t and St,t . Lemma 3 (Conditional Distribution Lemma). For the vectors ht+1 and bt defined in (4.1), the following hold for t ≥ 1, provided n > t and Mt , Qt have full column rank. d b0 |S0,0 = σ0 Z0′ + ∆0,0 , d bt |St,t = d We next characterize the conditional distribution of the vectors ht+1 and bt given the matrices in (4.9) as well as β0 , w. Lemmas 3 and 4 show that the conditional distributions of ht+1 and bt can each be expressed in terms of a standard normal vector and a deviation vector. Lemma 5 shows that the γ̂rt br + σt⊥ Zt′ + ∆t,t , ht+1 |St+1,t = (4.24) r=0 h1 |S1,0 = τ0 Z0 + ∆1,0 , d D. Conditional Distribution Lemma t−1 X t−1 X α̂tr hr+1 + τt⊥ Zt + ∆t+1,t , (4.25) r=0 N where Z0 , Zt ∈ R and Z0′ , Zt′ ∈ Rn are i.i.d. standard Gaussian random vectors that are independent of the corre1 While conditioning on the linear constraints, we emphasize that only A is treated as random. 7 sponding conditioning sigma-algebras. The terms γ̂it and α̂ti for i ∈ [t − 1] are defined in (4.17) and the terms (τt⊥ )2 and (σt⊥ )2 in (4.19). The deviation terms are   kq 0 k (4.26) ∆0,0 = √ − σ0 Z0′ , n h km0 k i  km0 k √ − τ0 IN − √ Pkq0 Z0 ∆1,0 = n n  kq 0 k2 −1  (b0 )∗ m0 kq 0 k2  − ξ0 , (4.27) + q0 n n n and for t > 0, defining Qt := Q∗t Qt and Mt := Mt∗ Mt , ∆t,t t−1 X h kq t k i  kq t k √⊥ − σt⊥ In − √⊥ PkMt Zt′ = (γrt − γ̂rt )br + n n r=0 + Mt  M −1  H ∗ q t t t ⊥ n ∆t+1,t = t−1 X r=0 n − t−1 i X Mt ∗ h λi γit mi−1 , λt mt−1 − n i=1 (4.28) (αtr − α̂tr )hr+1 h kmt k i  kmt k √⊥ − τt⊥ IN − √⊥ PkQt+1 Zt + n n t−1  Q −1  B ∗ mt i X Q∗ h t+1 t+1 ⊥ + Qt+1 ξi αti q i . − t+1 ξt q t − n n n i=0 (4.29) following pair of values: d bt |St,t = ∆t,t = where Z0′ ∈ Rn is an i.i.d. standard Gaussian random vector, independent of S0,0 . γ̂rt br + σt⊥ Zt′ + ∆t,t , r=0 t−1 X r=0 (γrt − γ̂rt )br +  i h kq t k kq t k √⊥ − σt⊥ I − √⊥ PkMt Zt′ n n −1 ∗ t t−1 ∗ t . + [0|Mt−1 ]Λt Q−1 t Qt qk + Mt Mt Ht q⊥ − λt m The above definition of ∆t,t equals that given in (4.28) since t−1 ∗ t = [0|Mt−1 ]Λt Q−1 t Qt qk − λt m t−1 X i=1 λi γit mi−1 − λt mt−1 t−1   X t−1 ∗ λi γit mi−1 . − = −Mt M−1 t Mt λt m i=1 This completes the proof of (4.24). Result (4.25) can be shown similarly. The conditional distribution representation in Lemma 3 implies that for each t ≥ 0, ht+1 is the sum of an i.i.d. N (0, τt2 ) random vector plus a deviation term. Similarly bt is the sum of an i.i.d. N (0, σt2 ) random vector and a deviation term. This is made precise in the following lemma. Lemma 4. For t ≥ 0, let Zt′ ∈ Rn , Zt ∈ RN be independent standard normal random vectors. Let b0pure = σ0 Z0′ , h1pure = τ0 Z0 , and recursively define for t ≥ 1: btpure = Proof: We begin by demonstrating (4.24). By (4.1) it follows that √ d b0 |S0,0 = Aq 0 = (kq 0 k/ n)Z0′ , t−1 X t−1 X γ̂rt brpure + σt⊥ Zt′ , ht+1 pure = r=0 t−1 X ⊥ α̂tr hr+1 pure + τt Zt . r=0 (4.31) Then for t ≥ 0, the following statements hold. 1) For j ∈ [N ] and k ∈ [n], d For the case t ≥ 1, we use Lemma 2 to write t t b |St,t = (Aq − λt m t−1 )|St,t d −1 ∗ t t t−1 ⊥ ∗ t = Yt Q−1 t Qt qk + Mt Mt Xt q⊥ + PMt Ãq⊥ − λt m −1 ∗ t −1 ∗ t ∗ t = Bt Q−1 t Qt qk + [0|Mt−1 ]Λt Qt Qt qk + Mt Mt Ht q⊥ t t−1 . + P⊥ Mt Ãq⊥ − λt m The last equality above is obtained using Yt = Bt + [0|Mt−1 ]Λt , and Xt = Ht + Ξt Qt . Noticing that Pt−1 t i k ∗ t ⊥ t d t Bt Q−1 t Qt qk = i=0 γi b and PMt Ãq⊥ = (I − PMt )Ãq⊥ = kqt k k (I−PMt ) √⊥n Zt′ Zt′ n where ∈ R is an i.i.d. standard Gaussian random vector, it follows that t−1 X kq t k d k γit bi bt |St,t = (I − PMt ) √⊥ Zt′ + n i=0 −1 ∗ t ∗ t t−1 + [0|Mt−1 ]Λt Q−1 . t Qt qk + Mt Mt Ht q⊥ − λt m (4.30) All the quantities in the RHS of (4.30) except Zt′ are in the conditioning sigma-field. We can rewrite (4.30) with the (b0pure j , . . . , btpure j ) = (σ0 Z̆0 , . . . , σt Z̆t ), d (h1pure k , . . . , ht+1 pure k ) = (τ0 Z̃0 , . . . , τt Z̃t ), (4.32) where {Z̆t }t≥0 and {Z̃t }t≥0 are the jointly Gaussian random variables defined in Sec. IV-B. 2) For t ≥ 0, btpure = t X Zi′ σi⊥ cti , htpure = t X Zi τi⊥ dti , (4.33) i=0 i=0 where the constants {cti }0≤i≤t and {dti }0≤i≤t are recursively defined as follows, starting with c00 = 1 and d00 = 1. For t > 0, ctt = 1, dtt = 1, cti = dti = t−1 X r=i t−1 X r=i cri γ̂rt , for 0 ≤ i ≤ (t − 1), (4.34) dri α̂tr , for 0 ≤ i ≤ (t − 1). (4.35) 3) The conditional distributions in Lemma 3 can be ex- 8 pressed as d bt |St,t = btpure + d ht+1 |St+1,t = ht+1 pure + t X E. Main Concentration Lemma For t ≥ 0, let ctr ∆r,r , r=0 t X dtr ∆r+1,r . r=0 btpure Proof: We prove (4.32) by induction. We prove the result; the proof for htpure is very similar. The base case of t = 0 holds by the definition of b0pure . Assume towards induction that (4.32) holds for (b0pure , . . . , bt−1 ). Then using (4.31), P pure t ⊥ btpure has the same distribution as t−1 γ̂ r=0 r σr Z̆r +σt Z where n Z ∈ R is a standard Gaussian random vector independent of Pt−1 t d ⊥ Z̆0 , . . . , Z̆t−1 . We now show that r=0 γ̂r σr Z̆r + σt Z = σt Z̆t byPdemonstrating that: t−1 (i) var( r=0 γ̂rt σr Z̆r + σt⊥ Z) = σt2 ; and Pt−1 (ii) E[σk Z̆k ( r=0 γ̂rt σr Z̆r + σt⊥ Z)] = σk σt E[Z̆k Z̆t ] = Ẽk,t , for 0 ≤ k ≤ (t − 1). The variance is t−1 X t−1 t−1 X X γ̂rt γ̂kt Ẽk,r + (σt⊥ )2 = σt2 , E( γ̂rt σr Z̆r + σt⊥ Z)2 = r=0 k=0 r=0 where the last equality follows from rewriting the double sum as follows using the definitions in Section IV-A: X γ̂rt γ̂kt Ẽk,r = (γ̂ t )∗ C̃ t γ̂ t = [Ẽt∗ (C̃ t )−1 ]C̃ t [(C̃ t )−1 Ẽt ] r,k = Ẽt∗ (C̃ t )−1 Ẽt = Ẽt,t − (σt⊥ )2 . (4.37) Next, for any 0 ≤ k ≤ t − 1, we have E[σk Z̆k ( t−1 X 1 , c2t (t!)22 κt , Kt′ = C(t + 1)5 Kt , κ′t = c(t + 1)11 Kt = C 2t (t!)10 , κt = (4.36) (a) γ̂rt σr Z̆r + σt⊥ Z )] = t−1 X Ẽk,r γ̂rt r=0 r=0 (b) (c) = [C̃ γ̂ t ]k+1 = Ẽk,t . where C, c > 0 are universal constants (not depending on t, n, or ǫ). To keep the notation compact, we use K, κ, κ′ to denote generic positive universal constants whose values may change through the lemma statement and the proof. Lemma 5. The following statements hold for 1 ≤ t < T ∗ and ǫ ∈ (0, 1). (a) 1  ′ 4 ′ P k∆t+1,t k2 ≥ ǫ ≤ Kt2 Kt−1 e−κκt−1 nǫ/t , (4.39) N 1  4 P k∆t,t k2 ≥ ǫ ≤ Kt2 Kt−1 e−κκt−1 nǫ/t . (4.40) n .. (b) i) Let Xn = c be shorthand for P (|Xn − c| ≥ ǫ) ≤ ′ 2 7 ′ Kt3 Kt−1 e−κκt−1 nǫ /t . Then for pseudo-Lipschitz functions φh : Rt+2 → R N 1 X .. φh (h1i , . . . , ht+1 , β0i ) = E φh (τ0 Z̃0 , . . . , τt Z̃t , β). i N i=1 (4.41) The random variables Z̃0 , . . . , Z̃t are jointly Gaussian with zero mean and covariance given by (4.14), and are independent of β ∼ pβ . ii) Let ψh : R2 → R be a bounded function that is differentiable in the first argument except possibly at a finite number of points, with bounded derivative where it exists. Then, P N   1 X Z̃ , β) ≥ ǫ ) − E ψ (τ ψh (ht+1 , β h t t 0i i N i=1 (4.42) ′ In the above, step (a) follows from (4.14); step (b) by recognizing from (4.16) that the required sum is the inner product of γ̂ t with row (k + 1) of C̃ t ; step (c) from the definition of γ̂ t in (4.17). This proves (4.32). Next we show the expression for btpure in (4.33) using induction; the proof for htpure is similar. The base case of t = 0 holds by definition because σ1⊥ = σ1 . Using the induction hypothesis that (4.33) holds for b0pure , . . . , bt−1 pure , the defintion (4.31) can be written as btpure = t−1 X r=0 = t−1 X i=0 γ̂rt r X i=0 Zi′ σi⊥  Zi′ σi⊥ cri + σt⊥ Zt′ t−1 X r=i t  X Zi′ σi⊥ cti , γ̂rt cri + σt⊥ Zt′ = i=0 where the last inequality follows from the definition of cti for 0 ≤ i ≤ t in (4.35). This proves (4.33). The expressions for the conditional distribution of bt and h in (4.36) can be similarly obtained from (4.24) and (4.25) using an induction argument. t+1 (4.38) ′ ≤ Kt2 Kt−1 e−κκt−1 nǫ 2 /t4 . As above, Z̃t ∼ N (0, 1) and β ∼ pβ are independent. . iii) Let Xn = c be shorthand for P (|Xn − c| ≥ ǫ) ≤ 2 7 Kt3 Kt−1 e−κκt−1 nǫ /t . Then for pseudo-Lipschitz functions φb : Rt+2 → R n 1X . φb (b0i , . . . , bti , wi ) = E φb (σ0 Z̆0 , . . . , σt Z̆t , W ). n i=1 (4.43) The random variables Z̆0 , . . . , Z̆t are jointly Gaussian with zero mean and covariance given by (4.14), and are independent of W ∼ pw . iv) Let ψb : R → R be a bounded function that is differentiable in the first argument except possibly at a finite number of points, with bounded derivative where it exists. Then, n   1X ψb (bti , wi ) − E ψb (σt Z̆t , W ) ≥ ǫ P n i=1 (4.44) ≤ Kt2 Kt−1 e−κκt−1 nǫ 2 /t4 . 9 As above, Z̆t ∼ N (0, 1) and W ∼ pw are independent. (c) 1 t+1 ∗ 0 .. (h ) q = 0, n 1 t ∗ . (b ) w = 0. n 1 t+1 ∗ .. (h ) β0 = 0, n (4.45) (4.46) (d) For all 0 ≤ r ≤ t, 1 r+1 ∗ t+1 .. = Ĕr,t , (h ) h N 1 r ∗ t . (b ) b = Ẽr,t . n (e) For all 0 ≤ r ≤ t, 1 0 ∗ t+1 .. = Ẽ0,t+1 , (q ) q n (4.47) (4.48) 1 r+1 ∗ t+1 .. = Ẽr+1,t+1 , (q ) q n (4.49) 1 r ∗ t . (m ) m = Ĕr,t . n (4.50) (f) For all 0 ≤ r ≤ t, .. λt = λ̂t , 1 t+1 ∗ r+1 .. (h ) q = λ̂r+1 Ĕr,t , n 1 r+1 ∗ t+1 .. = λ̂t+1 Ĕr,t , (h ) q n . ξt = ξ̂t , 1 r ∗ t . ˆ (b ) m = ξt Ẽr,t , n (4.51) 1 t ∗ r . (b ) m = ξ̂r Ẽr,t . n (4.52) (g) Let Qt+1 := 1 ∗ n Qt+1 Qt+1 and Mt := 1 ∗ n Mt Mt . P (Qt+1 is singular) ≤ tKt−1 e−κt−1 κn , P (Mt is singular) ≤ tKt−1 e −κt−1 κn . Then, (4.53) (4.54) When the inverses of Qt+1 , Mt exist, for 1 ≤ i, j ≤ t + 1,   ′ 2 t+1 −1 ′ P [Q−1 ) ]i,j ≥ ǫ ≤ KKt−1 e−κκt−1 nǫ , t+1 − (C̃   2 9 ′ t+1 t+1 ′ P |γi−1 − γ̂i−1 |≥ ǫ ≤ Kt4 Kt−1 e−κκt−1 nǫ /t . (4.55) For 1 ≤ i, j ≤ t,   2 t −1 P [M−1 ]i,j ≥ ǫ ≤ KKt−1 e−κκt−1 nǫ , t − (C̆ )   2 9 P |αti−1 − α̂ti−1 |≥ ǫ ≤ Kt4 Kt−1 e−κκt−1 nǫ /t . (4.56) where γ̂ t+1 and α̂t are defined in (4.17). ⊥ (h) With σt+1 , τt⊥ defined in (4.19),  1  ′ 2 11 t+1 2 ⊥ ′ P kq⊥ k − (σt+1 )2 ≥ ǫ ≤ Kt5 Kt−1 e−κκt−1 nǫ /t , n (4.57)  1  2 11 P kmt⊥ k2 − (τt⊥ )2 ≥ ǫ ≤ Kt5 Kt−1 e−κκt−1 nǫ /t . n (4.58) F. Remarks on Lemma 5 The proof of Theorem 1 below only requires the concentration result in part (b).(i) of Lemma 5, but the proof of part (b).(i) hinges on the other parts of the lemma. The proof of Lemma 5, given in Section V, uses induction starting at time t = 0, sequentially proving the concentration results in parts (a) − (h). The proof is long, but is based on a sequence of a few key steps which we summarize here. The main result that needs to be proved (part (b).(i), (4.41)) is that within the normalized sum of the pseudo-Lipschitz function φh , the inputs h1 , . . . , ht+1 can be effectively replaced by τ0 Z̃0 , . . . , τt Z̃t , respectively. To prove this, we use the representation for ht+1 given by Lemma 3, and show that the deviation term given by (3) can be effectively dropped. In order to show that the deviation term can be dropped, we need to prove the concentration results in parts (c) – (h) of Lemma 5. Parts (b).(ii), (b).(iii), and (b).(iv) of the lemma are used to establish the results in parts (c) – (h). The concentration constants κt , Kt : The concentration results in Lemma 5 and Theorem 1 for AMP iteration t ≥ 1 are 2 of the form Kt e−κt nǫ , where κt , Kt are given in (4.38). Due to the inductive nature of the proof, the concentration results for step t depend on those corresponding to all the previous steps — this determines how κt , Kt scale with t. The t! terms in κt , Kt can be understood as follows. Suppose that we want prove a concentration result for a quantity that can be expressed as a sum of t terms with step indices 1, . . . , t. (A typical example is ∆t+1,t in (3).) For such a term, the deviation from the deterministic concentrating value is less than ǫ if the deviation in each of the terms in the sum is less than ǫ/t. The induction hypothesis (for steps 1, . . . , t) is then used to bound the ǫ/t-deviation probability for each term in the sum. This introduces factors of 1/t and t multiplying the exponent and pre-factor, respectively, in each step t (see Lemma A.2), which results in the t! terms in Kt and κt . The (C2 )t and (c2 )t terms in κt , Kt arise due to quantities that can be expressed as the product of two terms, for each of which we have a concentration result available (due to the induction hypothesis). This can be used to bound the ǫ-deviation probability of the product, but with a smaller exponent and a larger prefactor (see Lemma A.3). Since this occurs in each step of the induction, the constants Kt , κt have terms of the form (C2 )t , (c2 )t , respectively. Comparison with earlier work: Lemmas 3 and 5 are similar to the main technical lemma in [1, Lemma 1], in that they both analyze the behavior of similar functions and inner products arising in the AMP. The key difference is that Lemma 5 replaces the asymptotic convergence statements in [1] with concentration inequalities. Other differences from [1, Lemma 1] include: – Lemma 5 gives explicit values for the deterministic limits in parts (c)–(h), which are needed in other parts of our proof. – Lemma 3 characterizes the the conditional distribution of the vectors ht+1 and bt as the sum of an ideal distribution and a deviation term. [1, Lemma 1(a)] is a similar 10 distributional characterization of ht+1 and bt , however it does not use the ideal distribution. We found that working with the ideal distribution throughout Lemma 5 simplified our proof. G. Proof of Theorem 1 Applying Part (b).(i) of Lemma 5 to a pseudo-Lipschitz function of the form φh (ht+1 , β0 ), for 0 ≤ t ≤ T ∗ we have N   1 X 2 )−E[φ (τ Z, β)] ≥ ǫ ≤ Kt e−κt nǫ , φh (ht+1 , β h t 0 i i N i=1 (4.59) where the random variables Z ∼ N (0, 1) and β ∼ pβ are independent. (Though Lemma 5 is stated for 1 ≤ t ≤ T ∗ , one can see that (4.59) holds for t = 0 by considering the pseudoLipschitz (PL) function φh (h1 , β0 ).) Now let φh (ht+1 , β0i ) := i ), β0i ), where φ is the PL function in the φ(ηt (β0i − ht+1 i statement of the theorem. The function φh (ht+1 , β0i ) is PL i since φ is PL and ηt is Lipschitz. We therefore obtain P P N  1 X ), β0i ) φ(ηt (β0i − ht+1 i N i=1  2 − E[φ(ηt (β − τt Z), β)] ≥ ǫ ≤ Kt e−κt nǫ . The proof is completed by noting from (1.3) and (4.5) that β t+1 = ηt (A∗ z t + β t ) = ηt (β0 − ht+1 ). V. P ROOF OF L EMMA 5 A. Mathematical Preliminaries Some of the results below can be found in [1, Section III.G], but we summarize them here for completeness. Fact 1. Let u ∈ RN and v ∈ Rn be deterministic vectors, and let à ∈ Rn×N be a matrix with independent N (0, 1/n) entries. Then: (a) 1 d d 1 Ãu = √ kukZu and Ã∗ v = √ kvkZv , n n where Zu ∈ Rn and Zv ∈ RN are i.i.d. standard Gaussian random vectors. (b) Let W be a d-dimensional subspace of Rn for d ≤ n. Let (w1 , ..., wd ) be an orthogonal basis of W with kwℓ k2 = k n for ℓ ∈ [d], and let PW denote the orthogonal projection operator onto W. Then for D = [w1 | . . . | wd ], we have d d k k PW Ãu = √1n kukPW Zu = √1n kukDx where x ∈ Rd is a random vector with i.i.d. N (0, 1/n) entries. Fact 2 (Stein’s lemma). For zero-mean jointly Gaussian random variables Z1 , Z2 , and any function f : R → R for which E[Z1 f (Z2 )] and E[f ′ (Z2 )] both exist, we have E[Z1 f (Z2 )] = E[Z1 Z2 ]E[f ′ (Z2 )]. Fact 3. Let v1 , . . . , vt be a sequence of vectors in Rn such k that for i ∈ [t], n1 kvi − Pi−1 (vi )k2 ≥ c, where c is a positive k constant that does not depend on n, and Pi−1 is the orthogonal projection onto the span of v1 , . . . , vi−1 . Then the matrix C ∈ Rt×t with Cij = vi∗ vj /n has minimum eigenvalue λmin ≥ c′t , where c′t is a positive constant (not depending on n). Fact 4. Let g : R → R be a bounded function. For all s, ∆ ∈ R such that g is differentiable in the closed interval between s and s + ∆, there exists a constant c > 0 such that |g(s + ∆) − g(s)| ≤ c|∆|. We also use several concentration results listed in Appendices A and B, with proofs provided for the results that are non-standard. Some of these may be of independent interest, e.g., concentration of sums of a pseudo-Lipschitz function of sub-Gaussians (Lemma B.4). The proof of Lemma 5. proceeds by induction on t. We label as Ht+1 the results (4.39), (4.41), (4.42), (4.45), (4.47), (4.49), (4.51), (4.53), (4.55), (4.57) and similarly as Bt the results (4.40), (4.43), (4.44), (4.46), (4.48), (4.50), (4.52), (4.54), (4.56), (4.58). The proof consists of showing four steps: 1) B0 holds. 2) H1 holds. 3) If Br , Hs holds for all r < t and s ≤ t, then Bt holds. 4) if Br , Hs holds for all r ≤ t and s ≤ t, then Ht+1 holds. For the proofs of parts (b).(ii) and (b).(iv), for brevity we assume that the functions ψh and ψb are differentiable everywhere. The case where they are not differentiable at a finite number of points involves additional technical details; see Appendix D. B. Step 1: Showing B0 holds We wish to show results (a)-(h) in (4.40), (4.43), (4.44), (4.46), (4.48), (4.50), (4.52), (4.54), (4.56), (4.58). (a) We have  1 k∆0,0 k2 ≥ ǫ P n r  r   1  1 (a) ǫ ǫ 0 ⊥ ′ √ √ kq k − σ0 ≥ kZ k − 1 ≥ +P ≤ P n 2 n 0 2 (b) ≤ Ke−κε2 nǫ/4 + 2e−nǫ/8 . Step (a) is obtained using the definition of ∆0,0 in (4.26), and then applying Lemma A.3. For step (b), we use (4.3), Lemma A.4, and Lemma B.2. (b).(iii) For t = 0, the LHS of (4.43) can be bounded as n  1X  P φb (b0i , wi ) − E[φb (σ0 Z̆0 , W )] ≥ ǫ n i=1 n  1X (a) φb (σ0 Z0′ i + [∆0,0 ]i , wi ) = P n i=1  − E[φb (σ0 Z̆0 , W )] ≥ ǫ n  1X (b) (5.1) ≤P φb (σ0 Z0′ i , wi ) n i=1 ǫ − E[φb (σ0 Z̆0 , W )] ≥ 2 n h  1X +P φb (σ0 Z0′ i + [∆0,0 ]i , wi ) n i=1 i ǫ − φb (σ0 Z0′ i , wi ) ≥ . 2 11 Step (a) uses the conditional distribution of b0 given in (4.24), and step (b) follows from Lemma A.2. Label the terms on the RHS of (5.1) as T1 and T2 . Term T1 can be upper bounded 2 by Ke−κnǫ using Lemma B.4. We now show a similar upper bound for term T2 . T2 (a) ≤ P n L X n i=1 (1 + 2|σ0 Z0′ i | + |∆0,0i | + 2|wi |)|∆0,0 i | ≥ ǫ 2 ǫ   k∆ k 1 |Z ′ | |∆ | |w| √0,0 k √ + √0,0 + 2σ0 √0 + 2 √ k ≥ ≤P n n n n n 2L  k∆ k  (c) k∆0,0 k ǫ  kZ0′ k kwk  0,0 √ , ≤P 1+ √ ≥ + 2σ0 √ + 2 √ 4L n n n n (5.2) (b) where inequality (a) holds because φb is pseudo-Lipschitz with constant L > 0. Inequality (b) follows from Cauchy-Schwarz (with 1 denoting the all-ones vector). Inequality (c) is obtained by applying Lemma C.3. From (5.2), we have  kwk   kZ ′ k  T2 ≤ P √ ≥ σ + 1 + P √ 0 ≥ 2 n n  k∆ k ǫ min{1, (4L)−1 }  0,0 (5.3) √ ≥ +P 4 + 4σ0 + 2σ n (a) 2 ≤ Ke−κn + e−n + Ke−κnǫ , where to obtain (a), we use assumption (1.6), Lemma B.2, and B0 (a) proved above. (b).(iv) For t = 0, the probability in (4.44) can be bounded as n   1X ψb (b0i , wi ) − E[ψb (σ0 Z̆0 , W )] ≥ ǫ n i=1 n  1X (a) = P ψb (σ0 Z0′ i + [∆0,0 ]i , wi ) n i=1  − E[ψb (σ0 Z̆0 , W )] ≥ ǫ n  1X (b) [ψb (σ0 Z0′ i + [∆0,0 ]i , wi ) ≤P n i=1 ǫ − ψb (σ0 Z0′ i , wi )] ≥ 2 n  1X ǫ ψb (σ0 Z0′ i , wi ) − E[ψb (σ0 Z̆0 , W )] ≥ . +P n i=1 2 (5.4) P Step (a) uses the conditional distribution of b0 given in (4.24), and step (b) follows from Lemma A.2. Label the two terms on the RHS of (5.4) as T1 and T2 , respectively. We now show 2 that each term is bounded by Ke−κnǫ . Since |ψb | is bounded (say it takes values in an interval of length B), the term T2 can be bounded using Hoeffding’s inequality (Lemma A.1) by 2 2 2e−nǫ /(2B ) . Next, consider T1 . Let Π0 be the event under consideration, so that T1 = P (Π0 ), and define an event F as follows. n 1 o F := √ kq 0 k − σ0 ≥ ǫ0 , (5.5) n where ǫ0 > 0 will be specified later. With this definition, T1 = P (Π0 ) ≤ P (F ) + P (Π0 |F c ) 2 ≤ Ke−κnǫ0 + P (Π0 |F c ). (5.6) The final inequality in (5.6) follows from the concentration of kq 0 k in (4.3). To bound the last term P (Π0 |F c ), we write it as P (Π0 |F c ) = E[I{Π0 }|F c ] = E[E[I{Π0 }|F c , S0,0 ] | F c ] = E[P (Π0 |F c , S0,0 ) | F c ], (5.7) where I{·} denotes P (Π0 |F c , S0,0 ) equals P the n h   1X  kq 0 k ψb √ Z0′ i , wi n i=1 n indicator function, and  (5.8) ǫ c − ≥ F , S0,0 . 2 To obtain (5.8), we use the fact that σ0 Z0′ i + [∆0,0 ]i = √1 kq 0 kZ ′ which follows from the definition of ∆0,0 in 0i n Lemma 3. Recall from Section IV-D that S0,0 is the sigmaalgebra generated by {w, β0 , q 0 }; so in (5.8), only Z0′ is random — all other terms are in S0,0 . We now derive a bound for the upper tail of the probability in (5.8); the lower tail bound is similarly obtained. From here on, we suppress the conditioning on F c , S0,0 for brevity. i ψb (σ0 Z0′ i , wi ) Define the shorthand diff(Z0′ i ) := ψb ( √1n kq 0 kZ0′ i , wi ) − ψb (σ0 Z0′ i , wi ). Since ψb is bounded, so is diff(Z0′ i ). Let |ψb | ≤ B/2, so that |diff(Z0′ i )| ≤ B for all i. Then the upper tail of the probability in (5.8) can be written as n n 1 X  ǫ 1X P diff(Z0′ i ) − E[diff(Z0′ i )] ≥ − E[diff(Z0′ i )] . n i=1 2 n i=1 (5.9) We now show that |E[diff(Z0′ i )]| ≤ 41 ǫ for all i ∈ [n]. Denoting the standard normal density by φ, we have Z φ(z) |diff(z)|dz |E[diff(Z0′ i )]| ≤ R Z   kq 0 k (b) (a) φ(z) C z √ − σ0 dz ≤ 2Cǫ0 . ≤ n R The above is bounded by 41 ǫ if we choose ǫ0 ≤ ǫ/8C. In the chain above, (a) follows by Fact 4 for a suitable constant C > 0 as ψb is bounded and assumed to be differentiable. Step (b) follows since | √1n kq 0 k − σ0 | ≤ ǫ0 under F c . The probability in (5.9) can then be bounded using Hoeffding’s inequality (Lemma A.1): n 1 X  2 ǫ − nǫ P diff(Z0′ i ) − E[diff(Z0′ i )] ≥ F c , S0,0 ≤ e (8B2 ) . n i=1 4 Substituting in (5.8) and using a similar bound for the lower 2 2 tail, we have shown via (5.7) that P (Π0 | F c ) ≤ 2e−nǫ /(8B ) . Using this in (5.6) with ǫ0 ≤ ǫ/8C proves that the first term 2 in (5.4) is bounded by Ke−nκǫ . (c) The function φb (b0i , wi ) := b0i wi ∈ P L(2) by Lemma 12 C.1. By B0 (b).(iii),  1  2 P (b0 )∗ w − E[σ0 Z̆0 W ] ≥ ǫ ≤ Ke−κnǫ . n This result follows since E[σ0 Z̆0 W ] = 0 by the independence of W and Ẑ0 . (d) The function φb (b0i , wi ) := (b0i )2 ∈ P L(2) by Lemma C.1. By B0 (b).(iii),  1  2 P kb0 k2 − E[(σ0 Z̆0 )2 ] ≥ ǫ ≤ Ke−κnǫ . n This result follows since E[(σ0 Ẑ0 )2 ] = σ02 . (e) Since g0 is Lipschitz, the function φb (b0i , wi ) := (g0 (b0i , wi ))2 ∈ P L(2) by Lemma C.1. By B0 (b).(iii),  1  2 km0 k2 − E[(g0 (σ0 Z̆0 , W ))2 ] ≥ ǫ ≤ Ke−κnǫ . P n This result follows since E[(g0 (σ0 Z̆0 , W ))2 ] = τ02 by (4.4). (f) The concentration of ξ0 around ξ̂0 follows from B0 (b).(iv) applied to the function ψb (b0i , wi ) := g0′ (b0i , wi ). Next, the function φb (b0i , wi ) := b0i g0 (b0i , wi ) ∈ P L(2) by Lemma C.1. Then by B0 (b).(iii),  1  2 P (b0 )∗ m0 − E[σ0 Z̆0 g0 (σ0 Z̆0 , W )] ≥ ǫ ≤ Ke−κnǫ . n = This result follows since E[σ0 Z̆0 g0 (σ0 Z̆0 , W )] σ02 E[g0′ (σ0 Z̆0 , W )] = ξ̂0 Ẽ0,0 by Stein’s Lemma given in Fact 2. (g) Nothing to prove. (h) The result is equivalent to B0 (e) since km0⊥ k = km0 k and (τ0⊥ )2 = τ02 . C. Step 2: Showing H1 holds We wish to show results (a)–(h) in (4.39), (4.41), (4.42), (4.45), (4.47), (4.49), (4.51), (4.53), (4.55), (4.57). (a) From the definition of ∆1,0 in (4.27) of Lemma 3, we have  km0 k  km0 kq̃ 0 Z̄ d 0 √ ∆1,0 = Z0 √ − τ0⊥ − n n (5.10)  n  (b0 )∗ m0 ξ0 kq 0 k2  . − + q0 kq 0 k2 n n where q̃ 0 = q 0 /kq 0 k, and Z̄0 ∈ R is a standard Gaussian random variable. The equality in (5.10) is obtained using Fact d k 1 to write Pq0 Z0 = q̃ 0 Z̄0 . Then, from (5.10) we have r   (a)  km0 k 1 ǫ kZ0 k √ − τ0 √ k∆1,0 k2 ≥ ǫ ≤ P P ≥ N 9 n N  km0 k|Z̄ | r ǫ  0 √ +P ≥ 9 nN r   (b0 )∗ m0 ǫ ξ0 kq 0 k √ . − ≥ +P √ nkq 0 k n 9δ (5.11) Step (a) follows from Lemma C.3 applied to ∆1,0 in (5.10) and Lemma A.2. Label the terms on the RHS of (5.11) as T1 − T3 . To complete the proof, we show that each term is bounded by Ke−κnǫ for generic positive constants K, κ that do not depend on n, ǫ. Indeed, T1 ≤ Ke−κnǫ using Lemma A.3, Lemma A.4, result B0 (e), and Lemma B.2. Similarly, T2 ≤ Ke−κnǫ using Lemma A.3, Lemma A.4, result B0 (e), and Lemma B.1. Finally, r   (b0 )∗ m0 √n (a) 1 ǫ ˆ · 0 − ξ0 σ0 ≥ T3 ≤ P n kq k 2 9δ r   kq 0 k 1 ǫ + P ξ0 √ − ξ̂0 σ0 ≥ n 2 9δ (b) −κnǫ 2 4 −2 ≤ 2Ke δ max(1,ξ̂0 σ0 ,σ0 ) −κnǫ 2 2 + 2Ke δ max(1,ξ̂0 ,σ0 ) . Step (a) follows from Lemma A.2, and step (b) from Lemma A.3, B0 (f ), the concentration of kq 0 k given in (4.3), and Lemma A.6. (b)(i) The proof of (4.41) is similar to analogous B0 (b)(iii) result (4.43). (b)(ii) First, P N  1 X  ψh (h1i , β0i ) − E[ψh (τ0 Z̃0 , β)] ≥ ǫ N i=1 (a) = P N  1 X ψh (τ0 Z0i + [∆1,0 ]i , β0i ) N i=1 − E[ψh (τ0 Z̃0 , β)] ≥ ǫ (b) ≤P N  1 X [ψh (τ0 Z0i + [∆1,0 ]i , β0i ) N i=1 −ψh (τ0 Z0i , β0i )] ≥  ǫ 2 N  1 X ǫ ψh (τ0 Z0i , β0i ) − E[ψh (τ0 Z̃0 , β)] ≥ . +P N i=1 2 (5.12) Step (a) follows from the conditional distribution of h1 stated in (4.25) and step (b) from Lemma A.2. Label the two terms on 2 the RHS as T1 and T2 . Term T2 is upper bounded by Ke−κnǫ by Hoeffding’s inequality (Lemma A.1). To complete the proof, we show that T1 has the same bound. Consider the first term in (5.12). From the definition of ∆1,0 in Lemma 3, 1 k τ0 Z0i + [∆1,0 ]i = √ km0 k[(I − Pq0 )Z0 ]i + ui , (5.13) n where ui := qi0  (b0 )∗ m0 kq 0 k2 − ξ0  . For ǫ0 > 0 to be specified later, define event F as n km0 k o n (b0 )∗ m0 ξ kq 0 k2 o 0 √ − τ0 ≥ ǫ0 ∪ F := − ≥ ǫ0 . n n n (5.14) Denoting the event we are considering in T1 by Π1 , so that T1 = P (Π1 ), we write 2 T1 = P (Π1 ) ≤ P (F )+P (Π1 | F c ) ≤ Ke−κnǫ0 +P (Π1 | F c ) (5.15) 13 where the last inequality is by B0 (e), B0 (f ) and the concentration assumption (4.3) on q 0 . Writing P (Π1 |F c ) = E[P (Π1 |F c , S1,0 ) | F c ], we now bound P (Π1 |F c , S1,0 ). In what follows, we drop the explicit conditioning on F c and S1,0 for brevity. Then using Lemma A.2, P (Π1 |F c , S1,0 ) can be written as N h  km0 k  1 X  k ψh √ [(I − Pq0 )Z0 ]i + ui , β0i P N i=1 n i ǫ − ψh (τ0 Z0i , β0i ) ≥ 2 N  1 X  km0 k  k ≤P ψh √ [(I − Pq0 )Z0 ]i + ui , β0i N i=1 n (5.16)  km0 k  ǫ − ψh √ Z0i + ui , β0i ≥ 4 n N  km0 k  1 X  ψh √ Z0i + ui , β0i +P N i=1 n ǫ . − ψh (τ0 Z0i , β0i ) ≥ 4 Note that in (5.16), only Z0 is random as the other terms are all in S1,0 . Label the two terms on the RHS of (5.16) as T1,a and T1,b . To complete the proof we show that both are 2 bounded by Ke−κnǫ . First consider T1,a . (a) T1,a ≤ P (b) ≤P N C X km0 k k ǫ √ [Pq0 Z0 ]i ≥ N i=1 n 4 N C X N i=1 k |τ0 + ǫ0 | [Pq0 Z0 ]i ≥ ǫ 4 N  (c)  C X |qi0 | ǫ ≤P |Z| ≥ N i=1 kq 0 k 4|τ0 + ǫ0 |  (e) (d)  |Z| 2 ǫ ≤ e−κN ǫ . ≤ P √ ≥ 4C|τ + ǫ | N 0 0 Step (a) holds by Fact 4 for a suitable constant C > 0. Step (b) follows because we are conditioning on F c defined in (5.14). Step (c) is obtained by writing out the expression for k the vector Pq0 Z0 : k Pq 0 Z 0 = N q0 q 0 X qj0 d Z0j = 0 Z, 0 0 kq k j=1 kq k kq k where Z ∈ R is standard Gaussian (Fact 1). Step (d) follows from Cauchy-Schwarz and step (e) by Lemma B.1. Considering T1,b , the second term of (5.16), and noting that all quantities except Z0 are in S1,0 , define the shorthand diff(Z0i ) := ψh ( √1n km0 kZ0i + ui , β0i ) − ψh (τ0 Z0i , β0,i ). Then the upper tail of T1,b can be written as N N  1 X ǫ 1 X diff(Z0i )−E[diff(Z0i )] ≥ − E[diff(Z0i )] . N i=1 4 N i=1 (5.17) Since ψh is bounded, so is diff(Z0i ). Using the conditioning on F c and steps similar to those in B0 (b)(iv), we can show P PN 1 that N1 i=1 E[diff(Z0i )] ≤ 8 ǫ for ǫ0 ≤ Cτ0 ǫ, where C > 0 can be explicitly computed. For such ǫ0 , using Hoeffding’s inequality the probability in (5.17) can be bounded 2 2 by e−nǫ /(128B ) when ψh takes values within an interval of length B. A similar bound holds for the lower tail of T1,b . 2 Thus we have now bounded both terms of (5.16) by Ke−nκǫ . The result follows by substituting the value of ǫ0 (chosen as described above) in (5.15). (c),(d),(e),(f) These results can be proved by appealing to H1 (b) in a manner similar to B0 (c)(d)(e)(f ). (g) From the definitions in Section IV-A and defining Q1 := 1 0 ∗ 1 1 0 2 1 kq k , we have γ01 = Q−1 1 n (q ) q and γ̂0 = Ẽ0,1 /Ẽ0,0 = n −2 Ẽ0,1 σ0 . Therefore, (a) −2 P (|γ01 − γ̂01 |≥ ǫ) ≤ P (|Q−1 1 − σ0 |≥ ǫ̃)  1  (5.18) (q 0 )∗ q 1 − Ẽ0,1 ≥ ǫ̃ +P n wherep (a) follows from Lemma A.3 with ǫ̃ := min{ ǫ/3, ǫ/(3Ẽ0,1 ), ǫσ02 /3}. We now show that each 2 of the two terms in (5.18) is bounded by Ke−κnǫ̃ . Since σ02 > 0, by Lemma A.6 and (4.3), we have 2 2 2 P (|Q−1 − σ0−2 |≥ ǫ̃) ≤ 2Ke−κnǫ̃ σ0 min(1,σ0 ) . The 1 concentration bound for n1 (q 0 )∗ q 1 follows from H1 (e). 1 2 (h) From the definitions in Section IV-A, we have kq⊥ k = 1 2 1 2 1 2 1 2 0 2 ⊥ 2 kq k − kqk k = kq k − (γ0 ) kq k , and (σ1 ) = σ12 − (γ̂01 )2 σ02 . We therefore have   1 1 2 kq⊥ k − (σ1⊥ )2 ≥ ǫ P n  kq 1 k2 (a) ǫ − σ12 ≥ ≤ P n 2  0 2 ǫ 1 2 kq k + P (γ0 ) − (γ̂01 )2 σ02 ≥ n 2 o n (b) −κnǫ2 ≤ K exp{−κnǫ2 } + K exp 1 4 4(9) max(1, (γ̂0 )4 , σ0 ) In the chain above, (a) uses Lemma A.2 and (b) is obtained using H1 (e) for bounding the first term and by applying Lemma A.3 to the second term along with the concentration of kq 0 k in (4.3), H1 (g), and Lemma A.5 (for concentration of the square). D. Step 3: Showing Bt holds We prove the statements in Bt assuming that B0 , . . . , Bt−1 , and H1 , . . . , Ht hold due to the induction hypothesis. The induction hypothesis implies that for 0 ≤ r ≤ (t − 1), the deviation probabilities P ( n1 k∆r,r k2 ≥ ǫ) in (4.40) and P ( n1 k∆r+1,r k2 ≥ ǫ) in (4.39) are each bounded by Kr e−κr nǫ . Similarly, the LHS in each of (4.41) – (4.58) is bounded by 2 Kr e−κr nǫ . We begin with a lemma that is required to prove Bt (a). The lemma as well as other parts of Bt assume the invertibility of M1 , . . . , Mt , but for the sake of brevity, we do not explicitly specify the conditioning. Lemma 6. Let v := Pt−1 t i−1 ] and Mt := i=1 λi γi m 1 ∗ t n Ht q⊥ 1 ∗ n Mt Mt . − n1 Mt∗ [λt mt−1 − If M1 , . . . , Mt are 14 invertible, we have for j ∈ [t], P (|[M−1 t v]j |≥ Therefore, 2 2  1  1 P (|vk | ≥ ǫ) ≤ P (hk )∗ q t − λt (mk−1 )∗ mt−1 ≥ ǫ′ n n   k ∗ 0 ′ t 1 + P |γ0 | (h ) q ≥ ǫ n t−1   X 1 1 P |γit | (hk )∗ q i − λi (mk−1 )∗ mi−1 ≥ ǫ′ + n n i=1 (5.23) 2 ǫ) ≤ Kt Kt−1 exp{−nκκt−1 ǫ /t }. Proof: We can represent Mt as i ∗ 1h nMt−1 Mt−1 mt−1 Mt = , ∗ mt−1 )∗ kmt−1 k2 n (Mt−1 Then, if Mt−1 is invertible, by the block inversion formula we have   t−1 (αt−1 )∗ nαt−1 − M−1 + nαkmt−1 t−1 2 2 t−1 km⊥ k  ⊥ k  M−1 , (5.19) t−1 ∗ t = ) n − n(α t−1 2 km k kmt−1 k2 ⊥ ⊥ t−1 −1 1 ∗ t−1 n Mt−1 Mt−1 m and where we have used α = ∗ (Mt−1 mt−1 )∗ αt−1 = (mt−1 )∗ mt−1 . Therefore, k   −1 t−1 Mt−1 v[t−1] + α ((αt−1 )∗ v[t−1] − vt )at−1 , M−1 v = t −((αt−1 )∗ v[t−1] − vt )at−1 (5.20) where ar := n/kmr⊥k2 for r ∈ [t], and v[r] ∈ Rr denotes the vector consisting of the first r elements of v ∈ Rt . Now, using the block inverse formula again to express M−1 t−1 v[t−1] t−1 t−1 t−1 and noting that α = (α0 , . . . , αt−2 ), we obtain Mt−1 v  t−2 M−1 ((αt−2 )∗ v[t−2] − vt−1 )at−2 t−2 v[t−2] + α t−1 ∗  +αt−1 ) v[t−1] − vt )at−1 [t−2] ((α  t−2 ∗ =  −((α ) v[t−2] − vt−1 )at−2  +αt−1 ((αt−1 )∗ v − vt )at−1 t−2 −((αt−1 )∗ v[t−1] − vt )at−1 [t−1]    .   Continuing in this fashion, we can express each element of Mt−1 v as follows: [Mt−1 v]k =  Pt−1 j j ∗ k = 1,  j=1 α0 ((α ) v[j] − vj+1 )aj ,  v1 a0 +  k−1 ∗ −((α ) v − vk )ak−1 P [k−1] j j ∗  + t−1 α  j=k k−1 ((α ) v[j] − vj+1 )aj , 2 ≤ k < t,  t−1 ∗ −((α ) v[t−1] − vt )at−1 , k = t. (5.21) We will prove that each entry of M−1 t v concentrates around 0 by showing that each entry of v concentrates around zero, and the entries of αj , aj concentrate around constants for j ∈ [t]. ǫ where ǫ′ = t+1 . The first term in (5.23) can be bounded using Lemma A.3 and induction hypotheses Ht (f ) and Bt−1 (e) as follows.  (hk )∗ q t  (mk−1 )∗ mt−1 P ≥ ǫ′ − λt n n  (hk )∗ q t ǫ′  − λ̂t Ĕk−1,t−1 ≥ ≤P n 2  (mk−1 )∗ mt−1 ǫ′  − λ̂t Ĕk−1,t−1 ≥ + P λt n 2 ′2 ≤ Kt−1 e−κκt−1 nǫ + 2Kt−1 e − κκt−1 nǫ′2 2 max(1,λ̂2 t ,Ĕk−1,t−1 ) For k ∈ [t], the second term in (5.23) can be bounded as   1 P |γ0t | (hk )∗ q 0 ≥ ǫ′ n   1 ≤ P (|γ0t − γ̂0t | + |γ̂0t |)| (hk )∗ q 0 | ≥ ǫ′ n √ ≤ P (|γ0t − γ̂0t | ≥ ǫ′ )  1  ǫ′ + P | (hk )∗ q 0 | ≥ min{1, |γ̂0t |−1 } n 2 ′ ′2 ≤ Kt−1 e−κκt−1 nǫ + Kt−1 e−κκt−1 nǫ , where the last inequality follows from induction hypotheses Ht (g) and Ht (c). Similarly, for k ∈ [t], i ∈ [t − 1], the third term in (5.23) can be bounded as   (mk−1 )∗ mi−1 (hk )∗ q i P |γit | − λi ≥ ǫ′ n n   (mk−1 )∗ mi−1 (hk )∗ q i t t t − λi | ≥ ǫ′ ≤ P (|γi − γ̂i | + |γ̂i |)| n n √ ≤ P (|γit − γ̂it | ≥ ǫ′ )   (hk )∗ q i ǫ′ (mk−1 )∗ mi−1 ≥ min{1, (γ̂it )−1 } − λi +P n n 2 ′ ′2 ≤ Kt−1 e−κκt−1 nǫ + 2Kt−1 e−κκt−1 nǫ . Substituting ǫ′ = them in (5.23), ǫ t+1 in each of the above bounds and using P (|vk | ≥ ǫ) ≤ KtKt−1 e−κκt−1 ǫ t = ForPk ∈ [t], bound |vk | as follows. Substituting q⊥ t−1 t j q − j=0 γj q in the definition of v and using the triangle inequality, we have t (hk )∗ q t (mk−1 )∗ mt−1 (hk )∗ q 0 − λt + |γ0t | n n n t−1 k−1 ∗ i−1 k ∗ i X (m ) m (h ) q . − λi |γit | + n n i=1 (5.22) |vk | ≤ . 2 /t2 . (5.24) Furthermore, from induction hypotheses B0 (g) − Bt−1 (g), for 0 ≤ i < j ≤ (t − 1): 2 P (|αji − α̂ji | ≥ ǫ) ≤ Kt−1 e−nκt−1 ǫ . (5.25) Also, using induction hypotheses B0 (h)−Bt−1 (h) and Lemma A.6, for 0 ≤ r ≤ (t − 1): 2 P (|ar − (τt⊥ )−2 | ≥ ǫ) ≤ Kt−1 e−nκt−1 ǫ . (5.26) 15 Finally, from (5.21), we have for k ∈ [t],   P |[M−1 t v]k | ≥ ǫ  (a) ≤ P ∪k∈[t] {|vk | ≥ ǫ} ∪0≤r<t {|ar − (τt⊥ )−2 | ≥ κ1 ǫ/t}  ∪0≤i<j<t {|αji − α̂ji | ≥ κ2 ǫ/t} (b) ≤ Kt2 Kt−1 e−nκκt−1 ǫ 2 /t2 . where in step (a), κ1 , κ2 are appropriately chosen positive constants, and step (b) follows from the bounds in (5.24), (5.25), and (5.26). For 0 ≤ r ≤ t − 1, the first term is bounded as  p  1 P |γrt − γ̂rt | √ kbr k ≥ ǫ̃t n  p    1 t t ≤ P |γr − γ̂r | √ kbr k − σr + σr ≥ ǫ̃t n √  ǫ̃t 1  ≤ P |γrt − γ̂rt |≥ min{1, } 2 σr  kbr k √ + P √ − σr ≥ ǫ n (a) ≤ Kt−1 e−κκt−1 nǫ̃t + Kt−1 e−κκt−1 nǫ , where step (a) follows from induction hypotheses Ht (g), B0 (d) − Bt−1 (d), and Lemma A.4. Next, the third term in (5.27) is bounded as  1 p  1 t k − σt⊥ √ kZt′ k ≥ ǫ̃t P √ kq⊥ n n √   1  1 √  ǫ̃t t + P √ kZt′ k ≥ 2 k − σt⊥ ≥ √ ≤ P √ kq⊥ n n 2 (b) ≤ Kt−1 e−κκt−1 nǫ̃t + e−n/8 , (a) Recall the definition of ∆t,t from (4.28). Then using d k t t kM̃t Z̄t′ , where the Fact 1, it follows √1n kq⊥ kPMt Zt′ = n1 kq⊥ columns of M̃t ∈ Rn×t form an orthogonal basis for the column space of Mt with M̃t∗ M̃t = nIt , and Z̄t′ ∈ Rt is an independent random vector with i.i.d. N (0, 1) entries. Then, ∆t,t = t−1 X  1  t (γrt − γ̂rt )br + Zt′ √ kq⊥ k − σt⊥ n r=0 1 t kq kM̃t Z̄t′ + Mt M−1 t v, n ⊥ where Mt ∈ Rt×t and v ∈ Rt are defined in Lemma 6. Pt−1 −1 Writing Mt Mt v = j=0 mj [M−1 t v]j+1 and using Lemma C.3, we have − t−1  1 2 X k∆t,t k2 t ≤ (γrt − γ̂rt )2 kbr k2 + kZt′ k2 √ kq⊥ k − σt⊥ 2(t + 1) r=0 n + t−1 X 1 t 2 ′ 2 kmj k2 [Mt−1 v]2j+1 , Z̄ k + kq k k M̃ t t n2 ⊥ j=0 Applying Lemma A.2, P t−1   k∆ k2  X kbr k p  t,t ≥ǫ ≤ P |γrt − γ̂rt | √ ≥ ǫ̃t n n r=0  kq t k kM̃ Z̄ ′ k p  t t + P √⊥ ≥ ǫ̃t n n  kq t k kZ ′ k p  √⊥ − σt⊥ √ t ≥ ǫ̃t +P n n t−1  X kmj k p  √ ≥ ǫ̃t , P [M−1 v] + j+1 t n j=0 where step (b) is obtained using induction hypothesis Ht (h), t Lemma A.4, and Lemma B.2. Since √1n kq⊥ k concentrates on ⊥ σt by Ht (h), the second term in (5.27) can be bounded as  1 p  1 t k · kM̃t Z̄t′ k ≥ ǫ̃t P √ kq⊥ n n  1 √  t k − σt⊥ ≥ ǫ ≤ P √ kq⊥ n (5.28) 1  1p ′ ⊥ −1 kM̃t Z̄t k ≥ +P ǫ̃t min{1, (σt ) } n 2 ≤ Kt−1 e−κκt−1 nǫ̃t + tKKt−1 e−κκt−1 nǫ̃t /t , where the last inequality is obtained as follows. The concentra√ t tion for kq⊥ k/ n has already been shown above. For the second term, denoting P the columns of M̃t by {m̃P 0 , . . . , m̃t−1 }, we t−1 ′ 2 2 ′ 2 have kM̃t Z̄t′ k2 = t−1 i=0 (Z̄ti ) since i=0 km̃i k (Z̄ti ) = n 2 the {m̃i } are orthogonal, and km̃i k = n for 0 ≤ i ≤ t − 1. Therefore, t−1   X 1 ′ 2 ′ 2 ) ≥ nǫ̃ ( Z̄ = P Z̄ k ≥ ǫ̃ k M̃ t t t ti t n2 i=0 r t−1  (c) X nǫ̃t nǫ̃t  (d) P |Z̄t′i | ≥ ≤ ≤ 2te− 2t . t i=0 P Step (c) is obtained from Lemma A.2, and step (d) from Lemma B.1. This yields the second term in (5.28). (5.27) where ǫ̃t := (5.27). ǫ 4(t+1)2 . We now bound each of the terms in Finally, for 0 ≤ j ≤ (t − 1), the last term in (5.27) can be 16 bounded by  kmj k p  ≥ ǫ̃t P |[M−1 t v]j+1 | √ n  p    kmj k √ − τj + τj ≥ ǫ̃t = P |[M−1 t v]j+1 | n  kmj k √  √ − τj ≥ ǫ ≤P n √  1  ǫ̃t −1 + P |[Mt v]j+1 |≥ min{1, } 2 τj (e) using (5.32) we bound the second term in (5.30) as follows. n  1X ǫ (φb (ai ) − φb (ci )) ≥ P n i=1 2 n  1X 2 ǫ2  (φb (ai ) − φb (ci )) ≥ =P n i=1 4 n 1 1 X  2 ǫ min{1, 12L 2} ≤P kai − ci k2 ≥ n i=1 2 + 8(σ12 + . . . + σt2 + σ 2 ) n  1 X kcj k2 ≥ 2(σ12 + . . . + σt2 + σ 2 ) . (5.33) +P n j=1 2 ≤ Kt−1 e−κκt−1 nǫ + Kt2 Kt−1 e−κκt−1 nǫ̃t /t , where step (e) follows from induction hypothesis Bt−1 (e), and ǫ Lemma 6. Substituting ǫ̃t = 4(t+1) 2 , we have bounded each term of (5.27) as desired. (b).(iii) For brevity, let Eφb := E[φb (σ0 Z̆0 , ..., σt Z̆t , W )], and ai = (b0i , ..., bti , wi ), ci = (b0pure i , ..., btpure i , wi ). (5.29) Using Lemma A.2, we have n   1X φb (b0i , ..., bti , wi ) − Eφb ≥ ǫ P n i=1 n  1X ǫ φb (ci ) − Eφb ≥ ≤P n i=1 2 n  1X ǫ (φb (ai ) − φb (ci )) ≥ +P . n i=1 2 ≤ 2e−κnǫ 3 /t , =P n 1 X n j=1 t  X  3 σr2 ) ≤ e−κn/t kcj k2 − Ekcj k2 ≥ (σ 2 + r=1 (5.34) for an absolute constant κ > 0, where the last inequality is obtained by applying the concentration result in Lemma B.4 to the pseudo-Lipschitz function φb (cj ) = kcj k2 . (5.30) n X i=1 = Lemma 4 (Eq. (4.32)) shows the joint distribution of (b0pure i , ..., btpure i ) is jointly Gaussian for i ∈ [N ]. The first term in (5.30) can therefore be bounded as n  1X ǫ φb (ci ) − Eφb ≥ P n i=1 2 n  1X ǫ =P φb (σ0 Z̆0,i , . . . , σt Z̆t,i , wi ) − Eφb ≥ n i=1 2 2 Label the two terms above as T1 and T2 . We bound T2 as n t 1 X  X 2 2 P kcj k ≥ 2(σ + σr2 ) n j=1 r=1 ≤ = kai − ci k2 = n X t hX k X i=1 k=0 r=0 n X t h X k X i=1 k=0 i=1 k=0 (bkpurei − bki )2 ckr [∆r,r ]i (ckr′ )2 r ′ =0 t h X k X k=0 n X t X i2 k X ([∆r,r ]i )2 r=0 k X (ckr′ )2 k∆r,r k2 ′ r=0 r =0 i = i t X r=0 k∆r,r k 2 t X k X k=r (ckr′ )2 , r ′ =0 (5.35) where the inequality is obtained by applying Cauchy-Schwarz. (5.31) where the last inequality is obtained from Lemma B.4. Here κ > 0 is a generic absolute constant. We now bound the second term in (5.30) using the pseudoLipschitz property of φb . Denoting the pseudo-Lipschitz constant by L, we have n n h1 X i2 2 1X (φb (ai ) − φb (ci )) ≤ |φb (ai ) − φb (ci )| n i=1 n i=1 n i2 hL X (1 + 2kci k + kai − ci k)kai − ci k ≤ n i=1 n n n h i 4X 1X 3L2 X kaj − cj k2 1 + kci k2 + kai − ci k2 , ≤ n j=1 n i=1 n i=1 (5.32) where the last inequality is obtained by first applying CauchySchwarz, and then using Lemma C.3. For j ∈ [N ], note that Ekcj k2 = σ12 + . . . + σt2 + σ 2 . Now Comparing (4.32) and (4.33) in Lemma 4, we observe that for k ≥ 0 and j ∈ [n], E(bkpure j )2 = σk2 = t X (σi⊥ )2 (cki )2 . (5.36) σk2 , ε2 (5.37) i=0 Therefore, k X i=0 (cki )2 ≤ σt2 min0≤i≤k (σi⊥ )2 ≤ where the last inequality follows from the stopping criterion in (2.5). Using (5.37) and (5.35) we have n t t X σ2 1X 1X k kai − ci k2 ≤ . k∆r,r k2 n i=1 n r=0 ε2 k=r 17 Therefore we can bound the first term T1 in (5.33) as follows. T1 = t 1 1 X  ε2 (σ12 + . . . + σt2 )−1 ǫ2 min{1, 12L 2} P k∆r,r k2 ≥ 2 2 2 n r=0 (2 + 8(σ1 + . . . + σt + σ )) ≤ t 1 X 2 7 κǫ2  (a) k∆r,r k2 ≤ 3 ≤ Kt3 Kt−1 e−κκt−1 nǫ /t , P n t r=0 (5.38) where K, κ > 0 are some absolute constants. The inequality (a) follows from steps B0 (a) − Bt (a). Finally, substituting (5.38) and (5.34) in (5.33), and then combining with (5.31) and (5.30), we obtain n  1X  P φb (b0i , ..., bti , wi ) − Eφb ≥ ǫ n i=1 ≤ Kt3 Kt−1 e−κκt−1 nǫ 2 /t7 . (5.39) Pt−1 (b).(iv) For brevity, we write bt,i := r=0 γ̂rt bri . Then using the conditional distribution of bt in (4.24) and Lemma A.2, we write n   1X ψb (bti , wi ) − E[ψb (σt Z̆t , W )] ≥ ǫ P n i=1 n  1X =P ψb (bt,i + σt⊥ Zt′i + [∆t,t ]i , wi ) n i=1  − E[ψb (σt Z̆t , W )] ≥ ǫ n h  1X ψb (bt,i + σt⊥ Zt′i + [∆t,t ]i , wi ) ≤P n i=1 i ǫ − ψb (bt,i + σt⊥ Zt′i , wi ) ≥ 3 n h  1X ⊥ ′ ψb (bt,i + σt Zti , wi ) +P n i=1 i ǫ − EZt′ [ψb (bt,i + σt⊥ Zt′i , wi )] ≥ 3 n  1X EZ ′ [ψb (bt,i + σt⊥ Zt′i , wi )] +P n i=1 t ǫ − E[ψb (σt Z̆t , W )] ≥ . 3 (5.40) Label the terms of (5.40) as T1 − T3 . First consider T2 . Since 2 ψb is bounded, Hoeffding’s inequality yields T2 ≤ 2e−κnǫ . To bound T3 , first note that the R2 → R function EZ [ψb (x+ Z, y)], Z ∼ N (0, 1), is bounded and differentiable in the first argument (due to the smoothness of the Gaussian density). Hence, using induction hypotheses B0 (b).(iv) − Bt−1 (b).(iv), the probability of each of the following events is bounded by Kt−1 exp{−κt−1 nǫ2 /t2 }: t−1 n X 1X γ̂rt bri + σt⊥ Zt′i , wi ) E ψb ( n i=1 r=0 t−2 X ǫ t − E ψb ( γ̂rt bri + γ̂t−1 σt−1 Z̆t−1 + σt⊥ Zt′i , W ) ≥ , t r=0 t−2 n X 1X t E ψb ( γ̂rt bri + γ̂t−1 σt−1 Z̆t−1 + σt⊥ Zt′i , W ) n i=1 r=0 t−3 t−1 X X ǫ − E ψb ( γ̂rt bri + γ̂rt ′ σr′ Z̆r′ + σt⊥ Zt′i , W ) ≥ , t ′ r=0 r =t−2 .. . t−1 n X 1X t E ψb (γ̂0t b0i + γ̂t−1 σt−1 Z̆t−1 + σt⊥ Zt′i , W )} n i=1 ′ r =1 − E ψb ( t−1 X r ′ =0 ǫ γ̂rt ′ σr′ Z̆r′ + σt⊥ Zt′i , W ) ≥ . t (5.41) In the above, the expectation in each term is over the random variables denoted in upper case. Recall from the proof of Pt−1 t d σt−1 Z̆t−1 + σt⊥ Zt′i = σt Z̆t . Lemma 4 above that r′ =1 γ̂t−1 Thus T3 , the third term in (5.40), can be bounded by the probability of the union of the events in (5.41), which is no larger than tKt−1 exp{−κt−1 nǫ2 /t2 }. Finally, consider T1 , the first term of (5.40). From the definition of ∆t,t in Lemma 3, we have bt,i +σt⊥ Zt′i +[∆t,t ]i = k t k[(I − PMt )Zt′ ]i + ui , where u = (u1 , . . . , un ) is bt,i + n1 kq⊥ Pt−1 t Pt−1 defined u := r=0 (γr − γ̂rt )br + j=0 mj [M−1 t v]j+1 , with v and Mt defined as in Lemma 6. For ǫ0 > 0 to be specified later, define the event F as n kq t k o o n kuk2 F := √⊥ − σt⊥ ≥ ǫ0 ∪ ≥ ǫ0 n n (5.42) n kbr k o t−1 √ ∪r=0 − σr ≥ ǫ0 . n Denoting the event we are considering in T1 by Πt and following steps analogous to (5.15)–(5.16) in H1 (b).(ii), we obtain P (T1 ) ≤ P (F ) + E[P (Πt | F c , St,t ) | F c ] 2 4 ≤ Kt2 Kt−1 e−κκt−1 nǫ0 /t + E[P (Πt | F c , St,t ) | F c ], (5.43) where the bound on P (F ) is obtained by the induction hypotheses Ht (h), B0 (d) − Bt−1 (d), Lemma A.4, and steps similar to the proof of Bt (a) for the concentration of kuk2 /n (cf. (5.27)). For the second term in (5.43), we have 18 the upper tail of T1,a can be written as P (Πt |F c , St,t ) n h  1X kq t k k =P ψb (bt,i + √⊥ [(I − PMt )Zt′ ]i + ui , wi ) n i=1 n i  − ψb (bt,i + σt⊥ Zt′i , wi ) ≥ ǫ n h  1X kq t k ψb (bt,i + √⊥ Zt′i + ui , wi ) ≤P n i=1 n i ǫ − ψb (bt,i + σt⊥ Zt′i , wi ) ≥ 2 n h  1X t kq⊥ k k ψb (bt,i + √ [(I − PMt )Zt′ ]i + ui , wi ) + n i=1 n i ǫ kq t k − ψb (bt,i + √⊥ Zt′i + ui , wi ) ≥ , n 2 (5.44) where we have omitted the conditioning on the RHS to shorten notation. Label the two terms in (5.44) as T1,a and T1,b . To complete the proof we show that both terms are bounded by 2 Ke−κnǫ /t . k t−1 t−1 X m̃r h (m̃r )∗ Zt′ i d X m̃r √ √ √ Ur , = n n n r=0 r=0 (5.45) where m̃r , 0 ≤ r ≤ t − 1, are columns of M̃t , which form an orthogonal basis for Mt with M̃t∗ M̃t = nIt , and U1 , . . . , Ut are i.i.d. ∼ N (0, 1). Then, n C X t (a) ǫ kq⊥ k √ [PkMt Zt′ ]i ≥ T1,b ≤ P n i=1 n 2 n  (b) ǫ CX ⊥ k (σt + ǫ0 )[PMt Zt′ ]i ≥ ≤P n i=1 2 n X t−1   CX m̃ri Ur ǫ √ =P ≥ n i=1 r=0 n 2|σt⊥ + ǫ0 | n diff(Zt′i ) − E[diff(Zt′i )] ≥ The proof is completed by collecting the above bounds for each of the terms in (5.40), and observing that the overall bound is dominated by P (T1 ) in (5.43). Hence the final bound is of the form Kt2 Kt−1 exp{−κκt−1 nǫ2 /t4 }. (c) The function φb (bti , wi ) := bti wi ∈ P L(2) by Lemma . C.1. Then by Bt (b).(iii), n1 (bt )∗ w = σt E[Z̆t W ] = 0. (d) The function φb (bri , bti , wi ) := bri bti ∈ P L(2) by Lemma C.1. The result then follows from Bt (b).(iii). (e) The function φb (bri , bti , wi ) := gr (bri , wi )gt (bti , wi ) ∈ P L(2) since gt is Lipschitz continuous (by Lemma C.1). Then by Bt (b).(iii), First consider T1,b . We note that PMt Zt′ = n 1 X  ǫ 1X E[diff(Zt′i )] . − n i=1 2 n i=1 (5.47) Using the conditioning on F c and steps similar to those in P B0 (b).(iv), we can show that n1 i E[diff(Zt′i )]] ≤ 41 ǫ for ǫ0 ≤ C(σt⊥ )ǫ, where the constant C > 0 can be explicitly computed. For such ǫ0 , using Hoeffding’s inequality the prob2 2 ability in (5.47) can be bounded by e−nǫ /(32B ) , where B is the upper bound on |diff(·)|. A similar bound holds for the lower tail of T1,a . Thus both terms of (5.44) are bounded by K exp{−κnǫ2 /t}. P (5.46) t−1 n X   CX 1/2 Z ǫ √ ≥ (m̃ri )2 n i=1 r=0 n 2|σt⊥ + ǫ0 | r  (d)  2 t ǫ ≤ P ≤ 2e−κnǫ /t . |Z| ≥ ⊥ n 2C|σt + ǫ0 | (c) =P In the above, (a) follows from Fact 4 for a suitable constant C > 0. Step (b) holds since we are conditioning P on event F c defined in (5.42). In step (c), Z ∼ N P (0, 1) since r m̃ri Ur is a zero-mean Gaussian with variance r (m̃ri )2 . Step (d) uses √ the Cauchy-Schwarz inequality and the fact that km̃r k = n for 0 ≤ r < t. 1 r ∗ t . (m ) m = E[gr (σr Z̆r , W )gt (σt Z̆t , W )] = Ĕr,t . n where the last equality is due to the definition in (4.15). (f) The concentration of ξt around ξˆt follows from Bt (b).(iv) applied to the function ψb (bti , wi ) := gt′ (bti , wi ). Next, for r ≤ t, φb (b0i , . . . , bti , wi ) := bri gt (bti , wi ) = bri mi ∈ P L(2), by Lemma C.1. Thus by Bt (b).(iii), 1 r ∗ t . (b ) m = E[σr Z̆r gt (σt Z̆t , W )] n and (a) E[σr Z̆r gt (σt Z̆t , W )] = σr σt E[Z̆r Z̆t ]E[gt′ (σt Z̆t , W )] = Ẽr,t E[gt′ (σt Z̆t , W )] = Ẽr,t ξ̂t , where (a) holds due to Stein’s lemma (Fact 2). (g) For 1 ≤ r, s ≤ t, note that [Mt ]r,s = n1 (mr−1 )∗ ms−1 . Hence by Bt−1 (e), [Mt ]r,s concentrates on [C̆ t ]r,s = Ĕr−1,s−1 . We first show (4.54). By Fact 3, if n1 kmr⊥ k2 ≥ c > 0 for all 0 ≤ r ≤ t − 1, then Mt is invertible. Note from Bt−1 (h) that n1 kmr⊥ k2 concentrates on (τr⊥ )2 , and (τr⊥ )2 > ε3 by the stopping criterion assumption. Choosing c = 21 ε3 , we therefore have t−1  X 1  1 P (Mt singular) ≤ P kmr⊥ k2 − (τr⊥ )2 ≥ ε3 n 2 r=0 ≤ Finally T1,a , the first term in (5.44), can be bounded using Hoeffding’s inequality. Noting that all quantities P except Zt′ are t−1 ′ in St,t , define the shorthand diff(Zti ) := ψb ( r=0 γ̂rt bri + P t−1 t r ⊥ ′ √1 kq t kZ ′ + ui , wi ) − ψb ( ti ⊥ r=0 γ̂r bi + σt Zti , wi ). Then n t−1 X r=0 Kr−1 e−κr−1 n(ε3 ) 2 /4 2 ≤ tKt−1 e−κκt−1 n(ε3 ) , (5.48) where the second inequality follows from B0 (h) − Bt−1 (h). Next, we show (4.56). Recall the expression for M−1 from t 19 in (4.17), for 1 ≤ i ≤ t, (5.19): M−1 t  = t−1 (αt−1 )∗ + nαkmt−1 2 ⊥ k n(αt−1 )∗ − kmt−1 k2 ⊥ M−1 t−1 t−1 nα − km t−1 2 k ⊥ n 2 kmt−1 ⊥ k  , (5.49) Block inversion can be similarly used to decompose C̆ t in terms of C̆ t−1 , which gives the concentrating values of the elements in (5.49). Let Fr denote the event that M−1 r is invertible, for r ∈ [t]. Then, for i, j ∈ [t], we have   −1 P [M−1 t ]i,j − [C̆t ]i,j ≥ ǫ | Ft   −1 c ≤ P (Ft−1 ) + P [M−1 t ]i,j − [C̆t ]i,j ≥ ǫ | Ft , Ft−1 ≤ (t − 1)Kt−2 e−κκt−2 n   −1 + P [M−1 t ]i,j − [C̆t ]i,j ≥ ǫ | Ft , Ft−1 , (5.50) where the final inequality follows from the inductive hypothesis Bt−1 (g). Using the representation in (5.49), we bound the second term in (5.50) for i, j ∈ [t]. In what follows, we drop the conditioning on Ft , Ft−1 for brevity. First, consider the entry at i = j = t. By Bt−1 (h) and Lemma A.6, 2 −2 ⊥ −2 P (|nkm⊥ − (τt−1 ) | ≥ ǫ) ≤ Kt−1 e−κκt−1 nǫ . t−1 k −2 t−1 Next, consider the ith element of −nkmt−1 α . For i ∈ ⊥ k [t − 1], −2 t−1 ⊥ −2 t−1 P (|nkmt−1 αi−1 − (τt−1 ) α̂i−1 |≥ ǫ) ⊥ k 2 ≤ 2Kt−1 e−κκt−1 nǫ , (5.51) which follows from Bt−1 (g), the concentration bound obtained −2 above for nkmt−1 , and combining these via Lemma A.3. ⊥ k Finally consider element (i, j) of M−1 t−1 t−1 −2 t−1 t−1 ∗ nkm⊥ k α (α ) for i, j ∈ [t − 1]. We have P  (a) [M−1 t−1 ]i,j + t−1 nαt−1 i−1 αj−1 2 kmt−1 ⊥ k − [C̆t−1 ]i,j − t−1 α̂t−1 i−1 α̂j−1 ⊥ )2 (τt−1 ǫ −1 [M−1 t−1 ]i,j − [C̆t ]i,j ≥ 2  ′ ǫ t−1 + P |αt−1 j−1 − α̂j−1 |≥ 2  ǫ′  t−1 −2 t−1 ⊥ −2 t−1 + P |nkm⊥ k αi−1 − (τt−1 ) α̂i−1 |≥ 2 ≤ P (b)  ≤ Kt−1 e κ nǫ2 − t−1 4 ≤ 4Kt−1 e + 2Kt−1 e −κκt−1 nǫ2 κκ nǫ′2 − t−1 4 + Kt−1 e ≥ǫ +  κ nǫ′2 − t−14 . Step (a) follows from Lemma A.2 and Lemma A.3 with p ⊥ 2 ǫ ǫ ǫ(τt−1 ) ′ , . Step (b) follows from the , 3α̂t−1 ǫ := min t−1 3 3α̂ i−1 j−1 inductive hypothesis, Ht (g), and (5.51). Next, we prove the concentration of αt around α̂t . Re∗ t call from Section IV-A that αt = n1 M−1 t Mt m where 1 ∗ Mt := n Mt Mt . Thus for 1 ≤ i ≤ t, αti−1 = Pt −1 1 j−1 ∗ t ) m . Then from the definition of α̂t j=1 [Mt ]i,j (m n P (|αti−1 − α̂ti−1 |≥ ǫ) = t h  X i  1 −1 P [Mt ]i,j (mj−1 )∗ mt − [(C̆ t )−1 ]i,j Ĕj−1,t ≥ ǫ n j=1 (a) ≤ t   1 X (mj−1 )∗ mt − Ĕj−1,t ≥ ǫ̃j P n j=1 + t X j=1 (b) t −1 P (|[M−1 ]i,j |≥ ǫ̃j ) t ]i,j − [(C̆ ) ≤ Kt4 Kt−1 e−κκt−1 nǫ 2 /t9 −2 2 + 4tKt−1 e−κκt−1 t nǫ . np o ǫ ǫ ǫ Step (a) uses ǫ̃j := min and 3t , 3tĔj−1,t , 3t[(C̆ t )−1 ]k,j follows from Lemma A.2 and Lemma A.3. Step (b) uses Bt (e) and the work above. (h) First, note that kmt⊥ k2 = kmt k2 − kmtk k2 = kmt k2 − kMt αt k2 . Using the definition of τt⊥ in (4.19),  1  P kmt⊥ k2 − (τt⊥ )2 ≥ ǫ n  1  1 kmt k2 − kMt αt k2 − τt2 + (α̂t )∗ Ĕt ≥ ǫ =P n n  kmt k2 ǫ − τt2 ≥ ≤P n 2  kM αt k2 ǫ t − (α̂t )∗ Ĕt ≥ +P . n 2 (5.52) The bound for the first term in (5.52) follows by Bt (e). For the second term, (a) ∗ t kMt αt k2 = n(αt )∗ Mt αt = (αt )∗ Mt M−1 t Mt m t ∗ = (α ) Mt∗ mt = t−1 X αti (mi )∗ mt , i=0 ∗ t M−1 t Mt m /n. where (a) holds because αt =  1 ǫ P kMt αt k2 − (α̂t )∗ Ĕt ≥ n 2 t−1 h  X i 1 t i ∗ t ǫ =P αi (m ) m − α̂ti Ĕi,t ≥ n 2 i=0 t−1 (a) X ≤ (b) i=0 P (|αti − α̂ti |≥ ǫ̃i ) ≤ Kt5 Kt−1 e−κκt−1 nǫ 2 Hence t−1   X 1 i ∗ t P + (m ) m − Ĕi,t ≥ ǫ̃i n i=0 /t11 + Kt4 Kt−1 e−κκt−1 nǫ 2 /t9 . Step n(a) follows Lemma o A.2 and Lemma A.3, using ǫ̃i := pǫ ǫ ǫ , , min 6t 6tĔi,t 6tα̂ti , and step (b) using Bt (e) and the proof of Bt (g) above. E. Step 4: Showing Ht+1 holds The statements in Ht+1 are proved assuming that Bt , Ht hold due to the induction hypothesis. (a) The proof of Ht+1 (a) is similar to that of Bt (a), and uses the following lemma, which is analogous to Lemma 6. 20 Pt−1 t i 1 ∗ ∗ t Lemma 7. Let v := n1 Bt+1 m⊥ t − n Qt+1 (ξt q − i=0 αi ξi q ) and Qt+1 := n1 Q∗t+1 Qt+1 . Then for j ∈ [t + 1], P (|[Q−1 t+1 v]j |≥ ǫ) ≤ Kt 2 ′ Kt−1 exp{−κ′t−1 nǫ2 /t2 }. (b)–(h) The proofs of the results in Ht+1 (b) − Ht+1 (h) are along the same lines as Bt (b) − Bt (h). By the end of step Ht+1 (h), we will similarly pick up a t5 K term in the pre-factor in front of the exponent, and a κt−11 term in the exponent. It then follows that the Kt , κt are as given in (4.38). A PPENDIX A C ONCENTRATION L EMMAS In the following, ǫ > 0 is assumed to be a generic constant, with additional conditions specified whenever needed. Lemma A.1 (Hoeffding’s inequality). If X1 , . . . , Xn are bounded P random variables such that ai ≤ Xi ≤ bi , then for ν = 2[ i (bi − ai )2 ]−1 P n 1 X n i=1  2 2 (Xi − EXi ) ≥ ǫ ≤ e−νn ǫ , n   1X 2 2 (Xi − EXi ) ≥ ǫ ≤ 2e−νn ǫ . P n i=1 then P (||Xn | − |c||≥ ǫ) ≤ e−κn|c| 2 2 ǫ . 2 2 2 Proof: If√ǫ ≤ c2 , then the event √ c − ǫ ≤ Xn ≤ c + ǫ implies that c2 − ǫ ≤ |Xn | ≤ c2 + ǫ. On the other hand, if ǫ ≥ c2 , then c2 − ǫ ≤ Xn2 ≤ c2 + ǫ implies that 0 ≤ |Xn | ≤ √ c2 + ǫ. Therefore, |Xn2 − c2 |≤ ǫ implies p p ||Xn | − |c|| ≤ |c| max(1− (1 − (ǫ/c2 ))+ , 1 + (ǫ/c2 )−1), where x+ := max{x, 0}. Note, (1 + x)1/2 ≤ 1 + 12 x for x ≥ 0, and (1 − x)1/2 ≥ 1 − x for x ∈ (0, 1). Using these, we conclude that |Xn2 − c2 |≤ ǫ implies r r   ǫ ǫ ||Xn | − |c|| ≤ |c| max 1 − 1− 2 , 1+ 2 −1 c + c ǫ ǫ  ǫ ≤ |c| max 2 , 2 = . c 2c |c| Lemma A.5 (Concentration of Powers). Assume c 6= 0 and 0 < ǫ ≤ 1. Then for any integer k ≥ 2, 2 if P (|Xn − c|≥ ǫ) ≤ e−κnǫ , then 2 k k 2 P (|Xnk − ck |≥ ǫ) ≤ e−κnǫ /[(1+|c|) −|c| ] . Lemma A.2 (Concentration of Sums). If random variables 2 X1 , . . . , XM satisfy P (|Xi | ≥ ǫ) ≤ e−nκi ǫ for 1 ≤ i ≤ M , Proof: Without loss of generality, assume that c > 0. then First consider the case where ǫ < c. Then c − ǫ ≤ Xn ≤ c + ǫ M M   X X 2 2 implies ǫ  P |Xi | ≥ ≤ M e−n(mini κi )ǫ /M . Xi |≥ ǫ ≤ P | k   M X i=1 i=1 k k−i i k k k k k k c ǫ. (c − ǫ) − c ≤ Xn − c ≤ (c + ǫ) − c = Lemma A.3 (Concentration of Products). For random varii i=1 ables X, Y and non-zero constants cX , cY , if Hence, |Xn − c| ≤ ǫ implies |Xnk − ck | ≤ ǫc0 , where 2 P (|X − cX | ≥ ǫ) ≤ Ke−κnǫ , k   k   X k k−i i−1 X k k−i c = (1 + c)k − ck . c ǫ < c0 = and i i −κnǫ2 i=1 i=1 P (|Y − cY | ≥ ǫ) ≤ Ke , Therefore, then the probability P (|XY − cX cY | ≥ ǫ) is bounded by 2 k k 2 P (|Xnk −ck |≥ ǫ) ≤ P (|Xn − c| ≥ ǫ/c0 ) ≤ e−κnǫ /[(1+c) −c ] .  r ǫ ǫ  P |X − cX | ≥ min , (A.1) 3 3cY r For the case where 0 < c < ǫ < 1, X ∈ [c − ǫ, c + ǫ] n   ǫ ǫ  k k k k k k implies (c − ǫ) − c ≤ X − c ≤ (c + ǫ) − c . Using ǫ < 1, , + P |Y − cY | ≥ min 3 3cX we note that the absolute values of κnǫ2 − 2 2 k   X ≤ 2Ke 9 max(1,cX ,cY ) . k k−i c (−ǫ)i , (c − ǫ)k − ck = i Proof: The probability of interest, i=1 P (|XY − cX cY | ≥ ǫ), equals and k   X k k−i i k k P (|(X − cX )(Y − cY ) + (X − cX )cY + (Y − cY )cX | ≥ ǫ) . c ǫ, (c + ǫ) − c = i i=1 The p result follows by noting that pif |X − cX | ≤ min( 3ǫ , 3cǫY ) and |Y − cY | ≤ min( 3ǫ , 3cǫX ), then the are bounded by c1 := (1 + c)k − ck . Thus |Xn − c| ≤ ǫ implies following terms are all bounded by 3ǫ : |Xnk − ck | ≤ ǫc1 . Therefore the same bound as in (A.1) holds when 0 < c < ǫ < 1 (though a tighter bound could be obtained |(X − cX )cY |, |(Y − cX )cY |, and |(X − cX )(Y − cY )|. in this case). Lemma A.4 (Concentration of Square Roots). Let c 6= 0. 2 If P (|Xn2 − c2 |≥ ǫ) ≤ e−κnǫ , Lemma A.6 (Concentration of Scalar Inverses). Assume c 6= 0 and 0 < ǫ < 1. If 2 P (|Xn − c|≥ ǫ) ≤ e−κnǫ , 21 any pseudo-Lipschitz function f : Rt+1 → R, non-negative constants σ1 , . . . , σt , and 0 < ǫ ≤ 1, we have then P (|Xn−1 − c−1 |≥ ǫ) ≤ 2e−nκǫ 2 2 2 c min{c ,1}/4 . Proof: Without loss of generality, we can assume that c > 0. We have P (|Xn−1 − c−1 |≤ ǫ) First consider the case 0 < ǫ < c−1 . Then, Xn is strictly positive in the interval of interest, and therefore Xn−1 −1 ≤ c + ǫ) −ǫ≤  −ǫc ǫc  = P −1 ≤ Xn − c ≤ −1 c +ǫ c −ǫ 2 2 −1 2 2 4 ≥ 1 − e−nκǫ c /(ǫ+c ) ≥ 1 − e−nκǫ c /4 . P (c ≤e +e −nκc2 ≤e −nκc2 /4 +e −nκc2 ≤ 2e AND (A.3) −nκc2 /4 , (A.4) A PPENDIX B S UB -G AUSSIAN C ONCENTRATION Lemma B.1. variable Z ∼ N (0, 1) and ǫ > 0,   For a 1random 2 P |Z| ≥ ǫ ≤ 2e− 2 ǫ . Lemma B.2 (χ2 -concentration). For Zi , i ∈ [n] that are i.i.d. ∼ N (0, 1), and 0 ≤ ǫ ≤ 1, n   1X 2 Zi2 − 1 ≥ ǫ ≤ 2e−nǫ /8 . P n i=1 Lemma B.3. [25] Let X be a centered sub-Gaussian random 2 variable with variance factor ν, i.e., ln E[etX ] ≤ t 2ν , for all t ∈ R. Then X satisfies: N 1 X  n −N ǫ2 o f (σ1 Z1,i , . . . , σt Zt,i , Gi ) ≥ ǫ ≤ exp , N i=1 4κ̃t (B.2) where P κ̃t = 32L2 (t + 1)2 (ν + 4ν 2 + k k E[X ] ≤ 2(k!)(2ν) ≤ (k!)(4ν) . (B.1) Lemma B.4. Let Z1 , . . . , Zt ∈ RN be random vectors such that (Z1,i , . . . , Zt,i ) are i.i.d. across i ∈ [n], with (Z1,i , . . . , Zt,i ) being jointly Gaussian with zero mean, unit variance and covariance matrix K ∈ Rt×t . Let G ∈ RN be a random vector with entries G1 , . . . , GN i.i.d. ∼ pG , where pG is sub-Gaussian with variance factor ν. Then for t X 2 4 (σm + 4σm )). (B.3) m=1 The lower-tail bound follows similarly. Using the Cramér-Chernoff method, for any s > 0 we can write N  1 X f (σ1 Z1,i , . . . , σt Zt,i , Gi ) ≥ ǫ (B.4) P N i=1 i h PN (B.5) ≤ E es i=1 f (σ1 Z1,i ,...,σt Zt,i ,Gi ) e−sN ǫ . q To prove (B.2), we will show that for 0 < s < κ̃1t , N i h X f (σ1 Z1,i , . . . , σt Zt,i , Gi )} ≤ exp{N κ̃t s2 }. E exp{s i=1 (B.6) Then, using (B.6) in (B.5) and taking s = ǫ/2κ̃t yields the upper tail bound in (B.2). We now prove (B.6). For i ∈ [N ], let (Z̃1,i , . . . , Z̃t,i , G̃i ) be an independent copy of (Z1,i , . . . , Zt,i , Gi ). Since E[f (σ1 Z̃1,i , . . . , σt Z̃t,i , G̃i )] = 0, using Jensen’s inequality we have E[exp(−sf (σ1 Z̃1,i , . . . , σt Z̃t,i , G̃i ))] ≥ exp(−sE[f (σ1 Z̃1,i , . . . , σt Z̃t,i , G̃i )]) = 1. x2 1) For all x > 0, P (X > x) ∨ P (X < −x) ≤ e− 2ν , for all x > 0. 2) For every integer k ≥ 1, 2k o −N ǫ2 , P t 2 + 4σ 4 )) 128L2(t + 1)2 (ν + 4ν 2 + m=1 (σm m Proof: Without loss of generality, assume E[f (σ1 Z1,i , . . . , σt Zt,i , Gi )] = 0 for i ∈ [N ]. In what follows we demonstrate the upper-tail bound: where the last two inequalities are obtained using ǫ > c−1 and ǫ < 1, respectively. The bounds (A.2) and (A.4) together give the result of the lemma. G AUSSIAN n (A.2) P (Xn−1 ≥ c−1 + ǫ) + P (−(ǫ − c−1 ) ≤ Xn−1 < 0)  −ǫc   −ǫc  + P ≤ X − c ≤ −c = P Xn − c ≤ n ǫ + c−1 ǫ − c−1 nκǫ2 c2 (ǫ+c−1 )2 ≤ 2 exp  where L > 0 is an absolute constant. (L can be bounded above by three times the pseudo-Lipschitz constant of f .) Next consider 0 < c−1 < ǫ < 1. The probability to be bounded can be written as − N  1 X f (σ1 Z1,i , . . . , σt Zt,i , Gi ) N i=1 − E[f (Z1,1 , . . . , Zt,1 , G)] ≥ ǫ = P (c−1 − ǫ ≤ Xn−1 ≤ c−1 + ǫ). −1 P Therefore, using the independence of Z̃ and Z we write E[esf (σ1 Z1,i ,...,σt Zt,i ,Gi ) ] ≤ E[e = E[e sf (σ1 Z1,i ,...,σt Zt,i ,Gi ) (B.7) ] · E[e −sf (σ1 Z̃1,i ,...,σt Z̃t,i ,G̃i ) s(f (σ1 Z1,i ,...,σt Zt,i ,Gi )−f (σ1 Z̃1,i ,...,σt Z̃t,i ,G̃i )) ]. ] (B.8) Using (B.8) we prove (B.6) by demonstrating that for each i ∈ [N ], E[es(f (σ1 Z1,i ,...,σt Zt,i ,Gi )−f (σ1 Z̃1,i ,...,σt Z̃t,i ,G̃i )) ] ≤ exp{κ̃t s2 }, (B.9) 22 for 0 < s < q 1 κ̃t . For i ∈ [N ] we have {(Z̃m,i )1≤k≤t , G̃i }, we get E[es(f (σ1 Z1,i ,...,σt Zt,i ,Gi )−f (σ1 Z̃1,i ,...,σt Z̃t,i ,G̃i )) ] ∞ X sq h E f (σ1 Z1,i , . . . , σt Zt,i , Gi ) = q! q=0 (a) = (B.10) k=1 iq − f (σ1 Z̃1,i , . . . , σt Z̃t,i , G̃i ) + ∞ X s2k h E f (σ1 Z1,i , . . . , σt Zt,i , Gi ) (2k)! i2k − f (σ1 Z̃1,i , . . . , σt Z̃t,i , G̃i ) , (B.12) where step (a) holds because the odd moments of the difference equal 0. Next, using the pseudo-Lipschitz property of f , for an absolute constant L > 0, we have for k ≥ 1: i2k h f (σ1 Z1,i , . . . , σt Zt,i , Gi ) − f (σ1 Z̃1,i , . . . , σt Z̃t,i , G̃i ) ≤ L2k 1 + t X 2 2 2 σm (Zm,i + Z̃m,i ) + G2i + G̃2i m=1 t hX m=1 ik ik 2 2 2 (Zm,i σm + 2 Z̃m,i ) + G2i m=1 (b) ≤ (2L2 )k t hX + G̃2i + ≤ + t ∞ X (s2L(2t + 2))2k h X k=1 (2k)!(2t + 2) + 2(k!)(2ν)k + i 2k σm 2(k!)2k m=1 t X 4k σm 2(2k!)22k + 2(2k!)(2ν)2k m=1 ∞ t 2k X (s2L(2t + 2))2k h X σm νk ≤ 1+ + t+1 k! k! m=1 (b) i k=1 + t X 4 k (4σm ) + (4ν 2 )k ≤1+ ∞ X k=1 i t h ik X 2 4 (σm + 4σm ) (s2L(2t + 2))2k ν + 4ν 2 + m=1 t  −1 X (c) 2 4 = 1 − s2 16L2(t + 1)2 [ν + 4ν 2 + (σm + 4σm )] m=1 ik 2 2 2 ) + G2i + G̃2i + Z̃m,i σm (Zm,i m=1 t ik X 4 4 4 + (2t + 2) , σm (Zm,i + Z̃m,i ) + G4i + G̃4i m=1 t i (2L2 (4t + 4))k h X 2k 2k 2k 2k ≤ σm (Zm,i + Z̃m,i ) + G2k + G̃ i i 4t + 4 m=1 (c) ≤ 1+ (d) m=1 k 4k 4k σm EZm,i + EG4k i m=1 2 (Zm,i − Z̃m,i )2 + (Gi − G̃i )2 σm t hX (a) × t ik h X 2 2 2 + Z̃m,i ) + G2i + G̃2i × (Zm,i σm ≤ L2k 1 + (a) t X m=1 (B.11) k=0 h E[es(f (σ1 Z1,i ,...,σt Zt,i ,Gi )−f (σ1 Z̃1,i ,...,σt Z̃t,i ,G̃i )) ] t ∞ X (s2L(2t + 2))2k h X 2k 2k 2 σm EZm,i + EG2k ≤1+ i (2k)!(4t + 4) m=1 t (2L2 (4t + 4)(2t + 2))k h X 4k 4k 4k σm (Zm,i + Z̃m,i ) 4t + 4 m=1 i 4k + G4k + G̃ i i t i (2L(2t + 2))2k h X 2k 2k 2k 2k σm (Zm,i + Z̃m,i ) + G2k i + G̃i 4t + 4 m=1 t i (2L(2t + 2))2k h X 4k 4k 4k 4k σm (Zm,i + Z̃m,i ) + G4k + G̃ , i i 4t + 4 m=1 (B.13) where inequalities (a), (b), (c) are all obtained using using Lemma C.3. Using (B.13) in (B.12) and recalling that {(Zm,i )1≤k≤t , Gi } are identically distributed as 2 ≤ es 2 2 2 32L (t+1) [ν+4ν + Pt 2 4 m=1 (σm +4σm )] . (B.14) In the chain of inequalities above, (a) is obtained using the sub-Gaussian moment bound (B.1); step (b) using the k inequality (2k)! k! ≥ 2 k!, which can be seen as follows. k  k  Y Y k (2k)! (k + j) = k! = + 1 ≥ (k!)2k . k! j j=1 j=1 The equality (c) holds because s lies in the range specified by 1 (B.6), and (d) holds because 1−x ≤ e2x for x ∈ [0, 12 ]. This completes the proof of (B.9), and hence the result. A PPENDIX C OTHER U SEFUL L EMMAS Lemma C.1 (Product of Lipschitz Functions is PL(2)). Let f : Rp → R and g : Rp → R be Lipschitz continuous. Then the product function h : Rp → R defined as h(x) := f (x)g(x) is pseudo-Lipschitz of order 2. Lemma C.2. Let φ : Rt+2 → R be P L(2). For (c1 , . . . , ct+1 ) constants and Z ∼ N (0, 1), the function φ̃ :PRt+1 → R t defined as φ̃(v1 , . . . , vt , w) = EZ [φ(v1 , . . . , vt , r=1 cr vr + ct+1 Z, w)] is then also PL(2). Lemma C.3. For any scalars a1 , ..., at and integer Pt positive m m, we have (|a1 | + . . . + |at |) ≤ tm−1 i=1P |ai |m . Consequently, for any vectors u1 , . . . , ut ∈ RN , k tk=1 uk k2 ≤ Pt t k=1 kuk k2 . Proof: The first result follows from applying Hölder’s inequality to the length-t vectors (|a1 |, . . . , |at |) and (1, . . . , 1). The second statement is obtained by applying the result with m = 2. 23 A PPENDIX D S UPPLEMENTARY M ATERIAL : P ROOF OF L EMMA 5 PARTS ( B ).( II ) AND ( B ).( IV ) The supplement available at http://bit.ly/2iWMgbr contains the proof of Lemma 5 parts (b).(ii) and (b).(iv) for the case where the denoising functions {ηt (·)}t>0 are differentiable in the first argument except at a finite number of points. The proof in Sec. V covers the case where the denoising functions {ηt (·)}t>0 are differentiable everywhere. The proof of the general case is longer and somewhat tedious, so we include it in the supplement. ACKNOWLEDGMENT We thank Andrew Barron for helpful discussions regarding certain technical aspects of the proof. R EFERENCES [1] M. Bayati and A. Montanari, “The dynamics of message passing on dense graphs, with applications to compressed sensing,” IEEE Trans. Inf. Theory, vol. 57, no. 2 pp. 764–785, 2011. [2] D. Donoho, A. Maleki, and A. Montanari, “Message-passing algorithms for compressed sensing,” Proceedings of the National Academy of Sciences, vol. 106, no. 45, pp. 18914–18919, 2009. [3] F. Krzakala, M. Mézard, F. Sausset, Y. Sun, and L. Zdeborová, “Probabilistic reconstruction in compressed sensing: algorithms, phase diagrams, and threshold achieving matrices,” Journal of Statistical Mechanics: Theory and Experiment, no. 8, 2012. [4] A. Montanari, “Graphical models concepts in compressed sensing,” in Compressed Sensing (Y. C. Eldar and G. Kutyniok, eds.), pp. 394–438, Cambridge University Press, 2012. [5] S. Rangan, “Generalized approximate message passing for estimation with random linear mixing,” in Proc. IEEE Int. Symp. Inf. Theory, pp. 2168–2172, 2011. [6] M. Bayati and A. Montanari, “The LASSO risk for Gaussian matrices,” IEEE Trans. Inf. Theory, vol. 58, no. 4, pp. 1997–2017, 2012. [7] A. Javanmard and A. Montanari, “State evolution for general approximate message passing algorithms, with applications to spatial coupling,” Information and Inference, vol. 2, no. 2, pp. 115–144, 2013. [8] M. Bayati, M. Lelarge, and A. Montanari, “Universality in polytope phase transitions and message passing algorithms,” Annals of Applied Probability, vol. 25, pp. 753–822, 2015. [9] S. Rangan, and A. Fletcher, “Iterative estimation of constrained rank-one matrices in noise,” in Proc. IEEE Int. Symp. Inf. Theory, pp. 1246–1250, 2012. [10] Y. Deshpande and A. Montanari, “Information-theoretically optimal sparse PCA,” in Proc. IEEE Int. Symp. Inf. Theory, pp. 2197–2201, 2014. [11] E. Richard and A. Montanari, “Non-negative principal component analysis: Message passing algorithms and sharp asymptotics,” IEEE Trans. Inf. Theory, vol. 62, no. 3, pp. 1458–1484, 2016. [12] Y. Deshpande, E. Abbe, and A. Montanari, “Asymptotic mutual information for the balanced binary stochastic block model,” Information and Inference, vol. 6, pp. 125–170, 2016. [13] T. Lesieur, F. Krzakala, and L. Zdeborová, “MMSE of probabilistic low-rank matrix estimation: Universality with respect to the output channel,” 53rd Annual Allerton Conference on Communication, Control, and Computing, pp. 680–687, 2015. [14] J. Barbier, M. Dia, N. Macris, F. Krzakala, T. Lesieur, and L. Zdeborová, “Mutual information for symmetric rank-one matrix estimation: A proof of the replica formula,” Advances in Neural Information Processing Systems, pp. 424–432, 2017. [15] J. Barbier and F. Krzakala, “Replica analysis and approximate message passing decoder for sparse superposition codes,” in Proc. IEEE Int. Symp. Inf. Theory, pp. 1494–1498, 2014. [16] C. Rush, A. Grieg, and R. Venkataramanan, “Capacity-achieving Sparse Regression Codes via approximate message passing decoding,” IEEE Trans. Inf. Theory, vol. 63, no. 3, pp. 1476–1500, 2017. [17] J. Barbier and F. Krzakala, “Approximate message-passing decoder and capacity-achieving sparse superposition codes,” IEEE Trans. Inf. Theory, vol. 63, no. 8, pp. 4894–4927, 2017. [18] Y. Kabashima, F. Krzakala, M. Mézard, A. Sakata, and L. Zdeborová, “Phase transitions and sample complexity in Bayes-optimal matrix factorization,” IEEE Trans. Inf. Theory, vol. 62, no. 7, pp. 4228–4265, 2016. [19] J. Parker, P. Schniter, and V. Cevher, “Bilinear generalized approximate message passing – Part I: Derivation,” IEEE Trans. Signal Processing, vol. 62, no. 22, pp. 5839–5853, 2014. [20] J. Parker, P. Schniter, and V. Cevher, “Bilinear generalized approximate message passing – Part II: Applications,” IEEE Trans. Signal Processing, vol. 62, no. 22, pp. 5854–5867, 2014. [21] E. Bolthausen, “An iterative construction of solutions of the TAP equations for the Sherrington–Kirkpatrick model,” Communications in Mathematical Physics, vol. 325, no. 1, pp. 333–366, 2014. [22] D. L. Donoho, A. Javanmard, and A. Montanari, “Informationtheoretically optimal compressed sensing via spatial coupling and approximate message passing,” IEEE Trans. Inf. Theory, vol. 59, no. 11, pp. 7434–7464, 2013. [23] C. Rush, and R. Venkataramanan, “The Error Exponent of Sparse Regression Codes with AMP Decoding,” in Proc. IEEE Int. Symp. Inf. Theory, pp. 2478–2482, 2017. [24] Y. Ma, C. Rush, and D. Baron, “Analysis of Approximate Message Passing with a Class of Non-Separable Denoisers,” in Proc. IEEE Int. Symp. Information Theory, pp. 231–235, 2017. [25] S. Boucheron, G. Lugosi, and P. Massart, Concentration inequalities: A nonasymptotic theory of independence, Oxford University Press, 2013. [26] D. Donoho, and A. Montanari, “High dimensional robust M -estimation: asymptotic variance via approximate message passing,” Probability Theory Related Fields, vol. 166, no. 3, pp. 1–35, 2015. [27] U. Kamilov, S. Rangan, A. K. Fletcher, and M. Unser, “Approximate message passing with consistent parameter estimation and applications to sparse learning,” IEEE Trans. Inf. Theory, vol. 60, no. 6, pp. 2969– 2985, 2014. [28] J. Ma, and L. Ping, “Orthogonal AMP for compressed sensing with unitarily-invariant matrices,” in IEEE Access, vol. 5, pp. 2020–2033, 2017. [29] K. Takeuchi, “Rigorous dynamics of expectation-propagation-based signal recovery from unitarily invariant measurements,” in Proc. IEEE Int. Symp. Inf. Theory, pp. 501–505, 2017. [30] S. Rangan, P. Schniter, and A. Fletcher, “Vector approximate message passing,” in Proc. IEEE Int. Symp. Inf. Theory, pp. 1588–1592, 2017.
10math.ST
International Journal of Computer Trends and Technology (IJCTT) – Volume 52 Number 1 October 2017 Detection and Analysis of Human Emotions through Voice and Speech Pattern Processing Poorna Banerjee Dasgupta M.Tech Computer Science and Engineering, Nirma Institute of Technology Ahmedabad, Gujarat, India Abstract — The ability to modulate vocal sounds and generate speech is one of the features which set humans apart from other living beings. The human voice can be characterized by several attributes such as pitch, timbre, loudness, and vocal tone. It has often been observed that humans express their emotions by varying different vocal attributes during speech generation. Hence, deduction of human emotions through voice and speech analysis has a practical plausibility and could potentially be beneficial for improving human conversational and persuasion skills. This paper presents an algorithmic approach for detection and analysis of human emotions with the help of voice and speech processing. The proposed approach has been developed with the objective of incorporation with futuristic artificial intelligence systems for improving human-computer interactions. Keywords — artificial intelligence, human emotions, speech processing, voice processing. I. INTRODUCTION The human voice consists of sounds produced by a human being using the vocal folds for carrying out acoustic activities such as talking, singing, laughing, shouting, etc. The human voice frequency is specifically a part of the human sound production mechanism in which the vocal cords or folds are the primary source of generated sounds. Other sound production mechanisms produced from the same general area of the body involve the production of unvoiced consonants, clicks, whistling and whispering. Generally, the mechanism for generating the human voice can be subdivided into three parts; the lungs, the vocal folds within the larynx, and the articulators [1]. The human voice and associated speech patterns can be characterized by a number of attributes, the primary ones being pitch, loudness or sound pressure, timbre, and tone [2]. Pitch is an auditory sensation in which a listener assigns musical tones to relative positions on a musical scale based primarily on their perception of the frequency of vibration [5][6]. Pitch can be quantified as a frequency, but it is based on the subjective perception of a sound wave. Sound oscillations can be measured to obtain a frequency in hertz or cycles per second. The pitch is independent of the intensity or amplitude of the sound wave. A ISSN: 2231-2803 high-pitched sound indicates rapid oscillations, whereas, a low-pitched sound corresponds to slower oscillations. Pitch of complex sounds such as speech and musical notes corresponds to the repetition rate of periodic or nearly-periodic sounds, or the reciprocal of the time interval between similar repeating events in the sound waveform. Loudness is a subjective perception of sound pressure and can be defined as the attribute of auditory sensation, in terms of which, sounds can be ordered on a scale ranging from quiet to loud [7]. Sound pressure is the local pressure deviation from the ambient, average, or equilibrium atmospheric pressure, caused by a sound wave [9]. Sound pressure level (SPL) is a logarithmic measure of the effective pressure of a sound relative to a reference value and is often measured in units of decibel (dB). The lower limit of audibility is defined as SPL of 0 dB, but the upper limit is not as clearly defined. Timbre is the perceived sound quality of a musical note, sound or tone [5]. Timbre distinguishes different types of sound production and enables listeners to distinguish different instruments in the same category. The physical characteristics of sound that determine the perception of timbre include spectrum and envelope. Figure 1 shows a sound wave with its temporal envelope marked in red. In simple terms, timbre is what makes a particular sound be perceived differently from another sound, even when they have the same pitch and loudness. Fig 1: A sound wave’s envelope marked in red [5] Tone is the use of pitch in language to distinguish lexical or grammatical meaning – that is, to distinguish or to inflect words [8]. All verbal languages use pitch to express emotional and other paralinguistic information and to convey emphasis, contrast, and other such features. http://www.ijcttjournal.org Page 1 International Journal of Computer Trends and Technology (IJCTT) – Volume 52 Number 1 October 2017 It has been frequently observed that the tonal quality of the human voice changes while expressing various emotions [3][4]. With different emotions and moods, not only does the tonal quality vary, but the associated speech patterns change too. For instance, people may tend to talk in loud voices when angry and use shrill or high-pitched voices when in a scared or panicked emotional state. Some people tend to ramble when they get excited or nervous. On the contrary, when in a pensive emotional state, people tend to speak slowly and make longer pauses, thereby indicating an increase in time spacing between consecutive words of their speech. Detection of human emotions through voice- and speech-pattern analysis can prove to be beneficial in improving conversational and persuasion skills, especially in those circumstances or applications where direct face-to-face human interaction is not possible or preferred. The practical applications of human emotion detection through voice and speech processing could be numerous. Some such plausible real world situations could be while conducting marketing surveys with customers through telephonic conversations, participating in anonymous online chat-rooms, conducting business voice-conferences and so on. This paper presents an algorithmic approach which aids in detection of human emotions, by analyzing various voice attributes and speech patterns. Section II describes the proposed algorithmic approach in detail, along with the obtained results. Section III is devoted to result analysis. Finally, section IV elucidates the conclusions derived from the proposed study and future scope of work. II. ALGORITHMIC APPROACH TO DETECTION OF HUMAN EMOTIONS This section describes an algorithmic approach for deducing human emotions through voice- and speech-pattern analysis. In order to achieve this objective, three test cases have been examined, corresponding to the three emotional states: normal emotional state, angry emotional state, and panicked emotional state. For carrying out the analysis, four vocal parameters have been taken into consideration: pitch, SPL, timbre, and time gaps between consecutive words of speech. In order to quantitatively represent timbre, its temporal envelope for advance and decay times has been considered. The primary function of the proposed algorithmic approach is to detect different emotional states by analyzing the deviations in the aforementioned four parameters from that of the normal emotional state. The proposed analysis was carried out with the help of software packages such as MATLAB and Wavepad.  Case 1: Normal emotional state This test case involves statistics for pitch, SPL, timbre, and word-timing gaps derived from speech samples that were orated while the ISSN: 2231-2803 speaker was in a relaxed and normal emotional state. This test case serves as the basis for the remaining two test cases. All the parameter statistics indicate mean values derived from the speech samples. As shown in Table I, for the purpose of demonstration, statistics for two speech samples have been analyzed. TABLE I AVERAGE VALUES OF VOCAL STATISTICS OBTAINED FROM RECORDED SPEECH SAMPLES FOR A NORMAL EMOTIONAL STATE Pitch (Hz) SPL (dB) Timbre ascend time (s) Timbre descend time (s) Speech Sample 1 1248 Hz 0.12 s 0.11 s Speech Sample 2 1355 Hz Gain -50 dB Gain -48 dB Time gaps between words (s) 0.12 s 0.06 s 0.05 s 0.12 s  Case 2: Angry emotional state This test case involves statistics for pitch, SPL, timbre, and word-timing gaps derived from speech samples that were orated while the speaker was in an agitated emotional state, typically characterized by increased vocal loudness and pitch. All the parameter statistics indicate mean values derived from the speech samples, as shown in Table II. The same speech samples that were earlier used in Case 1 have been used in Case 2, but with a different intonation typical of an agitated or angry emotional state. TABLE II AVERAGE VALUES OF VOCAL STATISTICS OBTAINED FROM RECORDED SPEECH SAMPLES FOR AN ANGRY EMOTIONAL STATE Pitch (Hz) SPL (dB) Timbre ascend time (s) Timbre descend time (s) Speech Sample 1 1541 Hz 0.13 s 0.10 s Speech Sample 2 1652 Hz Gain – 30 dB Gain – 29 dB Time gaps between words (s) 0.09 s 0.06 s 0.04 s 0.10 s  Case 3: Panicked emotional state This test case involves statistics for pitch, SPL, timbre, and word-timing gaps derived from speech samples that were orated while the speaker was in a panicked or overwhelmed emotional state. Speech samples that were earlier used in Case 1 have been used in Case 3, but with a different intonation typical of a panicked emotional state, as shown in Table III. http://www.ijcttjournal.org Page 2 International Journal of Computer Trends and Technology (IJCTT) – Volume 52 Number 1 October 2017 TABLE III AVERAGE VALUES OF VOCAL STATISTICS OBTAINED FROM RECORDED SPEECH SAMPLES FOR A PANICKED EMOTIONAL STATE Pitch (Hz) SPL (dB) Timbre ascend time (s) Timbre descend time (s) Speech Sample 1 1443 Hz 0.13 s 0.09 s Speech Sample 2 1560 Hz Gain – 46 dB Gain – 44 dB Time gaps between words (s) 0.13 s 0.07 s 0.04 s 0.14 s III. RESULTS ANALYSIS The speech samples described in the previous section were recorded with the help of headphones that have an offset gain of approximately -60 dB and the speech data was sampled at the rate of ten sample points per second. By comparing Tables I and II, it can be seen that when in an agitated state, a significant increase occurs in the mean SPL and pitch values, accompanied by a decrease in the time spacing between consecutive words. In simple terms, this would indicate faster talking in a shrill and louder voice. By comparing Tables I and III, it can be seen that when in a nervous or panicked state, there is a significant increase in the mean values of pitch, time spacing between consecutive words, and increased timbre ascending time. In simple terms, this would indicate a shrill voice with longer, sharp pauses. By comparing the data presented in Tables 1-3, it can be decisively concluded that with varying emotions, the tonal parameters accordingly change as well. Establishing value-ranges for the aforementioned various vocal parameters can help in quantitatively assessing the extent of deviation from the standard basis, which in this study is the normal emotional state. The findings of the previous section are subjective and will vary depending on how a person reacts to a particular emotional situation. However, from the point of practicality, this feature of subjectivity can be exploited, especially while developing customizable applications, such as smartphone apps that are user oriented. IV. CONCLUSIONS Deduction of human emotions through voice and speech analysis has a practical plausibility and could potentially be beneficial for improving human conversational and persuasion skills. This paper presents an algorithmic approach for detection and analysis of human emotions on the basis of voice and speech processing. Three test cases have been examined, corresponding to the three emotional states: normal emotional state, angry emotional state, and panicked emotional state. Each case ISSN: 2231-2803 demonstrates characteristic associated vocal features which can help in distinguishing the corresponding emotional state. As future scope of work, more complex emotional states can be analyzed such as cheerful, unhappy, brooding, surprised, etc. While conducting the proposed study, speech data were sampled at the rate of ten sample points per second. In order to improve the precision of the mean attribute values, greater number of sampling points can be considered. Furthermore, in the proposed approach, only four attributes were analyzed for detecting various emotional states. To improve the accuracy of detection, other secondary vocal attributes could be assessed as well. REFERENCES [1] [2] [3] [4] [5] [6] [7] [8] [9] Titze, I.R. Principles of Voice Production. Prentice Hall, ISBN 978-0-13-717893-3, 1994. Trevor R Agus, Clara Suied, Simon J Thorpe, Daniel Pressnitzer. Characteristics of human voice processing. IEEE International Symposium on Circuits and Systems (ISCAS), Paris, France. pp.509-512, May 2010. Smith, BL; Brown, BL; Strong, WJ; Rencher, AC. Effects of speech rate on personality perception. Language and speech. 18 (2): 145–52. PMID 1195957, 1975. Williams, CE; Stevens, KN. Emotions and speech: some acoustical correlates. The Journal of the Acoustical Society of America. Vol. 52 (4): 1238–50. PMID 4638039, 1972. Richard Lyon & Shihab Shamma. Auditory Representation of Timbre and Pitch. Harold L. Hawkins & Teresa A. McMullen. Auditory Computation. Springer. pp. 221–23. ISBN 978-0-387-97843-7, 1996. Plack, Christopher J.; Andrew J. Oxenham; Richard R. Fay, eds. Pitch: Neural Coding and Perception. Springer. ISBN 0-387-23472-1, 2001. American National Standards Institute. American national psychoacoustical terminology. S3.20, American Standards Association, 1973. R.L. Trask. A Dictionary of Phonetics and Phonology. Routledge, 2004. Morfey, Christopher L. Dictionary of Acoustics. San Diego Academic Press, ISBN 978-0125069403, 2001. AUTHOR’S PROFILE Poorna Banerjee Dasgupta has received her B.Tech & M.Tech Degrees in Computer Science and Engineering from Nirma Institute of Technology, Ahmedabad, India. She did her M.Tech dissertation at Space Applications Center, ISRO, Ahmedabad, India and has also worked as Assistant Professor in Computer Engineering dept. at Gandhinagar Institute of Technology, Gandhinagar, India from 2013-2014 and has published several research papers in reputed international journals. Her research interests include image processing, high performance computing, parallel processing and wireless sensor networks. http://www.ijcttjournal.org Page 3
1cs.CV
arXiv:1405.4507v1 [cs.NE] 18 May 2014 A Multi-parent Memetic Algorithm for the Linear Ordering Problem Tao Yea , Tao Wanga , Zhipeng Lüa , Jin-Kao Haob a SMART, School of Computer Science and Technology, Huazhong University of Science and Technology, 430074 Wuhan, P.R.China b LERIA, University of Angers, 2, Boulevard Lavoisier, 49045 Angers, France Abstract In this paper, we present a multi-parent memetic algorithm (denoted by MPM) for solving the classic Linear Ordering Problem (LOP). The MPM algorithm integrates in particular a multi-parent recombination operator for generating offspring solutions and a distance-and-quality based criterion for pool updating. Our MPM algorithm is assessed on 8 sets of 484 widely used LOP instances and compared with several state-of-the-art algorithms in the literature, showing the efficacy of the MPM algorithm. Specifically, for the 255 instances whose optimal solutions are unknown, the MPM is able to detect better solutions than the previous best-known ones for 66 instances, while matching the previous best-known results for 163 instances. Furthermore, some additional experiments are carried out to analyze the key elements and important parameters of MPM. Keywords: Linear Ordering Problem, Memetic Algorithm, Multi-parent Recombination Operator, Pool Updating Email addresses: [email protected] (Tao Ye), [email protected] (Zhipeng Lü), [email protected] (Jin-Kao Hao) Preprint submitted to Elsevier May 20, 2014 1. Introduction Given a n × n matrix C, the NP-hard Linear Ordering Problem (LOP) aims at finding a permutation π=(π1 , π2 , ..., πn ) of both the column and row indices {1, 2, ..., n} which maximizes the following objective function: f (π) = n X n X Cπ i π j (1) i=1 j=i+1 In other words, the LOP is to identify a permutation of both the column and row indices of matrix C, such that the sum of the elements of the upper triangle (without the main diagonal) of the permuted matrix is maximized. This problem is equivalent to the maximum acyclic directed subgraph problem which, for a given digraph G = (V, A) with arc weights Cij for each arc (i, j) ∈ A, is to find a subset A′ ⊂ A of arcs such that G = (V, A′ ) is acyclic P and (i,j)∈A′ Cij is maximized [1]. The LOP has been the focus of numerous studies for a long time. It arises in a significant number of applications, such as the triangulation of input-output matrix in economy [2], graph drawing [1], task scheduling [3], determination of ancestry relationships [4] and so on. Due to its practical and theoretical importance, various solution algorithms have been proposed to solve the LOP. These algorithms can be divided into two main categories: exact algorithms and heuristic algorithms. Exact algorithms include, among others, a branch and bound algorithm [5], a branch and cut algorithm [3], and a combined interior point/cutting plane algorithm [6]. State-of-the-art exact algorithms can solve large instances from specific instance classes, but they may fail on other instances with much smaller size in the general case. Also, the computation time of exact algorithms may become prohibitive with the increase of the problem size. 2 The LOP is also tackled by a number of heuristic algorithms based on meta-heuristic approaches like local search [7], elite tabu search [8], scatter search [9], iterated local search [10], greedy randomized adaptive search procedure [11], variable neighborhood search [12] and the memetic search [10]. In particular, according to the work of [13], the memetic algorithm of [10] is the most successful among the state-of-the-art algorithms due to its excellent performance on the available LOP benchmark instances. Inspired by the work of [10], this paper presents MPM, an improved memetic algorithm for solving the LOP. In addition to a local optimization procedure, the proposed MPM algorithm integrates two particular features. First, MPM employs a multi-parent recombination operator (denoted by MPC) to generate offspring solutions which extends the order based (OB) operator [14]. Second, MPM uses a distance-and-quality population updating strategy to keep a healthy diversity of the population. We assess the MPM algorithm on 484 LOP instances widely used in the literature. For the 229 instances with known optimal solutions, the proposed algorithm can attain the optimal solutions consistently. For the remaining 255 instances whose optimal solutions are unknown, our algorithm is able to match the best-known results for 163 instances and in particular to find new solutions better than the previously best-known ones for 66 instances. The remainder of this paper is structured as follows. Section 2 presents in detail the MPM algorithm. Section 3 shows the computational statistics of MPM and comparisons with state-of-the-art algorithms. We will analyze some key elements and important parameters of MPM in Section 4. 3 2. Multi-Parent Memetic Algorithm 2.1. Main Scheme The proposed MPM algorithm is based on the general memetic framework which combines the population-based evolutionary search and local search [15, 16] and follows the practical considerations for discrete optimization suggested in [17]. It aims at taking advantages of both recombination that discovers unexplored promising regions of the search space, and local search that finds good solutions by concentrating the search around these regions. The general MPM procedure is summarized in Algorithm 1. It is composed of four main components: a population initialing procedure, a local search procedure (Section 2.2), a recombination operator (Section 2.3) and a population updating strategy (Section 2.4). Starting from an initial population of local optima obtained with the local search procedure, MPM performs a series of generations. At each generation, two or more solutions (parents) are selected in the population (Section 2.3.3) and recombined to generate an offspring solution (Section 2.3) which is improved by the local search procedure. The population is then updated with the improved offspring solution according to a distance-and-quality rule. In case the average solution quality of the population stagnates for g generations, a new population is generated by making sure that the best solution found so far is always retained in the new population. This process continues until a stop condition is verified, such as a time limit or a fixed number of generation (Section 3.1). 4 Algorithm 1 Pseudo-code of the MPM algorithm 1: INPUT: matrix C, population size p, offspring size c 2: OUTPUT: The best solution s∗ found so far 3: P = {s1 , s2 , ..., sp } ← randomly generate p initial solutions 4: for i = 1, 2, . . . , p do 5: si ← Local Search(si ) /* Section 2.2 */ 6: end for 7: repeat 8: Offspring O ← {} 9: for i = 1, 2, . . . , c do 10: Choose m individuals {si1 , ..., sim } from P (2 ≤ m ≤ p)/*Section 2.3.3 */ 11: so ← Recombination(si1 , ..., sim ) /* Section 2.3 */ 12: so ← Local Search(so ) 13: O ← O ∪ {so } 14: end for 15: P ← Pool Updating(P, O) /* Section 2.4 */ 16: if Average solution quality stays the same for g generations then 17: Maintain the overall best solution s∗ in P 18: for i = 2, ..., p do 19: Randomly generate an initial solution si 20: si ← Local Search(si ) 21: P ← P ∪ {si } 22: 23: end for end if 24: until termination condition is satisfied 2.2. Local Search Procedure Our local search procedure uses the neighborhood defined by the insert move which is very popular for permutation problems. An insert move is 5 to displace an element in position i to another position j (i 6= j) in the permutation sequence π=(π1 , π2 , ..., πn ).   (..., πi−1 , πi+1 , ..., πj , πi , πj+1 , ...), i < j insert(π, i, j) =  (..., π , π , π , ..., π , π , ...), i > j j−1 i j i−1 (2) i+1 It is clear that the size of this neighborhood is (n − 1)2 . To evaluate the neighborhood induced by the insert move, we introduce the ∆-function, which indicates the changes in the objective function value caused by an insert move. ∆(π, i, j) = f (insert(π, i, j)) − f (π) (3) By using a fast evaluation method suggested in [18], the whole neighborhood can be examined with a time complexity of O(n2 ). More details about this evaluation method are given in [10]). Given a permutation π, our local search procedure selects at each iteration the best insert move (i.e., having the highest ∆-value) to make the transition. This process repeats until we cannot find any insert move with a ∆-value greater than zero. In this case, a local optimum is reached. 2.3. Recombination Operator The recombination operator, which generates offspring solutions by combining features from parent individuals, is a relevant element in a memetic algorithm. In [10], four types of recombination operators (Distance Preserving Crossover - DPX, Cycle Crossover - CX, Order-Based Crossover - OB and Rank Crossover - Rank) were compared for the LOP. According to the experiments, the OB operator [14] performs the best among these four operators for the LOP. The general idea of the OB operator is to regard 6 the permutation as a sequence and the operator tries to transmit the parent individuals’ relative order to the offspring solution. In this paper, we propose a newly designed adaptive multi-parent recombination operator (denoted by MPC) which can be considered as an extension of OB. The main difference between these two operators is that MPC uses three or more parent individuals to generate an offspring individual while OB is based on two parent individuals. As shown in Section 4, this difference has a significant influence on the performance of the algorithm. 2.3.1. General Ideas In the LOP, a feasible solution is a permutation of n elements and the good properties lie in the relative order of the n elements imposed by the permutation. If we transmit the relative order in parent individuals to the offspring solution, the new solution keeps these elite components of their parents. Both MPC and OB operators are based on this basic idea. 2.3.2. Parent Selection Different from random parent selection technique used in [10], we employ a parent selection strategy which takes into consideration the distance between the selected solutions. Precisely, the proposed strategy relies on the notion of diversity of a population P of solutions: diversity(P ) = Pp−1 Pp i=1 j=i+1 dis(s p ∗ (p − 1)/2 i , sj ) (4) where dis(si , sj ) is the distance between two solutions si and sj defined as n (the permutation length) minus the length of the longest common subsequence between si and sj (also see Section 2.4). Therefore, the population diversity takes values in [0, n]. 7 Our parent selection strategy determines a subset SS of m individuals from the population P = {s1 , ..., sp } such that the minimum distance between any two solutions in SS is no smaller than a threshold: min{dis(si , sj )|si , sj ∈ SS} ≥ β ∗ diversity(P ) (5) where β ∈ [0, 1] is a weighting coefficient which is fixed experimentally. Specifically, the subset SS is constructed as follows. At each iteration, a solution is randomly selected from population P and added into the subset SS if Eq.5 is satisfied. Whenever such a solution exists, this process is repeated until subset SS is filled with m solutions. Otherwise, we reconstruct the subset SS from scratch. 2.3.3. Multi-parent Recombination Operator Now we describe how our MPC operator works to generate new offspring solutions. Recall that the conventional OB crossover uses two phases to generate an offspring individual so from two parent individuals s1 and s2 . In the first phase, s1 is copied to so . In the second phase, OB selects k (here, k = n/2) positions and reorders the elements in these k selected positions according to their order in s2 . Readers are referred to [14] for details of the OB operator. Our MPC generalizes OB by employing m (m > 2) parent individuals to generate a new offspring solution. Given m selected parents {s1 , s2 , ..., sm }, the procedure of MPC also operates in two main phases. In the first phase, s1 is copied to so . In the second phase, we repeatedly choose k (k = n/m) different positions in so and rearrange the elements in these chosen positions according to their order in si (2 ≤ i ≤ m). Fig.1 shows an example of generating an offspring solution with OB and MPC. In this example, n = 6. In the example of OB, s1 is copied to so 8 OB Operator ‫ݏ‬ଵ ‫ݏ‬ ଶ 2 4 3 6 6 2 5 1 1 5 4 ‫ݏ‬௢ 3 MPC Operator ‫ݏ‬ଵ 1 5 3 6 2 4 5 1 2 4 3 6 ‫ݏ‬ଷ 4 3 1 6 2 5 ‫ݏ‬ଶ ‫ݏ‬௢ 2 4 6 5 1 3 The positions marked with circle are reordered elements from ‫ ݏ‬ଶ 1 5 3 6 4 2 The positions marked with circle are reordered elements from ‫ ݏ‬ଶ , the positions marked with square are reordered elements from ‫ ݏ‬ଷ Figure 1: An example of MPC and OB first. Then we randomly choose positions (2, 4, 6) in so . The elements in these selected positions are (3, 5, 4) and these elements’ relative order in s2 is (4, 5, 3). So, we rearrange the selected elements according to their relative order in s2 . In the example of MPC, m = 3 and k = 2. We generate so in a similar way as OB. In the first step, s1 is copied to so . In the second step, we randomly choose positions (2,4) in so and rearrange the corresponding elements (5,6) according to their relative order in s2 , and then we randomly choose the positions (5,6) in so and rearrange the elements (2,4) according to their relative order in s3 . 2.4. Pool Updating In MPM, when c offspring individuals have been generated by the multiparent recombination operator, we immediately improve each of the offspring 9 individuals with the local search procedure. Then we update the population with these improved offspring individuals. For the purpose of maintaining a healthy population diversity [19, 20, 21], we devise a distance-and-quality based population updating strategy. The idea is that if an offspring solution is not good enough or too close to the individuals in the population, it should not be added to the population. In our updating strategy, we first create a temporary population of size p + c which is the union of the current population and the c offspring individuals. Then we calculate for each individual s a “score” by considering its quality and its distance to the other p + c − 1 individuals. Finally, we choose the p-best individuals to form the new population. The notion of score is defined as follows. Definition 1: (Distance between two solutions). Given two solutions sa = (a1 , a2 , ..., an ) and sb = (b1 , b2 , ..., bn ), we define the distance between sa and sb as n minus the length of their longest common subsequence (denoted by LCS). dis(sa , sb ) = n − LCS(sa , sb ) (6) It is clear that a small value of dis(sa , sb ) indicates that the two solutions are similar to each other. The time complexity of calculating this distance is O(n2 ) [22]. Definition 2: (Distance between one solution and a population). Given a solution sa = (a1 , a2 , ..., an ) and a population P = {s1 , s2 , ..., sp }, the distance between sa and P is the minimum distance between sa and si (1 ≤ i ≤ p). dis(sa , P ) = min{dis(sa , si ), (1 ≤ i ≤ p), sa 6= si } (7) Definition 3: (Score of a solution with respect to a population). Given 10 a population P = {s1 , s2 , ..., sp }, the score of a solution si in P is defined as i e (si )) + (1 − α)A(dis(s e score(si , P ) = αA(f , P )) (8) e represents where f (si ) is the objective function value of solution si , and A() the normalized function: e A(y) = y − ymin ymax − ymin + 1 (9) where ymax and ymin are respectively the maximum and minimum values of y in P . The number 1 is added to avoid 0 denominator. α is a parameter to balance the two parts of quality and distance. The score function is thus composed of two parts. The first part concerns the quality (objective function value) while the second part considers the diversity of the population. It is easy to check that if a solution has a high score, it is of good quality and is not too close to the other individuals in the population. Algorithm 2 describes the pseudo-code of our pool updating strategy. 11 Algorithm 2 Pseudo-code of population updating 1: INPUT: Population P = {s1 , ..., sp } and Offspring O = {o1 , ..., oc } 2: OUTPUT: Updated population P = {s1 , ..., sp } 3: P : P ′ ← P ∪ O /* Tentatively add all offspring O to population P */ 4: for i = 1, ..., p + c do Calculate the distance between si and P according to Eq. 7 5: 6: end for 7: for i = 1, ..., p + c do Calculate the score of each si in P according to Eq. 8 8: 9: end for 10: Sort the individuals in non-decreasing order of their scores 11: Choose the p best individuals to form P 12: return P 3. Computational Results and Comparisons In this section, we report experimental evaluations of our MPM algorithm by using the well-known LOLIB benchmark instances. We show computational results and compare them with the best known results obtained by the state-of-the-art algorithms in the literature. 3.1. Problem Instances and Experimental Protocol The LOLIB benchmarks have 484 instances in total and they are divided into 8 sets1 . The optimal solutions and best-known results for each instance can be found in [13]. IO: This is a well-known set of instances that contains 50 real-world linear ordering problems generated from input-output tables from various 1 All the instances are available at: http://www.optsicom.es/lolib/ 12 sources. It was first used in [3]. SGB: These instances are from [23] and consist of input-output tables from sectors of the economy of the United States. The set has a total of 25 instances with 75 sectors. RandAI: There are 25 instances in each set with n = 100, 150, 200 and 500, respectively, giving a total of 100 instances. RandAII: There are 25 instances in each set with n = 100, 150 and 200, respectively, giving a total of 75 instances. RandB: 90 more random instances. MB: These instances have been used by Mitchell and Borchers for their computational experiments. xLOLIB: Some further benchmark instances have been created and used by Schiavinotto and Stützle [10], giving a total of 78 instances. Special: 36 more instances used in [24, 25, 26]. Table 1: Sets of the tested instances Set IO SGB RandAI RandAII RandB MB xLOLIB Special Total #Instances #Optimal #Lower Bound 50 25 100 75 90 30 78 36 484 50 25 25 70 30 29 229 100 50 20 78 7 255 Table 1 summarizes the number of instances in each instance class described above together with the information about the number of instances whose optimal solutions or lower bounds are known. Our MPM algorithm is programmed in C and compiled using GNU GCC on a PC running Windows XP with 2.4GHz CPU and 2.0Gb RAM. Given 13 the stochastic nature of the MPM, we solved each problem instance independently 50 times using different random seeds subject to a time limit of 2 hours. Note that the best known results listed in the following tables are also obtained within 2 hours, which are available at: http://www.optsicom.es/lolib/. 3.2. Parameter Setting Like all previous heuristic algorithms, MPM uses several parameters which are fixed via a preliminary experiments with a selection of problem instances. Precisely, we set p = 25, c = 10 and g = 30 (p is the population size, c is the offspring size and g means that if the average solution quality stays unchanged for g generations, the population is reconstructed). In the light of the experiments carried out in Section 4.1, we choose m = 3 to be the number of parents, β = rand(0.6, 0.7) for the parent selection and α = rand(0.8, 1.0) for the pool updating strategy. These settings are used to solve all the instances without any further fine-tuning of the parameters. 3.3. Computational Results We aim to evaluate the MPM’s performance on the LOLIB benchmark instances, by comparing its performance with the best-known results in the literature. Table 2 summarizes the computational statistics of our MPM algorithm on the instances with known optimal solutions. The name of each instance set is given in column 1, column 2 shows the number of instances for which the optimal results are obtained, column 3 gives the number of instances for which our algorithm matches the optimal solutions, column 4 presents the deviation from the optimal solutions and the average CPU time to match the optimal solutions is given in column 5. 14 Table 2: MPM’s performance on the instances with known optimal solutions Set IO SGB RandAII RandB MB Spec Total #Optimal #Match Optimal #Dev(%) Time(s) 50 25 25 70 30 29 229 50 25 25 70 30 29 229 0.0 0.0 0.0 0.0 0.0 0.0 0.0 <1 <1 <10 <10 <1 <10 - Table 3: MPM’s performance on the instances with best-known solutions Set RandAI RandAII RandB xLOLIB Spec Total #Lower Bound #Match Best-known #Improve Best-known Dev.B(%) 100 50 20 78 7 255 64 50 20 24 5 163 33 0 0 32 1 66 0.015 0.0 0.0 0.046 0.2 0.02 Table 4: Detailed results on the 66 instances for which MPM can improve the previous best-known results Instance N-atp163 N-be75np 150 N-be75np 250 N-be75oi 150 N-be75oi 250 N-be75tot 150 N-be75tot 250 N-stabu1 250 N-stabu2 150 N-t59d11xx 250 N-t65f11xx 150 N-t65l11xx 250 N-t65n11xx 150 N-t69r11xx 250 N-t70b11xx 150 N-t70b11xx 250 N-t70d11xn 150 N-t70d11xn 250 N-t70l11xx 150 N-t74d11xx 250 N-t75d11xx 150 N-t75k11xx 250 N-tiw56n54 250 Bound[LB,UB] Our Results [2073,2417] 2074 [7174395,7317546] 7174972 [17819028,18473322] 17819139 [2246534,2259482] 2246571 [5910266,5978555] 5910492 [12287707,12509023] 12288645 [30993002,32055676] 30993138 [7744014,8012535] 7744106 [4327538,4398662] 4328230 [3842563,4015773] 3843449 [3159526,3231148] 3159539 [666664,679527] 666683 [550849,558953] 550856 [31824632,32688871] 31824787 [9649306,9802850] 9649316 [25411146,26133557] 25411943 [5825509,5956793] 5825719 [15212874,15833337] 15215721 [436862,438087] 436863 [24444287,25350257] 24445713 [9644779,9850135] 9645000 [4094877,4249417] 4094905 [2099740,2182012] 2099742 Continued on next page 15 Table 4 – Continued from previous page Instance Bound[LB,UB] Our Results N-tiw56n58 250 [2906872,3026780] 2907355 N-tiw56n62 150 [1626927,1668859] 1626966 N-tiw56n62 250 [4143260, 4317513] 4145133 N-tiw56n66 250 [5371361,5582715] 5371522 N-tiw56n67 150 [2372926,2422085] 2372945 N-tiw56n72 150 [4135907,4222250] 4135952 N-tiw56r54 150 [958192,979551] 958195 N-tiw56r58 250 [3060323,3185528] 3060360 N-tiw56r66 250 [4948720,5417594] 4949345 N-tiw56r67 250 [5292028,5491577] 5292409 N-t1d200.02 [407729,461223] 407733 N-t1d200.04 [410101, 465271] 410120 N-t1d200.08 [408850, 462476] 408857 N-t1d200.13 [409234, 459659] 409270 N-t1d200.18 [407709, 467958] 407822 N-t1d200.20 [406418, 455487] 406420 N-t1d200.22 [407333, 458596] 407377 N-t1d200.25 [406356,458197] 406476 N-t1d500.1 [2402774,4191813] 2404108 N-t1d500.2 [2411570,4207198] 2412011 N-t1d500.3 [2404784,4205918] 2404815 N-t1d500.4 [2413600,4221950] 2414671 N-t1d500.5 [2391486,4186810] 2392298 N-t1d500.6 [2399394,4190956] 2401386 N-t1d500.7 [2400739,4198457] 2400740 N-t1d500.8 [2413108,4206654] 2414166 N-t1d500.9 [2406343,4198840] 2407173 N-t1d500.10 [2404420, 4198760] 2405923 N-t1d500.11 [2416364,4210737] 2416813 N-t1d500.12 [2402581,4194185] 2403302 N-t1d500.13 [2405118,4197442] 2406446 N-t1d500.14 [2410693,4200887] 2410694 N-t1d500.15 [2411718,4208905] 2412599 N-t1d500.16 [2416067,4200206] 2416346 N-t1d500.17 [2401800,4197344] 2402784 N-t1d500.18 [2421159,4222286] 2422227 N-t1d500.19 [2404029,4198658] 2404236 N-t1d500.20 [2414713,4207789] 2415218 N-t1d500.21 [2405615,4201350] 2406326 N-t1d500.22 [2408164,4208557] 2409413 N-t1d500.23 [2408689,4197731] 2408042 N-t1d500.24 [2402712,4191909] 2403229 N-t1d500.25 [2405718,4196590] 2405990 Table 3 shows the performance of our MPM algorithm on the instances whose optimal solutions are unknown. In Table 3, the name of each set is presented in column 1. Column 2 gives the number of instances for which the best-known results are achieved. Columns 3-4 present the number of 16 instances for which we match and improve the previous best-known results, respectively. The deviation from the best-known results is presented in column 5. Table 4 describes the details of the instances for which our algorithm can improve the previous best-known solutions. When compared with the best-known results reported in the literature, one observes that for the 229 instances with known optimal values, our MPM algorithm can match all the optimal results within 10 seconds. In addition, for the 255 instances whose optimal solutions are unknown, our MPM algorithm can match the previous best known results for 163 instances while improving the best known results for 66 ones. In sum, our MPM algorithm can match 392 previous best results and find improved solutions for 66 instances for the 484 instances. The results obtained by our MPM are thus quite competitive compared with the previous best-known results with respect to the solution quality. This experiment demonstrates the competitiveness of our proposed algorithm. In [13], 10 best performing algorithms are compared with each other under a comparable computational time, which include: KLM-Kernighan and Lin multi-start method in [27], CKM-Chanas and Kobilansky multi-start method in [7], GRASP-Greedy Randomized Adaptive Search Procedure in [11], TS-Tabu Search in [8], SS-Scatter Search in [9], VNS-Variable Neighborhood Search in [12], GA in [28], MA in [10], SA-Simulated Annealing in [13] and ILS-Iterated Local Search in [10]. A summarized comparison among these 10 state-of-the-art algorithms is presented in [13] separately for the instances with known and unknown optimal solutions, where the deviation to the best known results and the success rate for hitting the best known results are reported. According to this comparison, MA in [10] shows the best performance for the LOP. In 17 addition, ILS in [10] is also very competitive in terms of effectiveness and efficiency. Although we cannot exactly compare our MPM with these reference algorithms due to the reason that different computational environments are employed and only a summarized results of these reference algorithms are given in [13]. However, if we compare these summarized results of the reference algorithms with our results reported in Tables 2 and 3, we can make the followings comments. First, for the instances with known optimal values, our MPM can achieve all the optimal solution within 10 seconds, which is quite competitive with the reference algorithms in terms of both the deviation to the best known results and the success rate. Second, for the instances with unknown optimal solutions, MPM matches all the previous best-known results while improving the previous best known results for 66 instances but with a longer CPU time. Third, if we use the same time limit as the reference algorithms, our MPM can still obtain competitive results with respect to both the deviation to the best known results and the success rate when comparing with the best performing algorithms MA and ILS of [10]. From these observations, one finds that our MPM algorithm competes favorably with these best performing algorithms in the literature, especially on the instances that are considered to be challenging. 4. Analysis and Discussion We now turn our attention to discussing and analyzing two ingredients implemented in MPM, namely, the MPC recombination operator and the population updating strategy. 18 4.1. Comparison between MPC and OB As indicated in Section 2.3.3, the MPC operator can be regarded as an extended version of the OB operator in [14]. In order to ensure that this extension makes a meaningful contribution to our proposed algorithm, we carry out experiments to compare MPC with OB. Keeping other ingredients unchanged in our MPM algorithm, we compare the MPM algorithm with different m-parent recombination operators, where m = 2, 3, 4, respectively. Note that m = 2 corresponds to the original OB operator. m=2 m=3 m=4 4.4×105 4.38×105 Best objective value 4.36×105 4.34×105 4.32×105 4.3×105 4.28×105 4.26×105 4.24×105 4.22×105 4.2×105 0 10 20 30 40 50 60 70 80 90 100 Number of generations Figure 2: Difference between MPC and OB in terms of solution quality In our experiments, we observe the best objective function value evolving with the number of generations. We compare the performance of MPC and OB by observing how the best objective function value evolves when the 19 Table 5: Comparison between MPC with different number of parents m=2 Instance m=3 m=4 fbest favg fbest favg fbest favg t59b11xx 150 8382725 8377458.0 8387360 8377096 8388760 8379571.0 t59n11xx 150 318570 318411.2 318781 318505.0 318792 318452.4 t65n11xx 150 549459 549355.0 549679 548917.6 549391 548708.8 t70l11xx 150 436580 436338.2 436503 436456.8 436582 436368.2 tiw56r54 150 957002 956600.2 957301 956442.0 957712 956529.6 be75oi 250 5895283 5891278.2 5892923 5888500.0 5901134 5890684.8 t70d11xx 250 15998903 15982525 16011961 16001681.0 16012749 15996008.8 t75k11xx 250 4086690 4083981.6 4094070 4087744.8 4079735.4 stabu1 250 7724593 7720036.4 7728866 7719452.4 7728885 7719805.8 tiw56r67 250 5281958 5279749.2 5282895 5279979.3 5281431 5276231.2 4083293 search progresses. As an illustration we show in Fig. 2 the results of this experiment based on the instance N-t70l11xx 150 with a fixed number of 100 generations. Similar phenomenon can be observed on other instances. From Fig.2, one finds that MPC (m = 3, 4) is more effective compared with the OB operator with respect to the objective value. But there is no obvious difference between the two multiple parent strategies (m = 3, 4). In order to show that MPC is able to generate high quality solutions, we also conducted experiments on some challenging xLOLIB instances. In this experiment, the total number of generations is set to be 400 and our algorithm is independently run 10 times. Table 5 shows the best and average objective values for different MPC operators with m = 2, 3 and 4 respectively. From Table 5, one observes that for these challenging instances, MPC (m = 3, 4) performs better than the OB operator in terms of the best objective function values (fbest ). In terms of average objective value (favg ), OB may outperform MPC on some instances, which shows that OB may have 20 difficulties in finding the best solutions but it is more stable when compared with MPC. These results show that the traditional 2-parent recombination operator has an overall good performance in terms of favg , but it may fail to find the best solutions. The MPC operator, by contrast, favors in producing promising offspring solutions in many situations, though it is less successful in few cases. 4.2. Population Updating Strategy Our pool updating strategy uses a quality-and-distance scoring function to rank the individuals of the population. Experiments are carried out to verify how the parameter α in Eq. 8 affects the performance of our algorithm. We tested different α values, namely, α = 0.8, and random value between 0.8 and 1.0, denoted as rand(0.8, 1.0). We also compare our strategy with the strategy proposed in [10]. Considering the fact that the strategy in [10] only takes objective function value into account, we call it “Only Value Based Strategy” (denoted as OVBS). This experiment is illustrated in Fig. 3 on the instance N-t70l11xx 150. From Fig.3, we find that rand(0.8, 1.0) strategy performs better than the OVBS and α = 0.8 strategies in terms of the objective value. At the beginning of the search, the OVBS can find better solutions, but our algorithm can find better solutions at the end of the search when the number of generations reaches 300, i.e., f = 436550 versus f = 436329 for OVBS and versus f = 436414 for α = 0.8. When it comes to population diversity, our rand(0.8, 1.0) strategy also makes a difference. As the algorithm processes, our strategy enhances the population diversity compared with the OVBS strategy. 21 α = rand(0.8, 1.0) α = 0.8 α = 0.8 OVBS OVBS 4000 120 3800 108 3600 96 Population’s diversity Best objective value (gap to 433000) α = rand(0.8, 1.0) 3400 3200 3000 2800 2600 84 72 60 48 36 2400 24 2200 12 2000 100 120 140 160 180 200 220 240 260 280 300 Number of generations 0 0 30 60 90 120 150 180 210 240 270 300 Number of generations Figure 3: Difference between strategies for pool updating 5. Conclusions In this paper, we have proposed MPM, a multi-parent memetic algorithm for solving the linear ordering problem. The proposed algorithm integrates several particular features, such as a multi-parent recombination operator, a diversity based parent selection strategy and a quality-and-diversity based pool updating strategy. Computational results on 8 sets of 484 popular LOP instances and comparisons with 10 reference algorithms in the literature demonstrate the efficacy of our algorithm. In particular, our MPM algorithm detects better lower bounds than the previous best ones for 66 challenging instances. In addition, we carried out experiments to study two ingredients of MPM. Our experiments demonstrate the merit of the multi-parent recombination operator with respect to the traditional 2-parent operator. Furthermore, the computational results also show that the distance-and-quality based pool updating strategy provides the population with a good diver22 sity. These features together lead to the observed high performance of our algorithm. Acknowledgments This work was partially supported by the National Natural Science Foundation of China (Grant No. 61100144), the Doctoral Fund of Ministry of Education of China (Grant No. 20110142120081) and the RaDaPop (20092013) and LigeRo projects (2009-2013) from Pays de la Loire Region, France. References [1] M. Jünger, P. Mutzel, 2-layer straightline crossing minimization: Performance of exact and heuristic algorithms, J. Graph. Algorithms Appl. 1(1997) 1–25. [2] W. Leontief, Input-output Economics, Oxford University Press, USA, 1986. [3] M. Grötschel, M. Jünger, G. Reinelt, A cutting plane algorithm for the linear ordering problem, Oper. Res, 32(1984) 1195-1220. [4] F. Glover, T. Klastorin, D. Kongman, Optimal weighted ancestry relationships, Manage. Sci. 20 (1974) 1190-1193. [5] R. Kaas, A branch and bound algorithm for the acyclic subgraph problem, Eur. J. Oper. Res. 8 (1981) 355-362. [6] J.E. Mitchell, B. Borchers, Solving linear ordering problems with a combined interior point/simplex cutting plane algorithm, in H. Frenk , K.Roos, T.Terlaky, S. Zhang(Eds.), High Performance Optimization, Kluwer, Dordrecht, 2000, pp. 349-366. 23 [7] S. Chanas, P. Kobylański, A new heuristic algorithm solving the linear ordering problem, Comput. Optim. Appl. 6 (1996) 191-205. [8] M. Laguna, R. Marti, V. Campos, Tabu Search for the Linear Ordering Problem, Comput. Oper. Res. 26 (1999) 1217-1230. [9] V. Campos, M. Laguna, R. Martı́, Scatter search for the linear ordering problem, in D. Corne, M. Dorigo, F. Glover(Eds.), New Ideas in Optimization, 1999, pp. 331-339. [10] T. Schiavinotto, T. Stützle,The linear ordering problem: Instances, search space analysis and algorithms, J. Math. Model. Algorithm. 3 (2004) 367-402. [11] V. Campos, F. Glover, M. Laguna, R. Mart, An experimental evaluation of a scatter search for the linear ordering problem, J. Global Optim. 21 (2001) 397-414. [12] C.G. Garcia, D. Pérez-Brito, V. Campos, R. Martı́, Variable neighborhood search for the linear ordering problem, Comput. Oper. Res. 33 (2006) 3549-3565. [13] R. Martı́, G. Reinelt, The linear ordering problem: exact and heuristic methods, Springer, 2011. [14] G. Syswerda, Schedule optimization using genetic algorithms, in L. Davis(Eds.), Handbook of Genetic Algorithms, New York, Van Nostrand Reinhold, 1991, pp. 332-349. [15] F. Neri, C. Cotta, P. Moscato, Handbook of Memetic Algorithms, Springer, 2012. 24 [16] P. Moscato, C. Cotta, A gentle introduction to memetic algorithms, in F. Glover, G. A. Kochenberger (Eds.), Handbook of Metaheuristics, Kluwer, Norwell, Massachusetts, 2012. [17] J.K. Hao, Memetic algorithms in discrete optimization, in F. Neri, C. Cotta, P. Moscato(Eds.), Handbook of Memetic Algorithms, 2012, pp. 73-94. [18] R.K. Congram, Polynomially searchable exponential neighbourhoods for sequencing problems in combinatorial optimisation, Ph.D. Thesis, Faculty of Mathematical Studies, University of Southampton, UK, 2000. [19] Z. Lü, J.K. Hao, A memetic algorithm for graph coloring, Eur. J. Oper. Res. 203 (2010) 241-250. [20] D.C. Porumbel, J.K. Hao, P. Kuntz, An evolutionary approach with diversity guarantee and well-informed grouping recombination for graph coloring, Comput. Oper. Res. 37 (2010) 1822-1832. [21] K. Sörensen, M. Sevaux, MA— PM: memetic algorithms with population management, Comput. Oper. Res. 33 (2006) 1214-1225. [22] T.H. Cormen, C.E. Leiserson, R.L. Rivest, C. Stein, Introduction to Algorithms, The MIT Press, 2001. [23] D.E. Knuth, The Stanford GraphBase: a platform for combinatorial computing, ACM Press, 1993. [24] T. Christof, Low dimensional 0/1-polytopes and Branch-and-cut in Combinatorial Optimization, Ph.D. Thesis, Department of Applied Mathematics, University of Heidelberg, Germany, 1997. 25 [25] T. Christof, G. Reinelt, Combinatorial optimization and small polytopes, Top 4 (1996) 1-53. [26] M. Goemans, L. Hall, The strongest facets of the acyclic subgraph polytope are unknown, Integer Programming and Combinatorial Optimization (1996) 415-429. [27] B.W. Kernighan, S. Lin, An efficient heuristic procedure for partitioning graphs, Bell Systems Technical Journal, 49(1979) 291-308. [28] G. Huang, A. Lim, Designing a hybrid genetic algorithm for the linear ordering problem, Genetic and Evolutionary ComputationGECCO 2003, Springer, 2003, pp. 201-201. 26
9cs.NE
A Machine Learning Approach to Air Traffic Route Choice Modelling Rodrigo Marcos, Oliva García-Cantú, Ricardo Herranz Nommon Solutions and Technologies, Madrid, 28006, Spain E-mail address: [email protected] (R. Marcos). Keywords: Machine learning; Multinomial regression; Decision Trees; ATM; Pre-tactical traffic forecast; Airline route choice Abstract Air Traffic Flow and Capacity Management (ATFCM) is one of the constituent parts of Air Traffic Management (ATM). The goal of ATFCM is to make airport and airspace capacity meet traffic demand and, when capacity opportunities are exhausted, optimise traffic flows to meet the available capacity. One of the key enablers of ATFCM is the accurate estimation of future traffic demand. The available information (schedules, flight plans, etc.) and its associated level of uncertainty differ across the different ATFCM planning phases, leading to qualitative differences between the types of forecasting that are feasible at each time horizon. While abundant research has been conducted on tactical trajectory prediction (i.e., during the day of operations), trajectory prediction in the pre-tactical phase, when few or no flight plans are available, has received much less attention. As a consequence, the methods currently in use for pre-tactical traffic forecast are still rather rudimentary, which often results in suboptimal ATFCM decision making. This paper proposes a machine learning approach for the prediction of airlines route choices between two airports as a function of the characteristics of each route, such as flight efficiency, air navigation charges and expected level of congestion. Different predictive models based on multinomial logistic regression and decision trees are formulated and calibrated using historical traffic data, and a critical evaluation of each model is conducted. For this purpose, we analyse the predictive power of each model in terms of its ability to forecast traffic volumes at the level of charging zones, showing that the proposed approach entails significant potential to enhance pre-tactical traffic forecast. We conclude by discussing the limitations and room for improvement of the proposed approach, as well as the future developments required to produce reliable traffic forecasts at a higher spatial and temporal resolution. 1. Introduction Air Traffic Flow and Capacity Management (ATFCM) is one of the functions of Air Traffic Management (ATM). The objective of ATFCM is to adapt airport and airspace capacity to satisfy traffic demand and, when the maximum capacity is reached, optimise traffic flows to meet the available capacity. In Europe, ATFCM services are provided by EUROCONTROL’s Network Manager Operations Centre (NMOC). ATFCM provision comprises three phases (Network Manager, 2017): i) during the strategic phase, seven days or more before the day of operations, Air Navigation Service Providers (ANSPs) are helped to predict how much capacity they will need and a strategic ATFCM plan is created to avoid major demand-capacity imbalances; ii) during the pre-tactical phase, six to one day before operations, demand is predicted for the day of the operations and the ATFCM plan is modified accordingly; iii) finally, tactical flow management adjusts the daily plan with actual demand on the day of operations. One of the key enablers of the ATFCM function is the provision of accurate traffic demand information. Most research efforts in this domain have focused on tactical trajectory prediction, when most flight plans are already available. Examples are the use of machine learning methods such as linear regression, neural networks and local polynomial regression to predict the vertical profile of an aircraft (Fablec and Alliot, 1999; Ghasemi et al., 2013), and the prediction of arrival times at airport runways for low to mid-term tactical time horizons (i.e., 10 to 30 minutes) by means of multiple-linear regression (Hong and Lee, 2015; Tastambekov et al., 2014). However, much less attention has been devoted to pre-tactical traffic forecasting, when flight plan information is still scarce. The tool currently used by EUROCONTROL for pre-tactical traffic forecast is the socalled PREDICT system (EUROCONTROL, 2017a), which transforms flight intentions into predicted flight plans by assigning to each flight the flight plan of a similar flight that occurred in previous weeks. This approach offers room for improvement, as the route assigned to the flight intentions is based on limited similarity criteria found in historical flight plans, without consideration of other flight attributes (e.g., airline characteristics, meteorology, etc.). This fact limits the accuracy of the forecast, which may lead to inefficient or sub-optimal decision-making regarding demand and capacity management (EUROCONTROL Experimental Centre, 2008). It is our view that the quality of these forecasts could be improved by exploiting historical data to develop predictive models that incorporate a finer characterization of airline route choices. The goal of this paper is to explore the potential of different machine learning techniques to develop new route choice prediction approaches able to fill the current gap in pre-tactical traffic forecast. The rest of the paper is organised as follows. Section 2 provides a description of the data sources and the methodology used for the study. Section 3 presents the main results of the modelling work. Section 4 presents the conclusions extracted from the results and identifies future research directions. 2. Data and Methodology 2.1. Data Sources The study has used data from two EUROCONTROL databases: historical flight trajectories from the Demand Data Repository (DDR) and air navigation charges from the Central Route Charges Office (CRCO) database. 2.1.1. Demand Data Repository (DDR) The DDR (EUROCONTROL, 2017b) is a restricted-access flight database maintained by EUROCONTROL which records data for almost all flights within the European airspace (ECAC area). This database has been fully operational since 2013. The information stored in DDR includes: • Trajectory description: coordinates, timing, altitude and length of the flight. Flight description: ID, airline, aircraft, origin, destination, date, departure time, arrival time, most penalising regulation and its assigned ATFM delay (i.e., delay assigned to a flight that enters a congested area to adapt demand and capacity, see • • Glossary). Airspace information: air navigation charging zones shape and airport coordinates. This information is available for both the actual flown trajectory and the last filled flight plan. The current study focuses only on the prediction of actual trajectories, therefore only data on actual trajectories are used. 2.1.2. Central Route Charges Office (CRCO) The Central Route Charges Office (CRCO) is an office within EUROCONTROL that sets the unit rates of the different States included in the ECAC area (CRCO, 2013). The unit rate of charge is the charge in euros applied by a charging zone to a flight operated by an aircraft of 50 metric tonnes (weight factor of 1.00) and for a distance factor of 1.00 (for more information about the calculation of en-route charges, see Appendix A). Air navigation charges are published on a monthly basis by the CRCO in their website (CRCO, 2017a). 2.2. Methodology The study applies the same methodology on different origin-destination airport pairs (OD pairs). A combination of an OD pair and a specific modelling technique will be referred as “application exercise”. Each application exercise follows the same steps: 1. Route clustering, consisting in grouping historical flight trajectories into a finite set of route clusters that represent the typical routes flown. The predictive models aim to forecast in which one of these clusters will be the selected route by each flight. 2. Segmentation of flights according to their descriptive parameters (such as airline business type and time of the day), so that different models are used for each demand segment. 3. Development and evaluation of predictive models: a. Model training. A machine learning algorithm is trained to predict the probability of choosing a cluster of routes by each flight according to different route characteristics, such as navigation charges, route length, congestion, etc. b. Model validation. A dataset different from the training dataset is used to compare the model predictions with the actual flight trajectories. c. Model testing. The model accuracy is tested by applying the algorithm to a dataset from a different year with different route clusters. 2.2.1. Dataset Preparation For each OD pair, the following datasets are created. The datasets include the flight information of all non-military IFR (Instrumental Flight Rules) flights between the OD pair in the corresponding period. • • Training dataset: the training dataset contains the information of the majority (70%) of the flights between the OD pair during the training period. These data are used to calibrate the parameters of the models. The training and validation datasets are separated randomly by applying the function train_test_split from the public library scikit-learn (Pedregosa et al., 2011). Validation dataset: the validation dataset contains the information of a subsample (the 30% not included in the training data set) of the flights between the OD pair • during the training period. These data are used to validate the results of the trained algorithm. Testing dataset: the testing dataset contains the information of the flights between the OD pair during the testing period. The testing period is different and does not intersect with the training and validation period. These data are used to evaluate the performance of the predictive models when applied to a different period than the one used for training purposes. The training period consists of the AIRAC cycles (28 days cycles used in ATM, see Glossary) 1601, 1602 and 1603, i.e., from the 7th of January 2016 to the 30th of March 2016. The testing dataset consists of the AIRAC cycles 1501 and 1502, i.e., from the 8th of January 2015 to the 4th of March 2015. The first AIRAC, i.e. AIRAC 1501, is used to create new route clusters and update the routes considered by each segment. The last AIRAC, i.e. AIRAC 1502, was used to test the models trained with the training dataset. 2.2.2. Application exercises Three OD pairs were selected. In some cases, the origin and/or the destination of an OD pair includes several airports located in the same area. The selected OD pairs are: • • • Canary Islands to London. This OD is representative of the South-West traffic axis. It has an average traffic volume of more than 10 flights per day and offers the option to deviate through oceanic airspace, which is cheaper in terms of navigation charges. Istanbul to Paris. This OD represents the South-East traffic axis. It has an average traffic volume of more than 10 flights per day and presents a high variety of route options. Amsterdam to Milan. This OD represents the connection between two hubs in central Europe. It has an average traffic volume of more than 10 flights per day and offers the option of flying a longer route to avoid the Swiss airspace, which is the country with the highest air navigation charges in Europe. The criteria used to select these OD pairs were: i) to include the main European air traffic flows, ii) to use OD pairs with a sufficient number of alternative route options, and iii) to have a significant volume of traffic. The different application exercises conducted are shown in the table below: Application Route exercise choice algorithm 1 Multinomial regression 2 Decision Tree 3 Multinomial regression 4 Decision Tree 5 Multinomial regression 6 Decision Tree OD pair Origin Destination Training Testing airports airports AIRACs AIRACs Canary IslandsLondon GCLP GCXO GCTS EGSS EGKK EGGW EGLL IstanbulParis LTBA LTFJ LFPG LFPO LFOB Amsterdam- EHAM Milan 1601 1602 1603 1501 1502 LIMC LIML LIME Table 2.1. Definition of the modelling exercises. 2.2.3. Route Clustering Usually there is a vast number of route options to fly from one airport to another. The aim of this study is not to predict the exact route followed by each aircraft, but to predict the airspace sectors through which each aircraft will fly. To convert this problem into a discrete-choice form, the actual trajectories of historical flights are grouped into a set of clusters represented by a mean trajectory. In order to do this, Density-Based Clustering (DBC) technique was chosen, due to its potential to compute clusters of any shape in contrast with centroid based techniques, e.g. k means clustering, which assume convex shaped clusters. In DBC, clusters are formed by a set of core samples close to each other and a set of non-core samples that are close to a core sample but are not considered themselves core samples. Core samples are those in areas of high density, i.e. with a minimum number of samples within a maximum distance. Non-core samples are within a minimum distance to a core sample but do not have the minimum required number of nearby core samples to be considered core sample. The algorithm takes these two variables as inputs: i) minimum number of samples and ii) maximum distance to consider a sample “near” another. Another input is the metric used to compute distance, in this case the Euclidean norm was used. The cluster is formed by a group of core samples built recursively by finding core samples and grouping them with the neighbouring core samples. Any sample that is not a core sample and is not within the maximum distance to a core sample is identified as noise by the algorithm. In our implementation, in addition to those air routes classified as noise, the routes assigned to a cluster with less than 5% of the total flights between an OD are also considered noise. The routes identified as noise were grouped together into an additional category named as “other”. DBC was implemented using the function DBCScan of the Python public library scikitlearn (Pedregosa et al., 2011). A custom algorithm was designed to allow the function to cluster new routes not included in the original training dataset. The routes are clustered by using two indicators associated to the route geometry: the distance flown within each air navigation charging zone, and the air navigation charges associated to the trajectory. These indicators are considered appropriate for the aim of the study, which is to capture the factors that drive airlines’ route choices. The function first trains a DBCScan model and classifies the training data. To classify a new route, the function performs a search in the training routes not classified as noise, looking for the nearest neighbour to the route to be classified. Then the algorithm evaluates the distance between them. If the distance is below the threshold used to train the DBC, the route is assigned to that cluster. If not, the route is classified as noise. The minimum number of samples and maximum distance between items to be considered as part of the same cluster (epsilon) are initially set to 0.3 for epsilon and to one tenth of the number of training samples for the minimum number of samples. Then, a number of iterations are carried out, checking that: • • • the result has a mean Silhouette factor, which is a measure of the difference in similarity between the items inside a cluster and the rest of the elements (Rousseeuw, 1987), higher than 0.75 – δ (where δ is a number between 0 and 1, inversely proportional to the number of flights in the dataset); there are at least 4 clusters; the maximum number of fights assigned to a single cluster is less than 50% of the total. If at least one of the previous conditions is not fulfilled, the minimum value of average Silhouette factor is reduced to half and the minimum number of samples reduced by one. This process continues iteratively until all criteria are fulfilled. This methodology ensured a sufficient and significant number of route options (clusters). 2.2.4. Flight Segmentation Airline route choices are explained by different variables, such as cost of fuel, cost of delay and air navigation charges, which in turn depend on the characteristics of each route and/or each flight (Cook and Tanner, 2011; Delgado, 2015). The approach we have followed to model route choices comprises two steps: first, flights have been segmented according to different flight characteristics; then, for each segment, airline choices are modelled as a function of a set of characteristics (explanatory variables) of the routes. From an initial exploration, it was observed that airlines usually consider only a subset of routes to fly, suggesting the importance of segmenting by airline type. For example, in Figure 2a it can be seen that, for the routes from Istanbul to Paris, Turkish airlines tend to fly a wider set of routes with prevalence of the most direct route, whilst Air France has a narrower set of options and the preferences are more balanced. Additionally, it was considered important to segment flights by time of the day, in order to capture intra-day variability of the airspace (e.g., peak-hour congestion) and the importance of delay at different hours of the day, e.g., airlines may put more effort to minimise delay in early flights as this delay will propagate to late flights (Jetzki, 2009). Taking into account these considerations, the variables selected for flight segmentation are: i) the airline Cost per Available Seat Kilometre (CASK1), which is an explanatory variable of the business model of the airline; and ii) the arrival time of the flight. Figure 2a Flight trajectories of different airlines during AIRAC cycles 1601 to 1603 for flights from Istanbul to Paris. Top: Air France flight trajectories. Bottom: Turkish Airlines flight trajectories. The background shading indicates the unit rate of each charging zone: red means more expensive, blue means cheaper. A full segmentation of airlines is performed for the training dataset. Hence, each segment only contains flights of a single airline. New airlines may appear in the validation dataset. These are assigned to the segment of the airline with the most similar CASK. Flights are also segmented by arrival time with a k-means method. The number of clusters is set to 1 CASK is obtained from the annual report of the airline. When there is not available information about the CASK of an airline, an average value is used (EUR 7 cent per available seat-kilometre). 4, which represent the typical traffic periods in an airport, i.e., morning peak, afternoon peak and valley periods within them. The segmentation was implemented with the Python public library scikit-learn (Pedregosa et al., 2011) with the function KMeans. 2.2.5. Route Choice Modelling The route choice model assigns each flight a probability (i.e., a float number between 0 and 1) of choosing each of the observed route clusters (from here onwards we will use the term ‘route’ to refer to each of these route clusters) according to the characteristics of each route. An additional output value is the probability of choosing the “other” route, i.e., a cluster containing the routes considered as noise. Two machine learning models were explored to model route choice: multinomial logistic regression and decision trees. The following route characteristics are considered as explanatory variables in the route choice models: • • • Average horizontal route length with respect to the orthodromic trajectory, which explains the fuel consumed by flying a longer route. Average air navigation charges (for a weight factor of one), which explains the costs associated to navigation charges. Average rate of regulated flights per flight, which is a proxy of the level of congestion found in the sectors intersected by a particular route. 2.2.5.1. Multinomial Logistic Regression Multinomial logistic regression is a multi-criteria discrete choice modeller. It constitutes a simple extension of binary logistic regression that allows classification between more than two categories. The model accepts binary or continuous input variables, which is the case of the current work. In addition, model assumptions are much simpler than other approaches such as discriminant function analysis (Starkweather and Moske, 2005). The main assumption is the independence between the choices. This assumption states that the probability of an option is independent on the number of users choosing that option. In our case this is not strictly correct, as congestion depends on the number of flights taking that route. Nevertheless, the other flights in the same OD pair are not the main source of congestion, as the contribution of the rest of OD pairs whose routes cross the relevant airspace areas will be much higher, and therefore the assumption of independent choices seems a reasonable simplification. A full explanation of the multinomial logistic regression is found in Appendix C. The explanatory variables of route length and charges are normalised for the flights in the training dataset to make them vary between -1 and 1. The congestion variable, i.e., average rate of regulated flights, does not need to be normalised, as it varies between 0 and 1. The same normalisation factors obtained for the training dataset are applied to the validation and testing datasets. Since the ranges of flight length or charges in these two datasets are not necessarily the same as those in the training one, their normalised values of route length and of charges may not vary between -1 and 1 in the validation and testing datasets. 2.2.5.2. Decision Tree Regressor A decision tree is a concatenation of binary classifiers that choose one option from a series of options. In the case of the decision tree regressor, these options are real numbers. In the current case, the output numbers represent the probability of an option, which varies between 0 and 1. To ensure that the output is consistent, the choice probability of the “other” route was calculated as the sum of the rest of the options minus one. If the rest of the options give a sum higher than one (as it may happen with decision trees), the “other” option is set to cero and the rest of choice probabilities are scaled to sum one. A full explanation of the multinomial logistic regression is found in Appendix B. The output of the model is chosen by classifying the inputs several times with a binary linear algorithm. Decision trees provide a human-like algorithm of choosing a route. For example, a flight could be classified by first looking at the CASK of the airline (segmentation), after that the level of congestion of the route could be checked and, finally, the length and charges would be taken into account. 2.2.5.3. Training Once the model is selected, the model constants are calculated through an optimization process to fit the data in the training dataset for each segment according to a cost function. The cost function evaluates the similarity of the output, i.e., the probability of choosing a route with the actual observed probabilities, obtained as the number of flights that flew a certain route divided by the total number of flights. 2.2.5.4. Validation The objective of validation is to measure the statistical significance of the segmentation, evaluate the overall performance and have a first measure of the model’s uncertainty. The process of validation follows the same steps as the training: segmentation, i.e., group flights, and prediction, i.e., obtain the route probabilities of each segment. The predicted number of flights assigned to a route for each segment is the probability of choosing each route multiplied by the number of flights in the segment. The total predicted number of flights assigned to a route is the sum of all flights assigned to it in each segment. Note that the route options as well as their properties given as inputs to the models are the same for both validation and training processes. Thus, the difference between the validation and the actual results reflects the variability in route choice decision. The results are compared to the total amount of flights flying each route globally and by segmentation to identify what aspects presented difficulties to be modelled and the influence of the variability in the prediction error. 2.2.5.5. Testing The testing algorithm uses the trained models and the testing dataset. The objective of the algorithm is to measure the expected error of the prediction. It consists in running the model for a new period in which the route inputs have varied. This means that in the testing process we may also consider routes and airlines not present during training. The testing dataset is divided into two datasets: i) the first AIRAC cycle in the testing dataset, used to compute route options and to determine which routes are considered by each segment. Note that the route structure of each segment may have changed from one year to the next. And ii) the rest of AIRAC cycles in the testing dataset, used to measure the performance of the model. First, a new route clustering is performed in the same way as described in Section 2.2.3. Not only navigation charges and expected congestion may have changed, but also the route geometries and new routes may have appeared. Next, flights in the testing dataset are segmented as explained in Section 2.2.4. Since airline segmentation uses CASK, new airlines in the testing dataset are modelled as the airline with most similar CASK. Finally, the models of each segment are updated to consider the new route options (clusters). The updated models are then used to predict the routes followed by the flights in the rest of the AIRAC cycles of the testing dataset. The prediction is obtained as the sum of flights assigned to each route in each segment, as explained in section 2.2.5.4. Here the inputs to the models are different from those in the training and validation, as the route options are computed from a different dataset. The results were compared globally to the total amount of flights flying each route and also by flight segment, in order to identify what aspects presented difficulties to be forecasted. 3. Results & Discussion In this section, we discuss the results of three application exercises: • • • Application exercise 1: Multinomial Regression of Flights from Canary Islands to London. Application exercise 3: Multinomial Regression of Flights from Istanbul to Paris. Application exercise 6: Decision Tree Regression of Flights from Amsterdam to Milan. These application exercises have been selected due to their good performance and the relevancy of the lessons learnt from them. The rest of the approaches and a comparison of results can be found in the supplementary material. 3.1. Application exercise 1: Multinomial Regression of Flights from Canary Islands to London The application exercise 1 studied the flights departing from some of the Canary Islands airports, namely Tenerife North (GCXO), Tenerife South (GCTS) and Las Palmas (GCLP); to London airports, namely Stansted (EGSS), Gatwick (EGKK), Heathrow (EGGW) and Luton (EGLL). 3.1.1. Results of training The amount of flights in the training dataset summed 1009 flights of 8 different airlines, namely British Airways (BAW), EasyJet (EZY), Iberia Express (IBS), Norwegian Air International (IBK), Monarch (MON), Ryanair (RYR), Thomson Airways (TOM) and Thomas Cook (TCX). The different routes flown per airline and navigation unit rates are shown in Figure 3a. Figure 3a Flight trajectories of different airlines during the training period of application exercise 1. 3.1.1.2. Route clustering The clustering algorithm calculated four main route choices, as shown in Figure 3b. The different clustered routes were: Cluster 0: Shortest route through Morocco (GM), mainland Portugal (LP), Spain (LE) and France (LF). Cluster 1: Slightly deviated route avoiding Morocco. Cluster 2: Route flying through Azores (AZ) avoiding Spain and most Portugal and entering through France to the United Kingdom (EG). Cluster 3: Route avoiding France and Morocco, entering UK through Ireland (EI). Cluster 4: Route avoiding Portugal through Morocco and Spain. Cluster 5: Route flying through Azores avoiding Spain and most Portugal and entering through Ireland to the United Kingdom. Figure 3b Left: clustered trajectories. Right: assigned cluster to actual trajectories in the training dataset of application exercise 1. Recall that the last three routes are negligible due to the low number of flights taking those options and were not considered in the study (see Table 3.1). Instead, an option 3 “other” is used as the probability of not choosing one of the three most flown. Note that most of the flights took the most direct route (Route 0) at the cost of higher congestion. Route 1 is a less congested option but higher in length and charges whilst Route 2 offers the lowest charges by flying through Azores (AZ) at the cost of flying longer. Cluster 0 Number of flights 659 Average length (NM) 1620 Average charges (EUR) 1653 Rate of regulated flights 0.18 1 238 1638 1676 0.13 2 68 1740 1051 0.13 3 13 1732 1582 0.46 4 7 1724 1893 0.42 5 10 1780 1165 0 Table 3.1. Properties of the clustered routes in training of application exercise 1. The colour code highlights routes with higher (red) or lower (green) values. Note that higher values of the input parameters indicate higher costs (fuel, charges and congestion). 3.1.1.3. Segmentation A full segmentation is applied to airlines, thus creating 8 classes for the 8 different airlines. The arrival time is classified into 4 classes: Class 0: Class 1: Class 2: Class 3: Flights arriving from 4:00 to 17:00. Flights arriving from 17:00 to 19:00. Flights arriving 19:00 to 22:00. Flights arriving 22:00 to 4:00. Therefore, the segmentation created 32 segments resulting from the combinations of airlines and arrival times. For each one of these 32 segments, a multinomial regression model was trained. 3.1.1.4. Route Modelling The results of the training for most representative segments for exercise 1 are shown in Table 3.2. For a full table of the training results, see Appendix E.1. In the Table, it is observed that the model is able to fit the probability vector of several types of airline, each one considering a different set of routes. The worst training score results from Segment 24, which is low (0.05). The actual probability vector in Table 3.2 is the ordered concatenation of the actual share of each route. The norm of error is the norm of the vector of the error in the computed probabilities. Where, the error per route is calculated as the difference between its actual share of flights and the modelled one. The score is a measure of the expected error for that segment. Thus, an error of zero denotes a perfect fit of the probability vector with the training dataset. Note that the possible routes to be considered by each segment, those with a flight share higher than 5% in the training set, are obtained prior to the model training. For those airlines following only one route, the multinomial regression model cannot be trained and hence a simple model assigning a constant single route is set. Moreover, some segments do not have any flights because the airline does not fly at those hours, in these cases a simple model assigning an evenly divided probability to all routes (including the “other” option) is set for that segment. Segment Number of flights Airline 7 6 IBK Average arrival time 25.3 5 32 TOM 8 64 11 34 12 24 Routes considered Actual probability vector Norm of error 1, 3 0.0, 0.67, 0.0, 0.33 0 24.6 0 - - EZY 17.2 0, 1 0.72, 0.28, 0.0, 0.0 0 IBS 18.2 0, 1, 3 0.85, 0.09, 0.0, 0.06 0.01 33 BAW 18.3 0, 1, 2, 3 0.48, 0.09, 0.36, 0.06 0 31 EZY 16.5 0, 1 0.94, 0.06, 0.0, 0.0 0.05 Table 3.2. Results of training of application exercise 1. 3.1.2. Results of validation The results of the validation of the models trained in the application exercise 1 are shown in Table 3.3. Recall that estimation numbers are given in decimal form, as the result of the multinomial model is a probability, i.e., a real number between 0 and 1. Route 0 Route 1 Route 2 Other Actual 187 63 22 7 Estimation 179.5 65.4 21.6 12.5 Early flights Actual 38 22 0 2 Estimation 29.9 30.3 0 1.8 Midday Flights Actual 94 22 21 3 Estimation 94 20.1 18.7 7 Late Flights Actual 55 19 1 2 Estimation 55.7 15 2.7 3.6 Total Table 3.3. Results of validation of application exercise 1. Comparison between the actual and the estimated number of flights per route. A visual comparison between the predicted and actual number of flights in each route in the validation dataset is shown in Figure 3c. The results show a good correlation between estimated and actual flights distribution, reporting a Pearson coefficient of 0.999 for the global results. The worse results are obtained for the early flights, showing a Person coefficient of 0.928, still a good correlation. The best correlation is observed for the midday flights with a correlation coefficient of 0.997. low error, with the main error coming from the prediction of early flights. Figure 3c Comparison of results of validation of application exercise 1 3.1.3. Testing The testing dataset is divided into two as explained in section 2.2.1. 3.1.3.1. Route clustering The clustering algorithm is applied to flights during AIRAC 1501. The resulting routes are shown in Figure 3d. The differences between the new and the old clustered routes are: • • • • • Route 4 does not appear. This is consistent as this route was not considered in training due to the low number of flights. Route charges were updated. Charges in year 2015 were slightly lower than in year 2016 for routes 0 and 1, and slightly higher for cluster 2 (see Table 3.4). Congestion was updated. The number of regulated flights in 2015 was significantly lower than in 2016 for all clusters. In this case, Route 2 was also ignored (apart from Route 5) due to its low traffic. Therefore, only routes 0, 1 and “other” were considered as options. This is consistent with the lowest congestion perceived in the most direct routes. The considered routes by each segment are updated. Cluster Number of flights Average length (NM) Average charges (EUR) Rate of regulated flights 0 216 1624 1651 0.03 1 70 1632 1647 0.02 2 7 1743 1067 0 5 4 1762 1122 0 Table 3.4. Properties of the clustered routes in testing of application exercise 1. Figure 3d Clustered trajectories in testing of application exercise 1. 3.1.3.2. Testing results The results of the model with the testing dataset are compared with the actual choice of routes and the null model described in Appendix B, in Figure 3e and Table 3.5. Note that the null model assigns flights to Route 2, which is not considered in the testing dataset and thus included in “other”. The results of the model show a fair approximation of the actual routes flown, much better than the null model, especially in midday flights. Figure 3e Comparison of results of testing of application exercise 1. The Pearson correlation coefficient of the results of both models with actual data is presented in Table 3.5. Except for early flights, the trained model gives better correlated results for all the time segments, enhancing globally the correlation. Total Early Flights Midday Flights Late Flights Estimation Null model Estimation Null model Estimation Null model Estimation Null model Correlation coefficient 0.9982 0.9894 0.9095 0.9148 0.9996 0.9702 0.9998 0.9954 Table 3.5. Comparison of testing results of application exercise 1 with null model. 3.1.4. Discussion The trained model provides a fair approximation of the airspace demand of the OD. This exercise has a low number of routes clearly differentiated (see Table 3.1). The training error obtained is in the order of one per cent. This implies that the model is able to fit the actual distribution of flights and the selected variables explain route choice. The segmentation improved the accuracy by reducing the number of considered routes in each segment. Note that the training error does not include all error sources. When predicting other datasets, the error is higher because of data variability and over-fitting. The results of validation give a measure of the actual error. In spite of the good results obtained by the model, estimated values lay within ±10% of the real ones. The model could be improved. For instance, some factors not considered affect route choice such as wind, airport configuration, delay at take-off, etc. Error is particularly high when predicting early flights. This may be in part because these sectors contain a fewer amount of flights providing less inputs to train the model but also suggests that the model may be missing a relevant explicative variable. For instance, the ratio of regulated flights is not a perfect indicator of the congestion in a route. Less congested routes may be only flown when high congestion occurs, resulting in a high ratio for that route. Early flights suffer in particular from typical congestion in the morning. Thus, an imperfect congestion variable results in a poorer fit of this segment. The results of testing give similar error to that of the validation. In this case, one new airline (Norwegian Air Shuttle) appeared, whose behaviour was assumed equal to RYR. This proved to be correct as the results of the segments corresponding to this airline were accurate. Also, the update of considered routes allowed to obviate Route 2, practically not flown in 2015. This improved accuracy with respect to the null model, which considered it. The routes inside a cluster differ in many kilometres. As an example, trajectories of cluster 0 in Figure 3b enter Spain through points separated hundreds of kilometres away. To calculate the entry time to a sector i.e. a model able to predict trajectories of the flights inside a cluster, i.e. providing higher spatial granularity, is required. In addition to the multinomial model, a decision tree model was also trained for the segments of this OD pair (application exercise 2 in the supplementary information). The results obtained from this model provided an inaccurate prediction. This error is attributed to overfitting due to the high-complexity (depth and number of variables) required to properly fit the training data. These trained models resulted in constant output when applied to the testing dataset. Thus, decision trees would require training with several years of data to estimate route choice across different years. As a summary, the results of application exercise 1 show a fair approximation of route choices of distant airports and low number of choices. The multinomial model is successful to model the behaviour of airlines between different years. The model can be enhanced with finer-granularity trajectory prediction to estimate demand at sector level. 3.2. Application exercise 3: Multinomial Regression of Flights from Istanbul to Paris The application exercise 3 studied the flights departing from the Istanbul airports, namely Atatürk (LTBA) and Sabiha Gökçen (LTFJ); to Paris airports, namely Charles de Gaulle (LFPG) and Orly (LFPO). 3.2.1. Results of training The amount of flights in the training dataset summed 950 flights of 6 different airlines: Air France (AFR), AtlasJet (KKK), MNG Airlines (MNB), Onur Air (OHY), Pegasus (PGT) and Turkish Airlines (THY). 3.2.1.1. Route clustering The clustering algorithm calculated eight main route choices, as shown in Figure 3f. The different clustered routes were: Cluster 0: Route through Austria (LO) and Germany (ED), avoiding Romania (LR) and Czechia (LK). Cluster 1: The longest route (see Table 3.6) flying through Czechia. Cluster 2: One of the shortest routes, through Austria and Switzerland (LS). Cluster 3: One of the shortest routes, through Italy (LI) and the south of Switzerland. Cluster 4: The shortest route, through Italy and Switzerland avoiding Slovenia (LJ). Cluster 5: Route through Austria and Germany, avoiding Serbia (LY). Cluster 6: One of the shortest routes, through Italy and Switzerland. Cluster 7: Route through Austria and Germany, avoiding Romania. Clusters 6 and 7 did not have enough flights and were, thus, not modelled. These flights were grouped in an “other” group (cluster 6). Figure 3f Top: clustered trajectories. Bottom: assigned cluster to actual trajectories in the training dataset of application exercise 3. Recall that in this case the most direct route (Route 4) is not the most flown but Route 3, which has low average length and mild charges and congestion, similar to Route 0. Route 1 is an option with lower charges but higher length and Route 6 offers the lowest congested option at the cost of the highest charges. 139 Average length (NM) 1277 Average charges (EUR) 1188 Rate of regulated flights 0.1 1 110 1314 1144 0.1 2 190 1273 1199 0.06 3 218 1274 1203 0.06 4 117 1256 1207 0.07 5 73 1274 1204 0.1 6 29 1271 1229 0.03 7 24 1304 1152 0.04 Cluster Number of flights 0 Table 3.6. Properties of the clustered routes in training of application exercise 3. The colour code is the same as in Figure 3b. 3.2.1.2. Segmentation A full segmentation was applied to airlines, thus creating 6 classes for the 6 different airlines. The arrival time was classified into 4 classes: Class 0: Class 1: Class 2: Class 3: Flights arriving from 4:00 to 10:30. Flights arriving from 10:30 to 14:15. Flights arriving from 14:15 to 18:40. Flights arriving from 18:40 to 4:00. The segmentation created 24 segments resulting from the combinations of airlines and arrival times. For each one of these 24 segments, a multinomial regression model was trained. 3.2.1.3. Route Modelling The results of the model trained for the most representative segments in the application exercise 3 are shown in Table 3.7. For a full table of the training results, see Appendix E.2. The same measures taken in the application exercise 1 for airlines following only one route or empty sector apply here. In Table 3.7, it is observed that the model is able to fit the probability vector of several types of airline, each one considering a different set of routes. Airlines with higher number of routes (e.g., AFR and THY) show higher error. The worst training score results from Segment 23, which cannot model correctly the share of routes 3 and 5 due to their similar input variables (see 0) and the higher share of Route 5 despite its higher congestion. Therefore, the model cannot fit the difference between choosing one or the other because of the restrictions to the model internal variables to avoid counter-intuitive behaviours, e.g., positive effect of higher congestion. Moreover, the optimisation algorithm failed in this case to find the best fit to this segment (constant probability 0.5 to Route 3 and 5), leading to the high error. Segment No of flights Airline 0 65 THY Avg. arrival time 9.4 Routes considered Actual probability vector 0, 1, 2, 4, 6 0.08, 0.25, 0.28, 0.0, 0.26, 0.05, 0.09 Norm of error 0.02 6 66 THY 15.6 0, 1, 2, 3, 4, 5, 6 0.12, 0.15, 0.33, 0.06, 0.15, 0.11, 0.08 0.08 10 52 PGT 16.3 1, 2, 3, 6 0.0, 0.08, 0.31, 0.38, 0.0, 0.0, 0.23 0.02 20 23 40 AFR 20.1 0, 2, 3, 4 0.42, 0.0, 0.13, 0.33, 0.1, 0.0, 0.03 0.18 29 MNB 22.7 3, 5 0.0, 0.0, 0.0, 0.28, 0.0, 0.69, 0.03 0.84 Table 3.7. Results of training of application exercise 3. 3.2.2. Results of validation The results of the validation of the models trained in the application exercise 3 are shown in Table 3.8. Global results Early flights Midday flights Late flights Route 0 Route 1 Route 2 Route 3 Route 4 Route 5 Other Actual 34 32 52 74 41 21 28 Estimation 51.2 31.7 61.3 68 34.3 5.9 29.7 Actual 14 18 35 46 24 10 21 Estimation 22.1 20.2 37.4 36.9 25 5.1 21.3 Actual 7 3 11 10 7 0 6 Estimation 12.5 2.7 11.1 11.8 0 0.7 5.3 Actual 13 11 6 18 10 11 1 Estimation 16.6 8.8 12.9 19.2 9.4 0 3.1 Table 3.8. Results of validation of application exercise 3. Comparison between the actual and the estimated number of flights per route. From the Figure 3g it is observed in general a fair approximation of the actual routes flown. However, some route choices such as routes 5 and 0 provide inaccurate results. The reasons for this divergence are discussed in section 3.2.4. Figure 3g Comparison of results of validation of application exercise 3. 3.2.3. Testing The testing dataset is divided into two as explained in section 2.2.1. 3.2.3.1. Route clustering The clustering algorithm was applied to flights during AIRAC 1501. The resulting routes are shown in Figure 3h. The differences between the new and the old clustered routes are: • • • • Congestion was lower for all routes during AIRAC 1501. Charges were considerably higher during AIRAC 1501 (see Table 3.9), especially those flights over Germany and Hungary, which reduced their rates about a 10% in one year. Also, Bulgaria reduced considerably its rates about a 30%. For instance, Route 0 turned from an average-charges route in 2016 to the most expensive in 2015. Route 6 was not calculated as in training due to the low number of flights. Route 7 on the contrary was considered during this AIRAC. This route was slightly modified from the original as it does not avoid Romania and Bulgaria. Figure 3h Clustered trajectories for AIRAC 1501 of application exercise 3. Cluster Number of flights Average length (NM) Average charges (EUR) Rate of regulated flights 0 21 1271 1305 0.04 1 19 1324 1238 0.05 2 50 1275 1295 0.04 3 80 1274 1260 0.02 4 44 1257 1267 0.04 5 30 1270 1297 0.03 7 48 1292 1249 0.04 Table 3.9. Properties of the clustered routes in testing of application exercise 3. 3.2.3.2. Testing Results The results of the model with the testing dataset are compared with the actual choice of routes and the null model in Figure 3i. Note that the null model does not predict demand of route 7 as it was added to “other” in the training. The results of the model show a good approximation of the actual routes flown, much better than the null model in all segments. Figure 3i Comparison of results of testing of application exercise 3. The Pearson correlation coefficient of the results of both models with actual data is presented in Table 3.10. For all the segments, the trained model gives better correlated results than the null model, whose results are highly uncorrelated. However, the model results are much worse than in case study 1. Correlation Total Early Flights Midday Flights Late Flights Estimation 0.9588 Null model -0.3479 Estimation 0.9360 Null model -0.3756 Estimation 0.6956 Null model -0.3600 Estimation 0.7352 Null model -0.0124 Table 3.10. Comparison of testing results of application exercise 3 with null model. 3.2.4. Discussion The model trained in this exercise provides a fair approximation of the airspace demand of the OD. In this case, the modelling approach included a high number of route options with different lengths, charges and congestion. However, due to the higher complexity of the exercise, the results are notably worse than in previous exercise. This is reasonable as higher number of route options are more difficult to model with a limited set of explanatory variables. The training error is in the order of five per cent. Therefore, it can be stated that the algorithm can fit the route choice of the segments with the given explanatory variables. However, some segments could not be fit and returned a score of almost 1 (e.g., segment 23 in Table 3.7). This error is due to the similarity between the characteristics of the routes considered in the segment (e.g., 3 and 5, see Table 3.9). The constants of the multinomial are bounded to avoid high values thus diminishing over-fitting. Therefore, routes with similar explanatory variables cannot be distinguished and return practically similar probabilities. This fact implies that there may be another factor that explains the different choice probabilities of these similar routes. The results of validation give a measure of the error around 10%. This fact confirms that the model is not perfect. Indeed, some routes provide inaccurate results (e.g., routes 0 and 5 in Table 3.8). This may be improved by including other factors that can affect route choice such as wind, airport configuration, delay at take-off, etc. or selecting a better congestion explanatory variable, as discussed in section 3.1.4. The results of testing give a higher value of error with respect to that of the validation. The same routes with poor results during validation worsen, such as routes 0 and 5. The rest of the routes are also affected by these inaccuracies by being assigned higher or lower number of flights, such as route 4. From these results, it is clear that the training requires a better fit to have acceptable results in testing. The case of route 0 is notable as the model should reduce the number of flights assigned to it due to the higher charges in 2015. Instead, the prediction is higher. This error is produced by the segments of THY. The reason is that the model considers in 2016 other routes with similar length, higher charges and a higher probability (e.g., route 2 and 6). The model fits this behaviour by becoming indifferent to charges, thus not increasing the share of Route 0 when charges decrease. The solution again is to provide more and better explanatory variables of the other factors (e.g., congestion). As a summary, the results of application exercise 3 show an imperfect approximation of route choices that could be improved by providing new explanatory inputs or improving the ones selected, such as the congestion variable. A decision tree regressor model was also studied for this OD, resulting in very poor results (see application exercise 4 of the supplementary material). 3.3. Application exercise 6: Decision Tree Regression of Flights from Amsterdam to Milan The application exercise 6 studied the flights departing from Schiphol airport (EHAM) to Milan airports, namely Malpensa (LIMC), Orio al Serio (LIME), and Linate (LIML). 3.3.1. Results of training The amount of flights in the training dataset summed 950 flights of 11 airlines the amount of flights summed 950 flights of 11 different airlines, namely AirBrideCargo (ABW), Alitalia (AZA), Cargolux (CLX), Corendon Dutch Airlines (CND), Etihad (ETD), EasyJet (EZY), Atlas Air (GTI), KLM, Nippon Cargo Airlines (NCA), Emirates (UAE) and Vueling (VLG). 3.3.1.1. Route clustering The clustering algorithm calculated four main route choices, as shown in Figure 3j. The different clustered routes were: Cluster 0: Route through Switzerland (LS), avoiding Belgium (EB) and France (LF). Cluster 1: Shortest route through France (see Table 3.11). Cluster 2: Longest route avoiding Switzerland and France. Cluster 3: Slightly deviated route avoiding Belgium. From the routes calculated, only the first two were considered as the rest had less than 30 flights out of 950. The model only took into account those two and the “other” option. Figure 3j Left: clustered trajectories. Right: assigned cluster to actual trajectories in the training dataset of application exercise 6. Cluster Number of flights 575 Average length (NM) 493 Average charges (EUR) 719 Mean regulated flights 0.05 0 1 290 465 623 0.05 2 26 549 752 0.03 3 19 475 699 0.1 Table 3.11. Properties of the clustered routes in training of application exercise 6. The colour code is the same as in Figure 3b. 3.3.1.2. Segmentation A full segmentation was applied to airlines with available financial information, whilst the rest were grouped together (ABW, CLX, CND, GTI and NCA), thus creating 7 classes for the 11 different airlines. The arrival time was classified automatically into 4 classes: Class 0: Flights arriving from 4:00 to 11:40. Class 1: Flights arriving from 11:40 to 15:50. Class 2: Flights arriving from 15:50 to 19:40. Class 3: Flights arriving from 19:40 to 4:00. Therefore, the segmentation created 28 segments resulting from the combinations of airline segments and arrival times. A multinomial regression model was trained for each segment. 3.3.1.3. Route Modelling The results of the model trained for the most relevant segments in the application exercise 6 are shown in Table 3.12. For a full table of the training results, see Appendix E.3. The same measures followed in previous exercises for segments with no flights or airlines flying a single route were applied here. In Table 3.12, it is observed that the model is able to fit the probability vector of several types of airline, each one considering a different set of routes with very low training score (below 0.05 for all segments). This means that the route choice can be explained with the selected variables and that the model is simple as it decides only between 3 options. Segment Number of flights Airline 0 32 KLM Average arrival time 17.6 0, 1, 2 Actual probability vector 0.63, 0.25, 0.13 Norm of error 0.02 1 68 EZY 18.2 0, 1 0.62, 0.37, 0.01 0.02 3 15 GTI, CLX, ABW 17.7 0 - - 4 20 VLG 18.8 0, 1, 2 0.35, 0.35, 0.3 0 Routes considered Table 3.12. Results of training of application exercise 6. 3.3.2. Results of validation The results of the validation of the models trained in the application exercise 6 are shown in Table 3.13. Global results Early flights Midday flights Late flights Route 0 Route 1 Other Actual 297 148 41 Estimation 299.3 153.4 29.3 Actual 167 60 6 Estimation 154.9 70.9 7.1 Actual 75 41 22 Estimation 91.7 40.5 5.8 Actual 55 47 13 Estimation 52.6 42 20.5 Table 3.13. Results of validation of application exercise 6. A precise approximation of the actual routes flown can be observed in Figure 3k. The segment with worse results is that of midday flights. This is mainly due to segment 3 (see Table 3.12) that considers only one route but in the validation dataset has 8 flights assigned to the “other” cluster. This fact could be improved by providing more data or retraining the algorithm. Figure 3k Comparison of results of validation of application exercise 6. 3.3.3. Testing The testing dataset is divided into two as explained in section 2.2.1. 3.3.3.1. Route clustering The clustering algorithm was applied to flights during AIRAC 1501. The resulting routes are shown in Figure 3l. The differences between the new and the old clustered routes are: • • • • All clusters had similar trajectories with respect to AIRACs 1601-1603. Route charges were updated. Charges in year 2015 were higher for all routes (see Table 3.14). Congestion was updated, resulting in a negligible number of regulated flights in 2015. In this case, cluster 3 was not ignored as it was more often used during AIRAC 1501. Therefore, clusters 0, 1, 3 and “other” were considered as options. • The considered cluster routes by each segment were updated. Cluster Number of flights Average length (NM) Average charges (EUR) Mean regulated flights 0 153 490 765 0 1 86 461 652 0.01 2 4 536 778 0 3 17 474 721 0 Table 3.14. Properties of the clustered routes in testing of application exercise 6. Figure 3l Clustered trajectories in testing of application exercise 6. 3.3.3.2. Testing Results The results of the model with the testing dataset are compared with the actual choice of routes and the null model in Figure 3m. The results of the model show a good approximation of the actual routes flown but similar to that of the null model. The main difference is the consideration of Route 3 by the model, which in the null model is considered “other”. Including Route 3 in “other”, the null model, one could argue that the null model provides better results than the decision tree regressor. Figure 3m Comparison of results of testing of application exercise 6. The Pearson correlation coefficient of the results of both models with actual data is presented in Table 3.15. In this case both models provide similar, highly correlated results. Correlation coefficient Total Early Flights Midday Flights Late Flights Estimation 0.9917 Null model 0.9830 Estimation 0.9962 Null model 0.9994 Estimation 0.8989 Null model 0.9165 Estimation 0.9325 Null model 0.9265 Table 3.15. Comparison of testing results of application exercise 6 with null model. 3.3.4. Discussion For this exercise, as in previous ones, both a multinomial regression and a decision tree model were trained. However, the decision tree regression model proved to be more accurate in this case. The reason for this is that the multinomial model (see application exercise 5 in the supplementary material) overestimates heavily flights assigned to route 3, which is considered as an available option in the testing dataset. The multinomial model treats the new route as equal to the others, obviating that it may be restricted, e.g., due to military reasons (see additional documentation for more information on this). In order to overcome this problem, the model could be improved by incorporating route availability explanatory variables. The lower variability of flight choices and charges with respect to other exercises made the decision tree predictions to replicate better route choices in a different AIRAC cycle. However, these choices can be also replicated with the null model as the demand did not change substantially between the training and testing datasets. As a summary, the model cannot explain the rationale between using one route or another when this is linked to the availability of the route and not to economic worthiness or congestion. Future developments of the model could include route availability as an explanatory factor, especially military airspace availability. 4. Conclusions Two machine learning techniques were trained in the presented work: multinomial regression and decision tree regression. The best performance for two (Canary IslandsLondon and Istanbul-Paris) of the three OD pairs studied was obtained with the multinomial regression technique and one (Amsterdam-Milan) was best modelled by the regression tree technique. However, for this last pair, the performance obtained by the decision tree model in exercise 6 (in section 3.3) is almost equal to that of the null model (defined in the Appendix B). This means that the out performance of the decision tree over the multinomial regression model is mainly due to the inability of the latter to fit that particular problem. In fact, we showed that the models lacked of an explanatory variable of the availability of each route choice, which was critical for the prediction. As a conclusion, it can be stated that multinomial regression is a better approach to route choice modelling, as long as all the critical factors are included in the explanatory variables. It is important to highlight that for the exercises with highest correlation between predictions and actual choices (i.e., exercises 1 and 6) the null model achieved almost the same performance. Therefore, if route choices are not highly variable (e.g., because charges and congestion remain the same between two seasons) the null model is a viable option for route choice prediction. However, for the cases when route choices vary significantly from a season to another, as in exercise 3, the approach presented here offers a more powerful tool to predict the new traffic flows tendencies. Further research should focus on: i) incorporating more significant metrics to the model such as wind and availability of routes, ii) apply the method to a wider scale with generalisation capability, iii) combine this data driven-approach with model-based algorithms to improve results, and iv) aggregate traffic predictions into occupancy of airspace sectors at a finer-granularity scale. These aspects are discussed hereafter. In the current approach, an important factor was missing: the influence of wind. During the study, the variable “average distance flown with respect to the air” was explored to substitute the “average ground distance flown” of each route cluster but it did not improve results. A further approach would be to compute flight by flight the expected wind influence (from forecasts at the departing time) to each of the considered routes. The presented approach is fully data-driven regarding trajectories. This means that actual airspace design is not explicitly taken into account but implicitly from usual routes flown. This approach is correct when the airspace structure is stable. However, some elements of the airspace are not, such as military areas. An improvement would be to only consider the routes that can be flown at the time the flight departs to avoid assigning flights to a route that is closed, for instance because of military exercises. Regarding the metrics used, the selected congestion variable (average rate of regulated flights) has proven to lead sometimes to misleading results. For instance, deviated routes from the shortest path use to have high values of this variable although they are actually less congested, see for example routes 3 and 4 of Table 3.1. Hence, a better metric of congestion could tackle this problem. The predictive power could be enhanced by inputting enhanced datasets. In the current approach, the algorithm uses a dataset of flights of only one season to train the model. An improvement would be to train with a wider set of flights (including several seasons) to refine the predictions across seasons. Moreover, the models could be designed to be updated continuously to provide better estimations by accounting for the last events. The presented data-driven approach can be also improved by combining it with optimisation models. The reason for this is that airline decisions regarding route choice are usually driven by a cost optimisation process. The overall cost of a particular flight depends highly on the cost of delay of that flight (Cook and Tanner, 2011). Data-driven approaches could be combined with model-based models to approximate flight variables such as the cost of delay or fuel consumption to then perform a cost optimisation to choose the most profitable route. A prospective application of the proposed modelling approach is the aggregation of route predictions into traffic demand volumes in order to predict the appearance of hotspots. To do so, the current approach should be applied to all OD pairs for which one or more possible routes cross the hotspot. Then, predictions should be aggregated in a probabilistic manner to obtain the predicted traffic volume in the given hotspot. This application would be of great use for demand-capacity balancing and planning during pre-tactical planning phase. On a more strategic level, the modelling approach developed in this paper could also be used to investigate questions related to the interrelationship between ATM Key Performance Areas, e.g. the trade-offs between environment (flight efficiency), capacity (delay) and cost-efficiency. To sum up, the presented models have a potential for traffic prediction during the pretactical planning phase, when no flight plan is available to know which route the airline will choose. This represents a step forward in enhancing ATFCM by the provision of better estimations of traffic evolution. However, the current approach requires of further development and enhancement to produce more reliable traffic forecasts in terms of trajectory granularity, generalisation of the algorithm and prediction accuracy. 5. Acknowledgments The work leading to this paper has been conducted in the frame of the INTUIT project. The INTUIT project has received funding from the SESAR Joint Undertaking under grant agreement No 699303 under European Union’s Horizon 2020 research and innovation programme. This paper reflects only the authors’ view. The SESAR Joint Undertaking is not responsible for any use that may be made of the information it contains. The authors would like to thank the INTUIT project team, as well as the members of the INTUIT Advisory Board, for their valuable inputs. We would also like to thank the SESAR Joint Undertaking Project Officer, Ivan de Burchgraeve, for his continuous and timely support throughout the project. 6. References Byrd, R.H., Lu, P., Nocedal, J., Ciyou, Z., 1995. A Limited Memory Algorithm for Bound Constrained Optimization. SIAM J. Sci. Stat. Comput. 16, 1190–1208. doi:https://doi.org/10.1137/0916069 Cook, A.J., Tanner, G., 2011. European airline delay cost reference values 86. doi:01112277-C CRCO, 2017a. Monthly Adjusted Unit Rates [WWW Document]. URL http://www.eurocontrol.int/services/monthly-adjusted-unit-rates (accessed 8.11.17). CRCO, 2017b. Customer Guide to Charges. CRCO, 2013. Principles for Establishing the Cost-Base for En Route Charges and the Calculation of Unit Rates. Delgado, L., 2015. European route choice determinants. 11th USA/Europe Air Traffic Manag. Res. Dev. Semin. 23–26. EUROCONTROL, 2017a. PREDICT [WWW Document]. URL www.eurocontrol.int/articles/ddr-pre-tactical-traffic-forecast (accessed 8.11.17). EUROCONTROL, 2017b. Demand Data Repository (DDR) [WWW Document]. URL http://www.eurocontrol.int/ddr (accessed 8.11.17). EUROCONTROL Experimental Centre, 2008. Impact of ATFM Regulations on Predictability Improvement. Hong, S., Lee, K., 2015. Trajectory Prediction for Vectored Area Navigation Arrivals. J. Aerosp. Inf. Syst. doi:http://dx.doi.org/10.2514/1.I010245 Jetzki, M., 2009. The propagation of air transport delays in Europe Thesis. Jones, E., Oliphant, E., Peterson, P., 2001. SciPy: Open Source Scientific Tools for Python [WWW Document]. URL http://www.scipy.org/ Network Manager, 2017. ATFCM Operations Manual. Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., Vanderplas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M., Duchesnay, É., 2011. Scikit-learn: Machine Learning in Python. JMLR 12, 2825–2830. Rousseeuw, P.J., 1987. Silhouettes : a graphical aid to the interpretation and validation of cluster analysis 20, 53–65. doi:https://doi.org/10.1016/0377-0427(87)90125-7 Starkweather, J., Moske, A.K., 2005. Multinomial Logistic Regression [WWW Document]. it.unt.edu. URL http://it.unt.edu/sites/default/files/mlr_jds_aug2011.pdf (accessed 8.3.17). Tastambekov, K., Puechmorel, S., Delahaye, D., Rabut, C., 2014. Aircraft trajectory forecasting using local functional regression in Sobolev space. Transp. Res. PART C 39, 1–22. doi:10.1016/j.trc.2013.11.013 7. Glossary Please supply, as a separate list, the definitions of field-specific terms used in your article. 7.1. Acronyms ACRONYM AIRAC ANSP ATFCM ATM CASK CRCO DBC DDR ECAC KPA KPI L-BFGS-B NM SES SESAR DEFINITION Aeronautical Information Regulation And Control Air Navigation Service Provider Air Traffic Flow and Capacity Management Air Traffic Management Cost per Available Seat-Kilometre Central Route Charges Office Density-Based Clustering Demand Data Repository European Civil Aviation Conference Key Performance Area Key Performance Indicator Limited-memory Broyden-Fletcher-Goldfarb-Shanno Bound-constrained Nautical Miles Single European Sky Single European Sky ATM Research 7.2. Concepts AIRAC cycle. ATM plans are organised on a 28-day basis. Each of these periods is called an AIRAC cycle. The numbering algorithm consists in two numbers indicating the year followed by two digits indicating the AIRAC cycle inside the year. Note that the first days of the year are usually inside the 13th AIRAC cycle from the previous year. The first AIRAC cycle of the year starts just after the 13th (or 12th) AIRAC of the previous year. Charging zone. ANSPs collect charges from the flights using their airspace. The airspace is divided into charging zones, usually coinciding with country boundaries, each assigned to one ANSP that collects charges to finance its activities. The algorithm to calculate the charges applied to a flight in the ECAC area is described in Appendix A. ECAC area. It consists of the airspace of the 28 European Union states plus 16 other states in Europe, Africa and Central Asia. These countries have adopted harmonised policies and practices regarding aviation, such as the common charging system resulting in the CRCO. More information can be found in: https://www.ecac-ceac.org/ Regulation. One of the tasks of ATFCM is to adjust demand with available capacity. Regulations are a tool used for this purpose are. When airspace is congested or the capacity of airspace is reduced, e.g. during controller strikes, flights may receive a slot message. This message contains a calculated take-off time to which the flight shall adhere, together with information concerning the reason for being regulated. Appendix A Navigation Charges Calculation The charges paid to one ANSP of a state overflown for the navigation service in the ECAC area are calculated according to the formula (CRCO, 2017b): 𝐶 = 𝑈𝑅 · 𝐷𝐹 · 𝑊𝐹 Where 𝐶 is the total, 𝑈𝑅 is the unit rate, 𝐷𝐹 is the distance factor, and 𝑊𝐹 is the weight factor. The unit rate of charge is the charge in euro applied by a charging zone to a flight operated by an aircraft of 50 metric tonnes (weight factor of 1.00) and for a distance factor of 1.00. They are published by the CRCO. The distance factor by charging zone is obtained by dividing, by one hundred (100), the number of kilometres in the great circle distance, i.e. the shortest distance between two points on a sphere, between the aerodrome of departure (or entry point of the charging zone) and the aerodrome of arrival (or exit point of the charging zone). The weight factor is determined by dividing, by fifty, the Maximum Take-Off Weight (MTOW) of the aircraft (in metric tonnes) and subsequently taking the square root of the result: 𝑊𝐹 = √𝑀𝑇𝑂𝑊/50 Note that a typical aircraft (e.g., a A320 with 80 tons of MTOW) has a weight factor around 1.3. Appendix B Null Model Description The null model consists of a simple model to be compared with the presented modelling approach. In this model, the probability of a route option is obtained as the proportion of the flights that took that route in the training dataset. The predicted number of flights assigned to a route is the probability multiplied by the number of flights. To obtain the prediction for early, midday and late flights, the same approach is followed for only the flights considered in that group. Appendix C Multinomial Logistic Regression Model The multinomial logistic regression is a multi-criteria discrete choice modeller It adjusts the probability of a certain choice by calculating the exponents of the multinomial logistic function: 𝑃𝑖 = exp(𝐴𝑖 ) 1 + ∑𝑛𝑗=1 exp(𝐴𝑗 ) where 𝐴𝑖 stands for the exponent of the 𝑖 𝑡ℎ option and 𝑃𝑖 is the probability of the 𝑖 𝑡ℎ option. 𝑛 stands for the number of options. Note that there is an option 0 whose exponent (𝐴0 ) is 0 to ensure that the sum of probabilities is equal to 1. In the current work, option 0 is the “other” option. In the multinomial regression, the exponents are calculated as the sum of the explanatory variables multiplied by certain constants: 𝑚 𝐴𝑖 = ∑ 𝛽𝑘 𝑥𝑖𝑘 𝑘=1 𝑡ℎ where 𝑥𝑖𝑘 is the 𝑘 explanatory variable of the 𝑖 𝑡ℎ option and 𝛽𝑘 is the 𝑘 𝑡ℎ constant of the model. 𝑚 stands for the number of explanatory variables. The 𝛽𝑘 constants are calculated to maximise the statistical likelihood of the probability function in a flight segment. The likelihood equation of a segment is defined as: ̅𝑖 = 𝐿𝑖 = 𝑃𝑖 − 𝑃 exp(𝐴𝑖 ) ̅𝑖 −𝑃 1 + ∑𝑛𝑗=1 exp(𝐴𝑗 ) ̅𝑖 is the actual probability of the 𝑖 𝑡ℎ option and 𝐿𝑖 is the likelihood function of the where 𝑃 ̅𝑖 is calculated by dividing the number of flights choosing the 𝑖 𝑡ℎ option in the segment. 𝑃 𝑖 𝑡ℎ option by the total number of flights in a segment for a given dataset. The likelihood is maximised when the actual probability equals the calculated probability of each option in the segment (𝐿𝑖 = 0 ∀ i ∈ [1, n]). The beta constants are calculated with the function minimize from the public library SciPy (Jones et al., 2001). The function to minimise is the norm of the likelihood functions of all the options. The actual probabilities are calculated with the training dataset (see section 2.2.5.3). The method used for the minimisation is the L-BFGS-B (Byrd et al., 1995). The constants are constrained between 0 and -10 to avoid counter-intuitive behaviour and overfitting. Appendix D Decision Tree Regressor Model The decision tree regressor consists of a concatenation of binary classifiers that choose one option from a series of options. The output of the model is chosen by classifying the inputs several times with a binary linear algorithm. The number of concatenated binary classifications (levels) is known as the depth of the decision tree. On each level, the input is classified with the function: 𝐴𝑖 − 𝑇 where 𝐴𝑖 is the variable term, dependent on the explanatory variables and 𝑇 is the threshold. The output of the classification depends on whether the function is higher or lower than 0. The variable term is calculated as in (A.6). This method is faster than other algorithms, it can be visualised and its outputs explained. On the other hand, decision trees are prone to overfitting when high depth trees are allowed. They might also present instability, i.e., small changes in the input might cause high variations in the outputs, particularly with low depth trees. The model was implemented using the Python public library scikit-learn (Pedregosa et al., 2011), with the function DecisionTreeClassifier. The parameter of depth was chosen with a grid search method (function GridSearchCV) using a k-fold (function KFold) and evaluating the score with cross-validation (function cross_val_score). The model with best cross-validation score was chosen. The maximum depth was set to 5 layers, ensuring low instability and low overfitting. Appendix E Training Results E.1 Training Results of Application exercise 1: Multinomial Regression of Flights from Canary Islands to London Segment Number of flights Airline 0 60 EZY Average arrival time 23.4 1 22 RYR 2 26 3 Routes considered Actual probability vector Norm of error 0, 1 0.72, 0.25, 0.0, 0.03 0 23.9 0, 1 0.77, 0.23, 0.0, 0.0 0 MON 23.3 0, 1, 3 0.5, 0.42, 0.0, 0.08 0 0 - - - - - 4 13 BAW 23.8 0, 2 0.54, 0.0, 0.46, 0.0 0 5 32 TOM 24.6 0 - - 6 15 TCX 24.5 0, 2 0.8, 0.0, 0.2, 0.0 0 7 6 IBK 25.3 1, 3 0.0, 0.67, 0.0, 0.33 0 8 64 EZY 17.2 0, 1 0.72, 0.28, 0.0, 0.0 0 9 7 RYR 17.5 0, 1 0.86, 0.14, 0.0, 0.0 0 10 13 MON 18.5 0, 1 0.38, 0.62, 0.0, 0.0 0 11 34 IBS 18.2 0, 1, 3 0.85, 0.09, 0.0, 0.06 0.01 12 33 BAW 18.3 0, 1, 2, 3 0.48, 0.09, 0.36, 0.06 0 13 42 TOM 18 0 - - 14 10 TCX 18.5 0, 2 0.5, 0.0, 0.5, 0.0 0 15 7 IBK 17.2 0, 1 0.43, 0.57, 0.0, 0.0 0 16 2 EZY 19.5 0, 3 0.5, 0.0, 0.0, 0.5 0 17 2 RYR 21.3 0 - - 18 22 MON 21.1 0, 1 0.55, 0.41, 0.0, 0.05 0 19 5 IBS 19.7 0 - - 20 8 BAW 19.7 0, 1, 2 0.5, 0.25, 0.25, 0.0 0 21 55 TOM 20.3 0, 3 0.91, 0.0, 0.02, 0.07 0.01 22 25 TCX 20 0, 2, 3 0.2, 0.04, 0.64, 0.12 0.02 23 1 IBK 20.1 0 - - 24 31 EZY 16.5 0, 1 0.94, 0.06, 0.0, 0.0 0.05 25 87 RYR 15.8 0, 1 0.56, 0.44, 0.0, 0.0 0 26 27 MON 15.6 0, 1 0.52, 0.48, 0.0, 0.0 0 27 20 IBS 14.9 0, 1, 3 0.65, 0.25, 0.0, 0.1 0 28 8 BAW 16.3 0, 1, 2 0.5, 0.13, 0.38, 0.0 0 29 3 TOM 12.4 0, 3 0.67, 0.0, 0.0, 0.33 0 30 0 - - - - - 31 32 IBK 15.4 0, 1 0.28, 0.69, 0.0, 0.03 0 Table 7.1. Results of training of application exercise 1. E.2 Training Results of Application exercise 3: Multinomial Regression of Flights from Istanbul to Paris Segment No of flights Airline 0 65 THY Avg. arrival time 9.4 Routes considered Actual probability vector 0, 1, 2, 4, 6 0.08, 0.25, 0.28, 0.0, 0.26, 0.05, 0.09 Norm of error 0.02 1 0 - - - - - 2 52 AFR 8 0, 2, 3, 4 0.38, 0.02, 0.27, 0.21, 0.1, 0.0, 0.02 0.02 3 0 - - - - - 4 0 - - - - - 5 0 - - - - - 6 66 THY 15.6 0, 1, 2, 3, 4, 5, 6 0.12, 0.15, 0.33, 0.06, 0.15, 0.11, 0.08 0.08 7 0 - - - - - 8 35 AFR 17.2 0, 2, 3, 4 0.46, 0.03, 0.2, 0.11, 0.17, 0.0, 0.03 0.04 9 0 - - - - - 10 52 PGT 16.3 1, 2, 3, 6 0.0, 0.08, 0.31, 0.38, 0.0, 0.0, 0.23 0.02 11 5 MNB 17.8 3, 5 0.0, 0.0, 0.0, 0.8, 0.0, 0.2, 0.0 0 12 93 THY 12 0, 1, 2, 4, 5, 6 0.08, 0.14, 0.31, 0.04, 0.15, 0.08, 0.2 0.05 13 64 OHY 13 3 - - 14 0 - - - - - 15 51 KKK 11.8 0, 3, 4, 6 0.22, 0.0, 0.0, 0.12, 0.45, 0.0, 0.22 0 16 53 PGT 12.5 1, 2, 3, 6 0.02, 0.11, 0.36, 0.38, 0.02, 0.0, 0.11 0.02 17 0 - - - - - 18 46 THY 20.9 0, 1, 2, 4, 6 0.09, 0.37, 0.15, 0.02, 0.26, 0.02, 0.09 0.02 19 0 - - - - - 20 40 AFR 20.1 0, 2, 3, 4 0.42, 0.0, 0.13, 0.33, 0.1, 0.0, 0.03 0.18 21 0 - - - - - 22 0 - - - - - 23 29 MNB 22.7 3, 5 0.0, 0.0, 0.0, 0.28, 0.0, 0.69, 0.03 0.84 Table 7.2. Results of training of application exercise 3. E.3 Training Results of Application exercise 6: Decision Tree Regression of Flights from Amsterdam to Milan Segment Number of flights Airline 0 32 KLM Average arrival time 17.6 0, 1, 2 Actual probability vector 0.63, 0.25, 0.13 Norm of error 0.02 1 68 EZY 18.2 0, 1 0.62, 0.37, 0.01 0.02 2 0 - - - - - 3 15 GTI, CLX, ABW 17.7 0 - - 4 20 VLG 18.8 0, 1, 2 0.35, 0.35, 0.3 0 5 0 - - - - - 6 0 - - - - - 7 89 KLM 10.2 0, 1 0.74, 0.21, 0.04 0.01 8 40 EZY 9.9 0, 1 0.68, 0.33, 0.0 0.01 Routes considered Segment Number of flights Airline 9 1 AZA Average arrival time 11.6 0 Actual probability vector - Norm of error - 10 14 NCA, ABW 7.8 0, 1, 2 0.5, 0.43, 0.07 0.01 11 0 12 3 - - - - - ETD 9.9 1 - - 13 3 UAE 9.5 0 - - 14 32 KLM 21.6 0, 1, 2 0.47, 0.34, 0.19 0.01 15 27 EZY 21.6 0, 1, 2 0.41, 0.52, 0.07 0.02 16 40 AZA 20.7 0, 1, 2 0.57, 0.38, 0.05 0.01 17 9 GTI, CND, ABW 22.2 0, 1, 2 0.11, 0.11, 0.78 0 18 0 - - - - - 19 0 - - - - - 20 0 - - - - - 21 1 KLM 12.1 1 - - 22 26 EZY 14.4 0, 1 0.77, 0.23, 0.0 0.01 23 29 AZA 12.8 0, 1 0.66, 0.34, 0.0 0.01 24 2 NCA, ABW 14.8 0 - - 25 1 VLG 14.3 1 - - 26 0 - - - - - 27 0 - - - - - Routes considered Table 7.3. Results of training of application exercise 6. Additional Documentation In this section, we present three application exercises, namely: • • • Application Exercise 2: Decision Tree of Flights from Canary Islands to London, Application Exercise 4: Decision Tree of Flights from Istanbul to Paris, and Application Exercise 5: Multinomial Regression of Flights from Amsterdam to Milan. These consist of the approaches with worse results. Each application exercise includes the results of the approach together with a discussion of the issues detected. 1. Application Exercise 2: Decision Tree of Flights from Canary Islands to London The application exercise 2 studied the flights departing from some of the Canary Islands airports, namely Tenerife North (GCXO), Tenerife South (GCTS) and Las Palmas (GCLP); to London airports, namely Stansted (EGSS), Gatwick (EGKK), Heathrow (EGGW) and Luton (EGLL) by training a decision tree model. 1.1. Results of training The amount of flights in the training dataset summed 1009 flights of 8 different airlines, namely British Airways (BAW), EasyJet (EZY), Iberia Express (IBS), Iberia (IBK), Monarch (MON), Ryanair (RYR), Thomson Airways (TOM) and Thomas Cook (TCX). 1.1.1. Route Modelling The algorithm used the same route choices and segmentation as in application exercise 1. The results of the different models trained in the application exercise 2 are shown in Table 1.1. The results show in general a good fit of the probability vectors, except for one segment (EZY flights arriving around 16 hours). The probability vector in Table 1.1 is the ordered concatenation of the actual share of each route. The norm of error is the norm of the vector of the error in the computed probabilities. Where, the error per route is calculated as the difference between its actual share of flights and the modelled one. The score is a measure of the expected error for that segment. Thus, an error of zero denotes a perfect fit of the probability vector with the training dataset. Note that the possible routes to be considered by each segment, those with a flight share higher than 5% in the training set, are obtained prior to the model training. For those airlines following only one route, the multinomial regression model cannot be trained and hence a simple model assigning a constant single route is set. Moreover, some segments do not have any flights because the airline does not fly at those hours, in these cases a simple model assigning an evenly divided probability to all routes (including the “other” option) is set for that segment. Segment Number of flights Airline Average arrival time Routes considered Actual vector probability Norm of error 0 28 MON 23.1 0, 1, 3 0.46, 0.46, 0.0, 0.07 0 1 22 RYR 23.9 0, 1 0.77, 0.23, 0.0, 0.0 0.01 2 59 EZY 23.4 0, 1, 3 0.68, 0.25, 0.0, 0.07 0 Segment Number of flights Airline Average arrival time Routes considered Actual vector probability Norm of error 3 9 IBK 25.6 0, 1, 3 0.11, 0.78, 0.0, 0.11 0.01 4 9 BAW 24 0, 2 0.67, 0.0, 0.33, 0.0 0.01 5 31 TOM 24.5 0 - - 6 0 - - - - - 7 15 TCX 24.4 0, 2 0.8, 0.0, 0.2, 0.0 0.01 8 28 MON 15.6 0, 1, 3 0.57, 0.32, 0.0, 0.11 0 9 84 RYR 15.8 0, 1 0.54, 0.46, 0.0, 0.0 0 10 38 EZY 16.6 0, 1 0.87, 0.13, 0.0, 0.0 0.53 11 31 IBK 15.4 0, 1 0.39, 0.58, 0.0, 0.03 0.01 12 12 BAW 16.4 0, 1, 2 0.42, 0.08, 0.5, 0.0 0.01 13 2 TOM 11.5 0 - - 14 21 IBS 15 0, 1, 3 0.57, 0.33, 0.0, 0.1 0 15 0 - - - - - 16 17 MON 20.9 0, 1 0.53, 0.47, 0.0, 0.0 0 17 3 RYR 20.7 0, 1 0.67, 0.33, 0.0, 0.0 0 18 1 EZY 19.6 0 - - 19 0 - - - - - 20 10 BAW 19.9 0, 1, 2, 3 0.7, 0.1, 0.1, 0.1 0.01 21 54 TOM 20.3 0 - - 22 8 IBS 19.6 0 - - 23 26 TCX 20.1 0, 2, 3 0.19, 0.0, 0.69, 0.12 0 24 12 MON 18.5 0, 1 0.58, 0.42, 0.0, 0.0 0 25 7 RYR 17.5 0, 1 0.86, 0.14, 0.0, 0.0 0.01 26 62 EZY 17.3 0, 1 0.68, 0.31, 0.0, 0.02 0 27 7 IBK 17.5 0, 1 0.71, 0.29, 0.0, 0.0 0.01 28 32 BAW 18.4 0, 1, 2, 3 0.47, 0.16, 0.31, 0.06 0.01 29 43 TOM 18.1 0 - - 30 35 IBS 18.1 0, 1, 3 0.89, 0.06, 0.0, 0.06 0 31 13 TCX 18.7 0, 2, 3 0.23, 0.0, 0.69, 0.08 0 Table 1.1. Results of route modelling of application exercise 2 1.2. Results of validation The results of the validation of the models trained in the application exercise 2 are shown in Table 1.2. Global results Early flights Midday flights Late flights Route 0 Route 1 Route 2 Other Actual 187 72 17 12 Estimation 187.7 73.3 15.6 11.4 Actual 36 31 0 1 Estimation 35.5 30.1 0 2.4 Actual 97 23 13 8 Estimation 96.5 25.7 13 5.6 Actual 54 18 4 3 Estimation 55.5 17.6 2.6 3.2 Table 1.2. Results of validation of application exercise 2 A visual comparison between the predicted and actual number of flights in each route in the validation dataset is shown in Figure 1a. The results show low error, even lower than in application exercise 1. Figure 1a Comparison of results of validation of application exercise 2 1.3. Testing The testing dataset was divided into two as explained in application exercise 1. The route clustering and flight segmentation used were the same as in application exercise 1. The results of the model with the testing dataset are compared with the actual choice of routes and the null model results in Figure 1b. Note that the null model assigns flights to route 2, which is not considered in the testing dataset and thus included in “other”. The results of the model show a poor approximation of the actual routes flown, worse than the null model. Figure 1b Comparison of results of testing of application exercise 2 The Pearson correlation coefficient of the results of both models with actual data is presented in Table 1.3. Note that the correlation of the null model is not equal to the result in application exercise 1, this is because the training dataset is selected randomly. Except for early flights, the trained model gives worse correlated results than the null model, resulting in a globally poor estimation. Correlation Total Early Flights Midday Flights Late Flights Estimation 0.5472 Null model 0.9971 Estimation 0.9972 Null model 0.9890 Estimation 0.3378 Null model 0.9930 Estimation 0.3816 Null model 0.9946 Table 1.3. Results of testing of application exercise 2 1.4. Discussion The decision tree models trained in this case provide an inaccurate approximation of the expected airspace demand between these airport pairs. The error can be attributed essentially to overfitting. The training of the algorithm requires high-complexity decision trees to obtain fair results with the validation dataset. The models usually consist of a decision tree using two features and four levels to model the behaviour of one segment. When applying the same models to the testing dataset, with much different inputs, the model provides quasiconstant results of probabilities, i.e., the flights were divided equally between the routes considered or were mostly assigned to “other” route. Overfitting could be reduced by training the model with data from different years with different route choices and charges, which is out of the scope of the application exercise. Overfitting is especially important when model inputs are too different from the training dataset. The most important different is that the number of routes considered was reduced in the testing dataset. In addition, route congestion increased dramatically from 2015 to 2016 from average values between 2% to 4% of flights being regulated to about 15% of flights regulated. On the other side, the rest of explanatory variables, i.e. route length and charges, remained almost constant. Because the model was trained with high congestion values, it was not able to provide correct results with too distant values. As a summary, the results of application exercise 2 show a poor approximation of route choices. The studied approach showed that it could not fit actual behaviour of airlines, at least with the actual model and training datasets. 2. Application Exercise 4: Decision Tree of Flights from Istanbul to Paris The application exercise 4 studied the flights departing from the Istanbul airports, namely Atatürk (LTBA) and Sabiha Gökçen (LTFJ); to Paris airports, namely Charles de Gaulle (LFPG) and Orly (LFPO) by training a decision tree model. 2.1. Results of training The amount of flights in the training dataset summed 950 flights and 6 different airlines: Air France (AFR), AtlasJet (KKK), MNG Airlines (MNB), Onur Air (OHY), Pegasus (PGT) and Turkish Airlines (THY). Route Modelling The algorithm used the same route choices and segmentation as in application exercise 3. The same measures taken in the application exercise 1 for airlines following only one route or empty sector apply here. The results of the different models trained in the application exercise 4 are shown in Table 2.1. It is notably to mention that the model fits considerably poorer the segments with higher number of route options (see THY and AFR segments). The reason for this could be that decision trees are too simple to model complex route choices. Segment Number of flights Airline Average arrival time Routes considered Actual probability vector Norm of error 0 0 - - - - - 1 52 THY 9.4 0, 1, 2, 4, 5, 6 0.06, 0.27, 0.21, 0.0, 0.27, 0.08, 0.12 0.17 2 50 AFR 8 0, 2, 3, 4 0.36, 0.02, 0.28, 0.24, 0.08, 0.0, 0.02 0.01 3 0 - - - - - 4 0 - - - - - 5 0 - - - - - 6 48 PGT 16.2 1, 2, 3, 6 0.0, 0.17, 0.31, 0.33, 0.0, 0.0, 0.19 0.04 7 73 THY 15.7 0, 1, 2, 4, 5, 6 0.11, 0.19, 0.34, 0.04, 0.11, 0.12, 0.08 0.08 8 32 AFR 17.1 0, 1, 2, 3, 4 0.47, 0.06, 0.16, 0.09, 0.19, 0.0, 0.03 0.31 9 0 - - - - - 10 0 - - - - - 11 5 MNB 17.8 3, 5 0.0, 0.0, 0.0, 0.8, 0.0, 0.2, 0.0 0 12 0 - - - - - 13 63 THY 20.9 0, 1, 2, 4, 6 0.06, 0.33, 0.21, 0.0, 0.27, 0.03, 0.1 0.27 14 45 AFR 20.1 0, 2, 3, 4 0.38, 0.0, 0.16, 0.33, 0.11, 0.0, 0.02 0.03 15 0 - - - - - 16 0 - - - - - 17 32 MNB 22.9 3, 5 0.0, 0.0, 0.0, 0.28, 0.0, 0.69, 0.03 0 18 55 PGT 12.5 1, 2, 3, 6 0.02, 0.13, 0.33, 0.4, 0.02, 0.0, 0.11 0.04 19 95 THY 12 0, 1, 2, 4, 5, 6 0.06, 0.16, 0.31, 0.02, 0.13, 0.11, 0.22 0.08 20 0 - - - - - 21 53 KKK 11.8 0, 3, 4, 6 0.32, 0.0, 0.0, 0.17, 0.36, 0.0, 0.15 0.01 22 52 OHY 13 3 - - Segment Number of flights Airline Average arrival time Routes considered Actual probability vector Norm of error 23 0 - - - - - Table 2.1. Results of route modelling of application exercise 4 2.2. Results of validation The results of the validation of the models trained in the application exercise 4 are shown in Table 2.2. Note that, due to the variability of data, the actual results differ much from those in application exercise 3 as the validation flights are picked up randomly. Global results Early flights Midday flights Late flights Route 0 Route 1 Route 2 Route 3 Route 4 Route 5 Other Actual 50 26 53 73 31 25 37 Estimation 44.2 28.8 63.1 70.4 32.5 20.7 35.4 Actual 24 18 39 50 27 13 26 Estimation 28.6 16.7 44.4 49 23.6 9.7 24.7 Actual 11 1 10 12 1 0 10 Estimation 5.5 10 10.9 9.9 2.7 0 6 Actual 15 7 4 11 3 12 1 Estimation 10 2.1 7.7 11.4 6.2 11 4.5 Table 2.2. Results of validation of application exercise 4 From the Figure 2a it is observed in general a fair approximation of the actual routes flown. However, due to route choice variability, some routes showed poorer results such as route 1. Figure 2a Comparison of results of validation of application exercise 4 2.3. Testing The testing dataset was divided into two as explained in application exercise 3. The route clustering and flight segmentation used were the same as in application exercise 3. The results of the model with the testing dataset are compared with the actual choice of routes and the null model in Figure 2b. Note that the null model does not predict demand of route 7 as it was added to “other” in the training. The results of the model show a poor approximation of the actual routes flown, but at least better than the null model in all the segments. Figure 2b Comparison of results of testing of application exercise 4 The Pearson correlation coefficient of the results of both models with actual data is presented in Table 2.3. For all the segments, the trained model gives better correlated results than the null model, whose results are highly uncorrelated. However, the estimated results have a poor correlation. Correlation Total Early Flights Midday Flights Late Flights Estimation 0.1751 Null model -0.1947 Estimation 0.2393 Null model -0.1558 Estimation 0.4469 Null model -0.5549 Estimation 0.6892 Null model 0.3168 Table 2.3. Results of testing of application exercise 4 2.4. Discussion The decision tree models trained in this case provide an inaccurate approximation of the expected airspace demand between these airport pairs. The error can be attributed in general to two sources: overfitting and data variability. Overfitting/underfitting The training of the algorithm required high-complexity decision trees to obtain fair results with the validation dataset. The models usually consisted of a decision tree using two features and four stages to model the behaviour of one segment. When applying the same models to the testing dataset, with much different inputs, the model could only provide quasi-constant results of route share. Overfitting could be reduced by training the model with data from different years with different routes and charges, which is out of the scope of the application exercise. Data expansion was needed to obtain better results in the validation. However, it was not sufficient to model correctly the testing dataset. Lower complexity models and regularisation were tried to force the models to have lower complexity. However, this resulted in too simple models that could only provide constant output as the best estimation of route share, even in training, i.e., they had underfitting. Other machine learning techniques were also studied for the case, i.e. neural networks and random forests, proving that the best (still non-effective) results were obtained with decision trees. Traffic variability in the testing dataset Another important source of error is the variability in the route choice criteria in the testing dataset. Route choices during AIRAC 1501 between Istanbul and Paris differ notably from route choices during AIRAC 1502. For instance, several segments used a higher number of route options during AIRAC 1501. This fact made the algorithms consider different route options from those actually considered. As an example, the route choices of Pegasus airlines in these two periods are compared in Figure 2c. It can be observed that during 1501 a higher number of flights used the northern routes, while in 1502 flights used in general more direct routes. Therefore, it can be stated that some explanatory variable for this variability is missing in the approach, such as wind influence or disruptions. Figure 2c Comparison of Pegasus airlines route choices from Istanbul to Paris during AIRAC 1501 (in red) and AIRAC 1502 (in green). Overfitting is found especially when model inputs are too different from the training dataset. In this case, route charges in some countries showed a steep decrease between 2015 and 2016. For instance, the unit rate in Bulgaria dropped from EUR 31.03 to EUR 22.68, the unit rate in Serbia descended from EUR 41.03 to EUR 37.11 and unit rate in Germany changed from EUR 90.26 to EUR 82.68. These significant differences tend to provide poor results in machine learning when the algorithm is not fed with similar data in the training dataset. As a summary, the results of application exercise 4 show a poor approximation of route choices. The studied approach showed that could not model actual behaviour of airlines at least with the given inputs. 3. Application Exercise 5: Multinomial Regression of Flights from Amsterdam to Milan The application exercise 5 studied the flights departing from Schiphol airport (EHAM) to Milan airports, namely Malpensa (LIMC), Orio al Serio (LIME), and Linate (LIML) by training a multinomial regression model. 3.1. Results of training The amount of flights summed 950 flights of 11 different airlines, namely AirBrideCargo (ABW), Alitalia (AZA), Cargolux (CLX), Corendon Dutch Airlines (CND), Etihad (ETD), EasyJet (EZY), Atlas Air (GTI), KLM, Nippon Cargo Airlines (NCA), Emirates (UAE) and Vueling (VLG). Route Modelling The algorithm used the same route choices and segmentation as in application exercise 6. The same measures taken in the application exercise 1 for airlines following only one route or empty sector apply here. The results of the different models trained in the application exercise 5 are shown in Table 3.1. The results show a good fit of the probability vectors. Segment Number of flights Airline Average arrival time Routes considered Actual probability vector Norm of error 0 1 VLG 21.1 1 - - 1 52 AZA 20.7 0, 1 0.54, 0.44, 0.02 0 2 62 KLM 21.6 0, 1, 2 0.47, 0.29, 0.24 0 3 8 GTI, CND, ABW 21.5 0, 1, 2 0.13, 0.13, 0.75 0 4 35 EZY 21.5 0, 1, 2 0.49, 0.46, 0.06 0 5 0 - - - - - 6 0 - - - - - 7 0 - - - - - 8 1 AZA 11.6 0 - - 9 117 KLM 10.2 0, 1 0.73, 0.26, 0.02 0 10 28 NCA, ABW 8 0, 1 0.68, 0.29, 0.04 0 11 60 EZY 9.9 0, 1 0.7, 0.3, 0.0 0 12 6 ETD 9.8 0, 1 0.17, 0.83, 0.0 0 13 6 UAE 9.3 0 - - 14 25 VLG 18.8 0, 1, 2 0.44, 0.44, 0.12 0 15 0 - - - - - 16 43 KLM 17.5 0, 1, 2 0.7, 0.23, 0.07 0 17 21 GTI, CLX, ABW 17.8 0, 2 0.29, 0.0, 0.71 0 18 95 EZY 18 0, 1 0.61, 0.35, 0.04 0 19 0 - - - - - 20 0 - - - - - 21 2 VLG 14.4 0, 1 0.5, 0.5, 0.0 0 22 54 AZA 12.8 0, 1 0.74, 0.26, 0.0 0 23 1 KLM 12.1 1 - - 24 3 NCA, ABW 15.5 0, 2 0.33, 0.0, 0.67 0 Segment Number of flights Airline Average arrival time Routes considered Actual probability vector Norm of error 25 53 EZY 14.4 0, 1 0.68, 0.32, 0.0 0 26 0 - - - - - 27 0 - - - - - Table 3.1. Results of route modelling of application exercise 5 3.2. Results of validation The results of the validation of the models trained in the application exercise 5 are shown in Table 3.2. Route 0 Route 1 Other Actual Estimation Actual Early flights Estimation Actual Midday flights Estimation Actual Late flights Estimation Global results 163 166.5 87 85.4 42 46.5 34 34.6 83 87.7 29 33.6 24 24.6 30 29.7 31 22.8 5 2 14 9 12 11.8 Table 3.2. Results of validation of application exercise 5 A visual comparison between the predicted and actual number of flights in each route in the validation dataset is shown in Figure 3a. The results show a low value of error. Figure 3a Comparison of results of validation of application exercise 5 Note that estimation numbers are given in decimal form, as the result of the multinomial model is a probability of one flight to fly that route. 3.3. Testing The testing dataset was divided into two as explained in application exercise 6. The route clustering and flight segmentation used were the same as in application exercise 6. The results of the model with the testing dataset are compared with the actual choice of routes and the null model results in Figure 3b. Note that the null model does not assign flights to route 3, which is not considered in the testing dataset and thus included in “other”. The results of the model show a poor approximation of the actual routes flown, much worse than the null model, which provides a fair estimation. Figure 3b Comparison of results of testing of application exercise 5 The Pearson correlation coefficient of the results of both models with actual data is presented in Table 3.3. Except for early flights, the trained model gives highly uncorrelated results, resulting in a globally poor estimation. On the other hand, the null model provides a better estimation highly correlated with actual routes. Correlation Estimation 0.7876 Total Null model 0.9726 Early Flights Estimation 0.9452 Null model 0.9974 Midday Flights Estimation 0.2610 Null model 0.9055 Late Flights Estimation -0.1372 Null model 0.8817 Table 3.3. Comparison of the Pearson correlation coefficient with respect to actual route choices of testing of application exercise 5application exercise 3.4. Discussion In this case, the results in testing differ considerably from the expected result. The reason for this is that in AIRAC 1501, the route 3 was available to use whilst in AIRACs 16011603 and 1502 that route was not in general available. As an example, EasyJet flights arriving around 18:20 used typically in year 2016 routes 0 and 1, where 0 was the preferred route and was used by almost two thirds of the flights. In AIRAC 1501, from those flights a 16% chose route 3. Thus, this route was considered as an available option although the model was not fit with the training dataset. Route 3 in AIRAC 1501 had on average lower air navigation charges and lower distance than route 0 and higher charges and distance than route 1. The number of regulations was negligible for all the routes in AIRAC 1501. The model of EasyJet assumed that route 0 was chosen preferably by an external factor rather than the most direct and cheaper route 1. When the route 3 was considered, the model returned a high share of flights taking route 3 as option, which is logical from its characteristics. The missing factor here is the route availability. Routes 1 and 3 depend highly on the availability of military airspace. In Figure 3c, it can be observed that route 3 indeed requires two restricted airspaces (Saarbrucken and Strasbourg) to be open to use that route. Whenever they are available, airlines would prefer to take those routes as they are cheaper and more direct. However, this factor was not taken into account in the model and led to misleading results such as airlines that prefer systematically more expensive routes. Figure 3c Detail of the clustered trajectories from Amsterdam to Milan represented over the upper airspace aeronautical chart (Eurocontrol, 2017). As a summary, the model cannot explain the rationale between using one route or another when this is linked to the availability of the route and not to economic worthiness or congestion. Therefore, the solution would be to model route availability, especially military airspace availability. 4. References Eurocontrol, 2017. Eurocontrol Route Network Chart (ERN Chart) [WWW Document]. URL http://www.eurocontrol.int/sites/default/files/content/documents/nm/cartography/ernhigh-30march2017-web.pdf Performance Review Comission, 2017. Performance Review Report.
2cs.AI
Inference in Linear Regression Models with Many Covariates and Heteroskedasticity∗ arXiv:1507.02493v2 [math.ST] 16 Jan 2017 Matias D. Cattaneo† Michael Jansson‡ Whitney K. Newey§ January 17, 2017 Abstract The linear regression model is widely used in empirical work in Economics, Statistics, and many other disciplines. Researchers often include many covariates in their linear model specification in an attempt to control for confounders. We give inference methods that allow for many covariates and heteroskedasticity. Our results are obtained using high-dimensional approximations, where the number of included covariates are allowed to grow as fast as the sample size. We find that all of the usual versions of Eicker-White heteroskedasticity consistent standard error estimators for linear models are inconsistent under this asymptotics. We then propose a new heteroskedasticity consistent standard error formula that is fully automatic and robust to both (conditional) heteroskedasticity of unknown form and the inclusion of possibly many covariates. We apply our findings to three settings: parametric linear models with many covariates, linear panel models with many fixed effects, and semiparametric semi-linear models with many technical regressors. Simulation evidence consistent with our theoretical results is also provided. The proposed methods are also illustrated with an empirical application. Keywords: high-dimensional models, linear regression, many regressors, heteroskedasticity, standard errors. ∗ We thank Xinwei Ma, Ulrich Müller and Andres Santos for very thoughtful discussions regarding this project. We also thank Silvia Gonçalvez, Pat Kline and James MacKinnon. In addition, an Associate Editor and three reviewers offered excellent recommendations that improved this paper. The first author gratefully acknowledges financial support from the National Science Foundation (SES 1459931). The second author gratefully acknowledges financial support from the National Science Foundation (SES 1459967) and the research support of CREATES (funded by the Danish National Research Foundation under grant no. DNRF78). † Department of Economics and Department of Statistics, University of Michigan. ‡ Department of Economics, UC Berkeley and CREATES. § Department of Economics, MIT. 1 Introduction A key goal in empirical work is to estimate the structural, causal, or treatment effect of some variable on an outcome of interest, such as the impact of a labor market policy on outcomes like earnings or employment. Since many variables measuring policies or interventions are not exogenous, researchers often employ observational methods to estimate their effects. One important method is based on assuming that the variable of interest can be taken as exogenous after controlling for a sufficiently large set of other factors or covariates. A major problem that empirical researchers face when employing selection-on-observables methods to estimate structural effects is the availability of many potential covariates. This problem has become even more pronounced in recent years because of the widespread availability of large (or high-dimensional) new data sets. Not only it is often the case that substantive discipline-specific theory (or intuition) will suggest a large set of variables that might be important, but also researchers usually prefer to include additional “technical” controls constructed using indicator variables, interactions, and other non-linear transformations of those variables. Therefore, many empirical studies include very many covariates in order to control for as broad array of confounders as possible. For example, it is common practice to include dummy variables for many potentially overlapping groups based on age, cohort, geographic location, etc. Even when some controls are dropped after valid covariate selection (Belloni, Chernozhukov, and Hansen (2014)), many controls usually may remain in the final model specification. For example, Angrist and Hahn (2004) discuss when to include many covariates in treatment effect models. We present valid inference methods that explicitly account for the presence of possibly many controls in linear regression models under (conditional) heteroskedasticity. We consider the setting where the object of interest is β in a model of the form yi,n = β ′ xi,n + γn′ wi,n + ui,n , i = 1, . . . , n, (1) where yi,n is a scalar outcome variable, xi,n is a regressor of small (i.e., fixed) dimension d, 1 wi,n is a vector of covariates of possibly “large” dimension Kn , and ui,n is an unobserved error term. Two important cases discussed in more detail below, are “flexible” parametric modeling of controls via basis expansions such as higher-order powers and interactions (i.e., a series-based formulation of the partially linear regression model), and models with many dummy variables such as multi-way fixed effects and interactions thereof in panel data models. In both cases conducting OLS-based inference on β in (1) is straightforward when the error ui,n is homoskedastic and/or the dimension Kn of the nuisance covariates is modeled as a vanishing fraction of the sample size. The latter modeling assumption, however, is inappropriate in applications with many dummy variables and does not deliver a good distributional approximation when many covariates are included. Motivated by the above observations, this paper studies the consequences of allowing the error ui,n in (1) to be (conditionally) heteroskedastic in a setting where the covariate wi,n is permitted to be high-dimensional in the sense that Kn is allowed, but not required, to be a non-vanishing fraction of the sample size. Our main purpose is to investigate the possibility of constructing heteroskedasticity-consistent variance estimators for the OLS estimator of β in (1) without (necessarily) assuming any special structure on the part of the covariate wi,n . We present two main results. First, we provide high-level sufficient conditions guaranteeing a valid Gaussian distributional approximation to the finite sample distribution of the OLS estimator of β, allowing for the dimension of the nuisance covariates to be “large” relative to the sample size (i.e., Kn /n 6→ 0). Second, we characterize the large sample properties of a class of variance estimators, and use this characterization to obtain both negative and positive results. The negative finding is that the Eicker-White estimator is inconsistent in general, as are popular variants of this estimator. The positive result gives conditions under which an alternative heteroskedasticity-robust variance estimator (described in more detail below) is consistent. The main condition needed for our constructive results is a high-level assumption on the nuisance covariates requiring in particular that their number be strictly less than half of the sample size. As a by-product, we also find that among the popular HCk class of standard errors estimators for linear models, a variant of the HC3 estimator delivers 2 standard errors that are asymptotically upward biased in general. Thus, standard OLS inference employing HC3 standard errors will be asymptotically valid, albeit conservative, even in high-dimensional settings where the number of covariate wi,n is large relative to the sample size, i.e., when Kn /n 6→ 0. Our results contribute to the already sizeable literature on heteroskedasticity-robust variance estimators for linear regression models, a recent review of which is given by MacKinnon (2012). Important papers whose results are related to ours include White (1980), MacKinnon and White (1985), Wu (1986), Chesher and Jewitt (1987), Shao and Wu (1987), Chesher (1989), Cribari-Neto, Ferrari, (2000), Kauermann and Carroll (2001), Bera, Suprayitno, and Premaratne (2002), Stock and Watson (2008), Cribari-Neto and da Gloria A. Lima (2011), Müller (2013), and Abadie, Imbens, and Zheng (2014). In particular, Bera, Suprayitno, and Premaratne (2002) analyze some finite sample properties of a variance estimator similar to the one whose asymptotic properties are studied herein. They use unbiasedness or minimum norm quadratic unbiasedness to motivate a variance estimator that is similar in structure to ours, but their results are obtained for fixed Kn and n and is silent about the extent to which consistent variance estimation is even possible when Kn /n 6→ 0. This paper also adds to the literature on high-dimensional linear regression where the number of regressors grow with the sample size; see, e.g., Huber (1973), Koenker (1988), Mammen (1993), El Karoui, Bean, Bickel, Lim, and Yu (2013), Zheng, Jiang, Bai, and He (2014), Li and Müller (2017), and references therein. In particular, Huber (1973) showed that fitted regression values are not asymptotically normal when the number of regressors grows as fast as sample size, while Mammen (1993) obtained asymptotic normality for arbitrary contrasts of OLS estimators in linear regression models where the dimension of the covariates is at most a vanishing fraction of the sample size. More recently, El Karoui, Bean, Bickel, Lim, and Yu (2013) showed that, if a Gaussian distributional assumption on regressors and homoskedasticity is assumed, then certain estimated coefficients and contrasts in linear models are asymptotically normal when the number of regressors grow as fast as sample size, but do not discuss inference results (even under homoskedas3 ticity). Our result in Theorem 1 below shows that certain contrasts of OLS estimators in high-dimensional linear models are asymptotically normal under fairly general regularity conditions. Intuitively, we circumvent the problems associated with the lack of asymptotic Gaussianity in general high-dimensional linear models by focusing exclusively on a small subset of regressors when the number of covariates gets large. We give inference results by constructing heteroskedasticity consistent standard errors without imposing any distributional assumption or other very specific restrictions on the regressors. In particular, we do not require the coefficients γn to be consistently estimated; in fact, they will not be in most of our examples discussed below. Our high-level conditions allow for Kn ∝ n and restrict the data generating process in fairly general and intuitive ways. In particular, our generic sufficient condition on the nuisance covariates wi,n covers several special cases of interest for empirical work. For example, our results encompass (and weakens in certain sense) those reported in Stock and Watson (2008), who investigated the one-way fixed effects panel data regression model and showed that the conventional Eicker-White heteroskedasticity-robust variance estimator is inconsistent, being plagued by a non-negligible bias problem attributable to the presence of many covariates (i.e., the fixed effects). The very special structure of the covariates in the one-way fixed effects estimator enables an explicit characterization of this bias, and also leads to a direct plug-in consistent bias-corrected version of the Eicker-White variance estimator. The generic variance estimator proposed herein essentially reduces to this bias-corrected variance estimator in the special case of the one-way fixed effects model, even though our results are derived from a different perspective and generalize to other settings. Furthermore, our general inference results can be used when many multi-way fixed effects and similar discrete covariates are introduced in a linear regression model, as it is usually the case in social interaction and network settings. For example, in a very recent contribution, Verdier (2017) develops new results for two-way fixed effect design and projection matrices, and use them to verify our high-level conditions in linear models with two-way unobserved heterogeneity and sparsely matched data (which can also be interpreted as a 4 network setting). These results provide another interesting and empirically relevant illustration of our generic theory. Verdier (2017) also develops inference results able to handle time series dependence in his specific context, which are not covered by our assumptions because we impose independence in the cross-sectional dimension of the (possibly grouped) data. The rest of this paper is organized as follows. Section 2 presents the variance estimators we study and gives a heuristic description of their main properties. Section 3 introduces our general framework, discusses high-level assumptions and illustrates the applicability of our methods using three leading examples. Section 4 gives the main results of the paper. Section 5 reports the results of a Monte Carlo experiment, while 6 illustrates our methods using an empirical application. Section 7 concludes. Proofs and additional methodological and numerical results are reported in the online supplemental appendix. 2 Overview of Results For the purposes of discussing distribution theory and variance estimators associated with the OLS estimator β̂n of β in (1), when possibly the Kn -dimensional nuisance covariates wi,n is of “large” dimension and/or the parameters γn cannot be estimated consistently, it is convenient to write the estimator in “partialled out” form as β̂n = ( n X ′ v̂i,n v̂i,n )−1 ( i=1 ′ where Mij,n = 1(i = j) −wi,n ( n X v̂i,n yi,n ), i=1 v̂i,n = n X Mij,n xj,n , j=1 Pn ′ wk,n wk,n )−1 wj,n , 1(·) denotes the indicator function, and P ′ the relevant inverses are assumed to exist. Defining Γ̂n = ni=1 v̂i,n v̂i,n /n, the objective is k=1 to establish a valid Gaussian distributional approximation of the finite sample distribution P √ of the OLS estimator β̂n , and then find an estimator Σ̂n of the variance of ni=1 v̂i,n ui,n / n such that √ n(β̂n − β) →d N (0, I), Ω̂−1/2 n 5 −1 Ω̂n = Γ̂−1 n Σ̂n Γ̂n , (2) in which case asymptotic valid inference on β can be conducted in the usual way by employing a the distributional approximation β̂n ∼ N (β, Ω̂n/n). Our assumptions below will ensure that √ β̂n remains n-consistent because we show in the supplemental appendix that Ω̂−1 n = Op (1) even when Kn /n 6→ 0. Our first result, Theorem 1 below, gives sufficient conditions for a valid Gaussian approxi−1/2 √ −1 n(β̂n −β), where Ωn = Γ̂−1 mation of the distribution of the infeasible statistic Ωn n Σn Γ̂n P √ and Σn denotes the variance of ni=1 v̂i,n ui,n / n, even when possibly Kn /n 6→ 0 and the linear regression model exhibits conditional heteroskedasticity. This result, in turn, gives the basic ingredient for discussing valid variance estimation in high-dimensional linear regression P models. Defining ûi,n = nj=1 Mij,n (yj,n − β̂n′ xj,n ), standard choices of Σ̂n in the fixed-Kn case include the homoskedasticity-only estimator Σ̂HO n = σ̂n2 Γ̂n , σ̂n2 n X 1 û2i,n , = n − d − Kn i=1 and the Eicker-White-type estimator n Σ̂EW n = 1X ′ v̂i,n v̂i,n û2i,n . n i=1 Perhaps not too surprisingly, in Theorem 2 below, we find that consistency of Σ̂HO n under homoskedasticity holds quite generally even for models with many covariates. In contrast, construction of a heteroskedasticity-robust estimator of Σn is more challenging, as it turns out that consistency of Σ̂EW n generally requires Kn to be a vanishing fraction of n. ′ To fix ideas, suppose (yi,n , x′i,n , wi,n ) are i.i.d. over i. It turns out that, under certain regularity conditions, n Σ̂EW n n 1 XX 2 ′ M v̂i,n v̂i,n E[u2j,n |xj,n , wj,n ] + op (1), = n i=1 j=1 ij,n 6 whereas a requirement for (2) to hold is that the estimator Σ̂n satisfies n 1X ′ v̂i,n v̂i,n E[u2i,n |xi,n , wi,n ] + op (1). Σ̂n = n i=1 (3) The difference between the leading terms in the expansions is non-negligible in general unless Kn /n → 0. In recognition of this problem with Σ̂EW n , we study the more general class of estimators of the form n n 1 XX ′ Σ̂n (κn ) = κij,n v̂i,n v̂i,n û2j,n , n i=1 j=1 where κij,n denotes element (i, j) of a symmetric matrix κn = κn (w1,n , . . . , wn,n ). Estimators that can be written in this fashion include Σ̂EW n (which corresponds to κn = In ) as well as variants of the so-called HCk estimators, k ∈ {1, 2, 3, 4}, reviewed by Long and Ervin (2000) and MacKinnon (2012), among many others. To be specific, a natural variant of HCk is −ξ obtained by choosing κn to be diagonal with κii,n = Υi,n Mii,ni,n , where (Υi,n , ξi,n ) = (1, 0) for HC0 (and corresponding to Σ̂EW n ), (Υi,n , ξi,n ) = (n/(n − Kn ), 0) for HC1, (Υi,n , ξi,n ) = (1, 1) for HC2, (Υi,n , ξi,n ) = (1, 2) for HC3, and (Υi,n , ξi,n ) = (1, min(4, nMii,n /Kn )) for HC4. See Sections 4.3 for more details. In Theorem 3 below, we show that all of the HCk-type estimators, which correspond to a diagonal choice of κn , have the shortcoming that they do not satisfy (3) when Kn /n 9 0. On the other hand, it turns out that a certain non-diagonal choice of κn makes it possible to satisfy (3) even if Kn is a non-vanishing fraction of n. To be specific, it turns out that (under regularity conditions and) under mild conditions under the weights κij,n , Σ̂n (κn ) satisfies n n n 1 XXX 2 ′ Σ̂n (κn ) = κik,n Mkj,n v̂i,n v̂i,n E[u2j,n |xj,n , wj,n ] + op (1), n i=1 j=1 (4) k=1 suggesting that (3) holds with Σ̂n = Σ̂n (κn ) provided κn is chosen in such a way that n X 2 κik,n Mkj,n = 1(i = j), k=1 7 1 ≤ i, j ≤ n. (5) Accordingly, we define n Σ̂HC n = Σ̂n (κHC n ) n 1 X X HC ′ κ v̂i,n v̂i,n û2j,n, = n i=1 j=1 ij,n where, with Mn denoting the matrix with element (i, j) given by Mij,n and ⊙ denoting the Hadamard product, κHC n    =   κHC 11,n .. . ··· .. . κHC 1n,n .. . HC κHC n1,n · · · κnn,n       =     2 M11,n .. . ··· .. . 2 M1n,n .. . 2 2 Mn1,n · · · Mnn,n −1      = (Mn ⊙ Mn )−1 . The estimator Σ̂HC n is well defined whenever Mn ⊙ Mn is invertible, a simple sufficient condition for which is that Mn < 1/2, where Mn = 1 − min Mii,n . 1≤i≤n The fact that Mn < 1/2 implies invertibility of Mn ⊙ Mn is a consequence of the Gershgorin circle theorem. For details, see Section 3 in the supplemental appendix. More importantly, a slight strengthening of the condition Mn < 1/2 will be shown to be sufficient for (2) and (3) to hold with Σ̂n = Σ̂HC n . Our final result, Theorem 4 below, formalizes this finding (see also the supplemental appendix for further intuition underlying this result). The key intuition underlying our variance estimation result is that, even though each conditional variance E[u2i,n |xi,n , wi,n ] cannot be well estimated due to the curse of dimensionality, an averaged version such as the leading term in (3) can be estimated consistently. Thus, b 2 |xi,n , wi,n ] = Pn κik,n û2 as an estimator of E[u2 |xi,n , wi,n ], plugging into taking E[u i,n i,n k,n k=1 the leading term in (3), and computing conditional expectations, we obtain the leading term P ′ E[u2i,n |xi,n , wi,n ], in (4). To make this leading term equal to the desired target ni=1 v̂i,n v̂i,n 8 it is natural to require n X n X j=1 k=1 2 κik,n Mkj,n E[u2j,n |xj,n , wj,n ] = E[u2i,n |xi,n , wi,n ] 1 ≤ i ≤ n. Since E[u2i,n |xi,n , wi,n ] are unknown, our variance estimator solves (5), which generates enough equations to solve for all n(n − 1)/2 possibly distinct elements in κHC n . −1 Remark 1. Σ̂HC n = n Pn ′ 2 2 i=1 v̂i,n v̂i,n ũi,n with ũi,n = Pn j=1 2 2 κHC ij,n ûj,n , and therefore ũi,n can be interpreted as a bias-corrected “estimator” of (the conditional expectation of) u2i,n . 3 Setup This section introduces a general framework encompassing several special cases of linear-inparameters regression models of the form (1). We first present generic high-level assumptions, and then discuss their implications as well as some easier to verify sufficient conditions. Finally, to close this setup section, we briefly discuss three motivating leading examples: linear regression models with increasing dimension, muti-way fixed effect linear models, and semiparametric semi-linear regression. Technical details and related results for these examples are given in the supplemental appendix. 3.1 Framework ′ Suppose {(yi,n , x′i,n , wi,n ) : 1 ≤ i ≤ n} is generated by (1). Let k · k denote the Euclidean norm, set Xn = (x1,n , . . . , xn,n ), and for a collection Wn of random variables satisfying 9 E[wi,n |Wn ] = wi,n , define the constants n 1X 2 E[Ri,n ], ̺n = n i=1 Ri,n = E[ui,n |Xn , Wn ], n ρn = 1X 2 E[ri,n ], n i=1 ri,n = E[ui,n |Wn ], n 1X χn = E[kQi,n k2 ], n i=1 where vi,n = xi,n −( of v̂i,n . Also, define Pn j=1 ′ E[xj,n wj,n ])( Pn Qi,n = E[vi,n |Wn ], ′ −1 j=1 E[wj,n wj,n ]) wi,n is the population counterpart 2 4 Cn = max {E[Ui,n |Xn , Wn ] + E[kVi,n k4 |Wn ] + 1/E[Ui,n |Xn , Wn ]} + 1/λmin(E[Γ̃n |Wn ])}, 1≤i≤n where Ui,n = yi,n − E[yi,n |Xn , Wn ], Vi,n = xi,n − E[xi,n |Wn ], Γ̃n = P Ṽi,n = nj=1 Mij,n Vj,n . Pn i=1 ′ Ṽi,n Ṽi,n /n, and We impose the following three high-level conditions. Let λmin (·) denote the minimum eigenvalue of its argument, and limn→∞ an = lim supn→∞ an for any sequence an . Assumption 1 (Sampling) C[Ui,n , Uj,n |Xn , Wn ] = 0 for i 6= j and max1≤i≤Nn #Ti,n = O(1), where #Ti,n is the cardinality of Ti,n and where {Ti,n : 1 ≤ i ≤ Nn } is a partition of {1, . . . , n} such that {(Ut,n , Vt,n ) : t ∈ Ti,n } are independent over i conditional on Wn . Assumption 2 (Design) P[λmin ( Op (1). Pn i=1 ′ wi,n wi,n ) > 0] → 1, limn→∞ Kn /n < 1, and Cn = Assumption 3 (Approximations) χn = O(1), ̺n + n(̺n − ρn ) + nχn ̺n = o(1), and √ max1≤i≤n kv̂i,n k/ n = op (1). 3.2 Discussion of Assumptions Assumptions 1–3 are meant to be high-level and general, allowing for different linear-inparameters regression models. We now discuss the main restrictions imposed by these 10 assumptions. We further illustrate them in the following subsection using more specific examples. 3.2.1 Assumption 1 This assumption concerns the sampling properties of the observed data. It generalizes classical i.i.d. sampling by allowing for groups or “clusters” of finite but possibly heterogeneous size with arbitrary intra-group dependence, which is very common in the context of fixed effects linear regression models. As currently stated, this assumption does not allow for dependence in the error terms across units, and therefore excludes clustered, spacial or time series dependence in the sample. We conjecture our main results extend to the latter cases, though here we focus on i.n.i.d. (conditionally) heteroskedastic models only, and hence relegate the extension to errors exhibiting clustered, spacial or time series dependence for future work. Assumption 1 reduces to classical i.i.d. sampling when Nn = n, Ti,n = {i} [implying max1≤i≤Nn #Ti,n = 1], and all observations have the same distribution. 3.2.2 Assumption 2 This assumption concerns basic design features of the linear regression model. The first two restrictions are mild and reflect the main goal of this paper, that is, analyzing linear regression models with many nuisance covariates wi,n . In practice, the first restriction regarding the Pn ′ minimum eigenvalue of the design matrix i=1 wi,n wi,n is always imposed by removing redundant (i.e., linearly dependent) covariates; from a theoretical perspective this condition requires either restrictions on the distributional relationship of such covariates or some form of trimming leading to selection of included covariates (e.g., most software packages remove covariates leading to “too” small eigenvalues of the design matrix by means of some hardthresholding rule). On the other hand, the last condition, Cn = Op (1), may be restrictive in some settings: for example, if the covariates have unbounded support (e.g., they are normally distributed) and heteroskedasticity is unbounded (e.g., unbounded multiplicative heteroskedasticity), then 11 the assumption may fail. Simple sufficient conditions for Cn = Op (1) can be formulated when the covariates have compact support, or the heteroskedasticity is multiplicative and bounded, because in these cases it is easy to bound the conditional moments of the error terms. It would be useful to know whether the condition Cn = Op (1) can be relaxed to a version involving only unconditional moments, though we conjecture this weaker assumption will require a different method of proof (see the supplemental appendix for details). 3.2.3 Assumption 3 This assumption requires two basic approximations to hold. First, concerning bias, conditions on ̺n are related to the approximation quality of the linear-in-parameters model (1) for the “long” conditional expectation E[yi,n |Xn , Wn ]. Similarly, conditions on ρn and χn are related to linear-in-parameters approximations for the “short” conditional expectations E[yi,n |Wn ] and E[xi,n |Wn ], respectively. All these approximations are measured in terms of population mean square error, and are at the heart of empirical work employing linearin-parameters regression models. Depending on the model of interest, different sufficient conditions can be given for these assumptions. Here we briefly mention the most simple one: (a) if E[ui,n |Xn , Wn ] = 0 for all i and n, which can be interpreted as exogeneity (e.g., no misspecification bias), then 0 = ρn = n(̺n − ρn ) + nχn ̺n for all n; and (b) if E[kxi,n k2 ] < ∞ for all i and n, then χn = O(1). Other sufficient conditions are discussed below. √ Second, the high-level condition max1≤i≤n kv̂i,n k/ n = op (1) restricts the distributional relationship between the finite dimensional covariate of interest xi,n and the high-dimensional nuisance covariate wi,n . This condition can be interpreted as a negligibility condition and thus comes close to minimal for the central limit theorem to hold. At the present level of generality it seems difficult to formulate primitive sufficient conditions for this restriction that cover all cases of interest, but for completeness we mention that under mild moment conditions it suffices to require that one of the following conditions hold (see Lemma SA-7 in the supplemental appendix for details and weaker conditions): (i) Mn = op (1), or 12 (ii) χn = o(1), or P (iii) max1≤i≤n nj=1 1(Mij,n 6= 0) = op (n1/3 ). Each of these conditions is interpretable. First, Mn ≥ Kn /n because Pn i=1 Mii,n = n−Kn and a necessary condition for (i) is therefore that Kn /n → 0. Conversely, because Mn ≤ Kn 1 − min1≤i≤n Mii,n , n 1 − max1≤i≤n Mii,n the condition Kn /n → 0 is sufficient for (i) whenever the design is “approximately balanced” in the sense that (1 − min1≤i≤n Mii,n )/(1 − max1≤i≤n Mii,n ) = Op (1). In other words, (i) requires and effectively covers the case where it is assumed that Kn is a vanishing fraction of n. In contrast, conditions (ii) and (iii) can hold also when Kn is a non-vanishing fraction of n, which is the case of primary interest in this paper. Because (ii) is a requirement on the accuracy of the approximation E[xi,n |wi,n ] ≈ δn′ wi,n ′ −1 with δn = E[wi,n wi,n ] E[wi,n x′i,n ], primitive conditions for it are available when, for exam- ple, the elements of wi,n are approximating functions. Indeed, in such cases one typically has χn = O(Kn−α) for some α > 0, so condition (ii) not only accommodates Kn /n 9 0, but actually places no upper bound on the magnitude of Kn in important special cases. This condition also holds when wi,n are dummy variables or discrete covariates, as we discuss in more detail below. Finally, condition (iii), and its underlying higher-level condition described in the supplemental appendix, is useful to handle cases where wi,n cannot be interpreted as approximating functions, but rather just many different covariates included in the linear model specification. This condition is a “sparsity” condition on the projection matrix Mn , which allows for Kn /n 9 0. The condition is easy to verify in certain cases, including those where “locally bounded” approximating functions or fixed effects are used (see below for concrete examples). 13 3.3 Motivating Examples We briefly mention three motivating examples of linear-in-parameter regression models covered by our results. All technical details are given in the supplemental appendix. 3.3.1 Linear Regression Model with Increasing Dimension This leading example has a long tradition in statistics and econometrics. The model takes (1) as the data generating process (DGP), typically with i.i.d. data and the exogeneity condition E[ui,n |xi,n , wi,n ] = 0. However, our assumptions only require nE[(E[ui,n |xi,n , wi,n ])2 ] = o(1), and hence (1) can be interpreted as a linear-in-parameters mean-square approximation to the unknown conditional expectation E[yi,n |xi,n , wi,n ]. Either way, β̂n is the standard OLS estimator. Setting Wn = (w1,n , . . . , wn,n ), Nn = n, Ti,n = {i} and max1≤i≤Nn #Ti,n = 1, Assumptions 1–2 are standard, while Assumption 3 is satisfied provided that E[kxi,n k2 ] < ∞ [implying χn = O(1)], nE[(E[ui,n |xi,n , wi,n ])2 ] = o(1) [implying n(̺n − ρn ) + nχn ̺n = o(1)], √ and max1≤i≤n kv̂i,n k/ n = op (1). Primitive sufficient conditions for the latter negligibility condition can be given as discussed above. For example, under regularity conditions, χn = o(1) if either (a) E[xi,n |wi,n ] = δ ′ wi,n , (b) the nuisance covariates are discrete and a saturated dummy variables model is used, or (c) wi,n are constructed using sieve functions. P Alternatively, max1≤i≤n nj=1 1(Mij,n 6= 0) = op (n1/3 ) is satisfied provided the distribution of the nuisance covariates wi,n generates a projection matrix Mn that is approximately a band matrix (see below for concrete examples). Precise regularity conditions for this example are given in Section 4.1 of the supplemental appendix. 3.3.2 Fixed Effects Panel Data Regression Model A second class of examples covered by our results are linear panel data models with multiway fixed effects and related models such as those encountered in networks, spillovers or social interactions settings. A common feature in these examples is the presence of possibly 14 many dummy variables in wi,n , capturing unobserved heterogeneity or other unobserved effects across units (e.g., network link or spillover effect). In many applications the number of distinct dummy-type variables is large because researchers often include multi-group indicators, interactions thereof, and similar regressors obtained from factor variables. In these complicated models the nuisance covariates need to be estimated explicitly, even in simple linear regression problems, because it is not possible to difference out the multi-way indicator variables for estimation and inference. Stock and Watson (2008) consider heteroskedasticity-robust inference for the one-way fixed effect panel data regression model Yit = αi + β ′ Xit + Uit , i = 1, . . . , N, t = 1, . . . , T, (6) where αi ∈ R is an individual-specific intercept, Xit is a regressor of dimension d, and Uit is an scalar error term, and the following assumptions are satisfied. To map this model into our framework, suppose that {(Ui1 , . . . , UiT , X′i1 . . . , X′iT ) : 1 ≤ i ≤ n} are independent over i, E[Uit |Xi1 . . . , XiT ] = 0, and E[Uit Uis |Xi1 . . . , XiT ] = 0 for t 6= s. Then, setting ′ n = NT , Kn = N, γn = (α1 , . . . , αN )′ , and (y(i−1)T +t,n , x′(i−1)T +t,n , u(i−1)T +t,n , w(i−1)T +t,n ) = (Yit , X′it , Uit , e′i,N ), 1 ≤ i ≤ N and 1 ≤ t ≤ T , where ei,N ∈ RN is the i-th unit vector of dimension N, the model (6) is also of the form (1) and β̂n is the fixed effects estimator of β. In general, this model does not satisfy an i.i.d. assumption, but Assumption 1 enables us to employ results for independent random variables when developing asymptotics. In particular, unlike Stock and Watson (2008), we do not require (Ui1 , . . . , UiT , X′i1 . . . , X′iT ) to be i.i.d. over i, nor we require any kind of stationarity on the part of (Uit , X′it ). The amount of variance heterogeneity permitted is quite large, since we basically only require V[Yit |Xi1 , . . . , XiT ] = E[Uit2 |Xi1, . . . , XiT ] to be bounded and bounded away from zero. (On the other hand, serial correlation is assumed away because our assumptions imply that C[Yit , Yis |Xi1 , . . . , XiT ] = 0 for t 6= s.) In other respects this model is in fact more tractable than the previous models due to the special nature of the covariates wi,n , that is, a dummy 15 variable for each unit i = 1, . . . , N. In this one-way fixed effects example, Kn /n = 1/T and therefore a high-dimensional P model corresponds to a short panel model: max1≤i≤n nj=1 1(Mij,n 6= 0) = T and hence the negligibility condition holds easily. If T ≥ 2, our asymptotic Gaussian approximation for the distribution of the least-squares estimator β̂n is valid (see Theorem 1), despite the coefficients γn not being consistently estimated. On the other hand, consistency of our generic variance estimator requires T ≥ 3 [implying Kn /n < 1/2]; see Theorems 3 and 4. Further details are given in Section 4.2 of the supplemental appendix, where we also discuss a case-specific consistent variance estimator when T = 2. Our generic results go beyond one-way fixed effect linear regression models, as they can be used to obtain valid inference in other contexts where multi-way fixed effects or similar discrete regressors are included. For a second concrete example, consider the recent work of Verdier (2017, and references therein) in the context of linear models with twoway unobserved heterogeneity and sparsely matched data. This model is isomorphic to a network model, where students and teacher (or workers and firms, for another example) are “matched” or “connected” over time, but potential unobserved heterogeneity at both levels is a concern. In this setting, under random sampling, Verdier (2017) offers primitive conditions for our high-level assumptions when two-way fixed effect models are used for estimation and inference. In particular, using a clever Markov chain argument (see his Lemma 1), he is able to provide different restriction on T and the number of matches in the network to ensure consistent variance estimation using the methods developed in this paper. To give one concrete example, he finds that if T ≥ 5 and for any pair of teachers (firms), the number of students (workers) assigned to both teachers (firms) in the pair is either zero or greater than three, then our key high-level condition in Theorem 4 below is verified. 16 3.3.3 Semiparametric Partially Linear Model Another model covered by our results is the partially linear model yi = β ′ xi + g(zi ) + εi , i = 1, . . . , n, (7) where xi and zi are explanatory variables, εi is an error term satisfying E[εi |xi , zi ] = 0, the function g(z) is unknown, and sampling is i.i.d. across i is assumed. Suppose {pk (z) : k = 1, 2, · · · } are functions having the property that linear combinations can approximate square-integrable functions of z well, in which case g(zi ) ≈ γn′ pn (zi ) for some γn , where pn (z) = (p1 (z), . . . , pKn (z))′ . Defining yi,n = yi , xi,n = xi , wi,n = pn (zi ), and ui,n = εi + g(zi ) − γn′ wi,n , the model (7) is of the form (1), and β̂n is the series estimator of β; see, e.g., Donald and Newey (1994) and Cattaneo, Jansson, and Newey (2017) and references therein. Constructing the basis pn (zi ) in applications may require using a large Kn , either because the underlying functions are not smooth enough or because dim(zi ) is large. For example, if a p = 3 cubic polynomial expansion is used, also known as a power series of order 3, then dim(wi ) = (p + dim(zi ))!/(p! dim(zi )!) = 286 when dim(zi ) = 10, and therefore flexible estimation and inference using the semi-linear model (7) with a sample size of n = 1, 000 gives Kn /n = 0.286. For further technical details on series-based methods see, e.g., Newey (1997), Chen (2007), Cattaneo and Farrell (2013), and Belloni, Chernozhukov, Chetverikov, and Kato (2015), and references therein. For another example, when the basis functions pn (z) are constructed using partitioning estimators, the OLS estimator of β becomes a subclassification estimator, a method that has been proposed in the literature on program evaluation and treatment effects; see, e.g., Cochran (1968), Rosenbaum and Rubin (1983), Cattaneo and Farrell (2011), and references therein. When a Partitioning estimator of order 0 is used, the semilinear model becomes a one-way fixed effects linear regression model, where each dummy variable corresponds to one (disjoint) partition on the support of zi ; in this case, Kn is to the number of partitions or fixed effects included in the estimation. 17 Our primitive regularity conditions for this example include ̺n = min E[|g(zi ) − γ ′ pn (zi )|2 ] = o(1), γ∈RKn χn = min E[kE[xi |zi ] − δ ′ pn (zi )k2 ] = O(1), δ∈RKn ×d √ n̺n χn = o(1), and the negligibility condition max1≤i≤n kv̂i,n k/ n = op (1). A key finding implied by these regularity conditions is that we only require minimal smoothness conditions on g(zi ) and E[xi |zi ]. The negligibility condition is automatically satisfied if χn = o(1), as discussed above, but in fact our results do not require any approximation of E[xi |zi ], as usually assumed in the literature, provided a “locally supported” basis is used; i.e., any basis pn (z) that generates an approximately band projection matrix Mn ; examples of such basis include partitioning and spline estimators. See Section 4.3 in the supplemental appendix for further discussion and technical details. 4 Results This section presents our main theoretical results for inference in linear regression models with many covariates and heteroskedasticity. Mathematical proofs, and other technical results that may be of independent interest, are given in the supplemental appendix. 4.1 Asymptotic Normality As a means to the end of establishing (2), we give an asymptotic normality result for β̂n which may be of interest in its own right. Theorem 1 Suppose Assumptions 1–3 hold. Then, √ n(β̂n − β) →d N (0, I), Ω−1/2 n where Σn = Pn ′ 2 i=1 v̂i,n v̂i,n E[Ui,n |Xn , Wn ]/n. 18 −1 Ωn = Γ̂−1 n Σn Γ̂n , (8) In the literature on high-dimensional linear models, Mammen (1993) obtains a similar asymptotic normality result as in Theorem 1 but under the condition Kn1+δ /n → 0 for δ > 0 restricted by certain moment condition on the covariates. In contrast, our result only requires limn→∞ Kn /n < 1, but imposes a different restriction on the high-dimensional covariates (e.g., condition (i), (ii) or (iii) discussed previously) and furthermore exploits the fact that the parameter of interest is given by the first d coordinates of the vector (β ′ , γn′ )′ (i.e., in Mammen (1993) notation, it considers the case c = (ι′ , 0′ )′ with ι denoting a d-dimensional vector of ones and 0 denoting a Kn -dimensional vector of zeros). In isolation, the fact that Theorem 1 removes the requirement Kn /n → 0 may seem like little more than a subtle technical improvement over results currently available. It should be recognized, however, that conducting inference turn out to be considerably harder when Kn /n 6→ 0. The latter is an important insight about large-dimensional models that cannot be deduced from results obtained under the assumption Kn /n → 0, but can be obtained with the help of Theorem 1. In addition, it is worth mentioning that Theorem 1 is a substantial improvement over Cattaneo, Jansson, and Newey (2017, Theorem 1) because here it is not required that Kn → ∞ nor χn = o(1) —a different method of proof is also used. This improvement applies not only to the partially linear model example, but more generally to linear models with many covariates, because Theorem 1 applies to quite general form of nuisance covariate wi,n beyond specific approximating basis functions. In the specific case of the partially linear model, this implies that we are able to weaken smoothness assumptions (or the curse of dimensionality), otherwise required to satisfy the condition χn = o(1). Remark 2. Theorem 1 concerns only distributional properties of β̂n . First, this theorem √ implies n-consistency of β̂n because Ω−1 n = Op (1) (see Lemmas SA-1 and SA-2 of the supplemental appendix). Second, this theorem does require nor imply consistency of the (implicit) least squares estimate of γn , as in fact such a result will not be true in most applications with many nuisance covariates wn,i . For example, in a partially linear model (7) the approximating coefficients γn will not be consistently estimated unless 19 Kn /n → 0, or in a one-way fixed effect panel data model (6) the unit-specific coefficients in γn will not be consistently estimated unless Kn /n = 1/T → 0. Nevertheless, Theorem 1 shows that β̂n can still be root-n asymptotically normal under fairly general conditions; this result is due to the intrinsic linearity and additive separability of the model (1). 4.2 Variance Estimation Achieving (2), the counterpart of (8) in which the unknown matrix Σn is replaced by the estimator Σ̂n , requires additional assumptions. One possibility is to impose homoskedasticity. 2 Theorem 2 Suppose the assumptions of Theorem 1 hold. If E[Ui,n |Xn , Wn ] = σn2 , then (2) holds with Σ̂n = Σ̂HO n . This result shows in quite some generality that homoskedastic inference in linear models remains valid even when Kn is proportional to n, provided the variance estimator incorporates a degrees-of-freedom correction, as Σ̂HO n does. Establishing (2) is also possible when Kn is assumed to be a vanishing fraction of n, as is of course the case in the usual fixed-Kn linear regression model setup. The following theorem establishes consistency of the conventional standard error estimator Σ̂EW n under the assumption Mn →p 0, and also derives an asymptotic representation for estimators of the form Σ̂n (κn ) without imposing this assumption, which is useful to study the asymptotic properties of other members of the HCk class of standard error estimators. Theorem 3 Suppose the assumptions of Theorem 1 hold. (a) If Mn →p 0, then (2) holds with Σ̂n = Σ̂EW n . P (b) If kκn k∞ = max1≤i≤n nj=1 |κij,n | = Op (1), then n Σ̂n (κn ) = n n 1 XXX 2 ′ 2 κik,n Mkj,n v̂i,n v̂i,n E[Uj,n |Xn , Wn ] + op (1). n i=1 j=1 k=1 20 The conclusion of part (a) typically fails when the condition Kn /n → 0 is dropped. For example, when specialized to κn = In part (b) implies that in the homoskedastic case (i.e., when the assumptions of Theorem 2 are satisfied) the standard estimator Σ̂EW n is asymptotically downward biased in general (unless Kn /n → 0). In the following section we make this result precise and discuss similar results for other popular variants of the HCk standard error estimators mentioned above. P HC 2 On the other hand, because 1≤k≤n κik,n Mkj,n = 1(i = j) by construction, part (b) HC implies that Σ̂HC n is consistent provided kκn k∞ = Op (1). A simple condition for this to occur can be stated in terms of Mn . Indeed, if Mn < 1/2, then κHC n is diagonally dominant and it follows from Theorem 1 of Varah (1975) that 1 . 1/2 − Mn kκHC n k∞ ≤ As a consequence, we obtain the following theorem, whose conditions can hold even if Kn /n 9 0. Theorem 4 Suppose the assumptions of Theorem 1 hold. If P[Mn < 1/2] → 1 and if 1/(1/2 − Mn ) = Op (1), then (2) holds with Σ̂n = Σ̂HC n . Because Mn ≥ Kn /n, a necessary condition for Theorem 4 to be applicable is that limn→∞ Kn /n < 1/2. When the design is balanced, that is, when M11,n = . . . = Mnn,n (as occurs in the panel data model (6)), the condition limn→∞ Kn /n < 1/2 is also sufficient, but in general it seems difficult to formulate primitive sufficient conditions for the assumption made about Mn in Theorem 4. In practice, the fact that Mn is observed means that the condition Mn < 1/2 is verifiable, and therefore unless Mn is found to be “close” to 1/2 there is reason to expect Σ̂HC n to perform well. Remark 3. Our main results for linear models concern large-sample approximations for the finite-sample distribution of the usual t-statistics. An alternative, equally automatic approach is to employ the bootstrap and closely related resampling procedures 21 (see, among others, Freedman (1981), Mammen (1993), Gonalvez and White (2005), Kline and Santos (2012)). Assuming Kn /n 9 0, Bickel and Freedman (1983) demonstrated an invalidity result for the bootstrap. We conjecture that similar results can be obtained for other resampling procedures. Furthermore, we also conjecture that employing appropriate resampling methods on the “bias-corrected” residuals ũ2i,n (Remark 1) can lead to valid inference procedures. Investigating these conjectures, however, is beyond the scope of this paper. Following the recommendation of a reviewer, we explored the numerical performance of the standard nonparametric bootstrap in our simulation study, where we found that indeed bootstrap validity seems to fail in the high-dimensional settings we considered. 4.3 HCk Standard Errors with Many Covariates The HCk variance estimators are very popular in empirical work, and in our context are −ξ of the form Σ̂n (κn ) with κij,n = 1(i = j)Υi,n Mii,ni,n for some choice of (Υi,n , ξi,n ). See Long and Ervin (2000) and MacKinnon (2012) for reviews. Theorem 3(b) can be used to formulate conditions, including Kn /n → 0, under which these estimators are consistent in the sense that n Σ̂n (κn ) = Σn + op (1), 1X ′ 2 Σn = v̂i,n v̂i,n E[Ui,n |Xn , Wn ]. n i=1 −ξ More generally, Theorem 3(b) shows that, if κij,n = 1(i = j)Υi,n Mii,ni,n , then n Σ̂n (κn ) = Σ̄n (κn ) + op (1), Σ̄n (κn ) = n 1 XX −ξ 2 ′ 2 Υi,n Mii,ni,n Mij,n v̂i,n v̂i,n E[Uj,n |Xn , Wn ]. n i=1 j=1 We therefore obtain the following (mostly negative) results about the properties of HCk estimators when Kn /n 9 0, that is, when potentially many covariates are included. 22 2 HC0: (Υi,n , ξi,n ) = (1, 0). If E[Uj,n |Xn , Wn ] = σn2 , then n σn2 X ′ (1 − Mii,n )v̂i,n v̂i,n ≤ Σn , Σ̄n (κn ) = Σn − n i=1 with n−1 Pn ′ i=1 (1−Mii,n )v̂i,n v̂i,n 6= op (1) in general (unless Kn /n → 0). Thus, Σ̂n (κn ) = EW Σ̂EW n is inconsistent in general. In particular, inference based on Σ̂n is asymptotically liberal (even) under homoskedasticity. 2 HC1: (Υi,n , ξi,n ) = (n/(n − Kn ), 0). If E[Uj,n |Xn , Wn ] = σn2 and if M11,n = . . . = Mnn,n , then Σ̄n (κn ) = Σn , but in general this estimator is inconsistent when Kn /n 9 0 (and so is any other scalar multiple of Σ̂EW n ). 2 |Xn , Wn ] = σn2 , then Σ̄n (κn ) = Σn , but in general this HC2: (Υi,n , ξi,n ) = (1, 1). If E[Uj,n estimator is inconsistent under heteroskedasticity when Kn /n 9 0. For instance, if 2 2 d = 1 and if E[Uj,n |Xn , Wn ] = v̂j,n , then n n 2 1 X X Mij,n −1 −1 2 2 Σ̄n (κn ) − Σn = (Mii,n + Mjj,n ) − 1(i = j)]v̂i,n [ v̂j,n 6= op (1) n i=1 j=1 2 in general (unless Kn /n → 0). HC3: (Υi,n , ξi,n ) = (1, 2). Inference based on this estimator is asymptotically conservative because n n 1X X ′ 2 Σ̄n (κn ) − Σn = M −2 M 2 v̂i,n v̂i,n E[Uj,n |Xn , Wn ] ≥ 0, n i=1 j=1,j6=i ii,n ij,n where n−1 Pn Pn i=1 j=1,j6=i −2 2 ′ 2 Mii,n Mij,n v̂i,n v̂i,n E[Uj,n |Xn , Wn ] 6= op (1) in general (unless Kn /n → 0). HC4: (Υi,n , ξi,n ) = (1, min(4, nMii,n /Kn )). If M11,n = . . . = Mnn,n = 2/3 (as occurs when T = 3 in the fixed effects panel data model), then HC4 reduces to HC3, so this estimator is also inconsistent in general. 23 Among other things these results show that (asymptotically) conservative inference in linear models with many covariates (i.e., even when K/n 6→ 0) can be conducted using standard linear methods (and software), provided the HC3 standard errors are used. In the numerical work reported in the following sections and the supplemental appendix, we present evidence comparing all these standard error estimators. In particular, we find that indeed standard OLS-based confidence intervals employing HC3 standard errors are always quite conservative. Furthermore, we also find that our proposed variance estimator Σ̂HC n delivers confidence intervals with close-to-correct empirical coverage. 5 Simulations We conducted a simulation study to assess the finite sample properties of our proposed inference methods as well as those of other standard inference methods available in the literature. Based on the generic linear regression model (1), we consider 15 distinct data generating processes (DGPs) motivated by the three examples discussed above. To conserve space, here we only discuss results from Model 1, a representative case, but the supplemental appendix contains the full set of results and further details (see Table 1 in the supplement for a synopsis of the DGPs used). We discuss results for a linear model (1) with i.i.d. data, n = 700, d = 1 and xi,n ∼ Normal(0, 1), wi,n = 1(vi,n ≥ 2.5) with vi,n ∼ Normal(0, IKn ), and ui,n ∼ Normal(0, 1), all independent of each other. Thus, this design considers (possibly overlapping) sparse dummy variables entering wi,n ; each column assigns a value of 1 to approximately five units out of n = 700. We set β = 1 and γn = 0, and considered five different model dimensions: dim(wi,n ) = Kn ∈ {1, 71, 141, 211, 281}. In the supplemental appendix we also present results for more sparse dummy variables in the context of one-way and two-way linear panel data regression models, and for non-binary covariates wi,n in both increasing dimension linear regression settings and semiparametric partially linear regression settings (where γn 6= 0 and wi,n is constructed using power series expansions). Furthermore, we also consider an asymmetric 24 and a bimodal distribution for the unobservable error terms. In all cases the numerical results are qualitatively similar to those discussed herein. For each DGP, we investigate both homoskedastic as well as (conditional on xi,n and/or wi,n ) heteroskedastic models, following closely the specifications in Stock and Watson (2008) and MacKinnon (2012). In particular, our heteroskedastic model takes the form: V[ui,n |xi,n , wi,n ] = κu (1 + (t(xi,n ) + ι′ wi,n )2 ) and V[xi,n |wi,n ] = κv (1 + (ι′ wi,n )2 ), where the constants κu and κv are chosen so that V[ui,n ] = V[xi,n ] = 1, and t(a) = a1(−2 ≤ a ≤ 2) + 2 sgn(a)(1 − 1(−2 ≤ a ≤ 2)). We conducted S = 5, 000 simulations to study the finite sample performance of 16 confidence intervals: eight based on a Gaussian approximation and eight based on a bootstrap approximation. Our paper offers theory for Gaussian-based inference methods, but we also included bootstrap-based inference methods for completeness (as discussed in Remark 3, the bootstrap is invalid when Kn ∝ n in linear regression models). For each inference method, we report both average coverage frequency and interval length of 95% nominal confidence intervals; the latter provides a summary of efficiency/power for each inference method. To be more specific, for α = 0.05, the confidence intervals take the form:  −1 Iℓ =  β̂n − qℓ,1−α/2 · s Ω̂n,ℓ −1 , β̂n − qℓ,α/2 · n s  Ω̂n,ℓ  , n −1 Ω̂n,ℓ = Γ̂−1 n Σ̂n,ℓ Γ̂n , −1 where qℓ,a = qℓ−1 (a) and qℓ (a) denotes a cumulative distribution function, and Σ̂n,ℓ with ℓ ∈ {HO0, HO1, HC0, HC1, HC2, HC3, HC4, HCK} corresponds the variance estimators discussed in Sections 2 and 4.3. Gaussian-based methods set q(a) equal to the standard normal distribution for all ℓ, while bootstrap-based methods are based on the nonparametric bootq strap distributional approximation to the distribution of the t-test Tℓ = (β̂n − β)/ Ω̂n,ℓ /n. The empirical coverage of these 16 confidence intervals are reported in Panel (a) of Table 1. In addition, Panel (b) of Table 1 reports the average interval length of each confidence q −1 −1 intervals, which is computed as Lℓ = (qℓ,1−α/2 − qℓ,α/2 ) · Ω̂n,ℓ /n, which offers a summary of finite sample power/efficiency of each inference method. The main findings from the simulation study are in line with our theoretical results. To 25 be precise, we find that the confidence interval estimators constructed using our proposed standard errors formula Σ̂HC n , denoted HCK, offer close-to-correct empirical coverage. The alternative heteroskedasticity consistent standard errors currently available in the literature lead to confidence intervals that could deliver substantial under or over coverage depending on the design and degree of heteroskedasticity considered. We also find that inference based on HC3 standard errors is conservative, a general asymptotic result that is formally established in this paper. Bootstrap-based methods seem to perform better than their Gaussian-based counterparts, but they never outperform our proposed Gaussian-based inference procedure nor do they provide close-to-correct empirical coverage across all cases. Finally, our proposed confidence intervals also exhibit very good average interval length. 6 Empirical Illustration We illustrate the different linear regression inference methods discussed in this paper using a real data set to study the effect of ability on earnings. In particular, we employ the dataset constructed by Carneiro, Heckman, and Vytlacil (2011, CHV, hereafter). [The dataset is available at https://www.aeaweb.org/articles?id=10.1257/aer.101.6.2754.]. The data comes from the 1979 National Longitudinal Survey of Youth (NLSY79), which surveys individuals born in 1957–1964 and includes basic demographic, economic and educational information for each individual. It also includes a well-known proxy for ability (beyond schooling and work experience): the Armed Forces Qualification Test (AFQT), which gives a measure usually understood as a proxy for their intrinsic ability for the respondent. This data has been used repeatedly to either control for or estimate the effects of ability in empirical studies in economics and other disciplines. See CHV for further details and references. The sample is composed of white males of ages between 28 and 34 years of old in 1991, at most 5 siblings, and with at least incomplete secondary education. We split the sample into individuals with high school dropouts and high school graduates, and individuals with some college, college graduates, and postgraduates. For each subsample, we consider the linear 26 regression model (1) with yi,n = log(wagesi ), where wagesi is the log wage in 1991 of unit i, xi,n = afqti denotes the (adjusted) standardized AFQT score for unit i, and wi,n collects several survey, geographic and dummy variables for unit i. In particular, wi,n includes the 14 covariates described in CHV (Table 2, p. 2763), a dummy variable for wether the education level was completed, eight cohort fixed effects, county fixed effects, and cohort-county fixed effects. For our illustration, we further restrict the sample to units in counties with at least 3 survey respondents, giving a total of Kn = 122 and n = 436 (Kn /n = 0.280, Mn = 0.422) for high school educated units and Kn = 123 and n = 452 (Kn /n = 0.272, Mn = 0.411) college educated units. The empirical findings are reported in Table 2. For high school educated individuals, we find an estimated returns to ability of β̂ = 0.060. The statistical significance of this effect, however, depends on the inference method employed. If homoskedastic consistent standard errors are used, then the effect is statistical significant (p-values are 0.010 and 0.029 for unadjusted and degrees-of-freedom adjusted standard errors, respectively). If heteroskedasticity consistent standard errors are used, the default method in most empirical studies, then the statistical significance depends on the which inference method is used; see Section 4.3. In particular, HC0 also gives a statistically significant result (p-value is 0.020), while HC1 and HC2 deliver marginal significance (both p-values are 0.048). On the other hand, HC3 and HC4 give p-values of 0.092 and 0.122, respectively, and hence suggest that the point estimate is not statistically distinguishable from zero. Finally, our proposed standard error, HCK, gives a p-value of 0.058, also making β̂ = 0.060 statistically insignificant at the conventional 5-pecent level. In contrast, for college educated individuals, we find an effect of β̂ = 0.091, and all inference methods indicate that this estimated returns to ability is statistically significant at conventional levels. In particular, HC3 and our proposed standard errors HCK give p-values of 0.037 and 0.017, respectively. This illustrative empirical application showcases the role of our proposed inference method for empirical work employing linear regression with possibly many covariates; in this application, Kn large relative to n (Kn /n ≈ 0.3 ) is quite natural due to the presence of many county 27 and cohort fixed effects. Specifically, when studying the effect of ability on earnings for high school educated individuals, the statistical significance of the results crucially depend on the inference methods used: as predicted by our theoretical findings, inference methods that are not robust to the inclusion of many covariates tend to deliver statistically significant results, while methods that are robust (HC3 is asymptotically conservative and HCK is asymptotically correct) do not deliver statistically significant results, giving an example where the empirical conclusion may change depending on whether the presence of many covariates is taken into account when conducting inference. In contrast, the empirical findings for college educated individuals appear to be statistically significant and robust across all inference methods. 7 Conclusion We established asymptotic normality of the OLS estimator of a subset of coefficients in high-dimensional linear regression models with many nuisance covariates, and investigated the properties of several popular heteroskedasticity-robust standard error estimators in this high-dimensional context. We showed that none of the usual formulas deliver consistent standard errors when the number of covariates is not a vanishing proportion of the sample size. We also proposed a new standard error formula that is consistent under (conditional) heteroskedasticity and many covariates, which is fully automatic and does not assume special, restrictive structure on the regressors. Our results concern high-dimensional models where the number of covariates is at most a non-vanishing fraction of the sample size. A quite recent related literature concerns ultra-high-dimensional models where the number of covariates is much larger than the sample size, but some form of (approximate) sparsity is imposed in the model; see, e.g., Belloni, Chernozhukov, and Hansen (2014), Farrell (2015), Belloni, Chernozhukov, Hansen, and Fernandez (2017), and references therein. In that setting, inference is conducted after covariate selection, where the resulting number of selected covariates is at most a vanishing fraction of the 28 sample size (usually much smaller). An implication of the results obtained in this paper is that the latter assumption cannot be dropped if post covariate selection inference is based on conventional standard errors. It would therefore be of interest to investigate whether the methods proposed herein can be applied also for inference post covariate selection in ultrahigh-dimensional settings, which would allow for weaker forms of sparsity because more covariates could be selected for inference. References Abadie, A., G. W. Imbens, and F. Zheng (2014): “Inference for Misspecified Models With Fixed Regressors,” Journal of the American Statistical Association, 109(508), 1601– 1614. Angrist, J., and J. Hahn (2004): “When to Control for Covariates? Panel Asymptotics for Estimates of Treatment Effects,” Review of Economics and Statistics, 86(1), 58–72. Belloni, A., V. Chernozhukov, D. Chetverikov, and K. Kato (2015): “On the Asymptotic Theory for Least Squares Series: Pointwise and Uniform Results,” Journal of Econometrics, 186(2), 345–366. Belloni, A., V. Chernozhukov, and C. Hansen (2014): “Inference on Treatment Effects after Selection among High-Dimensional Controls,” Review of Economic Studies, 81(2), 608–650. Belloni, A., V. Chernozhukov, C. Hansen, and I. Fernandez-Val (2017): “Program Evaluation and Causal Inference with High-Dimensional Data,” Econometrica, forthcoming. Bera, A. K., T. Suprayitno, and G. Premaratne (2002): “On Some Heteroskedasticity-robust Estimators of Variance-Covariance Matrix of the Least-squares Estimators,” Journal of Statistical Planning and Inference, 108, 121–136. Bickel, P. J., and D. A. Freedman (1983): “Bootstrapping Regression Models with Many Parameters,” in A Festschrift for Erich L. Lehmann, ed. by P. Bickel, K. Doksum, and J. Hodges. Chapman and Hall. Carneiro, P., J. J. Heckman, and E. J. Vytlacil (2011): “Estimating Marginal Returns to Education,” American Economic Review, 101(6), 2754–2781. 29 Cattaneo, M. D., and M. H. Farrell (2011): “Efficient Estimation of the DoseResponse Function under Ignorability using Subclassification on the Covariates,” in Missing-Data Methods: Cross-sectional Methods and Applications (Advances in Econometrics, vol. 27), ed. by D. Drukker, pp. 93–127. Emerald Group Publishing. (2013): “Optimal Convergence Rates, Bahadur Representation, and Asymptotic Normality of Partitioning Estimators,” Journal of Econometrics, 174(2), 127–143. Cattaneo, M. D., M. Jansson, and W. K. Newey (2017): “Alternative Asymptotics and the Partially Linear Model with Many Regressors,” Econometric Theory, forthcoming. Chen, X. (2007): “Large Sample Sieve Estimation of Semi-Nonparametric Models,” in Handbook of Econometrics, Volume VI, ed. by J. J. Heckman, and E. E. Leamer, pp. 5549–5632. Elsevier Science B.V. Chesher, A. (1989): “Hjek Inequalities, Measures of Leverage and the Size of Heteroskedasticity Robust Wald Tests,” Econometrica, 57(4), 971–977. Chesher, A., and I. Jewitt (1987): “The Bias of a Heteroskedasticity Consistent Covariance Matrix Estimator,” Econometrica, 55(5), 1217–1222. Cochran, W. G. (1968): “The Effectiveness of Adjustment by Subclassification in Removing Bias in Observational Studies,” Biometrics, 24(2), 295–313. Cribari-Neto, F., and M. da Gloria A. Lima (2011): “A Sequence of Improved Standard Errors under Heteroskedasticity of Unknown Form,” Journal of Statistical Planning and Inference, 141(11), 3617–3627. Cribari-Neto, F., S. L. P. Ferrari, and G. M. Cordeiro (2000): “Improved Heteroscedasticity-Consistent Covariance Matrix Estimators,” Biometrika, 87(4), 907– 918. Donald, S. G., and W. K. Newey (1994): “Series Estimation of Semilinear Models,” Journal of Multivariate Analysis, 50(1), 30–40. El Karoui, N., D. Bean, P. J. Bickel, C. Lim, and B. Yu (2013): “On Robust Regression with High-Dimensional Predictors,” Proceedings of the National Academy of Sciences, 110(36), 14557–14562. Farrell, M. H. (2015): “Robust Inference on Average Treatment Effects with Possibly More Covariates than Observations,” Journal of Econometrics, 189(1), 1–23. 30 Freedman, D. A. (1981): “Bootstrapping Regression Models,” Annals of Statistics, 9(6), 1218–1228. Gonalvez, S., and H. White (2005): “Bootstrap Standard Error Estimates for Linear Regression,” Journal of the American Statistical Association, 100(471), 970–979. Huber, P. J. (1973): “Robust Regression: Asymptotics, Conjectures, and Monte Carlo,” Annals of Stastistics, 1(5), 799–821. Kauermann, G., and R. J. Carroll (2001): “A Note on the Efficiency of Sandwich Covariance Matrix Estimation,” Journal of the American Statistical Association, 96(456), 1387–1396. Kline, P., and A. Santos (2012): “Higher order properties of the wild bootstrap under misspecification,” Journal of Econometrics, 171(1), 54–70. Koenker, R. (1988): “Asymptotic Theory and Econometric Practice,” Journal of Applied Econometrics, 3(2), 139–147. Li, C., and U. K. Müller (2017): “Linear Regression with Many Controls of Limited Explanatory Power,” working paper, Princeton University. Long, J. S., and L. H. Ervin (2000): “Using Heteroscedasticity Consistent Standard Errors in the Linear Regression Model,” The American Statistician, 54(3), 217–224. MacKinnon, J., and H. White (1985): “Some Heteroskedasticity-consistent Covariance Matrix Estimators with Improved Finite Sample Properties,” Journal of Econometrics, 29, 305–325. MacKinnon, J. G. (2012): “Thirty Years of Heteroskedasticity-Robust Inference,” in Recent Advances and Future Directions in Causality, Prediction, and Specification Analysis, ed. by X. Chen, and N. R. Swanson. Springer. Mammen, E. (1993): “Bootstrap and Wild Bootstrap for High Dimensional Linear Models,” Annals of Statistics, 21(1), 255–285. Müller, U. K. (2013): “Risk of Bayesian Inference in Misspecified Models, and the Sandwich Covariance Matrix,” Econometrica, 81(5), 1805–1849. Newey, W. K. (1997): “Convergence Rates and Asymptotic Normality for Series Estimators,” Journal of Econometrics, 79, 147–168. 31 Rosenbaum, P. R., and D. B. Rubin (1983): “The Central Role of the Propensity Score in Observational Studies for Causal Effects,” Biometrika, 70(1), 41–55. Shao, J., and C. F. J. Wu (1987): “Heteroscedasticity-Robustness of Jackknife Variance Estimators in Linear Models,” Annals of Statistics, 15(4), 1563–1579. Stock, J. H., and M. W. Watson (2008): “Heteroskedasticity-Robust Standard Errors for Fixed Effects Panel Data Regression,” Econometrica, 76(1), 155–174. Varah, J. M. (1975): “A Lower Bound for the Smallest Singular Value of a Matrix,” Linear Algebra and its Applications, 11(1), 3–5. Verdier, V. (2017): “Estimation and Inference for Linear Models with Two-Way Fixed Effects and Sparsely Matched Data,” Working paper, UNC. White, H. (1980): “A Heteroskedasticity-Consistent Covariance Matrix Estimator and a Direct Test for Heteroskedasticity,” Econometrica, 48(4), 817–838. Wu, C. F. J. (1986): “Jackknife, Bootstrap and Other Resampling Methods in Regression Analysis,” Annals of Statistics, 14(4), 1261–1295. Zheng, S., D. Jiang, Z. Bai, and X. He (2014): “Inference on multiple correlation coefficients with moderately high dimensional data,” Biometrika, 101(3), 748–754. 32 Table 1: Simulation Results (Model 1 in Supplemental Appendix). (a) Empirical Coverage HO0 Homoskedastic Model K/n = 0.001 K/n = 0.101 K/n = 0.201 K/n = 0.301 K/n = 0.401 Heteroskedastic Model K/n = 0.001 K/n = 0.101 K/n = 0.201 K/n = 0.301 K/n = 0.401 Gaussian Distributional Approximation HO1 HC0 HC1 HC2 HC3 HC4 HCK HO0 Bootstrap Distributional Approximation HO1 HC0 HC1 HC2 HC3 HC4 HCK 0.949 0.939 0.916 0.900 0.881 0.950 0.956 0.947 0.950 0.954 0.948 0.939 0.919 0.904 0.884 0.948 0.952 0.947 0.954 0.955 0.948 0.952 0.946 0.951 0.952 0.948 0.962 0.968 0.977 0.989 0.948 0.980 0.989 0.983 0.972 0.948 0.951 0.945 0.949 0.949 0.946 0.951 0.965 0.980 0.989 0.946 0.951 0.965 0.980 0.989 0.943 0.947 0.950 0.961 0.976 0.943 0.947 0.950 0.961 0.976 0.943 0.948 0.949 0.949 0.956 0.943 0.949 0.946 0.931 0.928 0.943 0.947 0.944 0.948 0.967 0.943 0.942 0.939 0.933 0.944 0.880 0.725 0.762 0.784 0.758 0.880 0.750 0.804 0.856 0.875 0.945 0.885 0.853 0.837 0.792 0.945 0.904 0.901 0.903 0.908 0.945 0.926 0.924 0.926 0.929 0.945 0.957 0.973 0.981 0.990 0.946 0.989 0.995 0.977 0.950 0.945 0.948 0.945 0.947 0.948 0.939 0.897 0.919 0.944 0.975 0.939 0.897 0.919 0.944 0.975 0.937 0.916 0.919 0.936 0.962 0.937 0.906 0.909 0.926 0.962 0.937 0.907 0.908 0.919 0.936 0.937 0.909 0.907 0.903 0.900 0.937 0.902 0.908 0.920 0.953 0.937 0.919 0.920 0.920 0.926 33 (b) Interval Length HO0 Homoskedastic Model K/n = 0.001 K/n = 0.101 K/n = 0.201 K/n = 0.301 K/n = 0.401 Heteroskedastic Model K/n = 0.001 K/n = 0.101 K/n = 0.201 K/n = 0.301 K/n = 0.401 Gaussian Distributional Approximation HO1 HC0 HC1 HC2 HC3 HC4 HCK HO0 Bootstrap Distributional Approximation HO1 HC0 HC1 HC2 HC3 HC4 HCK 0.148 0.148 0.148 0.148 0.148 0.148 0.156 0.166 0.177 0.192 0.148 0.148 0.149 0.150 0.150 0.148 0.157 0.167 0.179 0.194 0.148 0.156 0.165 0.177 0.191 0.148 0.165 0.185 0.212 0.247 0.148 0.186 0.225 0.219 0.213 0.148 0.156 0.165 0.177 0.190 0.148 0.161 0.180 0.210 0.260 0.148 0.161 0.180 0.210 0.260 0.149 0.158 0.170 0.189 0.223 0.149 0.158 0.170 0.189 0.223 0.149 0.158 0.169 0.182 0.200 0.149 0.158 0.167 0.172 0.174 0.149 0.158 0.166 0.180 0.212 0.149 0.157 0.164 0.174 0.189 0.148 0.148 0.148 0.148 0.148 0.148 0.156 0.166 0.177 0.191 0.186 0.213 0.187 0.170 0.159 0.186 0.225 0.209 0.203 0.206 0.186 0.241 0.226 0.219 0.220 0.186 0.273 0.276 0.287 0.310 0.187 0.357 0.353 0.278 0.239 0.186 0.254 0.244 0.240 0.241 0.186 0.243 0.243 0.259 0.300 0.186 0.243 0.243 0.259 0.300 0.188 0.264 0.252 0.254 0.276 0.188 0.264 0.252 0.254 0.276 0.188 0.266 0.251 0.244 0.248 0.188 0.268 0.248 0.232 0.218 0.188 0.273 0.251 0.247 0.269 0.188 0.269 0.249 0.239 0.243 Notes: (i) DGP is Model 1 from the supplemental appendix, sample size is n = 700, number of bootstrap replications is B = 500, and number of simulation replications is S = 5, 000; (ii) Columns HO0 and HO1 correspond to confidence intervals using homoskedasticity consistent standard errors without and with degrees of freedom correction, respectively, columns HC0–HC4 correspond to confidence intervals using the heteroskedasticity consistent standard errors discussed in Sections 2 and 4.3, and columns HCK correspond to confidence intervals using our proposed standard errors estimator. Table 2: Empirical Application (Returns to Ability, AFQT Score). (b) College Education (a) Secondary Education Outcome: β̂ HO0 HO1 HC0 HC1 HC2 HC3 HC4 HCK Kn n Kn /n Mn log(wages) Outcome: 0.060 Std.Err. 0.023 0.028 0.026 0.030 0.030 0.036 0.039 0.032 β̂ p-value 0.010 0.029 0.020 0.048 0.048 0.092 0.122 0.058 HO0 HO1 HC0 HC1 HC2 HC3 HC4 HCK 122 436 0.280 0.422 Kn n Kn /n Mn 34 log(wages) 0.091 Std.Err. 0.032 0.038 0.033 0.039 0.038 0.044 0.048 0.038 123 452 0.272 0.411 p-value 0.005 0.016 0.006 0.018 0.016 0.037 0.058 0.017
10math.ST
arXiv:1801.03895v1 [cs.IT] 11 Jan 2018 On Locally Decodable Index Codes Lakshmi Natarajan Prasad Krishnan and V. Lalitha Department of Electrical Engineering Indian Institute of Technology Hyderabad Sangareddy 502 285, India Email: [email protected] Signal Processing & Communications Research Center International Institute of Information Technology Hyderabad Hyderabad 500 032, India Email: {prasad.krishnan, lalitha.v}@iiit.ac.in Abstract—Index coding achieves bandwidth savings by jointly encoding the messages demanded by all the clients in a broadcast channel. The encoding is performed in such a way that each client can retrieve its demanded message from its side information and the broadcast codeword. In general, in order to decode its demanded message symbol, a receiver may have to observe the entire transmitted codeword. Querying or downloading the codeword symbols might involve costs to a client – such as network utilization costs and storage requirements for the queried symbols to perform decoding. In traditional index coding solutions, this client aware perspective is not considered during code design. As a result, for these codes, the number of codeword symbols queried by a client per decoded message symbol, which we refer to as ‘locality’, could be large. In this paper, considering locality as a cost parameter, we view index coding as a trade-off between the achievable broadcast rate (codeword length normalized by the message length) and locality, where the objective is to minimize the broadcast rate for a given value of locality and vice versa. We show that the smallest possible locality for any index coding problem is 1, and that the optimal index coding solution with locality 1 is the coding scheme based on fractional coloring of the interference graph. We propose index coding schemes with small locality by covering the side information graph using acyclic subgraphs and subgraphs with small minrank. We also show how locality can be accounted for in conventional partition multicast and cycle covering solutions to index coding. Finally, applying these new techniques, we characterize the locality-broadcast rate trade-off of the index coding problem whose side information graph is the directed 3-cycle. I. I NTRODUCTION The fundamental communication problem in broadcast channels is to design an efficient coding scheme to satisfy the demands of multiple clients with minimal use of the shared communication medium. Remarkable savings in the broadcast channel use is possible if clients or receivers have prior information stored in their caches that are demanded by other users in the network. This could happen, for instance, when the clients are allowed to listen to prior transmissions from the server. For such broadcast channels with side-information, Index Coding was proposed by Birk and Kol in [1]. The idea of Index Coding is to broadcast a coded version of information symbols from the server so that all the receivers can simultaneously decode their demands from the broadcast codeword and their individual side-information symbols. Of the several classes of index coding problems discussed in the literature since [1], the most widely studied is unicast index coding, in which each message symbol available at the server is demanded by a unique client. The side information configuration of a unicast index coding problem is often represented using a directed graph called the side-information graph of the problem. Given such a side-information graph, the goal of index coding is to design optimal index codes in terms of minimizing the channel usage. In [2], the authors connected the optimal (scalar) linear index coding problem to finding a quantity called minrank of the side-information graph. This minrank problem is known to be NP-hard in general [3], but several approaches have been taken to address this problem, most popularly via graph theoretic ideas, to bound the optimal index coding rate from above and below; see, for example, [1], [2], [4]–[14]. The techniques used in these works naturally lead to constructions of (scalar and vector) linear index codes. Most of the known constructions in index coding literature assume that the clients will download all the symbols in the transmitted codeword in order to decode their demanded symbol. In practice, this could be prohibitive, since the length of the codeword can be much larger than that of the message demanded at a receiver, especially when the number of users is large and their demands are varied. We may however expect this situation to be the norm in our current and future wireless networks. In light of this, it may be appropriate to use index codes in which each client can decode its demand by accessing only a subset of the codeword symbols. Using the terminology from [15], we refer to such codes as locally decodable index codes. Designing a locally decodable index code can be thought of as a ‘client aware’ approach to the broadcast problem that takes into account the overhead incurred by the clients while participating in the communication protocol, while conventional index coding (without locality considerations) is more ‘channel centric’ with its emphasis purely on minimizing the number of channel uses. Locally decodable index codes have been discussed briefly in [15] and in the context of privacy in [16]. However, a fundamental treatment of the same is not available in the literature to the best of our knowledge. A. Contributions and Organization In this work, we present a formal structure to the discussion regarding locally decodable index codes and present several constructions of such codes along with their locality parameters for the class of unicast index coding. We first define the locality of an index code as the number of codeword symbols queried by a receiver for each demanded information symbol, and pose the index coding problem as that of minimizing the broadcast rate (ratio of codeword length to message length) for a given desired value of locality (Section II). We then show that the minimum locality of any unicast index coding problem is 1, and the optimum index code for this value of locality is the code derived from the optimum fractional coloring of the interference graph of the given problem (Section III). We then provide several constructions of locally decodable index codes by covering the side-information graph using acyclic subgraphs and subgraphs of small minrank. We also show how the traditional partition multicast [1], [7] and cycle covering [6], [9] solutions to index coding can be modified to yield locally decodable index codes (Section IV). Using these coding techniques and information-theoretic inequalities we derive the exact trade-off between locality and broadcast rate of the 3-user unicast index coding problem whose side information graph is a directed cycle (Section V). Finally in Section VI we discuss the relation of locally decodable index codes with the problems of sparse representation of vectors and privacy-preserving index codes and conclude the paper. Notation: For any positive integer N , we will denote the set {1, . . . , N } by [N ]. Row vectors will be denoted by bold lower case letters, for example x . For any length N vector x = (x1 , . . . , xN ) and a set R ⊂ [N ], we define x R to be the sub-vector (xj , j ∈ R). For a set of vectors x 1 , . . . , x N and a xj , j ∈ K). subset K ⊂ [N ], we define x K to be the vector (x The empty set is denoted by ∅. For a matrix A , the component in j th row and ith column is denoted as A j,i . II. D EFINITIONS AND P RELIMINARIES The index coding problem [1], [2] consists of a single transmitter jointly encoding N independent messages x 1 , . . . , x N to broadcast a codeword c to multiple receivers through a noiseless broadcast channel. We consider the family of unicast index coding problems, where each message xi is desired at exactly one of the receivers, denoted as (i, Ki ), where Ki ⊂ [N ] is the set of indices of the messages already known to the receiver as side information. Without loss of generality, we assume that i ∈ / Ki . The side information graph of this index coding problem is the directed graph G = (V, E), where the vertex set V = [N ] and the edge set E = {(i, j) | for all j ∈ Ki , i ∈ [N ]}. Throughout this paper we will consider only unicast index coding problems and denote a problem by its side information graph G. We assume that the messages x 1 , . . . , x N are vectors of length m over a finite alphabet A, with |A| > 1, and the codeword c is a vector of length ` over the same alphabet, i.e., x i ∈ Am , i ∈ [N ], and c ∈ A` . We will assume that the alphabet A is arbitrary but fixed for a given index coding problem. The transmitted codeword c = (c1 , c2 , . . . , c` ) is a function x1 , . . . , x N ), where E : AmN → of the messages c = E(x A` denotes the encoder. Instead of observing the entire codeword c , the ith receiver observes only a sub-vector c Ri = (cj , j ∈ Ri ), where Ri ⊂ [`], and the receiver desires to estimate the message x i using c Ri and its side information x j , j ∈ Ki . The decoder at the ith receiver is a function Di : A|Ri | × Am|Ki | → Am , and the estimate of the message x i at the ith receiver (i, Ki ) xj , j ∈ Ki )). The tuple (E, D1 , . . . , DN ) of enis Di (ccRi , (x coding and decoding functions denotes a valid index code for the index coding problem represented by the side information xj , j ∈ Ki )) = x i for all i ∈ graph G = (V, E) if Di (ccRi , (x x1 , . . . , x N ) ∈ AmN , where c = E(x x1 , . . . , x N ). [N ] and all (x The receiver (i, Ki ) decodes x i using the sub-vector c Ri , and hence, |Ri | is the number of symbols queried or downloaded by this receiver when using the index code (E, D1 , . . . , DN ). For fairness, we normalize |Ri | by the number of symbols m in the desired message x i to define the locality ri of the ith receiver as ri = |Ri |/m, for i ∈ [N ]. Definition 1. The locality or the overall locality of the index code (E, D1 , . . . , DN ) r = max ri = max i∈[N ] i∈[N ] |Ri | m (1) is the maximum number of coded symbols queried by any of the N receivers per decoded information symbol. The broadcast rate of this index code is β = `/m, and measures the bandwidth or time required by the source to broadcast the coded symbols to all the receivers. Without loss of generality we will consider only those index codes for which R1 ∪ · · · ∪ RN = [`] since any codeword symbol cj which is not utilized at any of the receivers, i.e., cj for j ∈ [`] \ (R1 ∪ · · · ∪ RN ), need not be generated or transmitted by the encoder. For a given locality r, it is desirable to use an index code with as small a value of β as possible and vice versa, which leads us to the following definition. Definition 2. Given a unicast index coding problem G, the ∗ optimal broadcast rate function βG (r) is the infimum of the broadcast rates among all message lengths m ≥ 1 and all valid index codes with locality at the most r. ∗ The function βG (r) captures the trade-off between the reduction in the number of channel uses possible through coding and the number of codeword symbols that a receiver has to query to decode each message symbol. We will rely on information-theoretic inequalities to obtain ∗ bounds on βG (r), and to do so we will assume that the messages x 1 , . . . , x N are random, independent of each other and are uniformly distributed in Am . The logarithms used in measuring mutual information and entropy will be calculated xi ) = m to the base |A|. For example, the entropy of x i is H(x since x i is uniformly distributed in Am . ∗ We will now prove some properties of βG (r). Lemma 1. The locality r of any valid index coding scheme satisfies r ≥ 1. xi ; c Ri , x Ki ) = Proof: This can be shown using the fact I(x xi ) = m, which arises when considering the decoder at the H(x III. F RACTIONAL C OLORING IS O PTIMAL FOR r = 1 The smallest possible locality for any index coding problem is r = 1. We will now show that the optimal index coding scheme with locality r = 1 is the scheme based on fractional coloring of the interference graph corresponding to the problem. We first recall some graph-theoretic terminology related to index coding as used in [5], [10], and then prove the optimality of fractional coloring in Sections III-B and III-C. A. Preliminaries ∗ (r) and the locality r Fig. 1. The trade-off between the broadcast rate βG for the index coding problem represented by the 3-cycle G. ith receiver. Since x i is independent of x Ki (because i ∈ / Ki ), xi ; x K ) = 0, and I(x xi ; c Ri , x Ki ) = I(x xi ; x Ki ) + I(x xi ; c Ri |x x Ki ) m = I(x xi ; c Ri |x xKi ) ≤ H(ccRi ) ≤ |Ri |. = I(x (2) Hence, ri = |Ri |/m ≥ 1 for all i ∈ [N ], and r ≥ 1. x1 , . . . , x N ), is a Note that uncoded transmission, i.e., c = (x valid index code with r = 1. Hence, we will assume that the ∗ is the interval 1 ≤ r < ∞. domain of the function βG ∗ (r) is convex and non-increasing. Lemma 2. The function βG Proof: See Appendix A. For any valid index code, we have |Ri | ≤ `, and hence, r = maxi |Ri |/m ≤ `/m = β. Hence, if there exists a valid index code with broadcast rate β, then its locality is at the most β, and hence, ∗ βG (β) ≤ β. (3) We will denote by βopt (G) the infimum among the broadcast rates of all valid index codes for G (considering all possible message lengths m ≥ 1 and all possible localities r ≥ 1). ∗ Then it follows that βG (r) ≥ βopt for all r ≥ 1. Together with (3), choosing β = βopt , we deduce ∗ βG (βopt ) = βopt . (4) Example 1. Locality-broadcast rate trade-off of the directed 3-cycle. Let G be the directed 3-cycle, i.e., N = 3 and the three receivers (i, Ki ) are (1, {2}), (2, {3}) and (3, {1}). We show in Section V that for this index coding problem ∗ βG (r) = max{6 − 3r, 2} for all r ≥ 1. This function is shown in Fig. 1. We observe that in order to achieve any savings in rate compared to the uncoded transmission (β = N = 3), we necessarily require the locality to be strictly greater than 1, i.e., each receiver must necessarily query more codeword symbols than the message length to achieve savings in the broadcast channel uses. Also, the smallest locality required to achieve the minimum rate βopt = 2 is r = 4/3. The underlying undirected side information graph Gu = (V, Eu ) of the side information graph G = (V, E) is the graph with vertex set V = [N ] and an undirected edge set Eu = { {i, j} | (i, j), (j, i) ∈ E}, i.e., {i, j} ∈ Eu if and only if i ∈ Kj and j ∈ Ki . The interference graph Ḡu = (V, Ēu ) is the undirected complement of the graph Gu , i.e., Ēu = { {i, j} | {i, j} ∈ / Eu }. Note that {i, j} ∈ Ēu if and only if either i ∈ / Kj or j ∈ / Ki . (5) For positive integers a and b, an a : b coloring of the undirected graph Ḡu = (V, Ēu ) is a set {C1 , C2 , . . . , CN } of N subsets C1 , . . . , CN ⊂ [a], such that |C1 | = · · · = |CN | = b and Ci ∩Cj = ∅ if {i, j} ∈ Ēu . The elements of [a] are colors, and each vertex of Ḡu is assigned b colors such that no two adjacent vertices have any colors in common. The fractional chromatic number χf of the undirected graph Ḡu is o na a : b coloring of Ḡu exists . χf (Ḡu ) = min b The fractional chromatic number is a rational number and can be obtained as a solution to a linear program [17]. The chromatic number χ(Ḡu ) of the graph Ḡu is the smallest integer a such that an a : 1 coloring of Ḡu exists. In general, we have χf (Ḡu ) ≤ χ(Ḡu ). The main result of this section is Theorem 1. For any unicast index coding problem G, the ∗ (1) = χf (Ḡu ). optimal broadcast rate for locality r = 1 is βG B. Proof of achievability for Theorem 1 It is well known that there exists a coding scheme, called the fractional clique covering or fractional coloring solution, for any index coding problem G with broadcast rate β = χf (Ḡu ), see [5]. It is straightforward to observe that r = 1 for this coding scheme; see Appendix B for details. It then follows ∗ that βG (1) ≤ χf (Ḡu ). C. Proof of converse for Theorem 1 Consider any valid index code (E, D1 , . . . , DN ), possibly non linear, for G with locality r = 1, message length m and codeword length `. We will now show that the broadcast rate of this index code is at least χf (Ḡu ). Since r = 1, from (1) and (2), we deduce that |R1 | = · · · = |RN | = m for this valid index code. Lemma 3. For any i ∈ [N ] and any P ⊂ [N ] such that i ∈ / P, xKi ∪P ) = m; (ii) H(ccRi |x xi , x Ki ) = 0; we have (i) I(ccRi ; x i |x xP ) = m. and (iii) H(ccRi |x xKi ∪P ) = Proof: We first observe that I(ccRi ; x i |x xi |x xKi ∪P ) − H(x xi |ccRi , x Ki ∪P ). Since i ∈ H(x / Ki ∪ P , x i is independent of x Ki ∪P . Also, x i can be decoded using c Ri and xi |x xKi ∪P ) = m and H(x xi |ccRi , x Ki ∪P ) = 0, x Ki . Hence, H(x thereby proving part (i). Using the result in part (i) and decomposing the mutual xKi ∪P ), we have information term I(ccRi ; x i |x xKi ∪P ) − H(ccRi |x xi , x Ki ∪P ). m = H(ccRi |x (6) xKi ∪P ) ≤ m. Since c Ri is a length m vector, we have H(ccRi |x xi , x Ki ∪P ) ≥ 0. Considering these facts together Also, H(ccRi |x with (6), we deduce that xi , x Ki ∪P ) = 0 and H(ccRi |x xKi ∪P ) = m. H(ccRi |x (7) Observe that (7) holds for any choice of P such that i ∈ / P. Choosing P = ∅ in the first equality in (7) proves part (ii) of this lemma. Now using the fact that c Ri is of length m, and the second equality in (7), we have xP ) ≥ H(ccRi |x xKi ∪P ) = m. m ≥ H(ccRi ) ≥ H(ccRi |x IV. D ESIGNING L OCALLY D ECODABLE I NDEX C ODES We will assume that the alphabet A is a finite field Fq of size q. An index code is called vector linear if the encoder E : FmN → F`q is an Fq -linear map. A vector linear index q code with m = 1 is said to be scalar linear. First, we will briefly recall the relevant properties of scalar linear index codes from [2], [18], and in the rest of this section we provide constructions of index codes with small locality. A. Preliminaries xP ) = m, proving part (iii). This shows that H(ccRi |x Given a unicast index coding problem G, a matrix A ∈ is said to fit G if: (i) A i,i = 1 for all i ∈ [N ], and (ii) A j,i = 0 for all i 6= j such that j ∈ / Ki . A matrix B ∈ FqN ×` serves as a valid scalar linear encoding matrix for the index coding problem G if and only if there exists an A ∈ FqN ×N such that A fits G and the column space of B contains the column space of A (follows from [18, Remark 4.6]). The encoder generates the codeword as c = xB . The decoding at the ith receiver proceeds as follows. Denote the N columns of A as a T1 , . . . , a TN , where the superscript T denotes the transpose operation, and each a i is a row vector. Since a Ti belongs to the column space of B , there exists a . The receiver computes vector d i ∈ F`q such that a Ti = B d Ti P cd Ti which equals xBd Ti = xa Ti = j∈[N ] xj A j,i . Since A P fits G, we have cd Ti = xi + j∈Ki xj Aj,i . Using the side inP formation, the receiver can recover xi as cd Ti − j∈Ki xj A j,i . In order to compute cd Ti , the ith receiver needs to observe only those components of c which correspond to the nonzero entries of d Ti . Hence, the locality of the ith receiver is ri = wt(ddi ), i.e., the Hamming weight of d i . If a Ti is one of the columns of the encoding matrix B , then d i can be chosen such that wt(ddi ) = 1 resulting in ri = 1. If B does not contain a Ti as one of its columns, then we have the naive upper bound ri = wt(ddi ) ≤ `. For a given side information graph G, the smallest rank ×N among all matrices A ∈ FN that fit G is called the minrank q of G over Fq and is denoted as κq (G). The minimum broadcast rate among scalar linear codes is κq (G) and can be achieved by using any matrix B whose columns form a basis of the column space of a rank-κq (G) matrix A that fits G. FqN ×N Lemma 4. For any {i, j} ∈ Ēu , we have Ri ∩ Rj = ∅. Proof: Using (5), we will assume without loss of generality that j ∈ / Ki . We will now assume that Ri ∩ Rj 6= ∅ and prove the lemma by contradiction. Let t ∈ Ri ∩ Rj and P = {i} ∪ Ki . From part (ii) of Lemma 3, we have xi , x Ki ) = 0. In particular, since t ∈ Ri , we have H(ccRi |x xi , x Ki ) = H(ct |x xP ) = 0. H(ct |x Proof: The achievability result is similar to the arguments used in Appendix B with the additional restriction that the subsets of colors C1 , . . . , CN are all of size m. Converse follows by recognizing that the set of subsets {R1 , . . . , RN } is an ` : m coloring of Ḡu . In [15] it is remarked that the optimal broadcast rate with r = 1 among scalar linear index codes over a finite field (i.e., ` m = 1, A = Fq and the encoder E : FN q → Fq is a linear transform) is the chromatic number χ(Ḡu ). Our results in this section provide a strong generalization of this remark. (8) Note that j ∈ / P since j 6= i and j ∈ / Ki . From part (iii) of xP ) = m. This implies that Lemma 3, we observe that H(ccRj |x for any given realization of x P , the vector c Rj is uniformly distributed over Am . Hence, the m coordinates of c Rj are independent and uniformly distributed over A. Since t ∈ Rj , we conclude that for any given realization of x P , ct is xP ) = 1 which uniformly distributed over A, and hence, H(ct |x contradicts (8). Lemma 5. For any valid index coding scheme for G with r = 1, the broadcast rate β ≥ χf (Ḡu ). Proof: From Lemma 4, the subsets R1 , . . . , RN ⊂ [`] are such that Ri ∩ Rj = ∅ if {i, j} ∈ Ēu and |Ri | = m for all i ∈ [N ]. Hence, {R1 , . . . , RN } is an ` : m coloring of Ḡu . ` Consequently, the broadcast rate β = m ≥ χf (Ḡu ). Combining the converse result in Lemma 5 with the achievability result in Section III-B, we arrive at Theorem 1. D. Corollary and remarks Theorem 1 can be easily generalized to the case where the message length m is fixed. Corollary 1. The optimal broadcast rate for index coding problem G with locality r = 1 and message length m is na o min an a : m coloring of Ḡu exists . m B. Separation based coding scheme We first consider a separation based scalar linear index coding technique over Fq for a unicast problem G where the encoder matrix B is the product of two matrices: an optimal index coding matrix B 0 with number of columns equal to κq (G), and the parity-check matrix H of a covering code C with co-dimension κq (G). The linear code C is chosen such that its covering radius is equal to the desired locality r, i.e., Hamming spheres of radius r centered around the codewords of C cover the entire Hamming space. Among all covering codes over Fq with covering radius r and co-dimension κq (G) we choose the one with the smallest possible blocklength nq (r, κq (G)). Following a well known property of covering codes, we observe that any column vector of length κq (G) over Fq is some linear combination of at the most r columns of H . Thus, if A is a fitting matrix corresponding to B 0 , every column of A can be expressed as a linear combination of at the most r columns of the matrix B = B 0H . Thus, B is a valid scalar linear encoder matrix for G with locality r and blocklength nq (r, κq (G)). C. Codes from acyclic induced subgraph covers of G In this section we will provide a technique to construct vector linear codes of small locality by using the acyclic induced subgraphs of G. For any subset S ⊂ [N ] of vertices of G, let GS denote the subgraph of G induced by S. We will require the following result. Lemma 6. Let the subgraph GS of G induced by the subset S ⊂ [N ] be a directed acyclic graph. If there exists is a valid scalar linear encoding matrix for G with codelength `, then there exists a scalar linear index code with codelength ` for G such that the locality of every receiver i ∈ S is ri = 1. ×` be a valid encoding matrix. Then Proof: Let B ∈ FN q ×N that fits G there exists a matrix A = [ a T1 · · · a TN ] ∈ FN q and whose column space is contained in the column space of B . Since GS is directed acyclic, there exists a topological ordering i1 , . . . , i|S| of its vertex set S = {i1 , . . . , i|S| }, i.e., for any 1 ≤ a < b ≤ |S|, there exist no directed edge (ib , ia ) in GS , and hence, G does not contain the edge (ib , ia ). It follows that for any choice of 1 ≤ a < b ≤ |S|, ia ∈ / Kib , and hence, th row and i column is A the entry of A at ith ia ,ib = 0. Further, a b for any 1 ≤ a ≤ |S|, A ia ,ia = 1 since the diagonal entries of A are equal to 1. Let E be the |S|×|S| square submatrix of A composed of the rows and columns indexed by S. It follows that if the rows and columns of E are permuted according to the topological ordering i1 , . . . , i|S| , then E is lower triangular and all the entries on its main diagonal are equal to 1. Thus E is a full-rank matrix, and hence, the columns a Ti1 , . . . , a Ti|S| of A are linearly independent. ×` Consider a matrix B 0 ∈ FN constructed as follows. Let q 0 the first |S| columns of B be a Ti1 , . . . , a Ti|S| . The remaining ` − |S| columns of B 0 are chosen from among the columns of B such that the column spaces of B 0 and B are identical. This is possible since a Ti1 , . . . , a Ti|S| are linearly independent and are contained in the column space of B . By construction, the column space of B 0 contains the column space of A , and hence, B 0 is a valid scalar linear index coding matrix for G. Also, for any i ∈ S, the ith column of A is a column of B 0 , and hence, the locality ri of the ith receiver is equal to 1. This completes the proof. Definition 3. A set of M subsets S1 , . . . , SM ⊂ [N ] of the vertex set of the side information graph G is a Q-fold acyclic induced subgraph (AIS) cover of G if (i) S1 ∪ · · · ∪ SM = [N ], (ii) each i ∈ [N ] is an element of at least Q of the M subsets S1 , . . . , SM , and (iii) all the M induced subgraphs GS1 , . . . , GSM are acyclic. Given an AIS cover S1 , . . . , SM of G and a scalar linear index code of length ` for G, we construct a vector linear code as follows. From Lemma 6, we know that for each j ∈ [M ], there exists a valid scalar linear encoding matrix B j with codelength ` such that the locality of every receiver i ∈ Sj is 1. Consider a vector linear index code that encodes M independent instances of the scalar messages x1 , . . . , xN ∈ Fq using the encoding matrices B 1 , . . . , B M , respectively. The broadcast rate of this scheme is `. If S1 , . . . , SM is a Q-fold AIS cover of G, for each i ∈ [N ], there exist Q scalar linear encoders among B 1 , . . . , B M that provide locality 1 at the ith receiver. The locality provided by the remaining (M − Q) encoders is at most ` at this receiver. Thus the number of encoded symbols queried by any receiver in the vector linear coding scheme is at the most Q + (M − Q)`. Normalizing this by the number of message instances M , we observe that the −Q)` . Thus, we locality of this scheme is at the most Q+(M M have proved Theorem 2. If there exists a Q-fold AIS cover of G consisting of M subsets of its vertex set, and if there exists a scalar linear index code of length ` for G, then there exists a vector linear code for G with broadcast rate `, message length m = M , and locality at the most (Q + (M − Q)`)/M , and hence,   Q + (M − Q)` ∗ βG ≤ `. M As an application of Theorem 2, consider the following coding scheme. Let the parameter t ≥ 1 be such that the side information graph  G contains no cycles of length t or less. With M = Nt , let S1 , . . . , SM be the set of all subsets of [N ] of size t. The subgraph of G induced by Sj , for any j ∈ [M ], is acyclic since  |Sj | = t. Further, each i ∈ [M ] is an −1 element of Q = Nt−1 of the M subsets S1 , . . . , SM . Hence the resulting locality is (Q + (M − Q)`)/M which can easily be shown to be equal to (t + (N − t)`)/N . Hence, we have Corollary 2. If G contains no cycles of length t or less, and if there exists a scalar linear index code of length ` for G, then we can achieve broadcast rate ` with locality (t+(N −t)`)/N . Using Corollary 2 we can immediately prove the following results. Lemma 7. Let G be any unicast index coding problem with a valid scalar linear index code of length `. Then there exists a vector linear index code for G with message length m = N , broadcast rate β = ` and locality r = (1 + (N − 1)`)/N . Proof: Use t = 1 in Corollary 2. Lemma 8. If G is a directed cycle of length N , then there exists a vector linear coding scheme for G such that the length of each message vector is m = N , broadcast rate β = N − 1 and locality r = 2(N − 1)/N . Proof: We know that the optimal scalar linear index code for G has length ` = κq (G) = N − 1. Also, with t = N − 1, G contains no cycles of length t or less. The lemma follows by using Corollary 2. When the side information graph is a cycle the optimal broadcast rate βopt = N −1. Lemma 8 shows that this optimal rate can be achieved with a locality of 2(N − 1)/N , which is strictly less than 2. Example 2. Let G = (V, E) be the directed cycle of length N = 3, i.e, V = {1, 2, 3} and E = {(1, 2), (2, 3), (3, 1)}. ∗ From Lemma 8, βG (4/3) ≤ 2. Also, it is well known that the optimal scalar linear index code with ` = κq = 2 is also optimal among all possible ∗ index codes for this G, i.e., βopt = 2. From (4), βG (2) = 2. ∗ ∗ Since βG is a non-increasing function, we have 2 = βG (2) ≤ ∗ ∗ βG (4/3) ≤ 2, and hence, βG (4/3) = 2. D. Codes for symmetric side information problems We will now construct vector linear index codes for side information graphs G that satisfy a symmetry property. Consider the permutation σ on the set [N ] that maps i ∈ [N ] to σ(i) = i mod N + 1. In this subsection we will assume G to be any directed graph with vertex set [N ] such that σ is an automorphism of G. Such unicast index coding problems have been considered before, see [13], and are related to topological interference management [19]. First we require the following definition. Definition 4. We say that a set of M matrices B 1 , . . . , B M ∈ FNq ×` is (M, Q)-balanced for G for some integer Q if ×N (i) there exist M matrices A 1 , . . . , A M ∈ FN such that q for each i ∈ [N ], A i fits G and the column spaces of A i and B i are identical; and (ii) for each i ∈ [N ], there exist at least Q distinct indices j ∈ [N ] such that the ith column of A j is a column of Bj. Observe that if B 1 , . . . , B M is an (M, Q)-balanced set for G, then each of these matrices is a valid scalar linear index code for G. Also, from the second part of the definition, for at least Q of these codes the locality of the ith receiver is 1. Now consider the vector linear index coding scheme that is obtained by time-sharing the M codes corresponding to B 1 , . . . , B M with equal time shares. Since all the M scalar index codes have broadcast rate `, the broadcast rate of the overall time-sharing scheme is also `. For any receiver i ∈ [N ], there exist at least Q scalar codes for which the locality at this receiver is 1, and for the remaining (M −Q) codes the locality of this receiver is at the most `. Hence, for the overall time sharing scheme, the −Q)` locality of any receiver is at the most Q+(M = `− Q(`−1) , M M which is less than the broadcast rate `. We summarize this result as Theorem 3. If there exists  a set of (M, Q)-balanced N × ` Q+(M −Q)` ∗ matrices for G then βG ≤ `. M Based on the above theorem we derive the following result which holds for any index coding problem with symmetric side information graph G. Theorem 4. If the cyclic permutation σ is an automorphism of G and if κq is the minrank of G over Fq , then   κq (N − κq + 1) ∗ ≤ κq . βG N Proof: Suppose A ∈ FqN ×N fits G is of rank ` = κq (G) and let B be an N × ` matrix composed of a set of ` linearly independent columns of A . Note that when B is used as a scalar linear index code there exist ` receivers with locality 1 since ` columns of A appear as columns of B . Let P be the permutation matrix obtained by cyclically shifting down the rows of the N × N identity matrix by one position. It is straightforward to verify that P AP T fits the graph σ(G). Since σ is an automorphism of G, we have σ(G) = G, and hence, P AP T fits G. Since the column space of P B is identical to that of P AP T , P B represents a valid scalar linear index code for G. Using this argument iteratively P i )T we deduce that for any i ∈ [N ], the matrix A i = P iA (P fits G, and the column space of B i = P iB is identical to that of A i . Further, using a counting argument, we observe that for any i ∈ [N ], there exist ` distinct values of j such that the ith column of A j is a column of B j . Hence, B 1 , . . . , B N is an (N, `)-balanced set for G, and the statement of this theorem follows from Theorem 3. E. Codes from optimal coverings of G Several index coding schemes in the literature partition the given index coding problem (side information graph G) into subproblems (subgraphs of G), and apply a pre-defined coding technique on each of these subproblems independently. The overall codelength is the sum of the codelengths of the individual subproblems. The broadcast rate is then reduced by optimizing over all possible partitions of G. We will now quickly recall a few such covering-based index coding schemes, and then show how they can be modified to guarantee locality. Let G be the side information graph of any given index coding problem where the side information index set of receiver i is Ki ⊂ [N ]. Partition Multicast: The partition multicast or the partial clique covering scheme uses the transpose of the parity-check matrix of an appropriate maximum distance separable (MDS) code to encode each subgraph of G [1], [7], [8], [11], [12]. Specifically let GS be the subgraph of G induced by the subset of vertices S ⊂ [N ]. The number of information symbols in the index coding problem GS is |S|, and the side information of receiver i ∈ S in GS is Ki ∩ S. The partition multicast scheme uses a scalar linear encoder for GS where the encoding matrix is the transpose of the parity-check matrix of an MDS code of length |S| and dimension mini∈S |Ki ∩ S|. This code for GS encodes messages of length mS = 1 and has codelength `S = |S| − mini∈S |Ki ∩ S|. We will use the trivial value of locality rS = `S for this coding scheme. The finite field Fq must be sufficiently large to guarantee that the MDS codes of required blocklength and dimension exist for every possible choice of S ⊂ [N ]. Cycle Covering: The cycle covering scheme [6], [9] considers subgraphs GS which form a cycle of length |S|. If GS is a directed cycle of length |S|, then it is encoded using a scalar linear index code with encoding matrix equal to the transpose of the parity-check matrix of a repetition code of length |S|, resulting in message length mS = 1 and index codelength `S = |S| − 1. Again, we will use the trivial value of locality rS = `S . If GS is not a directed cycle, then the corresponding information symbols are transmitted uncoded resulting in mS = 1, `S = |S| and locality rS = 1. In similar vein to partition multicast and cycle covering schemes, consider the following proposed coding technique that applies the optimal scalar linear index code over each subgraph GS . Minrank Covering: Encode each subgraph GS using its own optimal scalar linear index code. The message length mS = 1, codelength `S equals the minrank κq (GS ) of the subgraph, and the locality rS equals the codelength κq (GS ). By partitioning G into subgraphs GS of small minrank we can achieve a small locality for the overall scheme. 1) Scalar-linear codes: Now consider any covering-based index coding technique (such as partition mutlicast, cycle covering or minrank covering) for G. Let the scalar linear index code (i.e., message length equal to 1) associated with the subgraph GS , S ⊂ [N ], have codelength `S and locality rS . The overall index code uses a partition of the vertex set [N ], which is represented by the tuple (aS , S ⊂ [N ]), where each aS ∈ {0, 1} is such that the partition of [N ] consists of all subsets S with aS = 1. Note that P (aS , S ⊂ [N ]) represents a partition of [N ] if and only if S:i∈S aS = 1 for every i ∈ [N ], i.e., every vertex i is contained in exactly one of the subsets of the partition. The covering-based index coding technique applies an index code of length `S and locality rS to each subgraph GS with aS = 1 independently. Thus the P P codelength of the overall index code is ` = S:aS =1 `S = S⊂[N ] aS `S and locality is r = maxS:aS =1 rS = maxS⊂[N ] aS rS . By optimizing over all possible partitions of G, we have Theorem 5 (Covering with locality). Consider a family of scalar linear index codes, one for each GS , S ⊂ [N ], with length `S and locality rS . Given any r ≥ 1, the value of ∗ βG (r) is upper bounded by the solution to the following integer program X minimize aS `S subject to S⊂[N ] X aS = 1 ∀ i ∈ [N ], and aS rS ≤ r ∀ S ⊂ [N ] S:i∈S where aS ∈ {0, 1}. The second constraint aS rS ≤ r in Theorem 5 ensures that the locality of the resulting coding scheme is at the most r. Since aS ∈ {0, 1}, this implies that when solving for the optimal partition, the integer program considers only those subsets S with rS ≤ r, i.e., locality r is achieved by partitioning G into subproblems of small locality. 2) Vector-linear codes: It is known that the linear programming (LP) relaxation, that allows each aS to assume values in the interval [0, 1] instead of aS ∈ {0, 1}, provides an improvement in rate for covering-based index coding schemes by time-sharing over several partitions of G. This technique too can be adapted to ensure locality. Consider the following vector linear schemes that can be used to cover a given side information graph G. Vector Partition Multicast: For any S ⊂ [N ], the partition multicast scheme uses a scalar code with length |S| − mini∈S |Ki ∩ S| for the subgraph GS . Applying Lemma 7, we obtain a vector linear code for GS with message length mS = |S|, broadcast rate βS = |S| − mini∈S |Ki ∩ S|, codelength `S = mS βS and locality rS = (1 + (|S| − 1)βS )/|S|. Note that the locality rS is strictly less than the rate βS . Vector Cycle Covering: In this scheme, if a subgraph GS is a directed cycle, we use the vector linear index code promised by Lemma 8, with message length mS = |S|, broadcast rate βS = |S| − 1, codelength `S = mS βS = |S|(|S| − 1), and locality rS = 2(|S| − 1)/|S|. If GS is not a cycle, we use uncoded transmission that results in mS = 1, `s = |S| and rS = 1. Vector Minrank Covering: For a given GS we start with the optimal scalar linear code of length κq (GS ) and use Lemma 7 to obtain a vector linear code with message length mS = |S|, rate βS = κq (GS ), codelength `S = mS βS and locality rS = (1 + (|S| − 1)κq (GS ))/|S|. Now consider a family of vector linear coding schemes that encodes each subgraph GS , S ⊂ [N ], using a linear code of codelength `S with locality rS , message length mS and rate βS = `S /mS . For some choice of integers kS , S ⊂ [N ], perform time-sharing among all the subgraphs of G, by encoding kS independent realizations of the subgraph GS for each S ⊂ [N ]. In this scheme, the totalP number of message symbols intended for receiver i ∈ [N ] is S:i∈S kS mS . The number ofP codeword symbols |Ri | queried by receiver i is at the most S:i∈S kS rSP mS . The overall length of this index coding scheme is ` = S⊂[N ] kS `S . Suppose we require the message length corresponding to every receiver to be identical, X kS mS = m for all i ∈ [N ]. (9) S:i∈S Define P aS = kS mS /m for all S ⊂ [N ]. Then (9) is equivalent to S:i∈S aS = 1 for every i ∈ [N ]. The P locality of receiver i is |Ri |/m and is upper bounded by S:i∈S P P aS rS . The broadcast rate is β = k ` /m = S S S⊂[N ] S⊂[N ] aS βS . By optimizing over all possible choices of the time-sharing parameters (aS , S ⊂ [N ]), we arrive at Theorem 6 (Fractional covering with locality). Consider any family of vector linear index codes, one for each subgraph GS , S ⊂ [N ], of G with locality rS and broadcast rate βS . ∗ For any r ≥ 1, βG (r) is upper bounded by the solution to the following linear program X minimize aS βS subject to S⊂[N ] X aS = 1 and S:i∈S X aS rS ≤ r ∀ i ∈ [N ] S:i∈S where aS ∈ [0, 1]. V. L OCALITY-R ATE T RADE -O FF OF D IRECTED 3-C YCLE Let G be the directed 3-cycle i.e., N = 3 and the three receivers (i, Ki ) are (1, {2}), (2, {3}) and (3, {1}). We will now characterize its locality-rate trade-off given by the optimal ∗ broadcast rate function βG (r) using the achievability schemes of Section III and IV-C and a converse based on information inequalities. The objective of this section is to prove Theorem 7. For the unicast index coding problem represented by the directed 3-cycle G, the locality-broadcast rate trade-off ∗ βG (r) = max{6 − 3r, 2} for all r ≥ 1. We will now first prove the achievability part which will ∗ (r), and then provide an provide an upper bound on βG information-theoretic converse to arrive at a lower bound. Theorem 7 will then follow immediately from these two bounds. 0 (i) |R10 | = |R20 | · · · = |RN |; and 0 0 0 0 (ii) |R1 ∩ R2 | = |R2 ∩ R30 | = · · · = |RN ∩ R10 |. Proof: See Appendix C. Let us now assume that G is the directed 3-cycle. Consider any valid index coding scheme for G with broadcast rate β and locality r. Let the message length be m and codelength be `. Using Lemma 9, we assume without loss in generality that the sets R1 , R2 , R3 satisfy |R1 | = |R2 | = |R3 | = rm and |R1 ∩ R2 | = |R2 ∩ R3 | = |R3 ∩ R1 |. For the sake of brevity, we abuse the notation mildly by using (i + 1) to denote the receiver index (i mod 3 + 1), and similarly use (i + 2) in order to denote (i + 1) mod 3 + 1. With this notation, for i = 1, 2, 3, the side information index set of the ith receiver is Ki = {i + 1}. Assume, as usual, that the messages x1 , x2 , x3 are independently and uniformly distributed in Am . xi ; c Ri |x xi+1 ) = Now considering the ith receiver, we have I(x xi ) = m. Expanding this term as a difference of conditional H(x xi+1 ) − H(ccRi |x xi , x i+1 ) = m. Usentropies, we have H(ccRi |x xi+1 ) ≤ H(ccRi ) ≤ |Ri |, ing this with the upper bound H(ccRi |x we arrive at xi , x i+1 ) ≤ |Ri | − m. H(ccRi |x A. Proof of achievability From Example 2 in Section IV-C we know that for r = 4/3, = 2. Also, from Theorem 1, we know that when ∗ (r) = χf (Ḡu ). Since G is a directed 3-cycle, r = 1, βG Ḡu is a complete graph on three vertices, i.e., an edge exists between every pair of vertices in Ḡu . Hence, χf (Ḡu ) = 3, ∗ (1) = 3. and therefore, βG ∗ (r) is a convex function, considering the Now since βG ∗ ) points (1, 3) and (4/3, 2), for any α ∈ (0, 1), we have (r, βG ∗ (α+(1−α)4/3) ≤ 3α+2(1−α). With r = α+(1−α)4/3, βG we therefore have ∗ βG (r) ∗ βG (r) ≤ 6 − 3r, for 1 ≤ r ≤ 4/3. G with broadcast rate β, then there exists an index code (E0 , D01 , . . . , D0N ) for G with rate β such that the index sets of 0 codeword symbols R10 , . . . , RN queried by the receivers satisfy the following properties: (10) ∗ Further, since βG is a decreasing function, for any r ≥ 4/3, ∗ ∗ βG (r) ≤ βG (4/3) = 2. Combining this with (10) we have ∗ βG (r) ≤ max{6 − 3r, 2} for all r ≥ 1. B. Proof of converse To prove the converse we first require the following general result. Let G be any unicast index coding problem involving N messages such that the cyclic permutation σ that maps i ∈ [N ] to i mod N + 1 is an automorphism of the side information graph G. We now show that we can assume without loss of generality that the index sets of the codeword symbols queried by the N receivers satisfy certain symmetry properties. Lemma 9. If the cyclic permutation σ is an automorphism of G and if there exists an index code (E, D1 , . . . , DN ) for Using the above inequality and the fact that c Ri is a deterministic function of all three messages x i , x i+1 , x i+2 , we have xi , x i+1 ) = H(ccRi |x xi , x i+1 ) ≤ |Ri | − m. Hence, I(ccRi ; x i+2 |x xi+2 |x xi , x i+1 ) − H(x xi+2 |ccRi , x i , x i+1 ) ≤ |Ri | − m. H(x xi+2 |x xi , x i+1 ) = m, we obtain the lower bound Since H(x xi+2 |ccRi , x i , x i+1 ) ≥ 2m − |Ri |. H(x (11) Our objective now is to use the above inequality to obtain an upper bound on |Ri ∩ Ri+2 |, which can then be translated into a lower bound on `, and hence, a lower bound on β. To do so, observe that c Ri is composed of the following two sub-vectors c Ri ∩Ri+2 and c Ri \Ri+2 . Using (11), we obtain xi+2 |ccRi ∩Ri+2 , xi ) ≥ H(x xi+2 |ccRi , xi , xi+1 ) ≥ 2m − |Ri |. H(x xi+2 |ccRi+2 , x i ) = 0 Using this inequality, and the relation H(x (to satisfy the demands of the (i + 2)th receiver), we obtain the following |Ri+2 \ Ri | ≥ H(ccRi+2 \Ri ) ≥ I(xi+2 ; cRi+2 \Ri |ccRi ∩Ri+2 , xi ) xi+2 |ccRi ∩Ri+2 , x i ) = H(x xi+2 |ccRi+2 \Ri , c Ri ∩Ri+2 , x i ) − H(x xi+2 |ccRi ∩Ri+2 , x i ) − H(x xi+2 |ccRi+2 , x i ) = H(x ≥ 2m − |Ri |. Since |R1 | = |R2 | = |R3 |, we now have |Ri ∩ Ri+2 | = |Ri+2 | − |Ri+2 \ Ri | Stronger achievability and/or converse results may be required to gain further insights into the locality-rate trade-off of a general index coding problem. ≤ |Ri | − (2m − |Ri |) ACKNOWLEDGMENT = 2 (|Ri | − m) . Finally, using the fact that |Ri ∩ Ri+2 | is independent of i, The first author thanks Prof. B. Sundar Rajan for discussions regarding the topic of this paper. ` = |R1 ∪ R2 ∪ R3 | ≥ 3 X |Rj | − j=1 3 X |Rj ∩ Rj+2 | i=1 = 3|Ri | − 3|Ri ∩ Ri+2 | ≥ 3|Ri | − 3 × 2(|Ri | − m) = 6m − 3|Ri |. Dividing both sides by the message length m, and remembering that all the receivers have the same locality r, we have β = `/m ≥ 6 − 3r. Thus we have ∗ βG (r) ≥ 6 − 3r for all r ≥ 1. ∗ (r) ≥ 2 for all r ≥ 1. Further, βopt (G) = 2, and hence, βG Combining this with the above inequality we have the converse ∗ βG (r) ≥ max{6 − 3r, 2} for all r ≥ 1. VI. C ONCLUSION AND D ISCUSSION A PPENDIX A P ROOF OF L EMMA 2 ∗ The non-increasing property of βG follows immediately from its definition. We will use time-sharing to prove convexity. Assume r1 , r2 ≥ 1 and let  > 0. For each j = 1, 2, ∗ there exists an index code with broadcast rate βj ≤ βG (rj )+ and locality at the most rj . We will denote the blocklength of this code by `j , message length by mj and the subsets of the indices used by the N receivers as R1,j , . . . , RN,j , where j = 1, 2. For some choice of non-negative integers k1 and k2 , consider a time-sharing scheme where the first index code is used k1 m2 times, and the second index code is used k2 m1 times. For this composite scheme, the overall message length is m = k1 m2 m1 +k2 m1 m2 = m1 m2 (k1 +k2 ). The blocklength is ` = k1 m2 `1 +k2 m1 `2 , and the number of codeword symbols utilized by the ith receiver to decode its desired message is |Ri | = k1 m2 |Ri,1 | + k2 m1 |Ri,2 |. The locality of this timesharing system can be upper bounded as Relation to other problems Locally decodable index codes are related to privacypreserving broadcasting and the problem of sparse representation of sets of vectors. In [16], the authors consider scalar linear index codes with locality r under a privacy preserving communication scenario using the terminology rlimited access schemes. The motivation for using r-limited access schemes is to reduce the amount of information that any receiver can infer about the demands of other receivers in the network. This is achieved by restricting the knowledge of the scalar linear encoder matrix B at any receiver to at the most r columns instead of revealing the entire matrix. Thus each receiver knows the values of at the most r columns of the encoder matrix B , and hence, is required to perform decoding by querying at the most r codeword symbols which correspond to these columns. A scalar linear index code with locality r is characterized by a valid encoder matrix B with a corresponding fitting matrix A such that any column of A is some linear combination of at the most r columns of B . Thus the columns of B serve as an overcomplete basis for a sparse representation of the columns of A . Conclusion We introduced the problem of designing index codes that are locally decodable and have identified several techniques to construct such codes. We have also identified the optimum broadcast rate corresponding to unit locality for any unicast index coding problem, and the complete locality-rate tradeoff curve for the problem represented by a directed 3-cycle. max i k1 |Ri,1 | k2 |Ri,2 | |Ri | = max + i m (k1 + k2 )m1 (k1 + k2 )m2 k2 k1 r1 + r2 . ≤ k1 + k2 k1 + k2 Similarly, the broadcast rate of this time-sharing scheme can be shown to be equal to k1 β1 /(k1 + k2 ) + k2 β2 /(k1 + k2 ), which is upper bounded by k1 k2 ∗ βG (r1 ) + β ∗ (r2 ) + . k1 + k2 k1 + k2 G Denoting k1 r1 /(k1 +k2 )+k2 r2 /(k1 +k2 ) by r, and by letting  → 0, we observe that ∗ βG (r) ≤ k1 k2 β ∗ (r1 ) + β ∗ (r2 ). k1 + k2 G k1 + k2 G Convexity follows by approximating any real number in the interval (0, 1) by the rational number k1 /(k1 + k2 ) to any desired accuracy by using sufficiently large k1 and k2 . A PPENDIX B F RACTIONAL C OLORING S OLUTION HAS U NIT L OCALITY We will now recall the fractional coloring solution [5] to an index coding problem G and observe that r = 1 for this scheme. Let C1 , . . . , CN ⊂ {1, . . . , a} be an a : b coloring of Ḡu such that χf (Ḡu ) = a/b. Set codeword length ` = a and message length m = b. Denote the components of the message vectors x i ∈ Am using the variables wi,t ∈ A as follows: x i = (wi,t , t ∈ Ci ), i.e., one symbol wi,t corresponding to each color t in the set Ci . Endow the set A with any abelian group structure (A, +). The symbols P of the codeword c = (c1 , . . . , c` ) are generated as ct = i: t∈Ci wi,t , for t ∈ [`]. Decoding at the receiver (i, Ki ) can be performed as follows. Note that x i is composed of all symbols wi,t such that t ∈ Ci . In order to decode wi,t , the receiver retrieves the code symbol ct which is related to wi,t as X wj,t . (12) ct = wi,t + j6=i j: t∈Cj For any choice of the index j in the summation term above, we have i 6= j and t ∈ Ci ∩ Cj . Since C1 , . . . , CN is a coloring of Ḡu and Ci ∩ Cj 6= ∅, we deduce that {i, j} ∈ / Ēu , or equivalently, j ∈ Ki . Hence, for each j 6= i such that t ∈ Cj , the receiver (i, Ki ) knows the value of wj,t , and thus, can recover wi,t from ct using (12). Using a similar procedure (i, Ki ) can decode all the m symbols in x i from the m coded symbols (ct , t ∈ Ci ). This decoding method uses Ri = Ci for all i ∈ [N ] and has locality r = 1. A PPENDIX C P ROOF OF L EMMA 9 Since σ is an automorphism of G, so is σ n for any n ∈ [N ]. Note that the group {σ, σ 2 , . . . , σ N = 1} acts transitively on the vertex set of G. Let (E, D1 , . . . , DN ) be an index code for G with rate β and receiver localities r1 , . . . , rN . We (n) (n) will consider N index coding schemes (E(n) , D1 , . . . , DN ), n ∈ [N ], each of which is derived from (E, D1 , . . . , DN ) by permuting the roles of the messages x 1 , . . . , x N . Specifically, the nth encoder E(n) is the encoder E applied to the nth left cyclic shift of the message tuple x 1 , . . . , x N , i.e., x1 , . . . , x N ) ) = E( (x xn+1 , x n+2 , . . . , x N , x 1 , . . . , x n ) ) E(n) ( (x  xσn (1) , . . . , x σn (N ) ) . = E (x For any i ∈ [N ], in the above expression of E(n) , the message x i is the (i − n)th N argument of E where (i − n)N = (i − n) if (i − n) ≥ 1 and (i − n)N = i − n + N otherwise. Hence, the encoding function E(n) operates on the message x i in the same manner asE operates on the message x (i−n)N . Using the fact that σ is an automorphism of G, it is easy to see that, when the nth code is used, the ith receiver can decode x i as D(i−n)N (ccR(i−n)N , x Ki ). Thus, the codeword symbols queried by the ith receiver in the nth code is |R(i−n)N | = m r(i−n)N , where m is the message length. Now consider a time sharing scheme that utilizes each of the N encoders E(1) , . . . , E(N ) exactly once. The overall message length for this scheme is mN , the broadcast rate is β, and the number of codeword symbols queried by the ith receiver is X X |Ri0 | = |R(i−n)N | = m rn . n∈[N ] n∈[N ] Similarly, for any i ∈ [N ] and j = i mod N + 1, we have X |Ri0 ∩ Rj0 | = |R(i−n)N ∩ R(i−n+1)N | n∈[N ] = X n∈[N ] |Rn ∩ R(n+1)N |, which is independent of i. R EFERENCES [1] Y. Birk and T. Kol, “Informed-source coding-on-demand (ISCOD) over broadcast channels,” in Proc. 17th Annu. Joint Conf. IEEE Computer and Communications Societies (INFOCOM), vol. 3, Mar. 1998, pp. 1257– 1264. [2] Z. Bar-Yossef, Y. Birk, T. S. Jayram, and T. Kol, “Index coding with side information,” IEEE Trans. Inf. Theory, vol. 57, no. 3, pp. 1479–1494, Mar. 2011. [3] R. Peeters, “Orthogonal representations over finite fields and the chromatic number of graphs,” Combinatorica, vol. 16, no. 3, pp. 417– 431, Sep 1996. [Online]. Available: https://doi.org/10.1007/BF01261326 [4] N. Alon, E. Lubetzky, U. Stav, A. Weinstein, and A. Hassidim, “Broadcasting with side information,” in Proc. 49th IEEE Symp. Foundations of Computer Science (FOCS), Oct. 2008, pp. 823–832. [5] A. Blasiak, R. D. Kleinberg, and E. Lubetzky, “Index coding via linear programming,” arXiv preprint, 2010. [Online]. Available: http://arxiv.org/abs/1004.1379 [6] M. A. R. Chaudhry, Z. Asad, A. Sprintson, and M. Langberg, “On the complementary index coding problem,” in 2011 IEEE International Symposium on Information Theory Proceedings, July 2011, pp. 244–248. [7] A. S. Tehrani, A. G. Dimakis, and M. J. Neely, “Bipartite index coding,” in 2012 IEEE International Symposium on Information Theory Proceedings, July 2012, pp. 2246–2250. [8] A. Blasiak, R. Kleinberg, and E. Lubetzky, “Broadcasting with side information: Bounding and approximating the broadcast rate,” IEEE Transactions on Information Theory, vol. 59, no. 9, pp. 5811–5823, Sept 2013. [9] M. J. Neely, A. S. Tehrani, and Z. Zhang, “Dynamic index coding for wireless broadcast networks,” IEEE Trans. Inf. Theory, vol. 59, no. 11, pp. 7525–7540, Nov 2013. [10] K. Shanmugam, A. G. Dimakis, and M. Langberg, “Local graph coloring and index coding,” in Information Theory Proceedings (ISIT), 2013 IEEE International Symposium on, July 2013, pp. 1152–1156. [11] ——, “Graph theory versus minimum rank for index coding,” in Information Theory Proceedings (ISIT), 2014 IEEE International Symposium on, 2014. [12] F. Arbabjolfaei and Y. H. Kim, “Local time sharing for index coding,” in 2014 IEEE International Symposium on Information Theory, June 2014, pp. 286–290. [13] H. Maleki, V. R. Cadambe, and S. A. Jafar, “Index coding – an interference alignment perspective,” IEEE Transactions on Information Theory, vol. 60, no. 9, pp. 5402–5432, Sept 2014. [14] A. Agarwal and A. Mazumdar, “Local partial clique covers for index coding,” arXiv preprint arXiv:1603.02366, 2016. [15] I. Haviv and M. Langberg, “On linear index coding for random graphs,” in 2012 IEEE International Symposium on Information Theory Proceedings, July 2012, pp. 2231–2235. [16] M. Karmoose, L. Song, M. Cardone, and C. Fragouli, “Preserving privacy while broadcasting: k-limited-access schemes,” arXiv preprint arXiv:1705.08437, 2017. [17] C. Godsil and G. F. Royle, Algebraic graph theory. Springer Science & Business Media, 2013, vol. 207. [18] S. H. Dau, V. Skachek, and Y. M. Chee, “On the security of index coding with side information,” IEEE Transactions on Information Theory, vol. 58, no. 6, pp. 3975–3988, June 2012. [19] S. A. Jafar, “Topological interference management through index coding,” IEEE Transactions on Information Theory, vol. 60, no. 1, pp. 529– 568, Jan 2014.
7cs.IT
Oscillation energy based sensitivity analysis and control for multi-mode oscillation systems Horacio Silva-Saravia, Yajun Wang, Héctor Pulgar-Painemal, Kevin Tomsovic arXiv:1712.06157v1 [cs.SY] 17 Dec 2017 Department of Electrical Engineering and Computer Science University of Tennessee, Knoxville, TN, 37996 Email: [email protected], [email protected], [email protected], [email protected] Abstract—This paper describes a novel approach to analyze and control systems with multi-mode oscillation problems. Traditional single dominant mode analysis fails to provide effective control actions when several modes have similar low damping ratios. This work addresses this problem by considering all modes in the formulation of the system kinetic oscillation energy. The integral of energy over time defines the total action as a measure of dynamic performance, and its sensitivity allows comparing the performance of different actuators/locations in the system to select the most effective one to damp the oscillation energy. Time domain simulations in the IEEE 9-bus system and IEEE 39bus system verify the findings obtained by the oscillation energy based analysis. Applications of the proposed method in control and system planning are discussed. Index Terms—Damping control, eigenvalue sensitivity, interarea oscillations, small-signal stability, energy storage, renewable energy, oscillation energy, action. I. I NTRODUCTION Electromechanical oscillations in power systems appear as result of energy exchanges between different groups of generators after a disturbance. These oscillations are unwanted because of the mechanical stress in generator shafts, power congestion in the transmission system and the potential risk of instability. Traditionally, control efforts are done to guarantee higher damping ratios for these oscillations, with special consideration for inter-area oscillations, which involve a larger part of the system. Although for the current scenario these control actions fulfill the system requirements, research on control schemes and a better understanding of the oscillation problem need to continue as higher penetration of renewable energy (RE)—and decommission of traditional generation—will take place, making the oscillation problem more challenging. Selected power system stabilizers (PSSs) and feedback signals using residue analysis and mode controllability/observability have been traditionally employed to damp electromechanical oscillations [1], [2]. Residue analysis focuses on selecting the input/output pairs that are most sensitives to displace a targeted eigenvalue to the left side of the complex plane. Similar approaches have been extended for the location of flexible AC transmission systems (FACTS) and energy storage systems (ESS) [3]. Special efforts have also This material is based on work supported by the National Science Foundation under Grant No. 1509114. This work is also supported by the Engineering Research Center Program of the National Science Foundation and the Department of Energy under NSF Award No. EEC-1041877 and the CURENT Industry Partnership Program. been able to estimate the system inertia distribution [4] and find relationships with the location of electrically-interfaced resources (EIRs) to damp inter-area oscillations [5]. In these works, and the majority of real system studies [6], only singlemode analysis is performed. This is based on the assumption that there is only one dominant mode, which is not guaranteed in scenarios with high penetration of RE because of the reduction of the relative inertia in different areas of the system. To consider multi-mode analysis and achieve some arbitrary system performance, optimization-based techniques have been implemented to tune and design system controls [7]. This has brought the idea of control allocation and coordination in power systems to distribute control effort among multiple actuators [8]. However, these optimization-based techniques lack of physical interpretation and depend on arbitrary design parameters. A different approach to study electromechanical oscillations consists of analyzing the kinetic oscillation energy of each machine by comparing the phase of selected energy modes to identify energy exchanges paths [9], [10]. Recent efforts also consider the distribution of the kinetic energy, branch potential energy [11] and the idea of energy dissipation and its relationship with oscillation damping [12]. Although more meaningful in terms of the system physical interpretation, these works still fail to provide a performance index considering all system modes. Moreover, they do not provide direct comparison of different control actuators and the effects on the oscillation energy as a measure of system performance. This paper proposes a new approach to study system oscillations—specially when considering high penetration of RE—by considering all oscillation modes in the formulation of the system kinetic oscillation energy. This formulation allows comparing the dynamic performance of control actuators/locations in the system by means of the total action sensitivities (TAS). The most sensitive actuators/locations are proven to provide the best dynamic response for the system. Simulations in the IEEE 9-bus system and IEEE 39-bus systems verify the findings of this work. The paper is structured as follows. Section II describes the concepts of oscillation energy, action and total action sensitivity. Section III compares the traditional eigenvalue sensitivity analysis with the proposed method in the IEEE 9-bus test system and shows an application of the total action sensitivity in the IEEE 39-bus test system. Final remarks about applications of the analysis are also discussed. Finally, conclusions are presented in Section IV. n II. O SCILLATION ENERGY ANALYSIS S(τ ) = A. Oscillation energy and action Consider the linearized power system equations with p synchronous generators and n total number of states ∆ẋ = A∆x (2) Λ Here Λ = diag{λi }, where λi is the i-th system eigenvalue. Thus, the solution of each state of the decoupled system can be easily written in terms of its corresponding eigenvalue: ∆z = eΛt ∆z0 → ∆zi = eλi t ∆z0i ∈ C, ∀i ∈ {1, ..., n} (3) where ∆z0 = [∆z01 , ..., ∆z0i , ..., ∆zon ]T = M −1 ∆x0 . The kinetic energy of the linearized system becomes: Ek (t) = p X 1 j=1 1 Jj ∆ωj2 = ∆xT J∆x 2 2 1 = (M ∆z)T J(M ∆z) 2 1 = ∆z T G∆z ∈ R 2 (4) (5) (6) where the inertia matrix J has nonzero elements only in the diagonal terms Jii ∀ i ∈ Ωω , where Ωω is the set of speed indices of all synchronous generators. The transformed inertia matrix G = M T JM is in general non diagonal and complex. Note that after a disturbance, the speed trajectories describe the oscillation energy defined by equation (6) such that Ek (t) > 0 ∀ t and Ek is zero in steady state. Consider now the mathematical definition of action (S), which is typically represented by an integral over time and taken along the system trajectory [13]. This integral has units of (energy)·(time) and for our problem can be written as: Z τ S(τ ) = Z Ek (t)dt = Z0 τ 0 τ 1 (∆z T G∆z)dt ∈ R 2 1 Λt (e ∆z0 )T G(eΛt ∆z0 )dt 0 2  Z n n 1 τ X X (λi +λj )t = e z0i z0j gij  dt 2 0 j=1 = (7) S∞ where z0i is the i-th element of ∆z0 and gij is the entry in the i-th row and j-th column of G. The action evaluated at a fixed time τ becomes: n (11) B. Total action sensitivity (TAS) Assume that a damping control device is virtually installed in the system. The dynamics of this controller are fast and can be represented as a proportional gain θk . Consider the analysis of the effect of the control gain θk in the total action, which is a measure of how quick the oscillation energy is damped. The sensitivity of the total action with respect to the control gain is expressed as: n n n X n X z0j gij ∂z0i X X z0i z0j ∂gij ∂S∞ =− − ∂θk (λi + λj ) ∂θk 2(λi + λj ) ∂θk j=1 i=1 j=1 i=1 + n n X X z0i z0j gij ∂λi ∂λj ( + ) 2 2(λi + λj ) ∂θk ∂θk j=1 i=1 (12) where ∂zoi /∂θk and ∂gij /∂θk are the entries of the following vector and matrix, respectively: ∂zo ∂M −1 = x0 (13) ∂θk ∂θk ∂G ∂M T ∂M = JM + M T J (14) ∂θk ∂θk ∂θk Calculations of the eigenvector derivatives are obtained by solving a set of linear equations that are a function of the eigenvalues, their derivatives, the eigenvectors and the system matrix derivative [14]. Similarly, eigenvalue sensitivities can be calculated by means of the residue or equivalently using the concepts of mode controllability and mode observability [3], [5]. For simplicity, equation (12) can be rearranged as a linear combination of the eigenvalue sensitivities plus one term that depends on the eigenvector sensitivities. n X ∂S∞ ∂λi = αk + βi ∂θk ∂θk i=1 (15) where αk ∈ R is the summation of the first two terms in equation (12) and the modal coefficients βi are given by βi = (9) (10) 0 1 X X z0i z0j gij = lim S(τ ) = − τ →∞ 2 j=1 i=1 (λi + λj ) (8) i=1 τ Considering stable modes, the total action until the oscillations vanish is obtained as, n (1) By using the transformation ∆x = M ∆z, where M = {v1 , v2 , ...vn } is the matrix of right eigenvectors, the system equations can be decoupled as: −1 ∆ż = M | {zAM} ∆z = Λ∆z n 1 X X e(λi +λj )t z0i z0j gij 2 j=1 i=1 (λi + λj ) n X z0i z0j gij 2 (λ i + λj ) j=1 (16) Note that ∂S∞ /∂θk is a real number, although βi and ∂λi /∂θk are all complex quantities. Because of Ek > 0 ∀ t, the best dynamic performance, from an energy point of view, occurs when Ek quickly approaches to zero—which is equivalent to minimize the total action. Therefore, the control gain III. S IMULATION RESULTS AND ANALYSIS The IEEE 9-bus system and IEEE 39-bus systems are used for simulations. Models and parameters are obtained from the library in DIgSILENT PowerFactory. A Battery Energy Storage System (BESS) is used to provide oscillation damping. Only a control gain is considered in the closed loop. The installation location of this BESS is analyzed for each bus i at a time, and speed of the closest generator is used as feedback signal. well, while θ9 is more effective to control the local oscillation. Thus, from the point of view of eigenvalue sensitivity and each eigenvalue displacement, the prospective BESS location at bus 7 should be chosen to improve the system oscillations. However, as shown in the next subsection, this selection based on a single system eigenvalue is not always optimal. 15 10 (a) 5 - [rad/s] θk for which ∂S∞ /∂θk < 0 and |∂S∞ /∂θk | is maximum, provides the optimal control solution. 10 (b) 5 The IEEE 9-bus test system in Figure 1 is studied to show the advantage of the TAS over the traditional single-mode eigenvalue sensitivity analysis. 10 7 T1 8 9 Line 1 Line 2 ∼ SG Gen 2 PG =163 MW H=6.4 s 100 MW 35 Mvar Line 3 ∼ SG Gen 3 PG =85 MW H=3.01 s Line 4 5 6 125 MW 50 Mvar 5 3 T2 -0.8 -0.7 -0.6 -0.5 -0.4 -0.3 , [1/s] -0.2 -0.1 - [rad/s] 15 (c) 2 - [rad/s] 15 A. Comparison between single mode analysis and oscillation energy analysis 0 Fig. 2: Eigenvalue plot of the IEEE 9-bus system for prospective locations of BESS by increasing control gain. (a) Changing θ4 , (b) changing θ7 , (c) changing θ9 90 MW 30 Mvar Line 5 Line 6 TABLE I: Eigenvalue sensitivities 4 T3 1 Gen 1 Slack bus H=23.64 s ∼ SG Fig. 1: 3-machine, 9-bus system The system dynamics of the linearized model are dominated by two electromechanical modes: one local oscillation between Gen 2 and Gen 3 with an initial eigenvalue λ23 = −0.027 + j13.4, and one inter-area oscillation between Gen 1 and (Gen 2, Gen 3) with an initial eigenvalue λ123 = −0.038 + j8.73. Note that both electromechanical modes have critical damping ratios of 0.19% and 0.43% respectively. 1) Traditional eigenvalue sensitivity analysis: The location of a 100 BESS is studied at buses 4, 7 and 9 using the speed of generators 1, 2 and 3 as feedback signal, respectively. For each case, the control gain θi is increased from 0 to 50 in steps of 5, and the displacement of the local and inter-area mode are analyzed. Figure 2 shows the eigenvalues displacement for an increasing control gain. A traditional approach would prioritize damping the inter-area oscillation, as both oscillations have low damping ratios and the interarea oscillation involves more generators. Then, part (b) of the figure would be considered as the best case, i.e., increasing θ7 displaces further to the left-side plane the inter-area mode. The eigenvalue sensitivity shown in Table I points out θ7 as the most effective gain to control the inter-area oscillation as λ23 λ123 |∂λi /∂θ4 | |∂λi /∂θ7 | |∂λi /∂θ9 | 3.23 × 10−5 1.25 × 10−5 9.59 × 10−5 0.0025 0.0045 0.0010 2) Oscillation energy analysis: The proposed oscillation energy and TAS analysis considering all modes is performed to provide insight about which BESS location—or combination of BESS locations—should be employed. Table II shows the TAS for three different initial states disturbances ∆ω0 = (∆ω01 , ∆ω02 , ∆ω03 ), where ∆ω0j denotes the initial speed deviation of machine j. TABLE II: Total action sensitivities ∆ω01 = (0.01, 0, −0.01)T ∆ω02 = (0, 0.01, −0.01)T ∆ω03 = (0.01, −0.01, 0)T ∂S∞ /∂θ4 ∂S∞ /∂θ7 ∂S∞ /∂θ9 −2.151 −0.419 −4.364 −21.42 −8.158 −42.63 −40.18 −57.56 −17.11 In order to verify the results obtained by the TAS analysis, time domain simulations are performed using the full set of nonlinear differential equations for each of the disturbances in Table II. Figure 3 shows the system kinetic energy for each prospective BESS location at a time. The results from figure 3 show agreement with those from Table II. For the first and second disturbance in part (a) and (b) of the figure, the BESS located at bus 9 is more effective to damp the system kinetic energy while BESS located at bus 4 and 7 have marginal improvements. For the third disturbance BESS 4 No BESS BESS 7 out bus 39 as the best choice to control the system oscillations after this disturbance. Besides bus 30, all other buses play a similar role in damping the oscillation energy with relatively small differences. Note that the information provided in Table III can be also used to choose a set of optimal actuators in a centralized control scheme. BESS 9 0.3 0.2 System kinetic energy (MJ) 0.1 0 (a) 0.1 0.05 0 (b) 0.3 0.2 0.1 0 0 0.5 1 1.5 (c) Time (s) 2 2.5 3 Fig. 3: System kinetic energy for different initial disturbances and BESS locations. (a) ∆ω01 , (b) ∆ω02 , (c) ∆ω03 Fig. 4: IEEE 39-bus test system 15 5% 10 % 10 B. Application: IEEE 39-bus test system The TAS analysis is applied in the IEEE 39-bus test system shown in Figure 4. The original inertia of generator G1 is reduced to 30 s in a 100 MVA base to allow a more symmetric case. The dynamics of the system are described by the eigenvalues shown in Figure 5. There are 9 electromechanical, most of them have damping ratios between 5% and 10% except one local mode of G1 with frequency 11.5 rad/s and one interarea mode between G10 and (G2 , G3 , G9 ) with frequency 6.9 rad/s. Calculations for the TAS analysis are performed for a 64 ms short-circuit at bus 12—fault clearing time for a two-cycle circuit breaker. Generator buses are chosen as prospective control buses. Machine speeds and angles are monitored and their values right after clearing the short-circuit are used as initial states in the sensitivities calculation. Table III shows the TAS ∂S∞ /∂θk for each bus sorted from the best to the worst bus candidate to damp the oscillation energy. Additionally, the first and second column show the same calculation neglecting the sensitivity coefficient α, i.e, assuming the eigenvector derivatives are zero, which comes from the assumption that the mode shapes are not affected by the control gain θk . As the table shows, both the exact and approximated results point 5 -1 -0.8 -0.6 -0.4 Real (1/s) -0.2 0 Imaginary (rad/s) shown in part (c) of the figure, the BESS located at bus 7 is the most effective to quickly drive the system to steady state. These differences occur because the disturbances excite modes in different proportions, aspect which is completely captured by the modal coefficients βi in equation (15). To sum up, for some disturbances the single mode analysis fails to identify the best actuator/location, while the proposed approach is able to consider the combined effect of all eigenvalue displacements. 0 Fig. 5: System eigenvalues of the IEEE 39-bus test system TABLE III: Total action sensitivities for short-circuit at bus 12 in the IEEE 39-bus system Bus 39 30 36 35 34 38 33 37 32 31 P βi ∂λi /∂θk Bus ∂S∞ /∂θk −0.0192 −0.0141 −0.0123 −0.0119 −0.0116 −0.0115 −0.0114 −0.0112 −0.0111 −0.0104 39 30 32 31 37 36 38 33 35 34 −0.0136 −0.0082 −0.0067 −0.0061 −0.0060 −0.0057 −0.0057 −0.0057 −0.0056 −0.0056 System kinetic energy (MJ) Time domain simulations are performed using the full set of nonlinear differential algebraic equations. A 200 MW BESS is connected at bus 39, 36 and 34 at a time to compare the results with those obtained by the TAS analysis. A delay block is added to the BESS control loop so it only reacts after the short circuit is cleared, which gives enough time to update the initial state vector in the TAS calculation and to send a signal to the best BESS location in the case of a centralized control scheme. Figure 6 shows the system kinetic energy for the case without BESS and with BESS at each of the selected locations. The results show that the BESS at bus 39 is the most effective to quickly damp the oscillation energy, while the BESS at bus 36 and 34 have similar dynamic responses. Although this simulation is performed including the nonlinear equations and using a large droop gain for the BESS, still follows the expected results from the TAS analysis. Therefore, the TAS framework is proven to find the best actuator in the system. Note that, the accuracy of the results depend on the linearity of the eigenvalues and eigenvector trajectories. For nonlinear trajectories—usually for larger droop gains—second order sensitivities or linear piecewise approximation for the total action may be needed. No BESS 0.6 BESS 39 BESS 36 0.4 BESS 34 0.2 0 0 0.5 1 1.5 2 2.5 Time (s) 3 3.5 4 Fig. 6: System kinetic energy of the IEEE 39-bus system after a 64 ms short-circuit at bus 12 C. Final remarks The proposed TAS analysis described in this paper successfully identifies the best control actuator/location in order to minimize the system kinetic energy variation over time. This can be used in several application, such as: • • • Oscillation damping control allocation: on-line TAS evaluation can determine single or multiple actuators, either conventional or non conventional such as RE resources or energy storage. Optimal tunning: phase lead compensator of different actuators can be tuned to optimize a total action-based cost function by changing the direction of eigenvalue trajectories. System planning: off-line TAS analysis for common disturbances can lead to criteria for the deployment of regulating devices to dynamically strength the system. IV. C ONCLUSION This paper describes an oscillation energy analysis to identify the best actuator/location in systems with multi-mode oscillation problems. By expressing the system kinetic energy in terms of the system eigenvalues and eigenvectors, and by calculating the sensitivity of the total action, an algebraic function of the initial states is obtained. The TAS results are validated in the IEEE 9-bus and IEEE 39-bus systems. Time domain simulations show that the TAS analysis is successful to provide the optimal solution in terms of the most effective actuator/location to quickly damp the oscillation energy, and therefore, damp all electromechanical oscillations. Promising applications of the TAS analysis in control and system planning are discussed. R EFERENCES [1] N. Martins and L. T. G. Lima, “Determination of suitable locations for power system stabilizers and static var compensators for damping electromechanical oscillations in large scale power systems,” IEEE Transactions on Power Systems, vol. 5, no. 4, pp. 1455–1469, Nov 1990. [2] H. F. Wang, “Selection of robust installing locations and feedback signals of facts-based stabilizers in multi-machine power systems,” IEEE Transactions on Power Systems, vol. 14, no. 2, pp. 569–574, May 1999. [3] H. Silva-Saravia, H. Pulgar-Painemal, and J. Mauricio, “Flywheel energy storage model, control and location for improving stability: The chilean case,” IEEE Transactions on Power Systems, vol. PP, no. 99, pp. 1–1, 2016. [4] Y. Wang, H. Silva-Saravia, and H. Pulgar-Painemal, “Estimating inertia distribution to enhance power system dynamics,” in 2017 North American Power Symposium (NAPS), Sept 2017. [5] H. Pulgar-Painemal, Y. Wang, and H. Silva-Saravia, “On inertia distribution, inter-area oscillations and location of electronically-interfaced resources,” IEEE Transactions on Power Systems, vol. PP, no. 99, pp. 1–1, 2017. [6] D. Rimorov, A. Heniche, I. Kamwa, G. Stefopoulos, S. Babaei, and B. Fardanesh, “Inter-area oscillation damping and primary frequency control of the new york state power grid with multi-functional multiband power system stabilizers,” in 2016 IEEE Power and Energy Society General Meeting (PESGM), July 2016, pp. 1–5. [7] L.-J. Cai and I. Erlich, “Simultaneous coordinated tuning of pss and facts damping controllers in large power systems,” IEEE Transactions on Power Systems, vol. 20, no. 1, pp. 294–300, Feb 2005. [8] M. E. Raoufat, K. Tomsovic, and S. M. Djouadi, “Dynamic control allocation for damping of inter-area oscillations,” IEEE Transactions on Power Systems, vol. PP, no. 99, pp. 1–1, 2017. [9] C. Jing, J. D. McCalley, and M. Kommareddy, “An energy approach to analysis of interarea oscillations in power systems,” IEEE Transactions on Power Systems, vol. 11, no. 2, pp. 734–740, May 1996. [10] A. R. Messina, M. Ochoa, and E. Barocio, “Use of energy and power concepts in the analysis of the inter-area mode phenomenon,” Electric Power Systems Research, vol. 59, no. 2, pp. 111–119, 2001. [11] Y. Yu, S. Grijalva, J. J. Thomas, L. Xiong, P. Ju, and Y. Min, “Oscillation energy analysis of inter-area low-frequency oscillations in power systems,” IEEE Transactions on Power Systems, vol. 31, no. 2, pp. 1195–1203, March 2016. [12] L. Chen, Y. Min, Y. P. Chen, and W. Hu, “Evaluation of generator damping using oscillation energy dissipation and the connection with modal analysis,” IEEE Transactions on Power Systems, vol. 29, no. 3, pp. 1393–1402, May 2014. [13] C. Lanczos, The variational principles of mechanics. Courier Corporation, 2012. [14] M. I. Friswell, “Calculation of second-and higher order eigenvector derivatives,” Journal of Guidance, Control, and Dynamics, vol. 18, no. 4, pp. 919–921, 1995.
3cs.SY
1 Compressive Online Robust Principal Component Analysis with Optical Flow for Video Foreground-Background Separation arXiv:1710.09160v1 [cs.CV] 25 Oct 2017 Srivatsa Prativadibhayankaram, Huynh Van Luong*, Thanh-Ha Le, and André Kaup Abstract—In the context of online Robust Principle Component Analysis (RPCA) for the video foreground-background separation, we propose a compressive online RPCA with optical flow that separates recursively a sequence of frames into sparse (foreground) and low-rank (background) components. Our method considers a small set of measurements taken per data vector (frame), which is different from conventional batch RPCA, processing all the data directly. The proposed method also incorporates multiple prior information, namely previous foreground and background frames, to improve the separation and then updates the prior information for the next frame. Moreover, the foreground prior frames are improved by estimating motions between the previous foreground frames using optical flow and compensating the motions to achieve higher quality foreground prior. The proposed method is applied to online video foreground and background separation from compressive measurements. The visual and quantitative results show that our method outperforms the existing methods. Index Terms—Robust principal component analysis, video separation, compressive measurements, optical flow, prior information I. I NTRODUCTION The background and foreground separation of a video sequence is of great importance in a number of computer vision applications, e.g., visual surveillance and object detection. These separations make the video analysis more efficient and regions of interest extracted can be used as a preprocessing step for further identification and classification. In video separation, a video sequence is separated into the slowly-changing background (modeled by L as a low-rank component) and the foreground (modeled by S as a sparse component). Robust Principle Component Analysis (RPCA) [1], [2] was shown to be a robust method for separating the low-rank and sparse compenents. RPCA decomposes a data matrix M into the sum of unknown sparse S and low-rank L by solving the Principal Component Pursuit (PCP) [1] problem: min kLk∗ + λkSk1 subject to M = L + S, L,S (1) where k·k∗ is the matrix nuclear norm (sum of singular values) and k · k1 is the `1 -norm. RPCA has found many applications S. Prativadibhayankaram, H. V. Luong, and A. Kaup are with the Chair of Multimedia Communications and Signal Processing, FriedrichAlexander-Universität Erlangen-Nürnberg, 91058 Erlangen, Germany (e-mail: [email protected], [email protected], and [email protected]). Thanh-Ha Le is with the Human Machine Interaction Lab, University of Engineering and Technology, Vietnam National University, Hanoi, Vietnam (e-mail: [email protected]). *Corresponding author. Tel: +49 9131 85 27664. Fax: +49 9131 85 28849. E-mail address: [email protected] (H. V. Luong). in computer vision, web data analysis, and recommender systems. However, batch RPCA processes all data samples, e.g., all frames in a video, which involves high computational and memory requirements. Moreover, with inherent characteristics of video, correlations among consecutive frames can be taken into account to improve the separation. The correlations can be obtained in the form of motions that present the information changes from one frame to the others. Detecting motion is an integral part of the human visual system. One of the dominant techniques for estimating motion in computer vision is optical flow by variational methods [3]–[5]. The optical flow estimates the motion vectors of all pixels in a given frame due to the relative motions between frames. In particular, the motion vectors at each pixel can be estimated by minimizing a gradient-based matching of pixel gray value that is combined with a smoothness criteria [3]. Thereafter, the computed motion vectors in the horizontal and vertical directions [6] are used to compensate and predict information in the next frame. For producing highly accurate motions and correct large displacement correspondences, a large displacement optical flow [7] combines a coarse-to-fine optimization with descriptor matching. Therefore, the large displacement optical flow [7] can be exploited in the video separation to estimate the motions from previously separated frames to support the current frame separation. In order to deal with the video separation in an online manner, we consider an online RPCA algorithm that recursively processes a sequence of frames (a.k.a., the column-vectors in M ) per time instance. Additionally, we aim at recovering the foreground and background from a small set of measurements rather than a full frame data, leveraging information from a set of previously separated frames. In particular, at time instance t, we wish to separate M t into S t = [x1 x2 ... xt ] and Lt =[v 1 v 2 ... v t ], where [·] denotes a matrix and xt , v t ∈ Rn are column-vectors in S t and Lt , respectively. We assume that S t−1 =[x1 x2 ... xt−1 ] and Lt−1 =[v 1 v 2 ... v t−1 ] have been recovered at time instance t − 1 and that at time instance t we have access to compressive measurements of the full frame, a.k.a., vector xt + v t , that is, we observe y t = Φ(xt + v t ), where Φ ∈ Rm×n (m < n) is a random projection. The recovery problem at time instance t is thus written [8] as min k[Lt−1 v t ]k∗+λkxt k1 subject to yt =Φ(xt + v t ), (2) xt ,v t where Lt−1 , S t−1 , and Φ are given. There are several works on the separation problems [9], [9]– [13] by advancing RPCA [1]. Incremental PCP [9] processes 2 each column-vector in M at a time. However, assuming access to the complete data (e.g., full frames) rather than compressive data. On the other hand, Compressive PCP [14] is a counterpart of batch RPCA that operates on compressive measurements. Some studies in [10]–[13] addressed the problem of online estimation of low-dimensional subspaces from randomly subsampled data for modeling the background. The work in [15] proposed an algorithm to recover the sparse component xt in (2), however, the low-rank component v t in (2) was not recovered per time instance from a small number of measurements. The alternative method in [16], [17] estimates the number of compressive measurements required to recover foreground xt per time instance via assuming the background v t not-varying. This assumption is invalid in realistic scenarios due to illumination variations or moving backgrounds. The problem of separating a sequence of time-varying frames using prior information brings significant improvements in the context of online RPCA [15], [18], [19]. Several studies on recursive recovery from low-dimensional measurements have been proposed to leverage prior information [15], [16], [18], [20]. The study in [20] provided a comprehensive overview of the domain, reviewing a class of recursive algorithms. The studies in [15], [18] used modified-CS [21] to leverage prior knowledge under the condition of slowly varying support and signal values. However, this method as well as the methods in [10], [11], [13] do not explore the correlations between the current frame and multiple previously separated frames. Our latest work in [8] leverages correlations across the previously separated foreground frames. However, displacements between the previous foreground frames and the current frame are not taken into account. These displacements can incur the degradation of the separation performance. Contribution. We propose a compressive online robust PCA with optical flow (CORPCA-OF) method, which is based on our previous work in [8], to leverage information from previously separated foreground frames via optical flow [7]. The novelty of CORPCA-OF over CORPCA [8] is that the optical flow is used to estimate and compensate motions between the foreground frames to generate new prior foreground frames. These new prior frames have high correlation with the current frame and thus improve the separation. We also exploit the slowly-changing characteristics of backgrounds known as lowrank components via an incremental SVD [22] method. The compressive separation problem in (2) is solved in an online manner by minimizing not only an n-`1 -norm cost function [23] for the sparse foreground but also the rank of a matrix for the low-rank backgrounds. Thereafter, the new separated foreground and background frames are used to update the prior knowledge for the next processing instance. The rest of this paper is organized as follows. We summarize the CORPCA algorithm [8], on which our proposed method is to be built, and state our problem in Sec. II-A. The proposed method is fully described in Sec. II-B. We test our proposed method for an online compressive video separation application on real video sequences and evaluate both visual and quantitative results in Sec. III. II. V IDEO FOREGROUND - BACKGROUND SEPARATION USING C OMPRESSIVE O NLINE ROBUST PCA WITH O PTICAL F LOW In this section, we firstly review the CORPCA algorithm [8] for online compressive video separation and state our problem. Thereafter, we propose the CORPCA-OF method, which is summarized in the CORPCA-OF algorithm. A. Compressive Online Robust PCA (CORPCA) for Video Separation The CORPCA algorithm [8] is proposed for video separation that is based on the RAMSIA algorithm [23] solving an n-`1 minimization problem with adaptive weights to recover a sparse signal x from low-dimensional random measurements y = Φx with the aid of multiple prior information z j , j ∈ {0, 1, . . . , J}, with z 0 = 0. The objective function of RAMSIA [23] is given by J o n X 1 min H(x)= kΦx − yk22 + λ βj kWj (x − z j )k1 , (3) x 2 j=0 where λ > 0 and βj > 0 are weights across the prior information, and Wj is a diagonal matrix with weights for each element in the prior information signal z j ; namely, Wj = diag(wj1 , wj2 , ..., wjn ) with wji > 0 being the weight for the i-th element in the z j vector. The CORPCA algorithm processes one data vector per time instance by leveraging prior information for both its sparse and low-rank components. At time instance t, we observe y t = Φ(xt + v t ) with y t ∈ Rm . Let Z t−1 := {z 1 , ..., z J }, a set of z j ∈ Rn , and B t−1 ∈ Rn×d denote prior information for xt and v t , respectively. The prior information Z t−1 and B t−1 are formed by using the already reconstructed set of vectors {x̂1 , ..., x̂t−1 } and {v̂ 1 , ..., v̂ t−1 }. The objective function of CORPCA is to solve Problem (2) and formulated by n 1 min H(xt , v t |y t , Z t−1 , B t−1 )= kΦ(xt + v t ) − y t k22 xt ,v t 2 J o X + λµ βj kWj (xt − z j )k1 + µ [B t−1 v t ] , (4) j=0 ∗ where µ > 0. It can be seen that when v t is static (not changing), Problem (4) would become Problem (3). Furthermore, when xt and v t are batch variables and we do not take the prior information, Z t−1 and B t−1 , and the projection Φ into account, Problem (4) becomes Problem (1). The CORPCA algorithm1 solves Problem (4) given that Z t−1 and B t−1 are known (they are obtained from the time instance or recursion). Thereafter, we update Z t and B t , which are used in the following time instance. Let us denote Pf (v t , xt ) = (1/2)kΦ(xt + v t ) − J y t k22 , g(xt ) = λ j=0βj kWj (xt − z j )k1 , and h(v t ) = k[B t−1 v t ]k∗ . As shown in the COPRCA algorithm [8], (k+1) (k+1) xt and v t are iteratively computed at iteration k + 1 1 The code of the CORPCA algorithm, the test sequences, and the corresponding outcomes are available at https://github.com/huynhlvd/corpca 3 Background vt CORPCA Current frame Foreground xt Foreground xt and background vt frames used as prior information for the next frame Motion compensated prior foreground frames x't-3 x't-2 x't-1 xt-2 xt-1 Motion estimation using optical flow Prior foreground frames xt-3 Fig. 1. CORPCA-OF work flow. via the soft thresholding operator [24] for xt and the single value thresholding operator [25] for v t : xt + vt Φ yt CORPCA Minimization Zt-1 n   2o (k+1) (k) 1 (k) (k) vt = arg min µh(v t )+ v t − v t − ∇vtf (v t , xt ) , 2 2 vt (5) (k+1) xt = arg min xt CORPCA-OF x^t ^t v Bt-1 Prior Update , , , xt-3, xt-2, xt-1 Prior Generation using Optical Flow  2o Fig. 2. Compressive separation model using CORPCA-OF. n  (k) (k) (k) 1 . µg(xt )+ xt − xt − ∇xtf (v t , xt ) 2 2 (6) B. The proposed COPRCA-OF Method Problem statement. Using the prior information as in CORPCA [8] has provided the significant improvement of the current frame separation. However, there can be displacements between the consecutive frames deteriorating the separation performance. Fig. 1 illustrates an example of three previous foreground frames, xt−3 , xt−2 and xt−1 . We can use them directly as prior information to recover foreground xt and background v t as done in CORPCA [8] due to the natural correlations between xt and xt−3 , xt−2 , xt−1 . In the last line of three prior foreground frames in Fig. 1, it can be seen that motions exist among them and the current frame xt . By carrying out motion estimation using optical flow [7], we can obtain the motions between the previous foreground frames as in Fig. 1, which are presented using color code for visualizing the motion flow fields [7]. These motions can be used to compensate and generate better quality prior frames (see compensated x0t−3 , x0t−2 compared with xt−3 , xt−2 , xt−1 ), being more correlated to xt . In this work, we propose an algorithm - CORPCA with Optical Flow (CORPCA-OF), whose work flow is built as in Fig. 1 by using optical flow [7] to improve prior foreground frames. Compressive Separation Model with CORPCA-OF. Fig. 2 depicts a compressive separation model using the proposed CORPCA-OF method. Considering a time instance t, the inputs consist of compressive measurements y t = Φ(xt + v t ) and prior information from time instance t − 1, Z t−1 and B t−1 . The model outputs foreground and background information xt and v t by solving the CORPCA minimization problem in (4). Finally, the outputs xt and v t are used to generate better prior foreground information via a prior generation using optical flow and update Z t−1 and B t−1 for the next instance via a prior update. The novel block of COPRCAOF compared with CORPCA [8] is the Prior Generation using Optical Flow, where prior foreground information is improved by exploiting the large displacement optical flow [7]. The CORPCA-OF method is further described in Algorithm 1. Prior Generation using Optical Flow. CORPCA-OF aims at improving the foreground prior frames via optical flow. In Algorithm 1, the prior frames are initialized by xt−1 , xt−2 and xt−3 . Optical flow is used to compute the motions between frames xt−1 and xt−3 (also xt−1 and xt−2 ) to obtain optical flow vectors for these two frames. This can be seen in the 4 CORPCA-OF work flow diagram in Fig. 1 as the optical flow fields represented in color code. The function fM E (·) in Lines 2 and 3 [see Algorithm 1] computes the motions between prior foreground frames. This is based on the large displacement optical flow, as formulated in [7] and involves computing the optical flow vectors containing horizontal (x) and vertical (y) components, denoted by v1x , v2x and v1y , v2y ∈ Rn , respectively. The estimated motions in the form of optical flow vectors, (v1x , v1y ) and (v2x , v2y ), are then used to predict the next frames by compensating for the forward motions on xt−1 . We generate the prior frames, x0t−2 and x0t−3 , using motion compensation indicated by the function fM C (·) as shown in Algorithm 1 in Lines 5 and 6. Considering a point i in the given frame, the horizontal and vertical components v1xi and v1yi of corresponding v1x and v1y are obtained, as mentioned in [26] by solving : I1x · v1xi + I1y · v1yi + I1t = 0, (7) where I1x = ∂I1 /∂x and I1y = ∂I1 /∂y are the intensity changes in the horizontal (x) and vertical (y) directions, respectively, constituting the spatial gradients of the intensity level I1 ; I1t = ∂I1 /∂t is the time gradient, which is a measure of temporal change in the intensity level at point i. There are various methods [3]–[5], [7] to determine v1xi and v1yi . Our solution is based on large displacement optical flow [7], that is a combination of global and local approaches to estimate all kinds of motion. It involves optimization and minimization of error by using descriptor matching and continuation method, which utilizes feature matching along with conventional optical flow estimation to obtain the flow field. We combine the optical flow components of each point i in the image into two vectors (v1x , v1y ), i.e., the horizontal and the vertical components of the optical flow vector. Similarly we obtain (v2x , v2y ). The estimated motions in the form of optical flow vectors are used along with the frame xt−1 to produce new prior frames that form the updated prior information. Linear interpolation is used to generate new frames via column interpolation and row interpolation. This is represented as fM C (·) in Lines 5 and 6 in the Algorithm 1. By using the flow fields (v1x , v1y ) and ( 21 v2x , 12 v2y ) to predict motions in the next frame and compensate them on xt−1 , we obtain x0t−2 and x0t−3 , respectively. Here x0t−3 is obtained by compensating for the half of motions, i.e., ( 12 v2x , 12 v2y ), between xt−1 and xt−3 . These generated frames x0t−2 , x0t−3 are more correlated to the current frame xt than xt−2 , xt−3 . We also keep the most recent frame x0t−1 = xt−1 (in Line 4) as one of the prior frames. (k+1) (k+1) Thereafter, v t and xt are iteratively computed as in Lines 14-15 in Algorithm 1 to solve Problem (4). It can be noted that the proximal operator Γτ g1 (·) in Line 13 of Algorithm 1 is defined [8] as n o 1 Γτ g1 (X) = arg min τ g1 (V ) + ||V − X||22 , (8) 2 V where g1 (·)=k · k1 . The weights Wj and βj are updated per iteration of the algorithm (see Lines 16-17). As suggested in [2], the convergence of Algorithm 1 in Line 8 is determined Algorithm 1: The proposed CORPCA-OF algorithm. Input: y t , Φ, Z t−1 , B t−1 ; bt , v bt , Z t , B t ; Output: x // Initialize variables and parameters. (−1) (0) (−1) (0) 1 xt =xt =0; v t =v t =0; ξ−1 = ξ0 =1; µ0 =0; µ̄>0; λ > 0; 0<<1; k =0; g1 (·)=k · k1 ; // Motion estimation and compensation using Large Displacement Optical Flow [7] 2 (v1x , v1y ) = fM E (xt−1 , xt−2 ); 3 (v2x , v2y ) = fM E (xt−1 , xt−3 ); 0 4 xt−1 = xt−1 ; 0 5 xt−2 = fM C (xt−1 , v1x , v1y ); 1 1 0 6 xt−3 = fM C (xt−1 , 2 v2x , 2 v2y ); 0 0 0 7 z J = xt−1 ; z J−1 = xt−2 ; z J−2 = xt−3 ; 8 while not converged do // Solve Problem (4). (k) (k) (k−1) −1 9 vet (k) = v t + ξk−1 (v t −v t ); ξk 10 11 ft x (k) −1 (xt −xt = xt + ξk−1 ξk ∇vt f(vet (k) (k) Θt =U t Γ µk g1 (Σt )V Tt ; 14 vt 17 18 19 20 21 22 23 ); ft ,x (k) )= i  (k) ft ) ; B t−1 vet (k) − 12 ∇vt f (vet (k) , x 13 16 (k) Φ Φ(vet (U t , Σt , V ht ) = incSVD 15 (k−1) ) = ∇xt f (v et (k) ft ) − y t ; +x ft ,x (k) T 12 (k) (k) (k+1) 2 = Θt (:,end);  (k+1) (k) (k) ft − 21 ∇xt f (vet (k) , x ft ) ; where xt =Γ µk g x 2 Γ µk g (·) is given as in RAMSIA [23]; 2 // Compute the updated weights [23]. (k+1) n(|xti −zji |+ )−1 wji = P ; n (k+1) (|xtl −zjl |+ )−1 l=1 −1  (k+1) −z j )||1 +  ||Wj (xt βj = J  −1 ; P (k+1) ||Wl (xt −z l )||1 +  l=0 p ξk+1 = (1 + 1 + 4ξk2 )/2; µk+1 = max(µk , µ̄); k = k + 1; end // Update prior information. (k+1) Z t := {z j = xt−J+j }Jj=1 ; B t = U t (:, 1 : d)Γ µk g1 (Σt )(1 : d, 1 : d)V t (:, 1 : d)T ; (k+1) b t = xt return x 2 (k+1) bt = v t , v , Z t, Bt; by evaluating the criterion k∂H(xt , v t )|x(k+1) ,v(k+1) k22 < (k+1) (k+1) t t , vt )k22 . After this, we update the prior 2 ∗ 10−7 k(xt information for the next instance, Z t and B t , in Lines 21-22. Prior Update. The update of Z t and B t [8] is carried out after each time instance (see Lines 21-22, Algorithm 1). Due to the correlation between subsequent frames, we update the prior information Z t by using the J latest recovered sparse components, which is given by, Z t := {z j = xt−J+j }Jj=1 . For B t ∈ Rn×d , we consider an adaptive update, which 5 Prior information - foreground Prior information - foreground CORPCA-OF CORPCA-OF #2210' #2211' #2212' Original frame #2863' #2864' #2865' #2213 CORPCA #2866 CORPCA #2210 #2211 #2212 #2863 (a) Bootstrap #2213 #2864 #2865 (b) Curtain #2866 Prior information - foreground Prior information - foreground CORPCA-OF CORPCA-OF #448' #449' #450' Original frame #2771' #2772' #2773' #451 CORPCA Original frame #2774 CORPCA #448 #449 #450 (c) Bootstrap #451 Fig. 3. Original frame #2771 #2772 #2773 (d) Curtain #2774 Prior information generation in CORPCA-OF using optical flow [7]. operates on a fixed or constant number d of the columns of B t . To this end, the incremental singular decomposition SVD [22] method (incSVD(·) in Line 12, Algorithm 1) is used. It is worth noting that the update B t = U t Γ µk g1 (Σt )V T t , causes 2 n×(d+1) the dimension of B t to increase as B t ∈ R after each instance. However, in order to maintain a reasonable number of d, we take B t = U t (:, 1 : d)Γ µk g1 (Σt )(1 : d, 1 : d)V t (: 2 , 1 : d)T . The computational cost of incSVD(·) is lower than conventional SVD [9], [22] since we only compute the full SVD of the middle matrix with size (d + 1) × (d + 1), where d  n, instead of n × (d + 1). The computation of incSVD(·) is presented in the following: The goal is to compute incSVD[B t−1 v t ], i.e., n×d [B t−1 v t ] = U t Σt V T t . By taking the SVD of B t−1 ∈ R T to obtain B t−1 = U t−1 Σt−1 V t−1 . Therefore, we can derive (U t , Σt , V t ) via (U t−1 , Σt−1 , V t−1 ) and v t . We write the matrix [B t−1 v t ] as   T  h δ t i Σt−1 et V t−1 0 [B t−1 v t ]= U t−1 · · , (9) 0T kδ t k2 0T 1 kδ t k2 where et = U T t−1 v t and δ t = v t − U t−1 et . By taking the SVD of the matrix   in between the right side of (9), we obtain Σt−1 et eΣ e Ve T . Eventually, we obtain U t = = U T 0 kδ t k2  T  h δt i e V t−1 0 e U t−1 · U , Σt = Σ, and V t = · Ve . 0T 1 kδ t k2 III. E XPERIMENTAL R ESULTS We evaluate the performance of our proposed CORPCA-OF in Algorithm 1 and compare CORPCA-OF against the existing methods, RPCA [1], GRASTA [10], and ReProCS [15]. RPCA [1] is a batch-based method assuming full access to the data, while GRASTA [10] and ReProCS [15] are online methods that can recover either the (low-rank) background component (GRASTA) or the (sparse) foreground component (ReProCS) from compressive measurements. In this work, we test two sequences [27], Bootstrap (60×80 pixels) and Curtain (64×80 pixels), having a static and a dynamic background, respectively. A. Prior Information Evaluation We evaluate the prior information of CORPCA-OF compared with that of CORPCA[8] using the previously separated foreground frames directly. For CORPCA-OF, we generate the prior information by estimating and compensating motions among the previous foreground frames. Fig. 3 shows a few examples of the prior information generated for the sequences Bootstrap and Curtain. In Fig. 3(a), it can be observed that frames #2210’, #2211’ and #2212’ (of CORPCA-OF) 6 Original Original CORPCA-OF CORPCA RPCA GRASTA ReProCS (a) Bootstrap m/n = 0.8 m/n = 0.6 m/n = 0.4 m/n = 0.2 (a) CORPCA-OF Original Original (b) CORPCA-OF CORPCA RPCA GRASTA ReProCS (b) Curtain Fig. 4. ForegroundCORPCA and background separation for the different separation GRASTA ReProCS RPCA methods with full data access Bootstrap #2213 and Curtain #2866. m/n = 0.8 m/n = 0.6 m/n = 0.4 m/n = 0.2 (b) CORPCA [8] are better than corresponding #2210, #2211 and #2212 (of CORPCA) for the current frame #2213, similarly in Figs. 3(b), 3(c), and 3(d). Specially, in Fig. 3(c), the generated frames #448’ and #449’ are significantly improved due to compensating the given dense motions. In Fig. 3(d), it is clear m/n = 0.8 m/n = 0.2 m/n = 0.6 m/n = 0.4 that the movements of the person is well compensated in (c) ReProCS [15] #2771’ and #2772’ by CORPCA-OF compared to #2771 and #2772 respectively, of CORPCA, leading to better correlations Fig. 5. Compressive foreground and background separation of CORPCA-OF, m/n and = 0.8ReProCS m/n =rates 0.2 m/n of = 0.6 with different m/n [15] m/n = 0.4 RPCA measurement CORPCA ReProCS CORPCA [8], with the foreground of current frame #2774.GRASTA frame Bootstrap #2213. B. Compressive Video Foreground and Background Separation We assess our CORPCA-OF method in the application of compressive video separation and compare it against the existing methods, CORPCA[8], RPCA [1], GRASTA [10], m/n = 0.8 m/n = 0.2 m/n = 0.6 m/n = 0.4 and ReProCS [15]. We run all methods on the test video sequences. In this experiment, we use d = 100 frames as m/n = 0.8 m/n = 0.2 m/n = 0.6 m/n = 0.4 training vectors for the proposed CORPCA-OF, CORPCA[8] m/n = 0.8 GRASTA ReProCS (a)= 0.6 CORPCA-OF CORPCA m/n = 0.2 m/n RPCA m/n = 0.4 as well as for GRASTA [10] and ReProCS [15]. Three latest previous foregrounds are used as the foreground prior for CORPCA, meanwhile COPRCA-OF uses them to refine the foreground prior by using optical flow [7]. 1) Visual Evaluation: We first consider background and foreground separation with full access to the video data; the visual results of the various methods are illustrated in Fig. 4. It is evident that, for both the video sequences, CORPCAm/n = 0.8 m/n = 0.2 m/n = 0.6 m/n = 0.4 OF delivers superiorCORPCA visual resultsRPCA than the other methods, GRASTA ReProCS which suffer from less-details in the foreground and noisy (b) CORPCA [8] background images. We can also observe improvements over CORPCA. Additionally, we also compare the visual results of CORPCA-OF, CORPCA and ReProCS for the frames m/n = 0.8 m/n = 0.2 m/n = 0.6 m/n = 0.4 Bootstrap #2213 (in Fig. 5) and for Curtain #2866 (in (c) ReProCS [15] Fig. 6) with compressed rates. They present the results under m/n = 0.8 m/n = 0.2 m/n = 0.6 m/n = 0.4 various rates on the number of measurements m over the Fig. 6. Compressive foreground and background separation of CORPCA-OF, dimension n of the data (the size of the vectorized frame) CORPCA [8], and ReProCS [15] with different measurement rates m/n of with rates: m/n = {0.8; 0.6; 0.4; 0.2}. Comparing CORPCA- frame Curtain #2866. OF with CORPCA, we can observe in Figs. 5 and 6 that with ReProCS, our algorithm outperforms it significantly. At CORPCA-OF gives the foregrounds that are less noisy and low rates, for instance with m/n = 0.6 (in Fig. 5(a)) or the background frames of higher visual quality. On comparison m/n = 0.4 (in Fig. 6(a)), the extracted foreground frames of 7 1 1 0.8 0.8 True positives True positives 0.9 0.7 CORPCA-OF CORPCA RPCA GRASTA ReProCS 0.6 0.5 0.4 0 0.2 0.4 0.6 0.6 0.4 CORPCA-OF CORPCA RPCA GRASTA ReProCS 0.2 0 0.8 0 0.02 False positives (a) Bootstrap Fig. 7. 0.04 0.06 0.08 0.1 False positives (b) Curtain ROC for the different separation methods with full data. 1 1 0.8 0.8 0.8 0.6 0.4 0.6 True positives True positives True positives 0.7 0.6 0.4 0.5 0.4 0.3 0.2 0.2 0.2 0 0 0.1 0 0.1 0.2 0.3 0.4 0 0.1 False positives 0 0.4 0.3 0.4 0.06 0.08 ROC for CORPCA-OF, CORPCA [8], and ReProCS [15] with compressive measurement rates m/n for Bootstrap. 0.8 0.8 0.4 0.6 0.4 0.2 True positives 0.5 0.6 0.4 0.2 0.02 0.04 0.06 0.08 False positives (a) CORPCA-OF Fig. 9. 0.2 (c) ReProCS [15] 1 0 0.1 False positives 1 0 0 (b) CORPCA [8] True positives True positives 0.3 False positives (a) CORPCA-OF Fig. 8. 0.2 0.1 0.12 0 0.3 0.2 0.1 0 0.02 0.04 0.06 0.08 False positives (b) CORPCA [8] 0.1 0.12 0 0 0.02 0.04 False positives (c) ReProCS [15] ROC for CORPCA-OF, CORPCA [8], and ReProCS [15] with compressive measurement rates m/n for Curtain. CORPCA-OF are better than those of CORPCA and ReProCS. Even at a high rate of m/n = 0.8 the sparse components or the foreground frames using ReProCS are noisy and of poor visual quality. The Bootstrap sequence requires more measurements than Curtain due to the more complex foreground information. It is evident from Figs. 5 and 6 that the visual results obtained with CORPCA-OF are of superior quality compared to ReProCS and have significant improvements over CORPCA. 2) Quantitative Results: We evaluate quantitatively the separation performance via the receiver operating curve (ROC) metric [28]. The metrics True positives and False pos- itives are defined as in [28]. Fig. 7 illustrates the ROC results when assuming full data access, i.e., m/n = 1, of CORPCAOF, CORPCA, RPCA, GRASTA, and ReProCS. The results show that CORPCA-OF delivers higher performance than the other methods. Furthermore, we compare the foreground recovery performance of CORPCA-OF against CORPCA and ReProCS for different compressive measurement rates: m/n = {0.8; 0.6; 0.4; 0.2}. The ROC results in Figs. 8 and 9 show that CORPCA-OF can achieve higher performance in comparison to ReProCS and CORPCA. In particular, with a small number of measurements, CORPCA-OF produces better 8 curves than those of COPRCA, e.g., for Bootstrap at m/n = {0.2; 0.4; 0.6} [see Fig. 8(a)] and for Curtain at m/n = {0.2; 0.4} [see Fig. 9(a)]. The ROC results for ReProCS are quickly degraded even with a high compressive measurement rate m/n = 0.8 [see Figure 9(c)]. IV. C ONCLUSION This paper proposed a compressive online robust PCA algorithm with optical flow (CORPCA-OF) that can process one frame per time instance using compressive measurements. CORPCA-OF efficiently incorporates multiple prior frames based on the n-`1 minimization problem. The proposed method exploits motion estimation and compensation using optical flow to refine the prior information and obtain better quality. We have tested our method on compressive online video separation application using video data. The visual and quantitative results showed the improvements on the prior generation and the superior performance offered by CORPCAOF compared to the existing methods including the CORPCA baseline. R EFERENCES [1] E. J. Candès, X. Li, Y. Ma, and J. Wright, “Robust principal component analysis?” J. ACM, vol. 58, no. 3, pp. 11:1–11:37, Jun. 2011. [2] J. Wright, A. Ganesh, S. Rao, Y. Peng, and Y. Ma, “Robust principal component analysis: Exact recovery of corrupted low-rank matrices via convex optimization,” in Advances in Neural Information Processing Systems 2, 2009. [3] B. K. P. Horn and B. G. Schunck, “Determining optical flow,” Artif. Intell., vol. 17, no. 1-3, pp. 185–203, Aug. 1981. [4] A. Bruhn, J. Weickert, and C. Schnörr, “Lucas/kanade meets horn/schunck: Combining local and global optic flow methods,” International Journal of Computer Vision, vol. 61, no. 3, pp. 211–231, Feb 2005. [5] S. Baker, D. Scharstein, J. P. Lewis, S. Roth, M. J. Black, and R. Szeliski, “A database and evaluation methodology for optical flow,” International Journal of Computer Vision, vol. 92, no. 1, pp. 1–31, Mar 2011. [6] A. Bruhn, J. Weickert, and C. Schnörr, “Lucas/kanade meets horn/schunck: Combining local and global optic flow methods,” International Journal of Computer Vision, vol. 61, no. 3, pp. 211–231, 2005. [7] T. Brox and J. Malik, “Large displacement optical flow: Descriptor matching in variational motion estimation,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 33, no. 3, pp. 500–513, March 2011. [8] H. V. Luong, N. Deligiannis, J. Seiler, S. Forchhammer, and A. Kaup, “Compressive online robust principal component analysis with multiple prior information,” in IEEE Global Conference on Signal and Information Processing, Montreal, Canada (e-print in arXiv), Nov. 2017. [9] P. Rodriguez and B. Wohlberg, “Incremental principal component pursuit for video background modeling,” Journal of Mathematical Imaging and Vision, vol. 55, no. 1, pp. 1–18, 2016. [10] J. He, L. Balzano, and A. Szlam, “Incremental gradient on the grassmannian for online foreground and background separation in subsampled video,” in IEEE Conference on Computer Vision and Pattern Recognition, June 2012. [11] J. Xu, V. K. Ithapu, L. Mukherjee, J. M. Rehg, and V. Singh, “Gosus: Grassmannian online subspace updates with structured-sparsity,” in IEEE International Conference on Computer Vision, Dec 2013. [12] J. Feng, H. Xu, and S. Yan, “Online robust pca via stochastic optimization,” in Advances in Neural Information Processing Systems 26, 2013. [13] H. Mansour and X. Jiang, “A robust online subspace estimation and tracking algorithm,” in IEEE Int. Conf. on Acoustics, Speech and Signal Processing, April 2015. [14] J. Wright, A. Ganesh, K. Min, and Y. Ma, “Compressive principal component pursuit,” Information and Inference, vol. 2, no. 1, pp. 32–68, 2013. [15] H. Guo, C. Qiu, and N. Vaswani, “An online algorithm for separating sparse and low-dimensional signal sequences from their sum,” IEEE Trans. Signal Process., vol. 62, no. 16, pp. 4284–4297, 2014. [16] J. F. Mota, N. Deligiannis, A. C. Sankaranarayanan, V. Cevher, and M. R. Rodrigues, “Adaptive-rate reconstruction of time-varying signals with application in compressive foreground extraction,” IEEE Trans. Signal Process., vol. 64, no. 14, pp. 3651–3666, 2016. [17] G. Warnell, S. Bhattacharya, R. Chellappa, and T. Basar, “Adaptiverate compressive sensing using side information,” IEEE Trans. Image Process., vol. 24, no. 11, pp. 3846–3857, 2015. [18] C. Qiu, N. Vaswani, B. Lois, and L. Hogben, “Recursive robust PCA or recursive sparse recovery in large but structured noise,” IEEE Trans. Inf. Theory, vol. 60, no. 8, pp. 5007–5039, 2014. [19] J. Zhan and N. Vaswani, “Robust pca with partial subspace knowledge,” in IEEE Int. Symposium on Information Theory, 2014. [20] N. Vaswani and J. Zhan, “Recursive recovery of sparse signal sequences from compressive measurements: A review,” IEEE Trans. Signal Process., vol. 64, no. 13, pp. 3523–3549, 2016. [21] N. Vaswani and W. Lu, “Modified-cs: Modifying compressive sensing for problems with partially known support,” IEEE Trans. Signal Process., vol. 58, no. 9, pp. 4595–4607, Sep. 2010. [22] M. Brand, “Incremental singular value decomposition of uncertain data with missing values,” in European Conference on Computer Vision, 2002. [23] H. V. Luong, J. Seiler, A. Kaup, and S. Forchhammer, “Sparse signal reconstruction with multiple side information using adaptive weights for multiview sources,” in IEEE Int. Conf. on Image Process., Phoenix, Arizona, Sep. 2016. [24] A. Beck and M. Teboulle, “A fast iterative shrinkage-thresholding algorithm for linear inverse problems,” SIAM Journal on Imaging Sciences, vol. 2(1), pp. 183–202, 2009. [25] J.-F. Cai, E. J. Candès, and Z. Shen, “A singular value thresholding algorithm for matrix completion,” SIAM J. on Optimization, vol. 20, no. 4, pp. 1956–1982, Mar. 2010. [26] R. Szeliski, Computer vision: algorithms and applications. Springer Science & Business Media, 2010. [27] L. Li, W. Huang, I. Y.-H. Gu, and Q. Tian, “Statistical modeling of complex backgrounds for foreground object detection,” IEEE Trans. Image Process., vol. 13, no. 11, pp. 1459–1472, 2004. [28] M. Dikmen, S. F. Tsai, and T. S. Huang, “Base selection in estimating sparse foreground in video,” in 16th IEEE International Conference on Image Processing, Nov 2009.
1cs.CV
Syntax and analytic semantics of LISA arXiv:1608.06583v1 [cs.PL] 23 Aug 2016 Jade Alglave Microsoft Research Cambridge University College London [email protected], [email protected] Patrick Cousot New York University emer. École Normale Supérieure, PSL Research University [email protected], [email protected] 24th August 2016 Abstract We provide the syntax and semantics of the lisa (for “Litmus Instruction Set Architecture”) language. The parallel assembly language lisa is implemented in the herd7 tool (Alglave and Maranget, 2015) for simulating weak consistency models. 1 Introduction lisa (which stands for “Litmus Instruction Set Architecture”) has the vocation of being a fairly minimal assembly language, with read and write memory accesses, branches and fences to design consistency models for weakly consistent systems without having to concern oneself with the syntax of the programming language (such as ARM, IBM, Intel x86, Nvidia multiprocessor chips, or languages like C++ or OpenCL), which has proved quite useful at times where said syntax was still in flux. The weakly consistent semantics of a lisa is analytic in that it is the intersection of an anarchic semantics (without any restriction on communications) and a communication semantics (specified by a cat specification (Alglave, Cousot, and Maranget, 2015c) restricting the allowed communications). The herd7 tool is a weakly consistent system simulator, which takes as input a cat specification (Alglave, Cousot, and Maranget, 2015c) and a litmus test preferably in lisa, and determines whether the candidate executions of this test are allowed or not under the cat specification and under which conditions on communication events. The semantics of cat and lisa has been implemented in the herd7 tool. The documentation of the tool is available online, at diy.inria.fr/tst7/doc/herd.html. The sources of the tool are available at diy.inria.fr. A web interface of herd7 is available at virginia.cs.ucl.ac.uk/herd. 1 We define the anarchic true parallel semantics with separated communications of lisa where anarchic means that no restriction is made on possible communications. We also formally define the abstraction into candidates executions which are the inputs for the semantics of the cat language placing restriction on the communication events, which defines a weak consistency model. 2 An overview of analytic semantics We introduce anarchic semantics with true parallelism and unrestricted separate communications in Section 2. Then in Section 2.4 we show how to abstract anarchic execution to candidate executions that a cat specification will allow or forbid based on hypotheses on relations between communication events. 2.1 Executions The anarchic semantics of a parallel program is a set of executions; an execution has the form π = ς × rf ∈ Π, where ς is the computation part and rf is the communication part. Communications are sets rf , which gather read-from relations. A read-from relation rf[w, r] links a (possibly initial) write event w and a read event r relative to the same shared variable x with the same value. Communications are anarchic: we place no restriction on which write a read can read from; restrictions can be made in a cat specification however. Q Computations have the form ς = τstart × p∈Pi τp , where τstart is an execution trace of the prelude process, and τp are execution traces of the processes p ∈ Pi. A finite (resp. infinite) non-empty trace τp , p ∈ Pi ∪ {start} is a finite (resp. infinite) sequence τp τp = h−−−−k−→ τp | k ∈ [0, 1 + m[i ∈ k Tr τp of computation steps −−−−k−→ τp (with τp k an event and τp the next state—see below for the k k definitions of event and state) such that τp 0 = ǫstart is the start event, |τp | , m ∈ N∗ for finite traces and |τp | , m = ω = 1 + ω for infinite traces where ω is the first infinite limit ordinal so that [0, 1 + ω[ = [0, ω[ = N. This is a true parallelism formalisation sinceQthere is a notion of local time in each trace τp , p ∈ Pi ∪ {start} of an execution π = τstart × p∈Pi τp × rf but no global time, since it is impossible to state that an event of a process happens before or after an event of another process or when communications do happen. Events indicate several things: • their nature, e.g. read (r), write (w), branch (b), fence (f), etc.; • the identifier p of the process that they come from; • the control label ℓ of the instruction that they come from; • the instruction that they come from—which gives the shared variables and local registers affected by the event, if any, e.g. x and R in the case of a read r[ts] R x; 2 • their stamp θ ∈ P(p); they ensure that events in a trace are unique. In our examples, stamps gather the control label and iteration counters of all surrounding loops, but this is not mandatory: all we need is for events to be uniquely stamped. Different processes have noncomparable stamps. Stamps are totally ordered per process by ⊳p (which is irreflexive and transitive, while events on different processes are different and incomparable). The successor function succp is s.t . θ⊳p succp (θ) (but not necessarily the immediate successor); inf p is a minimal stamp for process p. We consider executions up to the isomorphic order-preserving renaming ∼ = of stamps; • their value v ∈ D, whether ground or symbolic. To name the values that are communicated in invariants, we use pythia variables P(p) , {xθ | x ∈ X ∧ θ ∈ P(p)} (note that the uniqueness of stamps on traces ensures the uniqueness of pythia variables). More precisely, traditional methods such as Lamport’s and Owicki-Gries’ name x the value of the shared variable x, but we cannot use the same idea in the context of weak consistency models. Instead we name xθ the value of shared variable x read at local time θ. The events τp on a trace τp of process p are as follows: • register events: a(hp, ℓ, mov R1 operation , θi, v); • read events: r(hp, ℓ, r[ts] R1 x, θi, xθ )); • write events: w(hp, ℓ, w[ts] x r-value , θi, v); • branch events are of two kinds: – t(hp, ℓ, b[ts] operation l t , θi) for the true branch; – t(hp, ℓ, b[ts] operation l t , θi) for the false branch; q  0 • fence events: m(hp, ℓ, f[ts] {l 01 . . . l m 1 } {l 2 . . . l 2 } , θi); • RMW events are of two kinds: – begin event: m(hp, ℓ, beginrmw[ts] x, θi); – end event: m(hp, ℓ, endrmw[ts] x, θi) States σ = shℓ, θ, ρ, νi of a process p mention: • ℓ, the current control label of process p (we have done JPK(p)ℓ which is true if and only if ℓ is the last label of process p which is reached if and only if process p does terminate); • θ is the stamp of the state in process p; • ρ is an environment mapping the local registers R of process p to their ground or symbolic value ρ(R); • ν is a valuation mapping the pythia variables xθ ∈ P(p) of a process p to their ground or symbolic value ν(xθ ). This is a partial map since the pythia variables (i.e. the domain dom(ν) of the valuation ν) augment as communications unravel. Values can be ground, or symbolic expressions over pythia variables. The prelude process has no state (represented by •). 2.2 Well-formedness conditions We specify our anarchic semantics by the means of well-formedness conditions over the compuQ tation traces ς = τstart × p∈Pi τp , and the communications rf of an execution π = ς × rf . Q Conditions over computations τstart × p∈Pi τp are as follows: • Start : traces τ must all start with a unique fake start event ǫstart : τ 0 = ǫstart ∧ ∀i ∈ ]0, 1 + |τ |[ . τ i 6= ǫstart . 3 Wf 2 (π) • Uniqueness: the stamps of events must be unique: ∀p, q ∈ Pi ∪ {start} . ∀i ∈ [0, 1 + |τp |[ . ∀j ∈ [0, 1 + |τq |[ . (p = q =⇒ i 6= j) =⇒ stamp(τp i ) 6= stamp(τq j ) . Wf 3 (π) It immediately follows that events of a trace are unique, and the pythia variable xθ in any read r(hp, ℓ, r := x, θi, xθ ) is unique. • Initialisation: all shared variables x are initialised once and only once to a value vx in the prelude (or to vx = 0 by default). ∃τ0 , τ1 . τstart = τ0 (w(hstart, ℓstart , x := e, θi, vx )) τ1 ∧ ǫ ∀τ0 , τ1 , τ2 . (τstart = τ0 −−−→ στ1 w(hstart, ℓ, x := e, θi, vx ) τ2 ) =⇒ (ǫ ∈ W(start, y) ∧ y 6= x) . Wf 4 (π) • Maximality: a finite trace τp of a process p must be maximal i.e. must describe a process whose execution is finished. Note that infinite traces are maximal by definition, hence need not be included in the following maximality condition: ∃ ℓ θ ρ ν . τp = shℓ, θ, ρ, νi ∧ done JPK(p)ℓ Wf 5 (π) |τ | i.e. the control state of the last state of the trace is at the end of the process, as indicated by done JPK(p)ℓ. Conditions over the communications rf are as follows: • Satisfaction: a read event has at least one corresponding communication in rf : Wf 6 (π) ∀i ∈ ]0, 1 + |τp |[ . ∀r . (τp i = r) =⇒ (∃w . rf[w, r] ∈ rf ) . • Singleness: a read event in the trace τp must have at most one corresponding communication in rf : Wf 7 (π) ′ ′ ′ ∀r w w . (rf[w, r] ∈ rf ∧ rf[w , r] ∈ rf ) =⇒ (w = w ) . Note however that a read instruction can be repeated in a program loop and may give rise to several executions of this instruction, each recorded by a unique read event. • Match: if a read reads from a write, then the variables read and written must be the same: (rf[w(hp, ℓ, x := r, θi, v), r(hp′ , ℓ′ , r′ := x′ , θ′ i, x′θ )] ∈ rf ) =⇒ (x = x′ ) . Wf 8 (π) • Inception: no communication is possible without the occurrence of both the read and (maybe initial) write it involves: Wf 9 (π) ∀r w.(rf[w, r] ∈ rf ) =⇒ (∃p ∈ Pi, q ∈ Pi ∪ {start}. ∃j ∈ [0, 1 + |τp |[, k ∈ [0, 1 + |τq |[ . τp j = r ∧ τq k = w) . Note that this does not prevent a read to read from a future write. Language-dependent conditions for lisa are as follows: • Start : the initial state of a trace τp should be of the form: τp = shl 0p , inf p , λ R . 0, ∅i Wf 10 (π) 0 where l 0p is the entry label of process p and inf p is a minimal stamp of p. 4 • Next state: if at point k of a trace τp of process p of an execution π = τstart × = shℓ, θ, ρ, νi then: the computation is in state τp Q p∈Pi τp × rf k−1 – the next event must be generated by the instruction instr , instr JPKp ℓ at label ℓ of process p – the next event has the form τp k = ehhp, ℓ, instr , θi, xθ , vi – the next state τp = shκ′ , θ′ , ρ′ , ν ′ i has κ′ = ℓ′ which is the label after the instruction instr k – the stamp θ′ = succp (θ) is larger, and – the value v as well as the new environment ρ′ and valuation ν ′ are computed as a function of the previous environment ρ, the valuation ν, and the execution π. Formally: ∀k ∈ ]0, 1 + |τp |[ . ∀κ′ ρ ρ′ ν ν ′ θ θ′ . (τp k−1 = shℓ, θ, ρ, νi ∧ τp k = ehhp, ℓ, instr , θi, xθ , vi ∧ τp = shκ′ , θ′ , ρ′ , ν ′ i) =⇒ (κ′ = ℓ′ ∧ θ′ = succp (θ) ∧ v = v(ρ) ∧ ρ′ = ρ(v, ρ) ∧ ν(v, ρ, ν, π, ν ′ )) . k We give the form of the next event τp k for each lisa instruction:  q  ′ 0 • Fence (instr = ℓ : f[ts] {l 01 . . . l m 1 } {l 2 . . . l 2 } ; ℓ : . . .):  q  0 τp k = m(hp, ℓ, f[ts] {l 01 . . . l m 1 } {l 2 . . . l 2 } , θi) (ρ′ = ρ ∧ ν ′ = ν) . Wf 11 (π) ′ • Register instruction (instr = ℓ : mov R1 operation ; ℓ : . . .): τp k = a(hp, ℓ, mov R1 operation , θi, v) (v = E Joperation K(ρ, ν) ∧ ρ′ = ρ[R1 := v] ∧ ν ′ = ν) . Wf 12 (π) where E JeK(ρ, ν) is the evaluation of the expression e in the environment ρ and valuation ν. • Write (instr = ℓ : w[ts] x r-value ; ℓ′ : . . .): Wf 13 (π) τp k = w(hp, ℓ, w[ts] x r-value , θi, v) (v = E Jr-value K(ρ, ν) ∧ ρ = ρ′ ∧ ν ′ = ν) . • Read (instr = ℓ : r[ts] R1 x; ℓ′ : . . .): τp k = r(hp, ℓ, r[ts] R1 x, θi, xθ ) (ρ′ = ρ[R1 := xθ ] ∧ ∃q ∈ Pi ∪ {start} . ∃!j ∈ [1, 1 + |τq |[ . ∃ℓ′′ , θ′′ , v . (τq j = w(hq, ℓ′′ , w[ts] x r-value , θ′′ i, v) ∧ Wf 14 (π) rf[τq j , τp k ] ∈ rf ∧ ν ′ = ν[xθ := v])) . • RMW (instr = rmw[ts] r (reg-instrs ) x ): for the begin (instr = beginrmw[ts] x) and end event (instr = endrmw[ts] x): Wf 14 (π) τp k = m(hp, ℓ, instr , θi) (ρ′ = ρ ∧ ν ′ = ν) . • Test (instr = ℓ : b[ts] operation l t ; ℓ′ : . . .): – on the true branch: τp k = t(hp, ℓ, b[ts] operation l t , θi) (sat(E Joperation K(ρ, ν) 6= 0) ∧ κ′ = l t ∧ ρ′ = ρ ∧ ν ′ = ν) – on the false branch: 5 Wf 16t (π) τp k = t(hp, ℓ, b[ts] operation l t , θi) (sat(E Joperation K(ρ, ν) = 0) ∧ κ′ = ℓ′ ∧ ρ′ = ρ ∧ ν ′ = ν) 2.3 Wf 16f (π) Anarchic semantics The anarchic semantics of a program P is S a JPK , {π ∈ Π | Wf 2 (π) ∧ . . . ∧ Wf 16 (π)} . 2.4 cat specification of a weakly consistent semantics The candidate execution abstraction αΞ (π) abstracts the execution π = ς × rf into a candidate execution αΞ (π) = he, po, rf , iw , fw i where e is the set of events (partitionned into fence, read, write, . . . events), po is the program order (transitively relating successive events on a trace of each process), rf = rf is the set of communications, and iw is the set of initial write events. Then we define αΞ (S ) , {hπ, αΞ (π)i | π ∈ S } and α JHcm K(C ) , {π, Γ | hπ, Ξi ∈ C ∧ hallowed, Γ i ∈ JHcm K(Ξ)} where the consistence JHcm K(Ξ) of a candidate execution Ξ for a cat consistency model Hcm is defined in (Alglave, Cousot, and Maranget, 2015c) and returns communication relations Γ psecifying communication constraints on communication events. The analytic semantics of a program P for a cat specification Hcm is then S JPK , α JHcm K ◦ αΞ (S a JPK). 3 3.1 An overview of lisa Example To illustrate lisa we use Peterson’s algorithm, given in Figure 1. The algorithm uses three shared variables F1, F2 and T: • two shared flags, F1 for the first process P0 (resp. F2 for the second process P1), indicating that the process P0 (resp. P1) wants to enter its critical section, and • a turn T to grant priority to the other process: when T is set to 1 (resp. 2), the priority is given to P0 (resp. P1). Let’s look at the process P0: P0 busy-waits before entering its critical section (see the do instruction at line 3:) until (see the while clause at line 6:) the process P1 does not want to enter its critical section (viz ., when F2=false, which in turn means ¬R1=true thanks to the read at line 4:) or if P1 has given priority to P0 by setting turn T to 1, which in turn means that R2=1 thanks to the read at line 5:. LISA code Let’s read it together; our algorithm is composed of: • a prelude at line 0:, between curly brackets, which initialises the variables F1 and F2 to false and the variable T to 0. By default initialisation is to 0 (false); • two processes, each depicted as a column; let’s detail the first process, on the left-hand side: at line L1: we write 1 (true) to the shared variable F1—the lisa syntax for writes is “w[] x e” where x is a variable and e an expression over registers, whose value is written to x. At 6 0:{ F1 = false; F2 = false; T = 0; } P0: P1: 1:F1 = true 10:F2 = true; 11:T = 1; 2:T = 2 12:do 3:do 13: R3 = F1; 4: R1 = F2 14: R4 = T; 5: R2 = T 6:while R1 ∧ R2 6= 1 15:while R3 ∧ R4 6= 2; 16:skip (* CS2 *) 7:skip (* CS1 *) 17:F2 = false; 8:F1 = false 18: 9: LISA { } P0 L1: L2: L4: L5: L20: L21: L6: L8: L9: Peterson w[] F1 1 w[] T 2 r[] r1 F2 r[] r2 T mov r7 (neq r2 1) mov r9 (and r1 r7) b[] r9 L4 w[] F1 0 | | | | | | | | | | P1 L10: L11: L13: L14: L31: L32: L15: L17: L18: ; w[] F2 1 ; w[] T 1 ; r[] r3 F1 ; r[] r4 T ; mov r6 (neq r4 2) ; mov r8 (and r3 r6); b[] r8 L13 ; w[] F2 0 ; ; Figure 1: Peterson algorithm—in lisa line L2 of we write 2 to T. At line 3: of Peterson algorithm, we see a do instruction which ensures that we iterate the instructions at lines 4 and 5 until the condition expressed at line 6 (viz ., R1 ∧ R2 6= 1) is false. In the lisa translation, at line L4: we read the variable F2 and write its value into register R1, and at line L5: we read the variable T and write its value into register R2. At lines L20: and L21: we locally compute the value r1 ∧ r2 6= 1) in local register r9. At line L6: the branch instruction b[] r9 L4 branches to L4: if r9 is 1 (true) i.e. the loop body is iterated once more and continue in sequence when r9 is 0 (false) i.e. the loop body is exited and the critical section is entered. At line L8: we write 0 (false) to F1. 3.2 Syntax lisa programs P = {Pstart }JP0 k. . . kPn−1 K on shared variables x ∈ locJPK contain: • a prelude Pstart assigning initial values to shared variables. In the case of Peterson algorithm in Figure 1, the prelude at line 0: assigns the value false to both variables F1 and F2, and the value 0 to T. This initialization to 0 (false) is implicit in the lisa translation; • processes P0 . . . Pn−1 in parallel; each process: – has an identifier p ∈ PiJPK , [0, n[; in the case of Peterson we have used P0 for the first process (on the left) and P1 for the second process (on the right); – has local registers (e.g. R0, R1); registers are assumed to be different from one process to the next; if not we make them different by affixing the process identifier like so: (p:R)); – is a sequence of instructions. Instructions can be: • register instructions mov R1 operation , where the operation has the shape op R2 r-value : – the operator op is arithmetic (e.g. add, sub, mult) or boolean (e.g. eq, neq, gt, ge); – R1 and R2 are local registers; – r-value is either a local register or a constant; • read instructions r[ts] R x initiate the reading of the value of the shared variable x and write it into the local register R; • write instructions w[ts] x e initiate the writing of the value of the register expression e into the shared variable x; 7 • branch instructions b[ts] operation l t branch to label l t if the operation has value true and go on in sequence otherwise;  q  0 0 m • fence instructions f[ts] {l 01 . . . l m 1 } {l 2 . . . l 2 } . The optional sets of labels {l 1 . . . l 1 } and q 0 {l 2 . . . l 2 } indicate that the fence f[] only applies between instructions in the first set and instructions in the second set. The semantics of the fence f[] as applied to the instructions q 0 at l 01 , . . . , or l m 1 and l 2 , . . . , l 2 , is to be defined in a cat specification; • read-modify-write instructions (RMW) rmw[ts]Rreg-instrs x beginrmw[ts] x; are translated into a sequence of instructions delimited by r[ts] R x; markers beginrmw[ts] x and endrmw[ts] x as shown opposreg-instrs ; ite. reg-instrs is a sequence of register instructions, which computes in R the new value assigned to the shared variable w[ts] x R; x. endrmw[ts] x Any semantics requirement on RMWs, such as the fact that there can be no intervening write to x between the read and the write of the RMW, has to be ensured by a cat specification. Instructions can be labelled (i.e. be preceded by a control label ℓ) to be referred to in branches or fences for example. Labels are unique; if not we make them different by affixing the process identifier like so: p:l . instr JPKp ℓ is the instruction at label ℓ ∈ L(p) of process p of program P. Moreover, instructions can bear tags ts (to model for example C++ release and acquire annotations). Scopes are special tags (e.g. to model e.g. Nvidia PTX (Alglave, Batty, Donaldson, Gopalakrishnan, Ketema, Poetzl, Sorensen, and Wickerson, 2015a) and HSA (HSA Foundation, 2015)), whose semantics must be defined in a cat specification. Scopes can be organized in the scope tree. The events created by a process will be automatically tagged by the scope of that process. For example the lisa program MP-scoped in Figure 2 is augmented by a scope tree. The scope tree scopes: (system (wi P0) (wi P1)) in Figure 2 Figure 2: The example MP-scoped specifies that the threads P0 and P1 reside in two different scope instances of level wi. By contrast, still as specified by the scope tree, there is one scope instance of level system and both threads reside in this common instance. 4 The anarchic true parallel formal semantics with separated communications of lisa We now instantiate the general definition of an anarchic semantics of a parallel program of Section 2 to the case of the lisa language. We introduce the anarchic true parallel semantics S a with separated unconstrained communications in Section 4.1 and provide ground value and symbolic instances of the anarchic semantics for the little language lisa, in Section 4.2. The abstraction of the executions to candidate executions is specified in Section 5.1. This is used in Section 5.2 to specify the semantics of a program with a cat weak consistency model M constraining communications. The analytic semantics is the anarchic semantics with separated communications S a constrained by a cat the weak consistency model. It is analytic in that it separates the definition of the computational semantics S a from the communication semantics specified by a cat specification. 8 The definition of the anarchic semantics is in two parts. The first part in Section 4.1 is language independent. The second part in Section 4.2 is language dependent for lisa. 4.1 The anarchic true parallel symbolic and ground valued semantics The anarchic true parallel semantics avoids interleaving thanks to a concurrent representation of execution traces of processes with separate communications. The anarchic semantics can be ground when taking values in a ground set Dv (Z for lisa). The anarchic semantics can also be symbolic when values are symbolic expressions in the symbolic variables denoting communicated values (called pythia variables). This generalises symbolic execution (King, 1976) to finite and infinite executions of parallel programs with weak consistency models. Since in a true parallel semantics there is no notion of global time, there is also no notion of instantaneous value of shared variables. The only knowledge on the value of shared variables is local, when a process has read a shared variable. We use a pythia variable to denote the value which is read (at some local time symbolically denoted by a stamp). The usage of pythia variable is not strictly necessary in the ground semantics. It is useful in the symbolic semantics to denote values symbolically. It is indispensable in invariance proof methods to give names to values as required in formal logics. 4.1.1 Semantics The semantics S JPK of a concurrent program P = JP0 k. . . kPn−1 K ∈ Pg with n > 1 processes P0 , . . ., Pp , . . ., Pn−1 identified by their pids p ∈ PiJPK , [0, n[ is a set of executions S JPK ∈ ℘(ΠJPK). We omit JPK when it is understood from the context. 4.1.2 Computations and executions Q Q A computation ς ∈ Σ , Tr(start) × p∈Pi Tr(p) × Tr(finish) has the form ς = τstart × p∈Pi τp × τfinish where start 6∈ Pi ∪ {finish} is the initialization/prelude process, finish 6∈ Pi ∪ {start} is the finalization/postlude process, τstart ∈ Tr(start) is an execution trace of the initialization process, τp ∈ Tr(p) are execution traces of the processes p ∈ Pi, and τfinish ∈ Tr(finish) is an execution trace of the finalization process. Q An execution π ∈ Π , Σ × ℘(K) has the form ς × rf = τstart × p∈Pi τp × τfinish × rf where rf ∈ ℘(K) is the communication relation (read-from). K will be defined in Sect. 4.1.12 as the set of read-write event pairs on the same shared variable with the same value. 4.1.3 Traces A finite non-empty trace τp ∈ Tr+ , p ∈ Pi ∪ {start, finish} is a finite sequence of computation ǫ steps hǫ, σi, represented as −−−→ σ (with event ǫ ∈ E(p) and next state σ ∈ S(p)), of the form τp = ǫm ǫ3 ǫ2 ǫ1 −−−− → σm −−−−→ σ1 −−−−→ σ2 −−−−→ σ3 . . . σn−1 − = ǫk h−−−−→ σk | k ∈ [1, 1 + m[i ǫ such that ǫ1 = ǫstart is the start event. A computation step −−−→ σ represents the atomic execution of an action that (1) creates event ǫ and (2) changes the state to σ. The trace τp 9 ǫ3 ǫ2 has length |τp | = m. For brevity, we use the more traditional form τp = σ1 −−−−→ σ2 −−−−→ σ3 ǫm −−−− → σm since the first event ǫ1 is always the start event ǫ1 = ǫstart . We say that event . . . σm−1 − ǫk ǫk , state σk , and step −−−−→ σk are “at point k ∈ [1, 1 + |τp |[ of τp ”. An infinite trace τp ∈ Tr∞ , p ∈ Pi has the form τp = ǫn ǫ3 ǫ2 ǫ1 −−−−→ σ1 −−−−→ σ2 −−−−→ σ3 . . . σn−1 −−−−→ σn . . . = ǫk h−−−−→ σk | k ∈ N∗ i ǫ2 and has length |τ | = ∞ such that 1 + ∞ = ∞1 . It is traditionally written τ = σ1 −−−−→ σ2 ǫn ǫ3 −−−−→ σ3 . . . σn−1 −−−−→ σn . . . where ǫ1 = ǫstart . We let Tr , Tr+ ∪ Tr∞ be the set of (finite or infinite) traces. We define the sequence of states of a trace τ as , σ1 σ2 σ3 . . . σn−1 σn [. . .] τ and its sequence of events of a trace τ as τ , ǫ1 ǫ2 ǫ3 . . . ǫn−1 ǫn [. . .]. (We write [. . .] when the elements . . . are optional e.g. to have a single notation for both finite τk and infinite traces.) So a trace has the form τ = h−−−−→ τ k | k ∈ [1, 1 + |τ |[i. 4.1.4 Stamps Stamps are used to ensure that events in a trace of a process are unique. • θ ∈ P(p) the stamps (or postmarks) of process p ∈ Pi ∪ {start, finish} uniquely identify events when executing process Pp . Different processes have different stamps so for all p, q ∈ Pi ∪ {start, finish} if p 6= q then P(p) ∩ P(q) = ∅; [ • θ∈P , P(p). p∈Pi∪{start,finish} We assume that stamps are totally ordered per process. • Ep ∈ ℘(P(p) × P(p)) totally orders P(p) (⊳p is the strict version); • succp ∈ P(p) → P(p) is the successor function (s.t . θ⊳p succp (θ), not necessarily the immediate successor); • inf p ∈ P(p) is the smallest stamp for process p (s.t . ∀θ ∈ P(p) . inf p ⊳p θ). 1 With this convention, the domain of a finite or infinite trace is [1, 1 + |τ |[ (where ∞ is the first infinite ordinal). If |τ | is finite then [1, 1 + |τ |[ = [1, |τ |]. Else |τ | is infinite so 1 + |τ | = 1 + ∞ = ∞ in which case [1, 1 + |τ |[ = [1, ∞[. 10 These hypotheses allow us to generate a sequence of unique stamps when building traces. Starting from any stamp (e.g. inf p ), a trace where events are successors by succp is guaranteed to have unique stamps (since moreover different processes have different stamps). Stamps are otherwise unspecified and can be defined freely. For example we can use process labels and/or loop counters. 4.1.5 Equivalence of executions and semantics up to stamp renaming ∼ We consider executions Π|∼ = up to the isomorphic renaming = of stamps. The renaming is an equivalence relation. τstart × Y ′ τp × τfinish × rf ∼ × = τstart p∈Pi Y ′ τp′ × τfinish × rf ′ , p∈Pi ∃̺ ∈ P և։ P . ∀p ∈ Pi ∪ {start, finish} . τp′ = ̺(τp ) ∧ rf ′ = ̺(rf ) . where և։ denotes an isomorphism and ̺ is homomorphically extended from stamps to events, states, traces, and communications containing these stamps. ∼ We also consider semantics S |∼ = up to the isomorphic renaming = of stamps by defining semantics to be equivalence when identical up to isomorphic stamp renaming of their traces.   ′ ′ ′ . S ∼ π|∼ = S′ , = π ∈ S = π |∼ = π ∈S 4.1.6 Shared variables, registers, denotations, and data • x ∈ locJPK ⊆ X: shared variables of program P; • r ∈ R(p): local registers of process p ∈ Pi ∪ {finish}; • d ∈ D: set of all data/value denotations; • 0 ∈ D: we assume that registers and, in absence of prelude, shared variables are implicitly initialized by a distinguished initialisation value denoted 0; • We let D be the set of all ground or symbolic values manipulated by programs and I ∈ D → D is the interpretation of data/value denotations into data/value. 4.1.7 Pythia variables • Pythia variables xθ are used to “store/record” the value of a shared variable x when accessing this variable2 . Pythia variables xθ can be thought of as addresses, locations, L-values in buffers, or channels, communication lines to indirectly designate the R-value of a shared variable observed by a specific read event stamped θ. The R-value designated by an L-value xθ may be unknown. For example, the actual value may be assigned in the future e.g. in the thin-air case3 . 2 similarly 3 Again to single assignment languages but not SSA which is a static abstraction. this situation may have to be rejected by a cat specification. 11 XP (p) , XP , {xθ | x ∈ X ∧ θ ∈ P(p)} [ pythia variables of process p ∈ Pi ∪ {finish} at stamp θ pythia variables. XP (p) p∈Pi Note that we designate pythia variables xθ via a stamp θ to guarantee their uniqueness in the trace. Observe that we use three different kinds of variables. Program variables like local registers r and shared variables x which appear in the syntax and semantics, meta or mathematical variables like p or θ which are used in the definitions, theorems, and proofs but are not part of the syntax and semantics (only the objects denoted by these mathematical variables do appear in the syntax and semantics), and pythia variables like e.g. x0 , y2 , etc. which appear in the semantics. So xθ is one of these pythia variables where the mathematical variable θ denotes any of the stamps in P(p) e.g. 0, 1, etc. 4.1.8 Expressions In the symbolic semantics, symbolic values will be expressions on pythia variables XP (and possibly other symbolic variables), in which case D = EJXP K and the interpretation I is the identity. In the ground semantics, values belong to a ground set Dv (Z for lisa). • e, e1 , e2 , . . . ∈ EJV K: set of all mathematical expressions over variables v ∈ V , e ::= d | v | e1 ȅ e2 (where ȅ is a mathematical (e.g. arithmetical) operator); • b, b1 , b2 , . . . ∈ BJV K: set of all boolean expressions over variables v ∈ V , b ::= e1 < e2 | b1  b2 | ¬ b (where < is a comparison,  is a boolean operator, and ¬ is negation). • The evaluation E JeK(ρ, ν) of a mathematical expression e ∈ EJV K over variables v ∈ V in an environment ρ ∈ V → D ∪ XP mapping variables v ∈ V to their value ρ(v) ∈ D or to a pythia variable and a valuation ν ∈ XP → D mapping pythia variables xθ ∈ XP to their value ν(xθ ) ∈ D is defined by structural induction on e as E JdK(ρ, ν) , I JdK E JvK(ρ, ν) , ρ(v) symbolic semantics or ground value semantics when ρ(v) ∈ D is ground , E Jρ(v)K(ρ, ν) ground value semantics when ρ(v) ∈ XP is not ground E Jxθ K(ρ, ν) E Je1 ȅ e2 K(ρ, ν) (Def. 16) , ν(xθ ) , E Je1 K(ρ, ν) I JȅK E Je2 K(ρ, ν) where I JdK in the interpretation of the constant d and I JȅK is the interpretation of the mathematical operator ȅ. • The evaluation B JbK(ρ, ν) ∈ B , {true, false} of a boolean expression b ∈ BJV K in environment ρ ∈ V → D is defined as 12 B Je1 < e2 K(ρ, ν) , E Je1 K(ρ, ν) I J<K E Je2 K(ρ, ν) B Jb1  b2 K(ρ, ν) , B Jb1 K(ρ, ν) I JK B Jb2 K(ρ, ν) B J ¬ bK(ρ, ν) (Def. 17) , I J ¬ KB JbK(ρ, ν) . where I J<K is the interpretation of the comparison operator <, I JK is the interpretation of the boolean operator , and I J ¬ K is the interpretation of the negation ¬ . 4.1.9 Events Start event. • ǫstart is the start event at the beginning of traces. B , {ǫstart }. The ǫstart event is not indispensable. It is used to represent uniformly traces as sequences of computation steps i.e. pairs of an event and a state. Otherwise a trace would be a sequence of states separated by events. This conventional representation is dissymmetric which is why we choose to have a ǫstart event. Computation events. • c(p) ∈ C(p) is the set of computation events of process p ∈ Pi. In the case of lisa, the computation events EJproc K of a process proc are defined in Fig. 5. They can be marker events (defined for fences in Fig. 9 and for read-modify-write instructions in Fig 14), register assignment events (defined in Fig. 10), and test events (defined in Fig. 15). Read events. • r(p, x, v) ∈ R(p, x, v) is the set of read events of process p ∈ Pi reading value v ∈ D from shared variable x ∈ locJPK; • r(finish, x, v) ∈ R(finish, x, v) is the set of final read events reading value v ∈ D from shared variable x ∈ locJPK; [ [ • r(p) ∈ R(p) , R(p, x, v) is the set of read events of process p ∈ Pi∪{finish}; v∈ D x∈locJPK Read events for lisa are defined in Fig. 12. Each read event stamped θ uses a pythia variable xθ to store the value read/to be read by the read event. The pythia variable xθ is always unique in a trace τ since the stamp θ of the event is assumed (by the forthcoming condition Wf 3 (τ )) to be unique on that trace τ . 13 Write events. • w(p, x, v) ∈ W(p, x, v) is the set of write events of process p ∈ Pi ∪ {start} writing value v ∈ D into shared variable x ∈ locJPK; • w(start, x, v) ∈ W(start, x, v) is the set of initial write events of value v ∈ D into shared variable x ∈ locJPK; [ [ • w(p) ∈ W(p) , W(p, x, v) is the set of write events of process Pp , p ∈ Pi ∪ x∈X v∈D {start}; For the lisa language, write events are defined in Fig. 11. Events. • ǫ, ǫ(p) ∈ E(p) , {start, finish}; • EJpK , C(p) ∪ R(p) ∪ W(p) is the of computation events of process p ∈ Pi ∪ [ E(p) is the set of events of program P = JP1 k. . . kPn K ∈ Pg; p∈Pi∪{start,finish} For the lisa programs, it is defined in Fig. 3. 4.1.10 States States are the control state and the memory state mapping variables to their value. We use an environment to record the value of local registers, as is classical. However, the instantaneous values of shared variables are unknown to processes. We use instead pythia variables to record the values read by processes. The valuation maps these pythia variables to the value of the corresponding shared variable at the time when it was read (i.e. which in general is not the instantaneous value, otherwise unknown). We would like all events to be distinct, ordered per process, but not interprocesses. Therefore we had stamps to states (knowing by the hypotheses of Section 4.1.4 that there are ordered per process according to the program order of that process). • The states of the start and finish processes are meaning less and so are • where S(start) = S(finish) = {•}. • The states σ ∈ S(p) of process p ∈ Pi have the form σ = shκ, θ, ρ, νi where – κ ∈ L(p) is the current control label/program point of process p (we have done JPK(p)κ which is true if and only if κ is the last label of process p which is reached if and only if process p does terminate); – θ ∈ P(p) is the stamp of the state in process p; – ρ ∈ Ev(p) , R(p) → D ∪ XP /EJXP (p)K is an environment mapping local registers r ∈ R(p) of process p to their ground/symbolic value. This is a map since the process registers are known statically; 14 6 – ν ∈ Va(p) , D/XP (p) → EJXP (p)K is a valuation mapping pythia variables of process p to their ground/symbolic value. This is a partial map since the pythia variables are known dynamically. We write dom(ν) for the domain of definition of ν (initially ∅ at execution start). 4.1.11 Well-formed traces Q The execution π = τstart × p∈Pi τp × τfinish × rf ∈ Π is well-formed under the following well-formedness conditions. The finalisation τfinish it is necessary to specify the outcome on the program computations (in conjunction with a cat specification of how the final communications should be performed). • Start : traces τ ∈ {τp | p ∈ Pi} ∪ {τstart , τfinish } ∈ ℘(Tr) must all start with a unique start event on the trace. τ 1 = ǫstart ∧ ∀i ∈ ]1, 1 + |τ |[ . τ i 6= ǫstart . Wf 2 (π) • Uniqueness: the stamps of events in a trace τ ∈ {τp | p ∈ Pi}∪{τstart , τfinish } ∈ ℘(Tr) must be unique on the trace (the initial write events as well as the final read and communication events are unique per shared variable and so do not need stamps to be distinguished). ∀i, j ∈ [1, 1 + |τ |[ . (i 6= j ∧ τi , τj 6∈ (R(finish) ∪ W(start))) =⇒ stamp(τi ) 6= stamp(τj ) . Wf 3 (π) (It immediately follows that all events occurring on a trace are unique. Moreover, the symbolic variable xθ in any read event τk = r(hp, ℓ, r := x, θi, xθ ) of a trace τ is unique on that trace.) • Initialisation: all shared variables x ∈ X are assumed to be initialized once and only once to a value vx ∈ D in the sequential prelude (or to vx = I J0K by default). ∀x ∈ X .(∃τ1 , τ2 . τstart = τ1 (w(hstart, ℓstart , x := e, θi, vx )) τ2 ) ∧ (∀τ1 , τ2 , τ3 . (τstart = τ1 ǫ τ2 w(hstart, ℓ, x := e, θi, vx ) τ3 ) =⇒ (ǫ ∈ W(start, y) ∧ y 6= x)) . Wf 4 (π) • Finalisation: all shared variables x ∈ X are finally read once and only once in the postlude and their final value is stored in a fresh register rx . (∀x ∈ X . (∃τ1 , τ2 . τfinish = τ1 r(hfinish, ℓfinish , rx := x, θi, xθ ) τ2 ) ∧ (∀τ1 , τ2 , τ3 . (τ = τ1 r(hfinish, ℓ, rx := x, θi, xθ ) τ2 ǫ′ τ3 )) =⇒ ((ǫ′ ∈ R(finish, y) ∧ y 6= x))) . Wf 4f (π) • Maximality: finite trace τp of a process p ∈ Pi must be maximal i.e. must describe a process which execution is finished. Note that infinite traces are maximal by definition, hence we do not need to include them in the present maximality condition. 15 ∀p ∈ Pi . (τp ∈ Tr+ ) =⇒ (∃ℓ ∈ L(p) . ∃θ ∈ P(p) . ∃ρ ∈ Ev(p) . ∃ν ∈ Va(p) . τp = shℓ, θ, ρ, νi ∧ done JPK(p)ℓ) . Wf 5 (π) |τ | (i.e. the control state of the last state of the trace is at the end of the process, as indicated by done JPK(p)ℓ, which is language dependent, and defined for lisa in Sect. 4.2.) 4.1.12 Well-formed communications Communications. • c(p, w) ∈ K(p, w) is the set of communications of process p ∈ Pi ∪ {finish} reading from the write w. c(p, w(q, x, v)) • • • • ::= rf[w(q, x, v), r(p, x, v ′ )] communication read event r(p, x, v ′ ) of process p ∈ Pi or final read (p = finish) reads the value v ′ of x from write event w(q, x, v) of the same or another process q ∈ Pi or from initial write (q = start) where sat(v = v ′ ). S c(p) ∈ K(p) , w∈W K(p, w) is the set of communications for process p ∈ Pi ∪ {finish}; S c(w) ∈ K(w) , p∈Pi∪{finish} K(p, w) is the set of communications satisfied by write event w; S c ∈ KJPK , p∈Pi∪{finish} K(p) is the set of communications of program P = JP1 k. . . kPn K ∈ Pg; S K , P∈Pg KJPK is the set of all communications. Notice that communications are not stamped (precisely because we do not want to impose any notion of time between communications). If a stamp is needed to uniquely identify a communication, we can use the one of the read event involved in the communication since it is unique by Wf 6 (π) and Wf 7 (π). Well-formed communications. To be well-formed, an execution π = τstart × τfinish × rf ∈ Π must have communications rf satisfying the following conditions. Q p∈Pi τp × • Satisfaction: a read event in the trace τp ∈ Tr of a process p ∈ Pi ∪ {finish} must have at least one corresponding communication in rf (since writes are fair i.e. become ultimately readable and there is always an initial readable write to initialize variables). We impose this condition on reads to avoid the case where a read never reads anything, which would block the execution. ∀i ∈ ]1, 1 + |τp |[ . ∀r ∈ R(p) . (τp i = r) =⇒ (∃w ∈ W . rf[w, r] ∈ rf ) . Wf 6 (π) • Singleness: a read event in the trace τp ∈ Tr of a process p ∈ Pi ∪ {finish} must have at most one corresponding communication in rf . 16 ∀r ∈ R(p) . ∀w, w′ ∈ W . (rf[w, r] ∈ rf ∧ rf[w′ , r] ∈ rf ) =⇒ (w = w′ ) . Wf 7 (π) (Note however that a single read action (i.e. atomic instruction in lisa), can be repeated in a program loop and may give rise to several executions of this action, each recorded by unique read events (each one reading from one, possibly different, past or future write event.) • Match: if a read event in the trace τ ∈ Tr reads from a write event, then the variables read and written must be the same. (rf[w(hp, ℓ, x := r, θi, v), r(hp′ , ℓ′ , r′ := x′ , θ′ i, x′θ )] ∈ rf ) =⇒ (x = x′ ) . Wf 8 (π) • Inception: no communication is possible without the occurrence of both the read and write events it involves (the write may be an initial one). ∀r ∈ R(p) . ∀w ∈ W . (rf[w, r] ∈ rf ) =⇒ (∃p ∈ Pi ∪ {finish}, q ∈ Pi ∪ {start} . ∃j ∈ [1, 1 + |τp |[, k ∈ [1, 1 + |τq |[ . τp j = r ∧ τq k = w) . Wf 9 (π) (Note that this does not prevent a read to read from a future write.) 4.1.13 Well-formed execution Q An execution π = τstart × p∈Pi τp × τfinish × rf ∈ Π is well-formed if and only if it satisfies all conditions Wf 2 (π) to Wf 9 (π). This leads to the definition of the semantic domain. D , {S ∈ ℘(Tr|∼ = ) | ∀π ∈ S . Wf 2 (π) ∧ . . . ∧ Wf 9 (π)} (10) Moreover, for a particular programming language, computation events on process traces must be generated in program order. This well-formedness condition has to be specified for each programming language e.g. Wf 10 (π) to Wf 16 (π) below for lisa. 4.1.14 Anarchic semantics S T Observe that if ∀i ∈ ∆.S i ∈ D then i∈∆ S i ∈ D and i∈∆ S i ∈ D proving that hD, ⊆, ∅, S a , ∪, ∩i is a complete of h℘(Tr|∼ = ), ⊆, ∅, Tr|∼ = , ∪, ∩i. So D has an infimum ∅ and a S sublattice  supremum S a , S ∈D S ∈ D called the anarchic semantics. 4.2 Litmus Instruction Set Architecture (lisa) In this section we present a little language that we call lisa, for Litmus Instruction Set Architecture. We provide the syntax, symbolic and ground semantics of lisa. 17 4.2.1 Programs The semantics of programs is defined by an attribute grammar (Knuth, 1990) (see (Paakki, 1995) for an introduction) given in Figure 3. The program may have a sequential prelude, viz ., a set of initial assignments of values vx to shared variables x, a case covered by Wf 4 (π) and by p = start in Fig. 11. We omit the specification of the syntax and semantics of the prelude. In absence of prelude, for an empty prelude {}, or in absence of a specific initialization of some shared variables, the shared variables are assumed to be implicitly initialized to I J0K. Local registers of processes are assumed to be implicitly initialized to I J0K, as shown in Fig. 5. The lisa version used by the herd7 tool also offers the possibility to initialize registers r in the prelude. The register is designated by (p:r) where p ∈ Pi is their process identifier. This is equivalent to moving these initializations at the beginning of the corresponding process p since they will be executed after the default initialization of registers to 0. The lisa version used by the herd7 tool also offers the possibility to define a postlude to check whether there exists a finite execution τ or for all finite executions τ a condition on the trace τ does hold. This boolean condition may involve the final value of registers (p:r) evaluated by E JrK(τ, |τ |) where p is a process identifier. This boolean condition may also involve the final value of shared variables x as stored in register rx in Fig. 12 where p = finish. One can optionally specify a scope tree to be used in the cat communication specification. The attributes of a program prog are its number pid (prog ) of processes, the events EJprog K that can be generated by the instructions of the program, and its semantics S J prog K. For clarity, some attributes are left implicit such as the local labels L(p), the local registers R(p) of process p ∈ [0, pid (prog )[. These attribute definitions including restrictions such as uniqueness can be easily added to the attribute grammar. The anarchic semantics S a Jbody K is the set of all executions satisfying conditions wf J body K expressing that the execution π must correspond to an execution of the body . Moreover all executions π in this anarchic semantics S J prog K must satisfy well-formedness conditions Wf 2 (π), . . . , Wf 9 (π) as expected by the cat semantics. 18 Programs prog ∈ Proc prog ::= body | | | | | {} body prelude body prelude body postlude prelude body scopes: scope-tree prelude body scopes: scope-tree postlude In all cases, let n = pid (body ) in , n + 1; • pid (prog ) • PiJbody K , • instr Jprog K (number of processes) (program process identifiers) [0, n]; • done J prog K , • EJprog K (last process identifier in body ) (last control label check) done Jbody K; , instr Jprelude K ∪ instr Jbody K (instructions) , EJbody K; • S J prog K , {τstart × (program events) n Y τp × τfinish × rf | wf J body K(τstart × p=1 ∀rf ∈ rf . ¬wf J body K(τstart × n Y τp × τfinish × rf ) ∧ p=1 n Y τp × τfinish × rf \ {rf})} p=1 (i.e. rf is minimal). • S J prog K ∈ D. Figure 3: lisa programs 4.2.2 Tags and scope trees Instructions can bear tag sequences ts, that are given a semantics within cat specifications (Alglave, Cousot, and Maranget, 2015c). Scope trees can be used to describe program architecturedependent features for the cat specification (Alglave, Cousot, and Maranget, 2015c). These tag sequences and scope tree are not involved at all in the program anarchic semantics of lisa. They are added in the form [ts] to events forwarded to cat. If there is no scope tree declaration, the trivial scope tree (trivial P0 P1 ...Pn−1 ) is used where n = pid (body ) is the number of processes in the program. A process can appear at most once in a scope tree. Again scope trees are information for a cat specification, see (Alglave, Cousot, and Maranget, 2015c). 4.2.3 Parallel processes Parallel processes are given in Figure 4. These process identifiers pid are defined to be 0 to n − 1 from left to right where n = pid (body ) is the number of processes in the parallel program. The 19 program events EJbody K and well-formedness conditions wf J body K are collected. Parallel processes body ∈ body ::= Body proc pid (body ) , pid (proc ) PiJproc K , instr Jproc K λ ℓ . (ℓ = after (proc )) , done J body K(0) EJbody K , wf J body K 0 PiJbody K , instr Jbody K , EJproc K λ π . wf J proc Kπ , | body 1 k proc let n = pid (body 1 ) in pid (body ) , PiJbody 1 K , PiJbody K, pid (proc ) , done J body K(p) , instr Jbody K EJbody K , wf J body K , , n+1 PiJproc K , PiJbody K λ ℓ . ( p 6 n ? done J body 1 K(p)ℓ : (ℓ = after (proc )) ) instr Jbody 1 K ∪ instr Jproc K EJbody 1 K ∪ EJproc K λ π . wf J body 1 Kπ ∧ wf J proc Kπ Figure 4: lisa processes 4.2.4 Processes Processes are given in Figure 5. Each process proc of the program body body has a unique process identifier attribute p = pid (proc ). Each instruction instr of a process has a label at (instr ) before and a label after after (instr ) that instruction. The label l is after the last instruction of the list of instructions of the process. Each process with pid p has a unique entry label at (instrs ) which is the one of its first instruction and is where the process p execution must start from, so at (instrs ) is the label of the first control state. 20 Processes proc ∈ ::= Proc instrs l : let p = pid (proc ) and , pid (instrs ) p PiJinstrs K , PiJproc K instr Jproc K , EJproc K , after (proc ) wf J proc K instr Jinstrs K EJinstrs K , , after (instrs ) , l λ π . let π = τstart × Y τp × τfinish × rf in Wf 10 (π) p∈Pi wf J instrs K(π) ∧ τ p 1 = shat (instrs ), inf p , λ r ∈ R(p) . 0, ∅i Figure 5: lisa processes 4.2.5 Lexems For any process p ∈ [1, n − 1], where n = pid (prog ) is the number of processes in the program prog , registers r ∈ R(p) cannot be shared variable identifiers x ∈ X, labels l, ℓ ∈ L(p) cannot be register or shared variable identifiers, and tags in tag sequences cannot be label, register, or shared variable identifiers. This informal context condition is easy to include in the attribute grammar by collecting these sets and checking that their pairwise intersections are empty. 4.2.6 Expressions As shown in Fig. 6, an operation can be either an r-value , i.e. a register or immediate value, or the result of an arithmetic (e.g. add, sub, mult) or boolean (e.g. eq, neq) operator applied to a register r2 and an r-value r-value 3 . The value E JrK of a register in process p is defined in next Sect. 4.2.7. 21 Register values ∈ ::= r-value r-value R-value r let p = pid (r-value ) in r ∈ R(p) E Jr-value K | , E JrK d d∈D E Jr-value K , E JdK Register operations op ∈ Op op arithmetic and Boolean operators ::= add op J op K , + integer addition | | | | | | | | sub op J op K , − integer substraction mult op J op K , × integer multiplication operation operation ... eq op J op K , = logical equality neq op J op K , 6= logical disequality gt op J op K , > logical strictly greater than ge op J op K , > logical greater than or equal ... ∈ ::= Operation op r2 r-value 3 let p = pid (operation ) in r2 ∈ R(p) , p pid (r-value 3 ) E Joperation K(ρ, ν) | , E Jr2 K(ρ, ν) op J op K E Jr-value 3 K(ρ, ν) r-value let p = pid (operation ) in pid (r-value ) E Joperation K , , p E Jr-value K Figure 6: Syntax of lisa expressions 22 4.2.7 Local sequentiality The interleaved trace semantics of a process proc of lisa is locally sequential. This means that (1) the use of registers in a process are sequentially consistent in that the value of a local register r is its last assigned value and (2) that each process is executed in the process program order. Local sequentiality is much weaker than sequential consistency (SC) (Keller, 1976; Hennessy and Plotkin, 1979; Lamport, 1979) or sequential consistency per variable (SCPV) (Alglave, Maranget, and Tautschnig, 2014) which are relative to globally shared variables (and assume local sequentiality for local registers). 4.2.8 Events All computation events collected in EJprog K have the form e(hp, ℓ, u-instr , θi) or e(hp, ℓ, u-instr , θi, v) where e is the name of the event (r for read, w for write, etc.), p is the process, and u-instr is the instruction at label ℓ ∈ L(p) of the process that gave raise to that event. The assignment a, read r, and write w events may also carry a computed or communicated value v ∈ Z. Stamps θ are left unspecified but in case of an instruction u-instr executed several times in a loop the can be used to ensure that all the generated events are different (as required by the uniqueness condition Wf 3 (S )). The conditions wf J body K make sure that the trace events record a program execution. The traces may also include read-from events rf which are constraint by Wf 6 (S ) to Wf 9 (S ). It is checked in Fig. 3 that the events on a trace must be generated by a program execution and satisfy the constraints on communication event. 4.2.9 Instructions Instructions are given in Figure 7 and sequences of instructions in Figure 8. Except for the branch instructions, for which the label must be provided in the program, program instructions may be unlabelled. In that case, an automatic labelling program transformation will add all missing labels. Therefore in the definition of a process proc in Fig. 4, all instructions are assumed to have been labelled. A special case reg-instrs of sequences instrs of instructions is considered in Fig. 14 for the case where all instructions are register instructions in the read-modify-write instruction. 23 Unlabelled instructions u-instr ∈ u-instr ::= | U-instr reg-u-instr | w-u-instr | r-u-instr | rmw-u-instr | b-u-instr f-u-instr For all these case u-instr ::= . . . | x-u-instr | . . ., we have , pid (x-u-instr ) pid (u-instr ) PiJx-u-instr K , PiJu-instr K , instr Jx-u-instr K instr Ju-instr K EJu-instrs K , EJx-u-instr K at (u-instr ) , at (x-u-instr ) , after (x-u-instr ) wf J u-instr K after (u-instr ) , wf J x-u-instr K Labelled instructions instr ∈ instr ::= Instr l :u-instr , pid (u-instr ) pid (instr ) , PiJinstr K PiJu-instr K instr Ju-instr K , instr Jinstr K EJinstrs K , EJu-instr K , at (u-instr ) at (instr ) after (u-instr ) wf J instr K , , after (instr ) wf J u-instr K Figure 7: lisa instructions 24 , l Sequences of labelled instructions instrs instrs ∈ ::= Instrs instr , pid (instrs ) pid (instr ) PiJinstr K instr Jinstrs K , PiJinstrs K , instr Jinstr K EJinstrs K , EJinstr K , at (instrs ) at (instr ) after (instr ) , after (instrs ) wf J instrs K , wf J instr K | instr ; instrs 1 , pid (instrs 1 ) , pid (instr ) PiJinstr K , PiJinstrs K, , instr Jinstrs K EJinstrs K , at (instrs ) instr Jinstr K ∪ instr Jinstrs 1 K at (instr ) , after (instrs 1 ) wf J instrs K , PiJinstrs K EJinstr K ∪ EJinstrs 1 K , after (instr ) pid (instrs ) PiJinstrs 1 K , at (instrs 1 ) , after (instr ) λ π . wf J instr Kπ ∧ wf J instrs 1 Kπ Figure 8: lisa sequences of instructions 25 4.2.10 Markers   Labelled fences are given in Figure 9. Fences can only appear in processes (not in the program prelude or postlude). Fences can have different names and can be labelled, in which case the labels must all occur in the same process as the fence. In this last case, the fence is between any pair of actions with labels in the first and second set. Fences are just markers in the program and their semantics is defined by the cat semantics.   Labelled fences f-u-instr ∈ f-u-instr ::= F-u-instr  q  0 f[ts] {l 01 . . . l m m, q > 0 1 } {l 2 . . . l 2 } , let p = pid (f-u-instr ) and Pi = PiJ f-u-instr K and ℓ = at (f-u-instr ) in  q  0 instr Jf-u-instr K , {hhp, ℓi, f[ts] {l 01 . . . l m 1 } {l 2 . . . l 2 } i}  q  0 EJf-u-instr K , {m(hp, ℓ, f[ts] {l 01 . . . l m 1 } {l 2 . . . l 2 } , θi) | θ ∈ P(p)} Y wf J f-u-instr K , λ π . let π = τstart × τp × τfinish × rf in Wf 11 (π) p∈Pi ∀k ∈ ]1, 1 + |τp |[ . ∀κ′ ∈ L(p) . ∀ρ, ρ′ ∈ Ev(p) . ∀ν, ν ′ ∈ Va(p) . ∀θ, θ′ ∈ P(p) . (τp = shℓ, θ, ρ, νi ∧ k−1  q  0 τp k = m(hp, ℓ, f[ts] {l 01 . . . l m 1 } {l 2 . . . l 2 } , θi) ∧ τp = shκ′ , θ′ , ρ′ , ν ′ i) =⇒ k (κ′ = after (f-u-instr ) ∧ θ′ = succp (θ) ∧ ρ′ = ρ ∧ ν ′ = ν) .   ( . . . indicates that . . . is optional) Figure 9: lisa fences rmw delimiters beginrmw[ts] x and endrmw[ts] x in Fig. 14 are markers used to delimit read, modify, and write instructions rmw which atomically update shared variable variable x as defined in Sect. 4.2.11. The fact that read, modify, and write instructions should be atomic will follow from the definition of their semantics in a cat specification. 4.2.11 Actions Register instructions are given in Fig. 10 where f [x := v](x) = v and f [x := v](y) = f (y) when y 6= x. lisa register accesses are of the form mov r1 operation . Namely, they move the result of an operation into a register, e.g. r1 . Read. In a read instruction of Fig 12, the r-value denotes the value assigned to register r. 26 Register instructions reg-u-instr reg-u-instr ∈ ::= Reg-u-instr mov r1 operation let p = pid (reg-u-instr ) and Pi = PiJ reg-u-instr K and ℓ = at (reg-u-instr ) in r1 ∈ R(p) pid (operation ) , p , instr Jreg-u-instr K EJreg-u-instr K , wf J reg-u-instr K {hhp, ℓi, mov r1 operation i} {a(hp, ℓ, mov r1 operation , θi, v) | θ ∈ P(p) ∧ v ∈ Z} , λ π . let π = τstart × Wf 12 (π) Y τp × τfinish × rf in p∈Pi ′ ∀k ∈ ]1, 1 + |τp |[ . ∀κ ∈ L(p) . ∀ρ, ρ′ ∈ Ev(p) . ∀ν, ν ′ ∈ Va(p) . ∀θ, θ′ ∈ P(p) . ∀v ∈ Z . (τp = shℓ, θ, ρ, νi ∧ k−1 τp k = a(hp, ℓ, mov r1 operation , θi, v) ∧ τp = shκ′ , θ′ , ρ′ , ν ′ i) =⇒ k (v = E Joperation K(ρ, ν) ∧ κ′ = after (reg-u-instr ) ∧ θ′ = succp (θ) ∧ ρ′ = ρ[r1 := v] ∧ ν ′ = ν) . Figure 10: Syntax of lisa register accesses Write. Write accesses are given in Figure 11. The value written is that of r-value . Read, modify, and write. Read-modify-write accesses are given in Figure 14. Readmodify-write instructions rmw[ts]rreg-instrs x can only appear in processes (not in the program prelude or postlude). The sequence of register accesses reg-instrs is defined in Fig. 10 as a sequence of (labelled or appropriately labelled by fresh labels) register accesses. In a read-modify-write instruction rmw[ts]rreg-instrs xr-value , the last of the register instructions in reg-instrs should assign a value to register r. The rmw instructions rmw[ts]rreg-instrs x are compiled into a sequence of concrete instructions delimited by beginrmw[ts] x and endrmw[ts] x markers as follows: 27 beginrmw[ts] x; r[ts] r x; reg-instrs ; w[ts] x r; endrmw[ts] x before being parsed by the attribute grammar (which therefore contains no rmw[ts]rreg-instrs x instrcution). The last register instruction in reg-instrs must be an assignment to register r. A cat specification must be used to specify atomicity. When abstracting the traces to candidate executions for cat in Sect. 5.1, the abstraction αΞ (τ ) will replace the two consecutive events m(hp, ℓ1 , beginrmw[ts] x, θ1 i)r(hp, ℓ2 , r[ts] r x, θ2 i, v) on τ by r(hp, ℓ2 , r∗[ts] r x, θ2 i, v) and w(hp, ℓ1 , w[ts] x r, θ1 i, v)m(hp, ℓ2 , endrmw[ts] x, θ2 i) by w(hp, ℓ1 , w∗[ts] x r, θ1 i, v) to conform to cat conventions (Alglave, Cousot, and Maranget, 2015c). Write accesses w-u-instr w-u-instr ∈ ::= W-u-instr w[ts] x r-value let p = pid (w-u-instr ) and Pi = PiJ w-u-instr K and ℓ = at (w-u-instr ) in , p pid (r-value ) , instr Jw-u-instr K EJw-u-instr K , wf J w-u-instr K {hhp, ℓi, w[ts] x r-value i} {w(hp, ℓ, w[ts] x r-value , θi, v) | θ ∈ P(p) ∧ v ∈ Z} , λ π . let π = τstart × Wf 13 (π) Y τp × τfinish × rf in p∈Pi ′ ∀k ∈ ]1, 1 + |τp |[ . ∀κ ∈ L(p) . ∀ρ, ρ′ ∈ Ev(p) . ∀ν, ν ′ ∈ Va(p) . ∀θ, θ′ ∈ P(p) . ∀v ∈ Z . (τp = shℓ, θ, ρ, νi ∧ k−1 τp k = w(hp, ℓ, w[ts] x r-value , θi, v) ∧ τp = shκ′ , θ′ , ρ′ , ν ′ i) =⇒ k (v = E Jr-value K(ρ, ν) ∧ κ′ = after (w-u-instr ) ∧ θ′ = succp (θ) ∧ ρ = ρ′ ∧ ν ′ = ν) . (this includes the initialization writes for p = start.) Figure 11: lisa memory write accesses 28 Read accesses r-u-instr r-u-instr ∈ ::= R-u-instr r[ts] r1 x let p = pid (r-u-instr ) and Pi = PiJ r-u-instr K and ℓ = at (r-u-instr ) in r1 ∈ R(p) instr Jr-u-instr K EJr-u-instr K , {hhp, ℓi, r[ts] r1 xi} , {r(hp, ℓ, r[ts] r1 x, θi, xθ ) | θ ∈ P(p)} wf J r-u-instr K , λ π . let π = τstart × Wf 14 (π) Y τp × τfinish × rf in p∈Pi ′ ∀k ∈ ]1, 1 + |τp |[ . ∀κ ∈ L(p) . ∀ρ, ρ′ ∈ Ev(p) . ∀ν, ν ′ ∈ Va(p) . ∀θ, θ′ ∈ P(p) . ∀v ∈ Z . (τp = shℓ, θ, ρ, νi ∧ k−1 τp k = r(hp, ℓ, r[ts] r1 x, θi, xθ ) ∧ τp = shκ′ , θ′ , ρ′ , ν ′ i) =⇒ k (κ′ = after (r-u-instr ) ∧ θ′ = succp (θ) ∧ ρ′ = ρ[r1 := xθ ] ∧ ∃q ∈ Pi ∪ {start} . ∃!j ∈ [1, 1 + |τq |[ . ∃ℓ′ , θ′′ , v . (τq j = w(hq, ℓ′ , w[ts] x r-value , θ′′ i, v) ∧ rf[τq j , τp k ] ∈ rf ∧ ν ′ = ν[xθ := v])) . (this includes the finalization reads for p = finish, in which case r1 = rx ). Figure 12: lisa memory read accesses Branch. Branches are given in Figure 15. The branch instruction b[ts] operation l t branches to l t if operation is true, else continues in sequence to the next instruction. The unconditional branching b[ts] true l t will always branch to the next label l t . b[ts] false l t is equivalent to skip. Branching can only be to an existing label within the same process. 4.2.12 Anarchic semantics of lisa The anarchic semantics of a lisa program P is S a JPK , {π ∈ Π | Wf 2 (π) ∧ . . . ∧ Wf 16 (π)} . Example 4.1. Consider the lisa LB (load buffer) program 29 (17) Sequences of labelled register instructions reg-instrs reg-instrs ∈ ::= Reg-instrs l :reg-u-instr , pid (reg-u-instr ) pid (reg-instrs ) PiJreg-u-instr K , instr Jreg-instrs K , instr Jreg-u-instr K EJreg-u-instrs K , EJreg-u-instr K , at (reg-instrs ) at (reg-instr ) , wf J reg-instrs K , l , after (reg-instrs ) after (reg-u-instr ) | PiJreg-instrs K wf J reg-u-instr K reg-instr ; reg-instrs 1 , pid (reg-instrs 1 ) , pid (reg-instr ) PiJreg-instr K , PiJreg-instrs 1 K , pid (reg-instrs ) PiJreg-instrs K instr Jreg-instrs K , instr Jreg-u-instr K ∪ instr Jreg-instrs 1 K EJreg-u-instrs K , EJreg-u-instr K ∪ EJreg-u-instrs 1 K at (reg-instrs ) , at (reg-instr ) , at (reg-instrs 1 ) after (reg-instr ) , after (reg-instrs ) after (reg-instrs 1 ) wf J reg-instrs K , λ π . wf J reg-instr K(π) ∧ wf J reg-instrs 1 K(π) Figure 13: lisa sequences of labelled register instructions { x = 0; y = 0; } P0 | P1 ; 1: r[] r1 x | 4: r[] r2 y ; 2: w[] y 1 | 5: w[] x 1 ; 3: | 6: exists(0:r1=1 /\ 1:r2=1) 30 Read-modify-write accesses rmw-u-instr rmw-u-instr ∈ ::= Rmw-u-instr (originating form rmw[ts]rreg-instrs xr-value ) beginrmw[ts] x let p = pid (rmw-u-instr ) and Pi = PiJ rmw-u-instr K and ℓ = at (rmw-u-instr ) in instr Jrmw-u-instr K , {hhp, ℓi, beginrmw[ts] xi} , {m(hp, ℓ, beginrmw[ts] x, θi) | θ ∈ P(p)} EJrmw-u-instr K , wf J rmw-u-instr K λ π . let π = τstart × Wf 15b (π) Y τp × τfinish × rf in p∈Pi ∀k ∈ [1, 1 + |τp |[ . ∀θ ∈ P(p) . ∀κ′ ∈ L(p) . ∀ρ, ρ′ ∈ Ev(p) . ∀ν, ν ′ ∈ Va(p) . ∀θ, θ′ ∈ P(p) . (τp = shℓ, θ, ρ, νi ∧ k−1 τp k = m(hp, ℓ, beginrmw[ts] x, θi) ∧ τp = shκ′ , θ′ , ρ′ , ν ′ i) =⇒ k (κ′ = after (rmw-u-instr ) ∧ θ′ = succp (θ) ∧ ρ′ = ρ ∧ ν ′ = ν) . | endrmw[ts] x let p = pid (rmw-u-instr ) and Pi = PiJ rmw-u-instr K and ℓ = at (rmw-u-instr ) in instr Jrmw-u-instr K , {m(hp, ℓ, endrmw[ts] x, θi) | θ ∈ P(p)} EJrmw-u-instr K wf J rmw-u-instr K λ π . τstart × , {hhp, ℓi, endrmw[ts] xi} Y , Wf 15e (π) τp × τfinish × rf p∈Pi ∀k ∈ [1, 1 + |τ |[ . ∀θ ∈ P(p) . ∀κ′ ∈ L(p) . ∀ρ, ρ′ ∈ Ev(p) . ∀ν, ν ′ ∈ Va(p) . ∀θ, θ′ ∈ P(p) . (τp = shℓ, θ, ρ, νi ∧ k−1 τp k = m(hp, ℓ, endrmw[ts] x, θi) ∧ τp = shκ′ , θ′ , ρ′ , ν ′ i) =⇒ k (κ′ = after (rmw-u-instr ) ∧ θ′ = succp (θ) ∧ ρ′ = ρ ∧ ν ′ = ν) . Figure 14: lisa memory read-modify-write accesses 31 Branches b-u-instr b-u-instr ∈ ::= B-u-instr b[ts] operation l t let p = pid (b-u-instr ) and Pi = PiJ b-u-instr K and ℓ = at (b-u-instr ) in , p pid (operation ) , instr Jb-u-instr K EJb-u-instr K , wf J b-u-instr K {hhp, ℓi, b[ts] operation l t i} {t(hp, ℓ, b[ts] operation l t , θi)), t(hp, ℓ, b[ts] operation l t , θi)) | θ ∈ P(p)} , λ π . let π = τstart × Y τp × τfinish × rf in p∈Pi ′ ∀k ∈ [1, 1 + |τp |[ . ∀κ ∈ L(p) . ∀θ, θ′ ∈ P(p) . ∀ρ, ρ′ ∈ Ev(p) . ∀ν, ν ′ ∈ Va(p) . (τp = shℓ, θ, ρ, νi ∧ Wf 16t (π) k−1 τp k = t(hp, ℓ, b[ts] operation l t , θi) ∧ τp = shκ′ , θ′ , ρ′ , ν ′ i) =⇒ k (sat(E Joperation K(ρ, ν) 6= 0) ∧ κ′ = {l t } ∧ θ′ = succp (θ) ∧ ρ′ = ρ ∧ ν ′ = ν) = shℓ, θ, ρ, νi ∧ ∧ (τp Wf 16f (π) k−1 τp k = t(hp, ℓ, b[ts] operation l t , θi) ∧ τp = shκ′ , θ′ , ρ′ , ν ′ i) =⇒ k (sat(E Joperation K(ρ, ν) = 0) ∧ κ′ = after (b-u-instr ) ∧ θ′ = succp (θ) ∧ ρ′ = ρ ∧ ν ′ = ν) Figure 15: lisa branches 32 The computational semantics S JLBK of LB contains the following execution π (stamps are useless since all events are different). π = w(start, x, 0) w(start, y, 0) •− −−−−−−−−−−−−− → •− −−−−−−−−−−−−− →•× r(P0, x, θ1 ) w(P0, y, 1) sh1:, ∅, ∅i−−−−−−−−−−−−→ sh2:, ∅, {θ1 = 1}i −−−−−−−−−−−−→ sh3:, ∅, {θ1 = 1}i × r(P1, y, θ4 ) w(P1, x, 1) sh4:, ∅, ∅i−−−−−−−−−−−−→ sh5:, ∅, {θ4 = 1}i −−−−−−−−−−−−→ sh6:, ∅, {θ4 = 1}i × r(finish, y, 1) r(finish, x, 1) •− −−−−−−−−−−−−− →•− −−−−−−−−−−−−− →•× {rf[w(P1, x, 1), r(P0, x, θ1 )]), rf[w(P0, y, 1), r(P1, y, θ4 )], rf[w(P1, x, 1), r(finish, x, 1)], rf[w(P0, y, 1), r(finish, y, 1)]} Lemma 4.2 (Orderliness) . The stamps of events in a trace τ ∈ {τp | p ∈ Pi} of a lisa program are in strictly increasing order per process p. ∀p ∈ Pi . ∀i, j ∈ [1, 1 + |τ |[ . (stamp(τ i ) ∈ EJpK ∧ stamp(τ j ) ∈ EJpK ∧ i < j) =⇒ (stamp(τ i+1 ) = succp (stamp(τ i )) ∧ stamp(τ i )⊳p stamp(τ j )) . Wf 18 (τ ) This condition Wf 18 (τ ) enforces Wf 3 (τ ). Example 4.3. The choice P(p) , {p} × N, inf p = hp, 1i, succp (hp, θi) = hp, θ + 1i, stamp(τ k ) = hp, ki, k ∈ [1, 1 + |τ |[, hp′ , θi⊳p hp′′ , θ′ i , p = p′ = p′′ ∧ θ < θ′ satisfies Wf 3 (τ ) and Wf 18 (τ ). Proof of Lemma 4.2. The events τ i have the stamp stamp(τ i ) of the state τ i that generate them. By case analysis for lisa instructions two successive states τ i and τ i+1 generated by an instruction of a process p have stamps stamp(τ i+1 ) = θ′ = succp (θ) = stamp(τ i ) in Wf 11 (π), Wf 12 (π), Wf 13 (π), Wf 14 (π), Wf 15b (π), Wf 15e (π), Wf 16t (π), and Wf 16f (π). It follows, by def. of succp in Sect. 4.1.4 that θ⊳p θ′ . This extends along traces since stamps of process p are not Ep -comparable with stamps of other processes. This implies Wf 3 (τ ) since stamps for different processes are different and for the same process are comparable since ⊳p is a total order and moreover in strictly increasing order. Intuition 4.4. The following Theorem 1 shows that in an execution consisting of a computation part and a communication part, the communication part provides enough information to rebuilt the computation part. Otherwise stated, the abstraction αΓ (S JPK) , {rf | ς × rf ∈ S JPK} is an isomorphism. Note that lisa is deterministic but a similar result would hold with random choices. The set of executions resulting from the random choices with a given communication relation rf can be reconstructed from the communication relation rf . The importance of this result is to show that to put constraints on the computations it is enough to but constraints on communications. Theorem 1. In an anarchic execution ς × rf ∈ S a JPK, the communication rf uniquely determines the computation ς. 33 Proof of Theorem 1. Let π = ς × rf = τstart × Q p∈Pi τp ×τfinish × rf ∈ S a JPK. τstart depends τp on P (more precisely locJPK) but not on rf . Let p ∈ Pi and τp = h−−−−k−→ τp | k ∈ [1, 1 + |τ |[i. k The proof is by induction of k. For k = 1, τp k = ǫstart by Wf 2 (π) and τp is defined by Wf 10 (π) k so does not depend upon rf . For the induction step, we have state τp = shℓ, θ, ρ, νi and k−1 must consider all possible instructions at ℓ leading to the next event τp k and state τp . k • The semantics of the fence (Wf 11 (π)), register (Wf 12 (π)), write (Wf 13 (π)), RMW (Wf 15b (π) and Wf 15e (π)), and test (Wf 16t (π) and Wf 16f (π)) instruction, hence τp k and state τp , does k not depend at all on the communication relation rf . • The semantics Wf 14 (π) of the read instruction is the only one depending on the communication relation rf . The semantics Wf 14 (π) is completetly determined by the choice of rf[τq j , τp k ] ∈ rf . By Wf 6 (π), Wf 7 (π), and Wf 8 (π), this choice is unique. It remains to consider τfinish . By Wf 4f (π), τfinish contains only read instructions, and so, by the above argument is uniquely determined by rf . 34 5 The weakly consistent semantics of lisa defined by a cat communication specification To be language independent, the cat communication specification (Alglave, Cousot, and Maranget, 2015b) does rely on an abstraction of executions called candidate executions. The abstraction essentially forget about values manipulated by programs and program instructions not related to communications. So a candidate execution records how communications are performed, not which values are communicated. See (Alglave, 2015b) for an introduction to the cat communication specification language and (Alglave, 2015a) for models of architectures. 5.1 Abstraction to a Candidate Execution The candidate execution abstraction αΞ ∈ Π 7→ Ξ extracts a candidate execution αΞ (π) ∈ Ξ from an execution π ∈ Π. This candidate execution αΞ (π) is used by the cat specification language semantics to decide whether that execution π is feasible in the weak consistency model defined by a cat communication specification. 5.1.1 Events of an execution. The candidate execution abstraction extracts the computation events of an execution. αe (τ ) αe (τstart × Y p∈Pi τp × τfinish × rf ) ǫ , {ǫ ∈ E | ∃τ1 , τ2 . τ = τ1 −−−→ σ τ2 } [ αe (τp )4 , p∈Pi∪{start,finish} The events αe (π) of an execution π can be partitioned into write, read, branch, fence events, beginrmw, endrmw, etc. 5.1.2 Program order of an event trace. The candidate execution abstraction extracts the program order of an execution, more precisely the program execution order, i.e. the pair of events generated by execution of successive actions of a process5 . By convention, the initial write events w(start, x) are before any process event or final read in the program order. 4 In addition, the cat language does not allow to refer to final reads in R(finish). program order, one must understand order of execution of actions in the program, not necessarily the order in which they appear in the program text, although they are often the same. For a counter-example of the difference between the order of actions in the program and during execution, one can imagine a silly command execute_next;a;b;c; which semantics would to be to execute action b, then a, and then c. So the program syntactic order is a, then b, and then c while the program execution order is b, then a, and then c. 5 By 35 αpo (τ ) αpo (τstart × Y ǫ ǫ′ {hǫ, ǫ′ i | ∃τ1 , τ2 , τ3 . τ = τ1 −−−→ σ τ2 − −−− → σ ′ τ3 } [ {hǫ, ǫ′ i | ǫ ∈ αe (τstart ) ∧ ǫ′ ∈ (αe (τp ) ∪ αe (τfinish ))}6,7 , τp × τfinish × rf ) , p∈Pi p∈Pi ∪ [ αpo (τp ) [ {hǫ, ǫ′ i | ǫ ∈ αe (τp ) ∧ ǫ′ ∈ αe (τfinish )} p∈Pi ∪ p∈Pi 5.1.3 Read-from relation. The candidate execution abstraction extracts the read-from relation of an event trace modeling who reads from where. αrf (τstart × Y τp × τfinish × rf ) , rf . p∈Pi 5.1.4 Initial writes. By the initialisation condition Wf 4 (S ), all shared variables are assumed to be initialised. The candidate execution abstraction extracts the initial writes of an execution. Y αiw (τstart × τp × τfinish × rf ) , αe (τstart ) . p∈Pi 5.1.5 Final writes. By the finalisation condition Wf 4f (π) all the final values variables are assumed to be read upon program termination. The candidate execution abstraction extracts the final writes satisfying these final reads of an event trace. Y αfw (τstart × τp × τfinish × rf ) , {w | ∃r ∈ αe (τfinish ) . rf[w, r] ∈ rf } . p∈Pi 5.1.6 cat candidate executions. The cat candidate executions are 6 The herd7 tool considers the program order to be α (π) \ (E × R(finish)) instead. po 7 The initial writes are not ordered between themselves by the program order and similarly for the final reads. This is because if an execution of the semantics has the initial writes and final reads in some order, reshuffling them in any other order is also a valid execution of the semantics. 36 Ξ , ℘(E) × ℘(E × E) × ℘(W × R) × ℘(W) × ℘(W) αΞ ∈ Π →Ξ αΞ (π) , hαe (π), αpo (π), αrf (π), αiw (π), αfw (π)i αΞ ∈ D → ℘(Π × Ξ) αΞ (S ) , ∈ Ξ (Def. 19) {hπ, αΞ (π)i | π ∈ S } . Example 5.1. Continuing Ex. 4.1, we have αe (t) = αpo (t) = αrf (t) = αiw (t) αfw (t) = = {w(start, x, 0), w(start, y, 0), r(P0, x, θ1 ), w(P0, y, 1), r(P1, y, θ4 ), w(P1, x, 1), r(finish, x), r(finish, y, 1)} {hw(start, x, 0), r(P0, x, θ1 )i, hw(start, x, 0), w(P0, y, 1)i, hw(start, x, 0), r(P1, y, θ4 )i, hw(start, x, 0), w(P1, x, 1)i, hw(start, x, 0), r(finish, x)i, hw(start, x, 0), r(finish, y, 1)i, hw(start, y, 0), r(P0, x, θ1 )i, hw(start, y, 0), w(P0, y, 1)i, hw(start, y, 0), r(P1, y, θ4 )i, hw(start, y, 0), w(P1, x, 1)i, hw(start, y, 0), r(finish, x)i, hw(start, y, 0), r(finish, y, 1)i, hr(P0, x, θ1 ), w(P0, y, 1)i, hr(P0, x, θ1 ), r(P1, y, θ4 )i, hr(P0, x, θ1 ), w(P1, x, 1)i, hr(P0, x, θ1 ), r(finish, x)i, hr(P0, x, θ1 ), r(finish, y, 1)i, hw(P0, y, 1), r(P1, y, θ4 )i, hw(P0, y, 1), w(P1, x, 1)i, hw(P0, y, 1), r(finish, x)i, hw(P0, y, 1), r(finish, y, 1)i, hr(P1, y, θ4 ), w(P1, x, 1)i, hr(P1, y, θ4 ), r(finish, x)i, hr(P1, y, θ4 ), r(finish, y, 1)i, hw(P1, x, 1), r(finish, x)i, hw(P1, x, 1), r(finish, y, 1)i} {hw(P1, x, 1), r(P0, x, θ1 )i), hw(P0, y, 1), r(P1, y, θ4 )i, hw(P1, x, 1), r(finish, x, 1)i, hw(P0, y, 1), r(finish, y, 1)i} {w(start, x, 0), w(start, y, 0)} {w(P1, x, 1), w(P0, y, 1)} . This is a non-SC candidate execution because of its cycle in union of program order and communications (Alglave, 2015b): which would be invalid with the following cat specification acyclic (po | rf)+ 5.2 5.2.1 Abstraction to a semantics with weak consistency model The semantics of a cat weak consistency model specification. 37 The semantics JHcm KΞ of a candidate execution Ξ = hς, rfi ∈ Ξ defined in (Alglave, Cousot, and Maranget, 2015c) returns a set of answers of the form hj, f, Γ i where j = {allowed, forbidden}, f ∈ F is the set of flags that have been set up on Ξ and Γ , and Γ defines the communication relation for the execution to be allowed/forbidden. This is extended to a set C ∈ ℘(Ξ) of candidate executions as αΞ (C ) , 5.2.2 {hΞ, αΞ (Ξ)i | Ξ ∈ C } Computational semantics with weak consistency model. The computational semantics S restricted by a weak consistency model specified by cat specification Hcm is then S , α JHcm K ◦ αΞ (S a JPK) where α JHcm K(C) , {hς, rf, Γ i | hhς, rfi, Ξi ∈ C ∧ ∃f ∈ F . hallowed, f, Γ i ∈ (Def. 20) JHcm K Ξ} References Jade Alglave. Modeling of architectures. In Marco Bernardo and Einar Broch Johnsen, editors, Formal Methods for Multicore Programming - 15th International School on Formal Methods for the Design of Computer, Communication, and Software Systems, SFM 2015, Bertinoro, Italy, June 15-19, 2015, Advanced Lectures, volume 9104 of Lecture Notes in Computer Science, pages 97–145. Springer, 2015a. ISBN 978-3-319-18940-6. doi: 10.1007/ 978-3-319-18941-3_3. URL http://dx.doi.org/10.1007/978-3-319-18941-3_3. Jade Alglave. I can’t dance: adventures in herding cats. Lecture notes for Bertorino summer school, March 2015b. Jade Alglave and Luc Maranget. herd7. virginia.cs.ucl.ac.uk/herd, 31 August 2015. Jade Alglave, Luc Maranget, and Michael Tautschnig. Herding cats: Modelling, simulation, testing, and data mining for weak memory. ACM Trans. Program. Lang. Syst., 36(2):7:1– 7:74, 2014. doi: 10.1145/2627752. URL http://doi.acm.org/10.1145/2627752. Jade Alglave, Mark Batty, Alastair F. Donaldson, Ganesh Gopalakrishnan, Jeroen Ketema, Daniel Poetzl, Tyler Sorensen, and John Wickerson. GPU concurrency: Weak behaviours and programming assumptions. In ASPLOS, 2015a. Jade Alglave, Patrick Cousot, and Luc Maranget. La langue au chat: cat, a language to describe consistency properties. Unpublished manuscript, 31 January 2015b. Jade Alglave, Patrick Cousot, and Luc Maranget. Syntax and semantics of the cat language. HSA Foundation, Version 1.1:38 p., 16 Oct 2015c. URL http://www.hsafoundation.com/?ddownload=5382. Matthew Hennessy and Gordon D. Plotkin. Full abstraction for a simple parallel programming language. In Jirí Becvár, editor, Mathematical Foundations of Computer Science 1979, Proceedings, 8th Symposium, Olomouc, Czechoslovakia, September 3-7, 1979, 38 volume 74 of Lecture Notes in Computer Science, pages 108–120. Springer, 1979. 10.1007/3-540-09526-8_8. URL http://dx.doi.org/10.1007/3-540-09526-8_8. doi: HSA Foundation. Hsa platform system architecture specification 1.0. HSA-SysArch-1.01.pdf, cat_ModelExpressions-1.1.pdf, 15 January 2015. Robert M. Keller. Formal verification of parallel programs. Commun. ACM, 19(7):371–384, 1976. doi: 10.1145/360248.360251. URL http://doi.acm.org/10.1145/360248.360251. James C. King. Symbolic execution and program testing. Commun. ACM, 19(7):385–394, 1976. doi: 10.1145/360248.360252. URL http://doi.acm.org/10.1145/360248.360252. Donald E. Knuth. The genesis of attribute grammars. In Pierre Deransart and Martin Jourdan, editors, Attribute Grammars and their Applications, International Conference WAGA, Paris, France, September 19-21, 1990, Proceedings, volume 461 of Lecture Notes in Computer Science, pages 1–12. Springer, 1990. ISBN 3-540-53101-7. doi: 10.1007/3-540-53101-7_1. URL http://dx.doi.org/10.1007/3-540-53101-7_1. Leslie Lamport. How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. Computers, 28(9):690–691, 1979. doi: 10.1109/TC.1979.1675439. URL http://dx.doi.org/10.1109/TC.1979.1675439. Jukka Paakki. Attribute grammar paradigms - A high-level methodology in language implementation. ACM Comput. Surv., 27(2):196–255, 1995. doi: 10.1145/210376.197409. URL http://doi.acm.org/10.1145/210376.197409. 39
6cs.PL
Robust Private Information Retrieval on Coded Data arXiv:1707.09916v1 [cs.IT] 31 Jul 2017 Razane Tajeddine, Salim El Rouayheb ECE Department, IIT, Chicago Emails: [email protected], [email protected] Abstract—We consider the problem of designing PIR scheme on coded data when certain nodes are unresponsive. We provide the construction of ν-robust PIR schemes that can tolerate up to ν unresponsive nodes. These schemes are adaptive and universally optimal in the sense of achieving (asymptotically) optimal download cost for any number of unresponsive nodes up to ν. I. I NTRODUCTION Consider a user who wishes to download a certain file from a distributed storage system (DSS) while keeping the identity of this file private. The user’s concern about his/her privacy is due to many causes, such as concern about surveillance, protection against online profiling from companies, etc. Private information retrieval (PIR) schemes [1], [2] allow a user to achieve privacy by querying the different nodes in the system, while guaranteeing that no information is being revealed about which file is being retrieved. A straightforward PIR scheme consists of the user downloading all the files in the DSS, achieving perfect privacy. However, it has a very high communication cost. The literature on PIR has focused on efficient schemes that can achieve privacy while minimizing different system costs, and in particular, the communication cost, which has received the most attention [3]. Since its introduction in [1], the model of PIR assumes the data to be replicated on multiple nodes (e.g. [4]–[8]). Recently, there has been a growing interest in using codes in DSS to minimize the storage overhead of data. This has motivated recent works on PIR schemes for data stored under coded form and not just replicated [9]–[16]. The next example, taken from [11], [12], illustrates the construction of a PIR scheme on coded data. Example 1: Consider a DSS with n = 4 nodes storing m files Xi = (ai , bi ), ai , bi ∈ GF (3ℓ ), i = 1, 2, . . . , m. The files are stored using an (n, k) = (4, 2) MDS code T  a1 a2 . . . am , and B = over GF (3). Let A = T  b1 b2 . . . bm represent the first and second half (block) all the files in the DSS, respectively. Nodes 1, . . . , 4 store A, B, A + B, A + 2B, respectively. The user requires to retrieve file Xf = (af , bf ), f ∈ {1, . . . , m}, privately, by querying the four nodes, but without revealing any information about the file index f to any of them. In the scheme T user generates an iid random vector  in [11], [12], the with elements chosen uniformly at u = u1 . . . um random from GF (3) and independent of f , and forms the T  . Then, the user sends the vector ef = 0f −1 1 0m−f query vectors u to nodes 1 and 2 and u + ef to nodes 3 This work was supported in part by NSF Grant CCF 1652867. and 4. Each node responds by projecting its data onto the query vector it receives. Therefore, the responses of nodes 1, . . . , 4 are given by uT A, uT B, uT A + uT B + af + bf , uT A + 2uT B + af + 2bf , respectively. From the responses of the nodes, the user will be able to obtain privately file Xf = (af , bf ). We measure the efficiency of a PIR scheme by its relative download cost referred to as communication price of privacy (cP oP ). To retrieve 2 file symbols, the scheme downloads 4 implying cP oP = 4/2 = 2, which is asymptotically optimal (as m → ∞) [10], [13]. In the previous scheme in Example 1 and its generalization in [11], [12], the user needs to wait for the responses of all the nodes to be able to decode the file. However, this may not be possible in many cases due to some nodes being unresponsive or due to network failures. Even when all the nodes are responsive, some of them may be slow (due to being busy or due to a slow connection). A single slow node will delay the user, even if all the other nodes are fast. In this case, it may be better for the user to “cut” the slow node, consider it unresponsive and re-query the fast nodes. We are interested in constructing PIR schemes that have this adaptive property. A PIR scheme that can work even in the presence of unresponsive servers has been studied in the literature in the case of replicated data, and is called robust PIR scheme [17]–[19]. We say that a PIR scheme is ν-robust if it can tolerate ν unresponsive or slow servers. The standard method for achieving robustness is to design the queries such that the nodes’ responses contain enough redundancy to tolerate ν erasures. In analogy with the existing work in the literature, we aim at designing ν-robust PIR schemes that can operate on coded and not only on replicated data. However, we require the additional property that the scheme is universally optimal, in the sense of achieving the minimum cP oP simultaneously for any number of unresponsive nodes up to ν of them. Therefore, we avoid having to design the scheme for the worstcase scenario assuming the maximum number of unresponsive nodes. Example 1 (continued): Consider again the same setting as before. We want to design a universal 1-robust PIR scheme. We propose an adaptive scheme with two layers. The first layer is the same one described in the previous part of this example. If there is no unresponsive nodes the scheme stops after the first layer. The second layer depends on which node is unresponsive, or deemed slow, and is described in table I. Suppose, for example, that node 1 is not responsive. In this case, the user will be missing uT A (the response of node 1) and needs it to be able to decode using the 3 other responses from the first layer. The goal of the second layer is to retrieve Layer 1 Layer 2 Node 1 is unresponsive Node Node Node Node 1 2 3 4 u u u + ef u + ef ∅ v v+u v Node 2 is unresponsive Node 3 is unresponsive Node 4 is unresponsive v ∅ v+u v v + ef v ∅ v v + ef v v ∅ TABLE I: An example of our proposed 1-universal and adaptive robust PIR scheme. The scheme has two layers, with ∅ indicating the unresponsive node. uT A or another linear combination that allows full decoding in the first layer. Only nodes 3 and 4 can give uT A, but if the user asks directly for it in Layer 2 it will reveal ef to the node and therefore the identity of the requested file. That’s why the user T with generates a new random vector v = v1 . . . vm elements ∈ GF (3). Implementing the queries in the second column in Table I, the user can decode uT A+uT B in layer 2, and then Xf using the responses from layer 1. This schemes achieves asymptotically optimal cP oP simultaneously for 0 unresponsive nodes (cP oP = 2) and 1 unresponsive node (cP oP = 3), as given in (1) explained later. Related work: Until recently, most of the work on PIR has focused on replicated data and minimizing the total download cost [4]–[8], [20]–[22]. Recent work has studied PIR schemes on coded data. It was shown in [9] that downloading one extra bit is enough to achieve privacy, if the number of servers is exponential in the number of files. In [10], the authors derive bounds on the tradeoff between storage cost and download cost for linear coded data. Later, the authors in [13] derive the optimal lower bounds on download cost. Methods for transforming PIR schemes with replicated data to schemes on coded data were devised in [14]. This work was later generalized to PIR array codes in [15]. PIR schemes for MDS coded data were presented in [11], [12]. For the case of noncolluding nodes, these schemes achieve asymptotically optimal download cost. A new family of PIR schemes on MDS coded data was constructed in [16], which achieves a lower download cost then the ones in [11] for the case of colluding nodes. In terms of fundamental limits, it was shown in [4] that the socalled PIR capacity is (1 + 1/n + 1/n2 + · · · + 1/nm−1 )−1 , which implies optimal cP oP = 1+1/n+1/n2+· · ·+1/nm−1, where n is the number of nodes and m is the number of files. This capacity expression was then generalized to the case of a fixed number of colluding nodes in [5]. All the previous fundamental results are for replicated data. When the data is coded using an (n, k) MDS code, it was shown in [13] that the optimal cP oP is 1 + k/n + k 2 /n2 + · · · + k m−1 /nm−1 , n , as the number thus the asymptotically optimal cP oP = n−k of files m goes to infinity. The setting in which nodes can be byzantine (malicious) and store replicated data was considered in [17]–[19] and robust PIR schemes were devised using locally decodable codes. Contributions: In this paper, we present a construction of universal ν-robust PIR schemes on (n, k) MDS coded data, where ν is the maximum number of unresponsive nodes1 . We focus on non-colluding nodes (i.e., no spy nodes in the model in [11], [12]) and want to achieve perfect privacy which guarantees that zero information is leaked to the individual nodes about the index of the retrieved file. The construction is a generalization of our PIR schemes on MDS codes in [11], with robustness against up to ν unresponsive nodes. The proposed scheme consists of two layers and has the following properties: (i) universality, meaning the scheme allows the user to retrieve the requested file privately, for all number of unresponsive servers up to ν, and achieving the optimal n−i for all i = 1, . . . , ν, where i is the actual cP oP = n−i−k number of unresponsive nodes; and (ii) adaptivity, meaning the scheme changes depending on which nodes do not respond. II. S YSTEM M ODEL AND M AIN R ESULT We adopt the same model in [11] and summarize it here. DSS: We consider a distributed storage system (DSS) formed of n nodes indexed from 1 to n. The DSS stores m files, X1 , . . . , Xm using an (n, k) MDS code over GF (q), which achieves reliability against n − k node failures. Each file Xi is divided into k blocks, and each block is divided into α stripes or subdivisions. Thus, a file Xi could be represented by a k × α matrix with symbols chosen from the finite field GF (q ℓ ). The stripes are considered to be encoded separately using the generator matrix of the same MDS code. We assume the user knows the encoding vector used to encode the data on each node. We denote the column vector stored on node i by Wi ∈ GF (q ℓ )mα . For instance, in Example 1, α = 1, W1 = A, W2 = B, W3 = A + B, W4 = A + 2B, and q = 5. We assume the MDS code code is given and is not a design parameter. PIR: The user wants to retrieve file Xf , from n nodes, privately, meaning without revealing the index, f , to any of the nodes. We assume that the nodes in the DSS do not collude and that f is chosen uniformly at random from the set {1, . . . , m}. We say that a PIR scheme over GF (q) is linear, and of dimension d, when the request sent to node i is a d × mα query matrix, Qi , over GF (q). In this case, the response of a node is the projection of its data onto the query matrix. We want the PIR scheme to achieve perfect privacy, i.e., H(f |Qi ) = H(f ), for all i. Here, H(.) denotes the entropy function. Definition 1 (Universal ν-robust PIR scheme): A universal ν-robust PIR scheme is a PIR scheme which can tolerate up to ν unresponsive nodes, and for any number of unresponsive nodes 0 ≤ i ≤ ν, it achieves perfect privacy with minimum cP oP given by (assuming no node collusion) ni , (1) cP oP = ni − k where ni = n − i is the number of responsive nodes. 1 The parameter ν can be between 0 and n − k − 1. A 0-robust scheme is a non-robust scheme. If ν = n − k, i.e., there is no redundant data queried, then perfect privacy can not be achieved except by downloading all the files. If ν > n − k, the file can not be fully retrieved since the MDS code cannot tolerate more than n − k failures. Group 2 Group 1 Theorem 1 gives the main result of this paper and is proved in Section IV. Theorem 1: Consider a DSS with n non-colluding nodes and using an (n, k) MDS code over GF (q). Then, the linear PIR scheme over GF (q) described in Section III is a universal ν-robust PIR scheme, i.e., it achieves perfect privacy and and i , where ni = n − i, for all number has optimal cP oP = nin−k of unresponsive nodes i, 0 ≤ i ≤ ν. α = LCM (α1 , . . . , αi ). (2) ′ The number of subqueries sent in layer 1 is d0 = d0 × αα0 . For this, d0 random vectors u1 , . . . , ud0 are created (one random vector per subquery). Every α0 subdivisions are queried in a set of d′0 subqueries. B. Layer 2 depends on which nodes are unresponsive. Thus, the user will cut those nodes off and compensate for the responses from these nodes using extra subqueries to the other ni nodes. The goal of layer 2 is to allow the user to recover the responses that were missed in layer 1. However, this should Group β + 2 We describe here the universal PIR scheme referred to in Theorem 1. This scheme is adaptive and consists of two layers. A. Layer 1 is essentially multiple copies of the non-robust PIR scheme of Theorem 1 in [11]. This scheme requires a number of subdivisions α = LCM(k,n−k) and is of dimension k LCM(k,n−k) ′ ′ d = , i.e., it consists of d subqueries. n−k WLOG, we assume the code is systematic and write n−k = βk + r, where β and r are integers and 0 ≤ r < k and β ≥ 0. We divide the nodes into groups, as seen in Table II. The first group consists of k nodes and is divided into two sub-groups. The first consists of r nodes, which are chosen to be the first r nodes for the first subquery. The second is formed of the remaining k−r nodes. As for the parity nodes, we divide them into β groups of k nodes each, and one group of r nodes. Table II describes the first subquery of the PIR scheme when the user wants file Xf . The user generates a random vector u, whose elements are chosen uniformly at random from GF (q), the same field over which the MDS code is defined. Next, we summarize how the remaining subqueries are constructed. For each subquery j, j = 2, . . . , d′ , a new random vector vj is created. The subqueries to the first group, assumed to be systematic, are shifted cyclically downwards in each subquery. As for the remaining β groups of k nodes each, the query to each group s is vj + e(f −1)α+r+(s−2)d+j , where vector ej is the all-zero vector with a single 1 in position j. As for the last r nodes, the random vector vj is sent in subquery j. The number of subdivisions for a non-robust scheme on an i −k) (ni , k) MDS code is αi = LCM(k,n , and the dimension or k i −k) . number of subqueries of the PIR scheme is d′i = LCM(k,n ni −k To achieve a universal ν-robust PIR scheme on (n, k) MDS code, we need enough “granularity” to account for the different number i of unresponsive nodes, for i = 0, . . . , ν. The number of subdivisions α for a universal ν-robust PIR scheme is the LCM of the number of subdivisions, αi , of the scheme for all possible numbers of responsive servers ni . Group β + 1 III. ROBUST PIR S CHEME D ESCRIPTION Nodes 1 2 .. . r r+1 .. . k k+1 .. . 2k .. . βk + 1 . .. (β + 1)k (β + 1)k + 1 .. . n Queries u + e(f −1)α+1 u + e(f −1)α+2 .. . u + e(f −1)α+r u u + e(f −1)α+r+1 .. . u + e(f −1)α+r+(β−1)d+1 u TABLE II: First subquery, in the non-robust PIR scheme in [11] (no collusion), assuming the user wants file Xf . be accomplished without violating the privacy constraint. Let us suppose ni is the number of responsive nodes in layer 1. Hence, in each copy of the scheme in layer 1, there are (n0 − ni ) × d0 sub-responses missing. The goal of layer 2 is to recover these sub-responses. We will divide the missing parts into di − d0 groups of size ni − k. Each of these groups will be asked for in one subquery, in the way a subquery is sent in an (ni , k) system to decode ni − k parts in [11]. There are two cases: • • Case 1: If the missing part is a function of ej the user shall send ej + us , where us is a new random vector, to one of the responsive nodes which never received a query on ej in the previous subqueries. For instance, if the required file is X1 , e1 , . . . , er are asked for in group 1, so to ask for them in the second layer, the user should ask them from any group other than group 1. Case 2: On the other hand, if the missing part is a “purely” randomvector (uj , for any 1 ≤ j ≤ d0 ), the user shall send uj + us to one of the responsive nodes which never received a query uj in the previous subqueries. For instance, to ask for a pure random vector ui in layer 2, it should not be queried from group β. Also, it should not be asked for from the k − r nodes in group 1 that have been asked for a purely random vector in subquery j. After setting those, the random vector ui will be sent to the rest of the nodes (k nodes), in this subquery i. A. Example on Scheme Construction Example 2 (Universal 2-robust PIR): Consider the (5, 2) systematic MDS code storing m files. Nodes 1, 2, . . . 5 store A, B, A + B, A + 2B, A + 3B, respectively, where A and B are as defined in example 1. We want a universal 2-robust PIR scheme, a PIR scheme that will be optimal in terms of Layer 1 node node node node node 1 2 3 4 5 u1 + e1 u1 u1 + e2 u1 + e2 u1 u2 u2 + e1 u2 + e3 u2 + e3 u2 Layer 2 ∅ u3 + u2 u3 + e1 u3 u3 u3 + u1 ∅ u3 + e1 u3 u3 u3 + e2 u3 + e3 ∅ u3 u3 u3 + e2 u3 + e3 u3 ∅ u3 u3 + u1 u3 + u2 u3 u3 ∅ TABLE III: Queries to the nodes when one node is unresponsive. The 2 columns in Layer 1 represent the queries to all the nodes. Depending on which node is unresponsive (designated with ∅), one column in Layer 2 is chosen to query. communication price of privacy (cP oP ) if 5 nodes, 4 nodes, and 3 nodes respond. Let us call n0 = 5, n1 = 4, n2 = 3. We consider the number of subdivisions and dimension of each code. For the (5, 2) code, α0 = 3 and d′0 = 2, for the (4, 2), α1 = 1 and d′1 = 1, and for (3, 2), α2 = 1 and d′2 = 2. For the code to tolerate failures, we need to subdivide the files into α = LCM (α0 , α1 , α2 ) = 3. The number of subqueries required in order to retrieve the α parts of the file for code (ni , k) will be α di = d′i × . (3) αi Thus, d0 = 2, d1 = 3, d2 = 6. Layer 1: Suppose the user wants X1 . The user first sends subqueries to the 5 nodes expecting all of them to respond. We use here the PIR scheme in [11] for the case of a (5, 2) MDS code. The user creates random vectors u1 , u2 , and send the queries as in layer 1 of table III. Layer 2: Case 1: If one node does not respond, the user compensates for the missing information and sends an extra query to the other 4 nodes. In one query to a (4, 2) system, the user can decode privately 2 parts. In a (4, 2) system each query can give us 2 parts, thus 1 extra query can compensate for the unresponsive node, this matches the number of subqueries being 3. We generate a new random vector u3 for this extra query. Column i in layer 2 shows the subquery when node i does not respond. For example, when node 1 does not respond. We see that we are missing equation with u1 + e1 , which is case 1 and u2 which is case 2. For this, we will send a u3 + u2 to node 2 and u3 + e1 to node 3. Of course, then we send u3 to nodes 1 and 4 to decode the interference. Table III shows the sent queries. Case 2: On the other hand, if two nodes do not respond, then we need 4 extra subqueries. For example, if nodes 1 and 3 do not respond, there are 4 missing responses. Three of those missing parts are of case 1, e1 , e2 , and e3 , and one missing part is of case 2, u2 . The queries in this case are shown in table IV. IV. P ROOF OF T HEOREM 1 Before giving the proof of the theorem, we will state two properties of the PIR scheme in Theorem 1 in [11] that will be essential to prove Theorem 1. Property 1: In the PIR scheme in [11], the query vectors in each sub-query can be permuted among the nodes without affecting the decodability and the privacy properties of the Layer 1 1 2 3 4 5 u1 + e1 u1 u1 + e2 u1 + e2 u1 u2 u2 + e1 u2 + e3 u2 + e3 u2 Layer 2 ∅ u3 ∅ u3 + e1 u3 ∅ u4 ∅ u4 + u2 u4 ∅ u5 + e2 ∅ u5 u5 ∅ u6 + e3 ∅ u6 u6 TABLE IV: Queries to the nodes when nodes 1 and 3 are unresponsive scheme. This follows directly from the fact that the node groups (see for e.g. Table II) can be chosen arbitrarily. Property 2: The scheme in [11] allows the user to retrieve ef X, which is, in other words, the file Xf . This can be readily generlized to retrieve any uX, where u is any vector of dimension m, where m is the number of files. Let us start by proving the decodability of the example in section III-A. A. Example 2 decodability: Let A and B be as defined in example 1. Layer 1: The scheme’s decodability when all nodes respond follows directly from [11]. Layer 2: We will prove that the scheme applied in section III-A is decodable when node 1, for example, is unresponsive. The nodes project the query vectors on the data they hold and send the response back to the user. • We notice that from the third subquery, the user decodes the interference from nodes 3 and 4. Then gets a11 + b11 and uT2 B. • From the first subquery, a12 + 2b12 and a12 + 3b12 can be retrieved and thus decoding a12 and b12 . T • From u2 B and the response of node 4 in the second query, the user decodes the interference uT2 A and uT2 B. The user can then retrieve b11 , a13 + b13 , and a13 + 2b13 . From these equations, along with a11 + b11 retrieved from the third subquery (second layer), the user decodes a11 , b11 , a13 , and b13 . Thus decoding all parts of the file 1. The cP oP of the scheme if one node is unresponsive is 12 × 61 = 2 which is the same as the optimal cP oP found in [13]. When 2 nodes do not respond, if we look at the query table IV, we notice that the missing parts are retrieved, and achieve cP oP = 3. B. Decodability: Layer 1: If n0 = n nodes respond, the decodability follows from [11]. Every α0 parts are decoded in d′0 subqueries, d′ α thus retrieving the complete file (i.e. α parts) in d0 = α00 subqueries. Layer 2: If ni out of the n nodes respond, si = (n0 − ni ) × d0 responses are missing. In each extra subquery, the user can decode ni − k parts. Thus in total, from the di − d0 extra subqueries the user can decode (ni − k) × (di − d0 ) parts. We can see that (ni − k)(di − d0 ) = d0 × (n0 − ni ) = si , by substituting the value of di by its expression in (3). This shows that the number of decodable parts from the extra di −d0 subqueries is equal to the number of missing parts. Now the question is whether the new sub-responses are able to provide parts that are sufficient for the user to be able to retrieve the file he/she wants. Here, we use properties 1 and 2. Using property 1, we can see that we can, in fact, decode ni −k parts in each subquery of this layer, since those subqueries are similar to the schemes in [11], only permuted. Using property 2, we can see that if a missing response is a function of a random vector in a subquery of layer 1, the user can hide the random vector using the scheme in [11] and retrieve a new function, in layer 2, that could substitute the missing response. When all nodes are responsive, the responses from layer 1 form a set of k independent equations about the k blocks of each stripe and about the interference, allowing the user to decode the file. However, when some nodes are unresponsive, some sub-responses, and therefore equations, are not retrieved. In this layer, the extra subqueries should be able to provide equations that will substitute those missing equations. Thus, those extra sub-responses, along with the sub-responses from layer 1, should form a system of k independent equations about each stripe and interference. The number of unresponsive nodes can be at most ν = n − k − 1. The number of independent equations required to retrieve a full stripe or to decode the interference is k. To form a solvable system of equations about a stripe, a node is asked at most once about the same stripe. Thus, the number of missing sub-responses about a certain stripe or interference is at most min(k, n− k − 1). Consider the number of unretrieved equations about a stripe is γ. Since there are at least k + 1 responding servers, there will always be at least γ nodes that have not been asked for equations about this stripe before. The user can query those nodes to retrieve new equations about this stripe to substitute the missing ones. Privacy: In each subquery, the query to a node is either onetime padded by an independent vector or the independent vector itself. Therefore, the privacy of the scheme follows from the fact that the nodes do not collude. Optimality: The price of privacy is optimal for any number of i ni i responsive nodes ni ≥ nν , cP oP = dkα = nin−k , obtained by substituting equations (2) and (3) into this equation. V. C ONCLUSION We studied the problem of constructing robust PIR schemes with low communication cost for requesting data from a DSS storing data using MDS codes. The responses from certain nodes may be very slow. In such case, the user would cut those nodes off and ask the rest of the nodes for what he/she should have received from this node. The objective is to allow the user to do this with low communication cost. We constructed adaptive universal ν-robust PIR schemes with non-colluding nodes achieving the optimal price of privacy for all numbers of responsive nodes. The next steps would be to look into non-adaptive schemes, and schemes for colluding nodes. R EFERENCES [1] B. Chor, O. Goldreich, E. Kushilevitz, and M. Sudan, “Private information retrieval,” in IEEE Symposium on Foundations of Computer Science, pp. 41–50, 1995. [2] B. Chor, E. Kushilevitz, O. Goldreich, and M. Sudan, “Private information retrieval,” Journal of the ACM (JACM), vol. 45, no. 6, pp. 965–981, 1998. [3] W. Gasarch, “A survey on private information retrieval,” The Bulletin of the EATCS, vol. 82, no. 72-107, p. 1, 2004. [4] H. Sun and S. A. Jafar, “The capacity of private information retrieval,” arXiv preprint arXiv:1602.09134, 2016. [5] H. Sun and S. A. Jafar, “The capacity of robust private information retrieval with colluding databases,” arXiv preprint arXiv:1605.00635, 2016. [6] S. Yekhanin, “Private information retrieval,” Communications of the ACM, vol. 53, no. 4, pp. 68–73, 2010. [7] A. Beimel and Y. Ishai, “Information-theoretic private information retrieval: A unified construction,” in Automata, Languages and Programming, pp. 912–926, Springer, 2001. [8] A. Beimel, Y. Ishai, E. Kushilevitz, and J.-F. Raymond, “Breaking the o(n1/(2k−1) ) barrier for information-theoretic private information retrieval,” in The 43rd Annual IEEE Symposium on Foundations of Computer Science, 2002. Proceedings., pp. 261–270, IEEE, 2002. [9] N. Shah, K. Rashmi, and K. Ramchandran, “One extra bit of download ensures perfectly private information retrieval,” in 2014 IEEE International Symposium on Information Theory, pp. 856–860, IEEE, 2014. [10] T. Chan, S.-W. Ho, and H. Yamamoto, “Private information retrieval for coded storage,” in 2015 IEEE International Symposium on Information Theory (ISIT), pp. 2842–2846, IEEE, June 2015. [11] R. Tajeddine and S. El Rouayheb, “Private information retrieval from mds coded data in distributed storage systems,” in Information Theory (ISIT), 2016 IEEE International Symposium on, pp. 1411–1415, IEEE, 2016. [12] R. Tajeddine, S. El Rouayheb, “Private Information Retrieval from MDS Coded data in Distributed Storage Systems (extended version),” 2016. http://www.ece.iit.edu/∼ salim/PIRv2.pdf. [13] K. Banawan and S. Ulukus, “The capacity of private information retrieval from coded databases,” arXiv preprint arXiv:1609.08138, 2016. [14] A. Fazeli, A. Vardy, and E. Yaakobi, “Codes for distributed PIR with low storage overhead,” in 2015 IEEE International Symposium on Information Theory (ISIT), pp. 2852–2856, June 2015. [15] S. Blackburn and T. Etzion, “PIR array codes with optimal pir rate,” arXiv preprint arXiv:1607.00235, 2016. [16] R. Freij-Hollanti, O. Gnilke, C. Hollanti, and D. Karpuk, “Private information retrieval from coded databases with colluding servers,” arXiv preprint arXiv:1611.02062, 2016. [17] D. Augot, F. Levy-Dit-Vehel, and A. Shikfa, “A storage-efficient and robust private information retrieval scheme allowing few servers,” in Cryptology and Network Security, pp. 222–239, Springer, 2014. [18] A. Beimel and Y. Stahl, “Robust information-theoretic private information retrieval,” in Security in Communication Networks, pp. 326–341, Springer, 2003. [19] C. Devet, I. Goldberg, and N. Heninger, “Optimally robust private information retrieval.,” in USENIX Security Symposium, pp. 269–283, 2012. [20] Z. Dvir and S. Gopi, “2 server PIR with sub-polynomial communication,” in Proceedings of the Forty-Seventh Annual ACM on Symposium on Theory of Computing, STOC ’15, (New York, NY, USA), pp. 577– 584, ACM, 2015. [21] S. Yekhanin, “Towards 3-query locally decodable codes of subexponential length,” Journal of the ACM (JACM), vol. 55, no. 1, p. 1, 2008. [22] K. Efremenko, “3-query locally decodable codes of subexponential length,” SIAM Journal on Computing, vol. 41, no. 6, pp. 1694–1703, 2012.
7cs.IT
Nonequational Stable Groups Isabel Müller∗ and Rizos Sklinos† arXiv:1703.04169v1 [math.LO] 12 Mar 2017 April 10, 2018 Abstract We introduce a combinatorial criterion for verifying whether a formula is not the conjunction of an equation and a co-equation. Using this, we give a transparent proof for the nonequationality of the free group, which was originally proved by Sela. Furthermore, we extend this result to arbitrary free products of groups (except Z2 ∗Z2 ), providing an abundance of new stable nonequational theories. 1 Introduction The notion of equationality has been introduced by Srour [Sro84] and further developed by Pillay-Srour [PS84]. It is best understood intuitively as a notion of Noetherianity on instances of first-order formulas (see section 2 for a formal definition). A first-order theory is equational when every first-order formula is equivalent to a boolean combination of equations. As it is often the case in model theory, equationality is modeled after a phenomenon in algebraically closed fields. There, every first-order formula is a boolean combination of varieties, i.e. closed sets in the Zariski topology, which in turn is Noetherian. The equationality of a first-order theory implies another fundamental property: any equational first-order theory is stable. Stability had been introduced by Shelah in order to pursuit his classification program and has been dominating the research domain of model theory for many years. A first-order theory is stable if it admits a nicely behaved independence relation. We note that, in general, having an abstract independence relation does not imply a notion of dimension that can be used to prove a descending chain condition as in the case of algebraically closed fields. Despite that, at the time equationality was introduced there was no known example of a stable nonequational theory. A few years later Hrushovski and Srour [HS89] produced the first such example by tweaking the free pseudospace, a structure introduced by Baudisch and Pillay which is 2-ample but not 3ample, where ampleness is a notion measuring how complicated the independence relation in a stable theory is. For many years the notions of equationality and stability were identified, as morally only a “strange” artificial example could witness otherwise. In 2006 Sela [Sel13] completely changed the picture we had for stable groups by adding torsion-free hyperbolic groups to the stable family. This is considered by many one of the deepest results in the model theory of groups. We note that before Sela’s work the only families of groups that were known to be stable were the family of abelian groups and the family of algebraic groups over algebraically closed fields. Even more strikingly Sela proved that torsion-free hyperbolic ∗ The first author would like to thank die Deutsche Telekom Stiftung for financial support. The second author was supported by the LABEX MILYON (ANR-10-LABX-0070) of Université de Lyon, within the program “Investissements d’Avenir” (ANR-11-IDEX-0007) operated by the French National Research Agency (ANR). † 1 groups are nonequational [Sel12], whence these theories are the first natural examples of stable nonequational theories. His proof of nonequationality relies on the heavy machinery introduced and used in the daunting series of nine papers on the elementary theory of free groups culminating to the positive answer of Tarski’s question on whether or not nonabelian free groups share the same first order theory. The sophisticated methods introduced for tackling Tarski’s problem also allowed Sela to answer a long standing question of Vaught . He proved that whenever G1 is elementarily equivalent to G2 and H1 is elementarily equivalent to H2 , then the free product G1 ∗ H1 is elementarily equivalent to G2 ∗ H2 . In addition, he proved that whenever G ∗ H is a nontrivial free product, which is not Z2 ∗ Z2 , then it is elementarily equivalent to G ∗ H ∗ F for any free group F (see [Sel10]). In this paper we give an elementary transparent proof for the nonequationality of the first-order theory of nonabelian free groups. We use (essentially) the same first-order formula as Sela, but our arguments avoid his complicated machinery. As a matter of fact, using the above mentioned result of Sela, our arguments extend to the first-order theory of any nontrivial free product which is not Z2 ∗ Z2 . On the other hand, Sela’s proof applies to each torsion-free hyperbolic group H without using that it is elementarily equivalent to H ∗ Fω . The main result of this paper is as follows: Theorem 1: Let G1 ∗ G2 be a nontrivial free product which is not Z2 ∗ Z2 . Then its first order theory is nonequational. Recently, Sela, in the work mentioned above [Sel10], proved the astonishing result that a free product of stable groups remains stable. This fact together with the main result of this paper give an abundance of new stable nonequational theories. Acknowledgements. We would like to thank Thomas Blossier and Amador MartinPizarro for the groupe de travail in Lyon around the Hrushovski-Srour manuscript [HS89] and the construction of free pseudospaces. We also thank Amador Martin-Pizarro for fruitful discussions around equationality. We would like to thank Zlil Sela for a useful correspondence on free products of groups. Finally the second author would like to thank Anand Pillay for sharing the manuscript [HS89] with him, while he was a PhD student in Leeds. 2 The Criterion In the following section we will introduce the notion of equationality and present a criterion which implies that a formula is not the conjunction of an equation and a co-equation. We furthermore will argue that under some slightly stricter conditions, this amounts to show that a first-order theory is nonequational. Definition 2.1. Let T be a first-order theory. Then a formula ϕ(x, y) is an equation in the tuple x if any collection of instances of ϕ(x, y) is equivalent (modulo T ) to a finite subcollection. An easy example of an equation in an arbitrary theory T is an actual equation, i.e. a formula of the type x = y. Note that being an equation is not closed under boolean combinations, as the formula x 6= y is not an equation in any theory T with infinite models. Definition 2.2. A first-order theory T is n-equational if every formula ϕ(x, y) with variable length |x| = n is a boolean combination of equations. Moreover, the first-order theory T is equational if it is n-equational for all n < ω. It remains an interesting open question, whether being 1-equational implies being equational. All known examples of stable nonequational theories, i.e. the examples in this paper and Hrushovski’s tweaked free pseudospace, are in fact not 1-equational. 2 The following fact gives a more combinatorial flavor to the definition of equationality for a formula. Fact 2.3: The first-order formula ϕ(x, y) is not an equation if and only if for arbitrarily large n ∈ N there are tuples (ai ), (bj ), i, j ≤ n such that |= ϕ(ai , bj ) for all i < j, but 6|= ϕ(ai , bi ). The following remark is trivial, but will have interesting consequences in our study of nonequational theories. Remark 2.4. Assume ϕ(x, y) to be a formula equivalent to a boolean combination of equations. Then ϕ(x, y) is equivalent to a formula of the form _ (ψ1i (x, y) ∧ ¬ψ2i (x, y)), 0≤i≤n for some equations ψ1i , ψ2i and n ∈ N. This follows easily from the facts that every formula is equivalent to a formula in disjunctive normal form and that finite disjunctions and finite conjunctions of equations are again equations. In the following we will give a combinatorial criterion for formulas to not be of the form ψ1 (x, y) ∧ ¬ψ2 (x, y), where ψ1 and ψ2 are equations. Lemma 2.5: Let T be a first-order theory and ϕ(x, y) be a formula. If for arbitrary large n ∈ N there exist matrices An := (aij )i,j≤n and Bn := (bkl )k,l≤n such that |= ϕ(aij , bkl ) if and only if i 6= k or (i, j) = (k, l), then ϕ(x, y) is not equivalent to a formula of the form ψ1 (x, y) ∧ ¬ψ2 (x, y), where ψ1 and ψ2 are equations. Proof. We first show that under the hypothesis of the lemma, every row witnesses that the formula ¬ϕ(x, y) is not equivalent to an equation. To see that, fix some i0 and note that with aj := ai0 j and bl := bi0 l , we get |= ¬ϕ(aj , bl ) for all j < l and 6|= ¬ϕ(aj , bj ), whence by Fact 2.3 the formula ¬ϕ(x, y) is not equivalent to an equation. Now, aiming for a contradiction, assume ϕ(x, y) ≡ ψ1 (x, y) ∧ ¬ψ2 (x, y), for some equations ψ1 , ψ2 , whence in particular ¬ϕ(x, y) ≡ ¬ψ1 (x, y) ∨ ψ2 (x, y). If there was some index i0 , such that |= ψ1 (ai0 j , bi0 l ) for all j, l, then for that row we would have ¬ϕ(ai0 j , bi0 l ) ↔ ψ2 (ai0 j , bi0 l ) for all j, l ≤ n, contradicting the fact that ψ2 is an equation. Thus, for any index i ≤ n, there exists some ji , li such that |= ¬ψ1 (aiji , bili ). Set ai := aiji , bk := bklk . Note that for i 6= k we have |= ϕ(ai , bk ), whence |= ψ1 (ai , bk ) for all i < k and 6|= ψ1 (ai , bi ), contradicting the fact that ψ1 is an equation. Our method provides a general criterion for proving that a first-order theory is nonequational, given in the following proposition. There, we will use the notion of a type which is a maximally consistent set of formulas. For the purpose of this paper the reader unfamiliar with this notion can simply understand it as defining when two tuples are in the same orbit under the automorphism group of a given structure. Proposition 2.6: Let T be a first-order theory. Suppose there exist a formula ϕ(x, y) and arbitrarily large matrices An , Bn such that: (i) there exists a type of T which is satisfied by any tuple (aij , bkl ) of entries of the matrices for i 6= k and for (i, j) = (k, l); 3 (ii) the formula ϕ(x, y) is satisfied by (aij , bkl ) if and only if i 6= k or (i, j) = (k, l). Then T is nonequational. Proof. We will show that ϕ(x, y) is not in the boolean algebra of equations. Otherwise, by Remark 2.4, there existed m ∈ N and equations ψ1i (x, y), ψ2i (x, y) for i ≤ m such that _ ϕ(x, y) ≡ (ψ1i (x, y) ∧ ¬ψ2i (x, y)). 0≤i≤m For An and Bn as given above, we have |= ϕ(a11 , b11 ). Thus, there exists some i ≤ m such that |= ψ1i (a11 , b11 ) ∧ ¬ψ2i (a11 , b11 ). We set θ(x, y) := ψ1i (x, y) ∧ ¬ψ2i (x, y). As all (aij , bkl ) for (i, j) = (k, l) or i 6= k have the same type as (a11 , b11 ), we get that |= θ(aij , bkl ) for all previously mentioned indices. On the other hand, if i = k, but j 6= l, then |= ¬ϕ(aij , bkl ), whence in particular |= ¬θ(aij , bkl ). By Lemma 2.5, this contradicts the fact that θ(x, y) is the conjunction of an equation and a co-equation. 3 Nonequationality of the Free Group In the following we will show that the theory of the free group is not 1-equational, and hence not equational. The next result allows us to work in Fω , the free group of rank ω. Fact 3.1 (Sela): Let G1 ∗ G2 be a nontrivial free product, which is not Z2 ∗ Z2 . Then it is elementarily equivalent to G1 ∗ G2 ∗ F for any free group F. Alternatively one can use that nonabelian free groups form an elementary chain (see [Sel06], [KM06]). F2 ≺ F3 ≺ . . . ≺ Fn ≺ . . . Thus, they all elementarily embed in Fω which is the union of this chain. Working in Fω , we will show that the following formula is not equivalent to a boolean combination of equations: ϕne (x, y) := ∀u, v([u, v] 6= 1 → xy 6= u5 v 4 ). Our formula is a mild variation of the formula Sela uses: φS (x, y) := ∃u, v([u, v] 6= 1 ∧ yx = u10 v −9 ). We recall some useful group theoretic facts. An element of a free group is called primitive if it is part of some basis of the free group. Fact 3.2: Let a be a primitive element of F. Suppose a belongs to a subgroup H of F. Then a is a primitive element of H. The above fact can be obtained as a corollary of the Kurosh Subgroup Theorem. We also recall: m2 mn 1 Fact 3.3: Let e1 , . . . , en be a basis of the free group Fn of rank n. Then em 1 · e2 . . . en is not a primitive element for any |mi | = 6 1. With Fact 3.2 and Fact 3.3 at hand, we now can prove: Lemma 3.4: Let Fω := he1 , e2 , . . .i. Then for any pair (a, b) which is part of some basis of Fω we have Fω |= ϕne (a, b). 4 Proof. Since our formula is defined over the empty set it is enough to prove that the pair (e1 , 1) satisfies ϕne in Fω . That is because then (e1 ·e2 , 1) satisfies the formula, thus (e1 , e2 ) satisfies it. Therefore, we need to prove that e1 is not a product of a fifth and a fourth power of any two elements of Fω that do not commute. Suppose otherwise that there are u, v two elements of Fω such that u5 v 4 = e1 and [u, v] 6= 1. Recall that any two elements that do not commute generate a free subgroup of rank 2. Thus, Corollary 3.2 yields that e1 is a primitive element of hu, vi. On the other hand since u5 v 4 = e1 , we get by Fact 3.3 that the element e1 is not primitive in hu, vi, a contradiction. We will use Proposition 2.6 in order to prove that the theory of the free group nonequational. Therefore, for n ∈ N arbitrary consider the following matrices:   −1 −4  −4 −4 e1 e2 e−1 . . . e−1 e52 e1 e53 e1 . . . e5n+1 e1 1 e3 1 en+1 −1 −4 −1 −4 −1 5 5 5  e3 e2  e2 e3 e4 e2 . . . en+2 e2  e2 e4 . . . e2 e−4 n+2    An =   Bn =  .. .. .. .. .. ..    . . . . . . e5n+1 en e5n+2 en ... −4 e−1 n en+1 e52n en −4 e−1 n en+2 ... −4 e−1 n e2n is      We will see that ϕne (x, y) together with the matrices An , Bn satisfy the hypotheses of Proposition 2.6. Lemma 3.5: Let An = (aij ) and Bn = (bkl ) be the matrices given above. If i 6= k or (i, j) = (k, l), then aij and bkl form part of a basis of Fω . Proof. Consider first aij ∈ An and bkl ∈ Bn arbitrary with i 6= k. Then −4 aij = e5i+j ei and bkl = e−1 k ek+l . Extend {i, k} by a subset S ⊆ {i + j, k + l} of maximal size such that S ∪ {i, k} contains only pairwise distinct elements. Then the set {es | s ∈ S} ∪ {aij , bkl } is part of a basis, as the subgroup it generates contains the following part of a basis {ei , ek } ∪ {es | s ∈ S} which has the same size. −4 If (i, j) = (k, l), then the set {aij , bij } = {e5i+j ei , e−1 i ei+j } forms a basis of F2 , as the subgroup it generates contains the following part of a basis {ei , ei+j } which has the same size. Lemma 3.6: Let An = (aij ) and Bn = (bkl ) be the matrices given above. Then ¬ϕne is satisfied in Fω by any pair (aij , bkl ) if i = k and j 6= l. Proof. Consider aij ∈ An and bil ∈ Bn arbitrary for j 6= l. Then −4 −4 5 aij bkl = e5i+j ei e−1 i ei+l = ei+j ei+l . Cleary u = ei+j and v = e−1 i+l do not commute for j 6= l, whence Fω |= ¬ϕne (aij , bil ), as desired. We can now prove the nonequationality of the free group. Theorem 3.7: The theory of the free group is nonequational. Proof. We confirm that the hypotheses of Proposition 2.6 are satisfied for the first-order formula ϕne and the matrices An , Bn given above. Indeed, by Lemma 3.5 the pairs (aij , bkl ) for i 6= k and for (i, j) = (k, l) all satisfy the same type, namely the type tp(e1 , e2 ). Thus, the first condition of Proposition 2.6 holds. For the second condition, we need to prove that Fω |= ϕne (aij , bkl ) if and only if i 6= k or (i, j) = (k, l). The right to left direction follows from lemmata 3.4 and 3.5, while the other direction is Lemma 3.6. 5 4 Free Products of Groups In this section we generalize the main result of Section 3 to the first-order theory of any nontrivial free product of groups G := G1 ∗ G2 , which is not Z2 ∗ Z2 . Recall from Fact 3.1 that any such theory coincides with the theory of G ∗ Fω . The main fact we have to establish is that Lemma 3.4 is still valid for the group G ∗ Fω . We will prove: Lemma 4.1: Let Fω := he1 , e2 , . . . , en , . . .i. Then for any pair (a, b) which is part of some basis of Fω we have that G ∗ Fω |= ϕne (a, b). With the above lemma at hand, the proof of nonequationality of the free group transfers to G directly and we get the following theorem as a corollary: Theorem 4.2: Let G1 , G2 be nontrivial groups, at least one of them different from Z2 . Then the first order theory of their free product is not equational. By a deep result of Sela we know that whenever G1 and G2 are stable, then their free product is again stable. Thus our theorem yields an abundance of new stable, nonequational theories. Corollary 4.3: Let G1 and G2 be nontrivial stable groups, at least one of them not isomorphic to Z2 . Then their free product has a stable nonequational first-order theory. Some Bass-Serre Theory The rest of the section is devoted to the proof of Lemma 4.1. To this end, we have to introduce some basic notions on free products and Bass-Serre theory. For reference and detailed explanations we confer the reader to [Ser83]. Definition 4.4. Let G1 , G2 be groups. We call an expression of the form g := g1 g2 . . . gn ∈ G1 ∗ G2 for n ≥ 0 a normal form, if gi ∈ (G1 ∪ G2 ) \ {1} and no consecutive elements gi , gi+1 lie in the same group. In a free product, any element has a unique normal form. For g in G1 ∗ G2 with normal form g1 g2 . . . gn its sylable lentgh syl(g) is n. The trivial element is the unique element with 0 sylable lentgth. Fact 4.5: An element g is cyclically reduced, if its normal form is g1 g2 . . . gn where g1 and gn lie in different free factors. If g is not cyclically reduced, then there exists some element γ ∈ G and a cyclically reduced element g 0 such that g = γg 0 γ −1 . Bass-Serre theory provides us with a correspondence between group splittings and actions of groups on (simplicial) trees. In particular, to any free product of groups G := G1 ∗G2 we can associate a tree, its so-called Bass-Serre tree, and an action of G on this tree as follows. The vertices of the tree is the union of cosets {gG1 | g ∈ G} and {gG2 | g ∈ G}. Furthermore, for any element g ∈ G there exists an edge connecting gG1 to gG2 . Moreover G acts on the set of vertices by left multiplication, i.e. h · gGi = hgGi for any h ∈ G. The stabiliser of a vertex gGi is the conjugate of Gi by g and every edge is trivially stabilised. Using the uniqueness of normal forms in free products we see that each vertex gGi has a unique label g1 g2 . . . gn Gi , where g1 g2 . . . gn is the normal form of g and gn 6∈ Gi . There are two different ways in which an element h can act on a Bass-Serre tree: either it fixes a unique point F ix(h), in which case we call h elliptic, or there exists a unique infinite line Ax(h) on which h acts by translation by some fixed length tr(h) > 0, its translation length. In the latter case h is called hyperbolic. Remark 4.6. Let u, v be two hyperbolic elements in G such that their axes intersect in a length at least tr(u) + tr(v) + 1. Then u and v commute. To see this, consider x the first 6 element in the intersection of their axes. We may assume u and v translate in the same direction on this intersection. Then u−1 v −1 uvx = x. The same holds for a neighbouring vertex y of x on the intersection of the axes, whence u−1 v −1 uv stabilizes the edge between x and y. As any edge is trivially stabilized, we get uv = vu, as desired. The following fact describing the action of the product of two elliptic elements is by no means hard to verify. Fact 4.7: Let g, g 0 ∈ G = G1 ∗ G2 . If g and g 0 are elliptic and Fix(g) 6= Fix(g 0 ), then gg 0 is hyperbolic with tr(gg 0 ) = 2d(Fix(g), Fix(g 0 )). The next lemma will be helpful for the proof of Lemma 4.1. Lemma 4.8: Let G1 , G2 be arbitrary groups and u ∈ G1 ∗ G2 be a cyclically reduced element which is moreover hyperbolic in the corresponding Bass-Serre tree. Then its axis Ax(u) contains the vertices G1 and G2 . Proof. Let x be the vertex representing Gi for some i = 1, 2 and u be cyclically reduced. It suffices to show that d(x, ux) = syl(u), whence d(x, u2 x) = 2d(x, ux) and x ∈ Ax(u). We prove this by induction on the syllable length syl(u). Note that the syllable length of a hyperbolic cyclically reduced word is always even and at least 2. So assume now syl(u) = 2, say u = ab with a ∈ G1 and b ∈ G2 . Assume x is the vertex G1 . Then there is a path (G1 = aG1 , aG2 = abG2 , abG1 ) from x to abx of length 2, whence d(x, ux) = 2, as desired. If x is the vertex G2 , then the path (G2 , G1 = aG1 , aG2 = abG2 ) is the desired path of length 2. Now assume we have proven the claim for all cyclically reduced u0 of syllable length at most 2n and consider u = a1 b1 . . . an bn an+1 bn+1 with ai ∈ G1 and bi ∈ G2 . Set u0 := a1 b1 . . . an bn . Then by induction hypothesis we have d(x, u0 x) = 2n. Furthermore u0 x is the vertex u0 Gi if x represents Gi . Now, as above if x is the vertex G1 , then the path (u0 G1 = u0 an+1 G1 , u0 an+1 G2 = u0 an+1 bn+1 G2 , u0 an+1 bn+1 G1 ) is a path of length 2 from u0 x to ux and disjoint from the path between x and u0 x, whence d(x, ux) = d(x, u0 x) + d(u0 x, ux) = 2n + 2, as desired. If x ∈ G2 , use the path (u0 G2 , u0 G1 = u0 an+1 G1 , u0 an+1 G2 = u0 an+1 bn+1 G2 ) to conclude the proof. Remark 4.9. Assume u ∈ G1 ∗G2 is a hyperbolic element, which is not cyclically reduced. Then it is of the form γu0 γ −1 for some cyclically reduced u0 , and its axis is a translate of the axis of u0 by γ. Proof of Lemma 4.1 As in the proof of Lemma 3.4, it suffices to show that whenever u, v ∈ G ∗ Fω do not commute, then u5 v 4 6= e1 . We will argue with the action of G ∗ Fω on the Bass-Serre tree associated to the free splitting, as introduced above. First we will show that in order to prove Lemma 4.1, it suffices to reduce to the case where at least one of u or v is cyclically reduced. 7 Lemma 4.10: Assume Lemma 4.1 holds for any elements u, v which do not commute and where at least one of them is cyclically reduced. Then it holds for any u, v which do not commute. Proof. Note that if u5 v 4 = e1 , then in the normal form of u and v with respect to the free splitting G ∗ Fω , either u starts, or v ends with the letter e1 . Now, without loss assume u starts with e1 and neither u nor v is cyclically reduced. Then u and v are conjugates of 5 4 05 −1 04 −1 cyclically reduced words and more precisely u = e1 u0 e−1 1 , whence u v = e1 u e1 v1 v v1 . Now, if v1 6= e1 , then there would be no cancellation in the product, contradicting the fact that its product has normal form e1 . Thus, v1 = e1 , whence 05 04 u5 v 4 = e1 u05 v 04 e−1 1 = e1 if and only if u v = e1 . Note that u0 and v 0 still do not commute. Now, either one of u0 and v 0 is already cyclically reduced, or we can repeat the argument, further decreasing the length of u and v. After finitely many steps we would obtain u0 , v0 with u50 v04 = e1 and at least one of them being cyclically reduced, contradicting the assumptions. Now we are ready to prove Lemma 4.1 Proof of Lemma 4.1. As above, it suffices to show that e1 cannot be written as u5 v 4 , for any elements u, v ∈ G ∗ Fω that do not commute. Assume for a contradiction that there existed such u and v. We consider their action on the Bass-Serre tree corresponding to the free splitting G ∗ Fω . Assume both u and v are elliptic elements. If they would fix different vertices, then by Fact 4.7, the product u5 v 4 is hyperbolic and hence can not equal e1 . Otherwise, they fix the same vertex which also is fixed by e1 and hence has to coincide with Fω . Thus u, v ∈ Fω , whence they generate a free group of rank 2. Now Lemma 3.3 yields that e1 cannot be written as a product of proper powers of u and v, a contradiction. Thus, at least one of u or v has to be hyperbolic. By Lemma 4.10, we may furthermore assume that at least one of them, say v, is cyclically reduced. If v would be elliptic, then it either fixes the vertex labeled Fω , whence also u5 = e1 v −4 fixes Fω , a contradiction, or it fixes the vertex labeled G, whence by Fact 4.7 the element u5 = e1 v −4 is hyperbolic of translation length 2, again a contradiction as tr(u5 ) ≥ 5. We can thus assume that the cyclically reduced word v is hyperbolic. Let b1 a1 b2 · · · bn an be the normal form of v, for bi in G and ai in Fω . Let further u1 u2 . . . um be the normal form of the element u5 . We will do the proof for u being hyperbolic. The case for u elliptic reduces to a special case to the proof we give below, in which the “axes“ of u and v intersect in a single point, the fixed point of u. So let u be hyperbolic. If u is also cyclically reduced, then the axes of u and v coincide for more than tr(u) + tr(v), whence by Remark 4.6 the elements commute and we can conclude. Thus, we may assume that u is not cyclically reduced. In particular, the syllables u1 and um belong to the same free factor which must be G, as otherwise there was no cancellation between u5 and v 4 and a length argument yields that their product cannot coincide with e1 . In the Bass-Serre tree corresponding to the free product G∗Fω , the vertex x labeled by Fω is moved by v 4 along its axis to the vertex y labeled by v 3 b1 a1 b2 · · · bn an Fω . Note that y is also labeled by v 3 b1 a1 b2 · · · bn Fω . We will assume that the axes of u and v coincide for at most tr(u) + tr(v), otherwise we can prove, as above, that u and v commute. The last implies that each of the two parts of the axis of v outside of the intersection has length at least syl(v) = 2n. Since u5 v 4 = e1 , we must have that u−5 moves the vertex x to the vertex y, along the −1 −1 axis of v. Hence the vertex y is also labeled by u−1 m . . . u1 Fω , and since u1 belongs to 8 G we deduce that u−1 1 = bn . Repeating the argument we see that for at least the last 2n elements of u−5 we get = an− 2i for i even, u−1 = bn− i−1 for i odd and u−1 i i 2 where a0 := an . Since the element u is not cyclically reduced, it is of the form γu0 γ −1 for some cyclically reduced word u0 and γ of syllable length at least 2n. Thus we see that um−i+1 = u−1 for i ≤ 2n. Now, following the labels of vertices along the axis of v, starting i from the vertex x, we have −1 −1 −1 −1 −1 Fω , G, u−1 m Fω , um um−1 G, . . . , um um−1 . . . um−2n+1 G, which must be the same sequence as Fω , G, b1 Fω , b1a1 G, . . . , b1 a1 . . . bn an G. −1 The uniqueness of normal forms now implies an = u−1 m−2n+1 = u2n = an , a contradiction 5 4 since an is a nontrivial element of Fω . This concludes that u v 6= e1 . If u is the cyclically reduced element and starts with a syllable in Fω , the argument is exactly the same. If it starts with a syllable in G or v is cyclically reduced and starts with a syllable from Fω , then a symmetric argument concludes the proof of the Lemma. References [HS89] E. Hrushovski and G. Srour, Non-equational stable theories, unpublished notes, 1989. [KM06] O. Kharlampovich and A. Myasnikov, Elementary theory of free nonabelian groups, J. Algebra 302 (2006), 451–552. [PS84] A. Pillay and G. Srour, Closed sets and chain conditions in stable theories, J. of Symbolic Logic 49 (1984), 1350–1362. [Sel06] Z. Sela, Diophantine geometry over groups VI: The elementary theory of free groups, Geom. Funct. Anal. 16 (2006), 707–730. [Sel10] , Diophantine geometry over groups X: The Elementary Theory of Free Products of Groups, available at https://arxiv.org/abs/1012.0044, 2010. 9 [Sel12] , Free and Hyperbolic groups are not Equational, available at http:// arxiv.org/abs/1204.5075, 2012. [Sel13] , Diophantine geometry over groups VIII: Stability, Ann. of Math. (2) 177 (2013), 787–868. [Ser83] J. P. Serre, Arbres, amalgames, SL2 , Astérisque 46 (1983). [Sro84] G. Srour, Equations and equational theories, Ph.D. thesis, Department of Mathematlcs and Statistics, McGill University, Montreal, Canada, 1984. 10
4math.GR
A Parameterized Algorithm for Bounded-Degree Vertex Deletion arXiv:1601.00163v2 [cs.DS] 20 Aug 2016 Mingyu Xiao⋆ School of Computer Science and Engineering, University of Electronic Science and Technology of China, China [email protected] Abstract. The d-bounded-degree vertex deletion problem, to delete at most k vertices in a given graph to make the maximum degree of the remaining graph at most d, finds applications in computational biology, social network analysis and some others. It can be regarded as a special case of the (d + 2)-hitting set problem and generates the famous vertex cover problem. The d-bounded-degree vertex deletion problem is NP-hard for each fixed d ≥ 0. In terms of parameterized complexity, the problem parameterized by k is W[2]-hard for unbounded d and fixed-parameter tractable for each fixed d ≥ 0. Previously, (randomized) parameterized algorithms for this problem with running time bound O∗ ((d + 1)k ) are only known for d ≤ 2. In this paper, we give a uniform parameterized algorithm deterministically solving this problem in O∗ ((d + 1)k ) time for each d ≥ 3. Note that it is an open problem whether the d′ -hitting set problem can be solved in O∗ ((d′ − 1)k ) time for d′ ≥ 3. Our result answers this challenging open problem affirmatively for a special case. Furthermore, our algorithm also gets a running time bound of O∗ (3.0645k ) for the case that d = 2, improving the previous deterministic bound of O∗ (3.24k ). Key words. Parameterized algorithms, Graph algorithms, Boundeddegree vertex deletion, Hitting set 1 Introduction The d-bounded-degree vertex deletion problem is a natural generation of the famous vertex cover problem, which is one of the best studied problems in combinatorial optimization. An application of the d-bounded-degree vertex deletion problem in computational biology is addressed by Fellows et. al. [5]: A cliquecentric approach in the analysis of genetic networks based on micro-array data can be modeled as the d-bounded-degree vertex deletion problem. The problem also plays an important role in the area of property testing [12]. Its “dual problem”– the s-plex problem was introduced in 1978 by Seidman and Foster [14] and it becomes an important problem in social network analysis now [1]. ⋆ Supported by NFSC of China under the Grant 61370071 and Fundamental Research Funds for the Central Universities under the Grant ZYGX2015J057. The d-bounded-degree vertex deletion problem is also extensively studied in theory, especially in parameterized complexity. It has been shown that the problem parameterized by the size k of the deletion set is W[2]-hard for unbounded d and fixed-parameter tractable for each fixed d ≥ 0 [5]. Betzler et. al. [2] also studied the parameterized complexity of the problem with respect to the treewidth tw of the graph. The problem is FPT with parameters k and tw and W[2]-hard with only parameter tw. Fellows et. al. [5] generated the NT-theorem for the vertex cover problem to the d-bounded-degree vertex deletion problem, which can imply a linear vertex kernel for the problem with d = 0, 1 and a polynomial vertex kernel for each fixed d ≥ 2. A linear vertex kernel for the case that d = 2 was developed in [4]. Recently, a refined generation of the NT-theorem was proved [17], which can get a linear vertex kernel for each fixed d ≥ 0. In terms of parameterized algorithms, the case that d = 0, i.e., the vertex cover problem, can be solved in O∗ (1.2738k ) time now [3]. When d = 1, the problem is known as the P3 vertex cover problem. Tu [15] gave an O∗ (2k )time algorithm and the running time bound was improved to O∗ (1.882k ) by Wu [16] and to O∗ (1.8172k ) by Katrenič [11]. When d = 2, the problem is known as the co-path/cycle problem. For this problem, there is an O∗ (3.24k )time deterministic algorithm [4] and an O∗ (3k )-time randomized algorithm [6]. For d ≥ 3, a simple branch-and-reduce algorithm that tries all d + 2 possibilities for a (d+1)-star in the graph gets the running time bound of O∗ ((d+2)k ). In fact, the d-bounded-degree vertex deletion problem can be regarded as a special case of the (d + 2)-hitting set problem and the latter problem has been extensively studied in parameterized algorithms [13,7,8,9]. For a graph G, we regard each vertex in the graph as an element and each (d + 1)-star as a set of size d + 2 (a d0 vertex of degree d0 > d will form d+1 sets). Then the d-bounded-degree vertex deletion problem in G becomes an instance of the (d + 2)-hitting set problem. There are several parameterized algorithms for the d′ -hitting set problem running in O∗ ((d′ − 1 + c)k ) time [13,9], where 0 < c < 1 is a function of d′−1 . It leaves as an interesting open problem whether the d′ -hitting set problem can be solved in O∗ ((d′ − 1)k ) time. Note that it is marked in [9] that “(d′ − 1)k seems an unsurpassable lower bound”. By using fastest algorithms for the (d + 2)-hitting set problem, we can get an algorithm with running time bound of O∗ ((d+1+c0 )k ) with 0 < c0 < 1 for each fixed d. In this paper, we design a uniform algorithm for the d-bounded-degree vertex deletion problem, which achieves the running time bound of O∗ ((d+1)k ) for each d ≥ 3. Although our problem is a special case of the (d + 2)-hitting set problem, the above bound is not easy to reach. We need a very careful analysis and some good graph structural properties. It is also worthy to mention that our algorithm also works on the case that d = 2 and runs in O∗ (3.0645k ) time, improving the previous deterministic bound of O∗ (3.24k ) [4] and comparable with the previous randomized bound of O∗ (3k ) [6]. 2 2 Preliminaries Let G = (V, E) be a simple undirected graph, and X ⊆ V be a subset of vertices. The subgraph induced by X is denoted by G[X], and G[V \X] is written as G\X. We may simply use v to denote the set {v} of a single vertex v. Let N (X) denote the set of neighbors of X, i.e., the vertices in V \ X adjacent to a vertex x ∈ X, and denote N (X) ∪ X by N [X]. The degree d(v) of a vertex v is defined to be |N (v)|. A graph of maximum degree p is also called a degree-p graph. For an integer q ≥ 1, a star with q + 1 vertices is called a q-star. A set S of vertices is called a d-deletion set of a graph G, if G \ S has maximum degree at most d. In our problem, we want to find a d-deletion set of size at most k in a graph. Formally, our problem is defined as following. d-Bounded-Degree Vertex Deletion Instance: A graph G = (V, E) and two nonnegative integers d and k. Question: To decide whether there is a subset S ⊆ V of vertices such that |S| ≤ k and the induced graph G[V \ S] has maximum degree at most d. In the above definition, S is also called a solution set. 2.1 Some basic properties The following lemmas are basic structural properties used to design branching rules in our algorithms. Lemma 1. Let v be a vertex of degree ≥ d + 1 in a graph G. Any d-deletion set contains either v or d(v) − d neighbors of v. A vertex v dominates a vertex u if all vertices of degree ≥ d + 1 in N [u] are also in N [v]. Note that in this definition, we do not require N [u] ⊆ N [v]. Lemma 2. If a vertex v of degree d + 1 dominates a neighbor u of it, then there is a minimum d-deletion set containing at least one vertex in N [v] \ {u}. Proof. Since v is of degree d+1, any d-deletion set S contains at least one vertex in N [v]. Assume that S contains only u in N [v]. We can see that S ′ = S∪{v}\{u} is still a d-deletion set and |S ′ | ≤ |S|. Thus, the lemma holds. ⊓ ⊔ Lemma 3. If a vertex u dominates a vertex v of degree d + 1, then there is a minimum d-deletion set containing at least one neighbor of v. Proof. Since u dominates v and v is of degree d + 1, we know that u is a neighbor of v. Any d-deletion set S contains at least one vertex in N [v] since it is of degree d+1. Assume that S ∩N [v] = {v}. We can see that S ′ = S ∪{u}\{v} is a d-deletion set containing a neighbor of v and |S ′ | ≤ |S|. Thus, the lemma holds. ⊓ ⊔ If there is a vertex of degree ≥ d + 1 dominating a neighbor of it or being dominated by another vertex, we say that the graph has a proper domination. 3 Note that if a vertex u of degree ≥ d + 1 has at most one neighbor v of degree ≥ d + 1, then u is dominated by v and then there is a proper domination. In fact, we have: Lemma 4. If a graph has no proper domination, then each vertex of degree ≥ d + 1 in it has at least two nonadjacent neighbors of degree ≥ d + 1. 2.2 Branch-and-search algorithms Our algorithm is a typical branch-and-search algorithm. In our algorithm, we search a solution for an instance by recursively branching on the current instance into several smaller instances until the instances become trivial instances. Each simple branching operation creates a recurrence relation. Assume that the branching operation branches on an instance with parameter k into l branches such that in the i-th branch the parameter decreases by at least ai . Let C(k) denote the worst size of the search tree to search a solution to any instance with parameter k. We get a recurrence relation 1 C(k) ≤ C(k − a1 ) + C(k − a2 ) + · · · + C(k − al ) + 1. P The largest root of the function f (x) = 1 − li=1 x−ai is called the branching factor of the recurrence relation. Let α be the maximum branching factor among all branching factors in the algorithm. The size of the search tree that represents the branching process of the algorithm applied to an instance with parameter k is given by O(αk ). More details about the analysis and how to solve recurrences can be found in the monograph [10]. 3 The idea and organization of the algorithm Our purpose is to design a branch-and-search algorithm for the d-bounded-degree vertex deletion problem such that the branching factor of each recurrence relation with respective to the parameter k is at most d + 1. Lemma 1 provides a simple branching rule: for a vertex v of degree ≥ d + 1, branching by either including v or each set of d(v) − d neighbors of v to the solution set. We will show that when d(v) ≥ d + 2, this simple branching operation is good enough to get a branching factor ≤ d + 1 for each d ≥ 2 (See Step 1 in Section 4). Thus, we can use this operation to deal with vertices of degree ≥ d + 2. Lemma 1 for a degree-(d + 1) vertex v can be interpreted as: at least one vertex in N [v] is in a d-deletion set. This branching operation will only get a branching factor of d + 2 for this case. But when there is a proper domination in a degree-(d + 1) graph, we still can branch with branching factor d + 1, since we can ignore one branch by Lemma 2 and Lemma 3. The detailed analysis is given in Step 2 in Section 4. When the 1 In fact, we may simply write a recurrence relation as C(k) ≤ C(k − a1 ) + C(k − a2 ) + · · · + C(k − al ). This difference will only affect a constant behind O in the finial running time. 4 graph is of maximum degree d + 1 and has no proper domination, we need to use more structural properties. To find a d-deletion set in a degree-(d + 1) graph is equivalent to find a vertex subset intersecting N [v] for each degree-(d + 1) vertex v. If there are some vertices in N [v1 ] ∩ N [v2 ] for two degree-(d + 1) vertices v1 and v2 , some information may be useful for us to design a good branching rule. Note that for two adjacent degree-(d + 1) vertices v1 and v2 , there are at least two vertices in the intersection of N [v1 ] and N [v2 ]. Lemma 4 guarantees that each degree-(d+1) vertex has at least two nonadjacent degree-(d + 1) neighbors if a degree-(d + 1) graph has no proper domination. So we will focus on adjacent degree-(d + 1) vertices. We define three relations between two degree-(d + 1) vertices. A pair of adjacent degree-(d + 1) vertices is a good pair if they have at least one and at most d − 2 common neighbors. A pair of adjacent degree-(d + 1) vertices is a close pair if they have exactly d − 1 common neighbors. A pair of nonadjacent degree-(d + 1) vertices is a similar pair if they have the same neighbor set. We have a good branching rule to deal with good pairs. See Step 3 in Section 4. After dealing with all good pairs, for any pair of adjacent degree-(d + 1) vertices, either it is a close pair or the two vertices have no common neighbor. We do not have a simple branching rule with branching factor d + 1 for these two cases. Then we change to consider three adjacent degree-(d + 1) vertices. Let v1 , v2 and v3 be three degree-(d + 1) vertices such that v2 is adjacent to v1 and v3 . We find that the hardest case is that exact one pair of vertices in {v1 , v2 , v3 } is a close or similar pair, for which we still can not get a branching factor ≤ d + 1. We call this case a bad case. If no pair of vertices in {v1 , v2 , v3 } is a close or similar pair, we call {v1 , v2 , v3 } a proper triple of degree-(d + 1) vertices. Our idea is to avoid bad cases and only branch on proper triples. Consider four degree-(d+1) vertices v1 , v2 , v3 and v4 such that there is an edge between vi and vi+1 for i = 1, 2, 3. If at most one pair of vertices in {v1 , v2 , v3 , v4 } is a close or similar pair, then at least one of {v1 , v2 , v3 } and {v2 , v3 , v4 } will be a proper triple. Thus the only left cases are that at least two pairs of vertices in {v1 , v2 , v3 , v4 } are close or similar pairs. Luckily, we find good branching rules to deal with them. When both of {v1 , v2 } and {v2 , v3 } are close pairs, {v1 , v2 , v3 } is called a close triple. See Figure 1(a) for an illustration of close triple. Our algorithm deals with close triples in Step 4 in Section 4. When both of {v1 , v2 } and {v3 , v4 } are close pairs, {v1 , v2 , v3 , v4 } is called a type-I close quadruple. See Figure 1(b) for an illustration of type-I close quadruple. Our algorithm deals with type-I close quadruples in Step 5 in Section 4. When both of {v1 , v3 } and {v2 , v4 } are similar pairs, {v1 , v2 , v3 , v4 } is called a type-II close quadruple. See Figure 1(c) for an illustration of type-II close quadruple. Our algorithm deals with type-II close quadruples in Step 6 in Section 4. When {v1 , v2 , v3 , v4 } has one close pair and one similar pair, we can see that there is always a close triple in it. Therefore, we have considered all possible cases. The last step of our algorithm is then to deal with proper triples. 5 v1 v2 v3 v2 v1 v3 v4 Ă Ă N (v1 ) ˆ N (v2 ) v4 Ă N (v1 ) ˆ N (v2 ) ˆ N (v3 ) (a): Close triple v3 Ă ... v2 v1 N (v3 ) ˆ N (v4 ) (b): Type-I close quadruple (c): Type-II close quadruple Fig. 1. Illustrations of some structures 4 The algorithm and its analysis We are ready to describe the whole algorithm. Our algorithm works for any d ≥ 0 but can only achieve the running time bound of O∗ ((d + 1)k ) for each d ≥ 3. Our algorithm is a recursive algorithm containing seven major steps, each of which will branch on the current instance into several sub-instances and invoke the algorithm itself on each sub-instance. Next, we describe these steps. When we introduce one step, we assume that all pervious steps can not be applied anymore. For the purpose of presentation, we will analyze the correctness and running time of each step after describing it. Step 1 (Vertices of degree ≥ d + 2) If there is a vertex v of degree ≥ d + 2 in the graph, we branch on v into d(v) 1 + d(v)−d branches according to Lemma 1 by either including v or each set of d(v) − d neighbors of v to the solution set. In the branch where v is included to the solution set, we delete v from the graph and decrease the parameter k by 1. In the branch where a set N ′ ⊆ N (V ) of d(v) − d neighbors of v are included to the solution set, we delete N ′ from the graph and decrease the parameter k by d(v) − d. For this operation, we get a recurrence relation   d(v) C(k) ≤ C(k − 1) + · C(k − (d(v) − d)). (1) d(v) − d Let γ denote the branching factor of (1). Lemma 5. If d(v) − d ≥ 2, the branching factor γ of (1) satisfies that √ 1 + 2d2 + 6d + 5 . γ≤ 2 (2) A proof of this lemma can be found the full version of this paper. It is easy to verify that γ ≤ d + 1 for d ≥ 2. After Step 1, the graph has maximum degree d + 1. Step 2 (Proper dominations) If a vertex v of degree d + 1 is dominated by a vertex u (or dominates a neighbor u of it), we branch on v into d(v) branches by including each vertex in 6 N (v) (or N [v] \ {u}) to the solution set. The correctness of this step is based on Lemma 2 and Lemma 3. In each branch, a vertex is included to the solution set and k decreases by 1. Vertex v is of degree d + 1 since the graph has maximum degree at most d + 1 after Step 1. We get a recurrence relation C(k) ≤ d(v) · C(k − 1) = (d + 1) · C(k − 1), the branching factor of which is d + 1. Step 3 (Good pairs of degree-(d + 1) vertices) Recall that a pair of adjacent degree-(d+1) vertices is a good pair if they have at least one and at most d− 2 common neighbors. we use the following branching rule to deal with a good pair {v1 , v2 }. Let N + = (N (v1 ) ∩ N (v2 )) ∪ {v1 , v2 }, N1 = N (v1 ) \ N + and N2 = N (v2 ) \ N + . Assume that v1 and v2 have x common neighbors. Note that for any d-degree deletion set S ′ , if S ′ does not contain any vertex in N + , then S ′ contains at least one vertex in N1 and one vertex in N2 . We branch into |N + | + |N1 ||N2 | = (x + 2) + (d − x)2 branches. In the first |N + | branches each vertex in N + is included to the solution set; and in the last |N1 ||N2 | branches each pair of vertices in N1 and N2 is included to the solution set. In each branch, if z vertices are included to the solution set, then the parameter k in this branch decreases by z. This branching operation gives a recurrence relation C(k) ≤ (x + 2) · C(k − 1) + (d − x)2 · C(k − 2), the branching factor of which is  p 1 2 + x + 5x2 − 8dx + 4d2 + 4x + 4 . 2 It is easy to verify that when 1 ≤ x ≤ d − 2, the branching factor is at most d + 1. Step 4 (Close triples of degree-(d + 1) vertices) Recall that a pair of adjacent degree-(d+1) vertices is a close pair if they have exactly d − 1 common neighbors. The formal definition of close triple is that: the set of three degree-(d + 1) vertices v1 , v2 and v3 is called a close triple if {v1 , v2 } and {v2 , v3 } are two close pairs and v1 and v3 are not adjacent. According to the definition of close triples, we can see that N (v1 ) ∩ N (v2 ) ∩ N (v3 ) = N (v2 ) \ {v1 , v3 }. For a close triple {v1 , v2 , v3 }, we observe the following. Vertex v1 (resp., v3 ) is adjacent to a degree -(d+1) vertex v0 6∈ N [v2 ] (resp., v4 6∈ N [v2 ]) by Lemma 4. Let N2− = N [v2 ] \ {v1 , v3 }. For any d-degree deletion set S ′ , if S ∩ N2− = ∅, then S ′ contains either v1 and a vertex in {v3 , v4 } (since S ′ must contain a vertex in N [v2 ] and a vertex in N [v3 ]) or v3 and a vertex in {v0 , v1 } (since S ′ must contain a vertex in N [v2 ] and a vertex in N [v1 ]). Then we can branch by either including each vertex in N2− to the solution set or including each of {v1 , v3 }, {v1 , v4 } and {v0 , v3 } to the solution set. This branching operation gives a recurrence relation C(k) ≤ (d − 1) · C(k − 1) + 3 · C(k − 2), 7 the branching factor of which is  p 1 d − 1 + d2 − 4d + 13 . 2 It is easy to verify that when d ≥ 2, the branching factor is less than d + 1. Step 5 (Type-I close quadruples of degree-(d + 1) vertices) A set of four degree-(d + 1) vertices {v1 , v2 , v3 , v4 } is called a type-I close quadruple if {v1 , v2 , v3 , v4 } induces a cycle or a path of 4 vertices, and {v1 , v2 } and − − {v3 , v4 } are two close pairs. Let N12 = N (v1 ) ∩ N (v2 ) and N34 = N (v3 ) ∩ N (v4 ). When the graph has no proper dominations, good pairs or close triples, it holds − − that N12 ∩ N34 = ∅. ′ Let S be an arbitrary d-degree deletion set. Our branching rule for type-I close quadruples is different for the cases whether {v1 , v2 , v3 , v4 } induces a cycle or a path. Case 1. {v1 , v2 , v3 , v4 } induces a cycle of 4 vertices: We consider the following different subcases. − − Case 1.1. S ′ ∩ {v1 , v2 , v3 , v4 } = ∅: Then S ′ ∩ N12 6= ∅ and S ′ ∩ N34 6= ∅. For − − this case, we included each pair of vertices in N12 and N34 to the solution set to − − create |N12 ||N34 | = (d − 1)2 branches, each of which decreases k by 2. Case 1.2. S ′ ∩ {v1 , v2 , v3 , v4 } = {v1 } or S ′ ∩ {v1 , v2 , v3 , v4 } = {v2 }: Then − ′ S ∩ N34 6= ∅, otherwise no vertex in N [v3 ] or N [v4 ] would be in S ′ and then ′ S would not be a d-degree deletion set. Furthermore, if S ′ ∩ {v1 , v2 , v3 , v4 } = {v2 }, then S ′ \ {v2 } ∪ {v1 } is still a d-degree deletion set of the same size, since − − N [v2 ] \ N [v1 ] = {v3 }, v3 is adjacent to all vertices in N34 and S ′ ∩ N34 6= ∅. So − for this case, we include {v1 , x} to the solution set for each x ∈ N34 to create − |N34 | = d − 1 branches, each of which decreases k by 2. Case 1.3. S ′ ∩ {v1 , v2 , v3 , v4 } = {v3 } or S ′ ∩ {v1 , v2 , v3 , v4 } = {v4 }: Then − S ′ ∩ N12 6= ∅. For the same reason, we include {v3 , x} to the solution set for each − − x ∈ N12 to create |N12 | = d − 1 branches, each of which decreases k by 2. ′ Case 1.4. |S ∩ {v1 , v2 , v3 , v4 }| ≥ 2: Then S ′ \ {v1 , v2 , v3 , v4 } ∪ {v1 , v3 } is a ddegree deletion set of size not greater than that of S ′ , since N [{v1 , v2 , v3 , v4 }] ⊆ N [{v1 , v3 }]. For this case, we can simply include {v1 , v3 } to the solution set. The branching operation gives a recurrence relation 2 C(k) ≤ (d − 1) · C(k − 2) + (d − 1) · C(k − 2) + (d − 1) · C(k − 2) + C(k − 2) (3) = d2 · C(k − 2), the branching factor of which is d < d + 1. Case 2. {v1 , v2 , v3 , v4 } induces a path of 4 vertices: Let {v0 } = N (v1 ) \ N [v2 ] and {v5 } = N (v4 ) \ N [v3 ], where it is possible that v0 = v5 . We observe the following different cases. − − Case 2.1. S ′ does not contain any vertex in N12 ∪ N34 : Then S ′ contains at least one vertex in {v0 , v1 , v2 } and at least one vertex in {v3 , v4 , v5 }, since S ′ must contain at least one vertex in N [v1 ] and at least one vertex in N [v4 ]. If |S ′ ∩ {v1 , v2 , v3 , v4 }| ≥ 2, then S ′′ = S ′ \ {v1 , v2 , v3 , v4 } ∪ {v1 , v4 } is still a d-degree deletion set with |S ′′ | ≤ |S ′ |, since N [{v1 , v2 , v3 , v4 }] ⊆ N [{v1 , v4 }]. 8 Otherwise, it holds either S ′ ∩ {v0 , v1 , v2 } = {v0 } or S ′ ∩ {v3 , v4 , v5 } = {v5 }. If S ′ ∩ {v0 , v1 , v2 } = {v0 }, then v3 ∈ S ′ since S ′ must contain at least one vertex in N [v2 ]. If S ′ ∩ {v3 , v4 , v5 } = {v5 }, then v2 ∈ S ′ since S ′ must contain at least one vertex in N [v3 ]. So for this case, we conclude that there is a solution contains one of {v1 , v4 }, {v0 , v3 } and {v2 , v5 }. In our algorithm, we generate three branches by including each of {v1 , v4 }, {v0 , v3 } and {v2 , v5 } to the solution set. In each of the three branches, the parameter k decreases by 2. − Case 2.2. S ′ does not contain any vertex in N12 but contain some vertex − ′ ′ in N34 : Since S ∩ N [v1 ] 6= ∅, we know that S contains at least one vertex in {v0 , v1 , v2 }. If v2 ∈ S ′ , then S ′′ = S ′ \ {v2 } ∪ {v1 } is still a d-degree deletion set. The reason relies on that N [v2 ] \ N [v1 ] = {v3 }, v3 is adjacent to each − − vertex in N34 , and S ′′ contains at least one vertex in N34 . So for this case, there is a solution contains one vertex in {v0 , v1 }. In our algorithm, we create − 2|N34 | = 2(d − 1) branches by including to the solution each pair of vertices x − and y such that x ∈ {v0 , v1 } and y ∈ N34 . In each of the 2(d − 1) branches, the parameter k decreases by 2. − Case 2.3. S ′ does not contain any vertex in N34 but contain some vertex in − N12 : For the same reason in Case 2.2, there is a solution contains one vertex in − {v4 , v5 }. In our algorithm, we create 2|N12 | = 2(d − 1) branches by including to − the solution each pair of vertices x and y such that x ∈ {v4 , v5 } and y ∈ N12 . In each of the 2(d − 1) branches, the parameter k decreases by 2. − − Case 2.4. S ′ contains some vertex in N12 and some vertex in N34 : For this − − 2 case, Our algorithm simply generates |N12 ||N34 | = (d−1) branches by including − − to the solution each pair of vertices x and y such that x ∈ N12 and y ∈ N34 . In 2 each of the (d − 1) branches, the parameter k decreases by 2. The above branching operation gives a recurrence relation 2 C(k) ≤ 3C(k − 2) + 2(d − 1) · C(k − 2) + 2(d − 1) · C(k − 2) + (d − 1) · C(k − 2) = d(d + 2) · C(k − 2), p the branching factor of which is d(d + 2) < d + 1. Step 6 (Type-II close quadruples of degree-(d + 1) vertices) Two nonadjacent degree-(d + 1) vertices are similar if they have the same neighbor set. A set of four degree-(d + 1) vertices {v1 , v2 , v3 , v4 } is called a typeII close quadruple if {v1 , v3 } and {v2 , v4 } are two similar pairs and there is an edge between vi and vi+1 for i = 1, 2, 3. Note that there must be an edge between v1 and v4 since {v1 , v3 } is a similar pair. So as a type-II close quadruple, {v1 , v2 , v3 , v4 } always induces a cycle of 4 vertices. − Let {v1 , v2 , v3 , v4 } be a type-II close quadruple. We use N13 to denote N (v1 )\ − − − {v2 , v4 } and N24 to denote N (v2 ) \ {v1 , v3 }. Note that it holds N13 ∩ N24 = ∅, ′ if we assume that there is no good pairs or close triples. Let S be a d-degree deletion set. We consider the following different subcases. − − Case 1. S ′ ∩ {v1 , v2 , v3 , v4 } = ∅: Then S ′ ∩ N13 6= ∅ and S ′ ∩ N24 6= ∅. For − − this case, we included each pair of vertices in N13 and N24 to the solution set to − − create |N13 ||N24 | = (d − 1)2 branches, each of which decreases k by 2. 9 Case 2. S ′ ∩ {v1 , v2 , v3 , v4 } = {v1 } or S ′ ∩ {v1 , v2 , v3 , v4 } = {v3 }: Then − S ∩ N13 6= ∅, otherwise S ′ would not be a d-degree deletion set since no vertex in N [v3 ] or N [v1 ] is in S ′ . Furthermore, if S ′ ∩ {v1 , v2 , v3 , v4 } = {v3 }, then S ′ \ {v3 } ∪ {v1 } is still a d-degree deletion set of the same size. So for this case, − − we include {v1 , x} to the solution set for each x ∈ N13 to create |N13 | = d−1 branches, each of which decreases k by 2. Case 3. S ′ ∩ {v1 , v2 , v3 , v4 } = {v2 } or S ′ ∩ {v1 , v2 , v3 , v4 } = {v4 }: Then − ′ S ∩ N24 6= ∅. For the same reason, we include {v2 , x} to the solution set for each − − x ∈ N24 to create |N24 | = d − 1 branches, each of which decreases k by 2. ′ Case 4. |S ∩ {v1 , v2 , v3 , v4 }| ≥ 2: Then S ′ \ {v1 , v2 , v3 , v4 } ∪ {v1 , v2 } is a d-degree deletion set of size not greater than S ′ , since N [{v1 , v2 , v3 , v4 }] ⊆ N [{v1 , v2 }]. For this case, we can simply include {v1 , v2 } to the solution set. The branching operation gives a recurrence relation ′ 2 C(k) ≤ (d − 1) · C(k − 2) + (d − 1) · C(k − 2) + (d − 1) · C(k − 2) + C(k − 2) = d2 · C(k − 2), the branching factor of which is d < d + 1. Step 7 (Proper triples of degree-(d + 1) vertices) A set of three degree-(d + 1) vertices {v1 , v2 , v3 } is called a proper triple if {v1 , v2 , v3 } induces a path and no pair of vertices in {v1 , v2 , v3 } is close or similar. Lemma 6. Let G be a graph of maximum degree d + 1 for any integer d > 0. If G has no proper dominations, good pairs, close triples, type-I close quadruples or type-II close quadruples, then G has some proper triples. A proof of this lemma can be found in the full version. For a proper triple {v1 , v2 , v3 } in a graph having none of dominated vertices, good pairs, close triples, type-I close quadruples and type-II close quadruples, we have the following properties: N (v1 ) ∩ N (v2 ) = ∅, N (v2 ) ∩ N (v3 ) = ∅ and 1 ≤ |N (v1 ) ∩ N (v3 )| ≤ d. − Let N13 = N (v1 ) ∩ N (v3 ) \ {v2 }, N1− = N (v1 ) \ N (v3 ), N3− = N (v3 ) \ N (v1 ), − − N2 = N (v2 ) \ {v1 , v3 } and x = |N13 |. Since {v1 , v3 } is not a similar pair, we ′ know that 0 ≤ x ≤ d − 1. Let S be a d-deletion set. To design our branching rule, we consider the following different cases. Case 1. v2 ∈ S ′ : We simply include v2 to the solution set and the parameter k decreases by 1. For all the remaining cases, we assume that v2 6∈ S ′ . Case 2. v2 6∈ S ′ and v1 , v3 ∈ S ′ : We simply include v1 and v3 to the solution set and the parameter k decreases by 2. Case 3. v1 , v2 6∈ S ′ and v3 ∈ S ′ : For the case, S ′ ∩ (N (v1 ) \ {v2 } = 6 ∅. We create |N (v1 )\{v2 }| = d branches by including v3 and each vertex in N (v1 )\{v2} to the solution set and the parameter k in each branch decreases by 2. Case 4. v2 , v3 6∈ S ′ and v1 ∈ S ′ : For the case, S ′ ∩ (N (v3 ) \ {v2 } = 6 ∅. We create |N (v3 )\{v2 }| = d branches by including v1 and each vertex in N (v3 )\{v2} to the solution set and the parameter k in each branch decreases by 2. 10 Case 5. v1 , v2 , v3 6∈ S ′ : Then S ′ must contains (i) a vertex in N2− and − (ii) either a vertex in N13 or two vertices from N1− and N3− respectively. Our − − algorithm generates |N2 ||N13 | + |N2− |||N1− ||N3− | = (d − 1)x + (d − 1)(d − x)2 branches. Each of the first (d − 1)x branches includes a vertex in N2− and a − vertex in N13 to the solution set and the parameter k decreases by 2. The last (d − 1)(d − x)2 branches are generated by including each triple {w1 ∈ N2− , w2 ∈ N1− , w3 ∈ N3− } to the solution set, where the parameter k decreases by 3. The above branching operation gives a recurrence relation C(k) ≤ C(k − 1) + C(k − 2) + d · C(k − 2) + d · C(k − 2)+ (d − 1)x · C(k − 2) + (d − 1)(d − x)2 · C(k − 3) (4) = C(k − 1) + ((2d + 1) + (d − 1)x) · C(k − 2) + (d − 1)(d − x)2 · C(k − 3), where 0 ≤ x ≤ d − 1. Lemma 7. When d ≥ 3, the branching factor of (4) is at most d + 1 for each 0 ≤ x ≤ d − 1. A proof of this lemma can be found in the full version. 4.1 The results Lemma 6 guarantees that when the graph has a vertex of degree ≥ d + 1, one of the above seven steps can be applied. When d ≥ 3, the branching factor in each of the seven steps is at most d + 1. Thus, Theorem 1. The d-bounded-degree vertex deletion problem for each d ≥ 3 can be solved in O∗ ((d + 1)k ) time. Note that all the seven steps of our algorithm work for d = 2. In the first six steps, we still can get branching factors at most d + 1 for d = 2. In Step 7, when d = 2 and x = d − 1 = 1, (4) becomes C(k) ≤ C(k − 1) + 6C(k − 2) + C(k − 3), which has a branching factor of 3.0645. This is the biggest branching factor in the algorithm. Then Theorem 2. The co-path/cycle problem can be solved in O∗ (3.0645k ) time. Note that previously the co-path/cycle problem could only be solved deterministically in O∗ (3.24k ) time [4]. 5 Concluding remarks In this paper, by studying the structural properties of graphs, we show that the d-bounded-degree vertex deletion problem can be solved in O∗ ((d + 1)k ) time for each d ≥ 3. Our algorithm is the first nontrivial parameterized algorithm for the d-bounded-degree vertex deletion problem with d ≥ 3. 11 Our problem is a special case of the (d + 2)-hitting set problem. It is still left as an open problem that whether the d′ -hitting set problem can be solved in O∗ ((d′ − 1)k ) time. Our result is a step toward to this interesting open problem. However, our method can not be extended to the d′ -hitting set problem directly, since some good graph structural properties do not hold in the general d′ -hitting set problem. References 1. B. Balasundaram, S. Butenko, I.V. Hicks: Clique relaxations in social network analysis: The maximum k-plex problem. Operations Research 59(1) (2011) 133– 142. 2. N. Betzler, R. Bredereck, R. Niedermeier, J. Uhlmann: On bounded-degree vertex deletion parameterized by treewidth, Discrete Applied Mathematics 160(1-2) (2012) 53–60. 3. J. Chen, I.A. Kanj, G. Xia: Improved upper bounds for vertex cover, Theoretical Computer Science 411 (2010) 3736–3756. 4. Z.-Z. Chen, M. Fellows, B. Fu, H. Jiang, Y. Liu, L. Wang, B. Zhu: A linear kernel for co-path/cycle packing, in: Proceedings of the 6th International Conference on Algorithmic Aspects in Information and Management (AAIM 10), LNCS 6124, Springer, (2010) 90–102. 5. M. R. Fellows, J. Guo, H. Moser, and R. Niedermeier: A generalization of Nemhauser and Trotter’s local optimization theorem. Journal of Computer and System Sciences 77(2011) 1141–1158. 6. Q. Feng, J. Wang, S. Li, J. Chen: Randomized parameterized algorithms for P2 Packing and Co-Path Packing problems. J. Comb. Optim. 29(1) (2015) 125–140. 7. H. Fernau: A top-down approach to search-trees: Improved algorithmics for 3Hitting Set, Algorithmica 57 (2010) 97–118. 8. H. Fernau: Parameterized algorithms for d-HITTING SET: The weighted case, Theor. Comput. Sci. 411(16–18) (2010) 1698–1713. 9. H. Fernau: Parameterized algorithmics for d-Hitting Set, International Journal of Computer Mathematics 87(14) (2010) 3157–3174. 10. F. V. Fomin and D. Kratsch: Exact Exponential Algorithms, Springer (2010) 11. J.Katrenič: A faster FPT algorithm for 3-path vertex cover. Information Processing Letters. 116(4): 273–278(2016) 12. I. Newnan and C. Sohler: Every proerty of hyperfinite graphs is testable, SIAM Journal on Computing 42(3) (2013) 1095–1112. 13. R. Niedermeier and P. Rossmanith: An efficient fixed-parameter algorithm for 3Hitting Set, J. Discrete Algorithms 1 (2003) 89–102. 14. S. B. Seidman and B. L. Foster: A graph-theoretic generalization of the clique concept. Journal of Mathematical Sociology 6 (1978) 139–154. 15. J. Tu: A fixed-parameter algorithm for the vertex cover P3 problem, Information Processing Letters 115 (2015) 96–99. 16. B. Wu: A Measure and Conquer Approach for the Parameterized Bounded DegreeOne Vertex Deletion, In: COCOON 2015, LNCS 9198, (2015) 469–480. 17. M. Xiao: On a generalization of Nemhauser and Trotter’s local optimization theorem. In: ISAAC 2015, LNCS 9472, (2015) 442–452. 12
8cs.DS
Efficient Structured Matrix Rank Minimization arXiv:1509.02447v1 [cs.SY] 8 Sep 2015 Adams Wei Yu† , Wanli Ma† , Yaoliang Yu† , Jaime G. Carbonell† , Suvrit Sra‡ School of Computer Science, Carnegie Mellon University† Massachusetts Institute of Technology‡ {weiyu, mawanli, yaoliang, jgc}@cs.cmu.edu, [email protected] September 9, 2015 Abstract We study the problem of finding structured low-rank matrices using nuclear norm regularization where the structure is encoded by a linear map. In contrast to most known approaches for linearly structured rank minimization, we do not (a) use the full SVD; nor (b) resort to augmented Lagrangian techniques; nor (c) solve linear systems per iteration. Instead, we formulate the problem differently so that it is amenable to a generalized conditional gradient method, which results in a practical improvement with low per iteration computational cost. Numerical results show that our approach significantly outperforms state-of-the-art competitors in terms of running time, while effectively recovering low rank solutions in stochastic system realization and spectral compressed sensing problems. 1 Introduction Many practical tasks involve finding models that are both simple and capable of explaining noisy observations. The model complexity is sometimes encoded by the rank of a parameter matrix, whereas physical and system level constraints could be encoded by a specific matrix structure. Thus, rank minimization subject to structural constraints has become important to many applications in machine learning, control theory, and signal processing [10, 22]. Applications include collaborative filtering [23], system identification and realization [19, 21], multi-task learning [28], among others. The focus of this paper is on problems where in addition to being low-rank, the parameter matrix must satisfy additional linear structure. Typically, this structure involves Hankel, Toeplitz, Sylvester, Hessenberg or circulant matrices [4, 11, 19]. The linear structure describes interdependencies between the entries of the estimated matrix and helps substantially reduce the degrees of freedom. As a concrete example consider a linear time-invariant (LTI) system where we are estimating the parameters of an autoregressive moving-average (ARMA) model. The order of this LTI system, i.e., the dimension of the latent state space, is equal to the rank of a Hankel matrix constructed by the process covariance [20]. A system of lower order, which is easier to design and analyze, is usually more desirable. The problem of minimum order system approximation is essentially a structured matrix rank minimization problem. There are several other applications where such linear structure is of great importance—see e.g., [11] and references therein. Furthermore, since (enhanced) structured matrix completion also falls into the category of rank minimization problems, 1 the results in our paper can as well be applied to specific problems in spectral compressed sensing [6], natural language processing [1], computer vision [8] and medical imaging [24]. Formally, we study the following (block) structured rank minimization problem: miny 1 2 kA(y) − bk2F + µ · rank(Qm,n,j,k (y)). (1) Here, y = (y1 , ..., yj+k−1 ) is an m × n(j + k − 1) matrix with yt ∈ Rm×n for t = 1, ..., j + k − 1, A : Rm×n(j+k−1) → Rp is a linear map, b ∈ Rp , Qm,n,j,k (y) ∈ Rmj×nk is a structured matrix whose elements are linear functions of yt ’s, and µ > 0 controls the regularization. Throughout this paper, we will use M = mj and N = nk to denote the number of rows and columns of Qm,n,j,k (y). Problem (1) is in general NP-hard [21] due to the presence of the rank function. A popular approach to address this issue is to use the nuclear norm k · k∗ , i.e., the sum of singular values, as a convex surrogate for matrix rank [22]. Doing so turns (1) into a convex optimization problem: miny 21 kA(y) − bk2F + µ · kQm,n,j,k (y)k∗ . (2) Such a relaxation has been combined with various convex optimization procedures in previous work, e.g., interior-point approaches [17, 18] and first-order alternating direction method of multipliers (ADMM) approaches [11]. However, such algorithms are computationally expensive. The cost per iteration of an interior-point method is no less than O(M 2 N 2 ), and that of typical proximal and ADMM style first-order methods in [11] is O(min(N 2 M, N M 2 )); this high cost arises from each iteration requiring a full Singular Value Decomposition (SVD). The heavy computational cost of these methods prevents them from scaling to large problems. Contributions. In view of the efficiency and scalability limitations of current algorithms, the key contributions of our paper are as follows. • We formulate the structured rank minimization problem differently, so that we still find low- rank solutions consistent with the observations, but substantially more scalably. • We customize the generalized conditional gradient (GCG) approach of Zhang et al. [27] to our new formulation. Compared with previous first-order methods, the cost per iteration is O(M N ) (linear in the data size), which is substantially lower than methods that require full SVDs.  • Our approach maintains a convergence rate of O 1 and thus achieves an overall complexity of  O MN , which is by far the lowest in terms of the dependence of M or N for general structured rank minimization problems. It also empirically proves to be a state-of-the-art method for (but clearly not limited to) stochastic system realization and spectral compressed sensing. We note that following a GCG scheme has another practical benefit: the rank of the intermediate solutions starts from a small value and then gradually increases, while the starting solutions obtained from existing first-order methods are always of high rank. Therefore, GCG is likely to find a low-rank solution faster, especially for large size problems. Related work. Liu and Vandenberghe [17] adopt an interior-point method on a reformulation of (2), where the nuclear norm is represented via a semidefinite program. The cost of each iteration in [17] is no less than O(M 2 N 2 ). Ishteva et al. [15] propose a local optimization method to solve the weighted structured rank minimization problem, which still has complexity as high as O(N 3 M r2 ) per iteration, where r is the rank. This high computational cost prevents [17] and [15] from handling large-scale problems. In another recent work, Fazel et al. [11] propose a framework to solve (2). 2 They derive several primal and dual reformulations for the problem, and propose corresponding first-order methods such as ADMM, proximal-point, and accelerated projected gradient. However, each iteration of these algorithms involves a full SVD of complexity O(min(M 2 N, N 2 M )), making it hard to scale them to large problems. Signoretto et al. [25] reformulate the problem to avoid full SVDs by solving an equivalent nonconvex optimization problem via ADMM. However, their method requires subroutines to solve linear equations per iteration, which can be time-consuming for large problems. Besides, there is no guarantee that their method will converge to the global optimum. The conditional gradient (CG) (a.k.a. Frank-Wolfe) method was proposed by Frank and Wolfe [12] to solve constrained problems. At each iteration, it first solves a subproblem that minimizes a linearized objective over a compact constraint set and then moves toward the minimizer of the cost function. CG is efficient as long as the linearized subproblem is easy to solve. Due to its simplicity and scalability, CG has recently witnessed a great surge of interest in the machine learning and optimization community [16]. In another recent strand of work, CG was extended to certain regularized (non-smooth) problems as well [3, 13, 27]. In the following, we will show how a generalized CG method can be adapted to solve the structured matrix rank minimization problem. 2 Problem Formulation and Approach In this section we reformulate the structured rank minimization problem in a way that enables us to apply the generalized conditional gradient method, which we subsequently show to be much more efficient than existing approaches, both theoretically and experimentally. Our starting point is that in most applications, we are interested in finding a “simple” model that is consistent with the observations, but the problem formulation itself, such as (2), is only an intermediate means, hence it need not be fixed. In fact, when formulating our problem we can and we should take the computational concerns into account. We will demonstrate this point first. 2.1 Problem Reformulation The major computational difficulty in problem (2) comes from the linear transformation Qm,n,j,k (·) inside the trace norm regularizer. To begin with, we introduce a new matrix variable X ∈ Rmj×nk and remove the linear transformation by introducing the following linear constraint Qm,n,j,k (y) = X. For later use, we partition the matrix X into the block form   x11 x12 · · · x1k x21 x22 · · · x2k    m×n for i = 1, ..., j, l = 1, ..., k. X :=  . .. ..  with xil ∈ R .  . . .  xj1 xj2 · · · (3) (4) xjk We denote by x := vec(X) ∈ Rmjk×n the vector obtained by stacking the columns of X blockwise, and by X := mat(x) ∈ Rmj×nk the reverse operation. Since x and X are merely different re-orderings of the same object, we will use them interchangeably to refer to the same object. 3 We observe that any linear (or slightly more generally, affine) structure encoded by the linear transformation Qm,n,j,k (·) translates to linear constraints on the elements of X (such as the subblocks in (4) satisfying say x12 = x21 ), which can be represented as linear equations Bx = 0, with an appropriate matrix B that encodes the structure of Q. Similarly, the linear constraint in (3) that relates y and X, or equivalently x, can also be written as the linear constraint y = Cx for a suitable recovery matrix C. Details on constructing matrix B and C can be found in the appendix. Thus, we reformulate (2) into min x∈Rmjk×n 1 2 kA(Cx) − bk2F + µkXk∗ s.t. Bx = 0. (5) (6) The new formulation (5) is still computationally inconvenient due to the linear constraint (6). We resolve this difficulty by applying the penalty method, i.e., by placing the linear constraint into the objective function after composing with a penalty function such as the squared Frobenius norm: min x∈Rmjk×n 1 2 kA(Cx) − bk2F + λ2 kBxk2F + µkXk∗ . (7) Here λ > 0 is a penalty parameter that controls the inexactness of the linear constraint. In essence, we turn (5) into an unconstrained problem by giving up on satisfying the linear constraint exactly. We argue that this is a worthwhile trade-off for (i) By letting λ ↑ ∞ and following a homotopy scheme the constraint can be satisfied asymptotically; (ii) If exactness of the linear constraint is truly desired, we could always post-process each iterate by projecting to the constraint manifold using Cproj (see appendix); (iii) As we will show shortly, the potential computational gains can be significant, enabling us to solve problems at a scale which is not achievable previously. Therefore, in the sequel we will focus on solving (7). After getting a solution for x, we recover the original variable y through the linear relation y = Cx. As shown in our empirical studies (see Section 3), the resulting solution Qm,n,j,k (y) indeed enjoys the desirable low-rank property even with a moderate penalty parameter λ. We next present an efficient algorithm for solving (7). 2.2 The Generalized Conditional Gradient Algorithm Observing that the first two terms in (7) are both continuously differentiable, we absorb them into a common term f and rewrite (7) in the more familiar compact form: min X∈Rmj×nk φ(X) := f (X) + µkXk∗ , (8) which readily fits into the framework of the generalized conditional gradient (GCG) [3, 13, 27]. In short, at each iteration GCG successively linearizes the smooth function f , finds a descent direction by solving the (convex) subproblem Zk ∈ arg min hZ, ∇f (Xk−1 )i, kZk∗ ≤1 (9) and then takes the convex combination Xk = (1 − ηk )Xk−1 + ηk (αk Zk ) with a suitable step size ηk and scaling factor αk . Clearly, the efficiency of GCG heavily hinges on the efficacy of solving the subproblem (9). In our case, the minimal objective is simply the matrix spectral norm of −∇f (Xk ) 4 and the minimizer can be chosen as the outer product of the top singular vector pair. Both can be computed essentially in linear time O(M N ) using the Lanczos algorithm [7]. To further accelerate the algorithm, we adopt the local search idea in [27], which is based on the variational form of the trace norm [26]: kXk∗ = 1 2 min{kU k2F + kV k2F : X = U V }. (10) The crucial observation is that (10) is separable and smooth in the factor matrices U and V , although not jointly convex. We alternate between the GCG algorithm and the following nonconvex auxiliary problem, trying to get the best of both ends: min ψ(U, V ), where U,V ψ(U, V ) = f (U V ) + µ2 (kU k2F + kV k2F ). (11) Since our smooth function f is quadratic, it is easy to carry out a line search strategy for finding an appropriate αk in the convex combination Xk+1 = (1 − ηk )Xk + ηk (αk Zk ) =: (1 − ηk )Xk + θk Zk , where θk = arg min hk (θ) (12) θ≥0 is the minimizer of the function (on θ ≥ 0) hk (θ) := f ((1 − ηk )Xk + θZk ) + µ(1 − ηk )kXk k∗ + µθ. (13) In fact, hk (θ) upper bounds the objective function φ at (1 − ηk )Xk + θZk . Indeed, using convexity, φ((1 − ηk )Xk + θZk ) = f ((1 − ηk )Xk + θZk ) + µk(1 − ηk )Xk + θZk k∗ ≤ f ((1 − ηk )Xk + θZk ) + µ(1 − ηk )kXk k∗ + µθkZk k∗ ≤ f ((1 − ηk )Xk + θZk ) + µ(1 − ηk )kXk k∗ + µθ (as kZk k∗ ≤ 1) = hk (θ). The reason to use the upper bound hk (θ), instead of the true objective φ((1 − ηk )Xk + θZk ), is to avoid evaluating the trace norm, which can be quite expensive. More generally, if f is not quadratic, we can use the quadratic upper bound suggested by the Taylor expansion. It is clear that θk in (12) can be computed in closed-form. We summarize our procedure in Algorithm 1. Importantly, we note that the algorithm explicitly maintains a low-rank factorization X = U V throughout the iteration. In fact, we never need the product X, which is a crucial step in reducing the memory footage for large applications. The maintained low-rank factorization also allows us to more efficiently evaluate the gradient and its spectral norm, by carefully arranging the multiplication order. Finally, we remark that we need not wait until the auxiliary problem (11) is fully solved; we can abort this local procedure whenever the gained improvement does not match the devoted computation. For the convergence guarantee we establish in Theorem 1 below, only the descent property ψ(Uk Vk ) ≤ ψ(Uk−1 Vk−1 ) is needed. This requirement can be easily achieved by evaluating ψ, which, unlike the original objective φ, is computationally cheap. 2.3 Convergence analysis Having presented the generalized conditional gradient algorithm for our structured rank minimization problem, we now analyze its convergence property. We need the following standard assumption. 5 Algorithm 1 Generalized Conditional Gradient for Structured Matrix Rank Minimization 1: Initialize U0 , V0 ; 2: for k = 1, 2, ... do 3: (uk , vk ) ← top singular vector pair of − ∇f (Uk−1 Vk−1 ); 4: set ηk ← 2/(k + 1), and√θk by (13); √ √ √ 5: Uinit ← ( 1 − ηk Uk−1 , θk uk ); Vinit ← ( 1 − ηk Vk−1 , θk vk ); 6: (Uk , Vk ) ← arg min ψ(U, V ) using initializer (Uinit , Vinit ); 7: end for Assumption 1 There exists some norm k · k and some constant L > 0, such that for all A, B ∈ RN ×M and η ∈ (0, 1), we have f ((1 − η)A + ηB) ≤ f (A) + ηhB − A, ∇f (A)i + Lη 2 2 kB − Ak2 . Most standard loss functions, such as the quadratic loss we use in this paper, satisfy Assumption 1. We are ready to state the convergence property of Algorithm 1 in the following theorem. To make the paper self-contained, we also reproduce the proof in the appendix. Theorem 1 Let Assumption 1 hold, X be arbitrary, and Xk be the k-th iterate of Algorithm 1 applied on the problem (7), then we have φ(Xk ) − φ(X) ≤ 2C , k+1 (14) where C is some problem dependent absolute constant. Thus for any given accuracy  > 0, Algorithm 1 will output an -approximate (in the sense of function value) solution in at most O(1/) steps. 2.4 Comparison with existing approaches We briefly compare the efficiency of Algorithm 1 with the state-of-the-art approaches; more thorough experimental comparisons will be conducted in Section 3 below. The per-step complexity of our algorithm is dominated by the subproblem (9) which requires only the leading singular vector pair of the gradient. Using the Lanczos algorithm this costs O(M N ) arithmetic operations [16], which is significantly cheaper than the O(min(M 2 N, N 2 M )) complexity of [11] (due to their need of full SVD). Other approaches such as [25] and [17] are even more costly. 3 Experiments In this section, we present empirical results using our algorithms. Without loss of generality, we focus on two concrete structured rank minimization problems: (i) stochastic system realization (SSR); and (ii) 2-D spectral compressed sensing (SCS). Both problems involve minimizing the rank of two different structured matrices. For SSR, we compare different first-order methods to show the speedups offered by our algorithm. In the SCS problem, we show that our formulation can be generalized to more complicated linear structures and effectively recover unobserved signals. 6 3.1 Stochastic System Realization Model. The SSR problem aims to find a minimal order autoregressive moving-average (ARMA) model, given the observation of noisy system output [11]. As a discrete linear time-invariant (LTI) system, an AMRA process can be represented by the following state-space model st+1 = Dst + Eut , zt = F st + ut , t = 1, 2, ..., T, (15) where st ∈ Rr is the hidden state variable, ut ∈ Rn is driving white noise with covariance matrix G, and zt ∈ Rn is the system output that is observable at time t. It has been shown in [20] that the system order r equals the rank of the block-Hankel matrix (see appendix for definition) constructed T ), provided that the number of blocks per column, j, by the exact process covariance yi = E(zt zt+i is larger than the actual system order. Determining the rank r is the key to the whole problem, after which, the parameters D, E, F, G can be computed easily [17, 20]. Therefore, finding a low order system is equivalent to minimizing the rank of the Hankel matrix above, while remaining consistent with the observations. Setup. The meaning of the following parameters can be seen in the text after E.q. (1). We follow the experimental setup of [11]. Here, m = n, p = n×n(j +k−1), while v = (v1 , v2 , ..., vj+k−1 ) P −i denotes the empirical process covariance calculated as vi = T1 Tt=1 zt+i ztT , for 1 ≤ i ≤ k and 0 otherwise. Let w = (w1 , w2 , ..., wj+k−1 ) be the observation matrix, where the wi are all 1’s for 1 ≤ i ≤ k, indicating the whole block of vi is observed, and all 0’s otherwise (for unobserved blocks). Finally, A(y) = vec(w ◦ y), b = vec(w ◦ v), Q(y) = Hn,n,j,k (y), where ◦ is the element-wise product and is Hn,n,j,k (·) the Hankel matrix (see Appendix for the corresponding B and C). Data generation. Each entry of the matrices D ∈ Rr×r , E ∈ Rr×n , F ∈ Rn×r is sampled from a Gaussian distribution N (0, 1). Then they are normalized to have unit nuclear norm. The initial state vector s0 is drawn from N (0, Ir ) and the input white noise ut from N (0, In ). The measurement noise is modeled by adding an σξ term to the output zt , so the actual observation is z t = zt + σξ, where each entry of ξ ∈ Rn is a standard Gaussian noise, and σ is the noise level. Throughout this experiment, we set T = 1000, σ = 0.05, the maximum iteration limit as 100, and |φk+1 −φk | the stopping criterion as kxk+1 − xk kF < 10−3 or | min(φ < 10−3 . The initial iterate is a k+1 ,φk )| matrix of all ones. Algorithms. We compare our approach with the state-of-the-art competitors, i.e., the firstorder methods proposed in [11]. Other methods, such as those in [15, 17, 25] suffer heavier computation cost per iteration, and are thus omitted from comparison. Fazel et al. [11] aim to solve either the primal or dual form of problem (2), using primal ADMM (PADMM), a variant of primal ADMM (PADMM2), a variant of dual ADMM (DADMM2), and a dual proximal point algorithm (DPPA). As for solving (7), we implemented generalized conditional gradient (GCG) and its local search variant (GCGLS). We also implemented the accelerated projected gradient with singular value thresholding (APG-SVT) to solve (8) by adopting the FISTA [2] scheme. To fairly compare both lines of methods for different formulations, in each iteration we track their objective values, the squared loss 12 kA(Cx) − bk2F (or 12 kA(y) − bk2F ), and the rank of the Hankel matrix Hm,n,j,k (y). Since square loss measures how well the model fits the observations, and the Hankel matrix rank approximates the system order, comparison of these quantities obtained by different methods is meaningful. Result 1: Efficiency and Scalability. We compare the performance of different methods on two sizes of problems, and the result is shown in Figure 2. The most important observation is, 7 Run Time our approach GCGLS/GCG significantly outperform the remaining competitors in term of running time. It is easy to see from Figure 2(a) and 2(b) that both the objective value and square loss by GCGLS/GCG drop drastically within a few seconds and is at least one order of magnitude faster than the runner-up competitor (DPPA) to reach a stable stage. The rest of baseline methods cannot even approach the minimum values achieved by GCGLS/GCG within the iteration limit. Figure 2(d) and 2(e) show that such advantage is amplified as size increases, which is consistent with the theoretical finding. Then, not surprisingly, we observe that the competitors become even slower if the problem size continues growing. Hence, we only test the scalability of our approach on larger sized problems, with the running time reported in Figure 1. We can see that the running time of GCGLS grows linearly w.r.t. the size M N , again consistent with previous analysis. Result 2: Rank of solution. We also report the rank 5000 of Hn,n,j,k (y) versus the running time in Figure 2(c) and 2(f), GCGLS GCG (8200, 40000) where y = Cx if we solve (2) or y directly comes from the 4000 solution of (7). The rank is computed as the number of sin3000 gular values larger than 10−3 . For the GCGLS/GCG, the iter2000 ate starts from a low rank estimation and then gradually ap(6150, 30000) (4100, 20000) 1000 proaches the true one. However, for other competitors, the (2050, 10000) iterate first jumps to a full rank matrix and the rank of later 0 0 1 2 3 8 iterate drops gradually. Given that the solution is intrinsically Matrix Size (MN) x 10 of low rank, GCGLS/GCG will probably find the desired one more efficiently. In view of this, the working memory of GCGLS Figure 1: Scalability of GCGLS and GCG. The size (M, N ) is labeled out. is usually much smaller than the competitors, as it uses two low rank matrices U, V to represent but never materialize the solution until necessary. 3.2 Spectral Compressed Sensing In this part we apply our formulation and algorithm to another application, spectral compressed sensing (SCS), a technique that has by now been widely used in digital signal processing applications [6, 9, 29]. We show in particular that our reformulation (7) can effectively and rapidly recover partially observed signals. Model. The problem of spectral compressed sensing aims to recover a frequency-sparse signal from a small number of observations. The 2-D signal Y (k, l), 0 < k ≤ n1 , 0 < l ≤ n2 is supposed to be the superposition of r 2-D sinusoids of arbitrary frequencies, i.e. (in the DFT form) Y (k, l) = r X j2π(kf1i +lf2i ) di e i=1 = r X di (ej2πf1i )k (ej2πf2i )l (16) i=1 where di is the amplitudes of the i-th sinusoid and (fxi , fyi ) is its frequency. Inspired by the conventional matrix pencil method [14] for estimating the frequencies of sinusoidal signals or complex sinusoidal (damped) signals, the authors in [6] propose to arrange the observed data into a 2-fold Hankel matrix whose rank is bounded above by r, and formulate the 2-D spectral compressed sensing problem into a rank minimization problem with respect to the 2-fold Hankel structure. This 2-fold structure is a also linear structure, as we explain in the appendix. Given limited observations, this problem can be viewed as a matrix completion problem that recovers a low-rank matrix from partially observed entries while preserving the pre-defined linear structure. The trace norm heuristic for rank (·) is again used here, as it is proved by [5] to 8 5 5 4 10 2 10 GCGLS GCG PADMM PADMM2 DPPA DADMM2 APG−SVT 1 10 10 3 10 2 10 1 −2 10 0 10 2 10 10 Run Time (seconds) 5 GCGLS GCG PADMM PADMM2 DPPA DADMM2 APG−SVT 1 10 −2 10 Run Time (seconds) 10 2 10 1 0 2 10 10 Run Time (seconds) (d) Obj v.s. Time 10 −2 10 1 2 10 10 3 10 10 3 0 10 Run Time (seconds) (c) Rank(y) v.s. Time 4 Square Loss Objective Value 2 1 10 10 −1 10 2 10 5 4 10 0 10 10 10 10 2 10 (b) Sqr loss v.s. Time 10 GCGLS GCG PADMM PADMM2 DPPA DADMM2 APG−SVT 0 −2 10 (a) Obj v.s. Time 3 GCGLS GCG PADMM PADMM2 DPPA DADMM2 APG−SVT Rank of Hankel(y) 3 10 Rank of Hankel(y) 4 10 3 10 Square Loss Objective Value 10 GCGLS GCG PADMM PADMM2 DPPA DADMM2 APG−SVT 2 10 GCGLS GCG PADMM PADMM2 DPPA DADMM2 APG−SVT 1 10 0 0 10 2 10 Run Time (seconds) (e) Sqr loss v.s. Time 10 −2 10 0 10 2 10 Run Time (seconds) (f) Rank(y) v.s. Time Figure 2: Stochastic System Realization problem with j = 21, k = 100, r = 10, µ = 1.5 for formulation (2) and µ = 0.1 for (7). The first row corresponds to the case M = 420, N = 2000, n = m = 20, . The second row corresponds to the case M = 840, N = 4000, n = m = 40. be an exact method for matrix completion provided that the number of observed entries satisfies the corresponding information theoretic bound. Setup. Given a partial observed signal Y with Ω as the observation index set, we adopt the formulation (7) and thus aim to solve the following problem: min X∈RM ×N λ 1 kPΩ (mat(Cx)) − PΩ (Y )k2F + kBxk2F + µkXk∗ 2 2 (17) where x = vec(X), mat(·) is the inverse of the vectorization operator on Y . In this context, as before, A = PΩ , b = PΩ (Y ), where PΩ (Y ) only keeps the entries of Y in the index set Ω and (2) vanishes the others, Q(Y ) = Hk1 ,k2 (Y ) is the two-fold Hankel matrix, and corresponding B and (2) C can be found in the appendix to encode Hk1 ,k2 (Y ) = X . Further, the size of matrix here is M = k1 k2 , N = (n1 − k1 + 1)(n2 − k2 + 1). Algorithm. We apply our generalized conditional gradient method with local search (GCGLS) to solve the spectral compressed sensing problem, using the reformulation discussed above. Following the experiment setup in [6], we generate a ground truth data matrix Y ∈ R101×101 through a superposition of r = 6 2-D sinusoids, randomly reveal 20% of the entries, and add i.i.d Gaussian noise with amplitude signal-to-noise ratio 10. Result. The results on the SCS problem are shown in Figure 3. The generated true 2-D signal Y is shown in Figure 3(a) using the jet colormap. The 20% observed entries of Y are shown in Figure 3(b), where the white entries are unobserved. The signal recovered by our GCGLS algorithm 9 100 100 100 90 90 90 3 80 80 80 2 70 70 70 60 60 60 50 50 50 1 0 40 40 40 −1 30 30 30 −2 20 20 20 10 10 10 10 20 30 40 50 60 70 80 90 100 10 20 30 40 50 60 70 80 90 100 (a) True 2-D Sinosuidal Signal 5 4 3 2 1 0 −1 −2 −3 −4 (b) Observed Entries 5 4 3 2 1 0 −1 −2 −3 −4 True Signal Observations 10 20 30 40 50 60 70 80 90 100 −3 −4 10 20 30 40 50 60 70 80 90 100 (c) Recovered Signal True Signal Recovered 10 20 30 40 50 60 70 80 90 100 (d) Observed Signal on Column 1 (e) Recovered Signal on Column 1 Figure 3: Spectral Compressed Sensing problem with parameters n1 = n2 = 101, r = 6, solved with our GCGLS algorithm using k1 = k2 = 8, µ = 0.1. The 2-D signals in the first row are colored by the jet colormap. The second row shows the 1-D signal extracted from the first column of the data matrix. is shown in Figure 3(c). Comparing with the true signal in Figure 3(a), we can see that the result of our CGCLS algorithm is pretty close to the truth. To demonstrate the result more clearly, we extract a single column as a 1-D signals for further inspection. Figure 3(d) plots the original signal (blue line) as well as the observed ones (red dot), both from the first column of the 2-D signals. In 3(e), the recovered signal is represented by the red dashed dashed curve. It matches the original signal with significantly large portion, showing the success of our method in recovering partially observed 2-D signals from noise. Since the 2-fold structure used in this experiment is more complicated than that in the previous SSR task, this experiment further validates our algorithm on more complicated problems. 4 Conclusion In this paper, we address the structured matrix rank minimization problem. We first formulate the problem differently, so that it is amenable to adapt the Generalized Conditional Gradient Method. By doing so, we are able to achieve the complexity O(M N ) per iteration with a convergence rate  O 1 . Then the overall complexity is by far the lowest compared to state-of-the-art methods for 10 the structured matrix rank minimization problem. Our empirical studies on stochastic system realization and spectral compressed sensing further confirm the efficiency of the algorithm and the effectiveness of our reformulation. References [1] B. Balle and M. Mohri. Spectral learning of general weighted automata via constrained matrix completion. In NIPS, pages 2168–2176, 2012. [2] A. Beck and M. Teboulle. A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM J. Imaging Sciences, 2(1):183–202, 2009. [3] K. Bredies, D. A. Lorenz, and P. Maass. A generalized conditional gradient method and its connection to an iterative shrinkage method. Computational Optimization and Applications, 42(2):173–193, 2009. [4] J. A. Cadzow. Signal enhancement: A composite property mapping algorithm. IEEE Transactions on Acoustics, Speech and Signal Processing, pages 39–62, 1988. [5] E. J. Candès and T. Tao. The power of convex relaxation: near-optimal matrix completion. IEEE Transactions on Information Theory, 56(5):2053–2080, 2010. [6] Y. Chen and Y. Chi. Spectral compressed sensing via structured matrix completion. In ICML, pages 414–422, 2013. [7] J. K. Cullum and R. A. Willoughby. Lanczos Algorithms for Large Symmetric Eigenvalue Computations, Vol. 1. Elsevier, 2002. [8] T. Ding, M. Sznaier, and O. I. Camps. A rank minimization approach to video inpainting. In ICCV, pages 1–8, 2007. [9] M. F. Duarte and R. G. Baraniuk. Spectral compressive sensing. Applied and Computational Harmonic Analysis, 35(1):111–129, 2013. [10] M. Fazel. Matrix rank minimization with applications. PhD thesis, Stanford University, 2002. [11] M. Fazel, T. K. Pong, D. Sun, and P. Tseng. Hankel matrix rank minimization with applications to system identification and realization. SIAM J. Matrix Analysis Applications, 34(3): 946–977, 2013. [12] M. Frank and P. Wolfe. An algorithm for quadratic programming. Naval Research Logistics Quarterly, 3:95–110, 1956. [13] Z. Harchaoui, A. Juditsky, and A. Nemirovski. Conditional gradient algorithms for machine learning. In NIPS Workshop on Optimization for ML., 2012. [14] Y. Hua. Estimating two-dimensional frequencies by matrix enhancement and matrix pencil. IEEE Transactions on Signal Processing, 40(9):2267–2280, 1992. 11 [15] M. Ishteva, K. Usevich, and I. Markovsky. Factorization approach to structured low-rank approximation with applications. SIAM J. Matrix Analysis Applcations, 35(3):1180–1204, 2014. [16] M. Jaggi. Revisiting Frank-Wolfe: Projection-free sparse convex optimization. In ICML, pages 427–435, 2013. [17] Z. Liu and L. Vandenberghe. Semidefinite programming methods for system realization and identification. In CDC, pages 4676–4681, 2009. [18] Z. Liu and L. Vandenberghe. Interior-point method for nuclear norm approximation with application to system identification. SIAM J. Matrix Analysis Applications, 31(3):1235–1256, 2009. [19] Z. Liu, A. Hansson, and L. Vandenberghe. Nuclear norm system identification with missing inputs and outputs. Systems & Control Letters, 62(8):605–612, 2013. [20] J. Mari, P. Stoica, and T. McKelvey. Vector ARMA estimation: a reliable subspace approach. IEEE Transactions on Signal Processing, 48(7):2092–2104, 2000. [21] I. Markovsky. Structured low-rank approximation and its applications. Automatica, 44(4): 891–909, 2008. [22] B. Recht, M. Fazel, and P. A. Parrilo. Guaranteed minimum-rank solutions of linear matrix equations via nuclear norm minimization. SIAM Review, 52(3):471–501, 2010. [23] J. D. M. Rennie and N. Srebro. Fast maximum margin matrix factorization for collaborative prediction. In ICML, pages 713–719, 2005. [24] P. J. Shin, P. E. Larson, M. A. Ohliger, M. Elad, J. M. Pauly, D. B. Vigneron, and M. Lustig. Calibrationless parallel imaging reconstruction based on structured low-rank matrix completion. Magnetic Resonance in Medicine, 2013. [25] M. Signoretto, V. Cevher, and J. A. Suykens. An SVD-free approach to a class of structured low rank matrix optimization problems with application to system identification. Technical report, K.U.Leuven, 2013. 13-44, ESTA-SISTA. [26] N. Srebro, J. D. M. Rennie, and T. Jaakkola. Maximum-margin matrix factorization. In NIPS, 2004. [27] X. Zhang, Y. Yu, and D. Schuurmans. Accelerated training for matrix-norm regularization: A boosting approach. In NIPS, pages 2915–2923, 2012. [28] J. Zhou, J. Chen, and J. Ye. Multi-task learning: theory, algorithms, and applications. SIAM Data Mining Tutorial, 2012. [29] X. Zhu and M. Rabbat. Graph spectral compressed sensing. Technical report, McGill University, Tech. Rep, 2011. 12 Appendix: Efficient Structured Matrix Rank Minimization Proof of Theorem 1 The proof follows the line of that in [27]. Fix the “competitor” X. We first show that φ(Xk ) ≤ (1 − ηk )φ(Xk−1 ) + ηk φ(X) + where Ck := L · kXk∗ Zk − Xk−1 Ck ηk2 , 2 (18) 2 . Indeed, φ(Xk ) = f (Xk ) + µkXk k∗  = min f (1 − ηk )Xk−1 + θZk + µ(1 − ηk )kXk−1 k∗ + µθ θ≥0  ≤ f (1 − ηk )Xk−1 + ηk kXk∗ Zk + µ(1 − ηk )kXk−1 k∗ + µηk kXk∗ [(12)] Ck ηk2 + µ(1 − ηk )kXk−1 k∗ + µηk kXk∗ [Assumption 1] 2 Ck ηk2 = φ(Xk−1 ) + ηk hkXk∗ Zk − Xk−1 , ∇f (Xk−1 )i + − µηk kXk−1 k∗ + µηk kXk∗ 2 Ck ηk2 ≤ min φ(Xk−1 ) + ηk hY − Xk−1 , ∇f (Xk−1 )i + − µηk kXk−1 k∗ + µηk kXk∗ [(9)] 2 Y :kY k∗ ≤kXk∗ ≤ f (Xk−1 ) + ηk hkXk∗ Zk − Xk−1 , ∇f (Xk−1 )i + ≤ min Y :kY k∗ ≤kXk∗ φ(Xk−1 ) + ηk (f (Y ) − f (Xk−1 )) + = (1 − ηk )φ(Xk−1 ) + ηk min Y :kY k∗ ≤kXk∗ = (1 − ηk )φ(Xk−1 ) + ηk φ(X) + Ck ηk2 − µηk kXk−1 k∗ + µηk kXk∗ 2 (f (Y ) + µkXk∗ ) + [convexity of f ] Ck ηk2 2 Ck ηk2 . 2 Note that we only need the local search (line 6 of Algorithm 1) to satisfy the descent property ψ(Uk Vk ) ≤ ψ(Uk−1 Vk−1 ), so that by induction ψ(Uk Vk ) ≤ ψ(U0 V0 ) = C0 for some constant C0 . Thus kXk k = kUk Vk k is uniformly bounded, meaning that the term Ck in (18) can be bounded by a universal constant C 0 (which depends on the competitor X that we fix throughout). Therefore, we have φ(Xk ) ≤ (1 − ηk )φ(Xk−1 ) + ηk φ(X) + C 0 ηk2 , 2 (19) Let C = max(C 0 , φ(X1 ) − φ(X)). Then we show by induction that (14) holds. 1. When k = 1, φ(X1 ) − φ(X) ≤ C, (14) holds. 2. Suppose Theorem 1 holds for the k-th steps, i.e. φ(Xk ) − φ(X) ≤ 13 2C k+1 , we show that it also holds for the (k + 1)-th step. Indeed, by (19) and ηk+1 = 2 k+2 , we have φ(Xk+1 ) − φ(X) ≤ (1 − ηk+1 )(φ(Xk ) − φ(X)) + 2 C 0 ηk+1 2 k 2C 2C · + k + 2 k + 1 (k + 2)2 2C(k 2 + 3k + 1) = (k + 1)(k + 2)2 2C ≤ . k+2 ≤ This concludes the proof of Theorem 1 for all steps k. Linear Structured Matrices and the corresponding Matrix B and C General Linear Matrix Structures In general, linear matrix structures are defined [15] as: Q(y) = Q0 + ny X Qk yk (20) k=1 where Qk ∈ Rm×n , 0 ≤ k ≤ ny and y ∈ Rny is the given data. Let Qk,i (i ≤ mn) be the i’th element in vec(Qk ). We further assume that (1) Q0 = 0, (2) each Qk is a (0,1)-matrix and (3) for ∀i ≤ mn, there exists at most one k such that Qk,i = 1. In other words, each element in the structured matrix Q(y) either equals to one element in y, or is 0. Most of the linear matrix structures, including blockHankel and 2-fold Hankel used in our experiments, as well as Toeplitz, Sylvester and circulant, satisfy this assumption. We claim that for any structure Q : Rny → Rm×n under this assumption, we can construct a “structure preserving matrix” B and a “recovery matrix” C such that for any X ∈ Rm×n Bvec(X) = 0 ⇐⇒ ∃y ∈ Rny , s.t. X = Q(y) and Cvec(X) = y (21) or in other words, Bvec(X) = 0 ⇔ X ∈ image(Q), where image(Q):= {Q(y)|y ∈ Rny }. B can be viewed as the Lagrangian of the structural constraint. The matrix B can be constructed in the following way. Let djk be the position of the jth 1 in vec(Qk ). Let |Qk | be the number of 1’s in Qk . The structure defined above requires for any Pnthat y X ∈ image(Q), each pair of (Xdj , Xdj+1 ) must be equal. Since there are totally T = k=1 (|Qk |−1) k k such pairs, B can be constructed as a T ×mn sparse matrix by only assigning Bt,dj = 1, Bt,dj+1 = −1 k k for the tth pair of Xdj = Xdj+1 constraint. In case we need to enforce some elements of X to be k k zero, we may add more rows to B with only one 1 per row at the position of the focused element. The matrix C can be constructed as a ny × mn sparse matrix by assigning Ck,dj = 1/|Qk | and k leaving other entries 0. Note that this C can be applied to arbitary X ∈ Rm×n as an orthogonal projection onto image(Q), i.e. Q(Cvec(X)) = arg min kX̂ − Xk2F X̂∈image(Q) 14 Thus we call this C the projection matrix Cproj . One may refer to the Appendix of [15] for the proof. C can be also constructed in other ways to satisfy (21), for instance, a sparser C can be constructed by assigning only Ck,d1 = 1 for 1 ≤ k ≤ ny . It’s easy to verify that the sparser one Csp k is also an inverse operator of vec(Q(·)) Example: Hankel Matrix In the following examples, we always use Ik to denote the identity matrix of size k × k and 0k,j to denote a zero matrix of size k × j. For a Hankel matrix of data y ∈ Rj+k−1 parameterized by j and k:   y1 y2 · · · yk y2 y3 · · · yk+1    j×k Hj,k (y) :=  . (22) . ..  ∈ R . . . . .  yj+1 · · · yj yj+k−1 The Hankel structure preserving matrix B ∈ R(j−1)(k−1)×jk (after rearranging the order or rows) is   P N 0 0 ··· 0 0 0 P N 0 · · · 0 0    B=. . (23) .. .. .. .. ..   .. .. . . . . . 0 0 0 ··· 0 P N where P = [0j−1,1 , Ij−1 ], N = [−Ij−1 , 0j−1,1 ], 0 = 0j−1,j . Obviously P, N, 0 ∈ R(j−1)×j . For the recovery matrix C ∈ R(j+k−1)×jk , we show a toy example using parameters j = 2, k = 3. The projection Cproj and the sparser Csp are Cproj    1 0 0 0 0 0 1 0 0.5 0.5 0  0 0 0 ,C =  = 0 0 0 0.5 0.5 0 sp 0 0 0 0 0 0 1 0 Example: Block-Hankel Matrix For the block-Hankel matrix used in the  y1 y2  Hm,n,j,k (y) :=  .  .. yj 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0  0 0  0 1 stochastic system realization experiment  y2 · · · yk y3 · · · yk+1   mj×nk .. ..  ∈ R  . . yj+1 · · · (24) (25) yj+k−1 where each y1 , . . . , yj+k−1 is a m × n data matrix. If we define vec(·) blockwise, we can write the matrix B ∈ Rm(j−1)(k−1)×mjk in the same form as (23) where P = [0m(j−1),m , Im(j−1) ], N = [−Im(j−1) , 0m(j−1),m ], 0 = 0m(j−1),mj , P, N, 0 ∈ Rm(j−1)×mj . The matrix C ∈ Rm(j+k−1)×mjk can be constructed from (24) by replacing each element a with a block aIm . Example: Two-Fold Hankel Matrix 15 (2) For a 2-D data matrix Y ∈ Rn1 ×n2 , the enhanced form Hk1 ,k2 (Y ) with respect to the pencil parameter k1 and k2 is a block-Hankel matrix with k1 × (n1 − k1 + 1) blocks [6]:   Y1 Y2 · · · Yn1 −k1 +1  Y2 Y3 · · · Yn1 −k1 +2    (2) Hk1 ,k2 (Y ) :=  . (26)  . .. .. . .  .  . . . Yk1 Yk1 +1 · · · Yn1 and each block Yl (0 < l ≤ n1 ) is a (micro) Hankel matrix of size k2 × (n2 − k2 + 1)   Yl,1 Yl,2 · · · Yl,n2 −k2 +1  Yl,2 Yl,3 · · · Yl,n2 −k2 +2    Yl := H1,1,k2 ,n2 −k2 +1 (Y (l, :)) =  .  .. .. ..  ..  . . . Yl,k2 Yl,k2 +1 · · · Yl,n2 (27) Here we use H (2) to denote the 2-fold Hankel structure. H (2) has M = k1 k2 rows and N = (n1 − k1 + 1)(n2 − k2 + 1) columns. Here B is a matrix with k1 (k2 − 1)(n2 − k2 )(n1 − k1 + 1) + n2 (k1 − 1)(n1 − k1 ) rows and M N columns:   B1 0 · · · 0  0 B1 · · · 0     .. .. .. ..   . . . .  B :=  (28)   0 0 · · · B1      B2 such that each B1 ∈ Rk1 (k2 −1)(n2 −k2 )×k1 k2 (n2 −k2 +1) preserves the micro Hankel structure of k1 blocks in one “block-wise column” of X and B2 ∈ Rn2 (k1 −1)(n1 −k1 )×M N preserves the global block-Hankel structure. Both B1 and B2 as well as the recovery matrix Cproj are constructed using the steps mentioned above. 16
3cs.SY
arXiv:1711.02159v1 [cs.LG] 6 Nov 2017 Adaptive Bayesian Sampling with Monte Carlo EM Anirban Roychowdhury, Srinivasan Parthasarathy Department of Computer Science and Engineering The Ohio State University [email protected], [email protected] November 8, 2017 Abstract We present a novel technique for learning the mass matrices in samplers obtained from discretized dynamics that preserve some energy function. Existing adaptive samplers use Riemannian preconditioning techniques, where the mass matrices are functions of the parameters being sampled. This leads to significant complexities in the energy reformulations and resultant dynamics, often leading to implicit systems of equations and requiring inversion of high-dimensional matrices in the leapfrog steps. Our approach provides a simpler alternative, by using existing dynamics in the sampling step of a Monte Carlo EM framework, and learning the mass matrices in the M step with a novel online technique. We also propose a way to adaptively set the number of samples gathered in the E step, using sampling error estimates from the leapfrog dynamics. Along with a novel stochastic sampler based on Nosé-Poincaré dynamics, we use this framework with standard Hamiltonian Monte Carlo (HMC) as well as newer stochastic algorithms such as SGHMC and SGNHT, and show strong performance on synthetic and real high-dimensional sampling scenarios; we achieve sampling accuracies comparable to Riemannian samplers while being significantly faster. 1 Introduction Markov Chain Monte Carlo sampling is a well-known set of techniques for learning complex Bayesian probabilistic models that arise in machine learning. Typically used in cases where computing the posterior distributions of parameters in closed form is not feasible, MCMC techniques that converge reliably to the target distributions offer a provably correct way (in an asymptotic sense) to draw samples of target parameters from arbitrarily complex probability distributions. A recently proposed method in this domain is Hamiltonian Monte Carlo (HMC) [1, 2], that formulates the target density as an “energy function” augmented with auxiliary “momentum” parameters, and uses discretized Hamiltonian dynamics to sample the parameters while preserving the energy function. The resulting samplers perform noticeably better than random walk-based 1 methods in terms of sampling efficiency and accuracy [1, 3]. For use in stochastic settings, where one uses random minibatches of the data to calculate the gradients of likelihoods for better scalability, researchers have used Fokker-Planck correction steps to preserve the energy in the face of stochastic noise [4], as well as used auxiliary “thermostat” variables to control the effect of this noise on the momentum terms [5, 6]. As with the batch setting, these methods have exploited energy-preserving dynamics to sample more efficiently than random walk-based stochastic samplers [4, 7, 8]. A primary (hyper-)parameter of interest in these augmented energy function-based samplers in the “mass” matrix of the kinetic energy term; as noted by various researchers [1, 3, 6, 8, 9], this matrix plays an important role in the trajectories taken by the samplers in the parameter space of interest, thereby affecting the overall efficiency. While prior efforts have set this to the identity matrix or some other pre-calculated value [4, 5, 7], recent work has shown that there are significant gains to be had in efficiency as well as convergent accuracy by reformulating the mass in terms of the target parameters to be sampled [3, 6, 8], thereby making the sampler sensitive to the underlying geometry. This is done by imposing a positive definite constraint on the adaptive mass, and using it as the metric of the Riemannian manifold of probability distributions parametrized by the target parameters. This constraint also satisfies the condition that the momenta be sampled from a Gaussian with the mass as the covariance. Often called Riemannian preconditioning, this idea has been applied in both batch [3] as well as stochastic settings [6, 8] to derive HMC-based samplers that adaptively learn the critically important mass matrix from the data. Although robust, these reformulations often lead to significant complexities in the resultant dynamics; one can end up solving an implicit system of equations  in each half-step of the leapfrog dynamics [3, 6], along with inverting large O(D2 ) matrices. This is sometimes sidestepped by performing fixed point updates at the cost of additional error, or restricting oneself to simpler formulations that honor the symmetric positive definite constraint, such as a diagonal matrix [8]. While this latter choice ameliorates a lot of the added complexity, it is clearly suboptimal in the context of adapting to the underlying geometry of the parameter space. Thus we would ideally need a mechanism to robustly learn this critical mass hyperparameter from the data without significantly adding to the computational burden. We address this issue in this work with the Monte Carlo EM (MCEM) [10, 11, 12, 13] framework. An alternative to the venerable EM technique, MCEM is used to locally optimize maximum likelihood problems where the posterior probabilities required in the E step of EM cannot be computed in closed form. In this work, we perform existing dynamics derived from energy functions in the Monte Carlo E step while holding the mass fixed, and use the stored samples of the momentum term to learn the mass in the M step. We address the important issue of selecting appropriate E-step sampling iterations, using error estimates to gradually increase the sample sizes as the Markov chain progresses towards convergence. Combined with an online method to update the mass using sample covariance estimates in the M step, this gives a clean and scalable adaptive sampling algorithm that performs favorably compared to the Riemannian samplers. In both our synthetic experiments and a high dimensional topic modeling problem with a complex Bayesian nonparametric construction [14], our samplers match or beat the Riemannian variants in sampling efficiency and accuracy, while being close 2 to an order of magnitude faster. 2 2.1 Preliminaries MCMC with Energy-Preserving Dynamics In Hamiltonian Monte Carlo, the energy function is written as 1 H(θ, p) = −L(θ) + pT M −1 p. 2 (1) Here X is the observed data, and θ denotes the model parameters. L(θ) = log p(X|θ) + log p(θ) denotes the log likelihood of the data given the parameters along with the Bayesian prior, and p denotes the auxiliary “momentum” mentioned above. Note that the second term in the energy function, the kinetic energy, is simply the kernel of a Gaussian with the mass matrix M acting as covariance. Hamilton’s equations of motions are then applied to this energy function to derive the following differential equations, with the dot accent denoting a time derivative: θ̇ = M −1 p, ṗ = ∇L(θ). These are discretized using the generalized leapfrog algorithm [1, 15] to create a sampler that is both symplectic and time-reversible, upto a discretization error that is quadratic in the stepsize. Machine learning applications typically see the use of very large datasets for which computing the gradients of the likelihoods in every leapfrog step followed by a Metropolis-Hastings correction ratio is prohibitively expensive. To address this, one uses random “minibatches” of the dataset in each iteration [16], allowing some stochastic noise for improved scalability, and removes the Metropolis-Hastings (M-H) correction steps [4, 7]. To preserve the system energy in this context one has to additionally apply Fokker-Planck corrections to the dynamics [17]. The stochastic sampler in [4] uses these techniques to preserve the canonical Gibbs energy above (1). Researchers have also used the notion of “thermostats” from the molecular dynamics literature [9, 18, 19, 20] to further control the behavior of the momentum terms in the face of stochastic noise; the resulting algorithm [5] preserves an energy of its own [21] as well. 2.2 Adaptive MCMC using Riemannian Manifolds As mentioned above, learning the mass matrices in these MCMC systems is an important challenge. Researchers have traditionally used Riemannian manifold refomulations to address this, and integrate the updating of the mass into the sampling steps. In [3] the authors use this approach to derive adaptive variants of first-order Langevin dynamics as well as HMC. For the latter the reformulated energy function can be written as:  1 1 Hgc (θ, p) = −L(θ) + pT G(θ)−1 p + log (2π)D |G(θ)| , 2 2 3 (2) where D is the dimensionality of the parameter space. Note that the momentum variable p can be integrated out to recover the desired marginal density of θ, in spite of the covariance being a function of θ. In the machine learning literature, the authors of [8] used a diagonal G(θ) to produce an adaptive variant of the algorithm in [7], whereas the authors in [6] derived deterministic and stochastic algorithms from a Riemannian variant of the Nosé-Poincaré energy [9], with the resulting adaptive samplers preserving symplecticness as well as canonical system temperature. 2.3 Monte Carlo EM The EM algorithm [22] is widely used to learn maximum likelihood parameter estimates for complex probabilistic models. In cases where the expectations of the likelihoods required in the E step are not tractable, one can use Monte Carlo simulations of the posterior instead. The resulting Monte Carlo EM (MCEM) framework [10] has been widely studied in the statistics literature, with various techniques developed to efficiently draw samples and estimate Monte Carlo errors in the E step [11, 12, 13]. For instance, the expected log-likelihood is usually replaced with the following Monte Carlo approxim P 1 mation: Q(θ|θ t ) = m log p(X, utl |θ), where u represents the latent augmentation l=1 variables used in EM, and m is the number of samples taken in the E step. While applying this framework, one typically has to carefully tune the number of samples gathered in the E step, since the potential distance from the stationary distribution in the early phases would necessitate drawing relatively fewer samples, and progressively more as the sampler nears convergence. In this work we leverage this MCEM framework to learn M in (1) and similar energies using samples of p; the discretized dynamics constitute the E step of the MCEM framework, with suitable updates to M performed in the corresponding M step. We also use a novel mechanism to dynamically adjust the sample count by using sampling errors estimated from the gathered samples, as described next. 3 3.1 Mass-Adaptive Sampling with Monte Carlo EM The Basic Framework Riemannian samplers start off by reformulating the energy function, making the mass a function of θ and adding suitable terms to ensure constancy of the marginal distributions. Our approach is fundamentally different: we cast the task of learning the mass as a maximum likelihood problem over the space of symmetric positive definite matrices. For instance, we can construct the following problem for standard HMC: max M 0 1 1 L(θ) − pT M −1 p − log |M |. 2 2 (3) Recall that the joint likelihood is p(θ, p) ∝ exp(−H(θ, p)), H(·, ·) being the energy from (1). Then, we use correct samplers that preserve the desired densities in the E step of a Monte Carlo EM (MCEM) framework, and use the obtained samples of p in the 4 corresponding M step to perform suitable updates for the mass M . Specifically, to wrap the standard HMC sampler in our framework, we perform the generalized leapfrog steps [1, 15] to obtain proposal updates for θ, p followed by Metropolis-Hastings corrections in the E step, and use the obtained p values in the M step. The resultant adaptive sampling method is shown in Alg. 1. Note that this framework can also be applied to stochastic samplers that preserve the energy, upto standard discretization errors. We can wrap the SGHMC sampler [4] in our framework as well, since it uses Fokker-Planck corrections to approximately preserve the energy (1) in the presence of stochastic noise. We call the resulting method SGHMC-EM, and specify it in Alg. 3 in the supplementary. As another example, the SGNHT sampler [5] is known to preserve a modified Gibbs energy [21]; therefore we can propose the following max-likelihood problem for learning the mass: 1 1 ¯ 2 /2, L(θ) − pT M −1 p − log |M | + µ(ξ − ξ) (4) 2 2 where ξ is the thermostat variable, and µ, ξ¯ are constants chosen to preserve correct marginals. The SGNHT dynamics can used in the E step to maintain the above energy, and we can use the collected p samples in the M step as before. We call the resultant method SGNHT-EM, as shown in Alg. 2. Note that, unlike standard HMC above, we do not perform Metropolis-Hastings corrections steps on the gathered samples for these cases. As shown in the algorithms, we collect one set of momenta samples per epoch, after the leapfrog iterations. We use S_count to denote the number of such samples collected before running an M-step update. The advantage of this MCEM approach over the parameter-dependent Riemannian variants is twofold: 1. The existing Riemannian adaptive algorithms in the literature [3, 6, 8] all start by modifying the energy function, whereas our framework does not have any such requirement. As long as one uses a sampling mechanism that preserves some energy with correct marginals for θ, in a stochastic sense or otherwise, it can be used in the E step of our framework. 2. The primary disadvantage of the Riemannian algorithms is the added complexity in the dynamics derived from the modified energy functions. One typically ends up using generalized leapfrog dynamics [3, 6], which can lead to implicit systems of equations; to solve these one either has to use standard solvers that have complexity at least cubic in the dimensionality [23, 24], with scalability issues in high dimensional datasets, or use fixed point updates with worsened error guarantees. An alternative approach is to use diagonal covariance matrices, as mentioned earlier, which ignores the coordinate correlations. Our MCEM approach sidesteps all these issues by keeping the existing dynamics of the desired E step sampler unchanged. As shown in the experiments, we can match or beat the Riemannian samplers in accuracy and efficiency by using suitable sample sizes and M step updates, with significantly improved sampling complexities and runtimes. max M 0 3.2 Dynamic Updates for the E-step Sample Size 5 Algorithm 1 HMC-EM Input: θ (0) , , LP _S, S_count · Initialize M ; repeat · Sample p(t) ∼ N (0, M ); for i = 1 to LP _S do · p(i) ← p(i+−1) , θ (i) ← θ (i+−1) ; · p(i+/2) ← p(i) − 2 ∇θ H(θ (i) , p(i) ); · θ (i+) ← θ (i) + 2 ∇p H(θ (i) , p(i+/2) ); · p(i+) ← p(i+/2) − 2 ∇θ H(θ (i+) , p(i+/2) ); end for   · Set θ (t+1) , p(t+1) from θ LP _S+ , pLP _S+ using Metropolis-Hastings · Store MC-EM sample p(t+1) ; if (t + 1) mod S_count = 0 then · Update M using MC-EM samples; end if · Update S_count as described in the text; until forever We now turn our attention to the task of learning the sample size in the E step from the data. The nontriviality of this issue is due to the following reasons: first, we cannot let the sampling dynamics run to convergence in each E step without making the whole process prohibitively slow; second, we have to account for the correlation among successive samples, especially early on in the process when the Markov chain is far from convergence, possibly with “thinning” techniques; and third, we may want to increase the sample count as the chain matures and gets closer to the stationary dis- tribution, and use relatively fewer samples early on. To this end, we leverage techniques derived from the MCEM literature in statistics [11, 13, 25] to first evaluate a suitable “test” function of the target parameters at certain subsampled steps, using the gathered samples and current M step estimates. We then use confidence intervals created around these evaluations to gauge the relative effect of successive MCEM estimates over the Monte Carlo error. If the updated values of these functions using newer M-step estimates lie in these intervals, we increase the number of samples collected in the next MCEM loop. Specifically, similar to [13], we start  off with the following test function for HMCEM (Alg. 1): q(·) = M −1 p, ∇L(θ) . We then subsample some timesteps as mentioned below, evaluate q at those steps, and create confidence intervals using sample S S P P means and variances: mS = S1 qs , vS = S1 q2s − m2S , CS := mS ± z1−α/2 vS , s=1 s=1 where S denotes the subsample count, z1−α/2 is the (1 − α) critical value of a standard Gaussian, and CS the confidence interval mentioned earlier. For SGNHT-EM (Alg.   2), we use the following test function: q(·) = M −1 p, ∇L(θ) + ξM −1 p, pT M −1 p , derived from the SGNHT dynamics. One can adopt the following method described in [25]: choose the subsampling Ps offsets {t1 . . . tS } as ts = i=1 xi , where xi − 1 ∼ Poisson(νid ), with suitably chosen ν ≥ 1 and d > 0. We found both this and a fixed set of S offsets to work well in our experiments. With the subsamples collected using this mechanism, we calculate the confidence intervals as described earlier. The assumption is that this interval provides an estimate of 6 the spread of q due to the Monte Carlo error. We then perform the M-step, and evaluate q using the updated M-step estimates. If this value lies in the previously calculated confidence bound, we increase S as S = S+S/SI in the following iteration to overcome the Monte Carlo noise. See [11, 13] for details on these procedures. Values for the constants ν, α, d, SI , as well as initial estimates for S are given in the supplementary. Running values for S are denoted S_count hereafter. 3.3 An Online Update for the M-Step Next we turn our attention to the task of updating the mass matrices using the collected momenta samples. As Input: θ (0) , , A, LP _S, S_count shown in the energy functions above, · Initialize ξ (0) , p(0) and M ; the momenta are sampled from zerorepeat mean normal distributions, enabling for i = 1 to LP _S do · p(i+1) ← p(i) − ξ (i) M −1 p(i) − us to use standard covariance esti(i) ˜ mation techniques from the litera∇L(θ )+ √ ture. However, since we are using 2AN (0, ); discretized MCMC to obtain these · θ (i+1) ← θ (i) + M −1 p(i+1) ; (i) samples, we have to address the vari·  ξ (i+1) ← ξ +  1 (i+1)T ance arising from the Monte Carlo p M −1 p(i+1) − 1 ;  D error, especially during the burn-in end for  phase. To that end, we found a run· Set θ (t+1) , p(t+1) , ξ (t+1) =  ning average of the updates to work θ (LP _S+1) , p(LP _S+1) , ξ (LP _S+1) ; (t+1) well in our experiments; in particular, · Store MC-EM sample p ; we updated the inverse mass matrix, if (t + 1) mod S_count = 0 then th denoted as M I , at the k M-step as: · Update M using MC-EM samples; end if (k) · Update S_count as described in the text; MI (k−1) (k,est) until forever = (1 − κ(k) )MI + κ(k) MI , (5) Algorithm 2 SGNHT-EM (k,est) where MI is a suitable estimate computed from the gathered samples in the k th M(k) step, and κ is a step sequence satisfying some standard assumptions, as described below. Note that the MI s correspond to the precision matrix of the Gaussian distribution of the momenta; updating this during the M-step also removes the need to invert the mass matrices during the leapfrog iterations. Curiously, we found the inverse of the (k,est) empirical covariance matrix to work quite well as MI in our experiments. These updates also induce a fresh perspective on the convergence of the overall MCEM procedure. Existing convergence analyses in the statistics literature fall into three broad categories: a) the almost sure convergence presented in [26] as t → ∞ with increasing sample sizes, b) the asymptotic angle presented in [27], where the sequence of MCEM updates are analyzed as an approximation to the standard EM sequence as the sample size, referred to as S_count above, tends to infinity, and c) the asymptotic consistency results obtained from multiple Gibbs chains in [28], by letting the chain 7 counts and iterations tend to ∞. Our analysis differs from all of these, by focusing on the maximum likelihood situations noted above as convex optimization problems, and (k) using SGD convergence techniques [29] for the sequence of iterates MI . (k,est) Proposition 1. Assume the MI ’s provide an unbiased estimate of ∇J, and have bounded eigenvalues. Let inf kMI −MI∗ k2 > ∇J(MI ) > 0 ∀ > 0. Further, let the n o  2 P P (k) sequence κ(k) satisfy k κ(k) = ∞, k κ(k) < ∞. Then the sequence MI converges to the MLE of the precision almost surely. Recall that the (negative) precision is a natural parameter of the normal distribution written in exponential family notation, and that the log-likelihood is a concave function of the natural parameters for this family; this makes max-likelihood a convex optimization problem over the precision, even in the presence of linear constraints [30, 31]. Therefore, this implies that the problems (3), (4) have a unique maximum, denoted by MI∗ above. Also note that the update (5) corresponds to a first order update on the iterates with an L2-regularized objective, with unit regularization parameter; this is denoted by J(MI ) in the proposition. That is, J is the energy preserved by our sampler(s), as a function of the mass (precision), augmented with an L2 regularization term. The resultant strongly convex optimization problem can be analyzed using SGD techniques under the assumptions noted above; we provide a proof in the supplementary for completeness. We should note here that the “stochasticity” in the proof does not refer to the stochastic gradients of L(θ) used in the leapfrog dynamics of Algorithms 2 through 5; instead we think of the collected momenta samples as a stochastic minibatch used to compute the gradient of the regularized energy, as a function of the covariance (mass), allowing us to deal with the Monte Carlo error indirectly. Also note that our (k,est) assumption on the unbiasedness of the MI estimates is similar to [26], and distinct from assuming that the MCEM samples of θ are unbiased; indeed, it would be difficult to make this latter claim, since stochastic samplers in general are known to have a convergent bias. 3.4 Nosé-Poincaré Variants We next develop a stochastic version of the dynamics derived from the Nosé-Poincaré Hamiltonian, followed by an MCEM variant. This allows for a direct comparison of the Riemann manifold formulation and our MCEM framework for learning the kinetic masses, in a stochastic setting with thermostat controls on the momentum terms and desired properties like reversibility and symplecticness provided by generalized leapfrog discretizations. The Nosé-Poincaré energy function can be written as [6, 9]:   1  p  −1  p  q2 HN P = s −L(θ) + + gkT log s − H0 , (6) M + 2 s s 2Q where L(θ) is the joint log-likelihood, s is the thermostat control, p and q the momentum terms corresponding to θ and s respectively, and M and Q the respective mass terms. See [6, 9] for descriptions of the other constants. Our goal is to learn both M and Q 8 using the MCEM framework, as opposed to [6], where both were formulated in terms of θ. To that end, we propose the following system of equations for the stochastic scenario:    ˜ B(θ)   pt+ /2 = p + s∇L(θ) − √ M −1 pt+ /2 , 2 s      t+/2 2 A(θ)s t+/2  (q q − gkT (1 + log s) ) + 1+ − q+ 4Q 2Q 2     t+/2  1 pt+/2 p + M −1 + L̃(θ) + H0 = 0, 2 s s  t+/2   q t+/2 t+ , s+s s =s+ Q   1 1 θ t+ = θ + M −1 p + , s st+    t+ ˜ B(θ t+ ) −1 t+/2 t+ t+/2 t+ √ p =p + M p , s ∇L(θ ) − 2 st+     t+/2  p  1 pt+/2 t+ t+/2 t+ t+ −1 q =q + H0 + L̃(θ ) − gkT (1 + log s ) + M t+ 2 2 s st+   2 q t+/2 A(θ)st+ t+/2 q − − , 2Q 2Q (7) where t + /2 denotes the half-step dynamics, ˜ signifies noisy stochastic estimates, and A(θ) and B(θ) denote the stochastic noise terms, necessary for the Fokker-Planck corrections [6]. Note that we only have to solve a quadratic equation for q t+/2 with the other updates also being closed-form, as opposed to the implicit system of equations in [6]. Proposition 2. The dynamics (7) preserve the Nosé-Poincaré energy (6). The proof is a straightforward application of the Fokker-Planck corrections for stochastic noise to the Hamiltonian dynamics derived from (6), and is provided in the supplementary. With these dynamics, we first develop the SG-NPHMC algorithm (Alg. 4 in the supplementary) as a counterpart to SGHMC and SGNHT, and wrap it in our MCEM framework to create SG-NPHMC-EM (Alg. 5 in the supplementary). As we shall demonstrate shortly, this EM variant performs comparably to SGR-NPHMC from [6], while being significantly faster. 4 Experiments In this section we compare the performance of the MCEM-augmented variants of HMC, SGHMC as well as SGNHT with their standard counterparts, where the mass matrices are set to the identity matrix. We call these augmented versions HMC-EM, SGHMC-EM, and SGNHT-EM respectively. As baselines for the synthetic experiments, 9 in addition to the standard samplers mentioned above, we also evaluate RHMC [3] and SGR-NPHMC [6], two recent algorithms based on dynamic Riemann manifold formulations for learning the mass matrices. In the topic modeling experiment, for scalability reasons we evaluate only the stochastic algorithms, including the recently proposed SGR-NPHMC, and omit HMC, HMC-EM and RHMC. Since we restrict the discussions in this paper to samplers with second-order dynamics, we do not compare our methods with SGLD [7] or SGRLD [8]. 4.1 Parameter Estimation of a 1D Standard Normal Distribution In this experiment we aim to learn the parameters of a unidimensional standard normal distribution in both batch and stochastic settings, using 5, 000 data points generated from N (0, 1), analyzing the impact of our MC-EM framework on the way. We compare all the algorithms mentioned so far: HMC, HMC-EM, SGHMC, SGHMC-EM, SGNHT, SGNHT-EM, SG-NPHMC, SG-NPHMC-EM along with RHMC and SGR-NPHMC. The generative model consists of normal-Wishart priors on the mean µ and precision τ , with posterior distribution p(µ, τ |X) ∝ N (X|µ, τ )W(τ |1, 1), where W denotes the Wishart distribution. We run all the algorithms for the same number of iterations, discarding the first 5, 000 as “burn-in”. Batch sizes were fixed to 100 for all the stochastic algorithms, along with 10 leapfrog iterations across the board. For SGR-NPHMC and RHMC, we used the observed Fisher information plus the negative Hessian of the prior as the tensor, with one fixed point iteration on the implicit system of equations arising from the dynamics of both. For HMC we used a fairly high learning rate of 1e − 2. For SGHMC and SGNHT we used A = 10 and A = 1 respectively. For SGR-NPHMC we used A, B = 0.01. We show the RMSE M ETHOD RMSE (µ) RMSE (τ ) T IME numbers collected from HMC 0.0196 0.0197 0.417 MS post-burn-in samples as HMC-EM 0.0115 0.0104 0.423 MS well as per-iteration runRHMC 0.0111 0.0089 5.748 MS times in Table 1. An SGHMC 0.1590 0.1646 0.133 MS “iteration” here refers SGHMC-EM 0.0713 0.2243 0.132 MS to a complete E step, SG-NPHMC 0.0326 0.0433 0.514 MS with the full quota of SG-NPHMC-EM 0.0274 0.0354 0.498 MS leapfrog jumps. The SGR-NPHMC 0.0240 0.0308 3.145 MS improvements afforded SGNHT 0.0344 0.0335 0.148 MS SGNHT-EM 0.0317 0.0289 0.148 MS by our MCEM framework are immediately noticeable; HMC-EM matches the errors ob- Table 1: RMSE of the sampled means, precisions and pertained from RHMC, iteration runtimes (in milliseconds) from runs on synthetic in effect matching the Gaussian data. sample distribution, while being much faster (an order of magnitude) per iteration. The stochastic MCEM algorithms show markedly better performance as well; SGNHT-EM in particular beats SGR-NPHMC in RMSE-τ while being significantly faster due to simpler updates for the mass matrices. Accuracy improvements are particularly noticeable for the high learning 10 rate regimes for HMC, SGHMC and SG-NPHMC. 4.2 Parameter Estimation in 2D Bayesian Logistic Regression Next we present some results obtained from a Bayesian logistic regression experiment, using both synthetic and real datasets. For the synthetic case, we used the same methodology as [6]; we generated 2, 000 observations from a mixture of two normal distributions with means at [1, −1] and [−1, 1], with mixing weights set to (0.5, 0.5) and the covariance set to I. We then classify these points using a linear classifier with weights {W0 , W1 } = [1, −1], and attempt to learn these weights using our samplers. We put N (0, 10I) priors on the weights, and used the metric tensor described in §7 of [3] for the Riemannian samplers. In the (generalized) leapfrog steps of the Riemannian samplers, we opted to use 2 or 3 fixed point iterations to approximate the solutions to the implicit equations. Along with this synthetic setup, we also fit a Bayesian LR model to the Australian Credit and Heart regression datasets from the UCI database, for additional runtime comparisons. The Australian credit dataset contains 690 datapoints of dimensionality 14, and the Heart dataset has 270 13-dimensional datapoints. For the synthetic case, we discard the first 10, 000 samples M ETHOD RMSE (W0 ) RMSE (W1 ) as burn-in, and calculate RMSE HMC 0.0456 0.1290 values from the remaining samHMC-EM 0.0145 0.0851 ples. Learning rates were choRHMC 0.0091 0.0574 sen from {1e − 2, 1e − 4, 1e − SGHMC 0.2812 0.2717 6}, and values of the stochastic SGHMC-EM 0.2804 0.2583 noise terms were selected from SG-NPHMC 0.4945 0.4263 {0.001, 0.01, 0.1, 1, 10}. SG-NPHMC-EM 0.0990 0.4229 Leapfrog steps were choSGR-NPHMC 0.1901 0.1925 sen from {10, 20, 30}. For the SGNHT 0.2035 0.1921 stochastic algorithms we used a SGNHT-EM 0.1983 0.1729 batchsize of 100. The RMSE numbers for the synthetic dataset are shown in Table 2: RMSE of the two regression parameters, for Table 2, and the per-iteration the synthetic Bayesian logistic regression experiment. runtimes for all the datasets are See text for details. shown in Table 3. We used initialized S_count to 300 for HMC-EM, SGHMC-EM, and SGNHT-EM, and 200 for SG-NPHMC-EM. The MCEM framework noticeably improves the accuracy in almost all cases, with no computational overhead. Note the improvement for SG-NPHMC in terms of RMSE for W0 . For the runtime calculations, we set all samplers to 10 leapfrog steps, and fixed S_count to the values mentioned above. The comparisons with the Riemannian algorithms tell a clear story: though we do get somewhat better accuracy with these samplers, they are orders of magnitude slower. In our synthetic case, for instance, each iteration of RHMC (consisting of all the leapfrog steps and the M-H ratio calculation) takes more than a second, using 10 leapfrog steps and 2 fixed point iterations for the implicit leapfrog equations, whereas both HMC 11 M ETHOD HMC HMC-EM RHMC SGHMC SGHMC-EM SG-NPHMC SG-NPHMC-EM SGR-NPHMC SGNHT SGNHT-EM T IME ( SYNTH ) 1.435 MS 1.428 MS 1550 MS 0.200 MS 0.203 MS 0.731 MS 0.803 MS 6.720 MS 0.302 MS 0.306 MS T IME (AUS ) 0.987 MS 0.970 MS 367 MS 0.136 MS 0.141 MS 0.512 MS 0.525 MS 4.568 MS 0.270 MS 0.251 MS T IME (H EART ) 0.791 MS 0.799 MS 209 MS 0.112 MS 0.131 MS 0.403 MS 0.426 MS 3.676 MS 0.166 MS 0.175 MS Table 3: Per-iteration runtimes (in milliseconds) for Bayesian logistic regression experiments, on both synthetic and real datasets. and HMC-EM are simpler and much faster. Also note that the M-step calculations for our MCEM framework involve a single-step closed form update for the precision matrix, using the collected samples of p once every S_count sampling steps; thus we can amortize the cost of the M-step over the previous S_count iterations, leading to negligible changes to the per-sample runtimes. 4.3 Topic Modeling using a Nonparametric Gamma Process Construction Next we turn our attention to a high-dimensional topic modeling experiment using a nonparametric Gamma process construction. We elect to follow the experimental setup described in [6]. Specifically, we use the Poisson factor analysis framework of [32]. Denoting the vocabulary as V , and the documents in the corpus as D, we model the observed counts of the vocabulary terms as DV ×N = Poi(ΦΘ), where ΘK×N models the counts of K latent topics in the documents, and ΦV ×K denotes the factor load matrix, that encodes the relative importance of the vocabulary terms in the latent topics. Following standard Bayesian convention, we put model the columns of Φ as φ·,k ∼ Dirichlet(α), using normalized Gamma variables: φv,k = Pγvγv , with γv ∼ Γ(α, 1). v pj Then we have θn,k ∼ Γ(rk , 1−p ); we put β(a , b ) priors on the document-specific 0 0 j mixing probabilities pj . We then set the rk s to the atom weights generated by the constructive Gamma process definition of [14]; we refer the reader to that paper for the details of the formulation. It leads to a rich nonparametric construction of this Poisson factor analysis model for which closed-form Gibbs updates are infeasible, thereby providing a testing application area for the stochastic MCMC algorithms. We omit the Metropolis Hastings correction-based HMC and RHMC samplers in this evaluation due to poor scalability. We use count matrices from the 20-Newsgroups and Reuters Corpus Volume 1 corpora [33]. The former has 2, 000 words and 18, 845 documents, while the second has a vocabulary of size 10, 000 over 804, 414 documents. We used a chronological 60 − 40 train-test split for both datasets. Following standard convention for stochastic 12 (a) (b) Figure 1: Test perplexities plotted against (a) post-burnin iterations and (b) wall-clock time for the 20-Newsgroups dataset. See text for experimental details. algorithms, following each minibatch we learn document-specific parameters from 80% of the test set, and calculate test perplexities on the remaining 20%. Test perplexity, a commonly used measure for such evaluations, is detailed in the supplementary. As noted in [14], the atom weights have three sets of components: the Ek s, Tk s and the hyperparameters α, γ and c. As in [6], we ran three parallel chains for these parameters, collecting samples of the momenta from the Tk and hyperparameter chains for the MCEM mass updates. We kept the mass of the Ek chain fixed to IK , and chose K = 100 as number of latent topics. We initialized S_count, the E-step sample size in our algorithms, to 50 for NPHMC-EM and 100 for the rest. Increasing S_count over time yielded fairly minor improvements, hence we kept it fixed to the values above for simplicity. Additional details on batch sizes, learning rates, stochastic noise estimates, leapfrog iterations etc are provided in the supplementary. For the 20-Newsgroups dataset we ran all algorithms for 1, 500 burn-in iterations, and collected samples for the next 1, 500 steps thereafter, with a stride of 100, for perplexity calculations. For the Reuters dataset we used 2, 500 burn-in iterations. Note that for all these algorithms, an “iteration” corresponds to a full E-step with a stochastic minibatch. The numbers obtained at the end of the runs are shown in Ta- M ETHOD 20-N EWS R EUTERS T IME (20-N EWS ) ble 2, along with per- SGHMC 759 996 0.047 S SGHMC-EM 738 972 0.047 S iteration runtimes. The 757 979 0.045 S post-burnin perplexity- SGNHT SGNHT-EM 719 968 0.045 S vs-iteration plots from 723 952 0.410 S the 20-Newsgroups dataset SGR-NPHMC SG-NPHMC 714 958 0.049 S are shown in Figure 1. SG-NPHMC-EM 712 947 0.049 S We can see significant improvements from the MCEM framework for Table 4: Test perplexities and per-iteration runtimes on 20all samplers, with that Newsgroups and Reuters datasets. of SGNHT being highly 13 pronounced (719 vs 757); indeed, the SG-NPHMC samplers have lower perplexities (712) than those obtained by SGR-NPHMC (723), while being close to an order of magnitude faster per iteration for 20-Newsgroups even when the latter used diagonalized metric tensors, ostensibly by avoiding implicit systems of equations in the leapfrog steps to learn the kinetic masses. The framework yields nontrivial improvements for the Reuters dataset as well. 5 Conclusion We propose a new theoretically grounded approach to learning the mass matrices in Hamiltonian-based samplers, including both standard HMC and stochastic variants, using a Monte Carlo EM framework. In addition to a newly proposed stochastic sampler, we augment certain existing samplers with this technique to devise a set of new algorithms that learn the kinetic masses dynamically from the data in a flexible and scalable fashion. Experiments conducted on synthetic and real datasets demonstrate the efficacy and efficiency of our framework, when compared to existing Riemannian manifold-based samplers. 14 Acknowledgments We thank the anonymous reviewers for their insightful comments and suggestions. This material is based upon work supported by the National Science Foundation under Grant No. DMS-1418265. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation. References [1] R. M. Neal. MCMC using Hamiltonian dynamics. In S. Brooks, A. Gelman, G. L. Jones, and X.-L. Meng, editors, Handbook of Markov Chain Monte Carlo, pages 113–162. Chapman & Hall / CRC Press, 2011. [2] S. Duane, A. D. Kennedy, B. J. Pendleton, and D. Roweth. Hybrid Monte Carlo. Physics Letters B, 195(2):216–222, 1987. [3] M. Girolami and B. Calderhead. Riemann manifold Langevin and Hamiltonian Monte Carlo methods. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 73(2):123–214, 2011. [4] T. Chen, E. Fox, and C. Guestrin. Stochastic Gradient Hamiltonian Monte Carlo. In Proceedings of The 31st International Conference on Machine Learning (ICML), pages 1683–1691, 2014. [5] N. Ding, Y. Fang, R. Babbush, C. Chen, R. D. Skeel, and H. Neven. Bayesian Sampling using Stochastic Gradient Thermostats. In Advances in Neural Information Processing Systems (NIPS) 27, pages 3203–3211, 2014. [6] A. Roychowdhury, B. Kulis, and S. Parthasarathy. Robust Monte Carlo Sampling using Riemannian Nosé-Poincaré Hamiltonian Dynamics. In Proceedings of The 33rd International Conference on Machine Learning (ICML), pages 2673–2681, 2016. [7] M. Welling and Y. W. Teh. Bayesian Learning via Stochastic Gradient Langevin Dynamics. In Proceedings of The 28th International Conference on Machine Learning (ICML), pages 681–688, 2011. [8] S. Patterson and Y. W. Teh. Stochastic Gradient Riemannian Langevin Dynamics on the Probability Simplex. In Advances in Neural Information Processing Systems (NIPS) 26, pages 3102–3110, 2013. [9] S. D. Bond, B. J. Leimkuhler, and B. B. Laird. The Nosé-Poincaré Method for Constant Temperature Molecular Dynamics. J. Comput. Phys, 151:114–134, 1999. [10] G. C. G. Wei and M. A. Tanner. A Monte Carlo Implementation of the EM Algorithm and the Poor Man’s Data Augmentation Algorithms. Journal of the American Statistical Association, 85:699–704, 1990. 15 [11] J. G. Booth and J. P. Hobert. Maximizing Generalized Linear Mixed Model Likelihoods with an Automated Monte Carlo EM Algorithm. Journal of the Royal Statistical Society Series B, 61(1):265–285, 1999. [12] C. E. McCulloch. Maximum Likelihood Algorithms for Generalized Linear Mixed Models. Journal of the American Statistical Association, 92(437):162–170, 1997. [13] R. A. Levine and G. Casella. Implementations of the Monte Carlo EM Algorithm. Journal Computational and Graphical Statistics, 10(3):422–439, 2001. [14] A. Roychowdhury and B. Kulis. Gamma Processes, Stick-Breaking, and Variational Inference. In Proceedings of the 18th International Conference on Artificial Intelligence and Statistics (AISTATS), pages 800–808, 2015. [15] B. Leimkuhler and S. Reich. Simulating Hamiltonian Dynamics. Cambridge University Press, 2004. [16] H. Robbins and S. Monro. A Stochastic Approximation Method. The Annals of Mathematical Statistics, 22(3):400–407, 1951. [17] L. Yin and P. Ao. Existence and Construction of Dynamical Potential in Nonequilibrium Processes without Detailed Balance. Journal of Physics A: Mathematical and General, 39(27):8593, 2006. [18] D. Frenkel and B. Smit. Understanding Molecular Simulations: From Algorithms to Applications, 2nd Edition. Academic Press, 2001. [19] B. Leimkuhler and C. Matthews. Molecular Dynamics: With Deterministic and Stochastic Numerical Methods. Springer, 2015. [20] W. G. Hoover. Canonical dynamics: Equilibrium phase-space distributions. Physical Review A (General Physics), 31(3):1695–1697, 1985. [21] A. Jones and B. Leimkuhler. Adaptive stochastic methods for sampling driven molecular systems. Journal of Chemical Physics, 135(8):084125, 2011. [22] A. P. Dempster, N. M. Laird, and D. B. Rubin. Maximum Likelihood from Incomplete Data via the EM Algorithm. Journal of the Royal Statistical Society Series B, 39(1):1–38, 1977. [23] J. D. Dixon. Exact solution of linear equations using P-adic expansions. Numerische Mathematik, 40(1):137–141, 1982. [24] W. Eberly, M. Giesbrecht, P. Giorgi, A. Storjohann, and G. Villard. Solving sparse rational linear systems. In Proceedings of the 2006 international symposium on Symbolic and algebraic computation (ISSAC), pages 63–70, 2006. [25] C. P. Robert, T. Rydén, and D. M. Titterington. Convergence Controls for MCMC Algorithms, With Applications to Hidden Markov Chains. Journal of Statistical Computation and Simulation, 64:327–355, 1999. 16 [26] G. Fort and E. Moulines. Convergence of the Monte Carlo Expectation Maximization for Curved Exponential Families. The Annals of Statistics, 31(4):1220–1259, 2003. [27] K. S. Chan and J. Ledolter. Monte Carlo EM Estimation for Time Series Models Involving Counts. Journal of the American Statistical Association, 90(429):242– 252, 1995. [28] R. P. Sherman, Y.-Y. K. Ho, and S. R. Dalal. Conditions for convergence of Monte Carlo EM sequences with an application to product diffusion modeling . The Econometrics Journal, 2(2):248–267, 1999. [29] L. Bottou. On-line Learning and Stochastic Approximations. In On-line Learning in Neural Networks, pages 9–42. Cambridge University Press, 1998. [30] C. Uhler. Geometry of maximum likelihood estimation in Gaussian graphical models. Annals of Statistics, 40:238–261, 2012. [31] A. P. Dempster. Covariance selection. Biometrics, 28:157–175, 1972. [32] M. Zhou and L. Carin. Negative Binomial Process Count and Mixture Modeling. IEEE Trans. Pattern Anal. Mach. Intell., 37(2):307–320, 2015. [33] N. Srivastava, R. Salakhutdinov, and G. E. Hinton. Modeling documents with deep Boltzmann machines. In Proceedings of the 29th Conference on Uncertainty in Artificial Intelligence (UAI), pages 616–624, 2013. [34] D. L. Fisk. Quasi-Martingales. Transactions of the American Mathematical Society, 120(3):369–389, 1965. 17 6 Appendices 6.1 Proposition 1: Convergence Discussion We propose the following update for the precision / inverse mass matrix, denoted as MI , at the k th M-step: (k) MI (k−1) = (1 − κ(k) )MI (k,est) + κ(k) MI , (8) (k,est) where is the estimate computed from the gathered samples in the k th M-step, I  M (k) and κ is a step sequence satisfying some standard assumptions, as described below. (k,est) Proposition 1. Assume the MI ’s provide an unbiased estimate of ∇J, and have bounded eigenvalues. Let inf kMI −MI∗ k2 > ∇J(MI ) > 0 ∀ > 0. Further, let the n o  2 P P (k) sequence κ(k) satisfy k κ(k) = ∞, k κ(k) < ∞. Then the sequence MI converges to the MLE of the precision almost surely. Proof. The proof follows the basic outline laid out in [29]. With a slight abuse of (k,est) notation, we use Mk to denote the iterates, M̄k to denote MI , and replace the κ(k) s with κk . Then, as mentioned in the main text, the update (5) can be written in the following first-order form: Mk = Mk−1 + κk ∇J(Mk ), where J(·) is the L2-regularized energy mentioned in the main text, as a function of the precision, and we assume Ez M̄k (z) = ∇J(Mk ), z being a random variable codifying the stochasticity in the estimate M̄k . As mentioned in the main paper, this stochasticity can be thought of as a surrogate for the Monte Carlo error in the collected momenta samples. Now define the Lyapunov function: h(Mk ) = kMk − M ∗ k2 , where M ∗ is the unique maximizer of the regularized objective function; as mentioned earlier, this exists because the precision is a natural parameter of the normal written in exponential family form, and the log likelihood of the latter is concave in the natural parameters. Then we can write the difference in Lyapunov errors for successive iterates as T h(Mk+1 ) − h(Mk ) = −2κk (Mk − M ∗ ) M̄k (zk ) + κ2k kM̄k (zk )k2 . Denoting the σ-algebra of all the z variables seen till the k th step by Fk , and using conditional independences of the expectations given this information, we can write the expectation of the quantity above as: T E (h(Mk+1 ) − h(Mk )| Fk ) = −2κk (Mk − M ∗ ) ∇J(Mk ) + κ2k EkM̄k (zk )k2 . (9) 18 Now, since we assumed the M̄k ’s to have bounded eigenvalues, we can bound the expectation on the right above as follows: EkM̄k (zk )k2 ≤ A + BkMk − M ∗ k2 , for sufficiently large values of A, B ≥ 0. This allows to write 9 as follows:  T E h(Mk+1 ) − (1 − κ2k B)h(Mk )|Fk ≤ −2κk (Mk − M ∗ ) ∇J(Mk ) + κ2k A. (10) Now we define two sequences as follows: µk = k Y 1 , 1 − κ2k B i=1 h0k = µk h(Mk ). (11) The sequence {µk } can be seen to converge based on our assumptions on κ2k . Then we can bound the positive variations of h0k -s as:   E E(h0k+1 − h0k )+ |Fk ≤ κ2k µk A. This proves h0k to be a quasi-martingale. By the convergence theorem for quasimartingales [34], we know that these converge almost surely. Since {µk } converge as well, we have P almost sure convergence of the h(Mk )’s. Combined with the assumption that k κk = ∞ and eqn. (10), we have almost sure convergence of T (Mk − M ∗ ) ∇J(Mk ) to 0. The final assumption of the proposition allows us to use this result to prove that Mk → M ∗ almost surely. 6.2 Stochastic samplers with MCEM augmentations In this section we present the MCEM variant of the SGHMC algorithm [4], followed by the SG-NPHMC algorithm using stochastic dynamics derived from the Nosé-Poincaré Hamiltonian. This is then given the MCEM treatment, leading to the SG-NPHMC-EM method. 6.2.1 SGHMC-EM The MCEM variant of the SGHMC algorithm, which we denote SGHMC-EM, is given in Alg. (3). We simply take the standard HMC dynamics, add Fokker-Planck correction terms to handle the stochastic noise, and use the MCEM framework from the main paper to collect appropriate number of samples of p, and use them to update the mass M . C and B̂ are user-specified estimates of the noise in the stochastic gradients. 19 Algorithm 3 SGHMC-EM Input: θ (0) , , A, LP _S, S_count · Initialize ξ (0) , p(0) and M ; repeat · Sample p(t) ∼ N (0, M ); for i = 1 to LP _S do q (i) ˜ · p(i+1) ← p(i) − CM −1 p(i) − ∇L(θ ) + 2(C − B̂)N (0, ); · θ (i+1) ← θ (i) + M −1 p(i+1) ; end for   · Set θ (t+1) , p(t+1) = θ (LP _S+1) , p(LP _S+1) ; · Store MC-EM sample p(t+1) ; if (t + 1) mod S_count = 0 then · Update M using MC-EM samples; end if · Update S_count as described in the text; until forever 6.2.2 SG-NPHMC As mentioned in the main paper, the Nosé-Poincaré energy function can be written as follows [6, 9]:   1  p  −1  p  q2 HN P = s −L(θ) + + gkT log s − H0 , M + (12) 2 s s 2Q where L(θ) is the joint log-likelihood, s is the thermostat control, p and q the momentum terms corresponding to θ and s respectively, and M and Q the respective mass terms. See [6, 9] for descriptions of the other constants. Our goal is to learn both M and Q using the MCEM framework, as opposed to [6], where both were formulated in terms of 20 θ. To that end, we propose the following system of equations for the stochastic scenario:    ˜ B(θ)   pt+ /2 = p + s∇L(θ) − √ M −1 pt+ /2 , 2 s      t+/2 2 A(θ)s t+/2  (q ) + 1+ q − q+ − gkT (1 + log s) 4Q 2Q 2    t+/2   1 pt+/2 p + M −1 + L̃(θ) + H0 = 0, 2 s s  t+/2   q t+/2 t+ , s+s s =s+ Q   1 1 θ t+ = θ + M −1 p + , s st+   B(θ t+ ) −1 t+/2  t+ ˜ t+ t+ t+/2 √ s ∇L(θ ) − p =p + M p , 2 st+     t+/2  1 pt+/2 p  t+ t+ −1 t+ t+/2 M q =q + H0 + L̃(θ ) − gkT (1 + log s ) + t+ 2 2 s st+   2 q t+/2 A(θ)st+ t+/2 − q − , 2Q 2Q (13) where t + /2 denotes the half-step dynamics, ˜ signifies noisy stochastic estimates, and A(θ) and B(θ) denote the stochastic noise terms, necessary for the Fokker-Planck corrections [6]. Proposition 2. The dynamics (7) preserve the Nosé-Poincaré energy (6). Proof. We start off with the basic dynamics derived from the Nosé-Poincaré Hamiltonian: p s ṗ = s∇L(θ) q ṡ = s Q θ̇ = M −1 q̇ = L(θ) + (14) 1  p T −1  p  q2 M − gkT (1 + log s) − + H0 , 2 s s 2Q where the dot notation denotes the time derivatives. Following the notation of [17], this can be expressed as:    0 θ̇ 0 ṗ   = −  ṡ  0 I q̇ 0 0 −I 0 0 I 0 0 21  ∂  −I s HN P ∂  0   ∂q HN P  + N, 0   θ HN P  ∂ 0 p HN P (15) √ where N = [0, N (0, 2 sB(θ)), 0, N (0, 2B(θ))] would be the stochastic noise from the minibatch estimates of ∇L(θ) and L(θ) respectively. Denoting the first matrix on  the right by D and the second by ∇HN P , we can see that tr ∇T ∇Dy = 0 for any y = y(θ, p, s, q). Recall that the joint distribution of interest, p(θ, p, s, q) ∝ exp(−HN P ); thus ∇p(θ, p, s, q) = −p∇HN P . Now, for any stochastic differential equation written as θ̇ = f (θ) + N (0, 2Q(θ)), the Fokker-Planck equation can be written as: ∂ ∂ ∂2 [Q(θ)p(θ)], p(θ) = − [f (θ)p(θ)] + ∂t ∂θ ∂θ 2 P ∂2 ∂ ∂ where p(θ) denotes the distribution of θ, and ∂θ 2 = i,j ∂θi ∂θj . For our NoséPoincaré case, the right hand side can be written as:  tr ∇T X∇p(θ, p, s, q) + tr∇T {p(θ, p, s, q)D∇HN P }  = tr (X + D)∇T ∇p(θ, p, s, q) + tr∇T {p(θ, p, s, q)D∇HN P } , where the diffusion noise matrix  0 0 X= 0 0 0 0 0 A(θ)  0 √ 0 0 sB(θ) . 0 0  0 0 Thus replacing D by X + D in (15) would make the RHS zero. This transformation would add correction terms to the dynamics 14 to yield the following: θ̇ = M −1 p s ṗ = s∇L(θ) − ṡ = q s Q q̇ = L(θ) + √ sB(θ)M −1 p s 1  p T −1  p  q2 q M − gkT (1 + log s) − − A(θ) s + H0 . 2 s s 2Q Q Discretizing this system using the generalized leapfrog technique gives rise to the dynamics 7. The dynamics 7 therefore induce the SG-NPHMC algorithm, shown in Alg. (4). 22 Algorithm 4 SG-NPHMC Input: θ (0) , , A, LP _S, S_count · Initialize p(0) , M , Q; repeat · Sample p(t) ∼ N (0, M ), q ∼ N (0, Q); for i = 1 to LP _S do · Perform generalized leapfrog dynamics (7) to get p(i+) , θ (i+) , s(i+) , q (i+) ; end for   · Set θ (t+1) , p(t+1) , ξ (t+1) = θ (LP _S+) , p(LP _S+) , s(LP _S+) , q (LP _S+) ; until forever 6.2.3 SG-NPHMC-EM In this section we add the MCEM framework to Alg. (4) above. This allows us to learn M adaptively while preserving the thermostat controls and symplecticness of the SG-NPHMC sampler. Algorithm 5 SG-NPHMC-EM Input: θ (0) , , A, B, LP _S, S_count · Initialize s(0) , p(0) , q (0) , M and Q; repeat for i = 1 to LP _S do · Perform generalized leapfrog dynamics (7) to get p(i+) , θ (i+) , s(i+) , q (i+) ; end for   · Set θ (t+1) , p(t+1) , s(t+1) , q (t+1) = θ (LP _S+) , p(LP _S+) , s(LP _S+) , q (LP _S+) ; · Store MC-EM samples p(t+1) and q (t+1) ; if (t + 1) mod S_count = 0 then · Update M , Q using MC-EM samples of p and q respectively; end if · Update S_count as described in the text; until forever 6.3 Experimental addenda For the topic modeling case, we used the following perplexity measure, as defined as [32]: ! Ntest X V 1 X Perplexity = exp − ynv log mnv , Y n=1 v=1 where ynv refers to the count of vocabulary item v in held-out test document n, Y = N V S P K V S K test P P P (s) (s) P P P (s) (s) φvk θkn / φvk θkn , where we collect S ynv , and mnv = n=1 v=1 s=1 k=1 v=1 s=1 k=1 samples of θ, φ, and have K latent topics. For the 20-Newsgroups dataset, we used 23 learning tates of 1e − 7 for the Tk chain, 1e − 6 for the hyperparameter chain, for all the samplers. Stochastic noise estimates were of the order of 1e − 2 for SGHMC, SGNHT and their EM variants, and of the order of 1e − 1 for SG-NPHMC and its EM version. We used minibatches of size 100, and 10 leapfrog iterations for all algorithms. The document-level θ, φ were learnt using 20 leapfrog iterations of RHMC [3], which we found to mix slightly better than Gibbs. For the sample size updates, we used ν = 1, α = 1, d = 2, SI = 10. We initialized S_count to 50 for the topic modeling experiments with SG-NPHMC-EM, 100 for all other cases. All experiments were run on a Macbook pro with a 2.5Ghz core i7 processor and 16GB ram. 24
2cs.AI
The semi-parametric Bernstein-von Mises theorem for regression models with symmetric errors Minwoo Chae1 , Yongdai Kim2 and Bas Kleijn3 1 Department of Mathematics, University of Texas at Austin 2 arXiv:1607.04367v2 [math.ST] 12 Jan 2017 3 Department of Statistics, Seoul National University Korteweg-de Vries Institute for Mathematics, University of Amsterdam March 12, 2018 Abstract In a smooth semi-parametric model, the marginal posterior distribution for a finite dimensional parameter of interest is expected to be asymptotically equivalent to the sampling distribution of any efficient point-estimator. The assertion leads to asymptotic equivalence of credible and confidence sets for the parameter of interest and is known as the semi-parametric Bernstein-von Mises theorem. In recent years, it has received much attention and has been applied in many examples. We consider models in which errors with symmetric densities play a role; more specifically, it is shown that the marginal posterior distributions of regression coefficients in the linear regression and linear mixed effect models satisfy the semi-parametric Bernstein-von Mises assertion. As a consequence, Bayes estimators in these models achieve frequentist inferential optimality, as expressed e.g. through Hájek’s convolution and asymptotic minimax theorems. Conditions for the prior on the space of error densities are relatively mild and well-known constructions like the Dirichlet process mixture of normal densities and random series priors constitute valid choices. Particularly, the result provides an efficient estimate of regression coefficients in the linear mixed effect model, for which no other efficient point-estimator was known previously. 1 Introduction In this paper, we give an asymptotic, Bayesian analysis of models with errors that are distributed symmetrically. The observations X = (X1 , . . . , Xn )T ∈ Rn are modeled by, X = µ + , (1.1) where µ = (µ1 , . . . , µn )T and  = (1 , . . . , n )T . Here the mean vector µ is non-random and parametrized by a finite dimensional parameter θ, and the distribution of the error vector  is symmetric in the sense that  has the same distribution as −. Since the error has a symmetric but otherwise unknown distribution, the model is semi-parametric. Examples of models of the form (1.1) are the symmetric location model (where µi = θ ∈ R,), and 1 the linear regression model (where µi = θT Zi for given covariates Zi ∈ Rp ). Moreover, the form (1.1) includes models with dependent errors, like linear mixed effect models. The main goal of this paper is to prove the semi-parametric Bernstein-von Mises (BvM) assertion for models of the form (1.1) with symmetric error distributions. Roughly speaking we show that the marginal posterior distribution of the parameter of interest θ is asymptotically normal, centered on an efficient estimator with variance equal to the inverse Fisher information matrix. As a result, statistical inference based on the posterior distribution satisfies frequentist criteria of optimality. Various sets of sufficient conditions for the semi-parametric BvM theorem based on the full LAN (local asymptotic normality) expansion (i.e. the LAN expansion with respect to both the finite and infinite dimensional parameters [25]) have been developed in [3, 7, 29]. The full LAN expansion, however, is conceptually inaccessible and technically difficult to verify. Because the models we consider are adaptive [4], we can consider a simpler type of LAN expansion that involves only the parameter of interest, albeit that the expansion must be valid under data distributions that differ slightly from the one on which the expansion is centred. We call this property misspecified LAN and prove that it holds for the models of the form (1.1) and that, together with other regularity conditions, it implies the semi-parametric BvM assertion. While the BvM theorem for parametric Bayesian models is well established (e.g. [21, 23]), the semi-parametric BvM theorem is still being studied very actively: initial examples [9, 11] of simple semi-parametric problems with simple choices for the prior demonstrated failures of marginals posteriors to display BvM-type asymptotic behaviour. Subsequently, positive semi-parametric BvM results have been established in these and various other examples, including models in survival analysis ([18, 19]), multivariate normal regression models with growing numbers of parameters ([5, 12, 17]) and discrete probability measures ([6]). More delicate notions like finite sample properties and second-order asymptotics are considered in [26, 30, 38]. Regarding models of the form (1.1), there is a sizable amount of literature on efficient point-estimation in the symmetric location problem ([2, 27, 31]) and linear regression models ([4]). By contrast, to date no efficient point-estimator for the regression coefficients in the linear mixed effect model has been found; the semi-parametric BvM theorem proved below, however, implies that the Bayes estimator is efficient! To the authors’ best knowledge, this paper provides the first efficient semi-parametric estimator in the linear mixed effect model. A numerical study given in section 5 supports the view that the Bayes estimator is superior to previous methods of estimation. This paper is organized as follows: section 2 proves the semi-parametric BvM assertion for all smooth adaptive models (c.f. the misspecified LAN expansion). In sections 3 and 4 we study the linear regression model and linear mixed effect model, respectively. For each, we consider two common choices for the nuisance prior, a Dirichlet process mixture and a series prior, and we show that both lead to validity of the BvM assertion. Results of 2 numerical studies are presented in section 5. Notation and conventions For two real values a and b, a ∧ b and a ∨ b are the minimum and maximum of a and b, respectively, and an . bn signifies that an is smaller than bn up to a constant multiple independent of n. Lebesgue measures are denoted by µ; | · | represents the Euclidean norm on Rd . The capitals Pη , Pθ,η etc. denote the probability measures associated with densities that we write in lower case, pη , pθ,η etc. (where it is always clear from the context which dominating measure µ is involved). The corresponding log densities are indicated with R √ p1 − `η , `θ,η etc. Hellinger and total-variational metrics are defined as h2 (p1 , p2 ) = R √ 2 p2 dµ and dV (p1 , p2 ) = |p1 −p2 |dµ, respectively. The expectation of a random variable X under a probability measure P is denoted by P X. The notation P0 always represents the true probability which generates the observation and X o = X − P0 X is the centered version of a random variable X. The indicator function for a set A is denoted 1A . For a class of measurable functions F, the quantities N (, F, d) and N[ ] (, F, d) represent the -covering and -bracketing numbers [33] with respect to a (semi)metric d. 2 Misspecified LAN and the semi-parametric BvM theorem In this section, we prove the semi-parametric BvM theorem for smooth adaptive models, i.e. those that satisfy the misspecified LAN expansion defined below. 2.1 Misspecified local asymptotic normality (n) Consider a sequence of statistical models P (n) = {Pθ,η : θ ∈ Θ, η ∈ H} on measurable spaces (X (n) , A (n) ), parametrized by a finite dimensional parameter θ of interest and an infinite dimensional nuisance parameter η. Assume that Θ is a subset of Rp , H is a metric (n) (n) space equipped with the associated Borel σ-algebra and Pθ,η has density x 7→ pθ,η (x) with respect to some σ-finite measures µ(n) dominating P (n) . (n) Let X (n) be a X (n) -valued random element following P0 (n) Pθ0 ,η0 (n) and assume that P0 for some θ0 ∈ Θ and η0 ∈ H. We say that a sequence of statistical models = P (n) satisfies the misspecified LAN expansion if there exists a sequence of vector-valued (com(n) ponentwise) L2 (P0 )-functions (gn,η ), a sequence (Hn ) of measurable subsets of H and a sequence (Vn,η ) of p × p-matrices such that, (n) sup sup log h∈K η∈Hn pθn (h),η (n) pθ0 ,η hT 1 (X (n) ) − √ gn,η (X (n) ) + hT Vn,η h = oP0 (1), 2 n (2.1) √ for every compact K ⊂ Rp , where θn (h) equals θ0 + h/ n. When we know η0 , property (2.1) is nothing but the usual parametric LAN expansion, where we set Hn = {η0 }. We 3 refer to (2.1) as the misspecified LAN expansion because the base for the expansion is (θ0 , η) while rest-terms go to zero under P0 , which corresponds to the point (θ0 , η0 ). Note that the misspecified LAN expansion is simpler than the full LAN expansion used in [3, 7, 29]. Although the misspecified LAN expansion (2.1) can be applied only to the adaptive cases, the verification of (2.1) is not easy due to misspecification and the required uniformity of convergence. LAN expansions have been shown to be valid even under misspecification: in [21] for example, smoothness in misspecified parametric models is expressed through a version of local asymptotic normality under the true distribution of the data, with a likelihood expansion around points in the model where the KullbackLeibler (KL)-divergence with respect to P0 is minimal. In models with symmetric error, the point of minimal KL-divergence equals exactly θ0 , provided that the misspecified η is close enough to η0 in the sense of Hn . This allows the usual LAN expansion at θ0 for fixed η, that is, the left-hand side of (2.1) is expected to be of order oP0 (1). By choosing localizations Hn appropriately, the family of score functions {`˙θ,η : η ∈ Hn } is shown to be a Donsker class, which validates (2.1) in models with symmetric errors, where Pn ˙ (n) `˙θ,η (x) = ∂`θ,η (x)/∂θ, gn,η (X (n) ) = `θ ,η (Xi ) and Vn,η = n−1 P [g g T ]. The i=1 0 0 n,η n,η0 score function is not necessarily the pointwise derivative of the log-likelihood, but in most (n) (n) (n) examples (including the models considered in this paper), gn,η = `˙ where `˙ = ` /∂θ. θ0 ,η θ,η θ,η (n) From now on, since it conveys the natural meaning of derivative, we use the notation `˙θ0 ,η instead of gn,η . 2.2 The semi-parametric Bernstein-von Mises theorem We use a product prior Π = ΠΘ × ΠH on the Borel σ-algebra of Θ × H and denote the posterior distribution by Π(·|X (n) ). Note that the misspecified LAN property gives rise to an expansion of the log-likelihood that applies only locally in sets Θn × Hn , where √ Θn = {θ0 + h/ n : h ∈ K} (for some compact K ∈ Rp and appropriate Hn ⊂ H). (n) So for the semi-parametric BvM theorem, the score function `˙ as well as Vn,η must θ0 ,η ‘behave nicely’ on Θn ×Hn and the posterior distribution must concentrate inside Θn ×Hn . Technically, these requirements are expressed by the following two conditions. For a matrix A ∈ Rn1 ×n2 , kAk represents the operator norm of A, defined as supx6=0 |Ax|/|x|, and if A is a square matrix, ρmin (A) and ρmax (A) denote the minimum and maximum eigenvalues of A, respectively. Condition A. (Equicontinuity and non-singularity) (n) (n) sup `˙θ0 ,η (X (n) ) − `˙θ0 ,η0 (X (n) ) η∈Hn = oP0 (n1/2 ), sup kVn,η − Vn,η0 k = o(1), (2.2) (2.3) η∈Hn 0 < lim inf ρmin (Vn,η0 ) ≤ lim sup ρmax (Vn,η0 ) < ∞. n→∞ n→∞ 4 (2.4) Condition B. (Posterior localization) (n) P0 Π Hn |X (n) (n) P0 Π  → 1,  √ n|θ − θ0 | > Mn |X (n) → 0, for every Mn ↑ ∞. (2.5) (2.6) Conditions like (2.2) and (2.3) are to be expected in the context of semi-parametric estimation (see, e.g., Theorem 25.54 of [34]). Condition (2.2) amounts to asymptotic equicontinuity and is implied whenever scores form a Donsker class, a well-known sufficient condition in semi-parametric efficiency (see [34]). Condition (2.3) is implied when(n) ever the L2 (P0 )-norm of the difference between scores at (θ0 , η) and (θ0 , η0 ) vanishes as η converges to η0 in Hellinger distance, c.f. (3.12); it controls variations of the information matrix as η converges to η0 with Hn . Condition (2.4) guarantees that the Fisher information matrix does not develop singularities as the sample size goes to infinity. Condition (2.5) formulates a requirement of posterior consistency in the usual sense, and sufficient conditions are well-known [1, 20, 28, 36]. Condition (2.6) requires n−1/2 -rate of convergence rate for the marginal posterior distribution for the parameter of interest. Though some authors remark that (2.6) appears to be rather too strong [38], clearly, (2.6) is a necessary condition (since it follows directly from the BvM assertion). The proof of condition (2.6) is demanding in a technical sense and forms the most difficult part of this analysis and most others [3]. We say the prior ΠΘ is thick at θ0 if it has a strictly positive and continuous Lebesgue density in a neighborhood of θ0 . The following theorem states the BvM theorem for semi-parametric models that are smooth in the sense of the misspecified LAN expansion. (n) Theorem 2.1. Consider statistical models {Pθ,η : θ ∈ Θ, η ∈ H} with a product prior Π = ΠΘ × ΠH . Assume that ΠΘ is thick at θ0 and that (2.1) as well as Conditions A and B hold. Then, sup Π √  n(θ − θ0 ) ∈ B|X (n) − N∆n ,Vn,η −1 (B) → 0, (2.7) 0 B (n) in P0 -probability, where, 1 −1 ˙(n) ∆n = √ Vn,η ` (X (n) ). 0 θ0 ,η0 n Proof. Note first that (2.5) implies that ΠH (Hn ) > 0 for large enough n. Let ΠHn be the probability measure obtained by restricting ΠH to Hn and next re-normalizing, and ΠHn (·|X (n) ) be the corresponding posterior distribution. Then, for any measurable set B in Θ, Π(θ ∈ B|X (n) ) = Π(θ ∈ B, η ∈ Hn |X (n) ) + Π(θ ∈ B, η ∈ Hnc |X (n) ) = ΠHn (θ ∈ B|X (n) )Π(η ∈ Hn |X (n) ) + Π(θ ∈ B, η ∈ Hnc |X (n) ), so we have, sup Π(θ ∈ B|X (n) ) − ΠHn (θ ∈ B|X (n) ) → 0, B 5 (n) in P0 -probability. Therefore it is sufficient to prove the BvM assertion with the priors ΠH n . Particularly, √ √ Π( n|θ − θ0 | > Mn , η ∈ Hn |X (n) ) , ΠHn ( n|θ − θ0 | > Mn |X (n) ) = Π(η ∈ Hn |X (n) ) (2.8) (n) converges to 0 in P0 -probability by (2.5) and (2.6). Using (2.1), (2.2) and (2.3), we obtain, (n) sup sup log pθn (h),η (n) pθ0 ,η h∈K η∈Hn hT (n) 1 (X (n) ) − √ `˙θ0 ,η0 (X (n) ) + hT Vn,η0 h = oP0 (1), 2 n (2.9) for every compact K ⊂ Rp . Let, (n) (n) pθn (h),η (X (n) ) b1 (h) = inf (n) η∈Hn pθ0 ,η (X (n) ) , and b2 (h) = sup pθn (h),η (X (n) ) η∈Hn (n) pθ0 ,η (X (n) ) . Then, trivially, we have, (n) pθ (h),η (X (n) )dΠHn (η) b1 (h) ≤ R n(n) ≤ b2 (h), pθ0 ,η (X (n) )dΠHn (η) R (2.10) and the quantity, hT (n) 1 sup bk (h) − √ `˙θ0 ,η0 (X (n) ) + hT Vn,η0 h , 2 n h∈K is bounded above by the left-hand side of (2.9) for k = 1, 2. As a result, R (n) pθ (h),η (X (n) )dΠHn (η) hT (n) 1 − √ `˙θ0 ,η0 (X (n) ) + hT Vn,η0 h = oP0 (1), sup log R n(n) (n) 2 n h∈K pθ0 ,η (X )dΠHn (η) (2.11) because |c2 | ≤ |c1 |∨|c3 | for all real numbers c1 , c2 and c3 with c1 ≤ c2 ≤ c3 . The remainder of the proof is (almost) identical to the proof for parametric models [21, 23], replacing the R (n) parametric likelihood by θ 7→ pθ,η (X (n) )dΠHn (η) as in [3], details of which can be found in Theorem 3.1.1 of [8]. 3 Semi-parametric BvM for linear regression models Let H be the set of all continuously differentiable densities η defined on D = (−r, r) (for some r ∈ (0, ∞]) such that η(x) > 0 and η(x) = η(−x) for every x ∈ D. Equip H with the Hellinger metric. We consider a model for data satisfying, Xi = θT Zi + i , for i = 1, . . . , n, (3.1) where Zi ’s are p-dimensional non-random covariates and the errors i are assumed to form an i.i.d. sample from a distribution with density η ∈ H. We prove the BvM theorem for the regression coefficient θ. 6 Let Pθ,η,i denote the probability measure with density x 7→ η(x − θT Zi ) and `˙θ,η,i = ∂`θ,η,i /∂θ. Also let Pη be the probability measure with density pη = η and sη (x) = (n) (n) −∂`η (x)/∂x. Let Pθ,η represent the product measure Pθ,η,1 × · · · × Pθ,η,n and let `˙θ,η = Pn ˙ ˙ i=1 `θ,η,i . With slight abuse of notation, we treat pθ,η,i , `θ,η,i and `θ,η,i as either functions of x or the corresponding random variables when they are evaluated at x = Xi . For example, `˙θ,η,i represents either the function x 7→ `˙θ,η,i (x) : D 7→ Rp or the random vector (n) (n) (n) `˙θ,η,i (Xi ). We treat p , ` and `˙ similarly. θ,η θ,η θ,η Let θ0 ∈ Θ and η0 ∈ H be the true regression coefficient and error density in the model (3.1). Define specialized KL-balls in Θ × H of the form, n n n o X X 2 Bn () = (θ, η) : K(pθ0 ,η0 ,i , pθ,η,i ) ≤ n , V (pθ0 ,η0 ,i , pθ,η,i ) ≤ C2 n2 , i=1 where K(p1 , p2 ) = R (3.2) i=1 R log(p1 /p2 )dP1 , V (p1 , p2 ) = (log(p1 /p2 ) − K(p1 , p2 ))2 dP1 , and C2 is some positive constant (see [14]). Define the mean Hellinger distance hn on Θ × H by, n  1X h2 (pθ1 ,η1 ,i , pθ2 ,η2 ,i ). h2n (θ1 , η1 ), (θ2 , η2 ) = n (3.3) i=1 Let vη = Pη0 [sη sη0 ] and, 1 (n)  ˙(n) ˙(n)T  P `θ0 ,η `θ0 ,η0 . n 0 P = vη Zn , where Zn = n−1 ni=1 Zi ZiT . Vn,η = It is easy to see that Vn,η (3.4) We say that a sequence of real-valued stochastic processes {Yn (t) : t ∈ T }, (n ≥ 1), is asymptotically tight if it is asymptotically tight in the space of bounded functions on T with the uniform norm [33]. A vector-valued stochastic process is asymptotic tight if each of its components is asymptotically tight. Theorem 3.1. Suppose that supi≥1 |Zi | ≤ L for some constant L > 0, lim inf n ρmin (Zn ) > 0 and vη0 > 0. The prior for (θ, η) is a product Π = ΠΘ × ΠH , where ΠΘ is thick at θ0 . Suppose also that there exist an N ≥ 1, a sequence n → 0 with n2n → ∞, and partitions Θ = Θn,1 ∪ Θn,2 and H = Hn,1 ∪ Hn,2 such that η0 ∈ Hn,1 and log N (n /36, Θn,1 × Hn,1 , hn ) ≤ n2n ,  1 log Π Bn (n ) ≥ − n2n , 4  5 log ΠΘ (Θn,2 ) + ΠH (Hn,2 ) ≤ − n2n , 2 (3.5) for all n ≥ N . For some M n ↑ ∞, with n M n → 0, let Hn = {η ∈ Hn,1 : h(η, η0 ) < M n n } and assume that there exist a continuous L2 (Pη0 )-function Q and an 0 > 0 such that, sup sup |y|<0 η∈HN `η (x + y) − `η (x) sη (x + y) − sη (x) ∨ ≤ Q(x), y y (3.6) where HN = ∪∞ n=N Hn . Furthermore, assume that the sequence of stochastic processes,    1  (n) ˙(n) N √ `˙(n) − P ` : |θ − θ | <  , η ∈ H , (3.7) 0 0 0 θ,η n θ,η 7 indexed by (θ, η) is asymptotically tight. Then the assertion of the BvM theorem 2.1 holds for θ. Since the observations are not i.i.d., we consider the mean Hellinger distance hn as in  [14]. Conditions (3.5) are required for the convergence rate of hn (θ, η), (θ0 , η0 ) to be n , which in turn implies that the convergence rates of |θ − θ0 | and h(η, η0 ) are n (c.f. Lemma 3.1). In fact, we only need to prove (3.5) with arbitrary rate n because the so-called (n) no-bias condition supη∈Hn P0 `˙θ0 ,η = oP0 (n−1/2 ) holds trivially by the symmetry, which plays an important role to prove (2.1)-(2.3) as in frequentist literature (see Chapter 25 of [35]). Condition (3.6), which is technical in nature, is easily satisfied. For a random design, (3.7) is asymptotically tight if and only if the class of score functions forms a Donsker class, and sufficient conditions for the latter are well established in empirical process theory. Since observations are not i.i.d. due to the non-randomness of covariates, (3.7) does not converge in distribution to a Gaussian process. Here, asymptotic tightness of (3.7) merely assures that the supremum of its norm is of order OP0 (1). Asymptotic tightness holds under a finite bracketing integral condition (where the definition of the bracketing number is extended to non-i.i.d. observations in a natural way). For sufficient conditions for asymptotic tightness with non-i.i.d. observations, readers are referred to section 2.11 of [33]. We prove Theorem 3.1 by checking the misspecified LAN condition as well as Conditions A and B, whose proofs are sketched in the three following subsections respectively. Detailed proofs are provided in the appendix. 3.1 Proof of Misspecified LAN (n) (n) Note that P0 `˙θ0 ,η = 0 for every η ∈ H by the symmetry of η and η0 . This enables writing the left-hand side of (2.1) as, (n) log pθn (h),η (n) pθ0 ,η hT (n) 1 (X (n) ) − √ `˙θ0 ,η (X (n) ) + hT Vn,η h = An (h, η) + Bn (h, η), 2 n where,  o hT ˙(n) (n) (n) √ An (h, η) = `θn (h),η − `θ0 ,η − ` , n θ0 ,η   1 (n) (n) (n) Bn (h, η) = P0 `θn (h),η − `θ0 ,η + hT Vn,η h. 2 (3.8) It suffices to prove that An (h, η) and Bn (h, η) converge to zero uniformly over h ∈ K and (n) η ∈ HN , in P0 -probability, for every compact set K. Note that An (h, η) is equal to, hT √ n Z 0 1 (n) (n) `˙θn (th),η − `˙θ0 ,η 8 o dt, by Taylor expansion, so for a compact set K, we have,  1  (n) (n) o sup sup |An (h, η)| . sup sup √ `˙θn (h),η − `˙θ0 ,η . n h∈K η∈HN h∈K η∈HN (3.9)   (n) (n) o For fixed h ∈ K and η ∈ HN , n−1/2 `˙θn (h),η − `˙θ0 ,η converges to zero in probability because its mean is zero and its variance is bounded by, n 1X P0 `˙θn (h),η,i − `˙θ0 ,η,i n 2 i=1 n   1X . P0 sη Xi − θn (h)T Zi − sη Xi − θ0T Zi n 2 i=1 n Pη Q2 1X ≤ |(θn (h) − θ0 )T Zi |2 · Pη0 Q2 . 0 , n n i=1   (n) (n) o which converges to zero as n → ∞. In turn, the pointwise convergence of n−1/2 `˙θn (h),η − `˙θ0 ,η to zero implies uniform convergence to zero of the right-hand side of (3.9), since (3.7) is asymptotically tight. Thus the supremum of |An (h, η)| over h ∈ K and η ∈ HN is of order oP0 (1). For Bn (h, η), we prove in Section A.1.1 that, sup η∈HN  1 1 (n)  (n) (n) P0 `θ,η − `θ0 ,η + (θ − θ0 )T Vn,η (θ − θ0 ) = o(|θ − θ0 |2 ), n 2 (3.10) as θ → θ0 . Consequently, the supremum of Bn (h, η) over h ∈ K and η ∈ HN converges to zero. 3.2 Proof of Condition A For given η, η0 , let d2 be the metric on H defined by, d22 (η, η0 ) = Pη0 (sη − sη0 )2 . (3.11) In Section A.1.2, it is shown that, lim sup d2 (η, η0 ) = 0. n→∞ η∈Hn (3.12) Let a ∈ Rp be a non-zero vector and let σn2 = aT Zn a. Because ρmin (Zn ) is bounded away from zero in the tail by assumption, σn2 is bounded away from zero for large enough n, and so the scaled process,    aT  ˙(n) (n) ˙(n) N √ ` − P0 `θ0 ,η : η ∈ H , nσn θ0 ,η (3.13) is asymptotically tight by the asymptotic tightness of (3.7). Furthermore, it converges weakly (in the space of bounded functions with the uniform norm) to a tight Gaussian 9 process because it coverges marginally to a Gaussian distribution by the Lindberg-Feller theorem. To see this, the variance of (3.13) for fixed η is equal to Pη0 s2η for every n. In addition, n 1 X P0 |aT `˙θ0 ,η,i |2 1{|aT `˙θ ,η,i |>√nσn } 0 nσn2 i=1 n 1 X T 2 = |a Zi | Pη0 s2η 1{|sη |≥√nσn /|aT Zi |} nσn2 i=1 n 1X . Pη0 s2η 1{|sη |≥√nσn /|aT Zi |} ≤ Pη0 s2η 1{|sη |&√n} = o(1), n i=1 for every  > 0 and large enough n. By the weak convergence of (3.13) to a tight Gaussian process, (3.13) is uniformly d2 -equicontinuous in probability (see Section 1.5 of [33]), because,  P0  aT  ˙(n) (n) √ `θ0 ,η − `˙θ0 ,η0 nσn 2 = n 2 1 X T a Zi ZiT aPη0 sη − sη0 = d22 (sη , sη0 ), 2 nσn i=1 (n) (n) for every n ≥ 1. Since P0 `˙θ0 ,η = 0 for every η ∈ HN , by the definition of asymptotic equicontinuity, we have, ) ( T (n) (n) a (`˙θ0 ,η − `˙θ0 ,η0 ) : d2 (η, η0 ) < δn , η ∈ HN = oP0 (n1/2 ), sup σn for every δn ↓ 0. Since σn is bounded away from zero for large n and a is arbitrary, (3.12) implies (2.2). For (2.3), note that, kVn,η − Vn,η0 k = k(vη − vη0 )Zn k = |vη − vη0 | · kZn k = ρmax (Zn ) · |vη − vη0 |, and lim supn ρmax (Zn ) < ∞ because covariates are bounded. Since, |vη − vη0 | = |Pη0 (sη − sη0 )sη0 | . d2 (η, η0 ), by the Cauchy-Schwartz inequality, we have kVn,η − Vn,η0 k . d2 (η, η0 ), and thus (3.12) implies (2.3). Finally, since vη0 > 0, lim inf n ρmin (Zn ) > 0 and supi≥1 |Zi | ≤ L, (2.4) holds trivially because Vn,η = vη Zn . 3.3 Proof of Condition B We need the following lemma, the proof of which is found in Section A.1.3. Lemma 3.1. Under the conditions in Theorem 3.1, there exists K > 0 such that for  every sufficiently small  > 0 and large enough n, η ∈ Hn and hn (θ, η), (θ0 , η0 ) <  imply |θ − θ0 | < K and h(η, η0 ) < K. 10 Under the conditions in Theorem 3.1, it is well known (see Theorem 4 of [14]) that,    (n) P0 Π (θ, η) ∈ Θn,1 × Hn,1 : hn (θ, η), (θ0 , η0 ) ≤ Mn n X (n) → 1, (3.14) for every Mn → ∞. Thus Lemma 3.1 implies (2.5). For (2.6), let  > 0 be a sufficiently small constant and (Mn ) be a real sequence such √ √ that Mn → ∞ and Mn / n → 0. Also, let Θn = {θ ∈ Θn,1 : Mn / n < |θ − θ0 | ≤ }. Since, Π √ n|θ − θ0 | > Mn X (n)  (n)  = Π |θ − θ0 | >  X Z +  Π θ ∈ Θn η, X (n) dΠ(η|X (n) )   ≤ Π |θ − θ0 | >  X (n) + sup Π θ ∈ Θn η, X (n) + Π(η ∈ Hnc |X (n) ), η∈Hn and Π |θ − θ0 | >   (n) X (n) ∨ Π(η ∈ Hnc |X (n) ) converges to 0 in P0 -probability due to (3.14) with Lemma 3.1, it suffices to show that,  sup Π θ ∈ Θn η, X (n) → 0, (3.15) η∈Hn (n) in P0 -probability. Note that, (n) R Π θ ∈ Θn η, X  (n) Θn = R (n) pθ,η /pθ0 ,η (X (n) ) dΠΘ (θ) (n) (n) pθ,η /pθ0 ,η (X (n) ) dΠΘ (θ) , by Bayes’s rule. In Section A.1.4, we prove that we can choose C > C1 > 0 and C2 > 0 such that, (n) P0 (An ∩ Bn ) → 1, (3.16) where,   Z (n) pθ,η  Mn √ n p −C1 Mn2 dΠΘ (θ) ≥ C2 e inf η∈Hn Θ p(n) θ0 ,η   (n)   pθn (h),η C|h|2 e ≤ 1 Bn = sup √ sup . Mn <|h|< n η∈Hn p(n)  An =   ,  (3.17) θ0 ,η The remainder of the proof is similar to that of [22]. Let Ωn = An ∩ Bn , Θn,j = {θn (h) ∈ Θn : jMn ≤ |h| < (j + 1)Mn }, √ and J be the minimum among j’s satisfying (j + 1)Mn / n > . Since ΠΘ is thick at θ0 and  is sufficiently small, √ p ΠΘ (Θn,j ) ≤ D · (j + 1)Mn / n , 11 for some constant D > 0. Then on Ωn , 2 sup Π(θ ∈ Θn |η, X (n) ) ≤ η∈Hn ≤ (n) eC1 Mn √ sup C2 (Mn / n)p η∈Hn Z Θn (n) pθ,η (n) pθ0 ,η dΠΘ (θ) (n) 2 J X pθ,η eC1 Mn √ ΠΘ (Θn,j ) sup sup (n) . C2 (Mn / n)p θ∈Θn,j η∈Hn p j=1 θ0 ,η (n) Since supθ∈Θn,j supη∈Hn pθ,η /pθ0 ,η ≤ exp(−Cj 2 Mn2 ) on Ωn , we have, 2 sup Π(θ ∈ Θn |η, X (n) ) ≤ C2−1 DeC1 Mn η∈Hn J X (j + 1)p e−Cj 2M 2 n , (3.18) j=1 on Ωn . Since C > C1 , the term on the right-hand side of (3.18) converges to zero as n → ∞, so we conclude that (3.15) holds. 3.4 Examples Conditions in Theorem 3.1 depend particularly on the choice of prior for the nuisance parameter η. In this subsection, we verify the conditions in Theorem 3.1 for two priors: a symmetric Dirichlet mixture of normal distributions and a random series prior on a smoothness class. For a given density p on D, its symmetrization p̄ is defined by p̄ = (p + p− )/2, where p− (x) = p(−x) for all x ∈ D. We can construct a prior on H by putting e and symmetrizing it, where H e is the set of every density on D whose a prior on p ∈ H e In this subsection, let Π e symmetrization belongs to H. Obviously, we have H ⊂ H. H e and ΠH be the corresponding probability measure on H. be a probability measure on H Hellinger entropy bounds and prior concentration rates around KL neighborhoods are well known for various choices of ΠHe , so the following lemma is useful to prove (3.5). e0 of H e containing η0 , suppose that there exists a function Q e Lemma 3.2. For a subset H e 2 < ∞, and for every x and sufficiently small y, such that sup e Pη Q η∈H0 sup e0 η∈H log η(x + y) − log η(x) e ≤ Q(x). y (3.19) Furthermore, assume that for large enough n, log ΠHe en,1 , h) . ne log N (e n , H 2n ,  e : K(η0 , η) ≤ e {η ∈ H 2n , V (η0 , η) ≤ e 2n } & −ne 2n , en,2 ) ≤ − 5 ne log ΠHe (H 2 M 2 , 2 n n (3.20) e=H en,1 ∪ H en,2 with η0 ∈ H en,1 ⊂ H e0 and sequences e for some partition H n → 0, Mn → ∞ with e n & n−1/2 log n. If Θ is compact and supi≥1 |Zi | ≤ L, then, for any ΠΘ that is thick at θ0 , the product prior ΠΘ × ΠH satisfies (3.5) with some Hn,1 ⊂ H0 , Θn,1 = Θ and e0 . n = e n Mn , where H0 is the set of symmetrizations of p ∈ H 12 Proof. For any pair of densities p and q on D, it is shown in Section A.1.5 that, √ h(p̄, q̄) ≤ 2h(p, q), K(p̄, q̄) ≤ K(p̄, q),  V (p̄, q̄) ≤ 4 V (p̄, q) + K 2 (p̄, q) , (3.21) It is also shown in Section A.1.6 that there exist constants C > 0 and  > 0 such that,  h(pθ1 ,η1 ,i , pθ2 ,η2 ,i ) ≤ C |θ1 − θ2 | + h(η1 , η2 ) ,  (3.22) K(pθ0 ,η0 ,i , pθ,η,i ) ≤ C |θ − θ0 | + K(η0 , η) ,  V (pθ0 ,η0 ,i , pθ,η,i ) ≤ C |θ − θ0 |2 + V (η0 , η) + K 2 (η0 , η) , for all η1 , η2 , η ∈ H0 , i ≥ 1 and θ1 , θ2 , θ with |θ1 − θ2 | ∨ |θ − θ0 | < . en,1 . By the first inequalities of (3.21) Let Hn,1 be the set of symmetrizations of p ∈ H and (3.22), there is a C1 > 0 such that for large enough n, log N (n /36,Θn,1 × Hn,1 , hn ) en,1 , h) . log N (C1 n , Θn,1 , | · |) + log N (C1 n , H . log −1 2n ≤ n2n , n + ne 1/2 / log n) ≤ where the last inequality follows from n > e n & n−1/2 log n, so log −1 n ≤ log(n log n = o(n2n ). The second and third inequalities of (3.21) and (3.22), with p = p̄ = η0 , imply that there exists a constant C2 > 0 such that, e : K(η0 , η) ≤ C2 2 , V (η0 , η) ≤ C2 2 } log Π(Bn (n )) ≥ log ΠHe {η ∈ H n n  + log ΠΘ ({θ : |θ − θ0 | ≤ C2 2n }) e : K(η0 , η) ≤ e ≥ log ΠHe {η ∈ H 2n , V (η0 , η) ≤ e 2n }  + log ΠΘ ({θ : |θ − θ0 | ≤ e 2n }) & −ne 2n + log(e 2n ) & −ne 2n − log n ≥ −n2n /4, for large enough n. Finally, since,   en,2 ) ≤ − 5 n2n , log ΠH (Hn,2 ) ≤ log ΠHe (H 2 the proof is complete. 3.4.1 Symmetric Dirichlet mixtures of normal distributions We consider a symmetrized Dirichlet process mixture of normal densities for the prior of η. Dirichlet process mixture priors are popular and the asymptotic behavior of the posterior distribution is well-studied. A random density η is said to follow a Dirichlet process R mixture of normal densities [24] if η(x) = φσ (x − z)dF (z, σ), where F ∼ DP(α, H) and φσ is the density of the normal distribution with mean 0 and variance σ 2 . Here, DP(α, H) denotes the Dirichlet process with precision α > 0 and mean probability measure H on R × (0, ∞) [10]. 13 For given positive numbers σ1 , σ2 , and M with σ1 < σ2 , let F be the set of all dise0 be the set of all dentribution functions supported on [−M, M ] × [σ1 , σ2 ], and let H R sities η on R of the form η(x) = φσ (x − z)dF (z, σ) for F ∈ F̃. Then it is easy to e0 , is the set of all η ∈ H e0 , where F ∈ F with show that H0 , the symmetrization of H dF (z, σ) = dF (−z, σ). If F ∼ DP(α, H), where H has a positive and continuous density supported on [−M, M ] × [σ1 , σ2 ], the corresponding Dirichlet process mixture prior and e0 and H0 its symmerization, denoted by Π e and ΠH , respectively, have full support on H H relative to the Hellinger topology. Corollary 3.1. Suppose that supi≥1 |Zi | ≤ L and lim inf n ρmin (Zn ) > 0. With the symmetrized Dirichlet process mixture prior described above for η, the BvM theorem holds for the linear regression model provided that η0 ∈ H0 and that ΠΘ is compactly supported and thick at θ0 . Proof. We may assume that Θ is compact, and let Θn,1 = Θ. It is trivial that vη0 > 0. The first and second derivatives of the map x 7→ `η (x) are of orders O(x) and O(x2 ), respectively, as x → ∞ (see lemma 3.2.3 of [8] for details), and both bounds can be chosen independently of η. Consequently, condition (3.6) holds with Q(x) = O(x2 ) as |x| → ∞, and supη∈He0 Pη Q2 < ∞. The proof of Theorem 6.2 in [13] implies that (3.20) en,1 = H e0 , e holds with H n = n−1/2 (log n)3/2 and any Mn → ∞. Thus, (3.5) hold with n = n−1/2 (log n)2 and Hn,1 = H0 . What remains to prove for the BvM assertion is asymptotic tightness c.f. (3.7), which is implied if for every a ∈ Rp and sufficiently small  > 0, the stochastic process,   n  aT X  ˙ ˙ `θ,η,i − P0 `θ,η,i : θ ∈ B , η ∈ H0 , (θ, η) 7→ √ n (3.23) i=1 is asymptotically tight, where B is the open ball of radius  centred on θ0 . In Section A.1.7, we prove the asymptotic tightness of (3.23) using the bracketing central limit theorem. The symmetrized Dirichlet process mixture prior considered in this subsection is restricted, in that the mixing distribution F is supported on [−M, M ] × [σ1 , σ2 ]. This restriction plays only a technical role (to prove (3.6) and (3.7)) and it is expected that, with some additional effort, the results could be extended to arbitrarily small σ’s and arbitraily large M . 3.4.2 Random series prior Let W be a random function on [−1/2, 1/2] defined as a series W (·) = P∞ j=1 j −α C j bj (·), where b1 (t) = 1, b2j (t) = cos(2πjt), b2j+1 (t) = sin(2πjt) and Cj ’s are i.i.d. random variables drawn from a density supported on [−M, M ] that is continuous and bounded away from zero. We shall impose smoothness through the requirement that α be greater than 3, so that the series is well defined as a continuous real-valued function on [−1/2, 1/2] with the first and second derivatives that are bounded uniformly by a constant. Let W be the 14 P set of all functions w : [−1/2, 1/2] → R of the form w(·) = j aj bj (·) for some sequence e0 denote the set of densities pw , where w ∈ W (a1 , a2 , . . .) with j α |aj | ≤ M for all j. Let H and, ew(x) pw (x) = R 1/2 , w(y) dy e −1/2 for every x ∈ D = (−1/2, 1/2). Let H0 denote the associated space of symmetrized p̄w . Let ΠHe and ΠH be the laws of random densities pW and p̄W , respectively. Corollary 3.2. Suppose that supi≥1 |Zi | ≤ L and lim inf n ρmin (Zn ) > 0. If α > 3, η0 ∈ H0 , vη0 > 0, and ΠΘ is compactly supported and thick at θ0 , then the random series prior ΠH for η leads to a posterior for θ that satisfies the BvM assertion (2.7) in the linear regression model. Proof. We may assume that Θ is compact. Let W be the random function defined P −α c b (·) such that η (x) ∝ ew0 (x) + ew0 (−x) . One verifies above, and let w0 (·) = ∞ 0,j j 0 j=1 j easily that the KL-divergence K, KL-variation V and the square Hellinger distance h2 , for densities pw (·) ∝ ew(·) are bounded by the square of the uniform norm of the difference between the exponents w. Therefore by Lemma 3.2, conditions (3.5) (with Θn,1 = Θ and Hn,1 = H0 ) hold for some (n ) under the two conditions: ΠW {kW − w0 k∞ < } > 0 and N (, W, k · k∞ ) < ∞ for every  > 0, where k · k∞ is the uniform norm and ΠW is the law of W . Since W is totally bounded with respect to k · k∞ by the Arzelà-Ascoli theorem, the condition N (, W, k · k∞ ) < ∞ is satisfied. For given  > 0, there exists an integer P −α < /4. Since each random variable C has a positive and J such that M · ∞ j j=J+1 j continuous density at c0,j for j ≤ J, we have ΠW (A) > 0 for A = {maxj≤J |Cj − c0,j | < P −α )}. Since kW − w k /(2 ∞ 0 ∞ <  on A, we have ΠW {kW − w0 k∞ < } > 0. j=1 j Note that (3.6) is trivially satisfied with a constant function Q. In Section A.1.8, we prove the asymptotic tightness of (3.7), which completes the proof. 4 Efficiency in the linear mixed effect model In this section, we consider the linear mixed effect model, Xij = θT Zij + bTi Wij + ij , for i = 1, . . . , n and j = 1, . . . , mi , where the covariates Zij ∈ Rp and Wij ∈ Rq are non-random, the error ij ’s form an i.i.d. sequence drawn from a distribution with density f and the random effect coefficients bi are i.i.d. from a distribution G. The nuisance parameter η = (f, G) takes its values in the space H = F × G, where the first factor F denotes the class of continuously differentiable densities supported on D = (−r, r) for some r ∈ (0, ∞] with f (x) > 0 and f (x) = f (−x) for all x ∈ D and G is the class of symmetric distributions supported on [−Mb , Mb ]q for some Mb > 0. The true value of the nuisance is denoted by η0 = (f0 , G0 ). We write 15 Xi = (Xi1 , . . . , Ximi )T , and similarly, Zi ∈ Rp×mi and Wi ∈ Rq×mi . As in the linear regression model, we assume that, |Zij | ≤ L Define, pθ,η,i (x) = and |Wij | ≤ L, Z Y mi for all i and j. (4.1) f (xj − θT Zij − bTi Wij )dG(bi ), j=1 (n) (n) where x = (x1 , . . . , xmi )T ∈ Rmi . Quantities denoted by pθ,η , `θ,η,i , `˙θ,η,i and `˙θ,η are defined and used in the same way as in Section 3. The design matrix Zn is defined by P Zn = n−1 ni=1 Zi ZiT . For technical reasons and notational convenience, we assume that there exists an integer m such that mi = m for all i, but proofs below can be extended to general cases without much hamper. For y = (y1 , . . . , ym )T ∈ Rm and w = (w1 , . . . , wm ) ∈ [−L, L]q×m , define, ψη (y|w) = Z Y m f (yj − bT wj ) dG(b), j=1 and `η (y|w) = log ψη (y|w). Let sη (y|w) = −∂`η (y|w)/∂y ∈ Rm . Then it can be easily  shown that `˙θ,η,i (x) = Zi sη x − ZiT θ|Wi ∈ Rp . Furthermore, let Ψw η (·) denote the probability measure on Rm with density y 7→ ψη (y|w). The metric hn on Θ × H is defined as in (3.3). With slight abuse of notation, we also use hn as a metric on H defined as hn (η1 , η2 ) = hn ((θ0 , η1 ), (θ0 , η2 )). Let, Z d2w (η1 , η2 ) = |sη1 (y|w) − sη2 (y|w)|2 dΨw η0 (y). Define Bn () and Vn,η as in (3.2) and (3.4), respectively. It can be easily shown that, n Vn,η = 1X Zi vη (Wi )ZiT , n (4.2) i=1 where vη (w) is the m × m matrix defined as, Z vη (w) = sη (y|w) sη0 (y|w)T dΨw η0 (y). To prove the BvM assertion in the linear mixed effect model, we need a condition to ensure that supi≥1 h(ψηn (·|Wi ), ψη0 (·|Wi )) → as hn (ηn , η0 ) → 0. For this purpose, we define Nn, (u) to be the number of Wij ’s with |Wij − u| < , and assume that, for every (fixed)  > 0 and u ∈ Rq , Nn, (u) = 0 for all n, or lim inf n−1 Nn, (u) > 0. n (4.3) Condition (4.3) is easily satisfied, for example when Wij ’s are i.i.d. realization from any distribution. 16 Theorem 4.1. Suppose that lim inf n ρmin (Zn ) > 0, ρmin (vη0 (w)) > 0 for every w, G0 is thick at 0, ΠΘ is thick at θ0 , and w 7→ vη0 (w) is continuous. Also suppose that there exist a large integer N , a sequence (n ), with n ↓ 0 and n2n → ∞, and sequences of partitions Θ = Θn,1 ∪ Θn,2 , H = Hn,1 ∪ Hn,2 such that η0 ∈ Hn,1 and (3.5) holds for all n ≥ N . For some M n ↑ ∞, with n M n → 0, let Hn = {η ∈ Hn,1 : hn (η, η0 ) < M n n }. Assume that R there exists a continuous function Q such that supw Q3 (x, w)ψη0 (x|w)dµ(x) < ∞, and, sup η∈HN |`η (x + y|w) − `η (x|w)| |sη (x + y|w) − sη (x|w)| ∨ ≤ Q(x, w), |y| |y| (4.4) for all x, w and small enough |y|, where HN = ∪∞ n=N Hn . Also assume that the class of R2 -valued functions,     N w 7→ dw (η1 , η2 ), h(ψη1 (·|w), ψη2 (·|w)) : η1 , η2 ∈ H , (4.5) is equicontinuous, and for sufficiently small 0 > 0 the stochastic process,    1  ˙(n) (n) ˙(n) N √ `θ,η − P0 `θ,η : |θ − θ0 | < 0 , η ∈ H , n (4.6) is asymptotically tight. Then, the BvM assertion (2.7) holds for the linear mixed effect model, provided that (4.1) and (4.3) hold. The proof of Theorem 4.1 is quite similar to that of Theorem 3.1 except for some technical details. Below we follow the same line to the proof of Theorem 3.1. 4.1 Proof of the misspecified LAN property Let (3.8) define An (h, η) and Bn (h, η) again and let K be a compact subset of Rp . Then it (n) suffices to prove that An (h, η) and Bn (h, η) converge in P0 -probability to zero uniformly over h ∈ K and η ∈ HN . Note that the inequality (3.9) still holds. Since,  n o  1 X 1  ˙(n) (n) Var √ `θn (h),η − `˙θ0 ,η = P0 |`˙θn (h),η,i − `˙θ0 ,η,i |2 n n i=1 n   1X = P0 Zi sη (Xi − ZiT θn (h)|Wi ) − sη (Xi − ZiT θ0 |Wi ) n 2 i=1 n 1X ≤ kZi k4 · |θn (h) − θ0 |2 · P0 Q(Xi , Wi )2 = o(1), n i=1 suph∈K supη∈HN |An (h, η)| = oP0 (1) by asymptotic tightness of (4.6). For Bn (h, η), we prove in Section A.2.1 that, sup η∈HN  1 1 (n)  (n) (n) P0 `θ,η − `θ0 ,η + (θ − θ0 )T Vn,η (θ − θ0 ) = o(|θ − θ0 |2 ), n 2 (4.7) as θ → θ0 . Consequently, the supremum of Bn (h, η) over h ∈ K and η ∈ HN converges to 0. 17 4.2 Proof of Condition A It is shown in Section A.2.2 that, lim sup sup dWi (η, η0 ) = 0. (4.8) n→∞ i≥1 η∈Hn Note that for any a ∈ Rm with |a| = 1,   aT vη (w) − vη0 (w) a Z   = aT sη (x|w) − sη0 (x|w) sη0 (x|w)T a dΨw η0 (x) Z 2 2 ≤C sη (x|w) − sη0 (x|w) dΨw η0 (x) = Cdw (η, η0 ), (4.9) for some constant C > 0 by the Cauchy-Schwartz inequality and (4.4). Thus, lim sup sup kvη (Wi ) − vη0 (Wi )k = 0. n→∞ i≥1 η∈Hn Since, n sup kVn,η − Vn,η0 k = sup η∈Hn η∈Hn 1X Zi {vη (Wi ) − vη0 (Wi )}ZiT = o(1), n i=1 which completes the proof of (2.3). Let a ∈ Rp be a fixed non-zero vector. Then for any sequence ηn ∈ Hn ,   T n 1X T a ˙(n) (n) ˙ √ (` − `θ0 ,η0 ) = a Zi uηn (Wi )ZiT a, Var n n θ0 ,ηn i=1 where, uη (w) = Z   T sη (x|w) − sη0 (x|w) sη (x|w) − sη0 (x|w) dΨw η0 (x). Since |bT uη (w)b| ≤ dw (η, η0 ) for every η ∈ HN and b ∈ Rm with |b| = 1, we have supi≥1 kuηn (Wi )k = o(1) by (4.8), and so, aT (n) √ (`˙θ(n) − `˙θ0 ,η0 ) = oP0 (1). n 0 ,ηn For given , δ > 0, by asymptotic tightness of (4.6) and Theorem 1.5.6 of [33], there is a partition HN = ∪Jj=1 H(j) such that,  P0 max sup 1≤j≤J η ,η ∈H(j) 1 2  aT ˙(n) (n) ˙ √ (`θ0 ,η1 − `θ0 ,η2 ) >  < δ, n (j) (j) for large enough n. We can choose sequences (ηn ) for j = 1, . . . , J such that ηn ∈ Hn and for every n ≥ N and for a given η ∈ Hn there exists at least one j such that η and (j) ηn are contained in the same partition. Since, aT (n) (n) max √ (`˙ (j) − `˙θ0 ,η0 ) = oP0 (1), 1≤j≤J n θ0 ,ηn 18 we have,  P0  aT (n) (n) sup √ (`˙θ0 ,η − `˙θ0 ,η0 ) > 2 < 2δ, n η∈Hn for large enough n. Since a is an arbitrary vector, (2.2) is proved. Since ρmin (vη0 (w)) > 0 for every w and the map w 7→ vη0 (w) is continuous, we have that inf w∈[−L,L]q×m ρmin (vη0 (w)) > 0. In addition, since each component of the matrix vη0 (w) is bounded uniformly in w by the integrability condition (4.4), we have supw∈[−L,L]q×m ρmax (vη0 (w)) < ∞. Finally, since, 0 < lim inf ρmin (Zn ) ≤ lim sup ρmax (Zn ) < ∞, n n (2.4) is satisfied by (4.2). 4.3 Proof of Condition B We shall have need for the following lemma, the proof of which is in Section A.2.3. Lemma 4.1. Under the conditions in Theorem 4.1, there exists K > 0 such that for every  sufficiently small  > 0 and η ∈ HN , hn (θ, η), (θ0 , η0 ) <  implies |θ − θ0 | < K and hn (η, η0 ) < K. Posterior consistency of the parameter (θ, η) with respect to the metric hn is guaranteed by Theorem 4 of [14]. Thus, Lemma 4.1 implies (2.5). The proof of (2.6) for the linear mixed effect model is very similar to the analogous proof in linear regression model, as in Section 3. 4.4 Examples e be the set of every f (resp. G) whose symmetrization f¯ (resp. G) belongs Let Fe (resp. G) to F (resp. G), where G = (G + G− )/2 with G− (A) = G(−A) for every measurable set A. For the prior of η, we consider a product measure ΠF × ΠG , where ΠF and ΠG are the e respectively. The symmetrized versions of probability measures Π e and Π e on Fe and G, F G following lemma plays a role in the proof of Corollary 4.1 (its proof is given in Section A.2.4). Denote the Lévy-Prohorov metric between two probability measures P1 , P2 is denoted by dW (P1 , P2 ). Lemma 4.2. Let H0 = F0 × G0 ⊂ H for some F0 ⊂ F and G0 ⊂ G with f0 ∈ F0 and G0 ∈ G0 . Assume that there exist a continuous function Q0 and small enough δ0 > 0 such that, Z sup sup Q0 (x, w)2 ψη (x|w)dµ(x) < ∞, (4.10) w η∈H0 and, sup η∈H0 ψη0 (x|w) |`η (x + y|w) − `η (x|w)| ∨ |y| ψη (x|w) 19 δ0 ≤ Q0 (x, w), (4.11) for all x, w and small enough |y|. Also assume that F0 is uniformly tight and, sup sup f (x) ∨ |f˙(x)| < ∞, f ∈F0 (4.12) x where f˙ is the derivative of f . Then, on Θ × H0 ,  sup hn (θ1 , η1 ), (θ2 , η2 ) → 0, (4.13) n≥1 as |θ1 − θ2 | ∨ h(f1 , f2 ) ∨ dW (G1 , G2 ) → 0, and, n 1X sup K(pθ0 ,η0 ,i , pθ,η,i ) ∨ V (pθ0 ,η0 ,i , pθ,η,i ) → 0, n≥1 n (4.14) i=1 as |θ − θ0 | ∨ h(f, f0 ) ∨ dW (G, G0 ) → 0. 4.4.1 Symmetric Dirichlet mixtures of normal distributions Let ΠF denote the prior for the symmetric Dirichlet mixtures of normal distributions defined in Section 3.4.1 and let F0 be the support of ΠF in Hellinger metric. Let G0 be the support of a prior ΠG on G in the weak topology, and let H0 = F0 × G0 . The following corollary proves the BvM theorem for θ. Corollary 4.1. Assume that lim inf n ρmin (Zn ) > 0. With the prior ΠH described above, the BvM theorem holds for the linear mixed regression model provided that η0 ∈ H0 , G0 is thick at 0, and ΠΘ is compactly supported and thick at θ0 , provided (4.1) and (4.3) hold. Proof. We may assume that Θ is compact, and let Θn,1 = Θ and Hn,1 = H0 for all n ≥ 1. It is easy to show that ρmin (vη0 (w)) > 0 for every w and w 7→ vη0 (w) is continuous. We prove in Section A.2.5 that C1 exp(−C2 |x|2 ) ≤ inf inf ψη (x|w) w η∈H0 ≤ sup sup ψη (x|w) ≤ C3 exp(−C4 |x|2 ) (4.15) w η∈H0 for some constants C1 , C2 , C3 , C4 > 0 and large enough |x|. Also, the first and second order partial derivative of x 7→ `η (x|w) are of order O(|x|2 ) as |x| → ∞ for every η ∈ H0 and w, so, with Q(x, w) = C5 (1 + |x|2 ) for some C5 > 0, we have, sup η∈H0 |`η (x + y|w) − `η (x|w)| |sη (x + y|w) − sη (x|w)| ∨ ≤ Q(x, w), |y| |y| for every x, w and small enough |y|, and, Z sup sup Q3 (x, w)ψη (x|w)dµ(x) < ∞. (4.16) (4.17) w η∈H0 We next prove (3.5) with the help of Lemma 4.2. Since ΠΘ (Θn,1 ) = ΠH (Hn,1 ) = 1, the third inequality of (3.5) holds trivially. By (4.15), Z ψη0 (x|w) 2δ0 sup ψη2 (x|w)dµ(x) < ∞, η1 ,η2 ∈H0 ψη (x|w) 20 for sufficiently small δ0 > 0, so combining with (4.17), (4.10) and (4.11) hold for some Q0 . Uniform tightness of F0 and (4.12) is easily satisfied, so the conclusion of Lemma 4.2 holds. By (4.13), the first inequality of (3.5) holds for some rate sequence n,1 because Θ×F0 ×G0 is totally bounded with respect to the product metric | · | × h × dW . Also, by (4.14), the second inequality of (3.5) holds for some n,2 because every | · | × h × dW neighborhoods of (θ0 , f0 , G0 ) has positive prior mass. Thus, (3.5) holds with n = max{n,1 , n,2 }. To complete the proof, equicontinuity of (4.5) is proved in Section A.2.6 and asymptotic tightness of (4.6) in Section A.2.7. It should be noted that the only condition for ΠG is that G0 ∈ G0 . Thus, we can consider both parametric and nonparametric priors for G. For example, the multivariate normal distribution truncated on [−Mb , Mb ]q or the symmetrized DP(α, HG ) prior with a distribution HG on [−Mb , Mb ]q can be used for ΠG . 4.4.2 Random series prior Let ΠF be the random series prior defined in Section 3.4.2 and let F0 be the support of ΠF . Since the distributions in F0 have compact supports, the distributions in G0 , the support of ΠG , should have the same support for (4.4) to hold. Hence, we only consider truncated normal distributions truncated on [−Mb , Mb ]q with positive definite covariance matrixes. That is, G0 = {NMb (0, Σ) : 0 < ρ1 ≤ ρmin (Σ) ≤ ρmax (Σ) ≤ ρ2 < ∞} for some constants ρ1 and ρ2 , where NMb (0, Σ) denotes the truncated normal distribution. Let ΠH = ΠF × ΠG . Corollary 4.2. Assume that lim inf n ρmin (Zn ) > 0 and ρmin (vη0 (w)) > 0 for every w. With the prior ΠH described above, the BvM theorem holds for the linear mixed regression model provided that η0 ∈ H0 , and ΠΘ is compactly supported and thick at θ0 provided (4.1) and (4.3) hold. Proof. Replacing Q and Q0 as constant functions, the proof is almost identical to that of Corollary 4.1, except for the proof of asymptotic tightness of (4.6), which is proved in Section A.2.8. 5 Numerical study In this section, we provide simulation results to illustrate semi-parametric efficacy of the Bayes estimator in the linear mixed effect model. We specialize the model introduced in section 4 slightly: we only consider the random intercept model, Xij = θT Zij + bi + ij , (5.1) where the bi ’s are univariate random effects following a normal distribution with mean 0 and variance σb2 . In simulations, a dataset is generated from model (5.1) with various error distributions. Then, the regression parameters θ are estimated using various methods including both frequentist and Bayesian approaches for comparison. This procedure is 21 0.02 0.06 0.04 0.06 0.08 0.08 0.10 0.10 0.12 0.12 0.14 Figure 1: Density plots of error distribution in E4 (left) and E5 (right). −4 −2 0 2 4 −4 −2 0 2 4 repeated N times and the performance of estimation methods is evaluated by mean squared P (k) (k) 2 error, N −1 N k=1 |θ̂n − θ0 | , where θ̂n is the estimate in the kth simulation. We compare the performance of 3 estimators under 5 error distributions. In all simulations we let Zij = (Zij1 , Zij2 )T , where the Zijk ’s are generated i.i.d. from the Bernoulli distribution 2 are set to be (−1, 1)T and 1, with success probability 1/2. The true parameters θ0 and σ0b respectively. For the error distribution, we consider the standard normal distribution (E1), the Student t-distributions with 2 degree of freedom (E2), the uniform(-3,3) distribution (E3), and two mixtures of normal distribution (E4 and E5). For the mixtures we take, p(x) = K X   πk φ1 (x − µk ) + φ1 (x + µk ) , k=1 with K = 4, (µ1 , µ2 , µ3 , µ4 ) = (0, 1.5, 2.5, 3.5); (π1 , π2 , π3 , π4 ) = (0.1, 0.2, 0.15, 0.05), for E4, and K = 4, (µ1 , µ2 , µ3 , µ4 ) = (0, 1, 2, 4); (π1 , π2 , π3 , π4 ) = (0.05, 0.15, 0.1, 0.2), for E5. These two densities (see Figure 1) have two and three modes, respectively. For the estimators of θ, we consider one frequentist estimator (F) (the maximum likelihood estimator under the assumption of a normal error and normal random effect, which is equal to Henderson’s best linear unbiased estimator [16]), and two Bayesian estimators (B1 and B2). For the two Bayes estimators, we consider two different priors for the distribution of η: the normal distributions with mean 0 and variance σ2 for f and normal distribution with mean 0 and variance σb2 for G (B1), and a symmetrized Dirichlet process mixture for f and normal distribution with mean 0 and variance σb2 for G (B2). Independent inverse Gamma distributions are used for the priors of σ2 and σb2 , and independent diffuse normal distributions are used for the prior of θ. For each error distribution, N = 300 datasets with n = 20 and mi = 5 for all i, are generated. The mean squared errors and relative efficiencies (with respect to B2) of the 22 Table 1: Mean squared error (and relative efficiency with respect to B2) of each methods F, B1 and B2 among N = 300 repetitions for each experiment E1–E5. F B1 B2 0.03 0.03 0.03 (0.98) (0.98) (1.00) 0.27 0.26 0.09 (3.06) (2.99) (1.00) 0.07 0.07 0.05 (1.40) (1.39) (1.00) 0.13 0.12 0.11 (1.18) (1.16) (1.00) 0.19 0.19 0.17 (1.13) (1.12) (1.00) E1 E2 E3 E4 E5 three estimators are summarized in Table 1. B2 dominates the other two estimators when the error distribution is other than the normal. In particular, the losses of efficiency for F and B1 compared to B2 are relatively large when the error distribution has a heavier tail than the normal distribution (e.g. E2). A Appendix A.1 A.1.1 Proofs for Section 3 Proof of (3.10) Since,  1 1 (n)  (n) (n) P0 `θ,η − `θ0 ,η + (θ − θ0 )T Vn,η (θ − θ0 ) 2 η∈HN n  η X − (θ − θ0 )T Zi 1 ≤ sup sup Pη0 log + vη (θ − θ0 )T Zi ZiT (θ − θ0 ) , η(X) 2 i≥1 η∈HN sup where X ∼ Pη0 , it suffices to show that, sup Pη0 log η∈HN η(X − y) y 2 + vη = o(y 2 ), η(X) 2 (A.1) as y → 0. We consider only the case y > 0; the case y < 0 is treated similarly. For η ∈ HN , we 23 have, Z η(x − y) η0 (x)dx η(x) Z ∞ η(x − y/2) η(x − y/2) = log η0 (x + y/2)dx + log η0 (x + y/2)dx η(x + y/2) η(x + y/2) −∞ 0 Z ∞ Z ∞ η(−x − y/2) η(x − y/2) log log = η0 (−x + y/2)dx + η0 (x + y/2)dx η(−x + y/2) η(x + y/2) 0 0 Z ∞ Z ∞ η(x + y/2) η(x − y/2) log log = η0 (x − y/2)dx + η0 (x + y/2)dx η(x − y/2) η(x + y/2) 0 0 Z ∞h    y y i h  y y i =− `η x − − `η x + · η0 x − − η0 x + dx 2 2 2 2 0 Z ∞ h i h i =− `η (x + y) − `η (x) · η0 (x + y) − η0 (x) dx −y/2 Z ∞h i h i =− `η (x + y) − `η (x) · η0 (x + y) − η0 (x) dx + R(y, η), log Z 0 (A.2) 0 where the third equality holds by the symmetry of η and η0 , and, Z 0 h i h i Rn (y, η) = − `η (x + y) − `η (x) · η0 (x + y) − η0 (x) dx. −y/2 Note that supη∈HN |R(y, η)| = o(y 2 ) as y → 0 because (3.6) implies, 0 Z h i h i `η (x + y) − `η (x) · η0 (x + y) − η0 (x) dx |R(y, η)| = −y/2 Z 0 Z = y· ≤ 2y 2 Z ≤ 2y i `η (x + y) − `η (x) · η̇0 (x + ty)dt dx −y/2 0 1Z 0 Q(x + ty) · |sη0 (x + ty)| · η0 (x + ty)dx dt 0 2 1h Z −y/2 1Z 0 0 Q2 (x + ty) · η0 (x + ty)dx dt . y 3 −y/2 for small enough y by the continuity of Q and η0 , where η̇(x) = ∂η(x)/∂x. Finally, a Taylor expansion and Fubini’s theorem imply that the last integral of (A.2) is equal to, y 2 Z 1Z 1Z ∞ sη (x + ty)η̇0 (x + sy) dx dt ds. 0 0 (A.3) 0 Since, y2 vη = −y 2 2 ∞ Z sη (x) η̇0 (x)dx, 0 24 (A.4) the sum of (A.3) and (A.4) is bounded by, y2 1Z 1Z ∞ Z sη (x + ty)η̇0 (x + sy) − sη (x)η̇0 (x) dx dt ds 0 ≤y 2 0 Z 0 1Z 1Z ∞ 0 0 Z n o sη (x + ty) − sη (x + sy) η̇0 (x + sy) dx dt ds 0 1Z ∞h i + y2 sη (x + sy)η̇0 (x + sy) − sη (x)η̇0 (x) dx ds 0 0 Z sy Z sη (x)η̇0 (x)dx ≤ y 3 Q(x)|η̇0 (x)|dx + y 2 sup s∈[0,1] ≤ y 3 Pη0 Q2 + y 2 Z 0 y Q2 (x)η0 (x)dx = O(y 3 ), 0 as y → 0. A.1.2 Proof of (3.12) For a sequence (ηn ) such that ηn ∈ Hn and supη∈Hn d2 (η, η0 ) < d2 (ηn , η0 ) + n−1 , it suffices to show that d2 (ηn , η0 ) → 0. By the definition of Hn , we have h(ηn , η0 ) → 0. We first prove that `ηn converges to `η0 pointwise. Suppose `ηn (x) 9 `η0 (x) for some x ∈ D. Then we can choose an  > 0 and a subsequence m(n) such that m(n) ≥ N and |`ηm(n) (x) − `η0 (x)| >  for every n. Note that `η is continuously differentiable and the derivative of `η is bounded by a continuous function Q uniformly in η ∈ HN by (3.6). Thus we can choose a δ > 0 such that |`ηm(n) (y) − `η0 (y)| > /2 for every n ≥ 1 and y with |y − x| < δ. Note that δ > 0 can be chosen sufficiently q small so that η0 (y) > η0 (x)/2 for every y with |y − x| < δ. Since `ηm(n) (y) − `η0 (y) = 2 log ηm(n) (y)/η0 (y), there exists q a ¯ > 0 such that 1 − ηm(n) (y)/η0 (y) > ¯ for every n ≥ 1 and y with |y − x| < δ. Note that, h2 (ηm(n) , η0 ) ≥ r   ηm(n) 2 1− dPη0 ≥ δ¯ 2 η0 (x) > 0, η 0 (x−δ,x+δ) Z for every n ≥ 1, which contradicts h(ηn , η0 ) → 0. Conclude that `ηn (x) → `η0 (x), for every x. By (3.6), we have for every sufficiently small y > 0, 2  2 `η (x + y) − `η (x) + sη0 (x) − sη (x) − sη0 (x) dPη0 (x) y Z Z 1h i sη (x + ty) − sη (x) dt Z  sup η∈HN = sup η∈HN 0   `η (x + y) − `η (x) × − sη (x) + 2sη0 (x) dPη0 (x) y   Z `η (x + y) − `η (x) ≤ sup y Q(x) × − sη (x) + 2sη0 (x) dPη0 (x) y η∈HN = o(1), 25 as y ↓ 0. By the Moore-Osgood theorem [32], this enables us to interchange the two limits in the following equality 2 `ηn (x + y) − `ηn (x) + sη0 (x) dPη0 (x) n→∞ y↓0 y 2 Z  `ηn (x + y) − `ηn (x) = lim lim + sη0 (x) dPη0 (x). y↓0 n→∞ y lim Pη0 (sηn − sη0 )2 = lim lim n→∞ Z  (A.5) The right-hand side of (A.5) is equal to 0 by dominated convergence based on pointwise convergence of `ηn to `η0 . A.1.3 Proof of Lemma 3.1 Since η0 is continuous and η0 (0) > 0, there exist constants C > 0 and δ > 0 such that R∞ γ η0 (x)dx < 1/2 − C(γ ∧ δ) for every γ > 0. Let  > 0 be a constant such that  < aCδ, where a2 = lim inf n ρmin (Zn )/(2L2 ).  For a given large enough n, fix η ∈ Hn with hn (θ, η), (θ0 , η0 ) < . Since the Hellinger distance is bounded below by half of the total variational distance, we have, h2 (pθ,η,i , pθ0 ,η0 ,i ) ≥ d2V (pθ,η,i , pθ0 ,η0 ,i )/4 = sup |Pθ,η,i (B) − Pθ0 ,η0 ,i (B)|2 . (A.6) B By letting B = [θT Zi , ∞) in (A.6), we have, Z ∞ 2 1 2 h2 (pθ,η,i , pθ0 ,η0 ,i ) ≥ ≥ C 2 |(θ − θ0 )T Zi | ∧ δ . η0 (x)dx − 2 |(θ−θ0 )T Zi | (A.7) Let Nδ,n = {i ≤ n : |(θ − θ0 )T Zi | ≥ δ} and let Nδ,n denote its cardinality. Then (A.7) implies, 2 ≥ h2n ((θ, η), θ0 , η0 )) ≥ n 2 C2 X |(θ − θ0 )T Zi | ∧ δ n i=1 ≥ C 2 Nδ,n δ 2 C 2 X + |(θ − θ0 )T Zi |2 . n n (A.8) i∈N / δ,n The first term of (A.8) is greater than Nδ,n 2 /(na2 ) since  < aCδ, which implies Nδ,n /n < a2 . On the other hand, for the second term of (A.8), note that, X T |(θ − θ0 ) Zi | ≥ Pn i=1 |(θ n X |(θ − θ0 )T Zi |2 − Nδ,n max |(θ − θ0 )T Zi |2 i i=1 i∈N / δ,n Since 2 − θ0 )T Zi |2 ≥ n|θ − θ0 |2 ρmin (Zn ) and maxi |(θ − θ0 )T Zi |2 ≤ L2 |θ − θ0 |2 , we have,  Nδ,n  C2 X |(θ − θ0 )T Zi |2 ≥ C 2 |θ − θ0 |2 ρmin (Zn ) − L2 . n n (A.9) i∈N / δ,n and a2 = lim inf n ρmin (Zn )/(2L2 ), (A.8) and (A.9) together imply  |θ − θ0 |2 ≤ K1 2 , where K1 = 2/ C 2 ρmin (Zn ) . Since Nδ,n /n < a2 26 The proof is complete if we show that h(η, η0 ) < K for some constant K > 0. Note that for every i,  h2 (η, η0 ) = h2 (pθ,η,i , pθ,η0 ,i ) ≤ 2 h2 (pθ,η,i , pθ0 ,η0 ,i ) + h2 (pθ0 ,η0 ,i , pθ,η0 ,i ) . (A.10) In addition, there exists a constant K2 > 0 such that, sup h2 (pθ0 ,η0 ,i , pθ,η0 ,i ) ≤ K2 |θ − θ0 |2 , (A.11) i for every θ that is sufficiently close to θ0 because (denote η̇0 = dη0 /dx), Z p η0 (x + y) − Z 2 p η0 (x) dx = y 2 Z 0 ≤ y2 1 Z Z 0 η̇0 (x + ty) η0 (x + ty) 2 1 2 η̇ (x + ty) p0 dt dx η0 (x + ty) η0 (x + ty) dt dx ≤ y 2 Pη0 Q2 , for small enough y, where the last inequality holds by Fubini’s theorem and (3.6). So we have, n  1X 2 h2 (pθ,η,i , pθ0 ,η0 ,i ) + h2 (pθ0 ,η0 ,i , pθ,η0 ,i ) n 2 h (η, η0 ) ≤ i=1 2 2hn ((θ, η), (θ0 , η0 )) ≤ + 2K2 |θ − θ0 |2 , where the first inequality holds by (A.10) and the second inequality holds by the definition of hn and (A.11). Since we have already shown that |θ − θ0 |2 < K1 2 , we conclude that √ h(η, η0 ) ≤ K, where K = 2 + 2K1 K2 . A.1.4 Proof of (3.16) fn → ∞ with M fn /√n → 0, We start by proving the following two claims: for every M  o hT ˙(n) (n) (n) fn2 ), sup sup `θn (h),η − `θ0 ,η − √ `θ0 ,η = oP0 (M (A.12) n N fn η∈H |h|≤M and, sup √ sup fn <|h|< n M η∈HN  (n) (n) `θn (h),η − `θ0 ,η o · |h|−2 = oP0 (1), (A.13) for sufficiently small  > 0. First, the equality,  o Z 1 hT ˙(n) hT (n) (n) (n) (n) `θn (h),η − `θ0 ,η − √ `θ0 ,η =√ (`˙ − `˙θ0 ,η )o dt, n n 0 θn (th),η implies that the left-hand side of (A.12) is bounded by, fn (n) M (n) sup √ (`˙θn (h),η − `˙θ0 ,η )o . n N fn η∈H |h|≤M sup 27 (A.14) Since, 1 (n) (n) sup √ (`˙θn (h),η − `˙θ0 ,η )o = OP0 (1), n N f |h|≤Mn η∈H sup f2 ). by asymptotic tightness of (3.7), we conclude (A.14) is of order oP0 (M n Similarly by the equality,  (n) (n) `θn (h),η − `θ0 ,η o hT =√ n Z 1 0 (n) `˙θn (th),η o dt, the left-hand side of (A.13) is bounded by, hT  (n) o sup √ `˙θn (h),η · |h|−2 . √ η∈H n f n Mn <|h|< n sup (A.15) By asymptotic tightness of (3.7), 1  (n) o sup √ `˙θn (h),η = OP0 (1), n fn <|h|<√n η∈Hn M sup so (A.15) is of order oP0 (1). Next, we show that for every C1 > 0, there exists a C2 > 0 such that, (n) P0  Z inf η∈Hn Θ (n) pθ,η (n) pθ0 ,η  dΠΘ (θ) ≥ C2 Mn √ n p e −C1 Mn2  → 1. (A.16) Let, Φn (h, η) = (n) `θn (h),η − (n) `θ0 ,η = 5 X An,i (h, η), i=1 where,  o hT ˙(n) (n) (n) An,1 (h, η) = `θn (h),η − `θ0 ,η − √ `θ0 ,η , n 1 T An,2 (h, η) = h (Vn,η0 − Vn,η )h, 2  hT  (n) (n) (n) An,3 (h, η) = √ `˙θ0 ,η − P0 `˙θ0 ,η , n 1 T An,4 (h, η) = − h Vn,η0 h, 2   1 (n) (n) (n) An,5 (h, η) = P0 `θn (h),η − `θ0 ,η + hT Vn,η h. 2 R R Note that exp(Φn (h, η))dΠn (h) ≥ |h|≤C1 Mn exp(Φn (h, η))dΠn (h), where Πn is the prior √ for the centred and rescaled parameter h = n(θ − θ0 ). For h and η ∈ Hn with |h| ≤ C1 Mn , the suprema of |An,1 (h, η)| and |An,2 (h, η)| are of order oP0 (Mn2 ) by (A.12) and (2.3), respectively. The supremum of |An,3 (h, η)| is of the same order by asymptotic tightness of (3.7). The quantity |An,4 (h, η)| is uniformly bounded by C12 Mn2 kVn,η0 k/2 and 28 the supremum of |An,5 (h, η)| is of order o(Mn2 ) by (3.10). Therefore, for |h| ≤ C1 Mn and η ∈ Hn , Φn (h, η) is uniformly bounded below by,   C2 Mn2 − 1 · kVn,η0 k + oP0 (1) . 2 Thus, (n) Z Z pθ,η exp(Φn (h, η))dΠn (h) dΠΘ (θ) ≥ (n) Θ p |h|≤C1 Mn θ0 ,η  Z   C2 2 1 ≥ √ exp Mn − · kVn,η0 k + oP0 (1) dΠΘ (θ). 2 n|θ−θ0 |≤C1 Mn (A.17) Also, the thickness of ΠΘ at θ0 implies that, √ √ ΠΘ {θ : n|θ − θ0 | ≤ C1 Mn } ≥ C2 (Mn / n)p , for some C2 > 0. Since lim supn ρmax (Vn,η0 ) < ∞ by (2.4), and C1 > 0 is arbitrary, we conclude that (A.16) holds. Finally, we prove that there exist C > 0 and  > 0 such that, (n)   pθn (h),η (n) C|h|2 P0 sup √ sup e ≤ 1 → 1. (n) Mn <|h|< n η∈Hn pθ ,η 0 For given δ > 0, by (3.10), there exists an  > 0 such that   1 (n) (n) (n) sup P0 `θn (h),η − `θ0 ,η + hT Vn,η h < δ · |h|2 , 2 η∈HN √ for every h with |h| < n. Write, (n) log pθn (h),η (n) pθ0 ,η = 4 X Bn,i (h, η), (A.18) (A.19) (A.20) i=1 where,  (n) (n) o `θn (h),η − `θ0 ,η ,   1 (n) (n) (n) Bn,2 (h, η) = P0 `θn (h),η − `θ0 ,η + hT Vn,η h, 2 1 T Bn,3 (h, η) = h (Vn,η0 − Vn,η )h, 2 1 Bn,4 (h, η) = − hT Vn,η0 h. 2 √ For Mn < |h| <  n and η ∈ Hn , |Bn,1 (h, η)| and |Bn,3 (h, η)| are bounded by |h|2 × oP0 (1) Bn,1 (h, η) =  by (A.13) and (2.3), respectively, where the oP0 (1) term does not depend on h and η. Furthermore, |Bn,2 (h, η)| ≤ δ|h|2 by (A.19), and Bn,4 (h, η) ≤ −ρmin (Vn,η0 )|h|2 /2. Thus, (A.20) is bounded above by,  1  |h|2 · − ρmin (Vn,η0 ) + δ + oP0 (1) , 2 √ for every h with |h| < n and η ∈ Hn . Since δ > 0 can be arbitrarily small and lim inf n ρmin (Vn,η0 ) > 0 by (2.4), we conclude that (A.18) holds for C < lim inf n ρmin (Vn,η0 )/2. 29 A.1.5 Proof of (3.21) For the first inequality of (3.21), note that, p p p √ √ √ | a1 + a2 − b1 + b2 | ≤ | a1 − b1 | + | a2 − b2 |, and (a1 + b1 )2 ≤ 2(a21 + b21 ) for any a1 , a2 , b1 , b2 ≥ 0. Thus, r  Z r p + p− q + q− 2 2 − dµ h (p̄, q̄) = 2 2 Z p p √ √ ≤ ( p − q)2 + ( p− − q − )2 dµ = 2h2 (p, q), and so h(p̄, q̄) ≤ √ 2h(p, q) for any two densities p and q supported on D. For the second and third inequalities of (3.21), we may assume that p is symmetric. Then,  q + q −  dP K(p̄, q̄) = K(p, q̄) = log p − log 2  Z  Z  1n q q− o 1 p p  ≤ log p − log + log dP = log + log − dP, 2 2 2 2 q q Z  where the inequality holds by the concavity of x 7→ log(x). Also, the symmetry of p implies R R that log(p/q − )dP = log(p/q)dP and so K(p̄, q̄) ≤ K(p, q). In addition, Z  V (p̄, q̄) = V (p, q̄) ≤ log p − log  q + q − 2 2 Z  dP = 2p log q + q− 2 dP. Since p/q ∧ p/q − ≤ 2p/(q + q − ) ≤ p/q ∨ p/q − , we have, log and so V (p̄, q̄) ≤ 4 A.1.6 R 2p p p ≤ log + log − , q + q− q q 2  log(p/q) dP = 4 V (p, q) + K 2 (p, q) . Proof of (3.22) Assume that  > 0 is sufficiently small and |θ1 − θ2 | ∨ |θ − θ0 | < . Using (3.19) and the fact that (a + b)2 ≤ 2(a2 + b2 ) for all a, b ∈ R, we have the second and third inequalities of (3.22) because, Z (`θ0 ,η0 ,i − `θ0 ,η,i ) + (`θ0 ,η,i − `θ,η,i )dPθ0 ,η0 ,i K(pθ0 ,η0 ,i , pθ,η,i ) = . K(η0 , η) + |θ − θ0 |, and, Z V (pθ0 ,η0 ,i , pθ,η,i ) ≤ 2 (`θ0 ,η0 ,i − `θ0 ,η,i )2 + (`θ0 ,η,i − `θ,η,i )2 dPθ0 ,η0 ,i . V (η0 , η) + K 2 (η0 , η) + |θ − θ0 |2 , 30 for every η ∈ H0 . For the first inequality of (3.22), h(pθ1 ,η1 ,i , pθ2 ,η2 ,i ) ≤ h(pθ1 ,η1 ,i , pθ1 ,η2 ,i ) + h(pθ1 ,η2 ,i , pθ2 ,η2 ,i ) = h(η1 , η2 ) + h(pθ1 ,η2 ,i , pθ2 ,η2 ,i ) . h(η1 , η2 ) + |θ1 − θ2 |, for every η1 , η2 ∈ H0 , where the last inequality holds because, with η̇(x) = dη(x)/dx and yi = |(θ1 − θ2 )T Zi |, Z p 2 p η(x + yi ) − η(x) dx 2 Z Z 1 η̇(x + tyi ) 2 p = yi dt dx η(x + tyi ) 0  Z Z 1 η̇(x + tyi ) 2 2 e2 , ≤ yi η(x + tyi ) dt dx ≤ yi2 Pη Q η(x + ty ) i 0 h2 (pθ1 ,η,i , pθ2 ,η,i ) = for every η ∈ H0 . A.1.7 Proof of the asymptotic tightness of (3.23) Without loss of generality we may assume that θ0 is equal to the zero vector. For given a ∈ Rp , let, √ Zni (θ, η) = aT `˙θ,η,i / n, Sni = sup sup |Zni (θ, η)|, θ∈B η∈H0 and F = B × H0 . Let N[]n (δ, F) be the minimal number of sets N in a partition {Fj : 1 ≤ j ≤ N } of F such that, n X P0 sup Zni (θ1 , η1 ) − Zni (θ2 , η2 ) 2 ≤ δ2, (A.21) (θ1 ,η1 )∈Fj (θ2 ,η2 )∈Fj i=1 for every j ≤ N . The bracketing central limit theorem (Theorem 2.11.9 of [33]) assures that if , n X  P0 Sni 1{Sni >γ} = o(1) i=1 Z δn 0 for every γ > 0, (A.22) q log N[]n (δ, F) dδ < ∞, for every δn ↓ 0, then (3.23) is asymptotically tight. Since |Zi |’s are bounded and the mean probability H of the Dirichlet process is compactly supported, there exist functions Qj for j = 1, 2, such that Qj (x) = Cj (1 + |x|j ) for some constants Cj > 0, and, |`η (x + y) − `η (x)| ≤ |y| · Q1 (x), |sη (x + y) − sη (x)| ≤ |y| · Q2 (x), 31 (A.23) for every η ∈ H0 , x and y with |y| ≤ L (see Lemma 3.2.3 of [8] for details). Thus √ n|Zni (θ, η)| . Q1 (Xi ) for every i ≤ n and (θ, η) ∈ F. Since Q1 is Pη0 -square-integrable, n X   √ P0 Sni 1{Sni >γ} ≤ nPη0 Q1 1{Q1 >√nγ} ≤ γ −1 Pη0 Q21 1{Q1 >√nγ} = o(1), (A.24) i=1 for every γ > 0, so the first condition of (A.22) is satisfied. Note that, |Zni (θ1 , η1 )−Zni (θ2 , η2 )| (A.25) ≤ |Zni (θ1 , η1 ) − Zni (θ2 , η1 )| + |Zni (θ2 , η1 ) − Zni (θ2 , η2 )|. The first term of the right-hand side of (A.25) is bounded by, 1 |θ1 − θ2 | sup |Zni (θ1 , η) − Zni (θ2 , η)| . sup √ `˙θ1 ,η,i − `˙θ2 ,η,i . √ Q2 (Xi ). n n η∈H0 η∈H0 For every y with |y| ≤ L, let Sy = {x 7→ sη (x − y) : η ∈ H0 }. and second derivatives of x 7→ sη (x − y) are of order 2 O(e−Cx ) |y| ≤ L and η ∈ H0 ) and η0 (x) = O(x2 ) and (A.26) Since the first O(x3 ), (uniformly in for some C > 0 as |x| → ∞, we have sup|y|≤L log N[] (δ, Sy , L2 (Pη0 )) . δ −1/2 for every small enough δ > 0 by Corollary 2.7.4 of [33] with α = r = 2, d = 1, V = 1/2 and a partition R = ∪∞ j=−∞ [j − 1, j). Asδ sume that some sufficiently small δ > 0 is given and we choose a sequence (yj )N j=0 such that −L = y0 < y1 < · · · < yNδ = L and yj+1 − yj < δ. Since Nδ . δ −1 and log N[] (δ 3/2 , Sy , L2 (Pη0 )) . δ −3/4 , we can construct a partition {Hl : 1 ≤ l ≤ N δ } of H0 by taking all intersections of sets in Nδ + 1 partitions, so that log N δ ≤ Nδ · log N[] (δ 3/2 , Sy , L2 (Pη0 )) . δ −7/4 and, Z sup |sη1 (x − yj ) − sη2 (x − yj )|2 dPη0 (x) ≤ δ 3 , η1 ,η2 ∈Hl for every l and j. Applying Lemma 2.2.2 of [33] with ψ(x) = x2 , we have, Z max sup |sη1 (x − yj ) − sη2 (x − yj )|2 dPη0 (x) . δ 2 , 1≤j≤Nδ η1 ,η2 ∈Hl (A.27) for every l. Now, consider the second term of the right-hand side of (A.25). For every θ ∈ B and i ≥ 1, we can choose j such that |θT Zi − yj | ≤ δ. Then, 2 Zni (θ, η1 ) − Zni (θ, η2 ) . . . so we have, P0 X n sup 1 ˙ 2 `θ,η1 ,i − `˙θ,η2 ,i n 1 |sη (Xi − θT Zi ) − sη2 (Xi − θT Zi )|2 n 1 δ2 2 1 Q2 (Xi ) + |sη1 (Xi − yj ) − sη2 (Xi − yj )|2 , n n sup 2 Zni (θ, η1 ) − Zni (θ, η2 ) i=1 θ∈B η1 ,η2 ∈Hl 32  . δ2, (A.28) for every l. Finally, the two bounds (A.26) and (A.28) combined with (A.25), imply that, n X i=1 P0 sup Zni (θ1 , η1 ) − Zni (θ2 , η2 ) 2 . δ2, |θ1 −θ2 |≤δ η1 ,η2 ∈Hl for every l. Since N (δ, B , | · |) . δ −p , a partition satisfying (A.21) can be constructed by product sets of each partition of B and H0 , the order of which is bounded as (for some constant K > 0), log N[]n (δ, F) . log N Kδ + log δ −p . δ −7/4 , (A.29) so the second condition of (A.22) is satisfied. A.1.8 Proof of asymptotic tightness in Corollary3.2 We follow the steps of the proof of asymptotic tightness in Corollary 3.1. Without loss of generality we assume that θ0 = 0, and define Zni (θ, η), Sni , F and N[]n (δ, F) as in the proof of Corollary 3.1. The first condition of (A.22) is proved by replacing Qj ’s as constant functions. Inequalities (A.25) and (A.26) are shown to hold in the same way. Let S = {x 7→ sη (x) : η ∈ H0 }. Applying Theorem 2.7.1 of [33] with α = d = 1, we have log N (δ, S, k · k∞ ) . δ −1 . This implies that there exists a partition {Hl : 1 ≤ l ≤ N δ } of H0 such that N δ . δ −1 and, sup sup |sη1 (x) − sη2 (x)| < δ, η1 ,η2 ∈Hl x∈D for every l. Thus, (A.28) holds. Replacing the entropy bound (A.29) by, log N[]n (δ, F) . log N Kδ + log δ −p . δ −1 , we follow the remainder of the proof of Corollary 3.1. A.2 A.2.1 Proofs for Section 4 Proof of (4.7) Since,  1 1 (n)  (n) (n) P0 `θ,η − `θ0 ,η + (θ − θ0 )T Vn,η (θ − θ0 ) 2 η∈HN n   ψη (Xi − ZiT θ|Wi ) 1 ≤ sup P0 log + (θ − θ0 )T Zi vη (Wi )ZiT (θ − θ0 ) , T θ |W ) 2 ψ (X − Z i,η η i i i 0 sup where i runs over the integers and η over HN , it suffices to show that, Z ψη (x − y|w) w 1 sup sup log dΨη0 (x) + y T vη (w)y = o(|y|2 ), ψη (x|w) 2 w η∈HN 33 (A.30) as |y| → 0. Let A = {x = (x1 , . . . , xm ) : x1 > 0} and A− = {x : −x ∈ A}. Note that, ψη (x|w) = ψη (−x|w) = ψη (x| − w) = ψη (−x| − w), by the symmetry of f and G. Thus, for η ∈ HN , Z Z ψη (x − y|w) ψη (x − y|w) w dΨη0 (x) = log ψη0 (x|w)dµ(x) log ψη (x|w) ψη (x|w) Z ψη (x − y/2|w) log = ψη (x + y/2|w)dµ(x) ψη (x + y/2|w) 0 A− Z ψη (x − y/2|w) + log ψη (x + y/2|w)dµ(x) ψη (x + y/2|w) 0 A Z ψη (−x − y/2|w) log = ψη (−x + y/2|w)dµ(x) ψη (−x + y/2|w) 0 A Z ψη (x − y/2|w) log ψη (x + y/2|w)dµ(x) + ψη (x + y/2|w) 0 Z hA   y  y i =− `η x − w − `η x + w 2 2 A h   y  y i × ψη0 x − w − ψη0 x + w dµ(x). 2 2 (A.31) The last integral of (A.31) is equal to, Z 1Z 1Z − y T sη (x + r(y, t)|w)sTη0 (x + r(y, s)|w)y 0 0 A × ψη0 (x + r(y, s)|w) dµ(x)dtds, by Taylor expansion, where r(y, t) = (t − 1/2)y. Since, Z vη (w) = 2 sη (x|w) sTη0 (x|w)dΨw η0 (x), A the left-hand side of (A.30), for fixed w and η, is equal to, Z 1Z 1Z h T sη (x + r(y, t)|w)sTη0 (x + r(y, s)|w)ψη0 (x + r(y, s)|w) −y 0 0 A  i T − sη (x|w)sη0 (x|w)ψη0 (x|w) dµ(x)dt ds y. The integrand of the last display is equal to Aη (x, y, w) + Bη (x, y, w), where, Aη (x, y, w) = sη (x + r(y, t)|w) n o × sTη0 (x + r(y, s)|w)ψη0 (x + r(y, s)|w) − sTη0 (x|w)ψη0 (x|w) , and, n o Bη (x, y, w) = sη (x + r(y, t)|w) − sη (x|w) sTη0 (x|w)ψη0 (x|w), (dependence on t and s is abbreviated for simplicity). Let gη,j (x|w) = ∂`η (x|w)/∂xj and ej be the jth unit vector in Rm . By (4.4), it is easy to prove that, Z sup sup sup |eTi Bη (x, y, w)ej |dµ(x) = o(1), w η∈HN t,s∈[0,1] A 34 as |y| → 0. Also, by (4.4),   T ∂(sη0 ψη0 ) (x|w) ej ≤ (Q + Q2 )(x, w)ψη0 (x|w), ei ∂x for every i, j ≤ m. Thus, |eTi Aη (x, y, w)ej | is bounded by, Z 1 (Q + Q2 )(x + r(y, s)u, w)ψη0 (x + r(y, s)u|w)du |y| · |gη,i (x + r(y, t)|w)| · 0 Z 1n o 2 3 ≤ |y|(1 + |y|) · (Q + Q )(x + r(y, s)u, w)ψη0 (x + r(y, s)u|w) du, 0 where the inequality in the second line holds because, |gη,i (x + r(y, t)|w)| ≤ |gη,i (x + r(y, t)|w) − gη,i (x + r(y, s)u|w)| + |gη,i (x + r(y, s)u|w)| ≤ (1 + |y|)Q(x + r(y, s)u, w). Therefore, Z sup sup s,t∈[0,1] η∈HN |eTi Aη (x, y, w)ej |dµ(x)dtds A Z ≤ |y|(1 + |y|) (Q2 + Q3 )(x, w)dΨw η0 (x), which is o(1), uniformly in w, as |y| → 0. A.2.2 Proof of (4.8) To prove (4.8), it suffices to show, lim sup dWi (η, η0 ) = 0, n→∞ η∈Hn for every i ≥ 1 because Wi is contained in a compact set, (4.3) holds, and (4.5) is uniformly equicontinuous (note that equicontinuity on a compact domain is equivalent to uniform equicontinuity). For given i ≥ 1, since supη∈HN dWi (η, η0 ) < ∞ by (4.4), we can choose ηn ∈ Hn , for large enough n such that, sup dWi (η, η0 ) < dWi (ηn , η0 ) + n−1 . η∈Hn Note that hn (ηn , η0 ) → 0 by the definition of Hn . Since, n h2n (ηn , η0 ) = 1X 2 h (ψηn (·|Wj ), ψη0 (·|Wj )), n j=1 Wj is contained in a compact set, (4.3) holds, and (4.5) is uniformly equicontinuous, we have limn→∞ h(ψηn (·|Wj ), ψη0 (·|Wj )) = 0 for every j ≥ 1. Thus, it suffices to show that dWi (ηn , η0 ) → 0. For simplicity, we write Wi = w in the remainder of this proof. 35 We first prove that limn→∞ `ηn (x|w) = `η0 (x|w) for every x. Suppose `ηn (x|w) 9 `η0 (x|w) for some x. Then we can choose an  > 0 and a subsequence m(n) such that m(n) ≥ N and |`ηm(n) (x|w) − `η0 (x|w)| >  for every n. Note that x 7→ `η (x|w) is continuously differentiable and its derivative is bounded componentwise by a continuous function x 7→ Q(x, w) uniformly in η ∈ HN by (4.4). Thus we can choose a δ > 0 such that |`ηm(n) (y|w) − `η0 (y|w)| > /2 for every n ≥ 1 and a y with |y − x| < δ. Note that δ > 0 can be chosen sufficiently small so that ψη0 (y|w) > ψη0 (x|w)/2 for every y with |y − x| < δ. Since, `ηm(n) (y|w) − `η0 (y|w) = 2 log q ψηm(n) (y|w)/ψη0 (y|w), there exists a ¯ > 0 such that, 1− q ψηm(n) (y|w)/ψη0 (y|w) > ¯, for every n ≥ 1 and y with |y − x| < δ. Since, h2 (ψηm(n) (·|w), ψη0 (·|w)) s  2 ψηm(n) ≥ 1− (y|w) dΨw η0 (y) ψη0 {y:|y−x|<δ} Z ψη0 (x|w) 2 dy ≥ γ, ≥ ¯ 2 {y:|y−x|<δ} Z for some γ > 0 and every n ≥ 1, the above contradicts the fact that h(ψηn , ψη0 ) → 0, so we conlude that `ηn (x|w) → `η0 (x|w) for all x. Let ej be the jth unit vector in Rm and gη,j (x|w) = ∂`η (x|w)/∂xj . Then as y → 0 in R, 2 `η (x + yej |w) − `η (x|w) − gη0 ,j (x|w) sup y η∈HN  2 − gη,j (x|w) − gη0 ,j (x|w) dΨw η0 (x) Z Z 1 = sup |gη,j (x + tyej |w) − gη,j (x|w)| dt Z  η∈HN 0  `η (x + yej |w) − `η (x|w) − gη,j (x|w) + 2gη0 ,j (x|w) dΨw × η0 (x) y Z `η (x + yej |w) − `η (x|w) ≤ |y| Q(x, w) − gη,j (x|w) y  + 2gη0 ,j (x|w) dΨw η0 (x) = o(1), where the last line holds by (4.4). The Moore-Osgood theorem enables the interchange of 36 the two limits in the following equality: Z n o2 lim gηn ,j (x|w) − gη0 ,j (x|w) dΨw η0 (x) n→∞ 2 Z  `ηn (x + yej |w) − `η0 (x|w) = lim lim − gη0 ,j (x|w) dΨw η0 (x) n→∞ y→0 y 2 Z  `ηn (x + yej |w) − `η0 (x|w) − gη0 ,j (x|w) dΨw = lim lim η0 (x) y→0 n→∞ y Z n o2 = gη0 ,j (x|w) − gη0 ,j (x|w) dΨw η0 (x) = 0. Conclude that dw (ηn , η0 ) = o(1). A.2.3 Proof of Lemma 4.1 Let ψη,j (xj |wj ) be the marginal density of the jth coordinate, that is ψη,j (xj |wj ) = R f (xj − bT wj )dG(b). Since G0 is thick at 0 and f0 is continuous and positive at 0, there exists a γ > 0 such that inf |xj |≤γ inf wj ψη0 ,j (xj |wj ) > 0. Thus, as in (A.7), there e > 0 and δ > 0 such that, exist constants C  e 2 δ ∧ |(θ − θ0 )T Zij | 2 , h2 (pθ,η,i , pθ0 ,η0 ,i ) ≥ C √ for every j ≤ m. Since maxj≤m |(θ − θ0 )T Zij | ≥ |(θ − θ0 )T Zi |/ m, 2 h2 (pθ,η,i , pθ0 ,η0 ,i ) ≥ C 2 δ ∧ |(θ − θ0 )T Zi | , e √m. Let  > 0 be a constant such that  < aCδ, where a2 = lim inf n ρmin (Zn )/(2mL2 ), where C = C/  For a given large enough n, fix η ∈ Hn with hn (θ, η), (θ0 , η0 ) < . Let Nδ,n = {i ≤ n : |(θ − θ0 )T Zi | ≥ δ} and let Nδ,n denote its cardinality. Then, the last display implies, 2  ≥ h2n ((θ, η), (θ0 , η0 )) ≥ ≥ n 2 C2 X |(θ − θ0 )T Zi | ∧ δ n i=1 2 C Nδ,n δ 2 n + C2 X |(θ − θ0 )T Zi |2 . n (A.32) i∈N / δ,n The first term of (A.32) is greater than Nδ,n 2 /(na2 ) since  < aCδ, which implies Nδ,n /n < a2 . On the other hand, for the second term of (A.32), note that, X |(θ − θ0 )T Zi |2 ≥ Pn i=1 |(θ |(θ − θ0 )T Zi |2 − Nδ,n max |(θ − θ0 )T Zi |2 . i i=1 i∈N / δ,n Since n X − θ0 )T Zi |2 ≥ n|θ − θ0 |2 ρmin (Zn ) and maxi |(θ − θ0 )T Zi |2 ≤ mL2 |θ − θ0 |2 , we have,  Nδ,n  C2 X |(θ − θ0 )T Zi |2 ≥ C 2 |θ − θ0 |2 ρmin (Zn ) − mL2 . n n i∈N / δ,n 37 (A.33) Since Nδ,n /n < a2 and a2 = lim inf n ρmin (Zn )/(2mL2 ), (A.32) and (A.33) together imply  |θ − θ0 |2 ≤ K1 2 , where K1 = 2/ C 2 ρmin (Zn ) . The proof would be complete if we show that hn (η, η0 ) < K for some constant K > 0. Note that for every i, n h2n (η, η0 ) = ≤ = 1X 2 h (pθ,η,i , pθ,η0 ,i ) n 2 n 2 n i=1 n X i=1 n X  h2 (pθ,η,i , pθ0 ,η0 ,i ) + h2 (pθ0 ,η0 ,i , pθ,η0 ,i ) h2 (pθ,η0 ,i , pθ0 ,η0 ,i ) + 2h2n ((θ, η), θ0 , η0 )) i=1 n 2X 2 ≤ h (pθ,η0 ,i , pθ0 ,η0 ,i ) + 22 , n i=1 Note also that, q ∂ pθ,η,i (x) 1 ∂ q T ∂θ p pθ,η,i (x) = = Zi sη (x − Zi θ|Wi ) pθ,η,i (x) ∂θ 2 2 pθ,η,i (x) Thus, with θ(t) = θ0 + t(θ − θ0 ), Z q q 2 2 h (pθ,η0 ,i , pθ0 ,η0 ,i ) = pθ,η0 ,i (x) − pθ0 ,η0 ,i (x) dµ(x) Z Z 1 2 1 (θ − θ0 )T Zi sη0 x − ZiT θ(t)|Wi pθ(t),η0 ,i (x) dtdµ(x) ≤ 4 Z 0 2 1 i (θ − θ0 )T Zi sη0 (x|Wi ) dΨW = η0 (x) 4 (A.34) ≤ K2 |θ − θ0 |2 , for some K2 > 0 by (4.4), where the inequality in the second line of (A.34) holds by Jensen’s inequality. Thus, h2n (η, η0 ) ≤ 2K2 |θ − θ0 |2 + 22 ≤ 2(K1 K2 + 1)2 . A.2.4 Proof of Lemma 4.2 Let η1 = (f1 , G1 ) and η2 = (f2 , G2 ) be elements of H0 , θ1 , θ2 ∈ Θ and let η12 = (f1 , G2 ). Since (4.10) and (4.11) hold, it can be shown, in a manner similar to (A.34), that, sup sup h(pθ1 ,η,i , pθ2 ,η,i ) ≤ C|θ1 − θ2 |, i≥1 η∈H0 for some constant C > 0. Recall that h(P ∗ G, Q ∗ G) ≤ h(P, Q) for arbitrary probability measures P, Q and G (where ∗ denotes convolution). Then, h(pθ1 ,η1 ,i , pθ2 ,η2 ,i ) ≤ h(pθ1 ,η1 ,i , pθ1 ,η2 ,i ) + h(pθ1 ,η2 ,i , pθ2 ,η2 ,i )  ≤ h ψη1 (·|Wi ), ψη2 (·|Wi ) + C|θ1 − θ2 |   ≤ h ψη1 (·|Wi ), ψη12 (·|Wi ) + h ψη12 (·|Wi ), ψη2 (·|Wi ) + C|θ1 − θ2 |  ≤ h ψη1 (·|Wi ), ψη12 (·|Wi ) + h(f1m , f2m ) + C|θ1 − θ2 |,  = h ψη1 (·|Wi ), ψη12 (·|Wi ) + o(1), 38 as h(f1 , f2 ) ∨ |θ1 − θ2 | → 0, where f m is the m-fold product density of f . To prove (4.13),  it now suffices to show that h ψη1 (·|Wi ), ψη12 (·|Wi ) = o(1) as dW (G1 , G2 ) → 0. By (4.12), there exists a constant C1 > 0 such that, sup sup f ∈F0 x,w m Y f (xj − bT1 wj ) − j=1 m Y f (xTj − b2 wj ) ≤ C1 |b1 − b2 |, j=1 for every b1 , b2 ∈ [−Mb , Mb ]q . So by Theorem 2 of [15] (the equivalence of Lévy-Prohorov and Wasserstein metrics), sup |ψη1 (x|w) − ψη12 (x|w)| ≤ C2 dW (G1 , G2 ), (A.35) x,w for some C2 > 0 that depends only on C1 . Since w ranges over a compact set, inequality (A.35) and uniform tightness of F0 imply that,  sup dV ψη1 (·|w), ψη12 (·|w) → 0, w as dW (G1 , G2 ) → 0. Since h2 ≤ dV , this completes the proof of (4.13). To prove (4.14), write, K(pθ0 ,η0 ,i , pθ,η,i ) = K(`θ0 ,η0 ,i , `θ0 ,η,i ) + P0 (`θ0 ,η,i − `θ,η,i ). (A.36) Under conditions (4.10) and (4.11), K(pθ0 ,η0 ,i , pθ0 ,η,i ) is bounded by,   1 2 C3 h (pθ0 ,η0 ,i , pθ0 ,η,i ) log , h(pθ0 ,η0 ,i , pθ0 ,η,i ) for some constant C3 > 0, by Theorem 5 of [37], which converges to 0 as h(f, f0 ) ∨ dW (G, G0 ) → 0 by (4.13). Also, by (4.11), sup P0 (`θ0 ,η,i − `θ,η,i ) ≤ C4 |θ − θ0 |, η∈H0 for some C4 > 0, and so K(pθ0 ,η0 ,i , pθ,η,i ) → 0 as |θ − θ0 | ∨ h(f, f0 ) ∨ dW (G, G0 ) → 0. Similarly, V (pθ0 ,η0 ,i , pθ,η,i ) ≤ 2P0 (`θ0 ,η0 ,i − `θ0 ,η,i )2 + 2P0 (`θ0 ,η,i − `θ,η,i )2 , (A.37) and P0 (`θ0 ,η0 ,i − `θ0 ,η,i )2 is bounded by,   C5 h2 (pθ0 ,η0 ,i , pθ0 ,η,i ) log 1 h(pθ0 ,η0 ,i , pθ0 ,η,i ) 2 , for some C5 > 0 by Theorem 5 of [37]. In addition, P0 (`θ0 ,η,i − `θ,η,i )2 ≤ C6 |θ − θ|2 , (A.38) for some C6 > 0. Thus, V (pθ0 ,η0 ,i , pθ,η,i ) → 0 as |θ − θ0 |, h(f, f0 ) and dW (G, G0 ) go to zero. 39 A.2.5 Proof of (4.15) For x ∈ Rm and w ∈ Rq×m note that, ψη (x|w) = Z Y m Z φσ (x − z − bT wj )dF (z, σ)dG(b) j=1 Z Y m Z   (xj − z − bT wj )2 1 √ = exp − dF (z, σ)dG(b) 2σ 2 2πσ j=1   |x|2 2 −m/2 ≤ (2πσ1 ) exp − 2 + K1 2σ2 ≤ C3 exp(−C4 |x|2 ), for C3 = (2πσ12 )−m/2 , C4 < 1/(2σ22 ) and large enough |x|, where K1 is a constant. In the same way, ψη (x|w) ≥ (2πσ22 )−m/2 exp  |x|2 − 2 + K2 2σ1  ≥ C1 exp(−C2 |x|2 ), for C1 = (2πσ22 )−m/2 , C2 > 1/(2σ12 ) and large enough |x|, where K2 is a constant. A.2.6 Proof of the equicontinuity of (4.5)in Corollary 4.1 To prove the equicontinuity of (4.5), it is sufficient to show that the partial derivatives of w 7→ d2w (η1 , η2 ) and w 7→ h2 (ψη1 (·|w), ψη2 (·|w)) are bounded by a constant uniformly in η1 , η2 ∈ H0 . Since every G is compactly supported, partial derivatives of w 7→ sη (x|w) and w 7→ ψη0 (x|w) are bounded by a constant multiple of partial derivatives of x 7→ sη (x|w) and x 7→ ψη0 (x|w), which are bounded by Q(x, w) and Q(x, w)ψη0 (x|w), respectively. Since sη (x, w) is also bounded by Q(x, w) for every η ∈ H0 , the partial derivative of, Z 2 w 7→ dw (η1 , η2 ) = |sη1 (x|w) − sη2 (x|w)|2 ψη0 (x|w)dµ(x), Q3 (x, w)dΨw η0 (x). Note that, Z q    2 ψη1 (x|w)ψη2 (x|w)dµ(x) . h ψη1 (·|w), ψη2 (·|w) = 2 1 − is bounded by a constant multiple of R Since, ∂ψη (x|w) = ∂wj Z  f˙(xj − wjT b) Y  f (xk − wkT b) · b dG(b), k6=j where f˙ is the derivative of f , we have, f˙(xj − wjT b) ∂ψη (x|w)/∂wj , ≤ C sup ψη (x|w) f (xj − wjT b) b 40 (A.39) for a constant C > 0, so the supremum of the left-hand side of (A.39) is of order O(|xj |), as |xj | → ∞, where the supremum is taken over η ∈ H0 . Consequently, Z  ∂(ψη1 (x|w)ψη2 (x|w))/∂wj ∂ 2 p ≤ dµ(x) h ψη1 (·|w), ψη2 (·|w) ∂wj ψη1 (x|w)ψη2 (x|w) Z ≤ O(|x|) × (ψη1 (x|w) + ψη2 (x|w))dµ(x). Since supw supη∈H0 A.2.7 R |x|dΨw η (x) < ∞, this establishes the equicontinuity of (4.5). Proof of asymtoptic tightness of (4.6) in Corollary 4.1 It only remains to prove asymptotic tightness of (4.6). Without loss of generality, we may assume that θ0 = 0. Let F = B × H0 , where B is the Euclidean ball of radius  centered on θ0 , and define Zni (θ, η), Sni , and N[]n (δ, F ) as in the proof of Corollary 3.1. By the bracketing central limit theorem (Theorem 2.11.9 of [33]), it suffices to prove that, n X Z 0  P0 Sni 1{Sni >γ} = o(1), i=1 δn q for every γ > 0, (A.40) log N[]n (δ, F ) dδ < ∞, for every δn ↓ 0. The first condition of (A.40) is proved in a manner similar to the proof of Corollary 3.1, by replacing Q1 by Q defined in (4.16). To prove the second condition of (A.40), note that, |Zni (θ1 , η1 )−Zni (θ2 , η2 )| (A.41) ≤ |Zni (θ1 , η1 ) − Zni (θ2 , η1 )| + |Zni (θ2 , η1 ) − Zni (θ2 , η2 )|. By (4.16), supi≥1 supη∈H0 |`˙θ,η,i − `˙θ0 ,η,i | is bounded by a constant multiple of |θ1 − θ2 |, and so there exists a constant K1 > 0 such that, K1 sup |Zni (θ1 , η) − Zni (θ2 , η)| ≤ √ |θ1 − θ2 |. n η∈H0 (A.42) Let gη,j (x|w) = ∂`η (x|w)/∂xj , and for t > 0, let, St = {(x, w) 7→ gη,j (x|w) : η ∈ H0 , 1 ≤ j ≤ m}, where functions in St are viewed as maps from [−t, t]m × [−L, L]qm to R. Since w ranges over a compact set and G is supported on a compact set, the α-th order partial derivative of the map (x, w) 7→ ψη (x|w) is bounded by a constant multiple of |x|α ψη (x|w) for every η ∈ H0 , w, and large enough |x|. Thus, for some constant Dα > 0, the α-Hölder norm of functions in St is bounded by Dα tα+1 for large enough t. Since the Lebesgue measure of [−t, t]m × [−L, L]qm is bounded by a constant multiple of tm , applying Theorem 2.7.1 of [33] with α = d = (q + 1)m, there exists a constant K2 > 0 such that, log N (δ, St , k · k∞ ) < K2 41 t(q+2)m+1 , δ for every δ > 0 and large enough t > 0. Since supw supη∈H0 |sη (x|w)| = O(|x|) and supw ψη0 (x|w) = O(exp(−K3 |x|2 )) as |x| → ∞ for some constant K3 > 0, we have, Z sup sup sup |sη (x + y|w)|2 ψη0 (x|w)dµ(x) ≤ δ 2 , √ {|x|>Mδ } |y|≤ mL w η∈H0 for every small enough δ > 0, where Mδ = − log δ. Therefore, for every small enough (l) such that, for some constant K > 0, δ δ > 0 we can construct a partition H0 = ∪N 4 l=1 H log Nδ ≤ K4 log 1 δ (q+2)m+1 1 , δ and, Z sup sup sup θ∈B i≥1 η1 ,η2 ∈H(l) |Zni (θ, η1 ) − Zni (θ, η2 )|2 ψη0 (x|Wi )dµ(x) < δ2 , n (A.43) for every l ≤ Nδ . Since N (δ, B , | · |) = O(δ −p ) as δ → 0, (A.41), (A.42) and (A.43) imply that, log N[]n (δ, F )  ≤ K5 1 log δ (q+2)m+1 1 1 + log δ δ   3/2 1 , ≤ δ for some K5 > 0, so the second condition of (A.40) is satisfied. A.2.8 Proof of asymptotic tightness of (4.6) in Corollary 4.2 Without loss of generality, we may assume that θ0 = 0. Let F = B × H0 , where B is the Euclidean ball of radius  centered on θ0 , and define Zni (θ, η), Sni , and N[]n (δ, F ) as those defined in the proof of Corollary 4.1. By the bracketing central limit theorem (Theorem 2.11.9 of [33]), it is sufficient to prove (A.40). The first condition of (A.40) is easily satisfied. For the second condition of (A.40), the inequalities (A.41) and (A.42) (l) δ hold similarly. Thus for every δ > 0, it suffices to construct a partition H0 = ∪N l=1 H satisfying (A.43) and log Nδ ≤ δ −2+β for some β > 0. For f ∈ F0 , let `˙f be the derivatives of log f , and let, L = F0 ∪ {`˙f : f ∈ F0 }. Since functions in L and their derivatives are uniformly bounded, applying Theorem 2.7.1 of [33] with α = d = 1, there exists a constant K1 > 0 such that, 1 log N (δ, L, k · k∞ ) ≤ K1 , δ (A.44) for every δ > 0. Since G0 is parametrized by a covariance matrix Σ, it is compact in the induced matrix norm k · k, and,   1 log N (δ, G0 , k · k) ≤ K2 log , δ 42 for some K2 > 0. Note that in G0 , dV is bounded by a constant multiple of k·k because the density of the normal distribution N (0, Σ) is differentiable and its derivative is uniformly bounded, because ρmin (Σ) > ρ1 . Since dW ≤ dV (see [15]), we have that,   1 , log N (δ, G0 , dW ) ≤ K3 log δ (A.45) for some K3 > 0. Note that, ∂`η (x|w) = ∂xk R Q T `˙f (xk − bT wk ) m j=1 f (xj − b wj )dG(b) R Qm . T j=1 f (xj − b wj )dG(b) Since the denominator of the last display is bounded away from zero and b/a − d/c = b(c − a)/ac + (b − d)/c for every real numbers a, b, c, d with ac 6= 0, there exists a constant K4 > 0 such that for every f1 , f2 ∈ F0 , sup sup G∈G x,w ∂`(f1 ,G) ∂`(f1 ,G) (x|w) − (x|w) ≤ K4 (kf1 − f2 k∞ ∨ k`˙f1 − `˙f2 k∞ ). ∂xk ∂xk (A.46) Also, by Theorem 2 of [15], there exists a constant K5 > 0 such that for every G1 , G2 ∈ G, sup sup f ∈F0 x,w ∂`(f,G2 ) ∂`(f,G1 ) (x|w) − (x|w) ≤ K5 dW (G1 , G2 ). ∂xk ∂xk (A.47) Therefore, by (A.44) and (A.45), (A.43) is satisfied with entropy bound,    1 1 log Nδ ≤ K6 + log , δ δ for some K6 > 0. Acknowledgements The first author thanks to thesis committee members for valuable suggestions. BK also thanks the Statistics Department of Seoul National University, South Korea for its kind hospitality. References [1] Barron, A., Schervish, M. J., and Wasserman, L. (1999). The consistency of posterior distributions in nonparametric problems. The Annals of Statistics, 27(2):536–561. [2] Beran, R. (1978). An efficient and robust adaptive estimator of location. The Annals of Statistics, 6(2):292–313. [3] Bickel, P. and Kleijn, B. (2012). The semiparametric Bernstein–von Mises theorem. The Annals of Statistics, 40(1):206–237. [4] Bickel, P. J. (1982). On adaptive estimation. The Annals of Statistics, 10(3):647–671. 43 [5] Bontemps, D. (2011). Bernstein–von Mises theorems for Gaussian regression with increasing number of regressors. The Annals of Statistics, 39(5):2557–2584. [6] Boucheron, S. and Gassiat, E. (2009). A Bernstein–von Mises theorem for discrete probability distributions. Electronic Journal of Statistics, 3:114–148. [7] Castillo, I. and Rousseau, J. (2015). A Bernstein–von Mises theorem for smooth functionals in semiparametric models. The Annals of Statistics, 43(6):2353–2383. [8] Chae, M. (2015). The semiparametric Bernstein–von Mises theorem for models with symmetric error. PhD thesis, Seoul National University. arXiv:1510.05247. [9] Cox, D. D. (1993). An analysis of Bayesian inference for nonparametric regression. The Annals of Statistics, 21(2):903–923. [10] Ferguson, T. S. (1973). A Bayesian analysis of some nonparametric problems. The Annals of Statistics, 1(2):209–230. [11] Freedman, D. (1999). Wald Lecture: On the Bernstein-von Mises theorem with infinite-dimensional parameters. The Annals of Statistics, 27(4):1119–1141. [12] Ghosal, S. (1999). Asymptotic normality of posterior distributions in high- dimensional linear models. Bernoulli, 5(2):315–331. [13] Ghosal, S. and van der Vaart, A. W. (2001). Entropies and rates of convergence for maximum likelihood and Bayes estimation for mixtures of normal densities. The Annals of Statistics, 29(5):1233–1263. [14] Ghosal, S. and van der Vaart, A. W. (2007). Convergence rates of posterior distributions for noniid observations. The Annals of Statistics, 35(1):192–223. [15] Gibbs, A. L. and Su, F. E. (2002). On choosing and bounding probability metrics. International statistical review, 70(3):419–435. [16] Henderson, C. R. (1975). Best linear unbiased estimation and prediction under a selection model. Biometrics, pages 423–447. [17] Johnstone, I. M. (2010). High dimensional Bernstein–von Mises: simple examples. Institute of Mathematical Statistics Collections, 6:87–98. [18] Kim, Y. (2006). The Bernstein–von Mises theorem for the proportional hazard model. The Annals of Statistics, 34(4):1678–1700. [19] Kim, Y. and Lee, J. (2004). A Bernstein–von Mises theorem in the nonparametric right-censoring model. The Annals of Statistics, 32(4):1492–1512. [20] Kleijn, B. (2013). Criteria for Bayesian consistency. arXiv:1308.1263. 44 [21] Kleijn, B. and van der Vaart, A. (2012). The Bernstein–von Mises theorem under misspecification. Electronic Journal of Statistics, 6:354–381. [22] Le Cam, L. (1973). Convergence of estimates under dimensionality restrictions. The Annals of Statistics, 1(1):38–53. [23] Le Cam, L. and Yang, G. L. (1990). Asymptotics in statistics: some basic concepts. Springer, New York. [24] Lo, A. Y. (1984). On a class of Bayesian nonparametric estimates: I. Density estimates. The Annals of Statistics, 12(1):351–357. [25] McNeney, B. and Wellner, J. A. (2000). Application of convolution theorems in semiparametric models with non-iid data. Journal of Statistical Planning and Inference, 91(2):441–480. [26] Panov, M. and Spokoiny, V. (2015). Finite sample Bernstein–von Mises theorem for semiparametric problems. Bayesian Analysis, 10(3):665–710. [27] Sacks, J. (1975). An asymptotically efficient sequence of estimators of a location parameter. The Annals of Statistics, 3(2):285–298. [28] Schwartz, L. (1965). On Bayes procedures. Zeitschrift für Wahrscheinlichkeitstheorie und verwandte Gebiete, 4(1):10–26. [29] Shen, X. (2002). Asymptotic normality of semiparametric and nonparametric posterior distributions. Journal of the American Statistical Association, 97(457):222–235. [30] Spokoiny, V. (2013). Bernstein-von Mises theorem for growing parameter dimension. arXiv:1302.3430. [31] Stone, C. J. (1975). Adaptive maximum likelihood estimators of a location parameter. The Annals of Statistics, 3(2):267–284. [32] Taylor, A. E. (2012). General theory of functions and integration. Courier Corporation. [33] van der Vaart, A. and Wellner, J. A. (1996). Weak convergence and empirical processes. Springer Verlag. [34] van der Vaart, A. W. (1996). Efficient maximum likelihood estimation in semiparametric mixture models. The Annals of Statistics, 24(2):862–878. [35] van der Vaart, A. W. (1998). Asymptotic statistics. Cambridge series in statistical and probabilistic mathematics, volume 3. Cambridge university press. 45 [36] Walker, S. (2004). New approaches to Bayesian consistency. The Annals of Statistics, 32(5):2028–2043. [37] Wong, W. H. and Shen, X. (1995). Probability inequalities for likelihood ratios and convergence rates of sieve MLEs. The Annals of Statistics, 23(2):339–362. [38] Yang, Y., Cheng, G., and Dunson, D. B. (2015). Semiparametric Bernstein-von Mises theorem: Second order studies. arXiv:1503.04493. 46
10math.ST
A Further Study of an L2 -norm Based Test for the Equality of Several Covariance Functions Jia Guo and Jin-Ting Zhang arXiv:1609.04231v1 [math.ST] 14 Sep 2016 National University of Singapore Abstract For the multi-sample equal covariance function (ECF) testing problem, Zhang (2013) proposed an L2 -norm based test. However, its asymptotic power and finite sample performance have not been studied. In this paper, its asymptotic power is investigated under some mild conditions. It is shown that the L2 –norm based test is root-n consistent. In addition, intensive simulation studies demonstrate that in terms of size-controlling and power, the L2 norm based test outperforms the dimension-reduction based test proposed by Fremdt et al. (2013) when the functional data are less correlated or when the effective signal information is located in high frequencies. Two real data applications are also presented to demonstrate the good performance of the L2 -norm based test. KEY WORDS: L2 -norm based test; asymptotic power; functional data analysis; multi-sample equal covariance function testing problem. Short Title: Testing Equality of Several Covariance Functions 1 Introduction In the recent decades, functional data, which are easily recorded in the form of curves or images with the rapid development of data collecting technologies, attract much attention in the statistical literature. The early efforts were devoted to the description of functional data. A good survey is given by Ramsay and Silverman (2005). In the recent decade, much work has First Edition: November 20, 2013, Last Update: July 31, 2016. Jia Guo (E-mail: [email protected]) is PhD candidate, Jin-Ting Zhang (E-mail: [email protected]) is Associate Professor, Department of Statistics and Applied Probability, National University of Singapore, Singapore 117546. The work was financially supported by the National University of Singapore Academic Research grant R-155-000164-112. 1 been done in hypothesis testing about the mean functions of one or several functional populations. The reader is referred to Zhang (2013) and references therein. For testing the equality of the mean functions of two functional populations, Ramsay and Silverman (2005) described a pointwise t-test. This pointwise t-test is a natural extension of the classical t-test but it has some obvious drawbacks: it is conducted at any individual time point, and it does not give an overall conclusion. To overcome this problem, Zhang et al. (2010b) proposed an L2 -norm based test. For the functional one-way ANOVA problem, Ramsay and Silverman (2005) suggested a pointwise F -test which is an extension of the classical F -test to the context of functional data analysis. This pointwise F -test has the same limitation as the pointwise t-test. Some alternatives are then proposed. Cuevas et al. (2004) proposed an L2 -norm based functional ANOVA test. However, their test adopts time-consuming Monte Carlo simulations to approximate the null distribution. Zhang and Liang (2013) studied a so-called GPF test, whose test statistic was obtained via globalizing the pointwise F -test for the functional one-way ANOVA problem. In the context of functional linear models, Zhang and Chen (2007) studied an L2 -norm based test for a general linear hypothesis testing problem and Shen and Faraway (2004) considered a functional F -test to compare two nested functional linear models. Via intensive simulations, Górecki and Smaga (2015) presented an exhaustive comparison of a number of existing functional hypothesis testing procedures and concluded that the GPF test works quite well for the functional one-way ANOVA problem. Besides testing the equality of the mean functions of one or several functional populations, some novel and effective methods have also been proposed for testing the equality of two covariance functions. For example, for testing the equality of the covariance functions of two functional populations, Zhang and Sun (2010) proposed an L2 -norm based test while Fremdt et al. (2013) studied a dimension-reduction based test which is an extension of the work of Panaretos et al. (2010) to the non-Gaussian case. The testing procedure of Fremdt et al. (2013) was obtained via projecting the observations onto a suitably chosen finite-dimensional space. However, little work has been done for testing the equality of several covariance functions. We may refer to this problem as the multi-sample equal covariance function (ECF) testing problem. This multi-sample ECF testing problem is encountered frequently in many areas. For example, in the functional one-way and two-way ANOVA, we usually assume that the covariance functions of different samples are the same. However, in real data analysis, this assumption may not be true and a formal test may be needed before applying the previously-mentioned testing procedures for 2 the functional one-way or two-way ANOVA. For this multi-sample ECF testing problem, Zhang (2013) (Ch. 10) described an L2 -norm based test, which is simple to implement and easy to interpret. However, its asymptotic power has not been studied. In addition, no simulation results are given to demonstrate its finite-sample performance. In this paper, we present a further study on this L2 -norm based test via studying its asymptotic power. As a result, we show that it is a root-n consistent test. We also demonstrate its finite-sample performance via comparing it with Fremdt et al. (2013)’s dimension-reduction based test through intensive simulations. We found that when the functional data are less correlated or when the effective signal information is located in high frequencies, the L2 -norm based test is more powerful than the afore-mentioned dimension-reduction based test. The rest of the paper is organized as follows. Section 2 presents a simple review of the L2 norm based test. Section 3 studies its asymptotic power. Two simulation studies and two real data applications are presented in Sections 4 and 5 respectively. The technical proofs of the main results are given in the Appendix. 2 The L2 -norm Based Test In this section, we give a brief review of the L2 -norm based test proposed in Zhang (2013) for the k-sample equal-covariance function (ECF) testing problem. The ECF testing problem is defined as below. Let yi1 (t), yi2 (t), · · · , yini (t), i = 1, 2, · · · , k be k independent functional samples over a given finite time interval T = [a, b], −∞ < a < b < ∞, which satisfy yij (t) = ηi (t) + vij (t), j = 1, 2, · · · , ni , i.i.d. vi1 (t), vi2 (t), · · · , vini (t) ∼ SP(0, γi ); i = 1, 2, · · · , k, (2.1) where η1 (t), η2 (t), · · · , ηk (t) model the unknown group mean functions of the k samples, vij (t), j = 1, 2, · · · , ni , i = 1, 2, · · · , k denote the subject-effect functions which follow a stochas- tic process with mean function 0 and covariance function γi (s, t), i = 1, 2, · · · , k respectively. Throughout this paper, we assume that tr(γi ) < ∞ and ηi (t) ∈ L2 (T ), i = 1, 2, · · · , k, where L2 (T ) denotes the Hilbert space formed by all the squared integrable functions over T with the ´ inner-product defined as < f, g >= T f (t)g(t)dt, f, g ∈ L2 (T ). It is often of interest to test 3 the equality of the k covariance functions: H0 : γ1 (s, t) ≡ γ2 (s, t) ≡ · · · ≡ γk (s, t), for all s, t ∈ T . (2.2) Based on the given k functional samples (2.1), the group mean functions ηi (t), i = 1, 2, · · · , k and the covariance functions γi (s, t), i = 1, 2, · · · , k can be unbiasedly estimated as Pni η̂i (t) = ȳi (t) = n−1 j=1 yij (t), i = 1, 2, · · · , k, i P i γ̂i (s, t) = (ni − 1)−1 nj=1 [yij (s) − ȳi (s)][yij (t) − ȳi (t)], i = 1, 2, · · · , k. (2.3) It is easy to show that γ̂i (s, t), i = 1, 2, · · · , k are independent and Eγ̂i (s, t) = γi (s, t), i = 1, 2, · · · , k. Further, the estimated subject-effect functions can be written as (2.4) v̂ij (t) = yij (t) − ȳi (t), j = 1, 2, · · · , ni ; i = 1, 2, · · · , k. When the null hypothesis (2.2) holds, we let γ(s, t) denote the common covariance function of the k samples. It can be estimated by the following pooled sample covariance function γ̂(s, t) = k X i=1 (2.5) (ni − 1)γ̂i (s, t)/(n − k), where γ̂i (s, t), i = 1, 2, · · · , k are given in (2.3) and throughout, n = sample size. Pk i=1 ni denotes the total For further investigation, the following assumptions are imposed. Assumption A 1. The k samples (2.1) are Gaussian. 2. As n → ∞, the k sample sizes satisfy ni /n → τi ∈ (0, 1), i = 1, 2, · · · , k. 3. The variance functions γi (s, t), i = 1, 2, · · · , k are uniformly bounded. It is easy to note that γ̂i (s, t) − γ̂(s, t) measures the difference between the i-th sample covariance function (2.3) and the pooled sample covariance function (2.5), which should be small when the null hypothesis holds. Based on this, Zhang (2013) proposed the following so-called L2 -norm based test statistic for the k-sample ECF testing problem (2.2): ˆ ˆ k X Tn = (ni − 1) [γ̂i (s, t) − γ̂(s, t)]2 dsdt, i=1 T T 4 (2.6) which summarizes all the squared differences between the k sample covariance functions and the pooled sample covariance function. Therefore, when the null hypothesis holds, Tn will be small and otherwise large. Lemma ?? in the Appendix states that the test statistic Tn is asymptotically a χ2 -type mixture. Therefore, the null distribution of Tn can be approximated by the well-known WelchSatterthwaite χ2 -approximation. By this method, Zhang (2013) approximated the null distribution of Tn using that of a random variable R ∼ βχ2d . (2.7) The parameters β and d are determined via matching the first two moments of Tn and R, which are given by tr($⊗2 ) tr2 ($) , d = (k − 1)κ, κ = , (2.8) tr($) tr($⊗2 ) √ where $[(s1 , t1 ), (s2 , t2 )] denotes the covariance function of n − k[γ̂(s, t) − γ(s, t)], tr($) = ´ ´ ´ ´ ´ ´ ⊗2 2 T T $ [(s, t), (s, t)] dsdt and tr($ ) = T T T T $ [(s1 , t1 ), (s2 , t2 )] ds1 dt1 ds2 dt2 . Under β= the Gaussian assumption A1, it is easy to verify that $[(s1 , t1 ), (s2 , t2 )] = γ(s1 , s2 )γ(t1 , t2 ) + γ(s1 , t2 )γ(s2 , t1 ), tr($) = tr2 (γ) + tr(γ ⊗2 ), tr($⊗2 ) = 2tr2 (γ ⊗2 ) + 2tr(γ ⊗4 ), where tr(γ) = ´ T γ(t, t)dt, tr(γ ⊗2 ) = tr(γ ⊗4 ) = ˆ ˆ ˆ ˆ T T T ´ ´ T T (2.9) γ 2 (s, t)dsdt and γ(t, u1 )γ(u1 , u2 )γ(u2 , u3 )γ(u3 , t)du1 du2 du3 dt. T To conduct the L2 -norm based test, we need to estimate the parameters β and d based on the data. There are two methods for estimating the parameters β and κ, one is the naive method, and the other is the bias-reduced method. Let β̂ and κ̂ denote the estimators of β and κ. The naive estimators of β and κ are obtained via replacing tr($), tr2 ($) and tr($⊗2 ) in (2.8) respectively with their naive estimators tr($̂), tr2 ($̂) and tr($̂⊗2 ): β̂ = tr2 ($̂) tr($̂⊗2 ) , κ̂ = , tr($̂) tr($̂⊗2 ) (2.10) where under the Gaussian assumption A1 and based on (2.9), we have $̂[(s1 , t1 ), (s2 , t2 )] = γ̂(s1 , s2 )γ̂(t1 , t2 ) + γ̂(s1 , t2 )γ̂(s2 , t1 ), tr($̂) = tr2 (γ̂) + tr(γ̂ ⊗2 ), tr($̂⊗2 ) = 2tr2 (γ̂ ⊗2 ) + 2tr(γ̂ ⊗4 ). 5 (2.11) The bias-reduced estimators of β and κ are obtained via replacing tr($), tr2 ($) and tr($⊗2 ) \ 2 ($) and tr($ \ ⊗2 ): \ tr in (2.8) respectively with their bias-reduced estimators tr($), β̂ = \ ⊗2 ) tr($ , κ̂ = \ tr($) \ 2 ($) tr \ ⊗2 ) tr($ (2.12) where under the Gaussian assumption A1 and based on (2.9), we have with i2 h \ \ 2 (γ) + tr(γ 2 ($) = tr($) \ ⊗2 ), tr \ , \ = tr tr($) i2 h \ \ ⊗2 ) ⊗2 ) = 2 tr(γ + 2tr(γ̂ ⊗4 ), tr($ (2.13) h i tr(γ̂ ⊗2 ) , tr2 (γ̂) − 2n−k+1 i h 2 (n−k)2 ⊗2 ) − tr (γ̂) . \ ⊗2 ) = tr(γ tr(γ̂ n−k (n−k−1)(n−k+2) (2.14) \ 2 (γ) = tr (n−k)(n−k+1) (n−k−1)(n−k+2) \ 2 (γ) and tr(γ \ ⊗2 ) are the unbiased estimators of Note that under the Gaussian assumption A1, tr tr2 (γ) and tr(γ ⊗2 ) respectively and when the data are not Gaussian, they may be asymptotically unbiased under some further assumptions. Notice also that in the expression (2.13), the unbiased estimator of tr(γ ⊗4 ) is not incorporated since it is quite challenging to obtain a simple and useful unbiased estimator of tr(γ ⊗4 ). The following theorem shows that under some mild conditions, the estimators, β̂ and κ̂, of β and κ are consistent. Theorem 1. Under Assumptions A1∼A3 and the null hypothesis (2.2), as n → ∞, we have p p p β̂ → β, κ̂ → κ for both the naive and bias-reduced methods. In addition, T̂n (α) → T̃0 (α), where T̂n (α) = β̂χ2(k−1)κ̂ (α) is the estimated critical value of Tn and T̃0 (α) = βχ2(k−1)κ (α) is its approximate theoretical critical value. By some simple algebra, we have β < λmax < ∞ and κ ≤ m where λmax is the largest eigenvalue of $ [(s1 , t1 ), (s2 , t2 )] and m is the number of all the positive eigenvalues. Then it is easy to verify that T̃0 (α) < ∞ when m is a finite number. However, under the null hypothesis, when the sample sizes ni , i = 1, 2, · · · , k of the k samples (2.1) are small, Theorem 1 is no longer valid so that the Welch-Satterthwaite χ2 -approximation is also no longer applicable. To overcome this difficulty, a random permutation method is proposed to approximate the critical values of Tn . This method can also be used when the data are non-Gaussian. The random permutation method can be described as follows. 6 Firstly, we randomly reorder the pooled estimated subject-effect functions (2.4) so that a random permutation sample v̂l∗ (t), l = 1, 2, · · · , n is obtained where n is the total sample size as defined before. We then use the first n1 permuted subject-effect functions to form the first ∗ (t), j = 1, 2, · · · , n , the next n permuted subject-effect functions to permutation sample v̂1j 1 2 ∗ (t), j = 1, 2, · · · , n and so on. The permutation test form the second permutation sample v̂2j 2 statistic Tn∗ is computed similar to the computation of the original L2 -norm based test statistic Tn as described in (2.6) but now based on the k permuted functional samples. That is, Tn∗ = k X i=1 where (ni − 1) ˆ ˆ T T [γ̂i∗ (s, t) − γ̂ ∗ (s, t)]2 dsdt, P i ∗ ∗ (t), i = 1, 2, · · · , k, v̂ij (s)v̂ij γ̂i∗ (s, t) = (ni − 1)−1 nj=1 P γ̂ ∗ (s, t) = ki=1 (ni − 1)γ̂i∗ (s, t)/(n − k). Repeating the above process a large number of times, we can get a sample of Tn∗ and use the sample upper 100α-percentile T̂n∗ (α) to estimate the critical value of Tn∗ . Using this critical value, we then conduct the associated random permutation test. If Tn > T̂n∗ (α), we reject the null hypothesis (2.2). The following theorem shows that under the null hypothesis the permutation test statistic Tn∗ converges in distribution to the same limit test statistic T0 of Tn where T0 is defined in Lemma ?? and hence T̂n∗ (α) will also tend to T0 (α) in distribution as n → ∞. Thus the size of the permutation test tends to the nominal size. Theorem 2. Under Assumptions A1∼A3 and the null hypothesis (2.2), as n → ∞, we have d d Tn∗ → T0 and T̂n∗ (α) → T0 (α). Hence, the size of the random permutation test P (Tn > T̂n∗ (α)) → P (Tn > T0 (α)) where T̂n∗ (α) is the estimated upper 100α-percentile of Tn∗ based on the permutation samples and T0 (α) is the theoretical critical value of Tn . 3 Asymptotic Power of the L2 -norm Test Zhang (2013) did not study the asymptotic power of the L2 -norm based test Tn . In this section, we study its asymptotic power under the following local alternative: H1 : γi (s, t) = γ(s, t) + (ni − 1)−1/2 di (s, t), i = 1, 2, · · · , k, 7 (3.1) where d1 (s, t), d2 (s, t), · · · , dk (s, t) are some fixed bivariate functions, independent of n and γ(s, t) is some covariance function. For further study, we can re-write the L2 -norm based test statistic Tn (2.6) as Tn = where SSBn (s, t) = ˆ ˆ k X (ni − 1)[γ̂i (s, t) − γ̂(s, t)]2 , T i=1 T SSBn (s, t)dsdt, (3.2) (3.3) which summarizes the squared differences between the individual sample covariance functions γ̂i (s, t), i = 1, 2, · · · , k and the pooled sample covariance function γ̂(s, t) for any given (s, t) ∈ T 2 . Before we state the main results, we give an alternative expression of SSB(s, t) which is helpful for deriving the asymptotic power of Tn . For any s, t ∈ T , SSBn (s, t) can be expressed as SSBn (s, t) = zn (s, t)T [Ik − bn bTn /(n − k)]zn (s, t) = z n (s, t)T W n z n (s, t), (3.4) zn (s, t) = [z1 (s, t), z2 (s, t), · · · , zk (s, t)]T , W n = Ik − bn bTn /(n − k), (3.5) where with bn √ ni − 1[γ̂i (s, t) − γ(s, t)], i = 1, 2, · · · , k, √ √ √ = [ n1 − 1, n2 − 1, · · · , nk − 1]T . zi [s, t] = Since bTn bn /(n − k) = 1, it is easy to verify that W n is an idempotent matrix with rank k − 1. In addition, as n → ∞, we have √ √ √ W n → W := Ik − bbT , with b = [ τ1 , τ2 , · · · , τk ]T , (3.6) where τi , i = 1, 2, · · · , k are given in Assumption A2. Note that W in (3.6) is also an idempotent matrix of rank k − 1, which has the following singular value decomposition:   Ik−1 0  UT , W = U 0T 0 (3.7) where the columns of U are the eigenvectors of W . Let d̃(s, t) = [Ik−1 , 0]UT d(s, t) where d(s, t) = [d1 (s, t), d2 (s, t), · · · , dk (s, t)]T with di (s, t), i = 1, 2, · · · , k given in (3.1). Let λr , r = 1, 2, · · · be the eigenvalues of $ [(s1 , t1 ), (s2 , t2 )] 8 with only the first m eigenvalues being positive and φr (s, t), r = 1, 2, · · · , be the associated eigenfunctions. Define δr2 = || ˆ ˆ T T d̃(s, t)φr (s, t)dsdt||2 , r = 1, 2, · · · , (3.8) which measure the information of d̃(s, t) projected on the eigenfunctions φr (s, t), r = 1, 2, · · · , of $[(s1 , t1 ), (s2 , t2 )]. Theorem 3 below gives the asymptotic distribution of Tn under the local alternative (3.1). Theorem 3. Under Assumptions A1∼A3 and the local alternative (3.1), as n → ∞, we have d Tn → T1 with d ∞ 2 T1 = Σm r=1 λr Ar + Σr=m+1 δr , 2 2 where Ar ∼ χ2k−1 (λ−1 r δr ), r = 1, 2, · · · , m, are independent and δr , r = m + 1, m + 2, · · · , ∞ are defined in (3.8). Theorem 4 below shows that under the local alternative (3.1), Tn is asymptotically normal. Theorem 5 below shows that the L2 -norm based test can detect the local alternative (3.1) with probability 1 provided that the information provided by d(s, t) diverges. That is, the L2 -norm based test is root-n consistent. In both Theorems 4 and 5, the quantities δr2 , r = 1, 2, · · · have been defined in (3.8). Let these quantities satisfy the following condition: max δr2 → ∞. r (3.9) This condition describes a situation when the information projected onto at least one eigenfunction tends to ∞. Theorem 4. Under Assumptions A1∼A3, the local alternative (3.1), and condition (3.9), as Tn −E(Tn ) d n → ∞, we have √ → N (0, 1). Var(Tn ) Theorem 5. Under Assumptions A1∼A3, the local alternative (3.1), and condition (3.9), as n → ∞, the proposed L2 -norm based test has asymptotic power 1, i.e., P (Tn > T̂n (α)) → 1, where T̂n (α) is the estimated critical value of Tn defined in Theorem 1. We now study the consistency property of the random permutation test. Theorem 6 shows that the random permutation test is also root-n consistent. Theorem 6. Under Assumptions A1∼A3, the local alternative (3.1), and condition (3.9), as n → ∞, the power P (Tn > T̂n∗ (α)) → 1. 9 4 Simulation Studies In Section 2, we described three methods for approximating the null distribution of the L2 -norm based test: a naive method, a bias-reduced method, and a random-permutation method. The associated L2 -norm based tests may be denoted as L2nv , L2br and L2rp respectively. Recently, Fremdt et al. (2013) described two dimension-reduction methods for testing the equality of the covariance functions of two functional samples. Their first test can be applied to both Gaussian and non-Gaussian functional data while the second one can only be used for Gaussian functional data. For convenience, we refer to these two tests as F HKD and F HKG respectively. In this section, we shall present two simulations. In Simulation 1, we shall compare the performances of L2nv , L2br and L2rp and in Simulation 2, we shall compare L2nv , L2br and L2rp against F HKD and F HKG . 4.1 Data generating In the simulations, for i = 1, 2, · · · , k, the i-th functional sample will be generated from the following model: yij (t) = ηi (t) + vij (t), ηi (t) = cTi [1, t, t2 , t3 ]T , vij (t) = bTij Ψi (t), t ∈ [0, 1], d √ bij = [bij1 , bij2 , · · · , bijq ]T , bijr = λr zijr , r = 1, 2, · · · , q; j = 1, 2, · · · , ni , (4.1) where the parameter vectors ci = [ci1 , ci2 , ci3 , ci4 ]T for the group mean function ηi (t) can be flexibly specified, the random variables zijr , r = 1, 2, · · · , q are i.i.d. with mean 0 and variance 1, Ψi (t) = [ψi1 (t), ψi2 (t), · · · , ψiq (t)]T is a vector of q basis functions and the variance components λr , r = 1, 2, · · · , q are positive and decreasing in r, and the number of the basis functions, q, is an odd positive integer. These tuning parameters help specify the group mean functions ηi (t) = ci1 + ci2 t + ci3 t2 + ci4 t3 and the covariance function γi (s, t) = Ψi (s)T diag(λ1 , λ2 , · · · , λq )Ψi (t) = Pq r=1 λr ψir (s)ψir (t), i = 1, 2, · · · , k. For simplicity, we assume that the design time points for all the functions yij (t), j = 1, 2, · · · , ni , i = 1, 2, · · · , k are the same and are specified as tj = (j −1)/(J −1), j = 1, 2, · · · , J, where J is some positive integer. In practice, these functions can be observed at different design time points. In this case, some smoothing technique, such as those discussed in Zhang and Chen (2007), Zhang et al. (2010a) can be used to reconstruct the functions yij (t), j = 1, 2, · · · , ni , i = 1, 2, · · · , k and then to evaluate them at a common grid of time points. The latter simulation setup will be time-consuming to carry out and we did not 10 explore it in this simulation. We now specify the parameters in (4.1). To specify the group mean functions η1 (t), η2 (t), · · · , ηk (t), we set c1 = [1, 2.3, 3.4, 1.5]T and ci = c1 + (i − 1)δu, i = 1, 2, · · · , k, where the constant vector u specifies the direction of these differences. We set δ = 0.1 and √ u = [1, 2, 3, 4]T / 30 which is a unit vector. Then we specify the covariance function γi (s, t). For simplicity, we set λr = aρr−1 , r = 1, 2, · · · , q, for some a > 0 and 0 < ρ < 1. Notice that the tuning parameter ρ not only determines the decay rate of λ1 , λ2 , · · · , λq , but also determines how the simulated functional data are correlated: when ρ is close to 0, λ1 , λ2 , · · · , λq will decay very fast, indicating that the simulated functional data are highly correlated; and when ρ is close to 1, λr , r = 1, 2, · · · , q will decay slowly, indicating that the simulated functional data are nearly uncorrelated. To define the basis functions Ψi (t), we firstly generate a vector of q basis functions φ(t) = [φ1 (t), φ2 (t), · · · , φq (t)]T and we select φ1 (t) = 1, φ2r (t) = √ √ 2sin(2πrt), φ2r+1 (t) = 2cos(2πrt), t ∈ [0, 1], r = 1, 2, · · · , (q − 1)/2. Then we specify our basis functions Ψi (t) via the following relationship: ψir (t) = φr (t), r = 1, 3, 4, · · · , q but ψi2 (t) = φ2 (t) + (i − 1)ω, i = 1, 2, · · · , k. That is, we obtain k different bases via shifting the second basis function of the i-th basis with (i − 1)ω steps. This allows that the differences of the k covariance functions γi (s, t), i = 1, 2, · · · , k are controlled by the tuning parameter ω since we actually have γi (s, t) = γ1 (s, t) + (i − 1)λ2 (φ2 (s) + φ2 (t))ω + (i − 1)2 λ2 ω 2 , i = 1, 2, · · · , k. (4.2) Further, we set a = 1.5, q = 11 and the number of design time points J = 180. Finally, we specify two cases of the distribution of the i.i.d. random variables zijr , r = 1, 2, · · · , q; j = √ i.i.d. i.i.d. 1, 2, · · · , ni ; i = 1, 2, · · · , k: zijr ∼ N (0, 1) and zijr ∼ t4 / 2, allowing to generate Gaussian and non-Gaussian functional data respectively with zijr having mean 0 and variance 1. Notice √ that the t4 / 2 distribution is chosen since it has nearly heaviest tails among the t-distributions with finite first two moments. 4.2 Simulation 1: a comparison of L2nv , L2br and L2rp In this simulation, to check the finite sample performance of L2nv , L2br and L2rp , we let the number of groups k = 5. We consider three cases of the sample size vector: n1 = [20, 25, 22, 18, 16], n2 = [35, 30, 40, 32, 38] and n3 = [80, 75, 85, 82, 70], representing the small, moderate, and large 11 sample size cases. We also consider four correlation cases, i.e., ρ = 0.1, 0.3, 0.5, 0.7, representing the highly, moderately, less correlated, and nearly independent situations. For given model configurations, the required functional samples are generated. The p-values of L2nv , L2br and L2rp are then computed. Notice that the p-values of L2rp is obtained via 500 runs of permutations. We reject the null hypothesis if the calculated p-values are smaller than the nominal significance level α = 5%. We repeat the above simulation process 10000 times to get the empirical sizes or powers of L2nv , L2br and L2rp . Table 1 shows the empirical sizes and powers (in percentages) of L2nv , L2br and L2rp when i.i.d. zijr , r = 1, 2, · · · , q; j = 1, 2, · · · , ni ; i = 1, 2, · · · , k ∼ N (0, 1). We have the following conclusions: • In terms of size controlling, L2nv works well when the functional data are highly correlated but it becomes rather conservative (with the empirical size to be as small as 4.02%) when the correlation of functional data is reduced. L2br generally works well for various settings and it becomes better with increasing the sample sizes. L2rp is quite liberal (with the empirical size to be as large as 8.40%), especially when the functional data are nearly independent. However, it performs better with increasing the sample sizes. • In terms of powers, L2br is comparable or have higher powers than L2nv and L2rp when their empirical sizes are comparable. • Overall, when the functional data are Gaussian, L2br outperforms L2nv and L2rp . Note that the inflated sizes of L2rp may be due to the small number of runs of permutations, which is 500. However, increasing this number requires much more computational efforts and we did not adopt this strategy for time saving. Table 2 shows the empirical sizes and powers of L2nv , L2br and L2rp when zijr , r = √ i.i.d. 1, 2, · · · , q; j = 1, 2, · · · , ni ; i = 1, 2, · · · , k ∼ t4 / 2, representing the cases when the functional data are non-Gaussian. We have the following conclusions: • In terms of size controlling, both L2nv and L2br do not work since their empirical sizes are too large compared with the nominal size 5%. This is expected since the formulas (2.11) used for computing the approximated null distributions are based on the Gaussian assumption A1. 12 Table 1: Empirical sizes and powers (in percentages) of L2nv , L2br and L2rp for Simulation 1 when i.i.d. zijr , r = 1, · · · , q; j = 1, · · · , ni ; i = 1, · · · , k ∼ N (0, 1). n1 =[20,25,22,18,16] ρ 0.1 0.3 0.5 0.7 n2 =[35,30,40,32,38] n3 =[80,75,85,82,70] ω L2nv L2br L2rp ω L2nv L2br L2rp ω L2nv L2br L2rp 0.00 4.29 4.55 5.93 0.00 4.90 5.09 5.75 0.00 5.14 5.23 5.51 0.70 22.50 23.14 24.75 0.60 24.71 25.14 25.27 0.40 17.78 17.97 18.41 1.00 50.50 51.17 50.81 0.80 52.39 52.90 51.76 0.60 54.61 54.87 53.81 1.50 87.62 88.09 85.22 1.10 87.31 87.66 85.35 0.75 83.86 83.98 83.09 2.20 99.13 99.17 98.31 1.50 99.36 99.39 98.68 0.90 96.75 96.80 96.53 0.00 4.28 4.69 5.81 0.00 5.12 5.37 6.17 0.00 5.03 5.13 5.26 0.36 22.66 23.45 25.08 0.30 24.39 24.95 25.81 0.20 22.84 23.09 23.08 0.55 51.97 53.05 52.11 0.45 59.96 60.57 58.98 0.30 56.46 56.79 56.78 0.80 83.84 84.49 82.06 0.56 82.30 82.86 80.87 0.36 78.02 78.27 77.31 1.20 98.96 99.07 97.68 0.85 99.47 99.49 99.04 0.45 95.24 95.34 94.67 0.00 4.48 5.07 6.80 0.00 4.71 5.03 5.79 0.00 4.82 5.01 5.09 0.30 29.19 30.57 32.01 0.20 23.18 24.06 25.02 0.15 29.81 30.22 30.30 0.40 50.05 51.72 52.44 0.30 52.02 52.96 52.35 0.20 54.57 55.15 54.38 0.60 84.06 84.85 82.66 0.40 80.31 80.99 78.95 0.25 77.07 77.45 76.50 1.00 99.48 99.52 98.65 0.80 99.98 99.98 99.94 0.40 99.66 99.67 99.61 0.00 4.02 5.11 8.40 0.00 4.39 5.11 6.47 0.00 5.30 5.69 6.27 0.22 23.31 25.62 30.15 0.16 21.45 22.99 24.78 0.11 23.88 24.65 25.37 0.35 53.48 55.70 57.52 0.25 53.19 54.88 54.97 0.17 58.64 59.43 58.97 0.54 87.95 88.87 86.92 0.35 83.87 84.81 83.05 0.21 79.87 80.46 79.36 0.80 99.06 99.18 97.97 0.50 98.74 98.82 97.94 0.30 98.54 98.58 98.19 • The performance of L2rp , on the other hand, is comparable with those cases presented in Table 1. That is, its empirical sizes are liberal when the functional data are less correlated but they are getting better with increasing the sample sizes. • Thus, when the functional data are not Gaussian, L2rp may work for large samples but L2nv and L2br do not work at all. 13 Table 2: Empirical sizes and powers (in percentages) of L2nv , L2br and L2rp for Simulation 1 when √ i.i.d. zijr , r = 1, · · · , q; j = 1, · · · , ni ; i = 1, · · · , k ∼ t4 / 2. n1 =[20,25,22,18,16] ρ 0.1 0.3 0.5 0.7 4.3 n2 =[35,30,40,32,38] n3 =[80,75,85,82,70] ω L2nv L2br L2rp ω L2nv L2br L2rp ω L2nv L2br L2rp 0.00 41.60 42.38 7.00 0.00 49.38 49.75 6.04 0.00 58.60 58.75 5.56 0.90 60.65 61.36 29.03 0.72 67.06 67.46 23.14 0.60 79.88 79.93 26.71 1.50 86.84 87.35 60.64 1.20 92.37 92.49 60.85 0.85 94.02 94.08 58.20 2.50 98.71 98.76 86.42 1.80 99.38 99.40 86.62 1.20 99.58 99.60 87.38 3.50 99.74 99.75 92.08 2.80 99.99 99.99 94.97 1.50 99.97 99.97 95.32 0.00 48.17 49.45 7.19 0.00 55.26 55.87 6.18 0.00 63.98 64.29 5.13 0.45 62.34 63.24 25.14 0.38 74.47 74.90 24.68 0.28 84.48 84.60 22.31 0.80 86.68 87.29 58.06 0.60 91.28 91.44 54.96 0.46 96.88 96.92 60.58 1.70 99.45 99.47 90.09 1.00 99.40 99.41 85.52 0.65 99.77 99.79 86.74 3.20 99.98 99.98 94.77 2.00 100.00 100.00 96.20 0.75 99.93 99.93 92.72 0.00 56.78 58.41 8.10 0.00 65.23 66.03 6.86 0.00 75.09 75.47 5.73 0.40 74.60 75.74 34.75 0.30 83.47 84.01 28.39 0.20 91.46 91.69 24.40 0.70 92.57 92.99 66.00 0.40 91.68 91.95 46.23 0.30 97.61 97.69 52.39 1.00 98.31 98.43 82.65 0.80 99.69 99.70 87.56 0.50 99.90 99.91 88.68 2.00 99.97 99.97 93.95 1.50 99.99 99.99 95.81 0.60 100.00 100.00 94.62 0.00 68.67 71.37 9.94 0.00 77.79 79.51 7.22 0.00 86.81 87.34 6.12 0.24 76.59 78.43 23.97 0.25 90.91 91.62 28.31 0.15 95.25 95.49 19.74 0.52 92.17 92.88 59.40 0.40 97.15 97.33 58.57 0.25 99.25 99.32 52.32 0.88 98.91 99.01 83.59 0.70 99.89 99.90 87.88 0.40 99.96 99.96 87.05 1.80 99.99 100.00 94.45 1.20 100.00 100.00 95.97 0.55 100.00 100.00 96.55 Simulation 2: a comparison of L2nv , L2br and L2rp against F HKD and F HKG In this simulation, we shall use the simulation codes kindly provided by Dr. Fremdt via email communication. To compare L2nv , L2br and L2rp against F HKD and F HKG , we set the number of groups k = 2 and consider the sample size n1 = [25, 22], n2 = [30, 40] and n3 = [75, 85]. We also specify ρ = 0.1, 0.3, 0.5, 0.7 to consider the four cases when the functional samples have high, moderate, low, very low correlations. Since smoothing is needed to conduct F HKD and F HKG , we choose 49 Fourier basis functions to smooth the simulated functions. Notice that F HKD and 14 F HKG require selecting d, the number of empirical functional principal components. To avoid this time-consuming selection, we instead just consider: d = 1, 2, 3, 4, hoping that the important signals in functional data are located at low principal components. Actually, we shall use the same method as described in the beginning of this section to generate the functional samples for the simulations presented in this subsection so that the main differences between the two covariance functions are located at the first two basis functions as indicated in (4.2). Table 3: Empirical sizes (in percentages) of F HKD , F HKG , L2nv , L2br and L2rp for Simulation 2 i.i.d. when zijr , r = 1, · · · , q; j = 1, · · · , ni ; i = 1, 2 ∼ N (0, 1). F HKD n n1 n2 n3 F HKG L2nv L2br L2rp ρ d=1 d=2 d=3 d=4 d=1 d=2 d=3 d=4 0.1 4.87 3.95 3.58 3.64 5.17 4.98 4.82 4.19 4.24 4.63 5.47 0.3 5.50 4.40 3.57 3.43 5.55 5.37 4.55 4.58 3.81 4.20 5.56 0.5 4.71 4.38 3.44 3.13 5.30 5.10 4.74 4.73 3.64 4.29 5.53 0.7 4.79 4.25 4.02 3.46 5.30 5.32 5.14 4.89 2.90 4.20 6.35 0.1 5.34 6.31 6.47 9.56 5.08 4.91 4.51 4.62 4.42 4.65 5.21 0.3 5.73 6.07 6.39 9.03 5.54 5.43 4.86 4.97 4.43 4.78 5.35 0.5 5.50 5.62 6.79 8.92 5.29 4.88 5.01 4.77 4.09 4.49 5.31 0.7 5.48 5.91 6.83 9.21 5.24 5.07 4.85 4.91 3.77 4.87 5.97 0.1 4.77 4.61 4.60 4.75 5.02 4.81 4.86 4.80 4.84 4.94 5.08 0.3 5.14 5.11 4.73 4.99 5.09 5.19 4.76 5.11 4.56 4.74 4.95 0.5 4.86 4.67 4.77 4.82 4.93 4.93 5.00 5.18 4.74 5.01 5.49 0.7 4.69 4.78 4.43 4.88 5.18 4.80 4.64 4.98 4.57 5.17 5.37 Tables 3 and 4 display the empirical sizes and powers of F HKD , F HKG , L2nv , L2br and L2rp i.i.d. when zijr , r = 1, 2, · · · , q; j = 1, 2, · · · , ni ; i = 1, 2 ∼ N (0, 1). We may make the following conclusions: • In terms of size-controlling, F HKD is conservative under both small and large sample sizes but it is liberal under medium sample sizes. This result shows that F HKD is unstable. In addition, choosing large d may cause negative effects on the performance of F HKD — larger d makes F HKD more conservative under small sample sizes and makes F HKD more liberal under medium sample sizes. When the parameter ρ is large, the L2nv has conservative 15 Table 4: Empirical powers (in percentages) of F HKD , F HKG , L2nv , L2br and L2rp for Simulation i.i.d. 2 when zijr , r = 1, · · · , q; j = 1, · · · , ni ; i = 1, 2 ∼ N (0, 1). F HKD n ρ 0.1 0.3 n1 0.5 0.7 0.1 0.3 n2 0.5 0.7 0.1 0.3 n3 0.5 0.7 F HKG L2nv L2br L2rp ω d=1 d=2 d=3 d=4 d=1 d=2 d=3 d=4 2.20 12.40 31.82 17.53 10.59 18.09 43.65 31.51 22.15 16.80 17.57 19.45 5.00 70.39 92.95 73.59 45.57 85.06 98.59 95.93 88.88 84.70 85.43 83.54 1.00 9.26 20.54 11.78 7.86 13.54 27.42 19.89 15.11 14.20 15.40 17.92 2.80 71.63 91.55 70.71 43.23 85.68 97.89 94.43 87.68 86.46 87.31 86.31 0.68 9.15 16.32 10.02 6.21 13.17 22.21 15.07 12.13 14.36 16.01 19.28 2.00 66.47 79.52 63.12 37.90 81.42 92.64 90.57 81.53 84.41 85.41 84.50 0.55 9.85 13.01 8.82 5.86 14.40 18.01 13.96 11.02 13.21 16.45 19.43 1.60 64.74 56.38 50.84 32.82 79.55 78.21 80.54 73.80 80.88 83.06 83.30 2.00 23.04 48.27 33.20 28.90 17.57 53.69 39.49 30.60 15.06 15.72 16.13 4.30 87.67 98.52 92.36 81.11 85.05 99.47 97.97 94.99 85.01 85.45 82.79 1.00 21.15 36.58 27.04 22.84 15.89 41.30 31.07 23.01 17.73 18.51 20.64 2.50 91.12 98.31 92.48 81.05 89.66 99.42 98.04 95.49 91.39 91.99 89.66 0.50 13.25 17.31 13.84 14.21 9.83 18.67 14.93 11.14 11.32 12.31 13.82 1.50 77.30 86.74 74.70 60.85 72.82 90.17 86.34 77.82 77.28 78.39 76.48 0.50 19.84 21.33 17.77 16.47 15.15 21.57 18.04 14.86 15.14 17.69 19.79 1.50 90.74 84.92 82.85 73.08 89.12 83.79 88.49 88.99 90.87 91.84 89.95 1.40 14.72 58.77 43.39 32.46 13.40 62.73 49.68 38.51 16.88 17.18 17.55 3.00 83.99 99.86 99.10 96.75 84.02 99.90 99.70 99.05 88.30 88.43 87.50 0.70 14.21 44.55 32.54 24.21 12.97 48.36 37.56 29.93 23.52 24.02 25.43 1.40 70.47 97.77 92.59 83.64 69.49 98.52 95.81 91.30 84.54 84.77 84.60 0.45 14.10 32.04 22.38 16.14 12.87 34.42 26.52 20.22 24.05 24.83 25.58 1.00 70.63 94.35 86.90 76.38 69.59 95.96 91.80 84.92 87.23 87.60 87.06 0.35 16.21 26.11 19.15 14.78 15.02 27.92 22.11 17.61 22.95 24.12 24.63 0.80 74.39 84.87 82.11 70.25 73.62 86.61 87.17 80.47 85.65 86.21 85.87 empirical sizes while L2rp has inflated empirical sizes. As the sample size increases, their empirical sizes become closer to the nominal size. Among the five tests, F HKG and L2br slightly outperform others. • In most cases, F HKD and F HKG have largest empirical powers at d = 2 and their 16 Table 5: Empirical sizes (in percentages) of F HKD , F HKG , L2nv , L2br and L2rp for Simulation 2 √ i.i.d. when zijr , r = 1, · · · , q; j = 1, · · · , ni ; i = 1, 2 ∼ t4 / 2. F HKD n n1 n2 n3 F HKG L2nv L2br L2rp ρ d=1 d=2 d=3 d=4 d=1 d=2 d=3 d=4 0.1 3.58 3.19 2.88 2.10 22.18 26.60 28.76 28.71 20.76 21.58 5.72 0.3 3.56 3.03 2.90 2.27 23.18 27.21 27.95 29.31 21.82 23.09 6.29 0.5 3.50 3.03 2.69 2.33 24.60 28.56 30.01 31.06 25.55 27.44 6.78 0.7 3.06 2.97 2.31 1.94 28.29 32.61 32.77 33.07 30.22 34.68 7.19 0.1 4.46 4.16 5.11 6.21 23.84 29.85 33.83 34.52 22.13 22.71 5.69 0.3 4.33 4.17 4.63 5.28 24.61 29.40 33.30 35.93 25.38 26.07 5.69 0.5 4.33 4.44 4.80 5.67 26.02 32.49 34.63 36.28 30.39 31.77 6.32 0.7 3.59 4.25 4.50 5.45 29.27 33.83 37.18 39.53 36.64 39.38 6.90 0.1 3.38 3.38 3.44 3.41 27.50 36.47 42.45 45.98 27.59 27.85 5.35 0.3 3.85 3.38 3.30 3.51 29.24 37.11 42.28 46.47 31.37 31.62 5.19 0.5 3.80 3.58 3.55 3.52 29.27 38.52 43.21 46.32 36.58 37.11 5.18 0.7 3.55 3.27 2.98 3.04 32.63 39.72 44.74 48.60 46.08 47.33 5.36 empirical powers decrease with increasing the values of d from 2 to 3, 4. This is not a surprise since d = 2 is the correct number of functional principal components with the main differences of the two covariance functions located at the first two basis functions. This shows that the performances of F HKD and F HKG strongly depend on if a correct number of principal components is used. When the number of functional principal components is not well chosen, the powers of F HKD and F HKG may be much smaller than those of L2nv , L2br and L2rp , as shown in the table. • Unlike F HKD and F HKG , L2nv , L2br and L2rp do not need to calculate the eigenvalues and choose the number of functional principal components. This could be a big advantage. Tables 5 and 6 display the empirical sizes and powers of F HKD , F HKG , L2nv , L2br and L2rp √ i.i.d. when zijr , r = 1, 2, · · · , q; j = 1, 2, · · · , ni ; i = 1, 2 ∼ t4 / 2. We may make the following conclusions: • F HKG , L2nv and L2br have too large empirical sizes and they do not work at all in this 17 Table 6: Empirical powers (in percentages) of F HKD , F HKG , L2nv , L2br and L2rp for Simulation √ i.i.d. 2 when zijr , r = 1, · · · , q; j = 1, · · · , ni ; i = 1, 2 ∼ t4 / 2. F HKD n ρ 0.1 0.3 n1 0.5 0.7 0.1 0.3 n2 0.5 0.7 0.1 0.3 n3 0.5 0.7 F HKG L2nv L2br L2rp ω d=1 d=2 d=3 d=4 d=1 d=2 d=3 d=4 2.60 12.60 36.43 18.81 10.09 37.14 71.50 64.30 58.56 36.26 37.17 23.84 6.50 61.89 88.71 64.83 36.93 90.19 99.70 99.35 98.55 89.97 90.33 82.79 1.40 13.07 31.45 17.35 8.70 38.26 67.66 61.63 56.84 41.79 42.90 26.86 4.20 68.59 86.44 69.49 41.43 94.42 99.49 99.80 99.23 94.11 94.29 88.97 1.00 11.56 23.99 14.84 7.76 37.99 61.04 57.89 53.63 45.65 47.87 27.78 2.80 61.02 66.97 60.52 35.22 90.28 96.41 98.71 97.89 91.73 92.24 84.82 0.80 10.75 15.26 11.16 6.73 38.99 54.28 54.54 52.06 49.50 53.80 27.18 2.50 64.79 51.09 45.80 32.15 92.71 94.71 96.64 97.37 94.18 94.79 88.34 2.00 16.92 42.38 27.67 21.48 33.14 70.69 65.55 60.78 33.60 34.39 13.71 5.00 71.76 94.62 83.36 66.80 86.41 99.86 99.53 98.82 85.75 86.10 68.61 1.00 16.36 33.07 21.52 16.87 33.77 61.57 58.33 57.13 38.74 39.81 14.94 4.00 87.45 95.44 91.60 79.29 97.03 99.75 99.99 99.98 97.41 97.49 88.25 1.00 27.97 43.25 33.58 25.24 46.37 72.81 72.33 69.27 58.17 59.69 27.54 2.80 85.20 86.54 87.32 76.07 95.79 98.43 99.79 99.84 96.61 96.71 86.59 0.80 27.18 31.70 27.99 21.89 47.02 64.01 68.28 66.06 62.65 65.33 25.49 2.10 80.60 73.02 72.22 66.24 93.13 94.62 96.71 98.37 95.78 96.04 82.56 1.20 7.44 43.31 29.03 19.60 31.67 71.80 68.35 67.97 34.90 35.11 9.38 2.60 40.99 96.16 88.81 78.12 64.93 99.49 98.95 97.66 69.46 69.69 45.66 0.70 10.00 42.72 29.89 20.67 33.95 72.06 69.87 69.13 48.15 48.48 14.29 1.50 47.90 95.92 88.95 77.02 71.29 99.29 98.55 97.90 84.94 85.20 58.34 0.50 11.41 35.94 25.40 18.05 35.96 67.55 66.38 66.98 58.66 59.45 17.03 1.00 42.60 86.03 78.97 65.20 67.38 96.64 96.12 94.90 88.59 88.98 56.56 0.45 15.47 32.57 27.46 19.90 41.53 67.20 69.77 69.86 69.82 71.11 19.36 0.85 46.22 69.18 76.47 65.17 71.41 89.92 95.51 95.25 93.49 93.81 61.60 simulation setting. This is expected since they are developed only for Gaussian functional data. • In terms of sizes, F HKD is rather conservative even when the correct number of functional principal components, d = 2, is used, especially under the small and large sample sizes, 18 while L2rp works reasonably well under the large sample size, and is slightly inflated under the small and medium sample sizes when ρ is large. In terms of powers, F HKD generally outperforms L2rp , except some cases when sample sizes are not large and when the data are less correlated. Table 7: Empirical sizes and powers (in percentages) of F HKD , F HKG , L2nv , L2br and L2rp for Simulation 2 with n3 = [75, 85] when zijr , r = 1, · · · , q; j = 1, · · · , ni ; i = 1, 2 are i.i.d. N (0, 1) under the new simulation scheme. F HKD ρ 0.1 0.3 0.5 0.7 F HKG L2nv L2br L2rp ω d=1 d=2 d=3 d=4 d=1 d=2 d=3 d=4 0.00 5.34 4.48 4.35 4.46 5.34 4.76 4.76 4.83 4.36 4.45 4.92 0.64 4.77 4.56 4.72 4.50 4.97 4.88 4.77 4.27 53.20 54.14 56.83 0.76 4.87 4.86 5.07 4.57 4.96 5.01 5.38 4.54 94.46 94.83 94.36 0.00 4.99 4.52 4.64 4.23 5.00 4.66 5.23 4.40 4.42 4.58 4.82 0.64 4.80 4.79 4.40 4.71 5.01 4.86 4.70 4.84 50.61 52.08 54.35 0.77 5.11 5.05 4.51 5.15 5.20 5.05 4.74 5.05 94.86 95.18 94.77 0.00 5.22 4.69 4.50 4.80 5.07 4.91 4.63 5.05 4.90 5.07 5.53 0.66 4.88 4.81 4.71 4.70 5.05 4.90 4.98 5.20 53.23 54.94 56.49 0.78 4.79 4.99 4.32 4.48 4.92 5.16 4.80 4.69 93.27 94.00 93.34 0.00 5.01 5.45 4.97 4.48 5.01 5.49 5.37 4.94 4.55 5.00 5.32 0.69 4.81 5.11 4.35 4.66 4.90 5.30 4.62 4.87 51.20 54.44 54.97 0.82 4.96 4.78 4.70 4.85 4.99 4.70 5.21 5.11 92.02 93.10 92.78 In some situations, however, L2nv , L2br and L2rp can have much higher powers than F HKD and F HKG . We can show this via making a minor change of the previous simulation scheme. We continue to use the data generating model (4.1) but we set ηi (t) = 0, i = 1, 2, · · · , k for simplicity and only present the large sample size result for space saving. In addition, we increase the number of basis functions to q = 25 and set λ1r = ρr−1 , r = 1, 2, · · · , q, λ2r = ρr−1 , r = 1, 2, · · · , q−1 and p p λ2q = λ1q + ω so that the differences of the covariance functions of the functional samples are located in the space spanned by the last eigenfunction. Since the information is located in high frequencies, F HKD and F HKG will be less powerful in detecting the differences of the 19 covariance functions. This is not the case for L2nv , L2br and L2rp since these L2 -norm based tests use all the information provided by the data. The simulation results presented in Table 7 indeed show this is true. From this table, we can see that the powers of F HKD and F HKG are about the same with increasing the values of ω but powers of L2nv , L2br and L2rp become larger as ω increases. 5 Applications to Two Real Data Examples In this section, we shall present the applications of L2nv , L2br , L2rp to two real data examples. Throughout this section, the p-values of L2rp were obtained based on 10000 runs of random permutations. 5.1 The Medfly Data In this subsection, we present some applications of L2nv , L2br , L2rp to check if the cell covariance functions of the medfly data are the same. The medfly data, which recorded daily egg-laying numbers of 1000 medflies (Mediterranean fruit flies), have been analyzed by several authors in the literature, including Müller and Stadtmüller (2005) and Fremdt et al. (2013) among others. Thanks to Professor Hans-Georg Müller and Professor Carey’s laboratory, this medfly data set is available at http://anson.ucdavis.edu/~mueller/data/data.html. Previous studies indicate that the fecundity may be associated with the individual mortality and longevity. We picked up 534 medflies who lived at least 34 days and studied both the absolute and relative counts of eggs laid by the 534 medflies in the first 30 days. A relative count is defined as the ratio of absolute count in each day to the total number of eggs laid by each medfly. These medflies are classified into two groups: long-lived and short-lived. The long-lived group includes 278 medflies who lived 44 days or longer and the short-lived group includes 256 medflies who lived less than 44 days. Fremdt et al. (2013) has considered testing if the covariance functions of the long-lived group and the short-lived group are the same. We can also apply L2nv , L2br , L2rp for this problem. Actually, based on the absolute counts, the test statistic Tn = 2.9774e8 and the p-values of L2nv , L2br , L2rp are 0.3017, 0.2999 and 0.1228 respectively. These p-values show that there is no 20 strong evidence against the null hypothesis that the covariance functions of the long-lived group and the short-lived group are the same. This conclusion is consistent with the one made by the F HKD test described in Fremdt et al. (2013). Based on the relative counts, on the other hand, the associated test statistic Tn = 0.0191 and the p-values of L2nv , L2br , L2rp are now 0, 0 and 0.0025 respectively. These p-values show that there is very strong evidence against the null hypothesis. This conclusion is again consistent with the one made by the F HKD test. However,the F HKG test can not obtain the right result. Besides, choosing different d may get different p-values. According to Fremdt et al. (2013), both the absolute counts and the relative counts have a strong deviation from normality which can be easily verified by QQ-plots. Therefore, the p-values of L2rp will be more reliable than those of L2nv and L2br . Although L2nv and L2br are based on the Gaussian assumption, these two tests give consistent result for both the absolute counts and relative counts while F HKG may give a misleading conclusion because the result of F HKG varies depending on the selection of empirical functional principal components as shown in Fremdt et al. (2013). It is also possible to classify the medflies into three groups. The first group consists of the long-lived medflies who lived 50 days or longer, the second group consists of the medium-lived medflies who lived at least 40 days but no longer than 50 days, and the third group consists of the short-lived medflies who lived less than 40 days. Of the 534 medflies, 180 are long-lived, 180 are medium-lived and 174 are short-lived. Of interest is to test if the covariance functions of the three groups of medflies are the same. Based on the absolute counts, the associated test statistic Tn = 5.7069e8 and the p-values of L2nv , L2br , L2rp are 0.3132, 0.3107 and 0.1030 respectively. Thus, again, there is no strong evidence against that the covariance functions of the three groups are the same. Based on the relative counts, the associated test statistic Tn = 0.0337 and the p-values of L2nv , L2br , L2rp are 0, 0, and 0.0123 respectively. Thus, again, there is strong evidence against that the covariance functions of the three groups are the same. These conclusions are consistent with those obtained based on the comparison of the covariance functions of the long-lived and short-lived medflies described above. 21 5.2 The orthosis data In this subsection, we present some applications of L2nv , L2br , L2rp to check if the cell covariance functions of the orthosis data are the same. The orthosis data set was kindly provided by Dr. Brani Vidakovic via email communication. It has been previously studied by a number of authors, including Abramovich et al. (2004), Abramovich and Angelini (2006), Antoniadis and Sapatinas (2007), and Cuesta-Albertos and Febrero-Bande (2010) among others. To better understand how muscle copes with an external perturbation, the orthosis data were acquired and computed by Dr. Amarantini David and Dr. Martin Luc (Laboratoire Sport et Performance Motrice, EA 597, UFRAPS, Grenoble University, France). The data set recorded the moments at the knee of 7 volunteers under 4 experimental conditions (control, orthosis, spring 1, spring 2), each 10 times at equally spaced 256 time points. Figure 1 displays the raw curves of the orthosis data set, with each panel showing 10 raw curves. Figure 2 shows the 4 estimated cell covariance functions for the fifth volunteer under all the 4 conditions. Based on these two figures, it seems that the cell covariance functions are not exactly the same. Figure 1: Raw curves of the orthosis data. 50 50 100 40 100 0 50 20 50 -50 0 0 0 0 -50 -100 0 0.5 1 50 -50 0 0.5 1 50 -20 0 0.5 1 -50 0 50 50 0 0 0.5 1 -50 0.5 1 100 -50 0 0.5 1 50 -50 0 0.5 1 100 50 0.5 1 1 0 0 -50 0.5 1 -50 0 0.5 1 1 50 50 0 0 0.5 1 0 0.5 1 0 0.5 1 0 0.5 1 0.5 1 0.5 1 50 0 0.5 1 100 50 0 -50 0 0.5 1 0 -50 0 0.5 1 -50 0 0.5 1 -50 0 0.5 1 100 40 100 100 100 50 20 50 50 50 0 0 0 0 0 -50 0 -50 0 0 -50 0 50 0.5 50 0 -50 0.5 -50 0 -50 0 0 0 0 1 100 50 50 0.5 -50 0 50 0 -50 0 0 -100 0 0 50 0 -50 50 -50 0 100 0 50 -20 0 0.5 1 -50 0 0.5 22 1 -50 0 0.5 1 -50 0 0.5 1 Figure 2: Estimated cell covariance functions of the orthosis data for the fifth volunteer under 4 treatment conditions. We first applied L2nv , L2br , L2rp to test if all the 28 cell covariance functions are the same. It is easy to obtain that the test statistic Tn = 1.5661e10 using (2.6). To apply L2nv , by (2.10) and (2.11), we obtained tr($̂) = 2.9198e8, tr($̂⊗2 ) = 5.1118e15 so that β̂ = 1.7507e7, dˆ = 450.29. \ ⊗2 ) = \ = 2.9051e8, tr($ The resulting p-value of L2nv is then 0. To apply L2br , we obtained tr($) 4.9242e15 using (2.13) and then β̂ = 1.6950e7, dˆ = 462.75 using (2.12). The resulting p-value of L2br is also 0. Similarly, the resulting p-value of L2rp is again 0. These p-values demonstrate that the 28 cell covariance functions of the orthosis data are unlikely to be the same. Second, we applied L2nv , L2br , L2rp to check if the 4 estimated cell covariance functions for the fifth volunteer under the 4 different conditions are the same. The resulting test statistic is Tn = 5.5510e9 and the resulting p-values of L2nv , L2br , L2rp are 0.0040, 0.0011 and 0.0150 respectively. These resulting p-values show that the 4 cell covariance functions under consideration are unlikely to be the same which is consistent with what we observed from Figure 2. Finally, we applied L2nv , L2br , L2rp to check if the 4 estimated cell covariance functions for the first volunteer under the 4 different conditions are the same. The resulting test statistic is Tn = 5.7008e8 and the resulting p-values of L2nv , L2br , L2rp are 0.4670, 0.4050 and 0.2076 respectively, showing that there is no strong evidence that the 4 estimated cell covariance functions for the first volunteer under the 4 different conditions are the same. 23 Appendix Technical proofs and additional contents are available in supplementary materials. References Abramovich, F. and Angelini, C. (2006). Testing in mixed-effects FANOVA models. Journal of Statistical Planning and Inference, 136(12):4326–4348. Abramovich, F., Antoniadis, A., Sapatinas, T., and Vidakovic, B. (2004). Optimal testing in a fixed-effects functional analysis of variance model. International Journal of Wavelets, Multiresolution and Information Processing, 2(04):323–349. Antoniadis, A. and Sapatinas, T. (2007). Estimation and inference in functional mixed-effects models. Computational Statistics & Data Analysis, 51(10):4793–4813. Cuesta-Albertos, J. and Febrero-Bande, M. (2010). A simple multiway ANOVA for functional data. Test, 19(3):537–557. Cuevas, A., Febrero, M., and Fraiman, R. (2004). An ANOVA test for functional data. Computational statistics & data analysis, 47(1):111–122. Fremdt, S., Steinebach, J. G., Horváth, L., and Kokoszka, P. (2013). Testing the equality of covariance operators in functional samples. Scandinavian Journal of Statistics, 40(1):138–152. Górecki, T. and Smaga, Ł. (2015). A comparison of tests for the one-way ANOVA problem for functional data. Computational Statistics, 30(4):987–1010. Müller, H.-G. and Stadtmüller, U. (2005). Generalized functional linear models. Annals of Statistics, 33(2):774–805. Panaretos, V. M., Kraus, D., and Maddocks, J. H. (2010). Second-order comparison of Gaussian random functions and the geometry of DNA minicircles. Journal of the American Statistical Association, 105(490):670–682. Ramsay, J. and Silverman, B. (2005). Functional Data Analysis. Spring, New York. 24 Shen, Q. and Faraway, J. (2004). An F test for linear models with functional responses. Statistica Sinica, 14(4):1239–1258. Zhang, C., Peng, H., and Zhang, J.-T. (2010a). Two samples tests for functional data. Communications in Statistics — Theory and Methods, 39(4):559–578. Zhang, J.-T. (2013). Analysis of variance for functional data. CRC Press. Zhang, J.-T. and Chen, J. (2007). Statistical inferences for functional data. The Annals of Statistics, 35(3):1052–1079. Zhang, J.-T. and Liang, X. (2013). One-way ANOVA for functional data via globalizing the pointwise F-test. Scandinavian Journal of Statistics, 41(1):51–71. Zhang, J.-T., Liang, X., and Xiao, S. (2010b). On the two-sample Behrens-Fisher problem for functional data. Journal of Statistical Theory and Practice, 4(4):571–587. Zhang, J.-T. and Sun, Y. (2010). Two-sample test for equal covariance function for functional data. Oriental Journal of Mathematics, 4:1–22. 25
10math.ST
Learning to Answer Questions From Image Using Convolutional Neural Network Lin Ma Zhengdong Lu Hang Li arXiv:1506.00333v2 [cs.CL] 13 Nov 2015 Noah’s Ark Lab, Huawei Technologies [email protected] [email protected] HangLi,[email protected] Abstract In this paper, we propose to employ the convolutional neural network (CNN) for the image question answering (QA). Our proposed CNN provides an end-to-end framework with convolutional architectures for learning not only the image and question representations, but also their inter-modal interactions to produce the answer. More specifically, our model consists of three CNNs: one image CNN to encode the image content, one sentence CNN to compose the words of the question, and one multimodal convolution layer to learn their joint representation for the classification in the space of candidate answer words. We demonstrate the efficacy of our proposed model on the DAQUAR and COCO-QA datasets, which are two benchmark datasets for the image QA, with the performances significantly outperforming the state-of-the-art. Introduction Recently, the multimodal learning between image and language (Ma et al. 2015; Makamura et al. 2013; Xu et al. 2015b) has become an increasingly popular research area of artificial intelligence (AI). In particular, there have been rapid progresses on the tasks of bidirectional image and sentence retrieval (Frome et al. 2013; Socher et al. 2014; Klein et al. 2015; Karpathy, Joulin, and Li 2014; Ordonez, Kulkarni, and Berg 2011), and automatic image captioning (Chen and Zitnick 2014; Karpathy and Li 2014; Donahue et al. 2014; Fang et al. 2014; Kiros, Salakhutdinov, and Zemel 2014a; Kiros, Salakhutdinov, and Zemel 2014b; Klein et al. 2015; Mao et al. 2014a; Mao et al. 2014b; Vinyals et al. 2014; Xu et al. 2015a). In order to further advance the multimodal learning and push the boundary of AI research, a new “AI-complete” task, namely the visual question answering (VQA) (Antol et al. 2015) or image question answering (QA) (Malinowski and Fritz 2014a; Malinowski and Fritz 2014b; Malinowski and Fritz 2015; Malinowski, Rohrbach, and Fritz 2015; Ren, Kiros, and Zemel 2015), is recently proposed. Generally, it takes an image and a free-form, natural-language like question about the image as the input and produces an answer to the image and question. Image QA differs with the other multimodal learning tasks between image and sentence, such as the automatic Copyright c 2015, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved. Question: what is the largest blue object in this picture? Ground truth: water carboy Proposed CNN: water carboy Question: How many pieces does the curtain have? Ground truth: 2 Proposed CNN: 2 Figure 1: Samples of the image, the related question, and the ground truth answer, as well as the answer produced by our proposed CNN model. image captioning. The answer produced by the image QA needs to be conditioned on both the image and question. As such, the image QA involves more interactions between image and language. As illustrated in Figure 1, the image contents are complicated, containing multiple different objects. The questions about the images are very specific, which requires a detailed understanding of the image content. For the question “what is the largest blue object in this picture?”, we need not only identify the blue objects in the image but also compare their sizes to generate the correct answer. For the question “how many pieces does the curtain have?”, we need to identify the object “curtain” in the non-salient region of the image and figure out its quantity. A successful image QA model needs to be built upon good representations of the image and question. Recently, deep neural networks have been used to learn image and sentence representations. In particular, convolutional neural networks (CNNs) are extensively used to learn the image representation for image recognition (Simonyan and Zisserman 2014; Szegedy et al. 2015). CNNs (Hu et al. 2014; Kim 2014; Kalchbrenner, Grefenstette, and Blunsom 2014) also demonstrate their powerful abilities on the sentence representation for paraphrase, sentiment analysis, and so on. Moreover, deep neural networks (Mao et al. 2014a; Karpathy, Joulin, and Li 2014; Karpathy and Li 2014; Vinyals et al. 2014) are used to capture the relations between image and sentence for image captioning and retrieval. However, for the image QA task, the ability of CNN has not been studied. In this paper, we employ CNN to address the image QA problem. Our proposed CNN model, trained on a set of triplets consisting of (image, question, answer), can answer free-form, natural-language like questions about the image. Our main contributions are: red green Related Work Recently, the visual Turing test, an open domain task of question answering based on real-world images, has been proposed to resemble the famous Turing test. In (Gao et al. 2015) a human judge will be presented with an image, a question, and the answer to the question by the computational models or human annotators. Based on the answer, the human judge needs to determine whether the answer is given by a human (i.e. pass the test) or a machine (i.e. fail the test). Geman et al. (Geman et al. 2015) proposed to produce a stochastic sequence of binary questions from a given test image, where the answer to the question is limited to yes/no. Malinowski et al. (Malinowski and Fritz 2014b; Malinowski and Fritz 2015) further discussed the associated challenges and issues with regard to visual Turing test, such as the vision and language representations, the common sense knowledge, as well as the evaluation. The image QA task, resembling the visual Turing test, is then proposed. Malinowski et al. (Malinowski and Fritz 2014a) proposed a multi-world approach that conducts the semantic parsing of question and segmentation of image to produce the answer. Deep neural networks are also employed for the image QA task, which is more related to our research work. The work by (Malinowski, Rohrbach, and Fritz 2015; Gao et al. 2015) formulates the image QA task as a generation problem. Malinowski et al.’s model (Malinowski, Rohrbach, and Fritz 2015), namely the NeuralImage-QA, feeds the image representation from CNN and the question into the long-short term memory (LSTM) to produce the answer. This model ignores the different characteristics of questions and answers. Compared with the questions, the answers tend to be short, such as one single word denoting the object category, color, number, and so on. The deep neural network in (Gao et al. 2015), inspired by the multimodal recurrent neural networks model (Mao et al. 2014b; Mao et al. 2014a), used two LSTMs for the representations of question and answer, respectively. In (Ren, Kiros, and Zemel 2015), the image QA task is formulated as a classification problem, and the socalled visual semantic embedding (VSE) model is proposed. LSTM is employed to jointly model the image and ques- softmax image CNN multimodal convolution ... 1. We propose an end-to-end CNN model for learning to answer questions about the image. Experimental results on public image QA datasets show that our proposed CNN model surpasses the state-of-the-art. 2. We employ convolutional architectures to encode the image content, represent the question, and learn the interactions between the image and question representations, which are jointly learned to produce the answer conditioning on the image and question. chair laptop ... sentence CNN how many leftover donuts is the red bicycle holding Figure 2: The proposed CNN model for image QA. tion by treating the image as an independent word, and appending it to the question at the beginning or ending position. As such, the joint representation of image and question is learned, which is further used for classification. However, simply treating the image as an individual word cannot help effectively exploit the complicated relations between the image and question. Thus, the accuracy of the answer prediction may not be ensured. In order to cope with these drawbacks, we proposed to employ an end-toend convolutional architectures for the image QA to capture the complicated inter-modal relationships as well as the representations of image and question. Experimental results demonstrate that the convolutional architectures can can achieve better performance for the image QA task. Proposed CNN for Image QA For image QA, the problem is to predict the answer a given the question q and the related image I: a = argmax p(a|q, I; θ), a∈Ω (1) where Ω is the set containing all the answers. θ denotes all the parameters for performing image QA. In order to make a reliable prediction of the answer, the question q and image I need to be adequately represented. Based on their representations, the relations between the two multimodal inputs are further learned to produce the answer. In this paper, the ability of CNN is exploited for not only modeling image and sentence individually, but also capturing the relations and interactions between them. As illustrated in Figure 2, our proposed CNN framwork for image QA consists of three individual CNNs: one image CNN encoding the image content, one sentence CNN generating the question representation, one multimodal convolution layer fusing the image and question representations together and generate the joint representation. Finally, the joint representation is fed into a softmax layer to produce the answer. The three CNNs and softmax layer are fully coupled for our proposed end-to-end image QA framework, with all the parameters (three CNNs and softmax) jointly learned in an end-to-end fashion. Image CNN There are many research papers employing CNNs to generate image representations, which achieve the state-ofthe-art performances on image recognition (Simonyan and Zisserman 2014; Szegedy et al. 2015). In this paper, we employ the work (Simonyan and Zisserman 2014) to encode the image content for our image QA model: νim = σ(wim (CN Nim (I)) + bim ), (2) where σ is a nonlinear activation function, such as Sigmoid and ReLU (Dahl, Sainath, and Hinton 2013). CN Nim takes the image as the input and outputs a fixed length vector as the image representation. In this paper, by chopping out the top softmax layer and the last ReLU layer of the CNN (Simonyan and Zisserman 2014), the output of the last fully-connected layer is deemed as the image representation, which is a fixed length vector with dimension as 4096. Note that wim is a mapping matrix of the dimension d × 4096, with d much smaller than 4096. On one hand, the dimension of the image representation is reduced from 4096 to d. As such, the total number of parameters for further fusing image and question, specifically the multimodal convolution process, is significantly reduced. Consequently, fewer samples are needed for adequately training our CNN model. On the other hand, the image representation is projected to a new space, with the nonlinear activation function σ increasing the nonlinear modeling property of the image CNN. Thus its capability for learning complicated representations is enhanced. As a result, the multimodal convolution layer (introduced in the following section) can better fuse the question and image representations together and further exploit their complicated relations and interactions to produce the answer. Sentence CNN In this paper, CNN is employed to model the question for image QA. As most convolution models (Lecun and Bengio 1995; Kalchbrenner, Grefenstette, and Blunsom 2014), we consider the convolution unit with a local “receptive field” and shared weights to capture the rich structures and composition properties between consecutive words. The sentence CNN for generating the question representation is illustrated in Figure 3. For a given question with each word represented as the word embedding (Mikolov et al. 2013), the sentence CNN with several layers of convolution and max-pooling is performed to generate the question representation νqt . Convolution For a sequential input ν, the convolution unit for feature map of type-f on the `th layer is def i i ν(`,f ν(`−1) + b(`,f ) ), ) = σ(w(`,f ) ~ (3) where w(`,f ) are the parameters for the f feature map on the i `th layer, σ is the nonlinear activation function, and ~ν(`−1) denotes the segment of (`−1)th layer for the convolution at location i , which is defined as follows. def i+s rp i+1 i i ~ν(`−1) = ν(`−1) k ν(`−1) k · · · k ν(`−1) −1 , (4) ... more convolution & max-pooling max-pooling convolution what is on the table in front of the chair ... Figure 3: The sentence CNN for the question representation. where srp defines the size of local “receptive field” for convolution. “k” concatenates the srp vectors into a long vector. In this paper, srp is chosen as 3 for the convolution process. The parameters within the convolution unit are shared for the whole question with a window covering 3 semantic components sliding from the beginning to the end. The input of the first convolution layer for the sentence CNN is the word embeddings of the question: def i+srp −1 i+1 i i k νwd k · · · k νwd ~ν(0) = νwd , (5) i where νwd is the word embedding of the ith word in the question. Max-pooling With the convolution process, the sequential srp semantic components are composed to a higher semantic representation. However, these compositions may not be the meaningful representations, such as “is on the” of the question in Figure 3. The max-pooling process following each convolution process is performed: 2i+1 i 2i ν(`+1,f ) = max(ν(`,f ) , ν(`,f ) ). (6) Firstly, together with the stride as two, the max-pooling process shrinks half of the representation, which can quickly make the sentence representation. Most importantly, the max-pooling process can select the meaningful compositions while filter out the unreliable ones. As such, the meaningful composition “of the chair” is more likely to be pooled out, compared with the composition “front of the”. The convolution and max-pooling processes exploit and summarize the local relation signals between consecutive words. More layers of convolution and max-pooling can help to summarize the local interactions between words at larger scales and finally reach the whole representation of the question. In this paper, we employ three layers of convolution and max-pooling to generate the question representation νqt . Multimodal Convolution Layer The image representation νim and question representation νqt are obtained by the image and sentence CNNs, respectively. We design a new multimodal convolution layer on top of them, as shown in Figure 4, which fuses the multimodal inputs together to generate their joint representation for further answer prediction. The image representation is treated as an individual semantic component. Based on the image representation and the two consecutive semantic components from the question side, the mulitmodal convolution Configurations and Training multimodal convolution … Figure 4: The multimodal convolution layer to fuse the image and question representations. is performed, which is expected to capture the interactions and relations between the two multimodal inputs. def i+1 in i ~νmm = νqt k νim k νqt , def i in ν(mm,f νmm + b(mm,f ) ), ) = σ(w(mm,f ) ~ (7) (8) in where ~νmm is the input of the multimodal convolution unit. i νqt is the segment of the question representation at location i. w(mm,f ) and b(mm,f ) are the parameters for the type-f feature map of the multimodal convolution layer. Alternatively, LSTM could be used to fuse the image and question representations, as in (Malinowski, Rohrbach, and Fritz 2015; Ren, Kiros, and Zemel 2015). For example, in the latter work, a bidirectional LSTM (Ren, Kiros, and Zemel 2015) is employed by appending the image representation to the beginning or ending position of the question. We argue that it is better to employ CNN than LSTM for the image QA task, due to the following reason, which has also been verified in the following experiment section. The relations between image and question are complicated. The image may interact with the high-level semantic representations composed from of a number of words, such as “the red bicycle” in Figure 2. However, LSTM cannot effectively capture such interactions. Treating the image representation as an individual word, the effect of image will vanish at each time step of LSTM in (Ren, Kiros, and Zemel 2015). As a result, the relations between the image and the high-level semantic representations of words may not be well exploited. In contrast, our CNN model can effectively deal with the problem. The sentence CNN first compose the question into a high-level semantic representations. The multimodal convolution process further fuse the semantic representations of image and question together and adequately exploit their interactions. After the mutlimodal convolution layer, the multimodal representation νmm jointly modeling the image and question is obtained. νmm is then fed into a softmax layer as shown in Figure 2, which produces the answer to the given image and question pair. Experiments In this section, we firstly introduce the configurations of our CNN model for image QA and how we train the proposed CNN model. Afterwards, the public image QA datasets and evaluation measurements are introduced. Finally, the experimental results are presented and analyzed. Three layers of convolution and max-pooling are employed for the sentence CNN. The numbers of the feature maps for the three convolution layers are 300, 400, and 400, respectively. The sentence CNN is designed on a fixed architecture, which needs to be set to accommodate the maximum length of the questions. In this paper, the maximum length of the question is chosen as 38. The word embeddings are obtained by the skip-gram model (Mikolov et al. 2013) with the dimension as 50. We use the VGG (Simonyan and Zisserman 2014) network as the image CNN. The dimension of νim is set as 400. The multimodal CNN takes the image and sentence representations as the input and generate the joint representation with the number of feature maps as 400. The proposed CNN model is trained with stochastic gradient descent with mini batches of 100 for optimization, where the negative log likelihood is chosen as the loss. During the training process, all the parameters are tuned, including the parameters of nonlinear image mapping, image CNN, sentence CNN, multimodal convolution layer, and softmax layer. Moreover, the word embeddings are also fine-tuned. In order to prevent overfitting, dropout (with probability 0.1) is used. Image QA Datasets We test and compare our proposed CNN model on the public image QA databases, specifically the DAQUAR (Malinowski and Fritz 2014a) and COCO-QA (Ren, Kiros, and Zemel 2015) datasets. DAQUAR-All (Malinowski and Fritz 2014a) This dataset consists of 6,795 training and 5,673 testing samples, which are generated from 795 and 654 images, respectively. The images are from all the 894 object categories. There are mainly three types of questions in this dataset, specifically the object type, object color, and number of objects. The answer may be a single word or multiple words. DAQUAR-Reduced (Malinowski and Fritz 2014a) This dataset is a reduced version of DAQUAR-All, comprising 3,876 training and 297 testing samples. The images are constrained to 37 object categories. Only 25 images are used for the testing sample generation. Same as the DAQUAR-All dataset, the answer may be a single word or multiple words. COCO-QA (Ren, Kiros, and Zemel 2015) This dataset consists of 79,100 training and 39,171 testing samples, which are generated from about 8,000 and 4,000 images, respectively. There are four types of questions, specifically the object, number, color, and location. The answers are all single-word. Evaluation Measurements One straightforward way for evaluating image QA is to utilize accuracy, which measures the proportion of the correctly answered testing questions to the total testing questions. Besides accuracy, Wu-Palmer similarity (WUPS) (Wu and Palmer 1994; Malinowski and Fritz 2014a) is also used to measure the performances of different models on the image QA task. WUPS calculates the similarity between two words based on their common subsequence in a taxonomy tree. Table 1: Image QA performances on DAQUAR-All. Multi-World Approach (Malinowski and Fritz 2014a) Human Answers (Malinowski, Rohrbach, and Fritz 2015) Human Answers without image (Malinowski, Rohrbach, and Fritz 2015) Neural-Image-QA (Malinowski, Rohrbach, and Fritz 2015) -multiple words -single word Language Approach -multiple words -single word Proposed CNN -multiple words -single word Table 2: Image QA performances on DAQUAR-Reduced. Accuracy WUPS @0.9 WUPS @0.0 7.86 11.86 38.79 Multi-World Approach (Malinowski and Fritz 2014a) 50.20 50.82 67.27 11.99 16.82 33.57 17.49 19.43 23.28 25.28 57.76 62.00 Neural-Image-QA (Malinowski, Rohrbach, and Fritz 2015) -multiple words -single word Language Approach -multiple words -single word 17.06 17.15 22.30 22.80 56.53 58.42 21.47 24.49 27.15 30.47 59.44 66.08 A threshold parameter is required for the calculation of WUPS. Same as the previous work (Ren, Kiros, and Zemel 2015; Malinowski and Fritz 2014a; Malinowski, Rohrbach, and Fritz 2015), the threshold parameters 0.0 and 0.9 are used for the measurements [email protected] and [email protected], respectively. Experimental Results and Analysis Competitor Models We compare our models with recently developed models for the image QA task, specifically the multi-world approach (Malinowski and Fritz 2014a), the VSE model (Ren, Kiros, and Zemel 2015), and the Neural-Image-QA approach (Malinowski, Rohrbach, and Fritz 2015). Performances on Image QA The performances of our proposed CNN model on the DAQUAR-All, DAQUARReduced, and COCO-QA datasets are illustrated in Table 1, 2, and 3, respectively. For DAQUAR-All and DAQUARReduced datasets with multiple words as the answer to the question, we treat the answer comprising multiple words as an individual class for training and testing. For the DAQUAR-All dataset, we evaluate the performances of different image QA models on the full set (“multiple words”). The answer to the image and question pair may be a single word or multiple words. Same as the work (Malinowski, Rohrbach, and Fritz 2015), a subset containing the samples with only a single word as the answer is created and employed for comparison (“single word”). Our proposed CNN model significantly outperforms the multiworld approach and Neural-Image-QA in terms of accuracy, [email protected], and [email protected]. Specifically, our proposed CNN model achieves over 20% improvement compared to Neural-Image-QA in terms of accuracy on both “multiple words” and “single word”. The results, shown in Table. 1, demonstrate that our CNN model can more accurately model the image and question as well as their interactions, thus yields better performances for the image QA task. Moreover, the language approach (Malinowski, Rohrbach, and Fritz 2015), which only resorts to the question performs inferiorly Accuracy WUPS @0.9 WUPS @0.0 12.73 18.10 51.47 29.27 34.68 36.50 40.76 79.47 79.54 32.32 31.65 38.39 38.35 80.05 80.08 VSE (Ren, Kiros, and Zemel 2015) -single word GUESS BOW LSTM IMG+BOW VIS+LSTM 2-VIS+BLSTM 18.24 32.67 32.73 34.17 34.41 35.78 29.65 43.19 43.50 44.99 46.05 46.83 77.59 81.30 81.62 81.48 82.23 82.14 Proposed CNN -multiple words -single word 38.38 42.76 43.43 47.58 80.63 82.60 to the approaches that jointly model the image and question. The image component is thus of great help to the image QA task. One can also see that the performances on “multiple words” are generally inferior to those on “single word”. For the DAQUAR-Reduced dataset, besides the NeuralImage-QA approach, the VSE model is also compared on “single word”. Moreover, some of the methods introduced in (Ren, Kiros, and Zemel 2015) are also reported and compared. GUESS is the model which randomly outputs the answer according to the question type. BOW treats each word of the question equally and sums all the word vectors to predict the answer by logistic regression. LSTM is performed only on the question without considering the image, which is similar to the language approach (Malinowski, Rohrbach, and Fritz 2015). IMG+BOW performs the multinomial logistic regression based on the image feature and a BOW vector obtained by summing all the word vectors of the question. VIS+LSTM and 2-VIS+BLSTM are two versions of the VSE model. VIS+LSTM has only a single LSTM to encode the image and question in one direction, while 2-VIS+BLSTM uses a bidirectional LSTM to encode the image and question along with both directions to fully exploit the interactions between image and each word of the question. It can be observed that 2-VIS+BLSTM outperforms VIS+LSTM with a big margin. The same observation can also be found on the COCO-QA dataset, as shown in Table 3, demonstrating that the bidirectional LSTM can more accurately model the interactions between image and question than the single LSTM. Our proposed CNN model significantly outperforms the competitor models. More specifically, for the case of “single word”, our proposed CNN achieves nearly 20% improvement in terms of accuracy over the best competitor model 2-VIS+BLSTM. For the COCO-QA dataset, IMG+BOW outperforms VIS+LSTM and 2-VIS+BLSTM, demonstrating that the Table 3: Image QA performances on COCO-QA. VSE (Ren, Kiros, and Zemel 2015) GUESS BOW LSTM IMG IMG+BOW VIS+LSTM 2-VIS+BLSTM FULL Proposed CNN without multimodal convolution layer Proposed CNN without image representation Proposed CNN Accuracy WUPS @0.9 WUPS @0.0 6.65 37.52 36.76 43.02 55.92 53.31 55.09 57.84 17.42 48.54 47.58 58.64 66.78 63.91 65.34 67.90 73.44 82.78 82.34 85.85 88.99 88.25 88.64 89.52 56.77 66.76 88.94 37.84 48.70 82.92 58.40 68.50 89.67 simple multinomial logistic regression of IMG+BOW can better model the interactions between image and question, compared with the LSTMs of VIS+LSTM and 2VIS+BLSTM. By averaging VIS+LSTM, 2-VIS+BLSTM, and IMG+BOW, the FULL model is developed, which summarizes the interactions between image and question from different perspectives thus yields a much better performance. As shown in Table 3, our proposed CNN model outperforms all the competitor models in terms of all the three evaluation measurements, even the FULL model. The reason may be that the image representation is of highly semantic meaning, which should interact with the high semantic components of the question. Our CNN model firstly uses the convolutional architectures to compose the words to highly semantic representations. Afterwards, we let the image meet the composed highly semantic representations and use convolutional architectures to exploit their relations and interactions for the answer prediction. As such, Our CNN model can well model the relations between image and question, and thus obtain the best performances. Influence of Multimodal Convolution Layer The image and question needs to be considered together for the image QA. The multimodal convolution layer in our proposed CNN model not only fuses the image and question representations together but also learns the interactions and relations between the two multimodal inputs for further question prediction. The effect of the multimodal convolution layer is examined as follows. The image and question representations are simply concatenated together as the input of the softmax layer for the answer prediction. We train the network in the same manner as the proposed CNN model. The results are provided in Table 3. Firstly, it can be observed that without the multimodal convolution layer, the performance on the image QA has dropped. Comparing to the simple concatenation process fusing the image and question representations, our proposed multimodal convolution layer can well exploit the complicated relationships between image and question representations. Thus a better performance for the answer prediction is achieved. Secondly, the approach without multimodal convolution layer outperforms the IMG+BOW, VIS+LSTM and 2-VIS+BLSTM, in terms of accuracy. The better performance is mainly attributed to the composition ability of the sentence CNN. Even with the simple concatenation process, the image representation and composed question representation can be fuse together for a better image QA model. Influence of Image CNN and Effectiveness of Sentence CNN As can be observed in Table 1, without the image content, the accuracy of human answering the question drops from 50% to 12%. Therefore, the image content is critical to the image QA task. Same as the work (Malinowski, Rohrbach, and Fritz 2015; Ren, Kiros, and Zemel 2015), we only use the question representation obtained from the sentence CNN to predict the answer. The results are listed in Table 3. Firstly, without the use of image representation, the performance of our proposed CNN significantly drops, which again demonstrates the importance of image component to the image QA. Secondly, the model only consisting of the sentence CNN performs better than LSTM and BOW for the image QA. It indicates that the sentence CNN is more effective to generate the question representation for image QA, compared with LSTM and BOW. Recall that the model without multimodal convolution layers outperforms IMG+BOW, VIS+LSTM, and 2-VIS+BLSTM, as explained above. By incorporating the image representation, the better modeling ability of our sentence CNN is demonstrated. Moreover, we examine the language modeling ability of the sentence CNN as follows. The words of the test questions are randomly reshuffled. Then the reformulated questions are sent to the sentence CNN to check whether the sentence CNN can still generate reliable question representations and make accurate answer predictions. For randomly reshuffled questions, the results on COCO-QA dataset are 40.74, 53.06, and 80.41 for the accuracy, [email protected], and [email protected], respectively, which are significantly inferior to that of natural-language like questions. The result indicates that the sentence CNN possesses the ability of modeling natural questions. The sentence CNN uses the convolution process to compose and summarize the neighboring words. And the reliable ones with higher semantic meanings will be pooled and composed further to reach the final sentence representation. As such, the sentence CNN can compose the natural-language like questions to reliable high semantic representations. Conclusion In this paper, we proposed one CNN model to address the image QA problem. The proposed CNN model relies on convolutional architectures to generate the image representation, compose consecutive words to the question representation, and learn the interactions and relations between the image and question for the answer prediction. Experimental results on public image QA datasets demonstrate the superiority of our proposed model over the state-of-the-art methods. Acknowledgement The work is partially supported by China National 973 project 2014CB340301. The authors are grateful to Baotian Hu and Zhenguo Li for their insightful discussions and comments. References [Antol et al. 2015] Antol, S.; Agrawal, A.; Lu, J.; Mitchell, M.; Batra, D.; Zitnick, C. L.; and Parikh, D. 2015. VQA: visual question answering. arXiv 1505.00468. [Chen and Zitnick 2014] Chen, X., and Zitnick, C. L. 2014. Learning a recurrent visual representation for image caption generation. arXiv 1411.5654. [Dahl, Sainath, and Hinton 2013] Dahl, G. E.; Sainath, T. N.; and Hinton, G. E. 2013. Improving deep neural networks for LVCSR using rectified linear units and dropout. In ICASSP. [Donahue et al. 2014] Donahue, J.; Hendricks, L. A.; Guadarrama, S.; Rohrbach, M.; Venugopalan, S.; Saenko, K.; and Darrell, T. 2014. Long-term recurrent convolutional networks for visual recognition and description. arXiv 1411.4389. [Fang et al. 2014] Fang, H.; Gupta, S.; Iandola, F. N.; Srivastava, R.; Deng, L.; Dollár, P.; Gao, J.; He, X.; Mitchell, M.; Platt, J. C.; Zitnick, C. L.; and Zweig, G. 2014. From captions to visual concepts and back. arXiv 1411.4952. [Frome et al. 2013] Frome, A.; Corrado, G.; Shlens, J.; Bengio, S.; Dean, J.; Ranzato, M.; and Mikolov, T. 2013. Devise: A deep visual-semantic embedding model. In NIPS. [Gao et al. 2015] Gao, H.; Mao, J.; Zhou, J.; Huang, Z.; Wang, L.; and Xu, W. 2015. Are you talking to a machine? dataset and methods for multilingual image question answering. arXiv 1505.05612. [Geman et al. 2015] Geman, D.; Geman, S.; Hallonquist, N.; and Younes, L. 2015. Visual turing test for computer vision systems. In PNAS. [Hu et al. 2014] Hu, B.; Lu, Z.; Li, H.; and Chen, Q. 2014. Convolutional neural network architectures for matching natural language sentences. In NIPS. [Kalchbrenner, Grefenstette, and Blunsom 2014] Kalchbrenner, N.; Grefenstette, E.; and Blunsom, P. 2014. A convolutional neural network for modelling sentences. In ACL. [Karpathy and Li 2014] Karpathy, A., and Li, F.-F. 2014. Deep visual-semantic alignments for generating image descriptions. arXiv 1412.2306. [Karpathy, Joulin, and Li 2014] Karpathy, A.; Joulin, A.; and Li, F.-F. 2014. Deep fragment embeddings for bidirectional image sentence mapping. In NIPS. [Kim 2014] Kim, Y. 2014. Convolutional neural networks for sentence classification. In EMNLP. [Kiros, Salakhutdinov, and Zemel 2014a] Kiros, R.; Salakhutdinov, R.; and Zemel, R. 2014a. Multimodal neural language models. In ICML. [Kiros, Salakhutdinov, and Zemel 2014b] Kiros, R.; Salakhutdinov, R.; and Zemel, R. S. 2014b. Unifying visual-semantic embeddings with multimodal neural language models. arXiv 1411.2539. [Klein et al. 2015] Klein, B.; Lev, G.; Sadeh, G.; and Wolf, L. 2015. Fisher vectors derived from hybrid gaussianlaplacian mixture models for image annotation. In CVPR. [Lecun and Bengio 1995] Lecun, Y., and Bengio, Y. 1995. Convolutional networks for images, speech and time series. The Handbook of Brain Theory and Neural Networks. [Ma et al. 2015] Ma, L.; Lu, Z.; Shang, L.; and Li, H. 2015. Multimodal convolutional neural networks for matching image and sentence. In ICCV. [Makamura et al. 2013] Makamura, T.; Nagai, T.; Funakoshi, K.; Nagasaka, S.; Taniguchi, T.; and Iwahashi, N. 2013. Mutual learning of an object concept and language model based on mlda and npylm. In IROS. [Malinowski and Fritz 2014a] Malinowski, M., and Fritz, M. 2014a. A multi-world approach to question answering about real-world scenes based on uncertain input. In NIPS. [Malinowski and Fritz 2014b] Malinowski, M., and Fritz, M. 2014b. Towards a visual turing challenge. arXiv 1410.8027. [Malinowski and Fritz 2015] Malinowski, M., and Fritz, M. 2015. Hard to cheat: A turing test based on answering questions about images. arXiv 1501.03302. [Malinowski, Rohrbach, and Fritz 2015] Malinowski, M.; Rohrbach, M.; and Fritz, M. 2015. Ask your neurons: A neural-based approach to answering questions about images. arXiv 1505.01121. [Mao et al. 2014a] Mao, J.; Xu, W.; Yang, Y.; Wang, J.; and Yuille, A. L. 2014a. Deep captioning with multimodal recurrent neural networks (m-rnn). arXiv 1412.6632. [Mao et al. 2014b] Mao, J.; Xu, W.; Yang, Y.; Wang, J.; and Yuille, A. L. 2014b. Explain images with multimodal recurrent neural networks. arXiv 1410.1090. [Mikolov et al. 2013] Mikolov, T.; Chen, K.; Corrado, G.; and Dean, J. 2013. Efficient estimation of word representations in vector space. arXiv 1301.3781. [Ordonez, Kulkarni, and Berg 2011] Ordonez, V.; Kulkarni, G.; and Berg, T. L. 2011. Im2text: Describing images using 1 million captioned photographs. In NIPS. [Ren, Kiros, and Zemel 2015] Ren, M.; Kiros, R.; and Zemel, R. S. 2015. Exploring models and data for image question answering. arXiv 1505.02074. [Simonyan and Zisserman 2014] Simonyan, K., and Zisserman, A. 2014. Very deep convolutional networks for largescale image recognition. arXiv 1409.1556. [Socher et al. 2014] Socher, R.; Karpathy, A.; Le, Q. V.; Manning, C. D.; and Ng, A. Y. 2014. Grounded compositional semantics for finding and describing images with sentences. In TACL. [Szegedy et al. 2015] Szegedy, C.; Liu, W.; Jia, Y.; Sermanet, P.; Reed, S.; Anguelov, D.; Erhan, D.; Vanhoucke, V.; and Rabinovich, A. 2015. Going deeper with convolutions. In CVPR. [Vinyals et al. 2014] Vinyals, O.; Toshev, A.; Bengio, S.; and Erhan, D. 2014. Show and tell: A neural image caption generator. arXiv 1411.4555. [Wu and Palmer 1994] Wu, Z., and Palmer, M. S. 1994. Verb semantics and lexical selection. In ACL. [Xu et al. 2015a] Xu, K.; Ba, J.; Kiros, R.; Cho, K.; Courville, A.; Salakhutdinov, R.; Zemel, R.; and Bengio, Y. 2015a. Show, attend and tell: Neural image caption generation with visual attention. arXiv 1502.03044. [Xu et al. 2015b] Xu, R.; Xiong, C.; Chen, W.; and Corso, J. 2015b. Jointly modeling deep video and compositional text to bridge vision and language in a unified framework. In AAAI.
9cs.NE
Efficient hybrid search algorithm on ordered datasets Adnan Saher Mohammeda,∗, Şahin Emrah Amrahovb , Fatih V. Çelebic aAnkara Yıldırım Beyazıt University, Graduate School of Natural Sciences, Computer Engineering Dept., Ankara, Turkey b Ankara University, Faculty of Engineering, Computer Engineering Dept., Ankara, Turkey cAnkara Yıldırım Beyazıt University, Faculty of Engineering and Natural Sciences, Computer Engineering Dept., Ankara, Turkey Abstract The increase in the rate of data is much higher than the increase in the speed of computers, which results in a heavy emphasis on search algorithms in research literature. Searching an item in ordered list is an efficient operation in data processing. Binary and interpolation search algorithms commonly are used for searching ordered dataset in many applications. In this paper, we present a hybrid algorithm to search ordered datasets based on the idea of interpolation and binary search. The proposed algorithm called Hybrid Search (HS), which is designed to work efficiently on unknown distributed ordered datasets, experimental results showed that our proposed algorithm has better performance when compared with other algorithms that use a similar approach. Keywords: Binary search, Interpolation Search, Hybrid Search, Adaptive Search, Interpolation Binary Search 1. Introduction Searching algorithms are important and widely used in most computer systems. There are several search algorithms intended ordered datasets in literature. Binary search and interpolation search are the most used search algorithms which are utilized to search already sorted list. Both these algorithms are based on divide and conquer technique. Whereas, the dividing process depends on the way of choosing the cut index (1 ≤ cutindex ≤ n), where n is the size of the data set to be searched. The main difference between binary search and interpolation search is the dividing method which is defined by way of computing the cut index. However, the dividing methods used by binary search and interpolation search have a valuable influence on the performance of these algorithms. The complexity of the both algorithms were analyzed well in the literature. Asymptotically the average and the worst case complexity of binary search is O(Log2 n), which is independent of the distribution of keys [1]. Interpolation search was presented by Peterson in [2] with incorrect analysis [3], a very detailed description of the algorithm discussed along with program implementation by Gonnet Ph.D. thesis in [4] and the work [5]. The interpolation search average case and the lower band is (log2log2 n) for uniform distributed key only [3, 5]. However, interpolation search shows slow performance for non-uniform distributed keys, up to O(n) in the worst case. In other words, interpolation search is faster than binary search if some conditions are provided. The author of [6] clarified two assumptions must be satisfied for an interpolation search to be practical. First, the access to a given key must be costly compared to a typical instruction. For example, in the case of external search when the array stored in external storage instead of internal memory. Second, the keys should be sorted and distributed uniformly. However, with the support of current powerful float point CPUs, interpolation search becomes faster than binary search even with internal memory search. ∗Corresponding author Email addresses: [email protected] (Adnan Saher Mohammed), [email protected] (Şahin Emrah Amrahov), [email protected] (Fatih V. Çelebi) Preprint submitted to Journal of Discrete Algorithms August 3, 2017 On the other hand, author of [7] criticized interpolation search because it cannot stand over distribution changes. In literature, there exist some solutions to reduce the effect of this problem by proposing a hybrid approach that combines between binary search and interpolation search. Our proposed algorithm is designed for a dataset with unknown distribution of keys. It is called Hybrid Search (HS) that experimentally shows a good performance for uniform and non-uniform distributed keys. In literature, there exist a similar solution which has been presented in [8], authors of the given algorithm called Adaptive Search (AS) proved their algorithm faster than an older algorithm was presented in [9]. However, in this work, we held a comparison study between our proposed algorithm and AS in [8] in section-5 . This paper is organized as follows: section-2 presents the proposed algorithm and pseudo code, section-3 illustrates the complexity of the proposed algorithm , section-4 executes HS on a simple example array , section-5 compares our HS with AS, section- 6 gives experimental results and comparison , section-7 provides conclusions. Finally, you will find the important references. 2. The Proposed Hybrid Search (HS) HS is designed to run competently on both uniform and non-uniform distributed sorted arrays. HS combines the basics of binary and interpolation search in an efficient manner to take the advantages of the both algorithms. Assume HS looks to X among the sorted list Array [Left .. Right], During each iteration, HS initially, calculates the estimated position by using the standard interpolation search method, then HS runs modified version of binary search on the remained part of the array which is expected holds the required key. The next section provides the pseudo code of HS. By looking at the pseudo code more closely, we find HS firstly use interpolation technique to estimate the location of searched key. The calculated index is stored in the variable Inter (line No. 7). Then HS compares the required key X with the content of the determined location Array[Inter] in (lines No. 8 & 16) to decide whether the required key residents at the left or the right part respecting Inter. If X located on the left or the right portion, HS divides this segment into two halves by calculated the Mid variable in (lines No. 9 & 17). Hence, HS minimizes the search space by setting new values to the Right & Left variables. After this process, the new search space for the next iteration has been minimized into half of the interpolated portion that was calculated by an interpolation method. This approach reduces the total number of iteration in all tested distributions. However, HS returns the location of the searched key in (lines No. 25 & 29). Considering that line 29 written to catch a case where the loop terminated and the element at Array[Left] not checked, for more detail follow the example in Figure 2. In the case of HS reaches the line No. 31, the algorithm ends with the unsuccessful search. Figure 1 visually shows the division technique used by HS. Assume HS estimated the required key at index Inter (in Figure 1 ). If X greater than Array[Inter], HS calculates the midpoint (Mid) of the range from Inter to Right. Then it selects one of these halves according to the value of X. Similarly, HS do the same procedures for the left portion ranged from Left to Inter when X less than Array[Inter]. Figure 1: HS division technique explanation 2 3. The Complexity of Hybrid Search Although HS has higher iteration cost when compared with binary search and interpolation search due to its computations, HS showed less number of iteration compared with the binary search for all tested distributions and less than the interpolation search iterations for non-uniform distributions. When HS runs on uniform distributed keys, the average case complexity of HS equal to the complexity of interpo3 lation search, which is O(log2log2 n). That because HS starts with interpolation division technique in each iteration. In the case of non-uniform distributed keys,the interpolation division technique works in conjugate with the binary division technique to reduce the number of iteration. However, HS worst case complexity still O(log2 n) in nonuniform distributions, because HS divides the interpolated segment into two halves in each iteration. Experimental results explained that the number of iteration of HS is less than the half of the number of iterations of binary search in the average. Consequently, HS shows execution time much less than interpolation search and very close to the binary search for specified array sizes. 4. Hybrid Search Example In this example, we randomly generated an ordered array that has location index starting from 0 to 34 with normally distributed keys. Then we searched all keys in this array using HS. Figure 2 explains the calculated variables (Inter & Mid) during each iteration in HS. Where bolded numbers on the figure, represent the returned location index by line No. 25 (return Inter) or line No. 29 (return Left) in the pseudo code section. HS example given in Figure 2 shows iterations numbered between 1 and 3. The average iteration number equal to 2.31, while the average number of iterations for binary search on the same array is equal to 4.73, which is less than log2(35) =5.12. By looking at Figure 2 , we see HS found the first key and the last key (at index 0 and 34) in one iteration only, this is because the nature of interpolation search that used by HS. Base on this truth, assume we are looking for the item in the middle of the list (at index 17 in the example). HS certainly finds the middle item at the second iteration because this item becomes the last item after the first iteration. However, during each division process, Mid indexes to the one end of the new list and the other end indexed by left or Inter or right (see Figure 1), this method makes HS finds the required item exactly at the next iteration if it located at the end of the segment. Moreover, there is more chance to find the searched item in the next iteration if it located near to one end. Thus, this method enhances the performance of HS, especially for small or moderate array size. 4 Index Element/Key Iteration 1 Inter 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 6.983 8.954 11.74 11.774 12.192 12.316 12.682 12.752 12.939 12.962 13.42 13.435 13.99 13.994 14.446 14.616 14.634 14.779 14.961 15.1 15.101 15.151 15.602 16.115 16.131 16.388 17.053 17.235 17.35 17.418 17.575 18.063 18.925 19.207 21.374 0 4 11 11 12 12 13 13 14 14 15 15 16 16 17 18 18 18 18 19 19 19 20 21 21 22 23 24 24 24 25 26 28 28 34 Iteration 2 Mid Inter 2 6 6 6 6 7 7 7 7 8 8 8 8 9 9 9 9 1 4 4 4 5 6 7 7 8 9 9 12 12 15 16 16 17 26 26 27 27 27 28 28 29 29 29 29 30 31 31 20 20 22 23 23 24 27 28 28 29 30 31 32 32 Mid Inter 2 2 2 3 10 10 11 11 8 9 10 11 13 12 13 23 left1= 3 14 15 21 25 26 26 27 24 25 left2= 6 left2= 7 33 left3= 3 Figure 2: Hybrid Search Example 5 Iteration 3 Mid 5. Hybrid Search and Adaptive Search Comparison Fortunately, some authors have provided the source code of adaptive search in [10]. Adaptive search is the algorithm presented in [8]. Adaptive search is originally written in Java, simply we converted it to C++ code without altering the behavior of the algorithm to fit our test requirements. Table 1 explains C++ source code for adaptive search and HS. Although HS and adaptive search approximately revealed close iterations number in most cases, HS remarkably has less iteration cost in terms of comparison number and computation. The adaptive search in Table 1 , initially, calculates values of med as the middle point and next by interpolation technique. Then, regarding the interpolated position (next), AS divides the selected portion (left or right segment) using binary search technique if and only if one of the following two conditions gets true (the first two if statements in AS):if ((key < a[next]) && ((next - bot) >med)) if ((key > a[next]) && ((top - next) > med)) Otherwise, AS continue as a normal interpolation search. The main flaw in the dividing technique used in AS is that it may consume four comparison operations (inside the two mentionedif statements) without dividing the given segments into two halves. In regard, there is a probability of doing extra work in some iterations. For instance, assume we are using AS to search for the element at the index 2 of the array in Table 1. In the first iteration bot=0 and top=34, AS calculates med=17 and next=11. In this case, both if statements do not get true. However, the probability of occurrence of this case increases with a non-uniform distribution. The advantages of our proposed algorithm over AS is that our algorithm uses both dividing techniques of binary search and interpolation search in each iteration using less number of comparisons. In Table 1, comments notations beside/after each if and While blocks indicate to the maximum number of comparisons in each iteration which consumed by CPU to execute these blocks. However, adaptive search shows 7 comparisons/iteration in the worst case and 5 comparisons/iteration in the best case. Whereas, HS shows 4 comparisons/iteration in the worst case and 3 comparisons/iteration in the best case. Consequently, in experimental performance test (section 6), HS shows better performance for different key distributions when compared with adaptive search in the same test environment. 6 Table 1: Adaptive Search And Hybrid Search Source Code Comparison Adaptive Search C++ code { Hybrid Search C++ code i n t ad ap tiveSe ar ch ( double a [ ] , i n t b o t , i n t t o p , d o u b l e key ) int next , med ; w h i l e ( b o t < t o p ) / / 1 Comps { med = ( t o p + b o t ) / 2 ; n e x t = ( key − a [ b o t ] ) / ( a [ t o p ] − a [ bot ] ) ∗ ( t o p − b o t ) + bot; if ( ( key < a [ n e x t ] ) && ( ( n e x t − b o t ) > med ) ) { / / 3 Comps top = next − 1; next=(bot+top)/2;if } ( k ey > a [ n e x t ] ) && ( ( t o p − n e x t ) > med ) ) / / 5 Comps { bot = next + 1; next = (bot + top) / 2; } i f ( k ey > a [ n e x t ] ) / / 6 Comps b o t = n e x t + 1; e l s e i f ( key < a [ n e x t ] ) / / 7 Comps top= next − 1; else return next; } / / end w h i l e i f ( a [ t o p ] == key ) return top; r e t u r n − 1; / / n o t fo und } ( i n t H ybridSearch ( double a [ ] , i n t l e f t , i n t r i g h t , d o u b l e X) { i n t I n t e r , Mid ; while (left < right ) / / 1 Comps { I n t e r = l e f t + (X − a [ l e f t ] ) ∗ ( r i g h t − l e f t ) / ( a [ r i g h t ] − a[ left]); i f ( x > a [ I n t e r ] ) / / 2 Comps { Mid = ( I n t e r + r i g h t ) / 2 ; i f ( x <= a [ Mid ] ) / / 3 Comps { left = Inter + 1; r i g h t = Mid ; } e lse l e f t = Mid + 1 ; } e l s e i f ( x < a [ I n t e r ] ) / / 3 Comps { Mid = ( I n t e r + l e f t ) / 2; i f ( x >= a [ Mid ] ) { / / 4 Comps l e f t = Mid ; r i g h t = I n t e r −1; } else r i g h t = Mid − 1; } e ls e returnInter; } / / end w h i l e i f ( x == a [ l e f t ] ) return left; r e t u r n − 1; / / n o t fo und } 6. Results and Experimental Comparison All algorithms in this study are implemented in C++ using NetBeans 8.0.2 IDE based on Cygwin compiler. The measurements are taken on a PC powered by 2.1 GHz Intel Core i7 processor with 6 GB PC-1066 DDR3 memory machine on Windows platform. The experimental test has been done on empirical data that generated randomly using a C++ library [11]. For all 7 figures in this work, the execution time of the Binary search, interpolation search, adaptive search and hybrid search has been measured for 1000 repetitive runs of each algorithm on random array whereas the size of generated array ranged from 1000 to 23∗106 elements. 1000 search keys selected randomly among the elements of generated arrays, then these keys searched using all tested algorithms, this means, all algorithms tested for successful search only. The time readings have been plotted after applying smooth function in MATLAB software which is using moving average filter just to appear as smooth curve [12]. Measuring execution time is not very accurate operation in multitask/multithread operating system (OS) due to execution time variations caused by uncontrollable hardware and software factors. Even we run the same algorithm on the same data with the same environment [13, 14]. Furthermore, in this test, we run several algorithms on the multitask operating system, and there is no guarantee from the operating system to distribute CPU time slices among tested algorithms fairly. We minimize this effect by configuring the operating system (Windows) on fixed CPU frequency and sets to give the highest process priority for our testing program. All tested algorithms are fast and consume several milliseconds on used hardware. Therefore, it is hard to measure execution time precisely in one execution. To reduce the tolerant error caused by execution time variations and getting more accurate time measurement. All time measurements have done on repeated execution of the tested algorithms. Time measurement is taken for 1000 times of running an algorithm for each array size with randomly selected search key. 6.1. Performance Test on Uniform Distribution In this test, we measured the execution time of all tested algorithms on the uniformly distributed sorted array. In general, the interpolation search is the fastest algorithm for this distribution, and the binary search is the slowest one. However, Figure 3 explains that HS performance very close to interpolation search in small sizes, and Figure 4 shows that HS delayed only up to 6% behind interpolation search for the array size 23∗ 106. Whereas, AS delayed about 50% for the same array size. In brief, this test showed that HS faster than the binary search and AS for uniformly distributed array. And HS offered performance very close to the fastest search (interpolation search) in this distribution. 400 350 Time 300 250 200 Interpolation Search Binary Search Adaptive Search Hybrid Search 150 0 0.5 1 1.5 Array Size 2 2.5 3 #10 5 Figure 3: Execution-time of Interpolation, Binary, Adaptive and Hybrid Search on uniform distribution, small array size 8 550 Interpolation Search Binary Search Adaptive Search Hybrid Search 500 Time 450 400 350 300 250 0 0.5 1 1.5 Array Size 2 2.5 #10 7 Figure 4: Execution-time of Interpolation, Binary, Adaptive and Hybrid Search on uniform distribution, large array size 6.2. Performance Test on Normal Distribution In Figure 5, Obviously, interpolation search is the slowest algorithm due to its complexity in non-uniform distribution data set. HS shows better performance if compared with AS in a normal distribution. HS starts with an insignificant delay behind the binary search. Gradually, HS performance goes up to 12% slower than the binary search for array size less than 250,000 elements. However, AS goes about 50% slower than the binary search for the same size. Figure 6 explains the performance of HS for large array size up to 23∗ 106 elements. Even though, HS goes slower than the binary search up to 100%. Still, HS faster than AS in this distribution. HS like interpolation search involving the keys in division (interpolation) process to expect the location of the searched key. Thus, HS performance depends on the distribution of the keys. On the other hand, HS use binary search division method which does not rely on the value of keys and their distribution. As a consequence, this technique makes the behaver of HS variant depending on the dataset length and the keys distribution. When HS divides the given length into the half, gradually, the interpolation method becomes more effective because the distribution of data has been changed during previous division processes. That explains why HS showed better performance on small and moderate array size and less performance for large array size when compared with the binary search performance. 9 2500 Interpolation Search Binary Search Adaptive Search Hybrid Saerch 2000 Time 1500 1000 500 0 0 0.5 1 1.5 2 2.5 #10 5 Array Size Figure 5: Execution-time of Interpolation, Binary, Adaptive and Hybrid Search on normal distribution, small array size 4500 4000 Interpolation Search Binary Search Adaptive Search Hybrid Search 3500 Time 3000 2500 2000 1500 1000 500 0 0 0.5 1 1.5 Array Size 2 2.5 #10 7 Figure 6: Execution-time of Interpolation, Binary, Adaptive and Hybrid Search on normal distribution, large array size 10 6.3. Performance Test on Exponential Distribution Interpolation search shows even worse performance when compared with its performance on the normally distributed array in the previous section. Therefore, we excluded the interpolation search from this test to enhance the readability of the graph. In Figure 7, HS displayed a very close performance comparing with the binary search for array size less than 300000 elements. Although, AS disclosed better performance when compared with its performance over the normally distributed array (see AS time values in Figure 5 & Figure 6). AS still slower than the binary search between 35%-75% for small and large array size respectively (see AS performance in Figure 7 & Figure 8). Figure 8, explains that HS is the fastest algorithm for large array size in this distribution. In average, HS shows 10% faster than the binary search for array size up to 23 ∗ 106. 1400 Binary Search Adaptive Search Hybrid Search 1200 Time 1000 800 600 400 200 0 0.5 1 1.5 Array Size 2 2.5 3 #10 5 Figure 7: Execution-time of Interpolation, Binary, Adaptive and Hybrid Search on exponential distribution, small array size 11 900 850 Binary Search Adaptive Search Hybrid Search 800 750 Time 700 650 600 550 500 450 400 0 0.5 1 1.5 Array Size 2 2.5 #10 7 Figure 8: Execution-time of Interpolation, Binary, Adaptive and Hybrid Search on exponential distribution, large array size 7. Conclusions In this paper, a hybrid searched algorithm has been presented, the proposed algorithm has been designed to use on unknown distributed sorted array which is based on the principle of binary and linear interpolation search. The proposed algorithm has been compared with three algorithms used for search on ordered datasets. The experimental results revealed that HS gives performance close to the fastest algorithm in each tested distribution, especially when HS runs on small or moderated array size. Hence, we recommend using HS as general search algorithm for unknown distributed ordered list within a certain situation that shows acceptable performance. Acknowledgments This research is partially supported by administration of governorate of Salahuddin and Tikrit university -Iraq (2245-6-2-2013). References [1] R. Sedgewick, P. Flajolet, An introduction to the analysis of algorithms, 2nd Edition, Addison-Wesley, 2013. [2] W. W. Peterson, Addressing for Random-Access Storage, IBM Journal of Research and Development 1 (2) (1957) 130–146. doi:10.1147/ rd.12.0130. [3] Y. Perl, A. Itai, H. Avni, Interpolation search—a log logN search, Communications of the ACM 21 (7) (1978) 550–553. doi:10.1145/ 359545.359557. [4] Gaston H. Gonnet, interpolation and interpolation-Hash searching, Ph.D. thesis, university of Waterloo (1977). [5] G. H. Gonnet, L. D. Rogers, J. Alan George, An algorithmic and complexity analysis of interpolation search, Acta Informatica 13 (1) (1980) 39–52. doi:10.1007/BF00288534. [6] Mark Allen Weiss, Data structures and problem solving using C++, 2nd Edition, 2003. [7] S. S. Skiena, The Algorithm Design Manual, Vol. 1, Springer London, London, 2008. doi:10.1007/978-1-84800-070-4. [8] B. Bonasera, E. Ferrara, G. Fiumara, F. Pagano, A. Provetti, Adaptive search over sorted sets, Journal of Discrete Algorithms 30 (2015) 128–133. doi:10.1016/j.jda.2014.12.007. 12 [9] N. Santoro, J. B. Sidney, Interpolation-binary search, Information Processing Letters 20 (4) (1985) 179–181. doi:10.1016/ 00200190(85)90046-8. [10] B. Bonasera, AdaptiveSearch (Java Source Code), https://bitbucket.org/ale66/adaptivesearch (2017( Accessed Jul 12,2017)). [11] Cplusplus, random- C++ Reference, http://www.cplusplus.com/reference/random/ (2011 (Accessed Nov 5, 2016 )). [12] Mathworks, Pendulum Waves - MATLAB & Simulink Example, https://www.mathworks.com/help/signal/examples/ signalsmoothing.html (2011 (Accessed Mar 22,2017)). [13] P. E. Nogueira, R. Matias, E. Vicente, An experimental study on execution time variation in computer experiments, in: Proceedings of the 29th Annual ACM Symposium on Applied Computing - SAC ’14, no. March, 2014, pp. 1529–1534. doi:10.1145/2554850.2555022. [14] A. Mazouz, D. Barthou, Performance Evaluation and Analysis of Thread Pinning Strategies on Multi-Core Platforms : Case Study of SPEC OMP Applications on Intel Architectures, in: High Performance Computing and Simulation (HPCS), 2011, pp. 273–279. doi: 10.1109/HPCSim.2011.5999834. 13
8cs.DS
Biometrika (2017), xx, x, pp. 1–25 Printed in Great Britain arXiv:1701.04177v1 [math.ST] 16 Jan 2017 Instrumental variables as bias amplifiers with general outcome and confounding B Y P. D ING Department of Statistics, University of California, Berkeley, California, USA. [email protected] T. J. VANDERW EELE AND J. M. ROBINS Departments of Epidemiology and Biostatistics, Harvard T. H. Chan School of Public Health, Boston, Massachusetts, USA. [email protected] [email protected] S UMMARY Drawing causal inference with observational studies is the central pillar of many disciplines. One sufficient condition for identifying the causal effect is that the treatment-outcome relationship is unconfounded conditional on the observed covariates. It is often believed that the more covariates we condition on, the more plausible this unconfoundedness assumption is. This belief has had a huge impact on practical causal inference, suggesting that we should adjust for all pretreatment covariates. However, when there is unmeasured confounding between the treatment and outcome, estimators adjusting for some pretreatment covariate might have greater bias than estimators without adjusting for this covariate. This kind of covariate is called a bias amplifier, and includes instrumental variables that are independent of the confounder, and affect the outcome only through the treatment. Previously, theoretical results for this phenomenon have been established only for linear models. We fill in this gap in the literature by providing a general theory, showing that this phenomenon happens under a wide class of models satisfying certain monotonicity assumptions. We further show that when the treatment follows an additive or multiplicative model conditional on the instrumental variable and the confounder, these monotonicity assumptions can be interpreted as the signs of the arrows of the causal diagrams. Some key words: Causal inference; Directed acyclic graph; Interaction; Monotonicity; Potential outcome 1. I NTRODUCTION Causal inference from observational data is an important but challenging problem for empirical studies in many disciplines. Under the potential outcomes framework (Neyman, 1923[1990]; Rubin, 1974), the causal effects are defined as comparisons between the potential outcomes under treatment and control, averaged over a certain population of interest. One sufficient condition for nonparametric identification of the causal effects is the ignorability condition (Rosenbaum & Rubin, 1983), that the treatment is conditionally independent of the potential outcomes given those pretreatment covariates that confound the relationship between the treatment and outcome. To make this fundamental assumption as plausible as possible, many researchers suggest that the set of collected pretreatment covariates should be as rich as possible. It is often believed that “typically, the more conditional an assumption, the more generally acceptable it is” (RuC 2016 Biometrika Trust P. D ING , T. J. VANDERW EELE AND J. M. ROBINS 2 U0 U M  A ~ U  /Y (a) Directed Acyclic Graph for M-Bias. U and U 0 are unobserved, and M is observed. Z /A  /Y (b) Directed Acyclic Graph for Z-Bias. U is an unmeasured confounder and Z is an instrumental variable for the treatment-outcome relationship. Fig. 1: Two Directed Acyclic Graphs. A is the treatment, and Y is the outcome of interest. bin, 2009), and therefore “in principle, there is little or no reason to avoid adjustment for a true covariate, a variable describing subjects before treatment” (Rosenbaum, 2002, pp. 76). Simply adjusting for all pretreatment covariates (d’Agostino, 1998; Rosenbaum, 2002; Hirano & Imbens, 2001), or the pretreatment criterion (VanderWeele & Shpitser, 2011), has a sound justification from the view point of design and analysis of randomized experiments. Cochran (1965), citing Dorn (1953), suggested that the planner of an observational study should always ask himself the question, “How would the study be conducted if it were possible to do it by controlled experimentation?” Following this classical wisdom, Rubin (2007, 2008a,b, 2009) argued that the design of observational studies should be in parallel with the design of randomized experiments, i.e., because we balance all pretreatment covariates in randomized experiments, we should also follow this pretreatment criterion and balance or adjust for all pretreatment covariates when designing observational studies. However, this pretreatment criterion can result in increased bias under certain data generating processes. We highlight two important classes of such data generating processes for which the pretreatment criterion may be problematic. The first class is captured by an example of Greenland & Robins (1986), in which conditioning on a pretreatment covariate invalidates the ignorability assumption and thus a conditional analysis is biased; yet the ignorability assumption holds unconditionally, so an analysis that ignores the covariate is unbiased. Several researchers have shown that this phenomenon is generic when the data are generated under the causal diagram in Figure 1(a). In this diagram, the ignorability assumption holds unconditionally but not conditionally (Pearl, 2000; Spirtes et al., 2000; Greenland, 2003; Pearl, 2009; Shrier, 2008, 2009; Sjölander, 2009; Ding & Miratrix, 2015). In Figure 1(a), a pretreatment covariate M is associated with two independent unmeasured covariates U and U 0 , but M does not itself affect either the treatment A or outcome Y . Because the corresponding causal diagram looks like the English letter M, this phenomenon is called M-Bias. The second class of processes, which constitute the subject of this paper, are represented by the causal diagram in Figure 1(b). Owing to confounding by the unmeasured common cause U of the treatment A and the outcome Y , both the analysis that adjusts and the analysis that fails to adjust for pretreatment measured covariates are biased. If the magnitude of the bias is larger when we adjust for a particular pretreatment covariate than when we do not, we refer to the covariate as a bias amplifier. Of particular interest is to determine the conditions under which an instrumental variable is a bias amplifier. An instrumental variables is a pretreamtnet covariate that is independent of the confounder U and has no direct effect on the outcome except through its effect on Instrumental variables as bias amplifiers 3 the treatment. The variable Z in Figure 1(b) is an example. Heckman & Navarro-Lozano (2004) and Bhattacharya & Vogt (2012) showed numerically that when the treatment and outcome are confounded, adjusting for an instrumental variable can result in greater bias than the unadjusted estimator. Wooldridge theoretically demonstrated this in linear models in a technical report in 2006, which was finally published as Wooldridge (2016). Because instrumental variables are often denoted by Z as in Figure 1(b), this phenomenon is called Z-Bias. The treatment assignment is a function of the instrumental variable, the unmeasured confounder and some other independent random error, which are the three sources of variation of the treatment. If we adjust for the instrumental variable, the treatment variation is driven more by the unmeasured confounder, which could result in increased bias due to this confounder. Seemingly paradoxically, without adjusting for the instrumental variable, the observational study is more like a randomized experiment, and the bias due to confounding is smaller. Although applied researchers (Myers et al., 2011; Walker, 2013; Brooks & Ohsfeldt, 2013; Ali et al., 2014) have confirmed through extensive simulation studies that this bias amplification phenomenon exists in a wide range of reasonable models, definite theoretical results have been established only for linear models. We fill in this gap in the literature by showing that adjusting for an instrumental variable amplifies bias for estimating causal effects under a wide class of models satisfying certain monotonicity assumptions. When the instrumental variable and the confounder have either no additive or no multiplicative interaction on the treatment, these assumptions can be interpreted as the signs of the arrows of the causal diagram (VanderWeele & Robins, 2010). However, we also show that there exist data generating processes under which an instrumental variable is not a bias amplifier. 2. F RAMEWORK AND N OTATION We consider a binary treatment A, an instrumental variable Z, an unobserved confounder U, and an outcome Y , with the joint distribution depicted by the causal diagram in Figure 1(b). Let denote conditional independence between random variables. Then the instrumental variable Z in Figure 1(b) satisfies Z U , Z Y | (A, U ) and Z / A. We first discuss analysis conditional on observed pretreatment covariates X, and comment on averaging over X in §6 and the Supplementary Material. We define the potential outcomes of Y under treatment a as Y (a), (a = 1, 0). The true average causal effect of A on Y for the population actually treated is ACEtrue 1 = E{Y (1) | A = 1} − E{Y (0) | A = 1}, for the population who are actually in the control condition it is ACEtrue 0 = E{Y (1) | A = 0} − E{Y (0) | A = 0}, and for the whole population it is ACEtrue = E{Y (1)} − E{Y (0)}. Define ma (u) = E(Y | A = a, U = u) to be the conditional mean of the outcome given the treatment and confounder. As illustrated by Figure 1(b), because U suffices to control confounding between A and Y , the ignorability assumption A Y (a) | U holds for a = 0 and 1. Therefore, P. D ING , T. J. VANDERW EELE AND J. M. ROBINS 4 according to Y = AY (1) + (1 − A)Y (0), we have Z true ACE1 = E(Y | A = 1) − m0 (u)F (du | A = 1), Z ACEtrue = m1 (u)F (du | A = 0) − E(Y | A = 0), 0 Z Z ACEtrue = m1 (u)F (du) − m0 (u)F (du). The unadjusted estimator is the naive comparison between the treatment and control means ACEunadj = E(Y | A = 1) − E(Y | A = 0). Define µa (z) = E(Y | A = a, Z = z) as the conditional mean of the outcome given the treatment and instrumental variable. Because the instrumental variable Z is also a pretreatment covariate unaffected by the treatment, the usual strategy to adjust for all pretreatment covariates suggests using the adjusted estimator for the population under treatment Z adj ACE1 = E(Y | A = 1) − µ0 (z)F (dz | A = 1), for the population under control adj ACE0 Z = µ1 (z)F (dz | A = 0) − E(Y | A = 0), and for the whole population ACE adj Z = Z µ1 (z)F (dz) − µ0 (z)F (dz). Surprisingly, for linear structural equation models on (Z, U, A, Y ), previous theory demonstrated that the magnitudes of the biases of the adjusted estimators are no smaller than the unadjusted ones (Pearl, 2010, 2011, 2013; Wooldridge, 2016). The goal of the rest of our paper is to show that this phenomenon exists in more general scenarios. 3. S CALAR I NSTRUMENTAL VARIABLE AND S CALAR C ONFOUNDER We first give a theorem for a scalar instrumental variable Z and a scalar confounder U. T HEOREM 1. In the causal diagram of Figure 1(b) with scalar Z and U , if (a) pr(A = 1 | Z = z) is non-decreasing in z, pr(A = 1 | U = u) is non-decreasing in u, and E(Y | A = a, U = u) is non-decreasing in u for both a = 0 and 1; (b) E(Y | A = a, Z = z) is non-increasing in z for both a = 0 and 1, then     adj  ACE1 ACEunadj ACEtrue 1 ACEadj  ≥ ACEunadj  ≥ ACEtrue . 0 0 true unadj ACE ACE ACEadj  (1) Inequalities among vectors as in (1) should be interpreted as component-wise relationships. Intuitively, the monotonicity in Condition (a) of Theorem 1 requires non-negative dependence structures on arrows Z → A, U → A and U → Y in the causal diagram of Figure 1(b). Because Instrumental variables as bias amplifiers 5 the dependence is in expectation, Condition (a) of Theorem 1 is weaker than the requirement of signed directed acyclic graphs (VanderWeele & Robins, 2010). The monotonicity in Condition (b) of Theorem 1 reflects the collider bias caused by conditioning on A. As noted by Greenland (2003), in many cases, if Z and U affect A in the same direction, then the collider bias caused by conditioning on A is often in the opposite direction. Lemmas S5–S8 in the Supplementary Material show that, if Z and U are independent and have non-negative additive or multiplicative effects on A, then conditioning on A results in negative association between Z and U . This negative collider bias, coupled with the positive association between U and Y , further implies negative association between Z and Y conditional on A as stated in Condition (b) of Theorem 1. For easy interpretation, we will give sufficient conditions for Z-Bias which require no interaction of Z and U on A. When A given Z and U follows an additive model, we have the following theorem. T HEOREM 2. In the causal diagram of Figure 1(b) with scalar Z and U , (1) holds if (a) pr(A = 1 | Z = z, U = u) = β(z) + γ(u); (b) β(z) is non-decreasing in z, γ(u) is non-decreasing in u, and E(Y | A = a, U = u) is nondecreasing in u for both a = 1 and 0; (c) the essential supremum of U given (A = a, Z = z) depends only on a. In summary, when A given Z and U follows an additive model and monotonicity of Theorem 2 holds, both unadjusted and adjusted estimators have non-negative biases for the true average causal effects for the treatment, control and the whole populations. Furthermore, the adjusted estimators, either for the treatment, control or the whole populations, have larger biases than the unadjusted estimator, i.e., Z-Bias arises. When both the instrumental variable Z and the confounder U are binary, Theorem 2 has an even more interpretable form. Define pzu = pr(A = 1 | Z = z, U = u) for z, u = 0 and 1. C OROLLARY 1. In the causal diagram of Figure 1(b) with binary Z and U , (1) holds if (a) there is no additive interaction of Z and U on A, i.e., p11 − p10 − p01 + p00 = 0; (b) Z and U have monotonic effects on A, i.e., p11 ≥ max(p10 , p01 ) and min(p10 , p01 ) ≥ p00 , and E(Y | A = a, U = 1) ≥ E(Y | A = a, U = 0) for both a = 1 and 0. When A given Z and U follows an multiplicative model, we have the following theorem. T HEOREM 3. In the causal diagram of Figure 1(b) with scalar Z and U , (1) holds if we replace Condition (a) of Theorem 2 by (a’) pr(A = 1 | Z = z, U = u) = β(z)γ(u). When both the instrument Z and the confounder U are binary, Theorem 3 can be simplified. C OROLLARY 2. In the causal diagram of Figure 1(b) with binary Z and U , (1) holds if we replace Condition (a) of Corollary 1 by (a’) there is no multiplicative interaction of Z and U on A, i.e., p11 p00 = p10 p01 . We invoke the assumptions of no additive and multiplicative interaction of Z and U on A in Theorems 2 and 3 for easy interpretation. They are sufficient but not necessary conditions for Z-Bias. In fact, we show in the proofs that Conditions (a) and (a’) in Theorems 2 and 3 and Corollaries 1 and 2 can be replaced by weaker conditions. For the case with binary Z and U , 6 P. D ING , T. J. VANDERW EELE AND J. M. ROBINS these conditions are particularly easy to interpret: p11 p00 ≤ 1, p10 p01 (1 − p11 )(1 − p00 ) ≤ 1, (1 − p10 )(1 − p01 ) (2) i.e., Z and U have non-positive multiplicative interaction on both the presence and absence of A. Even if Condition (a) or (a’) does not hold, one can show that half of the parameter space of (p11 , p10 , p01 , p00 ) satisfies the weaker condition (2), which is only sufficient, not necessary. Therefore, even in the presence of additive or multiplicative interaction, Z-Bias arises in more than half of the parameter space for binary (Z, U, A, Y ). 4. G ENERAL I NSTRUMENTAL VARIABLE AND G ENERAL C ONFOUNDER When the instrumental variable Z and the confounder U are vectors, Theorems 1–3 still hold if the monotonicity assumptions hold for each component of Z and U , and Z and U are multivariate totally positive of order two (Karlin & Rinott, 1980), including the case that the components of Z and U are mutually independent (Esary et al., 1967). A random vector W is multivariate totally positive of order two, if its density f (·) satisfies f {max(w1 , w2 )}f {min(w1 , w2 )} ≥ f (w1 )f (w2 ), where max(w1 , w2 ) and min(w1 , w2 ) are component-wise maximum and minimum of the vectors w1 and w2 . In the following, we will develop general theory for Z-Bias without the total positivity assumption about the components of Z and U. It is relatively straightforward to summarize a general instrumental variable Z by a scalar propensity score Π = Π(Z) = pr(A = 1 | Z), because Z A | Π(Z) as shown in Rosenbaum & Rubin (1983). We define νa (π) = E(Y | A = a, Π = π). The adjusted estimator for the population under treatment is Z adj ACE1 = E(Y | A = 1) − ν0 (π)F (dπ | A = 1), the adjusted estimator for the population under control is Z adj ACE0 = ν1 (π)F (dπ | A = 0) − E(Y | A = 0), and the adjusted estimator for the whole population is Z Z adj ACE = ν1 (π)F (dπ) − ν0 (π)F (dπ). When Z is scalar, then the above three formulas reduce to the ones in Section 3. Greenland & Robins (1986) showed that for the causal effect on the treated population, Y (0) alone suffices to control for confounding; likewise, for the causal effect on the control population, Y (1) alone suffices to control for confounding. If interest lies in all three of our average causal effects, then we need to take U = {Y (1), Y (0)} as the ultimate confounder for the relationship of A on Y. This is not an assumption about U . Because Y = AY (1) + (1 − A)Y (0) is a deterministic function of A and {Y (1), Y (0)}, this implies that U = {Y (1), Y (0)} satisfies the ignorability assumption (Rosenbaum & Rubin, 1983), or blocks all the back-door paths from A to Y (Pearl, 1995, 2000). We represent the causal structure in Figure 2. We first state a theorem without assuming the structure of the causal diagram in Figure 2. T HEOREM 4. If for both a = 1 and 0, pr{A = 1 | Y (a)} is non-decreasing in Y (a), and cov{Π, νa (Π)} ≤ 0, then (1) holds. 7 Instrumental variables as bias amplifiers U = {Y (1), Y (0)} / Π = Π(Z) Z /A ~ /Y Fig. 2: Directed Acyclic Graph for Z-Bias With General Instrument and Confounder In a randomized experiment A Y (a), so the dependence of pr{A = 1 | Y (a)} on Y (a) characterizes the self-selection process of an observational study. The condition cov{Π, νa (Π)} ≤ 0 in Theorem 4 is another measure of the collider-bias caused by conditioning on A, as νa (π) = E{Y (a) | A = a, Π = π} and Y (a) is a component of U in Figure 2. This measure of collider bias is more general than the one in Theorem 1. Analogous to Section 3, we will present more transparent sufficient conditions for Z-Bias to aid interpretation. In the following, we use the distributional association measure (Cox & Wermuth, 2003; Ma et al., 2006; Xie et al., 2008), i.e., random variable V has a non-negative distributional association on random variable W , if the conditional distribution satisfies ∂F (w | v)/∂v ≤ 0 for all v and w. If the random variables are discrete, then partial differentiation is replaced by differencing between adjacent levels (Cox & Wermuth, 2003). If there is no additive interaction between Π and {Y (1), Y (0)} on A, then we have the following results. T HEOREM 5. In the causal diagram of Figure 2, (1) holds if (a) pr(A = 1 | Π, U ) = Π + δ{Y (1)} + η{Y (0)} with δ(·) and η(·) being non-decreasing; (b) {Y (1), Y (0)} have non-negative distributional associations on each other, i.e., ∂F (y1 | y0 )/∂y0 ≤ 0 and ∂F (y0 | y1 )/∂y1 ≤ 0 for all y1 and y0 ; (c) the essential supremum of Y (1) given Y (0) does not depend on Y (0), and the essential supremum of Y (0) given Y (1) does not depend on Y (1). Remark 1. If we impose an additive model pr(A = 1 | Π, U ) = h(Π) + δ{Y (1)} + η{Y (0)}, then independence of Π and U implies that pr(A = 1 | Π) = h(Π) + E[δ{Y (1)}] + E[η{Y (0)}] = Π. Therefore, we must have h(Π) = Π and E[δ{Y (1)}] + E[η{Y (0)}] = 0. When the outcome is binary, the distributional association between Y (1) and Y (0) becomes their odds ratio (Xie et al., 2008), and non-negative distributional association between Y (1) and Y (0) is equivalent to ORY = pr{Y (1) = 1, Y (0) = 1}pr{Y (1) = 0, Y (0) = 0} ≥ 1. pr{Y (1) = 1, Y (0) = 0}pr{Y (1) = 0, Y (0) = 1} We can further relax the model assumption of A given Π and U by allowing for non-negative interaction between Y (1) and Y (0) on A. C OROLLARY 3. In the causal diagram of Figure 2 with a binary outcome Y , (1) holds if (a) pr(A = 1 | Π, U ) = α + Π + δY (1) + ηY (0) + θY (1)Y (0) with δ, η, θ ≥ 0; (b) ORY ≥ 1. 8 P. D ING , T. J. VANDERW EELE AND J. M. ROBINS Remark 2. If we have an additive model of A given Π and U , pr(A = 1 | Π, U ) = h(Π) + g(U ), then the functional form g(U ) = α + δY (1) + ηY (0) + θY (1)Y (0) imposes no restriction for binary outcome. Furthermore, pr(A = 1 | Π) = Π implies that h(Π) = Π and E{g(U )} = 0, i.e., α = −δE{Y (1)} − ηE{Y (0)} − θE{Y (1)Y (0)}. Therefore, the additive model in Condition (a) of Corollary 3 is pr(A = 1 | Π, U ) = Π + δ[Y (1) − E{Y (1)}] + η[Y (0) − E{Y (0)}] + θ[Y (1)Y (0) − E{Y (1)Y (0)}]. If there is no multiplicative interaction of Π and {Y (1), Y (0)} on Z, then we have the following results. T HEOREM 6. In the causal diagram of Figure 2, (1) holds if we replace Condition (a) of Theorem 5 by (a’) pr(A = 1 | Π, U ) = Πδ{Y (1)}η{Y (0)} with δ(·) and η(·) being non-decreasing. C OROLLARY 4. In the causal diagram of Figure 2 with a binary outcome Y , (1) holds if we replace Condition (a) of Corollary 3 by (a’) pr(A = 1 | Π, U ) = αΠδ Y (1) η Y (0) θY (1)Y (0) with δ, η, θ ≥ 1. 5. I LLUSTRATIONS 5·1. Numerical Examples Myers et al. (2011) simulated binary (Z, U, A, Y ) to investigate Z-Bias. They generated (Z, U ) according to pr(Z = 1) = 0.5 and pr(U = 1) = γ0 . The first set of their generative models is additive, pr(A = 1 | U, Z) = α0 + α1 U + α2 Z, pr(Y = 1 | U, A) = β0 + β1 U + β2 A, (3) where the coefficients are all positive. The second set of their generative models is multiplicative, pr(A = 1 | U, Z) = α0 α1U α2Z , pr(Y = 1 | U, A) = β0 β1U β2A , (4) where the coefficients in (3) and (4) are all positive. They use simulation to show that Z-Bias arises under these models. In fact, in the above models, Z and U have monotonic effects on A without additive or multiplicative interactions, and U acts monotonically on Y , given A. Therefore, Corollaries 1 and 2 imply that Z-Bias must occur. The qualitative conclusion follows immediately from our theory. However, our theory does not make statements about the magnitude of the bias, and for more details about the magnitude and finite sample properties, see Myers et al. (2011). We further use three numerical examples to illustrate the role of the no-interaction assumptions required by Theorems 2 and 3 and Corollaries 1 and 2. Recall the conditional probability of the treatment A, pzu = pr(A = 1 | Z = z, U = u), and define the conditional probabilities of the outcome Y as rau = pr(Y = 1 | A = a, U = u), for z, a, u = 0, 1. Table 1 gives three examples, where monotonicity on the conditional distributions of A and Y hold, and there are both additive and multiplicative interactions. In all cases, the instrumental variable Z is Bernoulli(p = 0.5), and the confounder U is another independent Bernoulli(π = 0.5). In Case 1, the weaker condition (2) holds, and our theory implies that Z-Bias arises. In Case 2, neither the condition in Theorem 1 or (2) holds, but Z-Bias still arises. Our conditions are only sufficient but not necessary. In Case 3, neither the condition in Theorem 1 or (2) holds, and Z-Bias does not arise. Finally, for binary (Z, U, A, Y ) we use Monte Carlo to compute the volume of the Z-Bias space, i.e., the parameter space of p, π, pzu ’s and rau ’s in which the adjusted estimator has higher 9 Instrumental variables as bias amplifiers Table 1: Examples for the presence and absence of Z-Bias, in which Z ∼ Bernoulli(0.5), U ∼ Bernoulli(0.5), the conditional probability of the treatment A is pzu = pr(A = 1 | Z = z, U = u), and the conditional probability of the outcome Y is rau = pr(Y = 1 | A = a, U = u). Case 1 2 3 p11 0.8 0.3 0.5 p10 0.6 0.2 0.4 p01 0.2 0.3 0.4 p00 0.1 0.1 0.1 r11 0.08 0.03 0.04 r10 0.06 0.02 0.04 r01 0.02 0.03 0.04 r00 0.01 0.01 0.01 ACEtrue 0.0550 0.0050 0.0150 ACEunadj 0.0574 0.0076 0.0173 ACEadj 0.0584 0.0077 0.0172 Z-Bias YES YES NO Fig. 3: Biases of the adjusted and unadjusted estimators over 106 draws of the probabilities. In areas (Z1 , Z2 , Z3 , Z4 ) Z-Bias arises, and in areas (Z̄1 , Z̄2 , Z̄3 , Z̄4 ) Z-Bias does not arise. bias than the unadjusted estimator. We randomly draw these ten probabilities from independent Uniform(0, 1) random variables, and for each draw of these probabilities we compute the average causal effect ACEtrue , the unadjusted estimator ACEunadj and the adjusted estimator ACEadj . We plot the joint values of the biases (ACEadj − ACEtrue , ACEunadj − ACEtrue ) in Figure 3. The volume of the Z-Bias space can be approximated by the frequency that ACEadj deviates more from ACEtrue than ACEunadj . With 106 random draws, our Monte Carlo gives an unbiased estimate for this volume as 0.6805 with estimated standard error 0.0005. Therefore, in about 68% of the parameter space, the adjusted estimator is more biased than the unadjusted estimator. 5·2. Real Data Examples Bhattacharya & Vogt (2012) presented an example about the treatment effect of small classroom in the third grade on test scores for reading. Their instrumental variable analysis gave point P. D ING , T. J. VANDERW EELE AND J. M. ROBINS 10 Table 2: The example from Wooldridge (2010). ACEtrue ACEunadj ACEadj point estimate 2.47 1.77 1.76 standard error 0.59 0.07 0.07 lower confidence limit 1.31 1.64 1.64 upper confidence limit 3.62 1.90 1.89 U Z /A  /6 Y Fig. 4: Directed Acyclic Graph for Z-Bias Allowing for an Arrow from Z to Y estimate 8.73 with standard error 2.01. Without adjusting for the instrumental variable in the propensity score model, the point estimate was 6.00 with estimated standard error 1.34; adjusting for the instrumental variable, the point estimate was 2.97 with estimated standard error 1.84. The difference between the adjusted estimator and the instrumental variable estimator is larger than that between the unadjusted estimator and the instrumental variable estimator. Wooldridge (2010, Example 21.3) discusses estimating the effect of attaining at least seven years of education on fertility, with treatment A being a binary indicator for at least seven years of education, outcome Y being the number of living children, and instrumental variable Z being a binary indicator if the woman was born in the first half of the year. Although the original data set of Wooldridge (2010) contains other variables, most of them are posttreatment variables, so we do not adjust for them in our analysis. The instrumental variable analysis gives point estimate 2.47 with estimated standard error 0.59. The unadjusted analysis gives point estimate 1.77 with estimated standard error 0.07. The adjusted analysis gives point estimate 1.76 with estimated standard error 0.07. Table 2 summarizes the results. In this example, the adjusted and unadjusted estimators give similar results. 6. D ISCUSSION 6·1. Allowing for an Arrow from Z to Y When the variable Z has an arrow to the outcome Y as illustrated by Figure 4, the following generalization of Theorem 1 holds. T HEOREM 7. Consider the causal diagram of Figure 4 with scalar Z and U , where Z U and A Y (a) | (Z, U ) for a = 0 and 1. The result in (1) holds if we replace Condition (a) of Theorem 1 by (a’) pr(A = 1 | Z = z, U = u) and E(Y | A = a, Z = z, U = u) are non-decreasing in z and u for a = 0 and 1. However, when there is an arrow from Z to Y , Theorem 7 is of little use in practice without strong substantive knowledge about the size of the direct effect of Z on Y . In particular, neither Theorem 2 nor Theorem 3 is true when an arrow from Z to Y is present. This reflects the fact that neither the absence of an additive nor the absence of a multiplicative interaction of Z Instrumental variables as bias amplifiers 11 and U on A is sufficient to conclude that E(Y | A = a, Z = z) is non-increasing in z when E(Y | A = a, U = u, Z = z) is non-decreasing in z and u. With a general instrumental variable and a general confounder, Theorem 4 holds without any assumptions on the underlying causal diagram, and therefore it holds even if the variable Z affects the outcome directly. However, Theorems 5 and 6 no longer hold if an arrow from Z to Y is present as in Figure 4. This reflects the fact that the absence of an additive or multiplicative interaction of U and Π on A no longer implies cov{Π, νa (Π)} ≤ 0 when Z has a direct effect on Y , even if the remaining conditions of Theorems 5 and 6 hold. Analogously, Theorems 5 and 6 no longer hold if there exits an unmeasured common cause of Z and Y on the causal diagram in Figure 1(b), even if Z has no direct effect on Y . 6·2. Extensions In §§2–4, we discussed Z-Bias for the average causal effects. We can extend the results to distributional causal effects for general outcomes (Ju & Geng, 2010) and causal risk ratios for binary or positive outcomes. Moreover, the results in §§2–4 are conditional on or within the strata of observed covariates. Similar results hold for causal effects averaged over observed covariates. We give more details in the Supplementary Material. In this paper we have given sufficient conditions for the presence of Z-Bias; future work could consider sufficient conditions for the absence of Z-Bias. 6·3. Conclusion It is often suggested that we should adjust for all pretreatment covariates in observational studies. However, we show that in a wide class of models satisfying certain monotonicity, adjusting for an instrumental variable actually amplifies the impact of the unmeasured treatment-outcome confounding, which results in more bias than the unadjusted estimator. In practice, we may not be sure about whether a covariate is a confounder, for which one needs to control, or perhaps instead an instrumental variable, for which control would only increase any existing bias due to unmeasured confounding. Therefore, a more practical approach, as suggested by Rosenbaum (2010, Chapter 18.2) and Brookhart et al. (2010), may be to conduct analysis both with and without adjusting for the covariate. If two analyses give similar results, as in the example in Table 2, then we need not worry about Z-Bias; otherwise, we need additional information and analysis before making decisions. ACKNOWLEDGMENTS Peng Ding is partially supported by the U.S. Institute of Education Sciences, and Tyler J. VanderWeele by the U.S. National Institutes of Health. The authors thank the Associate Editor and two reviewers for detailed and helpful comments. S UPPLEMENTARY MATERIAL Supplementary Material available at Biometrika online includes all the proofs and extensions. R EFERENCES A LI , M. S., G ROENWOLD , R. H. & K LUNGEL , O. H. (2014). Propensity score methods and unobserved covariate imbalance: Comments on “Squeezing the balloon”. Health Services Research 49, 1074–1082. B HATTACHARYA , J. & VOGT, W. B. (2012). Do instrumental variables belong in propensity scores? Int. J. Stat. Econ. 9, 107–127. 12 P. D ING , T. J. VANDERW EELE AND J. M. ROBINS B ROOKHART, M. A., S T ÜRMER , T., G LYNN , R. J., R ASSEN , J. & S CHNEEWEISS , S. (2010). Confounding control in healthcare database research: challenges and potential approaches. Medical Care 48, S114–S120. B ROOKS , J. M. & O HSFELDT, R. L. (2013). Squeezing the balloon: Propensity scores and unmeasured covariate balance. Health Services Research 48, 1487–1507. C HIBA , Y. (2009). The sign of the unmeasured confounding bias under various standard populations. Biometrical Journal 51, 670–676. C OCHRAN , W. G. (1965). The planning of observational studies of human populations (with discussion). Journal of the Royal Statistical Society: Series A (General) 128, 234–266. C OX , D. & W ERMUTH , N. (2003). A general condition for avoiding effect reversal after marginalization. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 65, 937–941. D ’AGOSTINO , R. B. (1998). Tutorial in biostatistics: Propensity score methods for bias reduction in the comparison of a treatment to a non-randomized control group. Statistics in Medicine 17, 2265–2281. D ING , P. & M IRATRIX , L. W. (2015). To adjust or not to adjust? Sensitivity analysis of M-Bias and Butterfly-Bias (with comments). Journal of Causal Inference 3, 41–57. D ING , P. & VANDERW EELE , T. J. (2016). Sensitivity analysis without assumptions. Epidemiology 27, 368–377. D ORN , H. F. (1953). Philosophy of inferences from retrospective studies. American Journal of Public Health and the Nations Health 43, 677–683. E SARY, J. D., P ROSCHAN , F. & WALKUP, D. W. (1967). Association of random variables, with applications. The Annals of Mathematical Statistics 38, 1466–1474. G REENLAND , S. (2003). Quantifying biases in causal models: Classical confounding vs collider-stratification bias. Epidemiology 14, 300–306. G REENLAND , S. & ROBINS , J. M. (1986). Identifiability, exchangeability, and epidemiological confounding. International Journal of Epidemiology 15, 413–419. H ECKMAN , J. & NAVARRO -L OZANO , S. (2004). Using matching, instrumental variables, and control functions to estimate economic choice models. Review of Economics and Statistics 86, 30–57. H IRANO , K. & I MBENS , G. W. (2001). Estimation of causal effects using propensity score weighting: An application to data on right heart catheterization. Health Services and Outcomes Research Methodology 2, 259–278. J U , C. & G ENG , Z. (2010). Criteria for surrogate end points based on causal distributions. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 72, 129–142. K ARLIN , S. & R INOTT, Y. (1980). Classes of orderings of measures and related correlation inequalities. I. Multivariate totally positive distributions. Journal of Multivariate Analysis 10, 467–498. M A , Z., X IE , X. & G ENG , Z. (2006). Collapsibility of distribution dependence. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 68, 127–133. M YERS , J. A., R ASSEN , J. A., G AGNE , J. J., H UYBRECHTS , K. F., S CHNEEWEISS , S., ROTHMAN , K. J., J OFFE , M. M. & G LYNN , R. J. (2011). Effects of adjusting for instrumental variables on bias and precision of effect estimates. American Journal of Epidemiology 174, 1213–1222. N EYMAN , J. (1923[1990]). On the application of probability theory to agricultural experiments. Essay on principles. Section 9. Translated by D. M. Dabrowska and T. P. Speed. Statistical Science 5, 465–472. P EARL , J. (1995). Causal diagrams for empirical research (with discussion). Biometrika 82, 669–688. P EARL , J. (2000). Causality: Models, Reasoning and Inference. Cambridge: Cambridge University Press. P EARL , J. (2009). Letter to the editor. Statistics in Medicine 28, 1415–1416. P EARL , J. (2010). On a class of bias-amplifying variables that endanger effect estimates. In Proceedings of the Twenty-Sixth Conference on Uncertainty in Artificial Intelligence (UAI 2010), P. Grunwald & P. Spirtes, eds. Association for Uncetainty in Artificial Intelligence, Corvallis, OR: 425–432. P EARL , J. (2011). Invited commentary: Understanding bias amplification. American Journal of Epidemiology 174, 1223–1227. P EARL , J. (2013). Linear models: A useful “microscope” for causal analysis. Journal of Causal Inference 1, 155–170. P IEGORSCH , W. W., W EINBERG , C. R. & TAYLOR , J. A. (1994). Non-hierarchical logistic models and case-only designs for assessing susceptibility in population-based case-control studies. Statistics in Medicine 13, 153–162. ROSENBAUM , P. R. (2002). Observational Studies. New York: Springer, 2nd ed. ROSENBAUM , P. R. (2010). Design of Observational Studies. New York: Springer. ROSENBAUM , P. R. & RUBIN , D. B. (1983). The central role of the propensity score in observational studies for causal effects. Biometrika 70, 41–55. ROTHMAN , K. J., G REENLAND , S. & L ASH , T. L. (2008). Modern Epidemiology (3rd Edition). Lippincott Williams & Wilkins. RUBIN , D. B. (1974). Estimating causal effects of treatments in randomized and nonrandomized studies. Journal of Educational Psychology 66, 688–701. RUBIN , D. B. (2007). The design versus the analysis of observational studies for causal effects: Parallels with the design of randomized trials. Statistics in Medicine 26, 20–36. RUBIN , D. B. (2008a). Author’s reply. Statistics in Medicine 27, 2741–2742. RUBIN , D. B. (2008b). For objective causal inference, design trumps analysis. The Annals of Applied Statistics 2, 808–840. Instrumental variables as bias amplifiers 13 RUBIN , D. B. (2009). Should observational studies be designed to allow lack of balance in covariate distributions across treatment groups? Statistics in Medicine 28, 1420–1423. S HRIER , I. (2008). Letter to the editior. Statistics in Medicine 27, 2740–2741. S HRIER , I. (2009). Propensity scores. Statistics in Medicine 28, 1315–1318. S J ÖLANDER , A. (2009). Propensity scores and M-structures. Statistics in Medicine 28, 1416–1420. S PIRTES , P., G LYMOUR , C. N. & S CHEINES , R. (2000). Causation, Prediction, and Search. Cambridge: MIT press, 2nd ed. VANDERW EELE , T. J. (2008). The sign of the bias of unmeasured confounding. Biometrics 64, 702–706. VANDERW EELE , T. J. & ROBINS , J. M. (2010). Signed directed acyclic graphs for causal inference. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 72, 111–127. VANDERW EELE , T. J. & S HPITSER , I. (2011). A new criterion for confounder selection. Biometrics 67, 1406–1413. WALKER , A. M. (2013). Matching on provider is risky. Journal of Clinical Epidemiology 66, S65–S68. W OOLDRIDGE , J. (2016). Should instrumental variables be used as matching variables? Research in Economics 70, 232–237. W OOLDRIDGE , J. M. (2010). Econometric Analysis of Cross Section and Panel Data. Cambridge: MIT Press, 2nd ed. X IE , X., M A , Z. & G ENG , Z. (2008). Some association measures and their collapsibility. Statistica Sinica 18, 1165–1183. YANG , Q., K HOURY, M. J., S UN , F. & F LANDERS , W. D. (1999). Case-only design to measure gene-gene interaction. Epidemiology 10, 167–170. 14 P. D ING , T. J. VANDERW EELE AND J. M. ROBINS Supplementary material for “Instrumental variables as bias amplifiers with general outcome and confounding” A PPENDIX 1. L EMMAS AND T HEIR P ROOFS In order to prove the main results, we need to invoke the following lemmas. Some of them are from the literature, and some of them are new and of independent interest. Lemma S1 is from Esary et al. (1967, Theorem 2.1). L EMMA S1. Let f (·) and g(·) be functions with K real-valued arguments, which are both non-decreasing in each of their arguments. If U = (U1 , . . . , UK ) is a multivariate random variable with K mutually independent components, then cov{f (U ), g(U )} ≥ 0. Lemma S2 is from VanderWeele (2008), and Lemmas S3 and S4 are from Chiba (2009). L EMMA S2. For a univariate U or a multivariate U with mutually independent components, if for a = 1 and 0, Y (a) A | U , E(Y | A = a, U = u) is non-decreasing in each component of u, and pr(A = 1 | U = u) is non-decreasing in each component of u, then E(Y | A = 1) ≥ E{Y (1)} and E(Y | A = 0) ≤ E{Y (0)}. L EMMA S3. For a univariate U and a multivariate U with mutually independent components, if Y (0) A | U , E(Y | A = 0, U = u) is non-decreasing in each component of u, and pr(A = 1 | U = u) is non-decreasing in each component of u, then E(Y | A = 0) ≤ E{Y (0) | A = 1}. L EMMA S4. For a univariate U and a multivariate U with mutually independent components, if Y (1) A | U , E(Y | A = 1, U = u) is non-decreasing in each component of u, and pr(A = 1 | U = u) is non-decreasing in each component of u, then E(Y | A = 1) ≥ E{Y (1) | A = 0}. Lemma S5, extending Rothman et al. (2008), states that under monotonicity, no additive interaction implies non-positive multiplicative interactions for both presence and absence of the outcome. L EMMA S5. If p11 ≥ max(p10 , p01 ), min(p10 , p01 ) ≥ p00 > 0, and p11 − p10 − p01 + p00 = 0, then p11 p00 ≤ 1, p10 p01 (1 − p11 )(1 − p00 ) ≤ 1. (1 − p10 )(1 − p01 ) (S5) Proof of Lemma S5. Define RR11 = p11 /p00 ≥ 1, RR10 = p10 /p00 ≥ 1 and RR01 = p01 /p00 ≥ 1. Then p11 − p10 − p01 + p00 = 0 implies RR11 = RR10 + RR01 − 1, which further implies p11 p00 RR11 1 = =1+ (RR11 − RR10 RR01 ) p10 p01 RR10 RR01 RR10 RR01 1 =1+ (RR10 + RR01 − 1 − RR10 RR01 ) RR10 RR01 1 =1− (RR10 − 1)(RR01 − 1) ≤ 1. RR10 RR01 15 Instrumental variables as bias amplifiers The second inequality of (S5) follows from (1 − p11 )(1 − p00 ) (1 − p11 )(1 − p00 ) − (1 − p10 )(1 − p01 ) =1+ (1 − p10 )(1 − p01 ) (1 − p10 )(1 − p01 ) 1 =1+ {(1 − p11 − p00 + p11 p00 ) − (1 − p10 − p01 + p10 p01 )} (1 − p10 )(1 − p01 ) 1 (p11 p00 − p10 p01 ) =1+ (1 − p10 )(1 − p01 )   p11 p00 p10 p01 − 1 ≤ 1. =1+ (1 − p10 )(1 − p01 ) p10 p01  Lemma S5 is about interaction between two binary causes, and for our discussion we need to extend it to interaction between two general causes. Lemma S6 extends Piegorsch et al. (1994) and Yang et al. (1999) by relating the conditional association between two independent causes given the outcome to the interaction between the two causes on the outcome. L EMMA S6. If Z U , and pr(A = 1 | Z = z, U = u) = β(z) + γ(u) with β(z) and γ(u) non-decreasing in z and u, then for both a = 1 and 0 and for all values of u and z, ∂F (u | A = a, Z = z) ≥ 0, ∂z i.e., U has non-positive distributional dependence on Z, given A. Proof of Lemma S6. For a fixed u and z1 > z0 , we define Z ∞ p11 = pr(A = 1 | U > u, Z = z1 ) = {β(z1 ) + γ(u0 )}F (du0 )/{1 − F (u)}, Zu∞ p10 = pr(A = 1 | U > u, Z = z0 ) = {β(z0 ) + γ(u0 )}F (du0 )/{1 − F (u)}, u Z u p01 = pr(A = 1 | U ≤ u, Z = z1 ) = {β(z1 ) + γ(u0 )}F (du0 )/F (u), −∞ Z u p00 = pr(A = 1 | U ≤ u, Z = z0 ) = {β(z0 ) + γ(u0 )}F (du0 )/F (u), −∞ following from the additive model of A and Z U. Because β(z1 ) ≥ β(z0 ), it is straightforward to show that p11 ≥ p10 and p01 ≥ p00 . Because γ(u) is increasing in u, we have p11 ≥ β(z1 ) + γ(u), p10 ≥ β(z0 ) + γ(u), p01 ≤ β(z1 ) + γ(u), p00 ≤ β(z0 ) + γ(u), which imply p11 ≥ p01 and p10 ≥ p00 . We further have p − p − p01 + p00 Z11∞ 10 Z = {β(z1 ) − β(z0 )}F (du0 )/{1 − F (u)} − u = 0. u −∞ {β(z1 ) − β(z0 )}F (du0 )/F (u) P. D ING , T. J. VANDERW EELE AND J. M. ROBINS 16 The four probabilities (p11 , p10 , p01 , p00 ) satisfy the conditions in Lemma S5, Therefore, (2) holds. Replacing the probabilities in (2) by their definitions above, we have pr(A = 1 | U pr(A = 1 | U pr(A = 1 | U ⇐⇒ pr(A = 1 | U > u, Z = z1 )pr(A = 1 | U ≤ u, Z = z0 ) ≤1 > u, Z = z0 )pr(A = 1 | U ≤ u, Z = z1 ) > u, z1 ) pr(A = 1 | U > u, z0 ) ≤ , ≤ u, z1 ) pr(A = 1 | U ≤ u, z0 ) pr(A = 0 | U pr(A = 0 | U pr(A = 0 | U ⇐⇒ pr(A = 0 | U > u, Z = z1 )pr(A = 0 | U ≤ u, Z = z0 ) ≤1 > u, Z = z0 )pr(A = 0 | U ≤ u, Z = z1 ) > u, z1 ) pr(A = 0 | U > u, z0 ) ≤ . ≤ u, z1 ) pr(A = 0 | U ≤ u, z0 ) and Therefore, for both a = 1 and 0 and for all values of u, pr(A = a | U > u, Z = z) pr(A = a | U ≤ u, Z = z) (S6) is non-increasing in z. Because of the independence of Z and U , we have F (u | A = a, Z = z) pr(U ≤ u, A = a | Z = z) = pr(A = a | Z = z) pr(U ≤ u)pr(A = a | U ≤ u, Z = z) = pr(U ≤ u)pr(A = a | U ≤ u, Z = z) + pr(U > u)pr(A = a | U > u, Z = z)   pr(U > u) pr(A = a | U > u, Z = z) −1 = 1+ × . pr(U ≤ u) pr(A = a | U ≤ u, Z = z) Therefore, F (u | A = a, Z = z) is a non-increasing function of (S6), and the conclusion holds. Lemmas S5 and S6 above hold under the assumption of no additive interaction, and the following two lemmas state similar results under the assumption of no multiplicative interaction. L EMMA S7. If p11 ≥ max(p10 , p01 ), min(p10 , p01 ) ≥ p00 , and p11 p00 = p10 p01 , then p11 − p10 − p01 + p00 ≥ 0, (1 − p11 )(1 − p00 ) ≤ 1. (1 − p10 )(1 − p01 ) Proof of Lemma S7. Using the same notation in the proof of Lemma S5, p11 p00 = p10 p01 implies RR11 = RR10 RR01 , with RR10 ≥ 1, RR01 ≥ 1, and RR11 ≥ 1. Therefore, p11 − p10 − p01 + p00 = p00 (RR10 RR01 − RR10 − RR01 + 1) = p00 (RR10 − 1)(RR01 − 1) ≥ 0, which further implies that (1 − p11 )(1 − p00 ) 1 =1+ {(1 − p11 )(1 − p00 ) − (1 − p10 )(1 − p01 )} (1 − p10 )(1 − p01 ) (1 − p10 )(1 − p01 ) p11 − p10 − p01 + p00 =1− ≤ 1.  (1 − p10 )(1 − p01 ) 17 Instrumental variables as bias amplifiers L EMMA S8. If Z U , and pr(A = 1 | Z = z, U = u) = β(z)γ(u) with β(z) > 0 and γ(u) > 0 non-decreasing in z and u, then Z U | A = 1, and for all values of u and z, ∂F (u | A = 0, Z = z) ≥ 0, ∂z i.e., U has non-positive distributional dependence on Z, given A = 0. Proof of Lemma S8. For a fixed u and z1 > z0 , we define Z ∞ γ(u0 )F (du0 )/{1 − F (u)}, p11 = pr(A = 1 | U > u, Z = z1 ) = β(z1 ) Zu∞ γ(u0 )F (du0 )/{1 − F (u)}, p10 = pr(A = 1 | U > u, Z = z0 ) = β(z0 ) u Z u p01 = pr(A = 1 | U ≤ u, Z = z1 ) = β(z1 ) γ(u0 )F (du0 )/F (u), −∞ Z u p00 = pr(A = 1 | U ≤ u, Z = z0 ) = β(z0 ) γ(u0 )F (du0 )/F (u), −∞ following from the multiplicative model of A and Z U. Because β(z1 ) ≥ β(z0 ), we have p11 ≥ p10 and p01 ≥ p00 . Because γ(u) is increasing in u, we have p11 ≥ β(z1 )γ(u), p10 ≥ β(z0 )γ(u), p01 ≤ β(z1 )γ(u), p00 ≤ β(z0 )γ(u), which imply p11 ≥ p01 and p10 ≥ p00 . We can further verify (p11 p00 )/(p10 p01 ) = 1. Because the four probabilities (p11 , p10 , p01 , p00 ) satisfy the conditions in Lemma S7, we have {(1 − p11 )(1 − p00 )}/{(1 − p10 )(1 − p01 )} ≤ 1. Replacing the probabilities by their definitions, we have pr(A = 1 | U pr(A = 1 | U pr(A = 0 | U pr(A = 0 | U > u, Z > u, Z > u, Z > u, Z = z1 )pr(A = 1 | U = z0 )pr(A = 1 | U = z1 )pr(A = 0 | U = z0 )pr(A = 0 | U ≤ u, Z ≤ u, Z ≤ u, Z ≤ u, Z = z0 ) = 1, = z1 ) = z0 ) ≤ 1. = z1 ) Following the same logic of the proof of Lemma S6, we can prove that Z U | A = 1, and Z has non-positive distributional association on U , given A = 0.  Define f = pr(A = 1) to be the proportion of the population under treatment. The average causal effect for the whole population can be written as a convex combination of the average causal effects for the treated and control populations: true ACEtrue = E{Y (1)} − E{Y (0)} = f ACEtrue 1 + (1 − f )ACE 0 . Analogously, with a scalar instrumental variable, the adjusted estimator for the whole population can be written as Z Z adj adj adj ACE = µ1 (z)F (dz) − µ0 (z)F (dz) = f ACE1 + (1 − f )ACE0 , and with a general instrumental variable, Z Z adj adj adj ACE = ν1 (π)F (dπ) − ν0 (π)F (dπ) = f ACE1 + (1 − f )ACE0 . P. D ING , T. J. VANDERW EELE AND J. M. ROBINS 18 L EMMA S9. With a scalar instrumental variable Z, the differences between the adjusted and unadjusted estimators are adj cov{Π(Z), µ0 (Z)} , f (1 − f ) cov{Π(Z), µ1 (Z)} =− , f (1 − f ) cov{Π(Z), µ0 (Z)} cov{Π(Z), µ1 (Z)} =− − . 1−f f ACE1 − ACEunadj = − adj ACE0 − ACEunadj ACEadj − ACEunadj With a general instrumental variable Z, the above formulas hold if we replace Π(Z) by Π and µa (Z) = E(Y | A = a, Z) by νa (Π) = E(Y | A = a, Π). adj Proof of Lemma S9. The difference ACE1 − ACEunadj is equal to adj ACE1 − ACEunadj Z = E(Y | A = 0) − µ0 (z)F (dz | A = 1) Z Z = µ0 (z)F (dz | A = 0) − µ0 (z)F (dz | A = 1) R R µ0 (z)Π(z)F (dz) µ0 (z){1 − Π(z)}F (dz) − = 1−f f h i 1 = E{µ0 (Z)(1 − Π(Z))}E{Π(Z)} − E{µ0 (Z)Π(Z)}E{1 − Π(Z)} f (1 − f ) h i 1 = E{µ0 (Z)}E{Π(Z)} − E{µ0 (Z)Π(Z)} f (1 − f ) cov{Π(Z), µ0 (Z)} =− . f (1 − f ) adj Similarly, the difference ACE0 − ACEunadj is equal to Z Z adj unadj ACE0 − ACE = µ1 (z)F (dz | A = 0) − µ1 (z)F (dz | A = 1) =− cov{Π(Z), µ1 (Z)} . f (1 − f ) Therefore, the difference ACEadj − ACEunadj is equal to adj adj ACEadj − ACEunadj = f (ACE1 − ACEunadj ) + (1 − f )(ACE0 − ACEunadj ) cov{Π(Z), µ0 (Z)} cov{Π(Z), µ1 (Z)} =− − . 1−f f Analogously, we can prove the results for general instrumental variables.  A PPENDIX 2. P ROOFS OF T HEOREMS AND C OROLLARIES IN THE M AIN T EXT Proof of Theorem 1. Because Π(z) = pr(A = 1 | Z = z) and pr(A = 1 | U = u) are nondecreasing in z and u, and E(Y | A = a, U = u) is non-decreasing in u for both a = 0 and true 1, the unadjusted estimator, ACEunadj , is larger than or equal to ACEtrue , ACEtrue 1 and ACE 0 , according to Lemmas S2–S4. Instrumental variables as bias amplifiers 19 Because Π(Z) is non-decreasing and µa (Z) is non-increasing in Z for both a = 0 and 1, their covariance is non-positive according to Lemma S1, i.e., cov{Π(Z), µa (Z)} ≤ 0. adj adj Because the differences between all the adjusted estimators, ACE1 , ACE0 and ACEadj , and the unadjusted estimator, ACEunadj , are negative constants multiplied by cov{Π(Z), µa (Z)}, adj adj according to Lemma S9 all of ACE1 , ACE0 , and ACEadj are larger or equal to ACEunadj .  Proof of Theorem 2. The independence of Z and U implies that Z pr(A = 1 | Z = z) = pr(A = 1 | Z = z, U = u)F (du) = β(z) + E{γ(U )}, Z pr(A = 1 | U = u) = pr(A = 1 | Z = z, U = u)F (dz) = E{β(Z)} + γ(u) are non-decreasing in z and u. Therefore, according to Theorem 1 we need only to verify that E(Y | A = a, Z = z) in non-increasing in z for both a = 0 and 1. Because Z U and pr(A = 1 | Z = z, U = u) = β(z) + γ(u) with non-decreasing β(z) and γ(u), we can apply Lemma S6, and conclude that ∂F (u | A = a, Z = z)/∂z ≥ 0. Write the essential infimum and supremum of U given (A = a, Z = z) as u(a, z) and u(a), with the later depending only on a according to Condition (c) of Theorem 2. Because Y Z | (A, U ), integration or summation by parts gives E(Y | A = a, Z = z) Z = E(Y | A = a, Z = z, U = u)F (du | A = a, Z = z) Z = ma (u)F (du | A = a, Z = z)  Z  ∂ma (u) u=u(a) = ma (u)F (u | A = a, Z = z)|u=u(a,z) − F (u | A = a, Z = z) du ∂u  Z  ∂ma (u) F (u | A = a, Z = z) du. = ma {u(a)} − ∂u Therefore, its derivative with respect to z,  Z  ∂E(Y | A = a, z) ∂ ∂ma (u) =− F (u | A = a, Z = z) du ∂z ∂z ∂u   Z  ∂ma (u) ∂F (u | A = a, Z = z) =− du, ∂u ∂z is smaller than or equal to zero, because ∂ma (u)/∂u ≥ 0 for both a = 0 and 1 and for all u.  Proof of Corollary 1. According to Theorem 1 we need only to verify that µa (z) = E(Y | A = a, Z = z) is non-increasing in z for both a = 0 and 1. Following Lemma S5, for binary and independent Z and U, monotonicity and no additive interaction imply (S5), which, according to Bayes’ Theorem, is equivalent to pr(A = 1 | Z = 1, U = 1)pr(A = 1 | Z = 0, U = 0) = ORZU |A=1 ≤ 1, pr(A = 1 | Z = 1, U = 0)pr(A = 1 | Z = 0, U = 1) pr(A = 0 | Z = 1, U = 1)pr(A = 0 | Z = 0, U = 0) = ORZU |A=0 ≤ 1. pr(A = 0 | Z = 1, U = 0)pr(A = 0 | Z = 0, U = 1) (S7) (S8) P. D ING , T. J. VANDERW EELE AND J. M. ROBINS 20 The above inequalities (S7) and (S8) state that Z and U have negative association given each level of A, and therefore pr(U = 1 | A = a, Z = z) is non-increasing in z for both a = 1 and 0. Because ma (1) ≥ ma (0) and µa (z) = E(Y | A = a, Z = z) X E(Y | A = a, Z = z, U = u)pr(U = u | A = a, Z = z) = u=0,1 = ma (1)pr(U = 1 | A = a, Z = z) + ma (0){1 − pr(U = 1 | A = a, Z = z)} = {ma (1) − ma (0)}pr(U = 1 | A = a, Z = z) + ma (0), we know that µa (z) is non-decreasing in pr(U = 1 | A = a, Z = z). Therefore, µa (z) is nonincreasing in z for both a = 1 and 0.  Proof of Theorem 3. Because of the independence of Z and U , we have pr(A = 1 | Z = z) = β(z)E{γ(U )} and pr(A = 1 | U = u) = E{β(Z)}γ(u) are non-decreasing in z and u. According to Lemma S8, the multiplicative model of A also implies that for both a = 1 and 0 and for all z and u, ∂F (u | A = a, Z = z)/∂z ≥ 0. Following exactly the same steps of the proof of Theorem 2, we can prove Theorem 3.  Proof of Corollary 2. For binary and independent Z and U , monotonicity, no multiplicative interaction, and Lemma S7 imply p11 p00 = 1 ≤ 1, p10 p01 (1 − p11 )(1 − p00 ) ≤ 1. (1 − p10 )(1 − p01 ) With the above results in (S9), the rest of the proof is the same as the proof of Corollary 1. (S9)  Proof of Theorem 4. First, we consider the treatment effect on the population under treatment. Taking U = Y (0) in Lemma S3, we have ACEunadj ≥ ACEtrue 1 , because A Y (0) | Y (0), pr{A = 1 | Y (0)} is non-decreasing in Y (0), and E{Y | A = 0, Y (0)} = Y (0) is nonadj decreasing in Y (0). The condition cov{Π, E(Y | A = 0, Π)} ≤ 0 implies that ACE1 ≥ adj ACEunadj according to Lemma S9. Therefore, ACE1 ≥ ACEunadj ≥ ACEtrue 1 . Second, we take U = Y (1) in Lemma S4, and by a similar argument as above we have adj ACE0 ≥ ACEunadj ≥ ACEtrue 0 . true The conclusion holds because ACEtrue = f ACEtrue and ACEadj = 1 + (1 − f )ACE 0 adj adj f ACE1 + (1 − f )ACE0 .  Proof of Theorem 5. Under the additive model of A given Π and U = {Y (1), Y (0)}, we have the following results. First, pr(A = 1 | Π) = Π is increasing in Π. Second, Π {Y (1), Y (0)} implies Z pr{A = 1 | Π, Y (1) = y1 } = pr(A = 1 | Π, U )F (dy0 | y1 ) Z = {Π + δ(y1 ) + η(y0 )}F (dy0 | y1 ) Z e 1 ). = Π + δ(y1 ) + η(y0 )F (dy0 | y1 ) ≡ Π + δ(y Denote the infimum and supremum of Y (0) given Y (1) = y1 by y 0 (y1 ) and y 0 , with the later not depending on y1 according to Condition (c) of Theorem 5. Applying integration or summation 21 Instrumental variables as bias amplifiers by parts, we have  Z  dη(y0 ) y0 =y 0 e δ(y1 ) = δ(y1 ) + η(y0 )F (y0 | y1 )|y0 =y (y1 ) − F (y0 | y1 ) dy0 dy0 0  Z  dη(y0 ) F (y0 | y1 ) dy0 . = δ(y1 ) + η(y 0 ) − dy0 e 1 ) is non-decreasing in y1 , because The function δ(y e 1) d δ(y dδ(y1 ) = − dy1 dy1 Z  dη(y0 ) dy0  ∂F (y0 | y1 ) ∂y1  dy0 ≥ 0. Third, following the same reasoning as the second argument, we have pr{A = 1 | Π, Y (1) = y0 } = Π + ηe(y0 ), with ηe(y0 ) being a non-decreasing function of y0 . Fourth, Π Y (1) implies e 1 ), which is non-decreasing in y1 . Fifth, Π Y (0) implies pr{A = 1 | Y (1) = y1 } = f + δ(y pr{A = 1 | Y (0) = y0 } = f + ηe(y0 ), which is non-decreasing in y0 . According the fourth and fifth arguments above, Condition (a) in Theorem 4 holds. Therefore, we need only to verify Condition (b) in Theorem 4 to complete the proof. e (1)}, which is additive and nonWe have shown that pr{A = 1 | Π, Y (1)} = Π + δ{Y decreasing in Π and Y (1). According to Lemma S6, we know that ∂pr{Y (1) ≤ y1 | A = 1, Π = π} ≥0 ∂π (S10) for all y1 and π. We have also shown that pr{A = 1 | Π, Y (0)} = Π + ηe{Y (0)}, which is additive and non-decreasing in Π and Y (0). Again according to Lemma S6, we know that ∂pr{Y (0) ≤ y0 | A = 0, Π = π} ≥0 ∂π (S11) for all y0 and π. According to Xie et al. (2008), the above negative distributional associations in (S10) and (S11) imply the negative associations in expectation between Y (0) and Π given A, as required by condition (b) of Theorem 4.  Proof of Corollary 3. As shown in the proof of Theorem 5, the conclusion follows immediately from the five ingredients. We will show that they hold even if there is non-negative interaction between binary Y (1) and Y (0). The following proof is in parallel with the proof of Theorem 5. First, pr(A = 1 | Π) = Π is increasing in Π. Second, pr{A = 1 | Π, Y (1) = y1 } = E [pr{A = 1 | Π, Y (1) = y1 , Y (0)} | Π, Y (1) = y1 ] = E {α + Π + δy1 + ηY (0) + θy1 Y (0) | Π, Y (1) = y1 } = α + Π + δy1 + ηpr{Y (0) = 1 | Y (1) = y1 } + θy1 pr{Y (0) = 1 | Y (1) = y1 } (S12) e 1 − E{Y (1)}]. ≡ Π + δ[y (S13) 22 P. D ING , T. J. VANDERW EELE AND J. M. ROBINS The last equation in (S13) follows from the fact that Y (1) is binary and the functional form must be linear in y1 , where the coefficient is δe = pr{A = 1 | Π, Y (1) = 1} − pr{A = 1 | Π, Y (1) = 0} = δ + η[pr{Y (0) = 1 | Y (1) = 1} − pr{Y (0) = 1 | Y (1) = 0}] + θpr{Y (0) = 1 | Y (1) = 1} (S14) ≥ η[pr{Y (0) = 1 | Y (1) = 1} − pr{Y (0) = 1 | Y (1) = 0}], (S15) where (S14) follows from (S12), and (S15) follows from δ ≥ 0 and θ ≥ 0. Because ORY ≥ 1, the potential outcomes have non-negative association, implying that their risk difference RDY = pr{Y (0) = 1 | Y (1) = 1} − pr{Y (0) = 1 | Y (1) = 0} ≥ 0. Therefore, δe ≥ 0, and pr{A = 1 | Π, Y (1)} is additive and non-decreasing in Π and Y (1). Third, similar to the second argument, we have pr{A = 1 | Π, Y (0) = y0 } = Π + ηe[y0 − E{Y (0)}] with ηe ≥ 0. Therefore, pr{A = 1 | Π, Y (0)} is additive and non-decreasing in Π e (1) is increasing in Y (1). and Y (0). Fourth, Π Y (1) implies that pr{A = 1 | Y (1)} = f + δY Fifth, Π Y (0) implies that pr{A = 1 | Y (0)} = f + ηeY (0) is increasing in Y (0). With these five ingredients, the rest of the proof is exactly the same as the proof of Theorem 5.  Proof of Theorem 6. First, pr(A = 1 | Π) = Π is non-decreasing in Π. Second, Z e 1) pr{A = 1 | Π, Y (1) = y1 } = Πδ(y1 ) δ(y0 )F (dy0 | y1 ) ≡ Πδ(y is multiplicative and non-decreasing in Π and y1 , following the same argument as the proof of Theorem 5. Third, pr{A = 1 | Π, Y (0) = y0 } = Πe η (y0 ) is multiplicative and non-decreasing in e Π and y0 . Fourth, pr{A = 1 | Y (1) = y1 } = f δ(y1 ) is non-decreasing in y1 . Fifth, pr{A = 1 | Y (0) = y0 } = f ηe(y0 ) is non-decreasing in y0 . The multiplicative models and Lemma S8 imply that for all π, y1 and y0 , ∂pr{Y (0) ≤ y0 | A = 0, Π = π} ∂pr{Y (1) ≤ y1 | A = 1, Π = π} = 0 ≤ 0, ≥ 0.(S16) ∂π ∂π The rest part is the same as the proof of Theorem 5.  Proof of Corollary 4. First, pr(A = 1 | Π) = Π is non-decreasing in Π. Second, pr{A = 1 | Π, Y (1) = y1 } = αΠδ y1 E{η Y (0) θy1 Y (0) | Y (1) = y1 } ≡ αΠδeY (1) , where the functional form must be multiplicative because of binary Y (0), and the parameter δe is pr{A = 1 | Π, Y (1) = 1} δe = pr{A = 1 | Π, Y (1) = 0} E{η Y (0) θY (0) | Y (1) = 1} E{η Y (0) | Y (1) = 0} ηθpr{Y (0) = 1 | Y (1) = 1} + pr{Y (0) = 0 | Y (1) = 1} =δ× ηpr{Y (0) = 1 | Y (1) = 0} + pr{Y (0) = 0 | Y (1) = 0} (ηθ − 1)pr{Y (0) = 1 | Y (1) = 1} + 1 =δ× . (η − 1)pr{Y (0) = 1 | Y (1) = 0} + 1 =δ× Because ORY ≥ 1, we have pr{Y (0) = 1 | Y (1) = 1} ≥ pr{Y (0) = 1 | Y (1) = 0}, which implies that δe ≥ 1. Therefore, pr{A = 1 | Π, Y (1)} is multiplicative and non-decreasing in Π Instrumental variables as bias amplifiers 23 and Y (1). Third, we can similarly show that pr{A = 1 | Π, Y (0)} is multiplicative and nondecreasing in Π and Y (0). Fourth, pr{A = 1 | Y (1) = y1 } = αf δey1 is non-decreasing in y1 . Fifth, pr{A = 1 | Y (0) = y0 } = αf ηey0 is non-decreasing in y0 . The rest part is the same as the proof of Theorem 6.  Proof of Theorem 7.. In Figure 4, Z and U are two independent confounders for the relationship between A and Y . Because pr(A = 1 | Z = z, U = u) and E(Y | A = a, Z = z, U = u) are non-decreasing in z and u for both a = 0 and 1, Lemmas S2–S4 imply that the unadjusted true estimator, ACEunadj , is larger than or equal to ACEtrue , ACEtrue 1 and ACE R 0 . The independence between Z and U implies pr(A = 1 | Z = z) = pr(A = 1 | Z = z, U = u)F (du), and the monotonicity of pr(A = 1 | Z = z, U = u) in z implies that pr(A = 1 | Z = z) is non-decreasing in z. The rest of the proof is identical to the proof of Theorem 1.  A PPENDIX 3. E XTENSIONS TO OTHER C AUSAL M EASURES Appendix 3·1. Distributional Causal Effects Sometimes we are also interested in estimating the distributional causal effects (Ju & Geng, 2010) for the treatment, control and whole populations: DCEtrue 1 (y) = pr{Y (1) > y | A = 1} − pr{Y (0) > y | A = 1}, true DCE0 (y) = pr{Y (1) > y | A = 0} − pr{Y (0) > y | A = 0}, DCEtrue (y) = pr{Y (1) > y} − pr{Y (0) > y}. The unadjusted estimator is DCEunadj (y) = pr(Y > y | A = 1) − pr(Y > y | A = 0). The adjusted estimators for the treatment, control and whole populations are Z adj DCE1 (y) = pr(Y > y | A = 1) − pr(Y > y | A = 0, z)F (dz | A = 1), Z adj DCE0 (y) = pr(Y > y | A = 1, z)F (dz | A = 0) − pr(Y > y | A = 0), Z Z adj DCE (y) = pr(Y > y | A = 1, z)F (dz) − pr(Y > y | A = 0, z)F (dz). If the outcome is binary, then the distributional causal effects at y < 1 are the average causal effects, and zero at y ≥ 1. All results about distributional causal effects reduce to average causal effects for binary outcome. For a general outcome, the distributional causal effects are the average causal effects on the dichotomized outcome Iy = I(Y > y). Therefore, if we replace the outcome Y by Iy in Theorems 1–3, the results about Z-Bias hold for distributional effects. For instance, the condition that pr(Y > y | A = a, U = u) is non-decreasing in u for all a is the same as requiring a non-negative sign on the arrow U → Y , according to the theory of signed directed acyclic graphs (VanderWeele & Robins, 2010). The following theorem states the results analogous to Theorems 4–6. C OROLLARY S5. In the causal diagram of Figure 2, if for all y and for both a = 1 and 0, (a) pr{Y (a) > y | A = 1} ≥ pr{Y (a) > y | A = 0}; (b) cov{Π, pr(Y > y | A = a, Π)} ≤ 0; P. D ING , T. J. VANDERW EELE AND J. M. ROBINS 24 then      adj DCE1 (y) DCEunadj (y) DCEtrue 1 (y) DCEadj (y) ≥ DCEunadj (y) ≥ DCEtrue  0 (y) . 0 true unadj DCE (y) DCE (y) DCEadj (y)  (S17) Under the conditions of Theorems 5 and 6, (S17) holds. Proof of Corollary S5. Condition (a) of Corollary S5 is equivalent to pr{A = 1 | Iy (a) = 1} ≥ pr{A = 1 | Iy (a) = 0}, and Condition (b) of Corollary S5 is equivalent to cov{Π, E(Iy | A = a, Π)} ≤ 0. Therefore, the conclusion follows from Theorem 4. According to the proofs of Theorems 5 and 6, we have pr{A = 1 | Iy (a) = 1} = pr{A = 1 | Y (a) > y} ≥ pr{A = 1 | Y (a) = y} ≥ pr{A = 1 | Y (a) ≤ y} = pr{A = 1 | Iy (a) = 0}, because of monotonicity of pr{A = 1 | Y (a)} in Y (a). Therefore, Condition (a) of Theorem S5 holds. Under the conditions of Theorems 5 and 6, we have also shown in (S10)–(S16) that for all a, y and π, ∂pr(Y ≤ y | A = a, Π = π)/∂π ≥ 0, which implies that E(Iy | A = a, Π = π) is non-increasing in π. Therefore, Condition (b) of Theorem S5 holds. The proof is complete.  Appendix 3·2. Ratio Measures In many applications with binary or positive outcomes, we are also interested in assessing causal effects on the ratio scale for the treatment, control and whole populations, defined as RRtrue 1 = E{Y (1) | A = 1} , E{Y (0) | A = 1} RRtrue 0 = E{Y (1) | A = 0} , E{Y (0) | A = 0} RRtrue = E{Y (1)} . E{Y (0)} The unadjusted estimator on the ratio scale is RRunadj = E(Y | A = 1) . E(Y | A = 0) The adjusted estimators on the ratio scale for the treatment, control and whole populations are adj RR1 = R E{Y R E{Y adj RR0 = R E{Y adj RR = R E{Y E(Y | A = 1) , | A = 0, Z = z}F (dz | A = 1) | A = 1, Z = z}F (dz | A = 0) , E(Y | A = 0) | A = 1, Z = z}F (dz) . | A = 0, Z = z}F (dz) With a general instrumental variable Z, we can replace Z by Π in the definitions of the adjusted estimators. C OROLLARY S6. All the theorems and corollaries in §§3 and 4 hold on the ratio scale, i.e., under their conditions,  adj   unadj   true  RR1 RR RR1 RRadj  ≥ RRunadj  ≥ RRtrue . 0 0 true unadj adj RR RR RR Instrumental variables as bias amplifiers 25 adj true Proof of Corollary S6. First, RRtrue is a convex combination of RRtrue 1 and RR 0 , and RR adj adj is a convex combination of RR1 and RR0 , which are formally stated in Ding & VanderWeele (2016, eAppendix). Then the conclusion follows from the proofs of the theorems above.  Appendix 3·3. Average Over Observed Covariates In practice, we need to adjust for the observed covariates X that are confounders affecting both the treatment and outcome. The discussion in previous sections is conditional on or within strata of observed covariates X, and the causal effects and their estimators are given X. For example, ACEtrue (x) = E{Y (1) | X = x} − E{Y (0) | X = x}, ACEunadj (x) = E(Y | A = 1, X = x) − E(Y | A = 0, X = x), Z ACEadj (x) = E(Y | A = 1, Z = z, X = x)F (dz | X = x) Z − E(Y | A = 0, Z = z, X = x)F (dz | X = x), and other conditional quantities can be analogously defined. If the conditions in the theorems and corollaries in §§3 and 4 hold within each level of X, then the conclusions in (1) and (S17) hold not only within each level of X but also averaged over X. For example, for the average causal effects, we have  R R  adj ACEunadj (x)F (dx | A = 1) ACE1 (x)F (dx | A = 1) R R ACEadj (x)F (dx | A = 0) ≥  ACEunadj (x)F (dx | A = 0) R R 0 adj ACEunadj (x)F (dx) ACE (x)F (dx) R  true ACE (x)F (dx | A = 1) 1 R true (dx | A = 0) . ≥  ACE R 0 (x)F true ACE (x)F (dx)
10math.ST
A POLYHEDRAL CHARACTERIZATION OF BORDER BASES arXiv:0912.1502v5 [math.AC] 24 Nov 2015 GÁBOR BRAUN AND SEBASTIAN POKUTTA Abstract. Border bases arise as a canonical generalization of Gröbner bases, using order ideals instead of term orderings. We provide a polyhedral characterization of all order ideals (and hence all border bases) that are supported by a zero-dimensional ideal: order ideals that support a border basis correspond one-to-one to integral points of the order ideal polytope. In particular, we establish a crucial connection between the ideal and its combinatorial structure. Based on this characterization we also provide an adaptation of the border basis algorithm of Kehrein and Kreuzer [35] to allow for computing border bases for arbitrary order ideals, given implicitly via maximizing a preference on monomials (variable selection problem), independent of term orderings. The algorithm requires the same size of resources as the border basis algorithm except for some minor overhead. We also show that the underlying variable selection problem of finding an order ideal that supports a border basis is NP-hard and that any linear description of the associated convex hull of all order ideals requires a superpolynomial number of inequalities. 1. Introduction In many different disciplines and real-world applications one is faced with solving systems of polynomial equations. Often this is simply due to a physical or dynamical system having a natural representation as a system of polynomial equations, but equally often it is due to the sheer expressive power of polynomial systems of equations that allow for easy reformulation. To give an example of the latter, an inequality ax ≤ b with a ∈ R n and b ∈ R can be expressed via a single polynomial equation: ax + u2 = b. A slightly more involved example is that of the feasible region of a binary program { x | Ax ≤ b, x ∈ {0, 1}n }, which can be captured via rewriting each individual inequality as before, and adding quadratic polynomials x2i − xi = 0 for each coordinate i = 1, . . . , n of x. As a consequence, there is a huge need to computationally model, understand, manipulate, and extract the solution set of systems of polynomial equations. A key insight in (computational) commutative algebra is that one can choose a smart ordering on the monomials and compute a special set of generators of the ideal generated by the system of equations that makes many operations easy, and provides a structural insight into the system. One such special set of generators is a Gröbner basis. By now, Gröbner bases are fundamental and standard tools in commutative algebra to actually perform important operations on ideals such as intersection, membership test, elimination, projection, and many more. Border bases arise as a natural generalization of Gröbner bases that can be computed for zero-dimensional ideals, i.e., the associated factor space is a finite-dimensional vector space (see Section 2 for details). While this might seem to be a severe restriction, for many applications it is sufficient. Roughly speaking, whenever the solution set is finite, we are dealing with a zero-dimensional ideal. For example, systems of polynomial equations with solutions restricted to a finite set of points are captured by zero-dimesional ideals. Date: January 4, 2018. 2000 Mathematics Subject Classification. Primary: 13P10; 90C57; secondary: 65H10;12Y05; 90C27; 68R05. Key words and phrases. order ideal polytope, border bases, Gröbner bases, combinatorial optimization. Research partially supported by German Research Foundation (DFG) funded SFB 805, Hungarian Scientific Research Fund, grant No. K 67928, NSF grants CMMI-1333789 and CCF-1415496. 1 A POLYHEDRAL CHARACTERIZATION OF BORDER BASES 2 The advantage of border bases over Gröbner bases partly arises from the iterative generation of linear syzygies, inherent in the border basis algorithm, which allows for successively approximating the basis of interest degree-by-degree, which leads to an implied notion of approximability. Moreover, many border basis algorithms (and also Gröbner basis algorithms) are essentially linear algebra algorithms, allowing for fast computation. However arguably the most important difference between a Gröbner basis and a border basis is that the former is computed with respect to a term ordering (the aforementioned ordering on the monomials) and the latter is computed with respect to a so-called order ideal, which for now can be thought of as a generalization of a term ordering (and not an ideal in the usual sense). An order ideal that supports a border basis, i.e., for which one can compute a border basis is called admissible. It is well known that every reduced Gröbner basis can be extended to a border basis (see [35, p. 281ff]), i.e., every term ordering gives rise to an admissible order ideal. At the same time, not every border basis is an extension of a Gröbner basis, since the former form a strictly larger set giving potential extra freedom in modeling solution sets to polynomial systems. For a given zero-dimensional ideal I of a polynomial ring R, the size of an order ideal that supports a border basis is predetermined as the dimension of the vector space R/I. This is only a necessary condition though and not every order ideal O of size equal to the dimension of R/I supports a border basis. An example illustrating these two cases is presented in [35, Example 6]. Finally, border bases deform more smoothly in the input [40] (see also [49]), which is particularly helpful when the coefficients arise from measurement data [1, 29], e.g., that is why border bases are used in the context of total-least-squares polynomial regression (see [29] for details). 1.1. Arbitrary order ideals. While the above examples highlight the advantages of border bases for certain types of computations, so far we have not answered a key question: why it is desirable and important to be able to compute border bases with respect to general order ideals (i.e., those that do not necessarily stem from a term ordering). We offer three different perspectives. First, it is desirable to obtain a complete characterization of all border bases supporting order ideals. In particular, our characterization can be used to rule out certain types of order ideals and provides a proof (a dual certificate) for their non-existence via the associated violated inequality: in complexity-theoretic terms, we provide certificates for the non-membership problem. Second, choosing a different order ideal might significantly reduce computational time to obtain a border basis. This aspect is well known and often exploited in the context of Gröbner bases. However, arguably the most important aspect from the perspective of actually solving polynomial system is variable selection. Often the polynomial system of interest stems from e.g., a physical system and the variables correspond to actual physical quantities and hence have explanatory power. Now, it can be very desirable to obtain a polynomial description of the solution set of the system using specific monomials or variables to allow for actual real-world interpretation of the solutions. At the same time the ideal structure might preclude a description with all desired variables or monomials contained in the order ideal. We end up with an optimization problem of finding an order ideal, which matches our preferences as well as possible. Optimization problems of this type are referred to as variable selection or feature selection (see e.g, [31]) and are ubiquitous in many data related disciplines, such as e.g., statistics, machine learning, and more broadly data analytics, where we effectively seek an explanation of a phenomenon in specified explanatory variables. In our context this naturally leads to the Maximum weight admissible order ideal problem, where we specify weights for each monomial and we search a maximal weight order ideal supporting a border basis of a given zero-dimensional ideal I. Order ideals and determining those with maximum weight do appear in a very natural way in combinatorial optimization as the so called maximum weight closure problem (a simplified version of our Maximum weight admissible order ideal problem, cf. e.g., [47]) and they have a variety of applications, e.g., in open-pit mining where any feasible production plan is indeed an order ideal; A POLYHEDRAL CHARACTERIZATION OF BORDER BASES 3 we refer the interested reader to [30] for an overview. Another example is the approximate vanishing ideal algorithm in [29], which computes a polynomial description of an approximate vanishing ideal of a given set of (noisy) points. Effectively, a total-least-squares optimization problem is solved here and explanatory variables can come from an order ideal. If the points stem from actual (physical) measurements, choosing the variables in the order ideal can help recover important physical relations. Other, more involved applications might arise, e.g., in computational biology where the structure of a boolean network is inferred from the Gröbner fan. It has been an open question to characterize the admissible order ideals of a zero-dimensional ideal. We provide a polyhedral relaxation of all admissible order ideals of a given zero-dimensional ideal that support a border basis. This is the best we can hope for given that the separation problem for the polytope is NP-hard as we will see in Section 5. Moreover, we will also establish that in general the convex hull of all order ideals of a given ideal can require a superpolynomial number of inequalities in any linear programming formulation, i.e., that the polytope arising from the convex hull has superpolynomial extension complexity. Many of the results that we present later are the border bases analogs of their counterpart for Gröbner bases in [46]. 1.2. Computing border bases. The border basis algorithm in [35], which is a specification of Mourrain’s generic algorithm [43], allows for computing border bases of zero-dimensional ideals for order ideals supported by a degree-compatible term ordering. However, this border basis algorithm does not allow for the computation of a border basis for more general order ideals (in fact it requires a degree-compatible term ordering). The alternative algorithm presented in [35, Proposition 5] which can potentially compute arbitrary border bases requires the a priori knowledge of the order ideal that might support a border basis. So while in principle the algorithm can compute arbitrary border bases, the supporting order ideal has to be part of the input. Thus it does not characterize order ideals for which a border basis does exist. Further, as pointed out in [35, p. 284], the basis transformation approach of this algorithm is unsatisfactory as it significantly relies on Gröbner basis computations. Another interesting approach for the computation of normal forms that do not require degree-compatible term orderings is [44, 45], however here a fixpoint scheme is required. 1.3. Applications of border bases. Surprisingly, it turns out that there are deep connections to other mathematical disciplines and border bases represent the combinatorial structure of the ideal under consideration in a canonical way. Although the use of border basis as a concise framework is quite recent (see e.g., [34–36]), the concept of border bases and in particular the border basis algorithm is rather old and has been reinvented in different fields of mathematics including computer algebra, discrete optimization, logic, and cryptography under different names. In summary, border bases have been successfully used for solving zero-dimensional systems of polynomial equations (see, e.g., [8, 42, 43]), which in particular include those with 0/1 solutions and thus a large variety of combinatorial problems. Polynomial method. Polynomial systems have been used in discrete mathematics and combinatorial optimization to formulate combinatorial problems such as the graph coloring problem, the stable set problem, and the matching problem (we refer the interested reader to [22]) as well as to recognize graph properties [24]. This well-known method, which Alon referred to as the polynomial method [3, 4] recently regained strong interest and emphasizes the alternative view of border bases algorithms in their various incarnations as proof systems which successively uncovers hidden information by making it explicit. In [23, Section 2.3] and [21, 22, 25] infeasibility of certain combinatorial problems, e.g., 3-colorability of graphs is established using Hilbert’s Nullstellensatz and the algorithm NulLA is provided to establish infeasibility by using a linear relaxation. The core of the algorithm is identical to the L-stable span procedure used in the border basis algorithm in [35], which intimately links both procedures. The difference is of a technical but important A POLYHEDRAL CHARACTERIZATION OF BORDER BASES 4 nature: whereas NulLA establishes infeasibility, the border basis algorithm as presented in [35] computes the actual border bases of the ideal. Another recent link between border bases and the Sherali–Adams closure [51] is that the Sherali–Adams procedure can be understood as a weaker version of the L-stable span procedure, see [48]. Recently, border bases have also been used to obtain a hierarchy of relaxations for polynomial optimization problems [14]. Border bases and cryptography. Border bases have also been used to solve sparse quadratic systems of equations thus giving rise to applications in cryptography in a natural way. Such systems arise from crypto systems (such as e.g., AES, BES, HFE, DES, CTC variants) when rewriting the S-boxes as polynomial equations. The celebrated XL, XSL, MutantXL attacks (see e.g., [17, 41]) are equivalent to the reformulation-linearization-technique (RLT) of Sherali and Adams [51] and use a version of the Nullstellensatz to break ciphers. Motivated by the success of the aforementioned methods, border bases have also been used in cryptanalysis and coding theory, see [9]. Border bases and numerical computations. Another core application of border bases is the modeling of dynamic systems from measured data (see e.g., [1, 29, 37]) where better numerical stability is advantageous. The obtained solutions via border bases often provide a better generalization, i.e., explain new phenomena better, than the respective Gröbner basis analog. Our contribution. Our contribution is the following: Polyhedral characterization of all border bases. We provide a complete, polyhedral characterization of all border bases of any zero-dimensional ideal I. We associate an order ideal polytope P to I whose integral points are in one-to-one correspondence with order ideals supporting a border basis of I (Theorem 3.2). This explicitly establishes the link between the combinatorial structure of the basis of the factor space and the structure of the ideal: whether an order ideal supports a border basis is solely determined by the combinatorial structure of the order ideal polytope. A related result for Gröbner bases of the vanishing ideal of generic points was established in [46], where it was shown that distinct reduced Gröbner bases of the vanishing ideal are in bijection with the vertices of the corner cut polyhedron. Computing maximum weight order ideals. We will show that computing a maximum weight order ideal supporting a border basis, i.e., solving the variable selection problem, is NP-hard in general (Theorem 5.1). This is surprising as we merely ask for a basis transformation. In particular, the NP-hardness does not stem from the hardness of computing the L-stabilized span, as the problem remains NP-hard, even in cases where the L-stabilized span is small enough to be determined efficiently as shown in our reduction in Section 5.2. In particular, unless NP = coNP, the convex hull of characteristic vectors of order ideals cannot have an efficient linear programming formulation. In Section 5.3, we complement this result and show that there exists zero-dimensional ideals so that any linear programming formulation capturing their admissible order ideals requires a subexponential number of inequalities, irrespective of NP vs. coNP; in the language of extended formulations, we show that the convex hull of admissible order ideals has subexponential extension complexity. We discuss implications of this in Section 5.4. Computing arbitrary border bases. We extend the border basis algorithm in [35] to compute border bases for arbitrary order ideals using the order ideal polytope (Algorithm 4.1), where the order ideals are given implicitly by a preference vector. (Note that every admissible order ideal can be obtained by choosing a suitable preference vector.) We would like to point out that algorithms for general bases of quotient spaces have been proposed in [44, 45]). However these algorithms are markedly different in relying on some fix point scheme, so that the advantage of the degree-bydegree iterations are lost. We refer the reader to the discussion in [33]. A POLYHEDRAL CHARACTERIZATION OF BORDER BASES 5 Computational feasibility. We provide computational tests that demonstrate the feasibility of our method. Having the order ideal polytope available for a zero-dimensional ideal I, it is possible to examine the structure of the ideal based on its border bases. To demonstrate feasibility, we consider the straightforward application of counting the number of border bases for a zero-dimensional ideal I, which we present as an example in Section 6 for counting degree-compatible order ideals. Subsequent work. Following our work [11, 12] several related results have been obtained. In [6] it was shown that the border basis detection problem is NP-hard (see also [5]). Moreover, an algorithm for computing border bases without term orderings has been given in [33]. Outline. We start with the necessary preliminaries in Section 2 and recall the border basis algorithm from [35] in Section 2.2. In Section 3 we introduce the order ideal polytope and establish the one-to-one correspondence between the integral points of this polytope and border bases. We also derive an equivalent characterization that is better suited for actual computations. In Section 4 we then use the results from Section 3 to obtain the generalized border basis algorithm for arbitrary order ideals. We then study the complexity of the Maximum weight admissible order ideal problem establishing NP-hardness and a subexponential lower bound on its polyhedral complexity in Section 5. We conclude with computational results in Section 6 and with a summary in Section 7. 2. Preliminaries We consider a polynomial ring K [X ] over the field K with variables X = { x1 , . . . , xn }. Let T n := {∏ i xiki | ki ∈ N } be the set of terms, i.e., the set of all monomials. Recall that the (total) degree of a monomial m = ∏i xiki is deg m = ∑i ki . For any d ∈ N we let T n≤d := {m ∈ T n | deg m ≤ d} be the set of monomials of total degree at most d. Sometimes we will refer to a subset of monomials L as the computational universe, to which the actual computation is confined. For a polynomial p = 6= 0} and similarly, ∑m∈Tn am m ∈ K [X ] we define the support of p to be supp( p) := {m ∈ T n | am S for a set of polynomials P ⊆ K [X ] we define the support of P to be supp( P) := p∈ P supp( p). Given a (total) ordering σ on T n , the leading term LTσ ( p) := m of the polynomial p is the largest element m of supp( p) in the ordering σ, and the leading coefficient LCσ ( p) = am of p is the coefficient of LTσ ( p). We drop the index σ if the ordering is clear from the context. Recall that a term ordering is a total ordering σ on T n with m1 ≤ m2 for all pair of monomials m1 , m2 with m1 | m2 . Monomial orderings are used for Gröbner basis computations, but here we allow more general orderings. The leading form LF( p) of a polynomial p = ∑m∈Tn am m ∈ K [X ] is defined to be LF( p) = ∑m:deg m=deg p am m, i.e., we single out the part with maximum degree. (The leading form does not depend on an ordering.) Both LF and LT generalize to sets in the obvious way, i.e., for a set of polynomials P we define LF( P) := {LF( p) | p ∈ P} and LT( P) := {LT( p) | p ∈ P}. In the following we will frequently switch between considering polynomials M, the generated ideal, and the generated vector space whose coordinates are indexed by the monomials in the support of M. We denote the ideal generated by M as h M iK[X] and the vector space generated by M as h M iK . For n ∈ N we define [n] := {1, . . . , n}. All other notation is standard as to be found in [18, 38]; we have chosen the border basis specific notation to be similar to the one in [35]; see also [39] for a broader exposition. 2.1. Order ideals. Central to our discussion will be the notion of an order ideal, which is not an ideal, but a set of monomials closed under taking (monomial) factors: Definition 2.1. Let O be a finite subset of T n . If for all m ∈ O and m′ ∈ T n such that m′ | m we have m′ ∈ O , i.e., O is closed under factors, then we call O an order ideal. Furthermore, the border ∂O of a non-empty order ideal O is the set of monomials ∂O := { x j m | j ∈ [n], m ∈ O} \ O . As an exception, we set ∂∅ := {1} for the empty order ideal. A POLYHEDRAL CHARACTERIZATION OF BORDER BASES 6 Examples of order ideals are {1}, {1, x1 , . . . , x1k }, and {1, x1 , x12 , x1 x2 , x2 }. Recall that an ideal I ⊆ K [X ] is zero-dimensional, if and only if K [X ]/I is finite dimensional. The O -border basis of a zero-dimensional ideal I is a special set of polynomials: Definition 2.2. Let O = {m1 , . . . , mµ } be an order ideal with border ∂O = {b1 , . . . , bν }. Further let I ⊆ K [X ] be a zero-dimensional ideal, and G = { g1 , . . . , gν } ⊆ I be a (finite) set of polynomials. Then the set G is an O -border basis of I if: µ (1) the polynomials in G have the form gj = b j − ∑i=1 αij mi for j ∈ [ν] and αij ∈ K; (2) K [X ] = I ⊕ hOiK as vector spaces. If there exists an O -border basis of I then the order ideal O supports a border basis of I, equivalently, O is admissible for I. Let Λ( I ) denote the set of admissible order ideals of I. Note that any border basis G of an ideal I is actually generating I as an ideal, i.e. hGiK[X] = I. A proof of this fact can be found in [36, Proposition 4.3.2]; for the sake of completeness we provide an alternative proof here. Let us consider the subspace hGiK[X] + hOiK spanned by the ideal hGi K[X] generated by G and the order ideal O . This subspace is closed under multiplication by the xi , and hence it is an ideal. As it contains  1 (being contained in either G or O ), it must be the whole ring,  and hence I = hGiK[X] + hOiK ∩ I = hGiK[X] + (hOi K ∩ I ) = hGiK[X] by the modular law. Recall that the modular law states ( A + B) ∩ C = A + ( B ∩ C ) for all subspaces A, B, C of a vector space with A ⊆ C. In particular, an order ideal O supports an O -border basis of I if and only if K [X ] = I ⊕ hOiK . Moreover, for any given order ideal O and ideal I the O -border basis of I is unique as b j has a unique representation in K [X ] = I ⊕ hOi K for all j ∈ [ν]. Furthermore, as K [X ] = I ⊕ hOiK it follows that |O| = dim hOiK is invariant for all choices of O . The requirement for I being zero-dimensional is necessary to ensure finiteness of the order ideal O and its border ∂O . Example 2.3 (Order ideals from Gröbner bases). A common way to obtain an admissible order ideal O for a zero-dimensional ideal I is to compute the Gröbner basis G = { g1 , . . . , gν } ⊆ K [X ] of I with an arbitrary term ordering σ, and let O := {m ∈ T | ∀ j : LTσ ( gj ) ∤ m} consists of all monomials m not divisible by any leading term in the Gröbner basis. As a concrete example, Tables 1 and 2 list every admissible order ideal of the following ideals over K [ x1 , x2 ], indicating a term ordering providing them if any (the ground field K can be any field): (2.1) (2.2) I1 := x1 x2 − x1 − x2 + 1, x22 + x1 − 1 I2 := x12 − x1 x2 , x22 − K [X ] x1 x2 , T2=3 K[X] We enumerate the order ideals of Ii as Oi,1 , Oi,2 , . . . with the first index identifying the ideal Ii . We leave it to the reader to verify that there is no further admissible order ideal for I1 and I2 . (For I1 , Figure 3.1 showing linear dependence relations between monomials in K [ x1 , x2 ]/I1 should be helpful.) In the case of I2 the last admissible order ideal {1, x1 , x2 , x1 x2 } does not come from any term ordering, as we will show now. First note that this order ideal is indeed admissible: a basis of K [ x1 , x2 ]/I2 is given by the image of the admissible order ideal O2,2 = {1, x1 , x2 , x12 }. As x12 − x1 x2 ∈ I2 , the image of x12 is the same as the image of x1 x2 , thus the image of O2.3 = {1, x1 , x2 , x1 x2 } coincides with that of O2,2 , and hence it is a basis of K [ x1 , x2 ]/I2 . In particular, K [ x1 , x2 ] = I2 ⊕ hO2,3 iK holds, showing the admissibility of O2,3 . If O2,3 came from a Gröbner basis G for a term ordering with x1 > x2 , then G would contain a g ∈ G whose leading term divides the leading term x1 x2 of x1 x2 − x22 ∈ I, and therefore LTσ ( g) ∈ O2,3 , a contradiction. The argument is similar for term orderings with x1 < x2 . A POLYHEDRAL CHARACTERIZATION OF BORDER BASES Term ordering Gröbner basis Admissible order ideal lex x1 + x22 − 1, x23 − x22 O1,1 = {1, x2 , x22 } degrevlex x12 − x1 , x1 x2 − x1 − x2 + 1, x22 + x1 − 1 O1,2 = {1, x1 , x2 } Table 1. All admissible order ideals of I1 = x1 x2 − x1 − x2 + 1, x22 + x1 − 1 x1 > x2 in both term orderings. Term ordering Gröbner basis lex or degrevlex (x1 > x2 ) x12 − x1 x2 , x1 x2 − x22 , x23 lex or degrevlex (x2 > x1 ) x22 − x1 x2 , x1 x2 − x12 , x13 none — 7 Border basis x1 + x22 − 1, x1 x2 + x22 − x2 , x1 x22 , x23 − x22 x1 x2 − x1 − x2 + 1, x12 − x1 , x22 + x1 − 1 K [X ] over K [ x1 , x2 ]. Here Admissible order ideal Border basis x12 − x22 , 2 x1 x2 − x22 , O2,1 = {1, x1 , x2 , x2 } x1 x22 , x23 x22 − x12 , 2 O2,2 = {1, x1 , x2 , x1 } x1 x2 − x12 , x12 x2 , x13 x12 − x1 x2 , O2.3 = {1, x1 , x2 , x1 x2 } x22 − x1 x2 , x12 x2 , x1 x22 Table 2. All admissible order ideals of I2 = x12 − x1 x2 , x22 − x1 x2 , T2=3 K [X ] over the ring K [ x1 , x2 ]. Clearly, as a vector space, every ideal I has a degree filtration I = i∈N I ≤i where I ≤i := { p ∈ I | deg( p) ≤ i }. For a set of monomials O we define O =i := {m ∈ O | deg(m) = i }, and similarly O ≤i := {m ∈ O | deg(m) ≤ i}. In the following we will also consider the special class of order ideals preserving the degree filtration, which are called degree-compatible: S Definition 2.4. Let I ⊆ K [X ] be a zero-dimensional ideal and let O ⊆ T n be an order ideal. Then O is degree-compatible (to I) if |O =i | = |T n=i | − dim (2.3) I ≤i I ≤ i−1 for all i ∈ N. Thus, the O -border basis of a zero-dimensional ideal I with respect to any degree-compatible order ideal O has a pre-determined size for each degree i ∈ N. Intuitively, the degree-compatible order ideals are those that correspond to degree-compatible orderings on the monomials. The important difference is that the orderings do not have to be term orderings. The definition above only requires local compatibility with multiplication if O is a degree-compatible order ideal and thus downwardly closed, i.e., if p, q are polynomials and deg( p) < deg(q) then p ≤ q. Not all order ideals are degree-compatible as we will see in the following two examples. Example 2.5 (Degree-compatible order ideals). For finding degree-compatible ideals, particularly suitable term orderings are the degree-compatible ones, like deglex and degrevlex, where m1 > m2 for all monomials m1 , m2 with deg(m1 ) > deg(m2 ). Using the Gröbner basis G of an ideal I under a degree-compatible term ordering, the low-degree parts I ≤i of I can be easily determined using the elements of G of degree at most i, leading to the formula dim I ≤i I ≤ i−1 = |{m ∈ T n=i : ∃ g ∈ G : LTσ ( g) | m}|, A POLYHEDRAL CHARACTERIZATION OF BORDER BASES 8 from which (2.3) easily follows for the order ideal O coming from G , i.e., admissible order ideals coming from a degree-compatible term ordering are degree-compatible. Now it is easy to check that in Example 2.3, all the admissible order ideals are degree-compatible except O1,1 = {1, x2 , x22 } for I1 = x1 x2 − x2 − x1 + 1, x22 + x1 − 1 K[X] . Example 2.6 (Generic ideal). Let k and n be positive integers and let {aij }i∈[n],j∈[k] be algebraically independent real numbers over Q. Let I be the ideal of polynomials in the variables x1 , . . . , xn which are zero on the points ( a1j , . . . , anj ) for j ∈ [k], i.e., it is the vanishing ideal of those points. Thus, the ideal is zero-dimensional, and K [X ]/I has dimension k. Every k distinct monomials form a complementary basis of I, since they are linearly independent on the k points ( a1j , . . . , anj ). An equivalent formulation of linear independence is that the determinant of the matrix formed by the values of the monomials on these points is non-zero. The determinant is indeed non-zero, as it is a non-trivial polynomial of the algebraic independent aij with integer coefficients. In particular, every order ideal of size k is an order ideal of I. The degree-compatible order ideals are the ones where the monomials have the least possible degree, i.e., consisting of all monomials l −1 of degree less than l and in addition k − (n+ l −1 ) monomials of degree l, where l is the smallest l non-negative integer satisfying k ≤ (n+ l ), i.e., there are at least k monomials of degree at most l. 2.2. Computing stable spans. Without proofs, we recall the underlying stable span computation of the border basis algorithm in [35] as it will serve as a basis for our algorithm. The interested reader is referred to [34, 36] for a general introduction to border bases and to [35] in particular for an introduction to the border basis algorithm. The border basis algorithm in [35] calculates border bases of zero-dimensional ideals with respect to an order ideal O which is induced by a degree-compatible term ordering σ by successively generating a vector space approximation of the ideal. These approximations are generated via the following vector space neighborhood extensions: Definition 2.7. (cf. [35, Definition 7.1 and the paragraph preceding Proposition 13]) Let V ⊆ K [X ] be a vector space. We define the neighborhood extension of V to be V + := V + Vx1 + · · · + Vxn . For a finite set W of polynomials, its neighborhood extension is W + = W ∪ Wx1 ∪ · · · ∪ Wxn . + Note that for a given set of polynomials W such that hW iK = V we have hW + iK = hW i+ K = V as multiplication with xi is a K-linear map. It thus suffices to perform the neighborhood extension on a set of generators W of V. Let F be a finite set of polynomials and let L ⊆ T n be an order ideal, representing our computational universe. We would like to compute the ideal generated by F restricted to our universe, i.e., h F iK[X] ∩ h LiK . We are mainly concerned with finite sets L ⊆ T n . Note that F ∩ h LiK = { f ∈ F | supp( f ) ⊆ L}, i.e., F ∩Dh LiKEcontains only those polynomials that lie in the vector space generated by L. Clearly, h F iK ∩ T n≤d extension we define: K d = h F i≤ K . Using neighborhood Definition 2.8. (Cf. [35, Definition 10]) Let L be an order ideal and let F be a finite set of polynomials such that supp( F ) ⊆ L. The set F is L-stabilized if h F + iK ∩ h LiK = h F iK . The L-stable span FL of F is the smallest vector space V containing F satisfying V + ∩ h LiK = V. The basic example of an L-stabilized set is a set of generators for the intersection I ∩ L of an ideal I with L, but not all L-stabilized sets have necessary this form. For example, L itself is L-stabilized A POLYHEDRAL CHARACTERIZATION OF BORDER BASES 9 for any order ideal L. For L = {1, x1 , x2 , x12 x22 , x23 }, the set { x1 + x2 , x12 , x22 , x23 } is L-stabilized, but { x1 + x2 , x12 } is not. The following simple observation will be helpful later. Remark 2.9. The L-stable span of a finite set F depends only on the vector space h F iK spanned by F, as h F + iK = h F i+ K. A straightforward construction of the L-stable span of F is to inductively define the following increasing sequence of vector spaces: F0 := h F iK and Fk+1 := Fk+ ∩ h LiK for k > 0. S The union k≥0 Fk is the L-stable span FL of F. In the following we will explain how the L-stable span can be computed explicitly for L = T n≤d . We will use a modified version of Gaussian elimination as a tool, which allows us to extend a given basis V with a set W as described in the following: Lemma 2.10. [35, Lemma 12] Let V = {v1 , . . . , vr } ⊆ K [X ] \ {0} be a finite set of polynomials such that LT(vi ) 6= LT(v j ) whenever i, j ∈ [r] with i 6= j and LC(vi ) = 1 for all i ∈ [r]. Further let G be a finite set of polynomials. Then Algorithm 2.11 computes a finite set of polynomials W ⊆ K [X ] with (1) LC(w) = 1 for all w ∈ W, (2) LT(u1 ) 6= LT(u2 ) for any distinct u1 , u2 ∈ V ∪ W, and (3) hV ∪ W i K = hV ∪ G iK . (V, W may be empty.) Algorithm 2.11 (Gaussian Elimination for polynomials—GaussEl). Input: V, G finite set of polynomials, 0 ∈ / V (as in Lemma 2.10). Output: W ⊆ K [X ] finite set of polynomials (as in Lemma 2.10). (1) (2) (3) (4) (5) (6) (7) Let H := G and η := 0. If H = ∅ then return W := {vr +1 , . . . , vr +η } and stop. Choose f ∈ H and remove it from H. Let i := 1. If f = 0 then go to step (2). If i > r + η then put η := η + 1 and let vr +η := f / LC( f ). Go to step (2). If LT( f ) = LT(vi ) then replace f with f − LC( f ) · vi . Set i := 1 and go to step (5). Set i := i + 1. Go to step (5). We can now compute the L-stable span using the Gaussian elimination algorithm 2.11: Lemma 2.12. [35, Proposition 13] Let L = T n≤d and F ⊆ K [X ] be a finite set of polynomials supported on L. Then Algorithm 2.13 computes a vector space basis V of FL with pairwise different leading terms. Algorithm 2.13 (L-stable span computation—LStabSpan). Input: F, L as in Lemma 2.12. Output: V as in Lemma 2.12. (1) (2) (3) (4) (5) V := GaussEl(∅, F ). W ′ := GaussEl(V, V + \ V ). W := {w ∈ W ′ | supp(w) ⊆ L} = {w ∈ W ′ | deg(w) ≤ d}. If W 6= ∅ set V := V ∪ W and go to step (2). Return V. The rationale for computing a stable span approximation is due to the following proposition that serves as a criterion for testing whether an order ideal O supports a border basis. A POLYHEDRAL CHARACTERIZATION OF BORDER BASES 10 Proposition 2.14. [35, Proposition 16] Let L be an order ideal. Further let Ĩ be an L-stabilized generating vector subspace of a zero-dimensional ideal I ⊆ K [X ], i.e., Ĩ + ∩ h LiK = Ĩ and Ĩ K[X] = I. If O is an order ideal such that h LiK = Ĩ ⊕ hOiK and ∂O ⊆ L then O supports a border basis of I. We obtain the following corollary, which will be helpful later. D E D E Corollary 2.15. Let Ĩ be an T n≤d -stabilized vector space satisfying Ĩ + T n≤d−1 = T n≤d . Then K K D E . D E . n n ∼ Ĩ K[X] ∩ T ≤d = Ĩ and K [X ] Ĩ K[X] = T ≤d Ĩ . K K Proof. We apply Proposition 2.14 with the choice L := T n≤d , I := Ĩ K[X] and O := T n≤d \ LT( Ĩ ) where the leading terms are withDrespect E to any degree-compatible ordering D (i.e., mE1 < mD2 whenE n ever deg m1 < deg m2 ). Clearly, T ≤d = Ĩ ⊕ hOiK . The condition Ĩ + T n≤d−1 = T n≤d K K K ensures that O consists of monomials of degree less than d, so ∂O ⊆ T n≤d . Hence the propoD E sition applies, and we obtain K [X ] = I ⊕ hOi K . Together with T n≤d = Ĩ ⊕ hOiK this gives K D E . D E . I ∩ T n≤d = Ĩ, and K [X ] Ĩ K[X] ∼ Ĩ .  = T n≤d = hOiK ∼ K K For a worst-case upper bound on d, we will use the dimension of K [X ]/I. The necessary technical background is the following lemma. Lemma 2.16. Let I be a zero-dimensional ideal of K [X ], and let d := dim K [X ]/I. Then  T n=d K and (1) I ≤d I ≤d−1 ∼ D E .= (2) T n≤d−1 I ≤ d −1 ∼ = K [X ]/I. K Proof. Choose a degree-compatible term ordering. The associated order ideal D E (as every order ideal of size d) contains monomials of degree less than d. This proves I + T n≤d−1 = K [X ], from which the statements easily follow via the modular law (( A + B) ∩ C = A + ( B ∩ C ) for all subspaces with A ⊆ C).  K 3. The order ideal polytope We will now introduce the order ideal polytope P( I ) that characterizes all admissible order ideals, i.e., order ideals supporting a border basis for a given zero-dimensional ideal I, in an abstract fashion completely independent of the stable span approximation. Its role will be crucial for the later computation of border bases for general order ideals. We will first focus on its properties and structure, then in Section 3.2, we will consider the computational aspect. We will show that the integral points of the order ideal polytope P( I ) are in bijection with the admissible order ideals of a given zero-dimensional ideal I. In order to do so, we approach the problem from a polyhedral point of view to capture the intrinsic combinatorics for the admissibility condition K [X ] = I ⊕ hOi K on the one hand and O being an order ideal on the other hand. The role of the polyhedral description becomes prominent in Section 3.2 when the directness of the sum I ⊕ hOiK is rephrased in the language of matrices and vector space bases. 3.1. Theoretical point of view. We start with defining the order ideal polytope whose integral solutions are exactly the characteristic vectors of order ideals admissible for a fixed zero dimensional ideal I. As we will see, the defining inequalities express various properties of admissible order ideals. A POLYHEDRAL CHARACTERIZATION OF BORDER BASES 11 Definition 3.1. Let I be a zero-dimensional ideal. Its order ideal polytope P( I ) is defined  by the following system of inequalities with variables zm for m ∈ T n≤d−1 , where d := dim K [X ] I . (3.1b) ∀m1 , m2 ∈ T n≤d−1 : m1 | m2 zm1 ≥ zm2 (3.1a) ∑ zm = d m ∈T n≤d −1 (3.1c) ∑ m ∈U (3.1d) ∀U ⊆ T n≤d−1 : |U | = d  zm ≤ dim hU ∪ I iK I ∀m ∈ T n≤d−1. zm ∈ [0, 1] To obtain a finite dimensional polytope, we bounded the degree of the monomials by dim K [X ]/I from above. This bound is large enough to contain all occurring monomials as we will see below. In a first step we relate the order ideal polytope with admissible order ideals. Recall that Λ( I ) denotes the set of admissible order ideals, i.e., order ideals supporting a border basis of a zero-dimensional ideal I. Theorem 3.2. Let I be a zero-dimensional ideal. There is an explicit bijection ξ between the set Λ( I ) of admissible order ideals of I and the set of integral points of the order ideal polytope P( I ) of I. The bijection is given by n ξ : P( I ) ∩ {0, 1}T≤d−1 → Λ( I ) ξ (z) = O(z) := {m ∈ T n≤d−1 | zm = 1}. n Proof. We show that the domain P( I ) ∩ {0, 1}T≤d−1 of ξ is exactly the set of characteristic vectors of all order ideals O ⊆ T n≤d−1 admissible for I. It will immediately follow that ξ is a well-defined bijection onto Λ( I )≤d−1 , the set of admissible order ideals of I with all monomials having degree less than d. Actually, this is the set of all admissible order ideals of I, as every admissible order ideal O of I has size the dimension d of the factor K [X ]/I, and hence can only contain monomials up to degree d − 1. n Let z ∈ {0, 1}T≤d−1 be a 0/1 vector. It is the characteristic vector of the set O(z) := {m ∈ T n≤d−1 | zm = 1}. Recall that the set O(z) is an admissible order ideal of I if and only if the following hold: (1) O(z) is an order ideal, i.e., m2 ∈ O(z) implies m1 ∈ O(z) for all monomials m1 and m2 with m1 | m2 . (2) |O(z)| = d. (3) The image of O(z) in K [X ]/I is linearly independent. The last two conditions together are clearly an equivalent formulation of K [X ] = hO(z)iK ⊕ I, using that O(z) is a set of linearly independent elements in K [X ]. Now we rewrite these conditions for the characteristic vector z. Condition (1) for fixed monomials m1 | m2 is obviously equivalent to zm1 ≥ zm2 . Therefore Condition (1) is equivalent to (3.1a). Similarly, as ∑m∈Tn≤d−1 zm = |O(z)|, Condition (2) is equivalent to (3.1b). As of Condition (3), we first give a more complex but equivalent formulation:  (3.2) for all U ⊆ T n≤d−1 with |U | = d. |U ∩ O(z)| ≤ dim hU ∪ I iK I , i.e., the size of U ∩ O(z) is at most the dimension of the vector space generated by the image of U in the factor K [X ]/I. This is obviously necessary for the image of O(z) to be linearly independent  in the factor, as then the image of U ∩ O(z) is independent, and contained in hU ∪ I iK I . (For necessity, the size of U does not matter.) For sufficiency choose U := O(z), showing that the image of O(z) spans a subspace of K [X ]/I of size at least that of O(z), i.e., that the image of O(z) is linearly independent. Thus Condition (3) is equivalent to (3.2), which is (3.1c) using |U ∩ O(z)| = ∑m∈U zm . A POLYHEDRAL CHARACTERIZATION OF BORDER BASES 12 n All in all, a 0/1 vector z ∈ {0, 1}T≤d−1 is the characteristic vector of an order ideal admissible n for I if and only if it satisfies (3.1a), (3.1b) and (3.1c). In other words, P( I ) ∩ {0, 1}T≤d−1 is the set of characteristic vectors of order ideals O ⊆ T n≤d−1 admissible to I, as claimed. (The remaining inequalities (3.1d) of P( I ) are satisfied by all 0/1 vectors.)  Example 3.3 (Order ideal polytope). As an easy example we determine the order ideal polytope P( I2 ) of the ideal I2 = x12 − x1 x2 , x22 − x1 x2 , T2=3 K[X] from Example 2.3. First we derive several valid inequalities for P( I2 ) in order to obtain a simple description. Recall that K [ x1 , x2 ]/I2 has dimension d = 4, so the coordinates of the polytope are indexed by monomials up to degree 3. As the ideal I contains T2=3 , by (3.1c) applied to U = T2=3 , which consists of exactly 4 monomials, ∑ (3.3) zm ≤ 0. m ∈T2=3 Together with zm ≥ 0 for all m, this implies zm = 0, whenever deg m = 3. Hence from now on we can omit variables indexed by degree-three monomials as they are 0. Now we apply (3.1c) again, but this time for U = T2=2 ∪ { x13 } (the role of the monomial x13 is simply to pad U ensuring that U has 4 elements) and derive zx2 + zx1 x2 + zx2 ≤ 1. 2 1 Together with z1 + z x1 + z x2 + z x 2 + z x1 x2 + z x 2 = 4 2 1 by (3.1b) and zm ≤ 1 for all m ∈ T2≤1 by (3.1d), we obtain z1 = zx1 = zx2 = 1, zx2 + zx1 x2 + zx2 = 1. 2 1 All in all, the polytope P( I2 ) satisfies the following inequalities: zm = 0, z1 = zx1 = zx2 = 1, zx2 + zx1 x2 + zx2 = 1, whenever deg m = 3, 2 1 zx2 , zx1 x2 , zx2 ≥ 0. 2 1 This system defines a triangle with the following vertices and gives rise to the order ideals O2,2 = {1, x1 , x2 , x12 }, O2,3 = {1, x1 , x2 , x1 x2 }, and O2,1 = {1, x1 , x2 , x22 }: [characteristic vector of O2,2 ] • ( z x 2 = 1, z x1 x2 = 0, z x 2 = 0) 2 1 [characteristic vector of O2,3 ] • ( z x 2 = 0, z x1 x2 = 1, z x 2 = 0) 2 1 [characteristic vector of O2,1 ] • ( z x 2 = 0, z x1 x2 = 0, z x 2 = 1) 1 2 We conclude that the P( I2 ) is the triangle with vertices the characteristic vectors of the admissible order ideals of I2 , listed in Table 2. Example 3.4 (A non-integral order ideal polytope). In contrast to P( I2 ) of the previous example, the order ideal polytope P( I1 ) of I1 from Example 2.3 is not the convex hull of the characteristic vectors of the admissible order ideals of I1 but a proper relaxation, i.e., P( I1 ) is more than the line segment of O1,1 and O1,2 . A point of P( I1 ) lying outside this segment is the one with all its coordinates being 1/2: (3.4) z1 = zx1 = zx2 = zx2 = zx1 x2 = zx2 = 1/2. 1 2 A POLYHEDRAL CHARACTERIZATION OF BORDER BASES 13 1 x1 = x12 x2 x1 x2 x22 Figure 3.1. Linear dependence relations between low-degree monomials in the factor K [ x1 , x2 ] /I1 of dimension 3. The monomials are depicted in the projective space of the factor, to save a dimension. Recall that K [ x1 , x2 ]/I1 has dimension 3. This point satisfies the system (3.1), from which only (3.1c) requires explanation. For computing the right-hand side of (3.1c), the key is to determine the linear dependence relations between the monomials of degree at most 2 in the factor space K [ x1 , x2 ]/I1 . These can be easily read off from Figure 3.1 depicting the projective space of the factor K [ x1 , x2 ]/I1 , which has dimension 2. To verify the figure, note that O1,1 = {1, x2 , x22 } is a basis of the factor, and hence forms a triangle in the projective space. As x1 + x22 − 1, x12 − x1 , x1 x2 + x22 − x2 are all elements of I1 , we immediately see that x1 x2 is a third point on the line joining x2 and x22 , and x1 is a third point on the line of 1 and x22 , while x12 is the same point as x1 . Now from Figure 3.1 it is immediate that any subset U ⊆ T2≤2 of size 3 has dimension at least 2 in K [ x1 , x2 ]/I1 . Therefore the right-hand side of (3.1c), is at least 2, while the left-hand side is exactly 3/2, and therefore the inequality holds as claimed. Remark 3.5. Adding to (3.1) the equality z1 = 1 and requiring (3.1c) for all U ⊆ T n≤d−1 would still be insufficient to describe the convex hull of admissible order polytopes of I1 : the following point still lies outside the convex hull while satisfying even the additional constraints: (3.5) z0 = 1, zx1 = zx2 = zx2 = zx1 x2 = zx2 = 2/5. 1 2 3.2. Computational point of view. From a computational perspective, the system (3.1) defining  the order ideal polytope contains dimensions dim hU ∪ I iK I , which are computationally challenging to determine. Therefore in this subsection we provide a modified description of the order ideal polytope, well suited for computations. Let M ⊆ K [X ] be a finite set of polynomials, and let M =i denote the set of polynomials in M with total degree i. We would like to have M to be a vector space basis of I ≤d reflecting the degree filtration of I. The following definition will be helpful. Definition 3.6. Let M be a finite set of non-zero polynomials of degree at most ℓ for some ℓ ∈ N. Then M is in canonical form if the leading term of any element of M does not occur in the other elements. Here the ordering on monomials can be any degree-compatible (total) ordering (i.e., m1 < m2 for all monomials m1 , m2 with deg m1 < deg m2 ), and need not be a term ordering. Clearly, any vector space basis can be brought into canonical form via Gaussian elimination. The coefficient n matrix A ∈ K M×T≤ℓ of M is the matrix where the rows are indexed by the elements of M, and the columns are indexed by the monomials of degree at most ℓ, and the entries are the coefficients of the monomials in the elements of M. In other words, A f ,m = am for f = ∑m∈Tn≤ℓ am m ∈ M. A visual interpretation of a set M in canonical form can be found in Figure 3.2 using the coefficient matrix. The following lemma summarizes the required properties of a generating set M of an ideal I sufficient to describe the degree filtration of I ≤d . A POLYHEDRAL CHARACTERIZATION OF BORDER BASES 0 ⋆ .. ..  . .   1 ⋆  0  0   ..  . 0  A= 0      0   ..  . 0  1 0 ⋆ .. . 0 ⋆ 1 0 ⋆ .. .. . . 0 1 ⋆ 0 .. 0 0 .. . 0 . 14 ⋆ .. . ⋆ ⋆ .. . ⋆          0        1 0 ⋆  ..  .. . .  0 1 ⋆ Figure 3.2. Coefficient matrix of a set of polynomials in canonical form. Double lines separate samedegree blocks of monomials. D E Lemma 3.7. Let M be in canonical form and T n≤d -stabilized. Further assume T n=d ⊆ h M iK + T n≤d−1 . Then the following hold for all i ∈ [d]: . i ≤ i−1 =i (1) A basis for h M i≤ K [X ] h M iK [X ] is the image of M . DS E i =j (2) h M i≤ j≤ i M K [X ] = K DS E <i <i = i =j (3) M K = 0 and thus M =i K ⊆ 0≤ j ≤ i − 1 M K K <i Proof. We first show that M =i K = 0 for all i ∈ [d]. Let i ∈ [d] be arbitrary and observe that each nonzero element p ∈ M =i has degree i. As M is in canonical form, the polynomials in M =i are interreduced (see the matrix in Figure 3.2 for Definition 3.6) and thus each nonzero element p ∈ M =i K has degree i. i ≤i By Corollary 2.15, we have h M iK[X] ∩ h LiK = h M iK . Hence h M i≤ K [X ] = h M i K for i ∈ [d]. Now the statements of the lemma are obvious consequences of M being in canonical form.  The following lemma provides us a practical way to compute the sizes of the degree components of degree-compatible order ideals, which are the same for all order ideals of a given ideal. Lemma 3.8. Let M be in canonical form and T n≤d -stabilized. Further let O be an order ideal of h M iK[X] , and d = maxm∈∂O deg(m). Let us assume T n=d ⊆ h M iK + T n≤d−1 . Then O is degree-compatible if and only if |O =i | = |T n=i | − | M =i | for every i ∈ [d].  Proof. In view of Definition 2.4 it suffices to observe that I ≤i I ≤i−1 has the image of M =i as a basis by Lemma 3.7 (1).  We are ready to provide a reformulation of the definition of order ideal polytopes, which is better suited for actual computations, partly as it involves only direct matrix operations via replacing dimensions with ranks of submatrices. While d will still be the dimension of K [X ]/h M iK[X] , we do not require explicit a priori knowledge, but rather formulate alternative, sufficient conditions, which are easier to verify by an algorithm. A POLYHEDRAL CHARACTERIZATION OF BORDER BASES 15 . d −1 ∼ d Lemma 3.9. Let M be T n≤d -stabilized and in canonical form for some d ∈ N. Suppose h M i≤ h M i≤ = K K T n=d K and d = |T n≤d | − | M |. Then an alternative description of the order ideal polytope P(h M iK[X] ) of h M iK[X] is given by the system of inequalities (3.6b) ∀m1 , m2 ∈ T n≤d−1 : m1 | m2 zm1 ≥ zm2 (3.6a) ∑ zm = d m ∈T n≤d −1 (3.6c) ∑ ∀U ⊆ T n≤d−1 : |U | = | M ≤d−1 | zm ≥ |U | − rk(Ũ ) m ∈U (3.6d) ∀m ∈ T n≤d−1. 0 ≤ zm ≤ 1 In (3.6c), the matrix Ũ is the submatrix of the coefficient matrix of M ≤d−1 consisting of only the columns indexed by monomials in U. Proof. Let I := h M iK[X] . As T n≤d = h M iK + T n≤d−1 by assumption, Lemma 3.7 provides h M iK[X] ∩ D E T n≤d = h M iK . Moreover, K [X ] = h M iK[X] + T n≤d−1, hence via an application of the moduK . . . lar law (h M iK[X] + T n≤d−1 ) h M iK[X] = T n≤d−1 (h M iK[X] ∩ T n≤d−1 ) , we obtain K [X ] h M iK[X] = . . T n≤d−1 M ≤d−1 K . In particular, dim K [X ] h M iK[X] = |T n≤d−1 | − | M ≤d−1 | = d. . As d = dim K [X ] h M iK[X] , the only difference between the systems (3.1) and (3.6) is that (3.1c) is replaced by (3.6c). So we will show their equivalence modulo the other inequalities. We start with (3.6c) for a fixed U ⊆ T n≤d−1 , and make equivalent transformations to it. (For the following argument the size of U is irrelevant.) Taking the difference with the equality (3.6b), we obtain ∑ (3.7) zm ≤ d − |U | + rk(Ũ ). m ∈T n≤d −1 \U Next we rewrite the right-hand side. Recall that Ũ is the submatrix obtained by restricting to the columns corresponding in U, i.e., the coefficient matrix of the image of M ≤d−1 .D to the monomials E in the factor T n≤d−1 T n≤d−1 \ U K . Therefore D M ≤d−1 ∪ (T n≤d−1 \ U ) D E rk(Ũ ) = dim n T ≤ d −1 \ U E K K D E = dim M ≤d−1 ∪ (T n≤d−1 \ U ) − |T n≤d−1 \ U |. K Thus the right-hand side of (3.7) becomes (3.8) D E d − |U | + rk(Ũ ) = d − |U | + dim M ≤d−1 ∪ (T n≤d−1 \ U ) − |T n≤d−1 \ U | K D E = d − |T n≤d−1 | + dim M ≤d−1 ∪ (T n≤d−1 \ U ) K E D D E ≤ d −1 ≤ d −1 n = − dim M + dim M ∪ (T ≤ d −1 \ U ) K K D E D E n ≤ d − 1 n I ∪ (T ≤ d −1 \ U ) M ∪ (T ≤ d −1 \ U ) K K = dim , = dim I h M ≤ d −1 i K A POLYHEDRAL CHARACTERIZATION OF BORDER BASES 16 where the last equality follows via the modular law D  E D  E M ≤d−1 ∪ T n≤d−1 \ U +I M ≤d−1 ∪ T n≤d−1 \ U K E K . =D I n M ≤ d −1 ∪ (T ≤ d −1 \ U ) ∩ I K T n≤d−1 , Therefore for a fixed U ⊆ the inequality (3.6c) is equivalent to (3.1c) with U replaced by its complement T n≤d−1 \ U. The equivalence of (3.6c) and (3.1c) stated for all subsets U follows, noting  that | M ≤d−1 | = |T n≤d−1 | − d, as shown at the beginning of the proof. 4. Computing border bases using the order ideal polytope In the following we explain how Theorem 3.2 can be used to actually compute border bases for general order ideals. We cannot expect to be able to compute a border basis for any order ideal, simply as such a basis does not necessarily exist. As a priori it is unclear which are the admissible order ideals O for an ideal I given by generators, we use an indirect way to specify O : we use a n weight vector w ∈ RT and want to find O ∈ Λ( I ) maximizing the total weight ∑m∈O wm of O . Note that any admissible order ideal O can be specified via an appropriate weight vector w so our approach, while indirect, is without loss of generality. As w is an infinite vector, in practice it should be probably given explicitly for a finite number of coordinates, and the remaining coordinates are declared to be 0 or some other fixed value; this is not a restriction as all admissible order ideals are finite and the occuring maximum degree is bounded. Recall that Λ( I ) denotes the set of all admissible order ideals of I. We will show how to compute such a weight-maximal O and its border basis for a zero-dimensional ideal I ⊆ K [X ]. We adapt the border basis algorithm in [35]. Algorithm 4.1 (Generalized border basis algorithm—BBasis). Input: F a finite generating set of a zero-dimensional ideal, and a weight vector w on T n . Output: G a border basis of the ideal. (1) Let d := max f ∈ F deg( f ). (2) M := LStabSpan( F, T n≤d ) using a degree-compatible ordering on T n≤d (i.e., m1 < m2 whenever deg m1 < deg m2 ). (3) If T n=d * LT( M ) then set d := d + 1 and go to step (2). (4) Set dold := d, d := |T n≤d | − | M |. If d ≤ dold then let M := M ≤d . Otherwise let M := LStabSpan( F, T n≤d ). (5) Write up the system (3.6) of inequalities for M and d. Choose an integral solution z maximizing wz. Set O := {m ∈ T n≤d−1 : zm = 1}. (6) Let G := BasisTransformation( M, O). Our generalized border basis algorithm 4.1 first determines the right computational universe T n≤d until step (4), i.e., a large enough d ∈ N such that the associated T n≤d -stabilized span M contains all border bases. Here step (3) is a convenient way to quickly check whether the universe is already large enough. Step (4) adjusts d to the actual dimension of K [X ]/I and adjusts M. In the second phase, step (5) optimizes over the order ideal polytope P(h M iK[X] ) to find an optimal admissible order ideal using a mixed integer programming solver, and then step (6) computes the corresponding border basis. The main idea of this last step is to apply Gaussian elimination to M to bring it into a form where with the exception of the leading terms, all monomials are from O . Lemma 4.2. Let L = T n≤ℓ with ℓ ∈ N, let M be a non-empty finite set of polynomials satisfying h M iK = h M iK[X] ∩ h LiK and let O be an order ideal with ∂O ⊆ L and O ∈ Λ(h M iK[X] ). Then Algorithm 4.3 returns an O -border basis G of h M iK[X] . A POLYHEDRAL CHARACTERIZATION OF BORDER BASES 17 Proof. First, because M ⊆ L and M is non-empty, clearly the largest degree is ℓ among the polynomials in h M iK = h M iK[X] ∩ h LiK and hence in M. Thus step (1) computes the correct value of ℓ. As O ∈ Λ(h M iK[X] ) we have K [X ] = h M iK[X] ⊕ hOiK and hence     h LiK = h LiK ∩ h M iK[X] ⊕ hOiK = h LiK ∩ h M iK[X] ⊕ hOiK = h M iK ⊕ hOiK by the modular law, in particular, |G ′ | = | M | = | L| − |O|. Now, none of the polynomials in G ′ are supported on O , and as O is an initial segment of the ordering used for Gaussian elimination, it follows that all the leading terms in G ′ lie in L \ O . Since |G ′ | = | M | = | L| − |O|, it follows that all m ∈ L \ O appear as leading term exactly once in G ′ , and hence not as other term, i.e., all polynomials g ∈ G ′ have the form g = m0 − ∑ am m, m0 ∈ L \ O . m ∈O Obviously, restricting to the polynomials where the leading term is a border element of O in step (3) provides a border basis of O .  Algorithm 4.3 (Basis transformation algorithm—BasisTransformation). Input: M, O as in Lemma 4.2. Output: G as in Lemma 4.2. (1) Set ℓ := maxm∈ M deg(m). (2) Reduce M using Gaussian elimination (Algorithm 2.11) using an ordering where O is an initial segment (i.e., consists of the smallest elements): G ′ := GaussEl( M ). (3) Return G := { g ∈ G ′ : LT( g) ∈ ∂O}. We will show now that Algorithm 4.1 computes an O -border basis for O ∈ Λ( I ). Proposition 4.4. Let F ⊆ K [X ] be a finite set of polynomials that generates a zero-dimensional ideal I = h F iK[X] . Then Algorithm 4.1 computes the O -border basis G of I for any (chosen) O ∈ Λ( I ). Proof. Till step (3), the algorithm step by step enlarges the computational universe T n≤d via increasing d. Since I is zero-dimensional, the test T n=d ⊆ LT( M ) will be true for large enough d, hence the algorithm will eventually reach step (4). By Corollary 2.15, we have then h M iK = I ≤d , and that step (4) sets d to the dimension of K [X ]/I. It also updates M so that together with the new d it satisfies h M iK = I ≤d . Obviously, T n≤d contains all order ideals supporting a border basis, i.e., all O ∈ Λ( I ) and even the boundary of these order ideals. Observe that I = h F iK[X] = h M iK[X] and thus, by Lemma 4.2, it follows that G is indeed an O -border basis of h F iK[X] . Note that ∂O ⊆ T n≤d as d is the dimension of K [X ]/I. follows via h M i≤d /h M i≤d−1 ∼ = Tn K K =d K We conclude that M satisfies the conditions of Lemma 3.9, e.g., d = |T n≤d | − | M | is ensured by step (4), and therefore the integral solutions of the system used in step (5) are all the characteristic vectors of admissible order ideals. This step therefore really computes a maximal-weight admissible order ideal O . Finally, step (6) returns a border basis of O by Lemma 4.2.  The border basis algorithm in [35] allows using computational universes L smaller than T n≤d , improving performance of the algorithm. However, as we want to consider all order ideals and border bases, we deliberately chose the computational universe large enough to contain all possible order ideals. If a subset of all admissible order ideals is sufficient, then the same optimizations can be applied throughout. For certain choices of the weight vector w though it can be hard to compute a maximum weight order ideal as we will show now. In fact this also shows that there is no general, efficient way of specifying any admissible order ideal (unless coNP = NP). A POLYHEDRAL CHARACTERIZATION OF BORDER BASES 18 1 s xyz 1 1 xy 1 yz 0 xz -2 x 1 y 0 z -2 1 2 2 1 0 t Figure 5.1. Order ideal computation as minimum cut problem. In this example, the order ideal consists of all monomials dividing xyz, i.e., {1, x, y, z, xy, yz, xz, xyz}, with (arbitrarily) chosen weights {0, 1, 0, −2, 1, 0, −2, 1}. The weight wu of a monomial u is shown in red next to the node of the monomial. Arcs are labelled in blue with their capacity resulting from the weights of monomials. Arcs with capacity ∞ are dashed. Arcs with capacity 0 are omitted. 5. Complexity of finding maximum weight order ideals In this section, we show that finding a maximum weight, admissible order ideal of a zerodimensional ideal given by generators is NP-hard (Theorem 5.1). The hardness result is unexpected in the sense that we merely ask for a nice basis transformation. On the other hand it highlights the crucial role of order ideals in describing the combinatorial structure of the ideal. As an immediate consequence it follows that it is rather unlikely that we can obtain a good characterization of the integral hull of the order ideal polytope P(h M iK[X] ) (unless NP = coNP) and we will not be able to compute order ideals that support a border basis and have maximum weight efficiently in the worst case (unless NP = P). This shows that it is hard not only to compute the necessary liftings of the initial set of polynomials via the LStabSpan procedure but also to actually determine an optimal choice of an order ideal once an L-stable span has been computed. From a practical point of view this is not too problematic as, although NP-hard, computing a maximum weight order ideal is no harder than actually computing the LStabSpan in general. For bounds on the degree d ∈ N needed to compute border bases, see e.g., [22, Lemma 2.4]; the border basis algorithm generates the Nullstellensatz certificates and is therefore subject to the same bounds. Further, state-of-the-art mixed integer programming solvers such as scip [2], cplex [19], or gurobi [28] can handle instance sizes far beyond the point for which the actual border bases can be computed. Very good solutions can also be generated using simple local search schemes starting from a feasible order ideal derived from a degree-compatible term ordering. 5.1. Fast without constraint. Determining an order ideal of maximum weight (not necessarily supporting a border basis!) in a computational universe L without having any constraints on the dimension of the respective spaces can be done in time polynomial in | L| as we will show now. This follows with [47] and we simply transform the maximum weight order ideal problem into a minimum cut problem. For this let w ∈ Z L be a weight vector. We define a directed graph Γ := (V, A) with V := L ∪ {s, t} and à := {(u, v) | u, v ∈ L and v | u}, i.e., whenever v | u we add an arc from u to v. In fact, it is enough to have an arc when u = vx for some variable x, i.e., to consider the transitive reduction of Ã. Define A := à ∪ {(s, u) | u ∈ L, wu > 0} ∪ {(u, t) | u ∈ L, wu < 0}. Now we turn to the arc capacities. Let κ (u, v) denote the capacity or arc (u, v) defined as follows. For u and v both in L, we set κ (u, v) := ∞. We set κ (s, v) := wv and κ (u, t) = −wu for u, v in L. An example is depicted in Figure 5.1. A POLYHEDRAL CHARACTERIZATION OF BORDER BASES 19 For U, W ⊆ V, we define C (U, W ) := ∑(u,w)∈U ×W κ (u, w) as the directed cut value. An (s,t)-cut · (S, S̄) is a partition S ∪ S̄ = V of the vertices of V with s ∈ S and t ∈ S̄ and the weight of the cut is C (S, S̄); note that the direction of the arcs matters. We would like to compute an order ideal contained in L with maximum weight: ( ) max ∑ wu O ⊆ L order ideal . u ∈O Observe that (S, S̄) is a directed cut in Γ of finite weight, if and only if there exists no arc (u, v) ∈ à with u ∈ S and v ∈ S̄, i.e., for all monomials u, v ∈ O with v | u, if u ∈ S then v ∈ S. In other words, (S, S̄) is a cut in Γ of finite weight if and only if S \ {s} is an order ideal. We can therefore rewrite the optimization problem as follows: ( ) max ∑ wu O ⊆ L order ideal u ∈O = max{C ({s}, O) − C (O , {t}) | O ⊆ L order ideal} = max{C ({s}, L) − C ({s}, L \ O) − C (O , {t}) | O ⊆ L order ideal} = C ({s}, L) − min{C ({s}, L \ O) + C (O , {t}) | O ⊆ L order ideal} = C ({s}, L) − min{C ({s} ∪ O , ( L \ O) ∪ {t}) | O ⊆ L}. The last line asks for a minimum weight cut in the graph Γ. Note that we can indeed drop the condition that O has to be an order ideal as it is guaranteed implicitly by all finite weight cuts as explained above. The minimum cut can now be computed in polynomial time in the number of vertices and arcs (see e.g., [52]) and so can an order ideal O of maximum weight efficiently. 5.2. NP-hard with constraints. So far we did not include the additional requirements as specified by the order ideal polytope (see (3.6)), in order to obtain order ideals that do actually support a border basis of the ideal I under consideration. We will now show that when including these additional requirements, the problem of computing an order ideal of maximum weight becomes NP-hard. In [30, Discussion after Definition 3.2] it was indicated that determining a maximum weight order ideal of a pre-defined size is NP-hard by a reduction from MaxClique, however this is different from our problem, as we have additional constraints coming from the dimension of the factor spaces of the ideal (see constraints (3.6c)). We will show NP-hardness by a reduction from the k-Clique problem, which is well known to be NP-complete (see, e.g., [27] or [20, GT22]). Given an undirected simple graph Γ = (V, E), recall that a clique C is a subset of V such that for all distinct u, v ∈ C we have (u, v) ∈ E. We consider the decision problem: k-Clique: Let Γ = (V, E) be an undirected simple graph. Decide whether Γ contains a clique C of size k. Our optimization problem of interest is: Maximum weight admissible order ideal: Let M ⊆ K [X ] be a system of polynomials generating a zeron dimensional ideal and let w ∈ ZT be a weight on the monomials. Compute an admissible order ideal O ⊆ T n for h M iK[X] with maximum weight ∑m∈O wm with respect to w, i.e., compute argmax ∑ wm . O∈Λ (h M i K [X ] ) m ∈O By a reduction from k-Clique we obtain: Theorem 5.1. Maximum weight admissible order ideal is NP-hard over ground fields K of characteristic 0. A POLYHEDRAL CHARACTERIZATION OF BORDER BASES 20 As a preparation for the proof, we show that for every graph Γ = (V, E) and k ∈ [|V |] there exists a system of polynomials F|V |,k ⊆ K [ xv | v ∈ V ] spanning a zero-dimensional ideal such that solving the Maximum weight admissible order ideal problem for F|V |,k solves the k-Clique problem for Γ. For this, we construct an ideal encoding all k-cliques of the complete graph on n vertices: Let n ∈ N and k ∈ [n] and define Fn,k := {v j | j ∈ [n − k]} ∪ T n=3 with v j := ∑i∈[n] i j xi . We consider the ideal generated by Fn,k . We show that its order ideals are in one-to-one correspondence with the k-element subsets of the set of n variables x1 , . . . , xn as stated in the following lemma. Lemma 5.2. Let K be a field of characteristic 0 togetherwith n ∈ N and k ∈ [n]. Then Fn,k generates a zero-dimensional ideal such that O ∈ Λ h Fn,k iK[X] if and only if O =1 ⊆ T n=1 with |O =1 | = k, O =2 = { xy | x, y ∈ O =1 }, and O =ℓ = ∅ for all ℓ ≥ 3. . Proof. We start by providing an explicit representation of the factor ring K [ x1 , . . . , xn ] h Fn,k iK[X] . As Fn,k consists of homogeneous polynomials, it generates a homogeneous ideal I, and induces a degree decomposition of the factor ring: ∞ M T n=i K [ x1 , . . . , x n ] = h Fn,k iK[X] I =i i=0 K . To actually determine the factors, let xi1 , . . . , xik be k many distinct variables from x1 , . . . , xn . We prove that xi1 , . . . , xik , v1 , . . . , vn−k is a vector space basis of hT n=1 iK by showing that its coefficient matrix in the standard basis x1 . . . . , xn has non-zero determinant. Expanding the determinant by the k rows of xi1 , . . . , xik , each of which contains only one non-zero element, the determinant becomes equal to up to a sign to the Vandermonde matrix of the set of numbers [n] \ {i1 , . . . , ik }, and hence it is indeed non-zero. The ring K [X ] is also a polynomial ring in any basis of hT n=1 iK , and the basis xi1 , . . . , xik , v1 , . . . , vn−k is particularly suitable to determine the factor K [X ]/I together with the degree decomposition: (5.1) K [ x i1 , . . . , x i k , v1 , . . . , v n − k ] K [ x1 , . . . , x n ] = h Fn,k iK[X] v1 , . . . , vn−k , T n=3 K[X] = K [ x i1 , . . . , x i k ] = h 1i K ⊕ x i1 , . . . , x i k T n=3 K[X] K ⊕ xi x j : i, j ∈ {i1 , . . . , ik } K where the generating sets are actually bases of the respective degree components. Given an order ideal O of I, the isomorphism hOiK ∼ = K [X ]/I clearly preserves the degree =ℓ =ℓ ∼ decomposition, i.e., O (K [X ]/I ) for all ℓ. Hence |O =0 | = 1, |O =1 | = k, |O =2 | = (k+2 1), K = and |O =ℓ | = 0 for ℓ ≥ 3. It follows that O has the claimed form, in particular, O =2 = { xy | x, y ∈ O =1 } as the left-hand side is clearly a subset of the right-hand side, and they have the same finite size. For the other direction, let O =1 = { xi1 , . . . , xik } with O =2 = { xy | x, y ∈ O =1 }, O =0 = {1} and =ℓ O = ∅ for ℓ ≥ 3. Then O is an order ideal, and (5.1) shows that the image of O in K [X ]/I is a basis. Thus O is an admissible order ideal for I, as claimed.  Note that the order ideals of Fn,k indeed correspond to the k-cliques of the complete graph on n vertices: If O ∈ Λ( Fn,k ), then O =1 = { xi1 , . . . , xik } and xi j xil ∈ O =2 if and only if xi j , xil ∈ O =1 . If A POLYHEDRAL CHARACTERIZATION OF BORDER BASES 21 we now remove all elements of the form x2i j with xi j ∈ O =1 , and there are k of those, then |O =2 \ { x2i j | xi j ∈ O =1 }| = k ( k − 1) , 2 the size of a k-clique. We are ready to prove the main result of this section. Proof of Theorem 5.1. The proof is by a reduction from the NP-hard k-Clique problem. Let us start with an instance of k-Clique, i.e., an undirected graph Γ = (V, E) with n := |V | and k ∈ [n]. We n consider M := Fn,k and define w ∈ ZT via ( 1, if m = xu xv and either (u, v) ∈ E or u = v; wm = 0, otherwise, for all m ∈ T n . By Lemma 5.2, there is a bijection of the admissible order ideals O of h M iK[X] and the k-cliques of the complete graph on n vertices given by CO := {v ∈ V | xv ∈ O}. The weight of O is the sum of the weights of the monomials xu xv in O . To the weight of O , the contribution of the monomials with u = v, i.e., of the form x2v is the number of vertices of CO , i.e., k. The monomials xu xv with u 6= v contribute the number of edges in CO ∩ Γ to the weight of O . Hence the weight of O is the sum of k and the number of edges in CO ∩ Γ. The largest possible value of this weight is k(k + 1)/2, and this is realized exactly by cliques CO of Γ of size k. (If such cliques do not exist, then the maximal weight is less than k(k + 1)/2.) All in all, the maximum weight is k(k + 1)/2 if and only if Γ contains a clique CO of size k. We obtain that Maximum weight admissible order ideal solves k-Clique and so the former has to be NP-hard.  5.3. Extension complexity of admissible order ideals. The order ideal polytope P( I ) was introduced as a relaxation of the convex hull OIP( I ) of (the characteristic vectors of) all admissible order ideals of the ideal I. Therefore one might wonder whether there exists a description with a polynomial number of linear inequalities of the convex hull OIP( I ). This question is the natural counterpart of algorithmic complexity in the context of linear programming. Here we show that in general OIP( I ) requires a subexponential number of inequalities in the size of the computational universe, even if one allows additional extra variables, i.e., the extension complexity (see below) of OIP( I ) is subexponential. As customary in extended formulations this result does not depend on any complexity theoretic assumptions, see [13,16,26,32] for details. The result could be also formulated independent of the order ideal polytope, namely, that the linear programming formulation complexity (complexity measured in the size of a linear program) of the combinatorial problem to find a maximum-weight admissible order ideal is subexponential. However, for simplicity, we stick to the polyhedral formulation, and refer the interested reader to [13] for the general model. Recall that the extension complexity xc( P) of a polyhedron P is the minimum number of facets of a polyhedron Q, such that P is an affine image of Q. The extension complexity captures the inherent complexity of a polytope being expressed by means of linear inequalities. Theorem 5.3. For any ground field K of characteristic 0, there is an ideal I of K [ x1 , . . . , x2n ] such that all admissible order ideals of I contain monomials only up to degree 2, and (5.2) xc(OIP( I )) = 2Ω(n) . Proof. We shall use the ideal I generated by F2n,n from Lemma 5.2, whose admissible order ideals have a nice description, and all of which consist of monomials only up to degree 2. Therefore we A POLYHEDRAL CHARACTERIZATION OF BORDER BASES 22 obtain the following description of OIP( I ): (5.3) (5.4) n OIP( I ) = conv {yS : S ⊆ [2n], |S| = n} ⊆ [0, 1]T=2 ( 1, if i, j ∈ S, ySxi x j = 0, otherwise. Here for simplicity we restrict to the relevant coordinates only, the other coordinates are affine combinations of these (e.g., yxi = yx2 , y1 = 0). We will show that the correlation polytope is an i affine projection of OIP( I ), and therefore xc(OIP( I )) ≥ xc(COR(n)) = 2Ω(n) by [26, Lemma 9(i)] and [10, Theorem 4(i)]. Recall that the correlation polytope is the convex hull of all 0/1-matrices of rank 1: (5.5) (5.6) COR(n) := conv {1 S 1⊺S | S ⊆ [n]} ⊆ [0, 1]n×n , ( 1, if i ∈ S, 1 S (i ) := 0, otherwise. An affine projection f : OIP( I ) → COR(n) is clearly provided by (5.7) f (y)i,j := yxi x j i, j ∈ [n], where the vertices of OIP( I ) are mapped to vertices of COR(n) (5.8) f (yS ) = 1 S∩[n] 1⊺S∩[n] S ⊆ [2n], |S| = n. Note that 2n variables were chosen for OIP( I ) so that every subset T ⊆ [n] arises as an intersection T = S ∩ [n] for some S ⊆ [2n] of size [n].  5.4. Discussion of the complexity of finding maximal weight admissible order ideals. We now briefly summarize the implications of these complexity results. Note that the hardness proof in Section 5.2 is independent of the order ideal polytope, and shows worst-case hardness for any algorithm. (1) No general characterization of all admissible order ideals. The hardness in Section 5.2 is established for the Maximum weight admissible order ideal problem. As such, unless NP = coNP, which is generally believed to be not the case, in general there will be no good characterization of order ideals that will be admissible for a given ideal. Complementing this, the result in Section 5.3 rules out any small linear programming formulation for the convex hull of admissible order ideals irrespective of NP vs. coNP. (2) No theoretically efficient algorithm for computing maximal weight order ideals. In particular, unless NP = P, there will be no polynomial time algorithm computing a maximal weight order ideal. However, this is worst-case complexity, and does not necessarily capture well real-world performance, as e.g., the Traveling Salesman Problem is also NP-hard, however solvable for real-world instances with millions of cities in reasonable computational time (see e.g., [7]). (3) Real-world computational complexity. While the determinination of a maximal weight admissible order ideal is theoretically NP-hard as discussed above, in practice this problem can be solved very easily with state-of-the-art solvers such as e.g., scip, CPLEX, or Gurobi, typically in the order of seconds. Comparing the generalized border basis algorithm (Algorithm 4.1) to the border basis algorithm in [35], the major difference is the additional computational steps (5) and (6). The basis transformation in (6) is very cheap, and so is step (5) for all practical purposes as indicated. A POLYHEDRAL CHARACTERIZATION OF BORDER BASES 23 The real bottleneck in our border basis algorithm (and also the one in [35], upon which ours is based) is computing the L-stable span, which can be several orders of magnitude slower than determining the order ideal. In summary, we believe that our method has little additional costs compared to the border basis algorithm in [35], when incorporated correctly into a state-of-the-art implementation. (4) Size of the order ideal polytope. The description of the order ideal polytope in Definition 3.1 2 has a number of inequalities of roughly O(nd ) due to (3.1c). This is roughly the largest possible number of facets of the order ideal polytope, i.e., the number of all order ideals. Recall that the order ideal polytope is not necessarily the convex hull of all admissible order ideals, but only a relaxation of it, and as Theorem 5.3 shows (where d = 2), the convex hull itself requires much more inequalities in the worst case. However, it is conceivable that the convex hull admits an even smaller relaxation than the order ideal polytope via uncapacitated network flows or separating the inequalities (see e.g., [50]) as e.g., done for the spanning tree polytope. 6. Computational results We performed computational tests to verify the practical feasibility of our method, with an emphasis of the optimization step over the order ideal polytope, once it is written down, as this is the new aspect in our algorithm. Because this is not expected to be the bottleneck, we refrained from a comprehensive performance test, and used small-sized problems. For simplicity, we computed only degree-compatible order ideals. All computations were performed with CoCoA 4.7.5 [15] and scip 1.1.0 [2] on a 2 Ghz Dual Core Intel machine with 2 GB of main memory1. Test setup. The employed methodology was as follows. We first computed a border basis using the border basis algorithm in [35]. From the last run of the algorithm we extracted the L-stabilized span and brought it into canonical form as the actual L-stable span computation is not the focus here but the computation of admissible order ideals. We then generated the constraint (3.6b) from the order ideal that we obtained; from the L-stabilized span in matrix from, we generated the constraints (3.6c) adapted to degree-compatible order ideals. We performed computations on various sets of systems of polynomial equations. We then transcribed these constraints into the CPLEX LP format which served as input for scip. For the optimization we chose various weight vectors. We tested random weight vectors and we constructed a weight vector with the intent to make the optimization particularly hard by giving monomials deep in the order ideal negative weights and assigning positive weights for the outer elements. Results. We report the results of our tests in Table 3. In all cases, the optimization (i.e., the computation of the maximum weight order ideal) was performed in less than a second (see column optimization), whereas the actual calculation of the initial border bases was significantly more time consuming. This is not unexpected as the computation of the L-stable span is significantly more involved than computing a maximum weight order ideal: the former can be double exponential whereas the latter is at most single exponential via complete enumeration. An example application: counting order ideals. When computationally feasible, we also counted all feasible order ideals with scip, which basically means enumerating all feasible solutions, to demonstrate feasibility for reasonably sized instances. This is reported in column counting. 1Source code is available at: https://app.box.com/s/fcxtocvpqqj0b2dezj40v4tn24sfkk1m A POLYHEDRAL CHARACTERIZATION OF BORDER BASES polynomial system x3 , xy2 + y3 vanishing ideal of the points (0, 0, 0, 1), (1, 0, 0, 2), (3, 0, 0, 2), (5, 0, 0, 3), (−1, 0, 0, 4), (4, 4, 4, 5), (0, 0, 7, 6)). x + y + z − u − v, 2 x − x, y2 − y, z2 − z, u2 − u, v2 − v x + y + z − u − v, 3 x − x, y3 − y, z2 − z, u2 − u, v2 − v x + y + z − u − v, 3 x − x, y3 − y, z3 − z, u2 − u, v2 − v x + y + z − u − v, 3 x − x, y3 − y, z3 − z, u3 − u, v2 − v x + y + z − u − v + a, x2 − x, y2 − y, z2 − z, u2 − u, v2 − v, a2 − a degree vector of order ideal (1, 2, 3, 2, 1) (1, 4, 2) 24 optimization [s] counting [s] # order ideals < 0.01 < 0.01 0.02 0.02 3 45 (1, 4, 5) < 0.01 0.35 1,260 (1, 4, 7, 6) 0.02 51.50 106,820 (1, 4, 8, 9) 0.02 53.00 108,900 (1, 4, 9, 12, 9) 0.08 300.00* > 1,349,154 (1, 5, 9) < 0.01 8.68 30,030 Table 3. Computational results. The first column contains the considered polynomial system. The . second column contains the degree vector of the order ideal, i.e., (dim I ≤i I ≤i−1 ) starting with i i = 0 and I ≤−1 := 0. The third column contains the average time (in seconds) needed to optimize a random weight over the order ideal polytope (we performed 20 runs for each system). The fourth column contains the time (in seconds) needed to count all admissible degree-compatible order ideals and the last column contains the actual number of admissible degree-compatible order ideals. The ‘*’ indicates that the counting had been stopped after 300 seconds. The number of order ideals reported in this case is the number that have been counted up to that point in time. 7. Concluding remarks We gave a polyhedral characterization of all order ideals that support a border basis of a given zero-dimensional ideal. While it is impossible to provide a full linear description of polynomial size of the integral hull contained in the order ideal polytope due to Theorem 5.3 it might be possible to obtain a compact extended formulation of the order ideal polytope itself (not its integral hull). We leave this as an open question. References [1] J. Abbott, C. Fassino, and M.-L. Torrente. Stable border bases for ideals of points. Journal of Symbolic Computation, 43:883–894, 2008. [2] T. Achterberg. SCIP: solving constraint integer programs. Mathematical Programming Computation, 1(1):1–41, 2009. [3] N. Alon. Combinatorial Nullstellensatz. Combinatorics, Probability and Computing, 8:7–29, 1999. [4] N. Alon, M.B. Nathanson, and I.Z. Ruzsa. The polynomial method and restricted sums of congruence classes. Journal of Number Theory, 56:404–417, 1996. [5] Prabhanjan V Ananth and Ambedkar Dukkipati. Complexity of Gröbner basis detection and border basis detection. Theoretical Computer Science, 459:1–15, 2012. A POLYHEDRAL CHARACTERIZATION OF BORDER BASES 25 [6] Prabhanjan Vijendra Ananth and Ambedkar Dukkipati. Border basis detection is NP-complete. In Proceedings of the 36th international symposium on Symbolic and algebraic computation, pages 11–18. ACM New York, NY, USA, 2011. [7] David L Applegate, Robert E Bixby, Vasek Chvatal, and William J Cook. The Traveling Salesman Problem: A Computational Study: A Computational Study. Princeton university press, 2011. [8] W. Auzinger and H.J. Stetter. An elimination algorithm for the computation of all zeros of a system of multivariate polynomial equations. In Proceedings of the International Conference on Numerical Mathematics, pages 11–30. National University of Singapore, May 31-June 4, 1988, Birkhäuser, 1988. [9] M. Borges-Quintana, M.A. Borges-Trenard, and E. Martínez-Moro. An application of Möller’s algorithm to coding theory. In M. Sala, T. Mora, L. Perret, S. Sakata, and C. Traverso, editors, Gröbner Bases, Coding, and Cryptography, pages 379–384. Springer, 2009. [10] G. Braun, S. Fiorini, S. Pokutta, and D. Steurer. Approximation limits of linear programs (beyond hierarchies). Mathematics of Operations Research, 2014. DOI: 10.1287/moor.2014.0694. arXiv:1204.0957, doi:10.1287/moor.2014.0694. [11] G. Braun and S. Pokutta. Border bases and order ideals: a polyhedral characterization. arXiv:0912.1502, 2009. [12] G. Braun and S. Pokutta. A polyhedral approach to border bases. arXiv:0911.0859, 2009. [13] G. Braun, S. Pokutta, and D. Zink. Inapproximability of combinatorial problems via small LPs and SDPs. Proceeedings of STOC, 2015. [14] Marta Abril Bucero and Bernard Mourrain. Border basis relaxation for polynomial optimization. arXiv preprint arXiv:1404.5489, 2014. [15] CoCoA Team. CoCoA: a system for doing computations in commutative algebra, 2009. Available from: http://cocoa.dima.unige.it. [16] M. Conforti, G. Cornuéjols, and G. Zambelli. Extended formulations in combinatorial optimization. 4OR, 8:1–48, 2010. doi:10.1007/s10288-010-0122-z. [17] N. Courtois, A. Klimov, J. Patarin, and A. Shamir. Efficient algorithms for solving overdefined systems of multivariate polynomial equations. Lecture Notes in Computer Science, 1807:392–407, 2000. [18] D. Cox, J. Little, and D. O’Shea. Ideals, Varieties, and Algorithms: An Introduction to Computational Algebraic Geometry and Commutative Algebra. Springer, 2007. [19] CPLEX. 11.0 User’s Manual. ILOG SA, Gentilly, France, 2008. [20] P. Crescenzi and V. Kann. A compendium of NP optimization problems. online manuscript, 1998. [21] J.A. De Loera, J. Lee, P.N. Malkin, and S. Margulies. Hilbert’s Nullstellensatz and an algorithm for proving combinatorial infeasibility. In Proceedings of the twenty-first international symposium on Symbolic and algebraic computation ISSAC ’08, 2008. [22] J.A. De Loera, J. Lee, S. Margulies, and S. Onn. Expressing Combinatorial Problems by Systems of Polynomial Equations and Hilbert’s Nullstellensatz. Combinatorics, Probability and Computing, 18(4):551–582, 2009. [23] J.A. De Loera, P.N. Malkin, and P.A. Parrilo. Mixed Integer Nonlinear Programming, volume 154 of The IMA Volumes in Mathematics and its Applications, chapter Computation with Polynomial Equations and Inequalities Arising in Combinatorial Optimization, pages 447–481. Springer New York, November 2012. [24] Jesús A De Loera, Christopher J Hillar, Peter N Malkin, and Mohamed Omar. Recognizing graph theoretic properties with polynomial ideals. Elect. J. of Combinatorics, 17(1):R114, 2010. [25] Jesús A De Loera, Jon Lee, Peter N Malkin, and Susan Margulies. Computing infeasibility certificates for combinatorial problems through Hilbert’s Nullstellensatz. Journal of Symbolic Computation, 46(11):1260–1283, 2011. [26] S. Fiorini, S. Massar, S. Pokutta, H. R. Tiwary, and R. de Wolf. Linear vs. semidefinite extended formulations: Exponential separation and strong lower bounds. Proceedings of STOC, 2012. [27] M.R. Garey and D.S. Johnson. Computers and Intractability: A Guide to the Theory of NP-completeness. W.H. Freeman and Company, San Francisco, 1979. [28] Gurobi. Gurobi 1.1.0 mixed integer linear programming solver. Gurobi Optmization Inc, 2009. [29] D. Heldt, M. Kreuzer, S. Pokutta, and H. Poulisse. Approximate computation of zero-dimensional polynomial ideals. Journal of Symbolic Computation, 44(11):1566–1591, 2009. doi:10.1016/j.jsc.2008.11.010. [30] D.S. Hochbaum and A. Chen. Performance analysis and best implementations of old and new algorithms for the open-pit mining problem. Operations Research, pages 894–914, 2000. [31] Gareth James, Daniela Witten, Trevor Hastie, and Robert Tibshirani. An introduction to statistical learning. Springer, 2013. [32] V. Kaibel. Extended formulations in combinatorial optimization. Optima, 85:2–7, 2011. [33] Stefan Kaspar. Computing border bases without using a term ordering. Beiträge zur Algebra und Geometrie/Contributions to Algebra and Geometry, 54(1):211–223, 2013. [34] A. Kehrein and M. Kreuzer. Characterizations of border bases. Journal of Pure and Applied Algebra, 196:251–270, 2005. [35] A. Kehrein and M. Kreuzer. Computing border bases. Journal of Pure and Applied Algebra, 205:279–295, 2006. [36] A. Kehrein, M. Kreuzer, and L. Robbiano. An algebraist’s view on border bases. In Solving Polynomial Equations: Foundations, Algorithms, and Applications, pages 169–202. Springer, 2005. A POLYHEDRAL CHARACTERIZATION OF BORDER BASES [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50] [51] [52] 26 M. Kreuzer and H. Poulisse. Subideal border bases. preprint / arXiv:0905.1090v1, 2009. M. Kreuzer and L. Robbiano. Computational Commutative Algebra 1. Springer, 2000. M. Kreuzer and L. Robbiano. Computational Commutative Algebra 2. Springer, 2005. M. Kreuzer and L. Robbiano. Deformations of border bases. Collectanea Mathematica, 59:275–297, 2008. Martin Kreuzer. Algebraic attacks galore! Groups–Complexity–Cryptology, 1(2):231–259, 2009. doi:10.1515/GCC.2009.231. H.M. Möller. Systems of algebraic equations solved by means of endomorphisms. Lecture Notes in Computer Science, 673:43–56, 1993. B. Mourrain. A new criterion for normal form algorithms. Lecture Notes in Computer Science, 1719:430–443, 1999. Bernard Mourrain and Philippe Trebuchet. Generalized normal forms and polynomial system solving. In Proceedings of the 2005 international symposium on Symbolic and algebraic computation, pages 253–260. ACM New York, NY, USA, 2005. Bernard Mourrain and Philippe Trébuchet. Stable normal forms for polynomial system solving. Theoretical Computer Science, 409(2):229–240, 2008. S. Onn and B. Sturmfels. Cutting corners. Advances in Applied Mathematics, 23(1):29–48, 1999. J.C. Picard. Maximal closure of a graph and applications to combinatorial problems. Management Science, pages 1268–1272, 1976. S. Pokutta and A.S. Schulz. On the connection of the Sherali–Adams closure and border bases. submitted, 2009. Available from: http://www.optimization-online.org/DB_HTML/2009/08/2378.html. Lorenzo Robbiano. On border basis and Gröbner basis schemes. Collectanea mathematica, 60(1):11–25, 2009. A. Schrijver. Theory of linear and integer programming. Wiley, 1986. H.D. Sherali and W.P. Adams. A hierarchy of relaxations between the continous and convex hull representations for zero-one programming problems. SIAM Journal on Discrete Mathematics, 3:411–430, 1990. L.A. Wolsey and G.L. Nemhauser. Integer and Combinatorial Optimization. John Wiley & Sons, August 2014. ISyE, Georgia Institute of Technology, Atlanta, GA 30332, USA. E-mail address: [email protected] ISyE, Georgia Institute of Technology, Atlanta, GA 30332, USA. E-mail address: [email protected]
0math.AC
Hohmann Transfer via Constrained Optimization Li Xie∗ State Key Laboratory of Alternate Electrical Power System with Renewable Energy Sources North China Electric Power University, Beijing 102206, P.R. China arXiv:1712.01512v1 [cs.SY] 5 Dec 2017 Yiqun Zhang† and Junyan Xu‡ Beijing Institute of Electronic Systems Engineering, Beijing 100854, P.R. China In the first part of this paper, inspired by the geometric method of Jean-Pierre Marec, we consider the two-impulse Hohmann transfer problem between two coplanar circular orbits as a constrained nonlinear programming problem. By using the Kuhn-Tucker theorem, we analytically prove the global optimality of the Hohmann transfer. Two sets of feasible solutions are found, one of which corresponding to the Hohmann transfer is the global minimum, and the other is a local minimum. In the second part, we formulate the Hohmann transfer problem as two-point and multi-point boundary-value problems by using the calculus of variations. With the help of the Matlab solver bvp4c, two numerical examples are solved successfully, which verifies that the Hohmann transfer is indeed the solution of these boundary-value problems. Via static and dynamic constrained optimization, the solution to the orbit transfer problem proposed by W. Hohmann ninety-two years ago and its global optimality are re-discovered. I. Introduction I n 1925, Dr. Hohmann, a civil engineer published his seminal book [1] in which he first described the well-known optimal orbit transfer between two circular coplanar space orbits by numerical examples, and this transfer is now generally called the Hohmann transfer. Hohmann claimed that the minimum-fuel impulsive transfer orbit is an elliptic orbit tangent to both the initial and final circular orbits. However a mathematical proof to its optimality was not addressed until 1960s. The first proof targeted to the global optimality was presented by Barrar [2] in 1963, where the Whittaker theorem in classical analytical dynamics was introduced and the components of the velocity at any point on an elliptic orbit, perpendicular to its radius vector and the axis of the conic respectively, were used to be coordinates in a plane; see also Prussing and Conway’s book [3, eq. (3.13)] in detail. Before that, Ting in [4] obtained the local optimality of the Hohmann transfer. By using a variational method, Lawden investigated the optimal control problem of a spacecraft in an inverse square law field, and invented the prime vector methodology [5]. According to different thrusts, the trajectory of a spacecraft is divided into the arcs of three types: (1) null thrust arc; (2) maximum thrust arc; ∗ Professor, School of Control and Computer Engineering; the correspondence author, [email protected] Research Scientist, [email protected] ‡ Associate Research Scientist, [email protected] † Senior (3) intermediate arc. If we approximate the maximum thrust by an impulse thrust, then the orbit transfer problem can be studied by the the prime vector theory and the Hohmann transfer is a special case, which can also be seen in the second part of this paper. Lawden derived all necessary conditions that the primer vector must satisfy. A systemic design instruction can be found in [6]. In 2009, Pontani in [7] reviewed the literature concerning the optimality of the Hohmann transfer during 1960s and 1990s, for example [8–14]. Among of them, Moyer verified the techniques devised respectively by Breakwell and Constensou via variational methods for general space orbit transfers. The dynamical equations involved were established for orbital elements. Battin and Marec used a Lagrange multiplier method and a geometric method in light of a hodograph plane, respectively. It is Marec’s method that enlightens us to consider the Hohmann transfer in a different way. Based on Green’s theorem, Hazelrigg established the global optimal impulsive transfers. Palmore provided an elemental proof with the help of the gradient of the characteristic velocity, and Prussing simplified Palmore’s method by utilizing the partial derivatives of the characteristic velocity, and a similar argument also appeared in [15] which was summarized in the book [16]; see more work of Prussing in [3, Chapter 6]. Yuan and Matsushima carefully made use of two lower bounds of velocity changes for orbit transfers and showed that the Hohmann transfer is optimal both in total velocity change and each velocity change. Recently, Gurfil and Seidelmann in their new book [17, Chapter 15] consider the effects of the Earth’s oblateness J2 on the Hohmann transfer. Then the velocity of a circular orbit is calculated by v u t v= 2 3J2 req µ 1+ r 2r 2 ! By using Lagrange multipliers, the optimal impulsive transfer is derived. This transfer is referred as to the extended Hohmann transfer which degenerates to the standard Hohmann transfer as J2 = 0. Avendaño et al. in [18] present a pure algebraic approach to the minimum-cost multi-impulse orbit-transfer problem. By using Lagrange multipliers, as a particular example, the optimality of the Hohmann transfer is also provided by this algebraic approach. These authors are all devoted to proving the global optimality of the Hohmann transfer. In the first part of this paper, we present a different method to prove the global optimality of the Hohmann transfer. Inspired by the geometric method of Marec in [10, pp. 21-32], we transform the Hohmann transfer problem into a constrained nonlinear programming problem, and then by using the results in nonlinear programming such as the well-known Kuhn-Tucker theorem, we analytically prove the global optimality of the Hohmann transfer. Here by the global optimality, we mean that the Hohmann transfer is optimum among all possible two-impulse coplanar transfers. Two sets of feasible solutions are found, one of which corresponding to the Hohmann transfer is the global minimum, and the other is a local minimum. In the second part of the paper, we consider the Hohmann transfer problem as dynamic optimization problems. By using variational method, we first present all necessary conditions for two-point and 2 multi-point boundary-value problems related to such dynamic optimization problems, and we then solve two numerical examples with the help of Matlab solver bvp4c, which verifies that the Hohmann transfer is indeed the solution of these constrained dynamic optimization problems. By formulating the Hohmann transfer problem as constrained optimization problems, the solution to the orbit transfer problem proposed by W. Hohmann 92 years ago and its global optimality are re-discovered. II. The optimality of the Hohmann Transfer The Hohmann transfer is a two-impulse orbital transfer from one circular orbit to another; for the background see, e.g., [3, 10, 19, 20]. We use the same notation as Marec in [10, pp. 21-32]. Let O0 denote the initial circular orbit of a spacecraft, and the radius and the velocity of the initial circular orbit are r0 and V0 respectively. Let O f denote the final circular orbit, and its radius and velocity are r f and Vf respectively. For simplicity, let r f be greater than r0 . We use boldface to denote vectors. The center of these two coplanar circular orbits is at the origin of the Cartesian inertia reference coordinate system. Suppose all transfer orbits are coplanar to O0 . Hence we need only to consider the x − y plane of the reference coordinate system. Assume that the spacecraft is initially located at the point (r0, 0) of the initial circular orbit. At the initial time t0 , the first velocity impulse vector ∆V0 is applied, and its components in the direction of the radius and the direction perpendicular to the radius are ∆X0, ∆Y0 respectively. Similarly, at the final time t f , the second velocity impulse ∆V f occurs, and its components are ∆X f , ∆Yf . Hence at the time t0+ just after t0 , the components of the velocity of the spacecraft are (∆X0, V0 + ∆Y0 ). Then in order to enter the final circular orbit, the components of the velocity of the spacecraft must be (−∆X f , Vf − ∆Yf ) at the time t −f just before t f . During the period from t0+ to t −f , the spacecraft is on a transfer orbit (conic) and the angular momentum and the energy (per unit mass) are conserved, hence we have h = r0 (V0 + ∆Y0 ) = r f (Vf − ∆Yf ) i µ  µ 1 1h E= (V0 + ∆Y0 )2 + ∆X02 − = (Vf − ∆Yf )2 + ∆X f2 − 2 r0 2 rf (1) µ , µ is gravitational constant. It follow from (1) r that we can express ∆X0, ∆Y0 in terms of ∆X f , ∆Yf and vice versa. In order to simplify equations, at first, using the Notice that for a circular orbit, its radius and velocity satisfy V = r initial orbit radius and velocity as reference values, we define new variables: r̄ f = rf , r0 vf = Vf , V0 y0 = ∆Y0 , V0 x0 = 3 ∆X0 , V0 yf = ∆Yf , V0 xf = ∆X f V0 (2) Substituting (2) into (1) yields the following non-dimensional angular momentum and energy equalities h = (1 + y0 ) = r̄ f (v f − y f ) i 1  1h 1 (1 + y0 )2 + x02 − 1 = (v f − y f )2 + x 2f − E= 2 2 r̄ f (3) see [10, p.22]. Then we express x f , y f in terms of x0, y0 y f = v f − (1 + y0 )r̄ f−1 = r̄ f−1/2 − (1 + y0 )r̄ f−1 (4) x 2f = x02 + (1 + y0 )2 − 2(1 − r̄ f−1 ) − (v f − y f )2 = x02 + (1 + y0 )2 (1 − r̄ f−2 ) − 2(1 − r̄ f−1 ) (5) from which we have ∆v 2f  Vf = v0 2 = x 2f + y 2f  2 = x02 + (1 + y0 )2 (1 − r̄ f−2 ) − 2(1 − r̄ f−1 ) + r̄ f−1/2 − (1 + y0 )r̄ f−1  2 = x02 + y0 + 1 − r̄ f−3/2 − (r̄ f − 1)(2r̄ f2 − r̄ f − 1)r̄ f−3  2 = x02 + y0 + 1 − r̄ f−3/2 − (r̄ f − 1)2 (2r̄ f + 1)r̄ f−3 ∆v02 = x02 + y02 where we define ∆v0 = q x02 + y02 > 0 and ∆v f = q x 2f + y 2f > 0. Thus the cost functional (i.e., the characteristic velocity) can be written as ∆v(x0, y0 ) = ∆v0 + ∆v f = q r x02 + y02 +  2 x02 + y0 + 1 − r̄ f−3/2 − (r̄ f − 1)2 (2r̄ f + 1)r̄ f−3 Observing (5), it is noted that we must make the following constraint on the first impulse x02 + (1 + y0 )2 (1 − r̄ f−2 ) − 2(1 − r̄ f−1 ) ≥ 0 (6) That is, when we use the energy conservation to calculate the non-dimensional component of the second impulse x f , the inequality (6) must hold such that a non-negative number is assigned to x 2f , which actually requires that the transfer orbit intersects the inner circle and the outer circle. 4 The above background can be found in [10, Section 2.2] which is specified here. Marec used the independent variables x0, y0 as coordinates in a hodograph plan and in geometric language, an elegant and simple proof was given to show the optimality of the Hohmann transfer. Marec’s geometric method enlightens us to consider the Hohmann transfer in a different way. Then the global optimality of the Hohmann transfer analytically appears. We now formulate the Hohmann transfer problem as a nonlinear programming problem subject to the inequality constraint (6) in which x0 and y0 are independent variables. Theorem II.1 The classical Hohmann transfer is the solution of the following constrained optimization problem min ∆v(x0, y0 ) (7) x0,y0 s.t. x02 + (1 + y0 )2 (1 − r̄ f−2 ) − 2(1 − r̄ f−1 ) ≥ 0 Also this solution is the global minimum. Proof. We say that the Hohmann transfer is the solution to the above optimization problem if the pair (x0, y0 ) corresponding to the Hohmann transfer is feasible to (7). As usual, we use Lagrange multiplier method and define the Lagrangian function as follows   F(x0, y0 ) = ∆v(x0, y0 ) + λ −x02 − (1 + y0 )2 (1 − r̄ f−2 ) + 2(1 − r̄ f−1 ) (8) In view of the Kuhn-Tucker theorem, a local optimum of ∆v(x0, y0 ) must satisfy the following necessary conditions ∂F x0 x0 = + − 2λx0 = 0 ∂ x0 ∆v0 ∆v f (9) y0 + 1 − r̄ f−3/2 ∂F y0 = + − 2λ(1 + y0 )(1 − r̄ f−2 ) = 0 ∂ y0 ∆v0 ∆v f   λ −x02 − (1 + y0 )2 (1 − r̄ f−2 ) + 2(1 − r̄ f−1 ) = 0 (11) − x02 − (1 + y0 )2 (1 − r̄ f−2 ) + 2(1 − r̄ f−1 ) ≤ 0 (12) λ≥0 (13) (10) Notice that we have assumed that ∆v0, ∆v f > 0. In order to find a feasible solution, we divide the proof of the first part of this theorem into two cases. (i) If λ = 0, then due to the equations (9) and (10), we have x0 = 0 and y0 + 1 − r̄ f−3/2 y0 + =0 ∆v0 ∆v f 5 (14) respectively. We claim that the equality (14) does not hold because the equality x0 = 0 implies that y0 y0 = ±1 = ∆v0 |y0 | which contradicts 1< y0 + 1 − r̄ f−3/2 ∆v f y0 + 1 − r̄ f−3/2 =r ,  2 −3/2 −3 2 y0 + 1 − r̄ f − (r̄ f − 1) (2r̄ f + 1)r̄ f or y0 + 1 − r̄ f−3/2 ∆v f < −1 Therefore the equation (14) has no solution under the assumption λ = 0. (ii) We now consider the case λ > 0. Then the equation (11) yields −x02 − (1 + y0 )2 (1 − r̄ f−2 ) + 2(1 − r̄ f−1 ) = 0 (15) which together with (5) leads to x 2f = 0. Thus ∆v f = q x 2f + y 2f = q y 2f = y f (16) and also x02 = −(1 + y0 )2 (1 − r̄ f−2 ) + 2(1 − r̄ f−1 ) (17) ∆v02 = x02 + y02 = r̄ f−2 (1 + y0 )2 − (1 + 2y0 ) + 2(1 − r̄ f−1 )  2 = r̄ f−1 (1 + y0 ) − r̄ f + 2(1 + y0 ) − r̄ f2 − (1 + 2y0 ) + 2(1 − r̄ f−1 )  2 = r̄ f−1 (1 + y0 ) − r̄ f + 3 − r̄ f2 − 2r̄ f−1 (18) Then we obtain ∆v02 as follows Thanks to (9) x0 x0 + − 2λx0 = 0 ∆v0 ∆v f (19) We now show that x0 = 0 by contradiction. If x0 , 0, then the equality (19) implies that 2λ = 1 1 + ∆v0 ∆v f 6 (20) Substituting (20) into (10) gives   y0 + 1 − r̄ f−3/2 y0 1 1 −2 + = (1 + y0 )(1 − r̄ f ) + ∆v0 ∆v f ∆v0 ∆v f Arranging the above equation and using (4) and (16), we get y0 − (1 + y0 )(1 − r̄ f−2 ) ∆v0 r̄ f−3/2 − (y0 + 1)r̄ f−2 = ∆v f = r̄ f−1/2 − (y0 + 1)r̄ f−1 ∆v f r̄ f−1 = yf yf r̄ f−1 where y f , 0 since we have assumed v f > 0 and just concluded x f = 0. By further rearranging the above equation, we have r̄ f−1 (1 + y0 ) − r̄ f ∆v0 = yf yf =      1,  if y f > 0     −1,  if y f < 0 (21) It is noted that (18) gives a strict inequality  2  2 ∆v02 = r̄ f−1 (1 + y0 ) − r̄ f + 3 − r̄ f2 − 2r̄ f−1 < r̄ f−1 (1 + y0 ) − r̄ f (22) where the function 3 − r̄ f2 − 2r̄ f−1 < 0 since it is decreasing with respect to r̄ f and r̄ f > 1. Hence (21) contradicts to (22) and does not hold, which implies that the assumption λ > 0 and the equality x0 , 0 do not hold simultaneously. Therefore λ > 0 leads to x f = 0 and x0 = 0. Summarizing the two cases above, we now conclude that a feasible solution to (7) must have λ∗ > 0, x ∗f = 0 and x0∗ = 0. Then the corresponding normal component y0 can be solved from (15) s y0∗ = s 2r̄ f − 1, 1 + r̄ f ŷ0∗ = − 2r̄ f −1 1 + r̄ f (23) Substituting them into (4) and (10) yields s y ∗f = r̄ f−1/2 ŷ ∗f = r̄ f−1/2 ! 2 1− , 1 + r̄ f s ! 2 1+ , 1 + r̄ f y0∗ + 1 − r̄ f−3/2 ª 1 © λ = ­1 + ®>0 y ∗f 2(1 + y0∗ )(1 − r̄ f−2 ) « ¬ ∗ + 1 − r̄ −3/2 ŷ 1 0 f © ª λ̂∗ = ­1 + ®>0 ∗ ∗ −2 ŷ 2(1 + ŷ0 )(1 − r̄ f ) f « ¬ ∗ (24) One can see that there exist two sets of feasible solutions, one of which (x0∗, y0∗ ) is corresponding to the Hohmann transfer, and its the Lagrange multiplier is λ∗ . 7 We are now in a position to show that the Hohmann transfer is the global minimum. We first show that (x0∗, y0∗ ) is a strict local minimum. Theorem 3.11 in [21] gives a second order sufficient condition for a strict local minimum. To apply it, we need to calculate the Hessian matrix of the Lagrangian function F defined by (8) at (x0∗, y0∗ ) ∂2 F © ­ ∂ x2 ­ 0 ∇2 F(x0∗, y0∗, λ∗ ) = ­ ­ ∂2 F ­ « ∂ y0 ∂ x0 ∂2 F ª ∂ x0 ∂ y0 ®® ® ∂ 2 F ®® ∂ y02 ¬(x ∗,y ∗ ) 0 0 (25) After a straightforward calculation, by the equations (9) and (10) and using the fact x0∗ = 0, we have ∂2 F ∂2 F (x0∗, y0∗ ) = (x ∗, y ∗ ) = 0 ∂ x0 ∂ y0 ∂ y0 ∂ x0 0 0 and also 1 + r̄ f−1 (1 + y0∗ ) 1 1 ∂2 F ∗ ∗ ∗ (x , y ) = >0 + − 2λ = y0∗ y ∗f ∂ x02 0 0 y0∗ (1 + y0∗ )(1 + r̄ f−1 ) (26) ∂2 F ∗ ∗ (x , y ) =  ∂ y02 0 0 (27) −b (y0∗ + a)2 −b ∗ −2  3/2 − 2λ (1 − r̄ f ) < 0 where a = 1 − r̄ f−3/2, b = (r̄ f − 1)2 (2r̄ f + 1)r̄ f−3 > 0. Then one can see that the Hessian matrix is an indefinite matrix. Thus we cannot use the positive definiteness of the Hessian matrix, that is, zT ∇2 F(x0∗, y0∗, λ∗ )z > 0, ∀z , 0 as a sufficient condition to justify the local minimum of (x0∗, y0∗ ) as usual. Fortunately, Theorem 3.11 in [21] tells us that for the case λ∗ > 0, that is, the inequality constraint is active, when we use the positive definiteness of the Hessian matrix to justify the local minimum, we need only to consider the positive definiteness of the first block of the Hessian matrix with the non-zero vector z , 0 defined by z ∈ Z(x0∗, y0∗ ) = {z : z T ∇g(x0∗, y0∗ ) = 0} where g(x0, y0 ) is the constraint function g(x0, y0 ) = −x02 − (1 + y0 )2 (1 − r̄ f−2 ) + 2(1 − r̄ f−1 ) 8 (28) With this kind of z, if zT ∇2 F(x0∗, y0∗, λ∗ )z > 0, then (x0∗, y0∗ ) is a strict local minimum. Specifically, the vector z defined by the set (28) satisfies  z T ∇g(x0∗, y0∗ ) = z1     −2x0     =0 z2   −2(1 + y )(1 − r̄ −2 )   0 f   (x0∗,y0∗ ) (29) Notice that x0∗ = 0, −2(1 + y0∗ )(1 − r̄ f−2 ) , 0. Hence (29) implies that the components z1 , 0 and z2 = 0. Obviously it follows from (26) that    z   1 ∂2 F ∗ ∗ 2 ∗ ∗ ∗   0 ∇ F(x0, y0, λ )   = z1 2 (x0, y0 )z1 > 0 ∂ x0 0      z1 (30) Therefore in light of Theorem 3.11 in [21, p.48], we can conclude that (x0∗, y0∗ ) is a strict local minimum. The same argument can be used to show that ( x̂0∗, ŷ0∗ ) is also a strict local minimum in view of (30). Meanwhile a straightforward calculation gives ∆v(x0∗, y0∗ ) < ∆v( x̂0∗, ŷ0∗ ) Hence the pair (x0∗, y0∗ ) is a global minimum, and further it is the global minimum due to the uniqueness; see [22, p.194] for the definition of a global minimum. This completes the proof of the theorem. III. The Hohmann transfer as dynamic optimization problems In this section, the orbit transfer problem is formulated as two optimal control problems of a spacecraft in an inverse square law field, driven by velocity impulses, with boundary and interior point constraints. The calculus of variations is used to solve the resulting two-point and multi-point boundary-value problems (BCs). A. Problem formulation Consider the motion of a spacecraft in the inverse square gravitational field, and the state equation is rÛ = v vÛ = − µ r r3 (31) where r(t) is the spacecraft position vector and v(t) is its velocity vector. The state vector consists of r(t) and v(t). We use (31) to describe the state of the transfer orbit, which defines a conic under consideration; see, e.g., [19, Chapter 2]. Problem III.1 Given the initial position and velocity vectors of a spacecraft on the initial circular orbit, r(t0 ), v(t0 ). 9 The terminal time t1 is not specified. Let t0+ signify just after t0 and t1− signify just before t1 .∗ During the period from t0+ to t1− , the state evolves over time according to the equation (31). To guarantee at the time t1+ , the spacecraft enters the finite circular orbit, we impose the following equality constraints on the finial state gr1 (r(t1+ )) = r(t1+ ) − r f = 0 gv1 (v(t1+ )) = v(t1+ ) − v f = 0 g2 (r(t1+ ), v(t1+ )) = r(t1+ ) · v(t1+ ) = 0 where v f is the orbit velocity of the final circular orbit v f = p (32) µ/r f . Suppose that there are velocity impulses at time instants t0 and t1 v(ti+ ) = v(ti− ) + ∆vi, i = 0, 1 (33) where v(t0− ) = v(t0 ). The position vector r(t) is continuous at these instants. The optimal control problem is to design ∆vi that minimize the cost functional J = |∆v0 | + |∆v1 | (34) subject to the constraints (32). In control theory, such an optimal control problem is called impulse control problems in which there are state or control jumps. Historically an optimal problem with the cost functional (34) is also referred to as the minimum-fuel problem. By Problem III.1,† the orbit transfer problem has been formulated as a dynamic optimization problem instead of a static one considered in Section II. The advantage of this formulation is that the coplanar assumption of the transfer orbit to the initial orbit is removed, but the computation complexity follows. In the next problem we consider the orbit transfer problem as a dynamic optimization problem with interior point constraints. Problem III.2 Consider a similar situation as in Problem III.1. Let t HT be the Hohmann transfer time. Instead of the unspecified terminal time, here the terminal time instant t f > t HT is given and the time instant t1 now is an unspecified interior time instant. The conditions (32) become a set of interior boundary conditions. The optimal control problem is to design ∆vi that minimize the cost functional (34) subject to the interior boundary conditions (32). ∗ In side. mathematical language, t0+ represents the limit of t0 approached from the right side and t1− represents the limit of t1 approached from the left † A Matlab script for the Hohmann transfer was given as a numerical example in the free version of a Matlab-based software GPOPS by an direct method. The constrained (32) was also used to describe the terminal conditions. We here use the variational method (i.e., indirect method) to optimal control problems 10 B. Two-point boundary conditions for Problem III.1 Problem III.1 is a constrained optimization problem subject to static and dynamic constraints. We use Lagrange multipliers to convert it into an unconstrained one. Define the augmented cost functional J˜ : = |∆v0 | + |∆v1 |  +   +  T T + qr1 r(t0 ) − r(t0 ) + qr2 r(t1 ) − r(t1− )     + qTv1 v(t0+ ) − v(t0 ) − ∆v0 + qTv2 v(t1+ ) − v(t1− ) − ∆v1 + γr1 gr1 (r(t1+ )) + γv1 gv1 (v(t1+ )) + γ2 gr2 (r(t1+ ), v(t1+ )) ∫ t−  µ  1 + prT (v − rÛ ) + pTv − 3 r − vÛ dt r t0+ where Lagrange multipliers pr , pv are also called costate vectors; in particular, Lawden [5] termed −pv the primer vector. Introducing Hamiltonian function H(r, v, p) := prT v − µ pTv 3 r, r T  p = pr pv (35) By taking into account of all perturbations, the first variation of the augmented cost functional is δ J˜ = ∆vT0 |∆v0 | δv0 + ∆vT1 δv1 |∆v1 |     T T + qr1 dr(t0+ ) − dr(t0− ) + qr2 dr(t1+ ) − dr(t1− )     + qTv1 dv(t0+ ) − dv(t0− ) − δv0 + qTv2 dv(t1+ ) − dv(t1− ) − δv1 + drT (t1+ ) ∂gv1 (v(t1+ )) ∂gr1 (r(t1+ )) T + γ + dv (t ) γv1 r1 1 ∂r(t1+ ) ∗ ∂v(t1+ ) ∗ ∂g2 (r(t1+ ), v(t1+ )) ∂g2 (r(t1+ ), v(t1+ )) T + γ + dv (t ) γ2 2 1 ∗ ∗ ∂r(t1+ ) ∂v(t1+ )   (∗) + H∗ − prT rÛ − pTv vÛ −∗ δt1 + drT (t1+ ) t1 (∗∗) + prT (t0+ )δr(t0+ ) − prT (t1−∗ )δr(t1−∗ ) + pTv (t0+ )δv(t0+ ) − pTv (t1−∗ )δv(t1−∗ ) T  T # ∫ t −∗ "  1 ∂H(r, v, p) ∂H(r, v, p) + + pÛ r (t) δr + + pÛ v (t) δv dt ∂r ∂v t0+ ∗ ∗ (36) where we use d(·) to denote the difference between the varied path and the optimal path taking into account the differential change in a time instant (i.e., differential in x), for example, dv(t1+ ) = v(t1+ ) − v∗ (t1+∗ ) 11 and δ(·) is the variation, for example, δv(t1∗ ) is the variation of v as an independent variable at t1∗ . Notice that dr(t0− ) = 0, dv(t0− ) = 0 since t0 is fixed. The parts of δ J˜ in (36) marked with asterisks are respectively due to the linear term of ∫ t1−∗ +δt1 t1−∗   H(r, v, p) − prT rÛ − pTv vÛ dt and the first term in the right-hand side of the following equation ∫ t1−∗ t0+ t −∗ prT δÛrdt = prT δr t1+ − 0 ∫ t1−∗ t0+ pÛ rT δrdt obtained by integrating by parts. In order to derive boundary conditions, we next use the following relation dv(t1− ) = δv(t1−∗ ) + vÛ (t1−∗ )δt1 (37) see [23, Section 3.5] and [20, Section 3.3]. In view of the necessary condition δ J˜ = 0 and the fundamental lemma, we have the costate equations pÛ r (t) = − ∂H(r, v, p) , ∂r pÛ v (t) = − ∂H(r, v, p) ∂v (38) Based on the definition of the Hamiltonian function in (35), the costate equation (38) can be rewritten as pÛ r = ∂ µ  µ 3 r pv = − 3 ( 2 rrT − I3×3 )pv, 3 ∂r r r r pÛ v = −pr (39) where I3×3 is the 3 × 3 identity matrix. Using (37) and regrouping terms in (36) yields the following terms or equalities for ∆v1, ∆v2, dv  ∆v0 − qv1 |∆v0 | T ∆v0 T ∆v1 − qv2 ∆v1 |∆v1 |   qTv1 dv(t0+ ) + pTv (t0+ )δv(t0+ ) = qTv1 + pTv (t0+ ) dv(t0+ )    −qTv2 dv(t1− ) − pTv (t1− ) δv(t1−∗ ) + vÛ (t1−∗ )δt1 = − qTv2 + pTv (t1− ) dv(t1− )   ∂gv1 (v(t1+ )) ∂g2 (r(t1+ ), v(t1+ )) qTv2 + γv1 + γ dv(t1+ ) 2 ∗ ∂vT (t1+ ) ∗ ∂vT (t1+ )  (40) As usual, in order to assure δ J˜ = 0, we choose Lagrange multipliers to make the coefficients of ∆v0 , ∆v1 , dv(t0+ ), dv(t1− ), 12 dv(t1+ ) in (40) vanish respectively qv1 − ∆v0 = 0, |∆v0 | pv (t0+ ) + qv1 = 0, qv2 + γv1 qv2 − ∆v1 =0 |∆v1 | pv (t1− ) + qv2 = 0 ∂gv1 (v(t1+ )) ∂g2 (r(t1+ ), v(t1+ )) + γ 2 ∂v(t1+ ) ∗ ∂v(t1+ ) ∗ =0 (41) Applying the similar argument as above for pr gives pr (t0+ ) + qr1 = 0, qr2 + γr1 pr (t1− ) + qr2 = 0 ∂g2 (r(t1+ ), v(t1+ )) ∂gr1 (r(t1+ )) + γ 2 ∂r(t1+ ) ∗ ∂r(t1+ ) ∗ =0 (42) We now choose H(t1− ) to cause the coefficient of δt1 in (36) to vanish H(t1− ) = prT (t1− )v(t1− ) − pTv (t1− ) µ r 3 (t1− ) r(t1− ) = 0 Finally, by solving the first and second component equations of the last vector equation in (41), we obtain the Lagrangian multipliers γv1, γ2 , and then substituting them into the first component equations of the last vector equation in (42) yields the Lagrangian multiplier γr1 . With these Lagrangian multipliers and rearranging the second and third component equations of the last vector equation in (42), we obtain a boundary value equation denoted by  g r(t1+ ), v(t1+ ); pr (t1− ), pv (t1− ) = 0 III.1 Two-point boundary conditions for Problem III.1 (1) r(t0 ) − r0 = 0, (2) p M v (t0+ ) + v(t0+ ) − v(t0− ) − ∆v0 = 0 ∆v0 = 0, |∆v0 | p Mv (t1− ) + ∆v1 =0 |∆v1 | (3) H(t1− ) = 0     r(t1+ ) − r f = 0       (4) v(t + ) − v f = 0  1        r(t1+ ) · v(t1+ ) = 0    (5) g r(t1+ ), v(t1+ ); pr (t1− ), pv (t1− ) = 0 In summary, a complete list including 19 BCs is shown in List III.1 where r(t1+ ) = r(t1− ), v(t1+ ) = v(t1− ) + ∆v1 . 13 C. Multi-point boundary conditions for Problem III.2 Define the augmented cost functional J˜ : = |∆v0 | + |∆v1 |  +   +  T T + qr1 r(t0 ) − r(t0 ) + qr2 r(t1 ) − r(t1− )     + qTv1 v(t0+ ) − v(t0 ) − ∆v0 + qTv2 v(t1+ ) − v(t1− ) − ∆v1 + γr1 gr1 (r(t1+ )) + γv1 gv1 (v(t1+ )) + γ2 gr2 (r(t1+ ), v(t1+ )) ∫ tf ∫ t−   µ   µ 1 T T Û Û prT (v − rÛ ) + pTv − 3 r − vÛ dt + pr (v − r) + pv − 3 r − v dt + r r t1+ t0+ We introduce the Hamiltonian functions for two time sub-intervals [t0+, t1− ] ∪ [t1+, t f ] T Hi (r, v, pi ) := pri v − pTvi µ r, r3  pi = pri T pvi , i = 1, 2 (43) A tedious and similar argument as used in Problem III.1 can be applied to Problem III.2 to derive the costate equations and boundary conditions. The two-phase costate equations are given by pÛ ri (t) = − ∂Hi (r, v, pi ) , ∂r pÛ vi (t) = − ∂Hi (r, v, pi ) , ∂v i = 1, 2 A complete list for boundary conditions is given in List III.2. III.2 31 boundary conditions for Problem III.2 (1)      r(t0 ) − r0 = 0,  v(t0− ) − v(t0+ ) − ∆v0 = 0     r(t1− ) − r(t1+ ) = 0, v(t1− ) − v(t1+ ) − ∆v1 = 0    ∆v1 ∆v0  +  = 0, pv1 (t1− ) + =0  pv1 (t0 ) +  |∆v | |∆v 0 1| (2)     pv2 (t f ) = 0, pr2 (t f ) = 0  T (t − )∆v = 0 (3) H1 (t1− ) − H2 (t1+ ) = 0 or − pr1 1 1    +    r(t1 ) − r f = 0     (4) v(t + ) − v f = 0  1        r(t1+ ) · v(t1+ ) = 0    (5) g r(t1+ ), v(t1+ ); pr1 (t1− ), pr1 (t1+ ), pv1 (t1− ), pv1 (t1+ ) = 0 14 IV. Numerical Examples 7 The magnitude of the primer vector x 10 1 4 3 0.95 2 ry m 1 0.9 0 0.85 −1 −2 0.8 −3 −4 −6 −4 −2 0 2 rx m Fig. 1 4 0.75 6 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 t secon d 7 x 10 1.8 2 4 x 10 The Hohmann transfer and the magnitude of the primer vector In order to use Matlab solver bvp4c or bvp5c to solve two-point and multi-point boundary value problems with unspecified switching time instants in Section III, two time changes must be introduced. For the time change, we refer to, e.g., [20, Appendix A] and [24, Section 3] for details. The solver bvp4c or bvp5c accepts boundary value problems with unknown parameters; see [25] and [26]. Example IV.1 This example in [10, p.25] is used to illustrate that the Hohmann transfer is the solution to Problem III.1. The altitude of the initial circular orbit is 300km, and the desired final orbit is geostationary, that is, its radius is 42164km. By the formulas of the Hohmann transfer, the magnitudes of two velocity impulses are given by ∆v1 = 2.425726280326563e + 03, ∆v2 = 1.466822833675619e + 03 m/s (44) Setting the tolerance of bvp4c equal to 1e-6, we have the solution to the minimum-fuel problem III.1 with an unspecified terminal time given by bvp4c dv1 = 1.0e+03*[0.000000000000804; 2.425726280326426; dv2 = 1.0e+03*[0.000000000000209; -1.466822833675464; 0] 0] Compared with (44), the accuracy of the numerical solution is found to be satisfactory since only the last three digits of fifteen digits after decimal place are different. It is desirable to speed up the computational convergence by scaling the state variables though bvp4c already has a scale procedure. The computation time is about 180 seconds on Intel Core i5 (2.4 GHz, 2 GB). Figure 1 shows the Hohmann transfer and the magnitude of the primer vector. The solution 15 provided by bvp4c depends upon initial values. Figure 2 shows the transfer orbit and the magnitude of the primer vector corresponding to the local minimum given by (24) in the proof of Theorem II.1. 7 The magnitude of the primer vector x 10 1 4 0.9 3 2 0.8 ry m 1 0.7 0 −1 0.6 −2 −3 0.5 −4 −6 −4 −2 0 2 4 Fig. 2 0.4 6 rx m 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 t secon d 7 x 10 1.8 2 4 x 10 The orbit transfer and the magnitude of the primer vector for the local minimum 6 The magnitude of the primer vector x 10 8 1 6 0.8 4 2 ry m 0.6 0 0.4 −2 0.2 −4 −6 0 −8 −1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 rx m Fig. 3 0 1 500 1000 1500 2000 2500 3000 t secon d 7 x 10 The Hohmann transfer and the magnitude of the primer vector Example IV.2 Consider the Hohmann transfer as the multi-point boundary value problem (Problem III.2). The altitudes of the initial and final circular orbits are 200km and 400km respectively. By the formulas of the Hohmann transfer, the magnitudes of two velocity impulses are given by ∆v1 = 58.064987253967857, 16 ∆v2 = 57.631827424189602 (45) The Hohmann transfer time t HT = 2.715594949192177e + 03 seconds, hence we choose the terminal time t f = 2800 seconds. The constants, the initial values of the unknown parameters, and the solver and its tolerance are specified in Table 1. Table 1 Constants Constants and initial values Gravitational constant µ = 3.986e + 14 Earth’s radius Re = 6378145 r0 m v0 m/s The initial values of the state 6578145 0 0 0 7.7843e+03 pv 0 pr The initial values of the costate -0.0012 0 0 0 -0.9 ∆v1 0 ∆v2 The initial values of the velocity impulses 0 102 0 The initial value of the scaled time 0 102 0 0.9 Solver bvp4c Tolerance=1e-7 By trial and error, this example is successfully solved by using bvp4c. We obtain the following solution message The solution was obtained on a mesh of 11505 points. The maximum residual is 4.887e-08. There were 2.2369e+06 calls to the ODE function. There were 1442 calls to the BC function. Elapsed time is 406.320776 seconds. The first velocity impulse vector dv1 = [0.000000000000001, 58.064987253970472, 0] The second velocity impulse vector dv2 = [0.000000000000924, -57.631827424187151, 0] The scaled instant of the second velocity impulse 0.969855338997211 The time instant of the second velocity impulse 2.715594949192190e+03 The maximal error of boundary conditions 4.263256e-13 Figure 3 shows the Hohmann transfer and the magnitude of the primer vector. The magnitude of the velocity and the velocity vector on the vx − vy plane are shown in Figure 4, where the symbol + corresponds to the time instant at which the velocity impulse occurs. We now assume the initial values of the velocity impulses dv10=[0, 45, 0], dv20=[0, -60, 0] 17 The magnitude of the velocity vector The velocity vector 8000 7850 6000 7800 4000 2000 vy m/s 7750 7700 0 −2000 −4000 7650 −6000 0 500 1000 Fig. 4 1500 time second 2000 −8000 −8000 2500 −7000 −6000 −5000 −4000 −3000 vx m/s −2000 −1000 0 1000 The magnitude of the velocity and the velocity vector on the vx − vy plane In stead of bvp4c, we use the other solver bvp5c. Setting Tolerance=1e-6, the solution corresponding to the local minimum is found. The solution was obtained on a mesh of 2859 points. The maximum error is 5.291e-14. There were 809723 calls to the ODE function. There were 1382 calls to the BC function. Elapsed time is 190.920474 seconds. The first velocity impulse vector The second velocity impulse vector dv1 = 1.0e+4*[0.000000000000001, -1.562657038966310, 0] dv2 = 1.0e+4*[0.000000000000011, -1.527946697280544, 0] The scaled instant of the second velocity impulse 0.969855338997205 The time instant of the second velocity impulse 2.715594949192175e+03 The maximal error of boundary conditions 4.403455e-10 Figure 5 shows the orbit transfer and the magnitude of the primer vector corresponding to the local minimum, where the spacecraft starts from the initial point on the initial orbit, moves clockwise along the transfer orbit until the second pulse point, and then travels counterclockwise along the final circle orbit until the terminal point marked with the symbol ×. V. Conclusion In this paper, by a static constrained optimization, we study the global optimality of the Hohmann transfer using a nonlinear programming method. Specifically, an inequality presented by Marec in [10, pp. 21-32] is used to define an inequality constraint, then we formulate the Hohmann transfer problem as a constrained nonlinear programming 18 6 The magnitude of the primer vector x 10 8 1 6 0.8 4 2 ry m 0.6 0 0.4 −2 0.2 −4 −6 0 −8 −1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 rx m Fig. 5 0.6 0.8 0 1 500 1000 1500 2000 2500 3000 t secon d 7 x 10 The orbit transfer and the magnitude of the primer vector corresponding to the local minimum problem. A natural application of the well-known results in nonlinear programming such as the Kuhn-Tucker theorem clearly shows the the global optimality of the Hohmann transfer. In the second part of the paper, we introduce two optimal control problems with two-point and multi-point boundary value constraints respectively. With the help of Matlab solver bvp4c, the Hohmann transfer is solved successfully. Acknowledgments The first author is supported by the National Natural Science Foundation of China (no. 61374084). References [1] Hohmann, W., The Attainability of Heavenly Bodies (1925), NASA Technical Translation F-44, 1960. [2] Barrar, R. B., “An Analytic Proof that the Hohmann-Type Transfer is the True Minimum Two-Impulse Transfer,” Astronautica Acta, Vol. 9, No. 1, 1963, pp. 1–11. [3] Prussing, J. E., and Conway, B. A., Orbital Mechanics, 1st ed., Oxford University Press, 1993. [4] Ting, L., “Optimum Orbital Transfer by Impulses,” ARS Journal, Vol. 30, 1960, pp. 1013–1018. [5] Lawden, D. F., Optimal Trajectories for Space Navigation, Butter Worths, London, 1963. [6] Prussing, J. E., “Primer Vector Theory and Applications,” Spacecraft Trajectory Optimization, edited by B. A. Conway, Cambridge, 2010, Chap. 2, pp. 16–36. [7] Pontani, M., “Simple Method to Determine Globally Optimal Orbital Transfers,” Journal of Guidance, Control, and Dynamics, Vol. 32, No. 3, 2009, pp. 899–914. 19 [8] Moyer, H. G., “Minimum Impulse Coplanar Circle-Ellipse Transfer,” AIAA Journal, Vol. 3, No. 4, 1965, pp. 723–726. [9] Battin, R. H., An Introduction to the Mathematics and Methods of Astrodynamics, AIAA Education Series, AIAA, New York, 1987. [10] Marec, J.-P., Optimal Space Trajectories, Elsevier, New York, 1979. [11] Hazelrigg, G. A., “Globally Optimal Impulsive Transfers via Green’s Theorem,” Journal of Guidance, Control, and Dynamics, Vol. 7, No. 4, 1984, pp. 462–470. [12] Palmore, J. I., “An Elementary Proof the Optimality of Hohmann Transfers,” Journal of Guidance, Control, and Dynamics, Vol. 7, No. 5, 1984, pp. 629–630. [13] Prussing, J. E., “Simple Proof the Global Optimality of the Hohmann Transfer,” Journal of Guidance, Control, and Dynamics, Vol. 15, No. 4, 1992, pp. 1037–1038. [14] Yuan, F., and Matsushima, K., “Strong Hohmann Transfer Theorem,” Journal of Guidance, Control, and Dynamics, Vol. 18, No. 2, 1995, pp. 371–373. [15] Vertregt, M., “Interplanetary orbits,” Journal of the British Interplanetary Society, Vol. 16, 1958, pp. 326–354. [16] Cornelisse, J. W., Schöyer, H. F. R., and Walker, K. F., Rocket Propulsion and Spaceflight Dynamics, Pitman, London, 1979. [17] Gurfil, P., and Seidelmann, P. K., Celestial Mechanics and Astrodynamics Theory and Practice, Springer, 2016. [18] Avendaño, M., Martín-Molina, V., Martín-Morales, J., and Ortigas-Galindo, J., “Algebraic Approach to the Minimum-Cost Multi-Impulse Orbit-Transfer Problem,” Journal of Guidance, Control, and Dynamics, Vol. 39, No. 8, 2016, pp. 1734–1743. [19] Curtis, H. D., Orbital Mechanics for Engineering Students, 3rd ed., Elsevier Ltd., 2014. [20] James M. Longuski, J. J. G., and Prussing, J. E., Optimal Control with Aerospace Applications, Springer, 2014. [21] Avriel, M., Nonlinear Programming: Analysis and Methods, an unabridged republication of the edition published by Prentice-Hall in 1976 ed., Dover Publications Inc., 2003. [22] Bertsekas, D., Nonlinear Programming, 2nd ed., Athena Scientific, 1999. [23] Bryson Jr., A. E., and Ho, Y.-C., Applied Optimal Control, Hemisphere Publishing Corp., London, 1975. [24] Zefran, M., Desai, J. P., and Kumar, V., “Continuous Motion Plans for Robotic Systems with Changing Dynamic Behavior,” The second Int. Workshop on Algorithmic Fundations of Robotics, Toulouse, France, 1996. [25] Shampine, L., Gladwell, I., and Thompson, S., Solving ODEs with Matlab, Cambridge University Press, 2003. [26] Kierzenka, J., “Studies in the numerical solution of ordinary differential equations,” Ph.D. thesis, Department of Mathematics, Southern Methodist University, Dallas, TX., 1998. 20
3cs.SY
KODAIRA FIBRATIONS, KÄHLER GROUPS, AND FINITENESS PROPERTIES MARTIN R. BRIDSON AND CLAUDIO LLOSA ISENRICH Abstract. We construct classes of Kähler groups that do not have finite classifying spaces and are not commensurable to subdirect products of surface groups. Each of these groups is the fundamental group of the generic fibre of a regular holomorphic map from a product of arXiv:1611.09382v1 [math.GT] 28 Nov 2016 Kodaira fibrations to an elliptic curve. In this way, for each integer r ≥ 3, we construct a Kähler group G whose classifying space has a finite r − 1-skeleton but does not have a classifying space with finitely many r-cells. 1. Introduction A Kähler group is a group that can be realised as the fundamental group of a compact Kähler manifold. The question of which finitely presented groups are Kähler was raised by Serre in the 1950s. It has been a topic of active research ever since, but a putative classification remains a distant prospect and constructions of novel examples are surprisingly rare. For an overview of what is known see [1] and [15]. Our main purpose in this paper is to construct new examples of Kähler groups that do not have finite classifying spaces. A group G is of type Fr if it has a classifying space K(G, 1) with finite r-skeleton. The first example of a finitely presented group that is not of type F3 was given by Stallings in 1963 [31]. His example is a subgroup of a direct product of three free groups. Bieri subsequently constructed, for each positive integer n, a subgroup Bn of a direct product of n free groups such that Bn is of type Fn−1 but not of type Fn ; each Bn is the kernel of a map from the ambient direct product to an abelian group. The study of higher finiteness properties of discrete groups is a very active field of enquiry, with generalisations of subgroups of products of free groups playing a central role, e.g. [7], [11, 12]. In particular, it has been recognised that the finiteness properties of subgroups in direct products of surface groups (more generally, residually-free groups) play a dominant role in determining the structure of these subgroups [11]. In parallel, it has been recognised, particularly following the work of Delzant and Gromov [18], that subgroups of direct products of surface groups play an important role in the investigation of Kähler groups (see also [29, 19]). Given this context, it is natural that the first examples of Kähler groups with exotic finiteness properties should have been constructed as the kernels of maps from a product of hyperbolic surface groups to an abelian group. This breakthrough was achieved by Dimca, Papadima and Suciu [20]. Further examples were constructed by Biswas, Mj and Pancholi [9] and by Llosa Isenrich [27]. Our main purpose here is to construct examples of a different kind. 2010 Mathematics Subject Classification. 32J27, 20J05 (32Q15, 20F65). Key words and phrases. Kähler groups, homological finiteness properties, Kodaira fibrations. Bridson is funded by a Wolfson Research Merit Award from the Royal Society. Llosa Isenrich is supported by an EPSRC Research Studentship and by the German National Academic Foundation. 1 2 A Kodaira fibration (also called a regularly fibred surface) is a compact complex surface X that admits a regular holomorphic map onto a smooth complex curve. Topologically, X is the total space of a smooth fibre bundle whose base and fibre are closed 2-manifolds (with restrictions on the holonomy). These complex surfaces bear Kodaira’s name because he [24] (and independently Atiyah [2]) constructed specific non-trivial examples in order to prove that the signature is not multiplicative in smooth fibre bundles. Kodaira fibrations should not be confused with Kodaira surfaces in the sense of [3, Sect. V.5], which are complex surfaces of Kodaira dimension zero that are never Kähler. The new classes of Kähler groups that we shall construct will appear as the fundamental groups of generic fibres of certain holomorphic maps from a product of Kodaira fibrations to an elliptic curve. The first and most interesting family arises from a detailed construction of complex surfaces of positive signature that is adapted from Kodaira’s original construction [24]. In fact, our surfaces are diffeomorphic to those of Kodaira but have a different complex structure. The required control over the finiteness properties of these examples comes from the second author’s work on products of branched covers of elliptic curves [27], which in turn builds on [20]. In order to obviate the concern that our groups might be disguised perturbations of known examples, we prove that no subgroup of finite index can be embedded in a direct product of surface groups. We do this by proving that any homomorphism from the subgroup to a residually-free group must have infinite kernel (Section 6). Theorem 1.1. For each r ≥ 3 there exist Kodaira fibrations Xi , i = 1, . . . , r, and a holomorphic map from X = X1 × ⋯ × Xr onto an elliptic curve E, with generic fibre H, such that the sequence 1 → π1 H → π1 X → π1 E → 1 is exact and π1 H is a Kähler group that is of type Fr−1 but not Fr . Moreover, no subgroup of finite index in π1 H embeds in a direct product of surface groups. We also obtain Kähler groups with exotic finiteness properties from Kodaira fibrations of signature zero. Here the constructions are substantially easier and do not take us far from subdirect products of surface groups. Indeed it is not difficult to see that all of the groups that arise in this setting have a subgroup of finite index that embeds in a direct product of surface groups; it is more subtle to determine when the groups themselves admit such an embedding — this is almost equivalent to deciding which Kodaira fibrations have a fundamental group that is residually free, a problem solved in Section 6. The key criterion is that for a Kodaira fibration Sγ ↪ X→Sg , the preimage in Aut(π1 Sγ ) of the holonomy representation π1 Sg → Out(π1 Sγ ) should be torsion-free (see Theorem 6.10). Here Sg denotes a closed orientable surface of genus g. ki Theorem 1.2. Fix r ≥ 3 and for i = 1, . . . , r let Sγi ↪ Xi → Sgi be a topological surface-bysurface bundle such that Xi admits a complex structure and has signature zero. Assume that γi , gi ≥ 2. Let X = X1 × ⋅ ⋅ ⋅ × Xr . Let E be an elliptic curve and let αi ∶ Sgi → E be branched coverings such that the map ∑ri=1 αi ∶ Sg1 × ⋯ × Sgr → E is surjective on π1 . Then we can equip Xi and Sgi with Kähler structures such that: (1) the maps ki and αi are holomorphic; 3 j (2) the map f ∶= ∑ri=1 αi ○ ki ∶ X → E has connected smooth generic fibre H ↪ X; (3) the sequence j∗ f∗ 1 → π1 H → π1 X → π1 E → 1 is exact; (4) the group π1 H is Kähler and of type Fr−1 , but not Fr ; (5) π1 H has a subgroup of finite index that embeds in a direct product of surface groups. Fibrations of the sort described in Theorem 1.2 have been discussed in the context of Beauville surfaces and, more generally, quotients of products of curves; see Catanese [16], also e.g. [4, Theorem 4.1], [17]. There are some similarities between that work and ours, in particular around the use of fibre products to construct fibrations with finite holonomy, but the overlap is limited. This paper is organised as follows. In Section 2 we generalise a theorem of Dimca, Papadima and Suciu about singular fibrations over elliptic curves to larger classes of fibrations, weakening the assumptions on the singularities. In Section 3 we study Kodaira fibrations of signature zero and prove Theorem 1.2. In Section 4 we turn to the main construction of this paper, describing a new family of complex surfaces. In Section 5 we explain how these surfaces can be used to construct the new Kähler groups described in Theorem 1.1. Finally, in Section 6 we explore the conditions under which the groups we have constructed can be embedded in direct products of surface groups (and residually-free groups). Acknowledgements. We thank Mahan Mj for helpful conversations related to the contents of this paper. 2. Exact sequences associated to fibrations over complex curves Dimca, Papadima and Suciu proved the following theorem and used it to construct the first examples of Kähler groups with arbitrary finiteness properties. Theorem 2.1 ([20], Theorem C). Let X be a compact complex manifold and let Y be a closed Riemann surface of genus at least one. Let h ∶ X → Y be a surjective holomorphic map with ̂ → Ỹ be the pull-back of h under the isolated singularities and connected fibres. Let ̂ h ∶ X universal cover p ∶ Ỹ → Y and let H be the smooth generic fibre of ̂ h (and therefore of h). Then the following hold: ̂ H) = 0 for i ≤ dimH (1) πi (X, h∗ (2) If dimH ≥ 2, then 1 → π1 H → π1 X → π1 Y → 1 is exact. We shall need the following generalisation, which follows from Theorem 2.1(2) by a purely topological argument. Theorem 2.2. Let Y be a closed Riemann surface of positive genus and let X be a compact Kähler manifold. Let f ∶ X → Y be a surjective holomorphic map with connected generic (smooth) fibre H. If f factors as g X f / Z  Y h 4 where g is a regular holomorphic fibration and h is a surjective holomorphic map with connected fibres of complex dimension n ≥ 2 and isolated singularities, then the following sequence is exact f∗ 1 → π1 H → π1 X → π1 Y → 1. Proof. By applying Theorem 2.1 to the map h ∶ Z → Y we get a short exact sequence 1 → π1 H → π1 Z → π1 Y → 1. (2.1) Let p ∈ Y be a regular value such that H = h−1 (p), let j ∶ H ↪ Z be the (holomorphic) inclusion map, let F ⊂ X be the (smooth) fibre of g ∶ X → Z, and identify H = f −1 (p) = g −1 (H). The long exact sequence in homotopy for the fibration F  / H  H begins ⋯ → π2 H → π1 F → π1 H → π1 H → 1(= π0 F ) → ⋯. (2.2) ̂ → Z be the regular covering with Galois group kerh∗ , let ̂ ̂ → Ỹ be a lift of h and, as Let Z h∶Z ̂ in Theorem 2.1, identify H with a connected component of its preimage in Z. ̂ H) In the light of Theorem 2.1(1), the long exact sequence in homotopy for the pair (Z, ̂ for i ≤ dimH − 1 = n − 1 and that the natural map πn H → πn Z ̂ is implies that πi H ≅ πi Z ≅ ̂ → π2 Z is surjective for all n ≥ 2; this map is denoted by η surjective. In particular, π2 H → π2 Z in the following diagram. In this diagram, the first column comes from (2.2), the second column is part of the long exact sequence in homotopy for the fibration g ∶ X → Z, and the bottom row comes from (2.1). The naturality of the long exact sequence in homotopy assures us that the diagram is commutative. We must prove that the second row yields the short exact sequence in the statement of the theorem. π2 H  π1 F κ  π1 H η / π2 Z =  / π1 F ι  1  / π1 H  1 δ  λ / π1 X  / π1 Z f∗ α / π1 Y / 1  / π1 Y  / 1  / 1 We know that δ is injective and η is surjective, so a simple diagram chase (an easy case of the 5-Lemma) implies that the map ι is injective. 5 A further (more involved) diagram chase proves exactness at π1 X, i.e., that Im(ι) = ker(f∗ ).  We will also need the following proposition. Note that the hypothesis on π2 Z → π1 F is automatically satisfied if π1 F does not contain a non-trivial normal abelian subgroup. This is the case, for example, if F is a direct product of hyperbolic surfaces. Proposition 2.3. Under the assumptions of Theorem 2.2, if the map π2 Z → π1 F associated to the fibration g ∶ X → Z is trivial, then (2.2) reduces to a short exact sequence 1 → π1 F → π1 H → π1 H → 1. If, in addition, the fibre F is aspherical, then πi H ≅ πi H ≅ πi X for 2 ≤ i ≤ n − 1. Proof. The commutativity of the top square in the above diagram implies that π2 H → π1 F is trivial, so (2.2) reduces to the desired sequence. If the fibre F is aspherical then naturality of long exact sequences of fibrations and Theorem 2.1(1) imply that we obtain commutative squares / πi X πi H  ≅ πi H ≅  ≅ / πi Z for 2 ≤ i ≤ n − 1. It follows that πi H ≅ πi H ≅ πi X for 2 ≤ i ≤ n − 1.  3. Theorem 1.2 and Kodaira fibrations of signature zero In this section we will prove Theorem 1.2. In order to explain the construction of the Kähler metrics implicit in the statement, we need to first recall a construction of the second author [27] that provides the seed from which the failure of type Fn in Theorem 1.2 derives. Notation. We write Σg to denote the closed orientable surface of genus g. 3.1. The origin of the lack of finiteness. The first examples of Kähler groups with exotic finiteness properties were constructed by Dimca, Papadima and Suciu in [20] by considering a particular map from a product of hyperbolic surfaces to an elliptic curve. The following construction of the second author [27] extends their result to a much wider class of maps. Let E be an elliptic curve, i.e. a 1-dimensional complex torus that embeds in projective space, and for i = 1, . . . , r let hi ∶ Σgi → E be a branched cover, where each gi ≥ 2. Endow Σgi with the complex structure that makes hi holomorphic. Let Z = Σg1 × ⋯ × Σgr . Using the additive structure on E, we define a surjective map with isolated singularities and connected fibres r h = ∑ hi ∶ Z → E. i=1 In this setting, we have the following criterion describing the finiteness properties of the generic fibre of h: 6 Theorem 3.1 ([27], Theorem 1.1). If h∗ ∶ π1 Z → π1 E is surjective, then the generic fibre H of h is connected and its fundamental group π1 H is a projective (hence Kähler) group that is of type Fr−1 but not of type Fr . Furthermore, the sequence h∗ 1 → π1 H → π1 Z → π1 E → 1 is exact. 3.2. Kodaira Fibrations. The following definition is equivalent to the more concise one that we gave in the introduction. Definition 3.2. A Kodaira fibration X is a Kähler surface (real dimension 4) that admits a regular holomorphic surjection X → Σg . The fibre of X → Σg will be a closed surface, Σγ say. Thus, topologically, X is a Σγ -bundle over Σg . We require g, γ ≥ 2. The nature of the holonomy in a Kodaira fibration is intimately related to the signature σ(X), which is the signature of the bilinear form ⋅ ∪ ⋅ ∶ H 2 (X, R) × H 2 (X, R) → H 4 (X, R) ≅ R given by the cup product. 3.3. Signature zero: groups commensurable to subgroups of direct products of surface groups. We will make use of the following theorem of Kotschick [25] and a detail from his proof. Here, Mod(Σg ) denotes the mapping class group of Σg . Theorem 3.3. Let X be a (topological) Σγ -bundle over Σg where g, γ ≥ 2. Then the following are equivalent: (1) X can be equipped with a complex structure and σ(X) = 0; (2) the monodromy representation ρ ∶ π1 Σg → Out(π1 Σγ ) = Mod(Σγ ) has finite image. The following is an immediate consequence of the proof of Theorem 3.3 in [25]. Addendum 3.4. If either of the equivalent conditions in Theorem 3.3 holds, then for any complex structure on the base space Σg there is a Kähler structure on X with respect to which the projection X → Σg is holomorphic. We are now in a position to construct the examples promised in Theorem 1.2. Fix r ≥ 3 and for i = 1, ⋯, r let Xi be the underlying manifold of a Kodaira fibration with base Σgi and fibre Σγi . Suppose that σ(Xi ) = 0. Let Z = Σg1 × ⋯ × Σgr . We fix an elliptic curve E and choose branched coverings hi ∶ Σgi → E so that h ∶= ∑i hi induces a surjection h∗ ∶ π1 Z → π1 E. We endow Σgi with the complex structure that makes hi holomorphic and use Addendum 3.4 to choose a complex structure on Xi that makes pi ∶ Xi → Σgi holomorphic. Let X = X1 × . . . Xr and let p ∶ X → Z be the map that restricts to pi on Xi . Theorem 3.5. Let p ∶ X → Z and h ∶ Z → E be the maps defined above, let f = h ○ p ∶ X → E and let H be the generic smooth fibre of f . Then π1 H is a Kähler group of type Fr−1 that is not of type Fr and there is a short exact sequence f∗ 1 → π1 H → π1 X → π1 E = Z2 → 1. Moreover, π1 H has a subgroup of finite index that embeds in a direct product of surface groups. 7 We shall need the following well known fact. Lemma 3.6. Let N be a group with a finite classifying space and assume that there is a short exact sequence 1 → N → G → Q → 1. Then G is of type Fn if and only if Q is of type Fn . Proof. See [8, Proposition 2.7].  Proof of Theorem 3.5. By construction, the map f = p ○ h ∶ X → E satisfies the hypotheses of Theorem 2.2. Moreover, since Z is aspherical, π2 Z = 0 and Proposition 2.3 applies. Thus, writing H for the generic smooth fibre of f and H for the generic smooth fibre of h, we have short exact sequences 1 → π1 H → π1 X → π1 E = Z2 → 1 and 1 → π1 Σγ1 × ⋯ × π1 Σγr → π1 H → π1 H → 1. The product of the closed surfaces Σγi is a classifying space for the kernel in the second sequence, so Lemma 3.6 implies that π1 H is of type Fk if and only if π1 H is of type Fk . Theorem 3.1 tells us that π1 H is of type Fr−1 and not of type Fr . Finally, the group π1 H is clearly Kähler, since it is the fundamental group of the compact Kähler manifold H. To see that π1 H is commensurable to a subgroup of a direct product of surface groups, note that the assumption σ(Xi ) = 0 implies that the monodromy representation ρi ∶ π1 Σgi → Out(π1 Σγi ) is finite, and hence π1 Xi contains the product of surface groups Γi = π1 Σγi × kerρi as a subgroup of finite index. (Here we are using the fact that the centre of Σγi is trivial – cf. Corollary 8.IV.6.8 in [14]). The required subgroup of finite index in π1 H is its intersection with Γ1 × ⋅ ⋅ ⋅ × Γr .  In the light of Theorem 3.5, all that remains unproved in Theorem 1.2 is the assertion that in general π1 H is not itself a subgroup of a product of surface groups. We shall return to this point in the last section of the paper. 4. New Kodaira Fibrations XN,m In 1967 Kodaira [24] constructed a family of complex surfaces MN,m that fibre over a complex curve but have positive signature. (See [2] for a very similar construction by Atiyah.) We shall produce a new family of Kähler surfaces XN,m that are Kodaira fibrations. We do so by adapting Kodaira’s construction in a manner designed to allow appeals to Theorems 2.2 and 3.1. This is the main innovation in our construction of new families of Kähler groups. Our surface XN,m is diffeomorphic to Kodaira’s surface MN −1,m but it has a different complex structure. Because signature is a topological invariant, we can appeal to Kodaira’s calculation of the signature σ(XN,m ) = 8m4N ⋅ N ⋅ m ⋅ (m2 − 1)/3. (4.1) The crucial point for us is that σ(XN,m ) is non-zero. It follows from Theorem 3.3 that the monodromy representation associated to the Kodaira fibration XN,m → Σ has infinite image, from which it follows that the Kähler groups with exotic finiteness properties constructied in 8 Theorem 5.6 are not commensurable to subgroups of direct products of surface groups, as we shall see in Section 6. 4.1. The construction of XN,m . Kodaira’s construction of his surfaces MN,m begins with a regular finite-sheeted covering of a higher genus curve S → R. He then branches R × S along the union of two curves: one is the graph of the covering map and the other is the graph of the covering map twisted by a certain involution. We shall follow this template, but rather than beginning with a regular covering, we begin with a carefully crafted branched covering of an elliptic curve; this is a crucial feature, as it allows us to apply Theorems 2.2 and 3.1. Our covering is designed to admit an involution that allows us to follow the remainder of Kodaira’s argument. Let E = C/Λ be an elliptic curve. Choose a finite set of (branching) points B = {b1 , ⋯, b2N } ⊂ E and fix a basis µ1 , µ2 of Λ ≅ π1 E ≅ Z2 represented by loops in E ∖ B. Let pE ∶ E → E be the double covering that the Galois correspondence associates to the homomorphism Λ → Z2 that kills µ1 . Let µ1 be the unique lift to E of µ1 (it has two components) and let µ2 be the unique lift of 2 ⋅ µ2 . Note that π1 E is generated by µ2 and a component of µ1 . E has a canonical complex structure making it an elliptic curve and the covering map is holomorphic with respect to this complex structure. Let τE ∶ E → E be the generator of the Galois group; it is holomorphic and interchanges the components of E ∖ µ1 . Denote by B (1) and B (2) the preimages of B in the two distinct connected components of E ∖ µ1 . The action of τE interchanges these sets. Choose pairs of points in {b2k−1 , b2k } ⊂ B, k = 1, ⋯, N , connect them by disjoint arcs γ1 , ⋯, γN 2 1 the arcs joining points in B (1) and by γ12 , ⋯, γN and lift these arcs to E. Denote by γ11 , ⋯, γN the arcs joining points in B (2) . Next we define a 3-fold branched covering of E as follows. Take three copies F1 , F2 and F3 of E ∖ (B (1) ∪ B (2) ) identified with E ∖ (B (1) ∪ B (2) ) via maps j1 , j2 and j3 . We obtain surfaces 2 G1 , G2 and G3 with boundary by cutting F1 along all of the arcs γ12 , ⋯, γN , cutting F2 along i 1 1 the all arcs γk , i = 1, 2, k = 1, ⋯, N and cutting F3 along the arcs γ1 , ⋯, γN . Identify the two copies of the arc γk1 in F2 with the two copies of the arc γk1 in F3 and identify the two copies of the arc γk2 in F2 with the two copies of the arc γk2 in F1 in the unique way that makes the continuous map pE ∶ G1 ∪ G2 ∪ G3 ↦ E ∖ (B (1) ∪ B (2) ) induced by the identifications of Fi with E ∖ (B (1) ∪ B (2) ) a covering map. Figure 1 illustrates this covering map. The map pE clearly extends to a 3-fold branched covering map from the closed surface R2N +1 of genus 2N + 1, obtained by closing the cusps of G1 ∪ G2 ∪ G3 , to E. By slight abuse of notation we also denote this covering map by pE ∶ R2N +1 → E. There is a unique complex structure on R2N +1 making the map pE holomorphic. The map τE induces a continuous involution τ2 ∶ G2 → G2 and a continuous involution τ1,3 ∶ G1 ⊔ G3 → G1 ⊔ G3 without fixed points: these are defined by requiring the following 9 Figure 1. R2N +1 as branched covering of E together with the involution τE diagrams to commute τ2 G2 j2 E ∖ (B  (1) / G2 j2 ∪B (2) ) τE  / E ∖ (B (1) ∪ B (2) ) 10 τ1,3 G1 j1 E ∖ (B j3  (1) ∪B (2) ) τE  / E ∖ (B (1) ∪ B (2) ) τ1,3 G3 j3 / G3 / G1 j1  E ∖ (B (1) ∪ B (2) ) τE  / E ∖ (B (1) ∪ B (2) ) wherein ji denotes the unique continuous extension of the original identification ji ∶ Fi → E ∖ (B (1) ∪ B (2) ). The maps τ2 and τ1,3 coincide on the identifications of G1 ⊔ G3 with G2 and thus descend to (1) (1) a continuous involution R2N +1 ∖ p−1 ∪ B (2) ) → R2N +1 ∖ p−1 ∪ B (2) ) which extends to E (B E (B a continuous involution τR ∶ R2N +1 → R2N +1 . Consider the commutative diagram (1) R2N +1 ∖ p−1 ∪ B (2) ) E (B pE E ∖ (B  (1) τR / R2N +1 ∖ p−1 (B (1) ∪ B (2) ) E pE ∪B (2) ) τE  / E ∖ (B (1) ∪ B (2) ) As pE is a holomorphic unramified covering onto E ∖ (B (1) ∪ B (2) ) and τE is a holomorphic deck transformation mapping E ∖ (B (1) ∪ B (2) ) onto itself, we can locally express τR as the composition of holomorphic maps p−1 E ○ τE ○ pE and therefore τR is itself holomorphic. Since τR extends continuously to R2N +1 , it is holomorphic on R2N +1 , by Riemann’s Theorem on removable singularities. By definition τR ○ τR = Id. Thus τR ∶ R2N +1 → R2N +1 defines a holomorphic involution of R2N +1 without fixed points. We have now manoeuvred ourselves into a situation whereby we can mimic Kodaira’s construction. We replace the surface R in Kodaira’s construction [24, p.207-208] by R2N +1 and the involution τ in Kodaira’s construction by the involution τR . The adaptation is straightforward, but we shall recall the argument below for the reader’s convenience. First though, we note that it is easy to check that for m ≥ 2 we obtain a complex surface that is homeomorphic to the surface MN −1,m constructed by Kodaira, but in general our surface will have a different complex structure. We denote this new complex surface XN,m . Arguing as in the proof of [25, Proposition 1], we see that XN,m is Kähler. 4.2. Completing the Kodaira construction. Let α1 , β1 , ⋯, α2N +1 , β2N +1 denote a standard set of generators of π1 R2N +1 satisfying the relation [α1 , β1 ] ⋯ [α2N +1 , β2N +1 ] = 1, chosen so that the pairs α1 , β1 , α2 , β2 and α3 , β3 correspond to the preimages of µ1 and µ2 in G1 , G2 and G3 (with tails connecting these loops to a common base point). For m ∈ Z consider the m2g -fold covering qR ∶ S → R2N +1 corresponding to the homomorphism π1 R2N +1 → (Z/mZ)2g αi ↦ (0, ⋯, 0, 12i−1 , 0, 0, ⋯, 0) βi ↦ (0, ⋯, 0, 0, 12i , 0, ⋯, 0), (4.2) 11 where 1i is the generator in the i-th factor. By multiplicativity of the Euler characteristic, we see that the genus of S is 2N ⋅ m2g + 1. To simplify notation we will from now on omit the index R in qR and τR , as well as the index 2N + 1 in R2N +1 , and we denote the image τ (r) of a point r ∈ R by r∗ . Let q ∗ = τ ○ q ∶ S → R, let W = R × S and let Γ = {(q(u), u) ∣ u ∈ S} , Γ∗ = {(q ∗ (u), u) ∣ u ∈ S} be the graphs of the holomorphic maps q and q ∗ . Let W ′′ = W ∖ (Γ ∪ Γ∗ ). The complex surface XN,m is an m-fold branched covering of W branched along Γ and Γ∗ . Its construction makes use of [24, p.209,Lemma]: Lemma 4.1. Fix a point u0 ∈ S, identify R with R × u0 and let D be a small disk around t0 = q(u0 ) ∈ R. Denote by γ the positively oriented boundary circle of D. Then γ generates a cyclic subgroup ⟨γ⟩ of order m in H1 (W ′′ , Z) and H1 (W ′′ , Z) ≅ H1 (R, Z) ⊕ H1 (S, Z) ⊕ ⟨γ⟩. (4.3) The proof of this lemma is purely topological and in particular makes no use of the complex structure on W ′′ . From a topological point of view our manifolds and maps are equivalent to Kodaira’s manifolds and maps, i.e. there is a homeomorphism that makes all of the obvious diagrams commute. The composition of the isomorphism (4.3) with the abelianization π1 W ′′ → H1 (W ′′ , Z) induces an epimorphism π1 W ′′ → ⟨γ⟩. Consider the m-sheeted covering X ′′ → W ′′ corresponding to the kernel of this map and equip X ′′ with the complex structure that makes the covering map holomorphic. The covering extends to an m-fold ramified covering on a closed complex surface XN,m with branching loci Γ and Γ∗ . The composition of the covering map XN,m → W and the projection W = R × S → S induces a regular holomorphic map ψ ∶ XN,m → S with complex fibre R′ = ψ −1 (u) a closed Riemann surface that is an m-sheeted branched covering of R with branching points q(u) and q ∗ (u) of order m. The complex structure of the fibres varies: each pair of fibres is homeomorphic but not (in general) biholomorphic. 5. Construction of Kähler groups We fix an integer m ≥ 2 and associate to each r-tuple of positive integers N = (N1 , ⋯, Nr ) with r ≥ 3 the product of the complex surfaces XNi ,m constructed in the previous section: X(N, m) = XN1 ,m × ⋅ ⋅ ⋅ × XNr ,m . Each XNi ,m was constructed to have a holomorphic projection ψi ∶ XNi ,m → Si with fibre Ri′ . By construction, each of the Riemann surfaces Si comes with a holomorphic map fi = pi ○ qi , where pi = pE,i ∶ R2Ni +1 → E and qi = qR,i ∶ Si → R2Ni +1 . We also need the homomorphism defined in (4.2), which we denote by θi . We want to determine what fi∗ (π1 Si ) ⊴ π1 E is. By definition qi∗ (π1 Si ) = ker(θi ), so fi∗ (π1 Si ) = pi∗ (kerθi ). The map θi factors through the abelianization H1 (Ri , Z) of π1 Ri , yielding θi ∶ H1 (Ri , Z) → (Z/mZ)2gi , which has the same image in H1 (E, Z) = π1 E as fi∗ (π1 Si ). 12 Now, kerθi = ⟨m ⋅ [α1 ] , m ⋅ [α1 ] , m ⋅ [β1 ] , ⋯, m ⋅ [α2Ni +1 ] , m ⋅ [β2Ni +1 ]⟩ ≤ H1 (Ri , Z). and αj , βj were chosen such that for 1 ≤ i ≤ r we have ⎧ ⎧ ⎪ ⎪ ⎪ µ1 , if j ∈ {1, 2, 3} ⎪ µ2 , if j ∈ {1, 2, 3} pi∗ [αj ] = ⎨ and pi∗ [βj ] = ⎨ . ⎪ ⎪ ⎪ ⎪ ⎩ 0 , else ⎩ 0 , else (Here we have abused notation to the extent of writing µ1 for the unique element of π1 E = H1 E determined by either component of the preimage of µ1 in E.) Thus, fi∗ (π1 Si ) = ⟨m ⋅ µ1 , m ⋅ µ2 ⟩ ≤ π1 E. (1) (2) (5.1) (3) There are three loops that are lifts µ1,i , µ1,i , µ1,i of µ1 with respect to pi (regardless of the (j) choice of basepoint µ1,i (0) ∈ p−1 i (µ1 (0))). The same holds for µ2 . And by choice of αj , βj for (j) j ∈ {1, 2, 3}, we have [µ1 ] = [αj ] ∈ H1 (Ri , Z) after a permutation of indices. Denote by qE ∶ E ′ → E the m2 -sheeted covering of E corresponding to the subgroups fi∗ (π1 Si ). Endow E ′ with the unqiue complex structure making qE holomorphic. By (5.1) the covering and the complex structure are independent of i. Since fi∗ (π1 Si ) = qE∗ (π1 E ′ ) there is an induced surjective map fi′ ∶ Si → E ′ making the diagram Si fi′ qi / Ri  fi E′ qE  (5.2) pi / E commutative. The map fi′ is surjective and holomorphic, since fi is surjective and holomorphic and qE is a holomorphic covering map. −1 Lemma 5.1. Let B ′ = qE (B), BSi = fi−1 (B) = fi −1 (B ′ ). Let µ′1 , µ′2 ∶ [0, 1] → E ′ ∖ B ′ be loops m ′ that generate π1 E ′ and are such that qE ○ µ′1 = µm 1 , qE ○ µ 2 = µ 2 . Then the restriction fi′ ∶ Si ∖ BSi → E ′ ∖ B ′ is an unramified finite-sheeted covering map and all lifts of µ′1 and µ′2 with respect to fi′ are loops in Si ∖ BSi . ′ Proof. Since fi and qE are unramified coverings over E ∖B, it follows from the commutativity of diagram (5.2) that the restriction fi′ ∶ Si ∖ BSi → E ′ ∖ B ′ is an unramified finite-sheeted covering map. For the second part of the statement it suffices to consider µ′1 , since the proof of the statement for µ′2 is completely analogous. Let y0 = µ′1 (0), let x0 ∈ f ′−1 (y0 ) and let ν1 ∶ [0, 1] → Si ∖ BSi be the unique lift of µ′1 with respect to fi′ with ν1 (0) = x0 . Since qi is a covering map it suffices to prove that qi ○ ν1 is a loop in Ri based at z0 = qi (x0 ) such that its unique lift based at x0 with respect to qi is a loop in Si . By the commutatitivity of diagram (5.2) and the definition of µ′1 , ′ ′ µm 1 = qE ○ µ1 = qE ○ fi ○ ν1 = pi ○ qi ○ ν1 . 1 m But the unique lift of µm 1 with starting at z0 is given by (µj0 ) where j0 ∈ {1, 2, 3} is uniquely (1) determined by µj0 (0) = z0 . Uniqueness of path-lifting gives (1) qi ○ ν1 = (µj0 )m . 13 (1) Thus (µj0 )m ∈ kerθi = fi∗ (π1 Si ). Now, kerθi is normal in π1 Ri and qi ∶ Si → Ri is an unramified (1) covering map, so all lifts of (µj0 )m to Si are loops. In particular ν1 is a loop in Si .  Definition 5.2. A branched covering α ∶ S → T 2 of a 2-torus T 2 with finite branch locus B ⊂ T 2 purely-branched if there are loops η1 , η2 in T 2 ∖ B that generate π1 T 2 and are such that the normal closure of {η1 , η2 } in π1 T 2 ∖ B satisfies ⟨⟨η1 , η2 ⟩⟩ ≤ α∗ (π1 (S ∖ α−1 (B))). Lemma 5.1 and the comment after [27, Definition 2.2] imply Corollary 5.3. The holomorphic maps fi′ ∶ Si → E ′ are purely-branched covering maps for 1 ≤ i ≤ r. In particular, the maps fi′ induce surjective maps on fundamental groups. Remark 5.4. The second author of this paper introduced invariants for the Kähler groups arising in Theorem 3.1 and showed that these invariants lead to a complete classification of these groups in the special case where all the coverings are purely-branched. Thus Corollary 5.3 ought to help in classifying the groups that arise from our construction. We shall return to this point elsewhere. Let ZN,m = S1 × ⋯ × Sr . Using the additive structure on the elliptic curve E ′ we combine the maps fi′ ∶ Si → E ′ to define h′ ∶ ZN,m → E ′ by r h ∶ (x1 , ⋯, xr ) ↦ ∑ fi′ (xi ). i=1 Lemma 5.5. For all m ≥ 2, all r ≥ 3 and all N = (N1 , . . . , Nr ), the map h ∶ ZN,m → E ′ has isolated singularities and connected fibres. Proof. By construction, fi′ is non-singular on Si ∖ BSi and BSi is a finite set. Therefore, the set of singular points of h′ is contained in the finite set BS1 × ⋯ × BSr . In particular, h′ has isolated singularities. Corollary 5.3 implies that the fi′ induce surjective maps on fundamental groups, so we can apply Theorem 3.1 to conclude that h′ has indeed connected fibres.  Finally, we define g ∶ XN,m → ZN,m to be the product of the fibrations ψi ∶ XNi ,m → Si and we define f = h′ ○ g ∶ XN,m → E ′ . Note that g is a smooth fibration with fibre FN,m ∶= R1′ × ⋅ ⋅ ⋅ × Rr′ . With this notation established, we are now able to prove: Theorem 5.6. Let f ∶ XN,m → E ′ be as above, let H N,m ⊂ XN,m be the generic smooth fibre of f , and let HN,m be its image in ZN,m . Then: (1) π1 H N,m is a Kähler group that is of type Fr−1 but not of type Fr ; 14 (2) there are short exact sequences g∗ 1 → π1 FN,m → π1 H N,m → π1 HN,m → 1 and f∗ 1 → π1 H N,m → π1 XN,m → Z2 → 1, such that the monodromy representations π1 HN,m → Out(π1 FN,m ) and Z2 → Out(π1 FN,m ) both have infinite image; (3) No subgroup of finite index in π1 H N,m embeds in a direct product of surface groups (or of residually free groups). Proof. We have constructed H N,m as the fundamental group of a Kähler manifold, so the first assertion in (1) is clear. We argued above that all of the assumptions of Theorem 2.2 are satisfied, and this yields the second short exact sequence in (2). Moreover, ZN,m = S1 × ⋯ × Sr is aspherical, so Proposition 2.3 applies: this yields the first sequence. FN,m is a finite classifying space for its fundamental group, so by applying Lemma 3.6 to the first short exact sequence in (2) we see that π1 H N,m is of type Fn if and only if π1 HN,m is of type Fn . Theorem 3.1 tells us that π1 HN,m is of type Fr−1 but not of type Fr . Thus (1) is proved. The holonomy representation of the fibration H N,m → HN,m is the restriction ν = (ρ1 , ⋯, ρr )∣π1 HN,m ∶ π1 HN,m → Out(π1 R1′ ) × ⋯ × Out(π1 Rr′ ) where ρi is the holonomy of XNi ,m → Si . Since the branched covering maps fi′ are surjective on fundamental groups it follows from the short exact sequence induced by h′ that the projection of ν(π1 H) to Out(π1 Ri′ ) is ρi (π1 Si ). In particular, the map ν has infinite image in Out(π1 F ) as each of the ρi do. This proves (2). Assertion (3) follows immediately from (2) and the group theoretic Proposition 6.3 below.  Remark 5.7 (Explicit presentations). The groups π1 H N,m constructed above are fibre products over Z2 . Therefore, given finite presentations for the groups π1 XNi ,m , 1 ≤ i ≤ r, we could apply an algorithm developed by the first author, Howie, Miller and Short [12] to construct explicit finite presentations for our examples. An implementation by the second author in a similar situation [26] demonstrates the practical nature of this algorithm. 6. Commensurability to direct products Each of the new Kähler groups Γ ∶= π1 H constructed in Theorems 1.1 and 1.2 fits into a short exact sequence of finitely generated groups 1 → ∆ → Γ → Q → 1, (6.1) where ∆ = Σ1 × ⋯ × Σr is a product of r ≥ 1 closed surface groups Σi of genus gi ≥ 2. Such short exact sequences arise whenever one has a fibre bundle whose base B has fundamental group Q and whose fibre F is a product of surfaces: the short exact sequence is the beginning of the long exact sequence in homotopy, truncated using the observation that since ∆ has no non-trivial normal abelian subgroups, the map π2 B → π1 F is trivial. For us, the fibration in question is H → H, and (6.1) is a special case of the sequence in Proposition 2.3. 15 In the setting of Theorem 1.1, the holonomoy representation Q → Out(∆) has infinite image, and in the setting of Theorem 1.2 it has finite image. In order to complete the proofs of the theorems stated in the introduction, we must determine (i) when groups such as Γ can be embedded in a product of surface groups, (ii) when they contain subgroups of finite index that admit such embeddings, and (iii) when they are commensurable with residually free groups. In this section we shall answer each of these questions. 6.1. Residually free groups and limit groups. A group G is residually free if for every element g ∈ G ∖ {1} there is a free group Fr on r generators and a homomorphism  ∶ G → Fr such that (g) ≠ 1. A group G is a limit group (equivalently, fully residually free) if for every finite subset S ⊂ G there is a homomorphism to a free group φS ∶ G → F such that the restriction of φS to S is injective. It is easy to see that direct products of residually free groups are residually free. In contrast, the product of two or more non-abelian limit groups is not a limit group. Limit groups are a fascinating class of groups that have been intensively studied in recent years at the confluence of geometry, group theory and logic [30, 23]. They admit several equivalent definitions, the equivalence of which confirms the aphorism that, from many different perspectives, they are the natural class of “approximately free groups”. A finitely generated group is residually free if and only if it is a subgroup of a direct product of finitely many limit groups [6] (see also [12]). All hyperbolic surface groups are limit groups [5] except Γ−1 = ⟨a, b, c ∣ a2 b2 c2 ⟩, the fundamental group of the non-orientable closed surface with euler characteristic −1, which is not residually free: in a free group, any triple of elements satisfying the equation x2 y 2 = z 2 must commute [28], so [a, b] lies in the kernel of every homomorphism from Γ−1 to a free group. 6.2. Infinite holonomy. Proposition 6.1. If the holonomy representation Q → Out(∆) associated to (6.1) has infinite image, then no subgroup of finite index in Γ is residually free, and therefore Γ is not commensurable with a subgroup of a direct product of surface groups. Proof. Any automorphism of ∆ = Σ1 × ⋯ × Σr must leave the set of subgroups {Σ1 , ⋯, Σr } invariant (cf. [13, Prop.4 ]). Thus Aut(∆) contains a subgroup of finite index that leaves each Σi invariant and O = Out(Σ1 ) × ⋅ ⋅ ⋅ × Out(Σr ) has finite index in Out(∆). Let ρ ∶ Q → Out(∆) be the holonomy representation, let Q0 = ρ−1 (O), and let ρi ∶ Q0 → Out(Σi ) be the obvious restriction. If the image of ρ is infinite, then the image of at least one of the ρi is infinite. Infinite subgroups of mapping class groups have to contain elements of infinite order (e.g.[21, Corollary 5.14]), so it follows that Γ contains a subgroup of the form M = Σi ⋊α Z, where α has infinite order in Out(Σi ). If Γ0 is any subgroup of finite index in Γ, then M0 = Γ0 ∩ M is again of the form Σ ⋊β Z, where Σ = Γ0 ∩ Σi is a hyperbolic surface group and β ∈ Out(Σ) (which is the restriction of α) has infinite order. M0 is the fundamental group of a closed aspherical 3-manifold that does not virtually split as a direct product, and therefore it cannot be residually free, by Theorem A of [11]. As any subgroup of a residually free group is residually free, it follows that Γ0 is not residually free. For the reader’s convenience, we give a more direct proof that M0 is not residually free. If it were, then by [6] it would be a subdirect product of limit groups Λ1 × ⋅ ⋅ ⋅ × Λt . Projecting 16 away from factors that M0 does not intersect, we may assume that Λi ∩ M0 ≠ 1 for all i. As M0 does not contain non-trivial normal abelian subgroups, it follows that the Λi are non-abelian. As limit groups are torsion-free and M0 does not contain Z3 , it follows that t ≤ 2. Replacing each Λi by the coordinate projection pi (M0 ), we may assume that M0 < Λ1 × Λ2 is a subdirect product (i.e. maps onto both Λ1 and Λ2 ). Then, for i = 1, 2, the intersection M0 ∩ Λi is normal in Λi = pi (M0 ). Non-abelian limit groups do not have non-trivial normal abelian subgroups, so Ii = M0 ∩ Λi is non-abelian. But any non-cyclic subgroup of M0 must intersect Σ, so I1 ∩ Σ and I2 ∩ Σ are infinite, disjoint, commuting, subgroups of Σ. This contradict the fact that Σ is hyperbolic.  Corollary 6.2. The group π1 H constructed in Theorem 1.1 is not commensurable with a subgroup of a direct product of surface groups. 6.3. Finite holonomy. When the holonomy Q → Out(∆) is finite, it is easy to see that Γ is virtually a direct product. Proposition 6.3. In the setting of (6.1), if the holonomy representation Q → Out(∆) is finite, then Γ has a subgroup of finite index that is residually free [respectively, is a subgroup of a direct product of surface groups] if and only if Q has such a subgroup of finite index. Proof. Let Q1 be the kernel of Q → Out(∆) and let Γ1 < Γ be the inverse image of Q1 . Then, as the centre of ∆ is trivial, Γ1 ≅ ∆ × Q1 . Every subgroup of a residually free is residually free, and the direct product of residually free groups is residually free. Thus the proposition follows from the fact that surface groups are residually free.  Corollary 6.4. Each of the groups π1 H constructed in Theorem 1.2 has a subgroup of finite index that embeds in a direct product of finitely many surface groups. Proof. Apply the proposition to each of the Kodaira fibrations Xi in Theorem 1.2 and intersect the resulting subgroup of finite index in π1 X1 × ⋅ ⋅ ⋅ × π1 Xr with π1 H.  6.4. Residually-Free Kähler groups. We begin with a non-trivial example of a Kodaira surface whose fundamental group is residually-free. Example 6.5. Let G be any finite group and for i = 1, 2 let qi ∶ Σi → G be an epimorphism from a hyperbolic surface group Σi = π1 Si . Let P < Σ1 × Σ2 be the fibre product, i.e. P = {(x, y) ∣ q1 (x) = q2 (y)}. The projection onto the second factor pi ∶ P → Σ2 induces a short exact sequence 1 → Σ′1 → P → Σ2 → 1 with Σ′1 = kerq1 ⊴ Σ1 a finite-index normal subgroup. The action of P by conjugation on Σ1 defines a homomorphism Σ2 → Out(Σ′1 ) that factors through q2 ∶ Σ1 → G = Σ1 /Σ′1 . Let S1′ → S1 be the regular covering of S1 corresponding to Σ′1 ⊴ Σ1 . Nielsen realisation [22] realises the action of Σ2 on Σ′1 as a group of diffeomorphisms of S1′ , and thus we obtain a smooth surface-by-surface bundle X with π1 X = P , that has fibre S1′ , base S2 and holonomy representation q2 . Theorem 3.3 and Addendum 3.4 imply that X can be endowed with the structure of a Kodaira surface. 17 Our second example illustrates the fact that torsion-free Kähler groups that are virtually residually-free need not be residually-free. Example 6.6. Let Rg be a closed orientable surface of genus g and imagine it as the connected sum of g handles placed in cyclic order around a sphere. We consider the automorphism that rotates this picture through 2π/g. Algebraically, if we fix the usual presentation π1 Rg = ⟨α1 , β1 , ⋯, αg , βg ∣ [α1 , β1 ] ⋯ [αg , βg ]⟩, this rotation (which has two fixed points) defines an automorphism φ that sends αi ↦ αi+1 , βi ↦ βi+1 for 1 ≤ i ≤ g − 1 and αg ↦ α1 , βg ↦ β1 . Thus ⟨φ⟩ ≤ Aut(π1 Rg ) is a cyclic subgroup of order g. Let Th be an arbitrary closed surfaces of genus h ≥ 2 and let ρ ∶ π1 Th → ⟨φ⟩ ≅ Z/gZ ≤ Out(π1 Rg ) be the map defined by sending each element of a standard symplectic basis for H1 (π1 Th , Z) to φ ∶= φ ⋅ Inn(π1 Rg ). Consider a Kodaira fibration Rg ↪ X ′ → Th with holonomy ρ. It follows from Lemma 6.7 that π1 X ′ is not residually free. And it follows from Theorem 6.10 that if the Kodaira surfaces in Theorem 3.5 are of this form then the Kähler group π1 H is not residually free. Lemma 6.7. Let S be a hyperbolic surface group and let G be a group that contains S as a normal subgroup. The following conditions are equivalent: (i) the image of the map G → Aut(S) given by conjugation is torsion-free and the image of G → Out(S) is finite; (ii) one can embed S as a normal subgroup of finite index in a surface group Σ so that G → Aut(S) factors through Inn(Σ) → Aut(S). Proof. If (i) holds then the image A of G → Aut(S) is torsion free and contains Inn(S) ≅ S as a subgroup of finite index. A torsion-free finite extension of a surface group is a surface group, so we can define Σ = A. The converse follows immediately from the fact that centralisers of non-cyclic subgroups in hyperbolic surface groups are trivial.  ̃ This Lemma 6.7 has the following geometric interpretation, in which Σ emerges as π1 (R/Λ). Addendum 6.8. With the hypotheses of Lemma 6.7, let R be a closed surface with S = π1 R, let Λ be the image of G → Aut(S) and let Λ be the image of G → Out(S). Then conditions (i) and (ii) are equivalent to the geometric condition that the action Λ → Homeo(R) given by Nielsen realisation is free. Proof. Assume that condition (i) holds. Since Λ is finite, Kerckhoff’s solution to the Nielsen realisation problem [22] enables us to realise Λ as a cocompact Fuchsian group: Λ can be realised as a group of isometries of a hyperbolic metric g on R and Λ is the discrete group of isometries ̃ ≅ H2 consisting of all lifts of Λ ≤ Isom(R, g). As a Fuchsian group, Λ of the universal cover R ̃ ≅ H2 is free, and this is the case if and only if the is torsion-free if and only if its action on R action of Λ = Λ/S on R is free.  As a consequence of Lemma 6.7 we obtain: Proposition 6.9. Consider a short exact sequence 1 → F → G → Q → 1, where F is a direct product of finitely many hyperbolic surface groups Si , each of which is normal in G. The following conditions are equivalent: 18 (i) G can be embedded in a direct product of surface groups [resp. of non-abelian limit groups and Γ−1 ]; (ii) Q can be embedded in such a product and the image of each of the maps G → Aut(Si ) is torsion-free and has finite image in Out(Si ). Proof. If (ii) holds then by Lemma 6.7 there are surface groups Σi with Si ⊴ Σi of finite index such that the map G → Aut(Si ) given by conjugation factors through G → Inn(Σi ) ≅ Σi . We combine these maps with the composition of G → Q and the embedding of Q to obtain a map Φ from G to a product of surface groups. The kernel of the map G → Q is the product of the Si , and each Si embeds into the coordinate for Σi , so Φ is injective and (i) is proved. We shall prove the converse in the surface group case; the other case is entirely similar. Thus we assume that G can be embedded in a direct product Σ1 × ⋯ × Σm of surface groups. After projecting away from factors Σi that have trivial intersection with G and replacing the Σi with the coordinate projections of G, we may assume that G ≤ Λ1 ×⋯×Λm is a full subdirect product, where each Λi is either a surface group, a nonabelian free group, or Z. Note that G ∩ Λi is normal in Λi , since it is normal in G and G projects onto Λi . By assumption F = S1 × ⋯ × Sk for some k. We want to show that after reordering factors Si is a finite index normal subgroup of Λi . Denote by pi ∶ Λ1 × ⋯ × Λm → Λi the projection onto the ith factor. Since F is normal in the subdirect product G ≤ Λ1 × ⋯ × Λm the projections pi (F ) ⊴ Λi are finitely-generated normal subgroups for 1 ≤ i ≤ m. Since the Λi are surface groups or free groups, it follows, each pi (F ) is either trivial or of finite index. (For the case of limit groups, see [10, Theorem 3.1].) Since F has no centre, it intersects abelian factors trivially. Suppose Λi is non-abelian. We claim that if pi (F ) is nontrivial, then F ∩ Λi is nontrivial. If this were not the case, then the normal subgroups F and G ∩ Λi would intersect trivially in G, and hence would commute. But this is impossible, because the centraliser in Λi of the finite-index subgroup pi (F ) is trivial. Finally, since F does not contain any free abelian subgroups of rank greater than k, we know that F intersects at most k factors Λi . After reordering factors we may thus assume that Λi is the only factor which intersects Si nontrivially. It follows that the projection of F onto Λ1 × ⋯ × Λk is injective and maps Si to a finitely generated normal subgroup of Λi . In particular, Λi must be a surface group, and the action of G by conjugation on Si factors through Inn(Λi ) → Aut(Si ).  Theorem 6.10. Let the Kodaira surfaces Sγi ↪ Xi → Sgi with zero signature be as in the statement of Theorem 1.2 and assume that each of the maps αi ∶ Sgi → E is surjective on π1 . Then the following conditions are equivalent: (1) the Kähler group π1 H can be embedded in a direct product of surface groups; (2) each π1 Xi can be embedded in a direct product of surface groups; (3) for each Xi , the image of the homomorphism π1 Xi → Aut(π1 Sγi ) defined by conjugation is torsion-free. Proof. Proposition 6.9 establishes the equivalence of (2) and (3), and (1) is a trivial consequence of (2), so we concentrate on proving that (1) implies (2). Assume that π1 H is a subgroup of a direct product of surface groups. 19 The fibre of X = X1 × ⋯ × Xr → Sg1 × ⋅ ⋅ ⋅ × Sgr is F = Sγ1 × ⋅ ⋅ ⋅ × Sγr , the restriction of the fibration gives F ↪ H → H. Each π1 Sγi is normal in both π1 X and π1 H. By Proposition 6.9 (and our assumption on π1 H), the image of each of the maps φi ∶ π1 H → Aut(π1 Sγi ) given by conjugation is torsion-free, and the image in Out(π1 Sγi ) is finite. The map φi factors through ρi ∶ π1 Xi → Aut(Sγi ). Because π1 H ≤ π1 Sg1 × ⋯ × π1 Sgr is subdirect (i.e. maps onto each Sgi ), the image of φi coincides with the image of ρi . Therefore, the conditions of Proposition 6.9 hold for each of the fibrations Sγi ↪ Xi → Sgi .  References [1] J. Amorós, M. Burger, K. Corlette, D. Kotschick, and D. Toledo, Fundamental groups of compact Kähler manifolds, 2, vol. 44, AMS Math. Surveys and Monographs, 1996. [2] M.F. Atiyah, The signature of fibre bundles, “Global Analysis”, Papers in Honour of K.Kodaira, Tokyo University Press, 1969. [3] Wolf P. Barth, Klaus Hulek, Chris A. M. Peters, and Antonius Van de Ven, Compact complex surfaces, second ed., Ergebnisse der Mathematik und ihrer Grenzgebiete. 3. Folge. A Series of Modern Surveys in Mathematics, vol. 4, Springer-Verlag, Berlin, 2004. [4] Ingrid Bauer, Fabrizio Catanese, Fritz Grunewald, and Roberto Pignatelli, Quotients of products of curves, new surfaces with pg = 0 and their fundamental groups, Amer. J. Math. 134 (2012), no. 4, 993–1049. [5] Gilbert Baumslag, On generalised free products, Math. Z. 78 (1962), 423–438. [6] Gilbert Baumslag, Alexei Myasnikov, and Vladimir Remeslennikov, Algebraic geometry over groups. I. Algebraic sets and ideal theory, J. Algebra 219 (1999), no. 1, 16–79. [7] M. Bestvina and N. Brady, Morse theory and finiteness properties of groups, Invent. Math. 129 (1997), 445–470. [8] R. Bieri, Homological Dimension of discrete groups, 2 ed., Queen Mary Coll. Math. Notes, Queen Mary College, Dept. Pure Math., London, 1981. [9] I. Biswas, M. Mj, and D. Pancholi, Homotopical Height, Int. J. Math. Vol. 25 (2014), no. 13. [10] M. Bridson and J. Howie, Normalisers in limit groups, Math. Ann. 337 (2007), 385–394. [11] M. Bridson, J. Howie, C.F. Miller III, and H. Short, Subgroups of direct products of limit groups, Ann. of Math. 170 (2009), no. 2, 1447–1467. [12] , On the finite presentation of subdirect products and the nature of residually free groups, American Journal of Math. 135 (2013), no. 4, 891–933. [13] Martin R. Bridson and Charles F. Miller, III, Recognition of subgroups of direct products of hyperbolic groups, Proc. Amer. Math. Soc. 132 (2004), no. 1, 59–65. [14] K.S. Brown, Cohomology of groups, Graduate Texts in Math., vol. 87, Springer-Verlag, Berlin, 1982. [15] M. Burger, Fundamental Groups of Kähler Manifolds and Geometric Group Theory, Seminaire BOURBAKI, 62eme annee (2009-2010), no. 1022. [16] Fabrizio Catanese, Fibred surfaces, varieties isogenous to a product and related moduli spaces, Amer. J. Math. 122 (2000), no. 1, 1–44. [17] Thomas Dedieu and Fabio Perroni, The fundamental group of a quotient of a product of curves, J. Group Theory 15 (2012), no. 3, 439–453. [18] T. Delzant and M. Gromov, Cuts in Kähler groups, Infinite groups geometric, combinatorial and dynamical aspects, Progr. Math., vol. 248, pp. 31–55, Birkhäuser, Basel, 2005. [19] T. Delzant and P. Py, Cubulable Kähler groups, arXiv:1609.08474 (2016). [20] A. Dimca, S. Papadima, and A. Suciu, Non-finiteness properties of fundamental groups of smooth projective varieties, Journal reine angew. Math. 629 (2009), 89–105. [21] M. Kapovich, Hyperbolic manifolds and discrete groups, vol. 183, Springer Science & Business Media, 2001. [22] Steven P. Kerckhoff, The Nielsen realization problem, Ann. of Math. (2) 117 (1983), no. 2, 235–265. [23] O.G. Kharlampovich and A.G. Myasnikov, Irreducible affine varieties over a free group. II. Systems in triangular quasi-quadratic form and description of residually free groups, J. Algebra 200 (1998), 517–570. 20 [24] K. Kodaira, A certain type of irregular algebraic surfaces, J. Analyse Math. 19 (1967), 207–215. [25] D. Kotschick, On regularly fibered complex surfaces, Geom. Topol. Monogr. 2, Geom. Topol. Publ., Coventry, 1999, pp. 291–298. [26] C. Llosa Isenrich, Finite presentations for Kähler groups with arbitrary finiteness properties, arXiv:1511.02064 (2015), to appear in Journal of Algebra. [27] , Branched covers of elliptic curves and Kähler groups with exotic finiteness properties, arXiv:1606.03142 (2016). [28] R. C. Lyndon, The equation a2 b2 = c2 in free groups, Michigan Math. J 6 (1959), 89–95. [29] P. Py, Coxeter groups and Kähler groups, Math. Proc. Camb. Phil. Soc. 155 (2013), 557 – 566. [30] Z. Sela, Diophantine Geometry over groups. I. Makanin-Razborov diagrams, Publ. Math. Inst. Hautes Études Sci. 93 (2001), 31–105. [31] John Stallings, A finitely presented group whose 3-dimensional integral homology is not finitely generated, Amer. J. Math. 85 (1963), 541–543. Martin R. Bridson, Mathematical Institute, Andrew Wiles Building, University of Oxford, Oxford OX2 6GG, UK E-mail address: [email protected] Claudio Llosa Isenrich, Mathematical Institute, Andrew Wiles Building, University of Oxford, Oxford OX2 6GG, UK E-mail address: [email protected]
4math.GR
The Geometry of Types Ugo Dal Lago Barbara Petit arXiv:1210.6857v1 [cs.LO] 25 Oct 2012 Abstract We show that time complexity analysis of higher-order functional programs can be effectively reduced to an arguably simpler (although computationally equivalent) verification problem, namely checking firstorder inequalities for validity. This is done by giving an efficient inference algorithm for linear dependent types which, given a PCF term, produces in output both a linear dependent type and a cost expression for the term, together with a set of proof obligations. Actually, the output type judgement is derivable iff all proof obligations are valid. This, coupled with the already known relative completeness of linear dependent types, ensures that no information is lost, i.e., that there are no false positives or negatives. Moreover, the procedure reflects the difficulty of the original problem: simple PCF terms give rise to sets of proof obligations which are easy to solve. The latter can then be put in a format suitable for automatic or semi-automatic verification by external solvers. Ongoing experimental evaluation has produced encouraging results, which are briefly presented in the paper. 1 Introduction One of the most crucial non-functional properties of programs is the amount of resources (like time, memory and power) they need when executed. Deriving upper bounds on the resource consumption of programs is crucial in many cases, but is in fact an undecidable problem as soon as the underlying programming language is non-trivial. If the units of measurement in which resources are measured become concrete and close to the physical ones, the problem becomes even more complicated, given the many transformation and optimisation layers programs are applied to before being executed. A typical example is the one of WCET techniques adopted in real-time systems [30], which do not only need to deal with how many machine instructions a program corresponds to, but also with how much time each instruction costs when executed by possibly complex architectures (including caches, pipelining, etc.), a task which is becoming even harder with the current trend towards multicores architectures. A different approach consists in analysing the abstract complexity of programs. As an example, one can take the number of instructions executed by the program as a measure of its execution time. This is of course a less informative metric, which however becomes more accurate if the actual time complexity of each instruction is kept low. One advantage of this analysis is the independence from the specific hardware platform executing the program at hand: the latter only needs to be analysed once. A variety of verification techniques have been employed in this context, from abstract interpretation [19] to type systems [23] to program logics [22] to interactive theorem proving1 . Among the many type-based techniques for complexity analysis, a recent proposal consists in going towards systems of linear dependent types, as suggested by Marco Gaboardi and the first author [12]. In linear dependent type theories, a judgement has the form $I t : σ, where σ is the type of t and I is its cost, an estimation of its time complexity. In this paper, we show that the problem of checking, given a PCF term t and I, whether $I t : σ holds can be efficiently reduced to the one of checking the truth of a set of proof obligations, themselves formulated in the language of a first-order equational program. Interestingly, simple λ-terms give rise to simple equational programs. In other words, linear dependent types are not only a sound and relatively complete methodology for inferring time bounds of programs [12, 13]: they also allow to reduce complexity analysis to an arguably simpler (although computationally equivalent) problem which 1A detailed discussion with related work is in Section 6 1 · · · |=E f(x) ≤ g(x, x) − 1 · · · Π t T `E t : σ K E f(x) = H g(x, y) = L . . . Figure 1: General scheme of the type inference algorithm. is much better studied and for which a variety of techniques and concrete tools exist [6]. Noticeably, the bounds one obtains this way translate to bounds on the number of steps performed by evaluation machines for the λ-calculus, which means that the induced metrics are not too abstract after all. The type inference algorithm is described in Section 4. The scenario, then, becomes similar to the one in Floyd-Hoare program logics for imperative programs, where completeness holds [9] (at least for the simplest idioms [7]) and weakest preconditions can be generated automatically (see, e.g., [22]). A benefit of working with functional programs is that type inference — the analogue of generating WPs — can be done compositionally without the need of guessing invariants. Linear dependent types are simple types annotated with some index terms, i.e. first-order terms reflecting the value of data flowing inside the program. Type inference produces in output a type derivation, a set of inequalities (which should be thought of as proof obligations) and an equational program E giving meaning to function symbols appearing in index terms (see Figure 1). A natural thing to do once E and the various proof obligations are available is to try to solve them automatically, as an example through SMT solvers. If automatically checking the inequalities for truth does not succeed (which must happen, in some cases), one can anyway find useful information in the type derivation, as it tells you precisely which data every symbol corresponds to. We elaborate on this issue in Section 5. But where does linear dependency come from? Linear dependent types can be seen as a way to turn Girard’s geometry of interaction [17] (or, equivalently, AJM games [1]) into a type system for the λ-calculus: the equational program one obtains as a result of type inference of a term t is nothing but as a description of a token machine for t. In presence of linear dependency, any term which can possibly be duplicated, can receive different, although uniform, types, similarly to what happens in BLL [18]. As such, this form of dependency is significantly simpler than the one of, e.g., the calculus of inductive constructions. 2 Linear Dependency at a Glance Traditionally, type systems carry very little information about the value of data manipulated by programs, instead focusing on their nature. As an example, all (partial recursive) functions from natural numbers to natural numbers can be typed as Nat ñ Nat in the λ-calculus with natural numbers and higher-order recursion, also known as PCF [27]. This is not an intrinsic limit of the type-based analysis of programs, however: much richer type disciplines have flourished in the last twenty years [21, 14, 10, 3]. All of them guarantee stronger properties for typable programs, the price being a more complicated type language and computationally more difficult type inference and checking problems. As an example, sized types [21] are a way to ensure termination of functional programs based on size information. In systems of sized types, a program like t “ λx.λy.add padd x yq psucc yq 2 can be typed as Nata ñ Natb ñ Nata`2b`1 , and in general as Nata ñ Natb ñ NatI , where I ě a ` 2b ` 1. In other words, the PCF type Nat is refined into NatI (where I is an arithmetical expression) whose semantics is the set of all natural numbers smaller or equal to I, i.e. the interval r0, Is Ď N. The role of size information is to ensure that all functions terminate, and this is done by restricting the kind of functions of which one is allowed to form fixpoints. Sized types are nonlinear: arguments to functions can be freely duplicated. Moreover, the size information is only approximate, since the expression labelling base types is only an upper bound on the size of typable values. Linear dependent types can be seen as a way to inject precision and linearity into sized types. Indeed, t receives the following type in d`PCFV [13]: căI dăJ Natr0, as ( Natr0, bs ( Natr0, a ` 2b ` 1s. (1) As one can easily realise, NatrK, Hs is the type of all natural numbers in the interval rK, Hs Ď N. Moreover, băJ σ ( τ is the type of linear functions from σ to τ which can be copied by the environment J times. The J copies of the function have types obtained by substituting 0, . . . , J ´ 1 for b in σ and τ . This is the key idea behind linear dependency. The type (1) is imprecise, but can be easily turned into căI dăJ Natra, as ( Natrb, bs ( Natra ` 2b ` 1, a ` 2b ` 1s, (2) itself a type of t. In the following, the singleton interval type NatrK, Ks is denoted simply as NatrKs. Notice that linear dependency is not exploited in (2), e.g., d does not appear free in Natrbs nor in Natra ` 2b ` 1s. Yet, (2) precisely captures the functional behaviour of t. If d does not appear free in σ nor dăI I in τ , then σ ( τ can be abbreviated as σ ( τ . Linear dependency becomes necessary in presence of higher order functions. Consider, as another example, the term u “ λx.λy. ifz y then 0 else xy u has simple type pNat ñ Natq ñ Nat ñ Nat. One way to turn it into a linear dependent type is the following H K L pNatras ( NatrIsq ( Natras ( NatrJs, (3) where J equals 0 when a “ 0 and J equals I otherwise. Actually, u has type (3) for every I and J, provided the two expressions are in the appropriate relation. Now, consider the term v “ pλx.λy.px pred px id yqqq u. The same variable x is applied to the identity id and to the predecessor pred. Which type should we give to the variable x and to u, then? If we want to preserve precision, the type should reflect both uses of x. The right type for u is actually the following: 1 că2 1 pNatras ( NatrIsq ( Natras ( NatrJs (4) where both I and J evaluate to a if c “ 0 and to a ´ 1 otherwise. If id is replaced by succ in the definition of v, then (4) becomes even more complicated: the first “copy” of J is fed not with a but with either 0 or a ` 1. Linear dependency precisely consists in allowing different copies of a term to receive types which are indexed differently (although having the same “functional skeleton”) and to represent all of them in compact form. This is in contrast to, e.g., intersection types, where the many different ways a function uses its argument could even be structurally different. This, as we will see in Section 3, has important consequences on the kind of completeness results one can hope for: if the language in which index terms are written is sufficiently rich, then the obtained system is complete in an intensional sense: a precise type can be given to every terminating t having type Nat ñ Nat. 3 t “ λf. ifz pf 0q then 0 else f pf 0q; x tu y ‹ ˛ ą ą ą ą˚ ą ą ą ą ą˚ ą˚ ą ą ą ą ą˚ ą˚ u “ pλx.λy.add x yq 3; xty xuy x λx.λy.add x y y x λy.add x y ; x ÞÑ x 3 y y x ifz pf 0q then 0 else f pf 0q ; ξ y xf 0; ξy xf ; ξy x λy.add x y ; x ÞÑ x 3 y y x add x y ; py ÞÑ x 0 ; ξ y, x ÞÑ x 3 yq y x3y x f pf 0q ; ξ y xf ; ξy x λy.add x y ; x ÞÑ x 3 y y xf 0; ξy x3y x6y ‹ ‹ ‹ ‹ ‹ ‹ ‹ ‹ ‹ ‹ ‹ ‹ ‹ ‹ ‹ ‹ ξ “ f ÞÑ x λy.add x y ; x ÞÑ x 3 y y. argx u y ¨ ˛ funx t y ¨ ˛ argx 3 y ¨ funx t y ¨ ˛ funx t y ¨ ˛ ˛ fork x0 ; f pf 0q ; ξy ¨ ˛ argx 0 ; ξ y ¨ fork x0 ; f pf 0q ; ξy ¨ ˛ argx 0 ; ξ y ¨ fork x0 ; f pf 0q ; ξy ¨ ˛ fork x0 ; f pf 0q ; ξy ¨ ˛ fork x0 ; f pf 0q ; ξy ¨ ˛ ˛ argx f 0 ; ξ y ¨ ˛ argx f 0 ; ξ y ¨ ˛ funx λy.add x y ; x ÞÑ x 3 y y ¨ ˛ funx λy.add x y ; x ÞÑ x 3 y y ¨ ˛ ˛ Figure 2: Evaluation of a term in the CEKPCF abstract machine. Noticeably, linear dependency allows to get precise information about the functional behaviour of programs without making the language of types too different from the one of simple types (e.g., one does not need to quantify over index variables, as in sized types). The price to pay, however, is that types, and especially higher-order types, need to be context aware: when you type u as a subterm of v (see above) you need to know which arguments u will be applied to. Despite this, a genuinely compositional type inference procedure can actually be designed and is the main technical contribution of this paper. 2.1 Linearity, Abstract Machines and the Complexity of Evaluation Why dependency, but specially linearity, are so useful for complexity analysis? Actually, typing a term using linear dependent types requires finding an upper bound to the number of times each value is copied by its environment, called its potential. In the term v from the example above, the variable x is used twice, and accordingly one finds c ă 2 in (4). Potentials of higher-order values occurring in a term are crucial parameters for the complexity of evaluating the term by abstract mechanisms [11]. The following is an hopefully convincing (but necessarily informal) discussion about why this is the case. Configurations of abstract machines for the λ-calculus (like Friedman and Felleisen’s CEK and Krivine’s KAM) can be thought of as being decomposable into two distinct parts: • First of all, there are duplicable entities which are either copied entirely or turned into non-duplicable entities. This includes, in particular, terms in so-called environments. Each (higher-order) duplicable entity is a subterm of the term the computation started from. • There are non-duplicable entities that the machine uses to look for the next redex to be fired. Typically, these entities are the current term and (possibly) the stack. The essential feature of non-duplicable entities is the fact that they are progressively “consumed” by the machine during evaluation: the search for the next redex somehow consists in traversing the non-duplicable entities until a redex is found or a duplicable entity needs to be turned into a non-duplicable one. As an example, consider the process of evaluating the PCF term pλf. ifz pf 0q then 0 else f pf 0qqppλx.λy.add x yq 3q by an appropriate generalisation of the CEK machine, see Figure 2. Initially, the whole term is non-duplicable. 4 By travelling into it, the machine finds a first redex u; at that point, 3 becomes duplicable. The obtained closure itself becomes part of the environment ξ, and the machine looks into the body of t, ending up in an occurrence of f , which needs to be replaced by a copy of ξpf q. After an instantiation step, a new non-duplicable entity ξpf q indeed appears. Note that, by an easy combinatorial argument, the number of machine steps necessary to reach f is at most (proportional to) the size of the starting term tu, since reaching f requires consuming non-duplicable entities which can only be created through instantiations. After a copy of ξpf q becomes non-duplicable, some additional “nonduplicable fuel” becomes available, but not too much: λy.add x y is after all a subterm of the initial term. The careful reader should already have guessed the moral of this story: when analysing the time complexity of evaluation, we could limit ourselves to counting how many instantiation steps the machine performs (as opposed to counting all machine steps). We claim, on the other hand, that the number of instantiation steps equals the sum of potentials of all values appearing in the initial term, something that can be easily inferred from the kind of precise linear typing we were talking about at the beginning of this section. Summing up, once a dependently linear type has been attributed to a term t, the time complexity of evaluating t can be derived somehow for free: not only an expression bounding the number of instantiation steps performed by an abstract machine evaluating t can be derived, but it is part of the underlying type derivation, essentially. As a consequence, reasoning (automatically or not) about it can be done following the structure of the program. 3 Programs and Types, Formally In this section, we present the formalism of d`PCF, a linear dependent type system for PCF [27]. Two versions exist: d`PCFN and d`PCFV , corresponding to call-by-name and call-by-value evaluation of terms, respectively. The two type systems are differerent, but the underlying idea is basically the same. We give here the details of the cbv version [13], which better corresponds to widespread intuitions about evaluation, but also provide some indications about the cbn setting [12]. 3.1 Terms and Indexes Terms are given by the usual PCF grammar: s, t, u :“ x | n | fix x.t tu | | λx.t | pptq | sptq ifz t then u else s. A value (denoted by v, w etc. ) is either a primitive integer n, or an abstraction λx.t, or a fixpoint fix x.t. In addition to the usual terms of the λ-calculus, there are a fixpoint construction, primitive natural numbers with predecessor and successor, and conditional branching with a test for zero. For instance, a simple program computing addition is the following: add “ fix x. λy.λz. ifz y then z else spx pppyqq zq . 3.1.1 Language of Indexes As explained informally in Section 2, a type in d`PCF consists in an annotation of a PCF type, where the annotation consists in some indexes. The latter are parametrised by a set of index variables V “ ta, b, c, . . . u and an untyped signature Θ of function symbols, denoted with f, g, h, etc. We assume Θ contains at least the arithmetic symbols `, ´, 0 and 1, and we write n for 1 ` ¨ ¨ ¨ ` 1 (n times). Indexes are then constructed by the following grammar: I, J, K ::“ a | fpI1 , . . . , In q | ÿ aăI 5 J | I,J ï a K, where n is the arity of f in Θ. Free andřbound index variables are defined as usual, taking care that all ÏI,K occurrences of a in J are bound in both aăI J and a J. The substitution of a variable a with J in I is written ItJ{au. Given an equational program E attributing a meaning in Nn á N to some symbols of arity n (see Section 5), and a valuation ρ mapping index variables to N, the semantics JIKEρ of an index I is either a natural number or undefined. Let us describe how we interpret the last two constructions, namely bounded sums and forest cardinalities. ř Bounded sums have the usual meaning: aăI J is simply the sum of all possible values of J with a taking the values from 0 up to I, excluded. Describing ÏI,J the meaning of forest cardinalities, on the other hand, requires some effort. Informally, the index a K counts the number of nodes in a forest composed of J trees described using K. Each node in the forest is (uniquely) identified by a natural number, starting form I and visiting the tree in pre-order. The index K has the role of describing the number of children of each forest node, e.g. the number of children of the node 0 is Kt0{au. More formally, the meaning of a forest cardinality is defined by the following two equations: I,0 ï K“0 a I,J`1 ï ¨ ˛ Ï ÏI,J ˜ ¸ I`1` I,J I,J a K,KtI` a K{au ï ï K‚ K“ K `1`˝ a a a The first equation says that a forest of 0 trees contains no nodes. The second one tells us that a forest of J ` 1 trees contains: • The nodes in the first J trees; • plus the nodes in the last tree, which are just one plus the nodes in the immediate subtrees of the root, considered themselves as a forest. Consider the following forest comprising two trees: 0 8 1 2 3 5 6 4 7 9 11 10 12 and consider an index K with a free index variable a such that Kt1{au “ 3; Ktn{au “ 2 for n P t2, 8u; Ktn{au “ 1 when n P t0, 6, 9, 11u; and Ktn{au “ 0 when n P t3, 4, 7, 10, 12u. That is, K describes the Ï0,2 Ï0,1 number of children of each node. Then a K “ 13 since it takes into account the entire forest; a K “ 8 Ï8,1 since it takes into account only the leftmost tree; a K “ 5 since it takes into account only the second Ï2,3 tree of the forest; finally, a K “ 6 since it takes into account only the three trees (as a forest) within the dashed rectangle. One may wonder what is the role of forest cardinalities in the type system. Actually, they play a crucial role in the treatment of recursion, where the unfolding of recursive calls produces a tree-like structure whose size is just the number of times the (recursively defined) function will be used globally. Notice that JIKEρ is undefined whenever the equality between I and any natural number cannot be derived from the underlying equational program. In a forest cardinality may be undefined even if all its Ïparticular, 0,1 subterms are defined: as an example I “ 1 has no value, because the corresponding tree consists of a an infinite descending chain and its cardinality is infinite. By the way I is the index term describing the structure of the recursive calls induced by the program fix x.t. 6 3.1.2 Semantic Judgements A constraint is an inequality on indexes. A constraint I ď J is valid for ρ and E when both JIKEρ and JJKEρ are defined, and JIKEρ ď JJKEρ . As usual, we can derive a notion of equality and strict inequality from ď. A semantic judgement is of the form φ; Φ (E I ď J , where Φ is a set of constraints and φ is the set of free index variables in Φ, I and J. These semantic judgements are used as axioms in the typing derivations of d`PCF, and the set of constraints Φ, called the index context, contains mainly some indications of bounds for the free index variables (such as a ă K). Such a judgement is valid when, for every valuation ρ : φ Ñ N, if all constraints in Φ are valid for E and ρ then so is I ď J. 3.2 Types Remember that d`PCF is aimed at controlling the complexity of programs. The time complexity of the evaluation is thus analysed statically, while typing the term at hand. The grammar for types distinguishes the subclass of linear types, which correspond to non-duplicable terms (see Section 2.1), and the one of modal types, for duplicable terms. In d`PCFV , they are defined as follows: A, B σ, τ ::“ σ ( τ ; ::“ ra ă Is ¨ A | linear types modal types NatrI, Js. Indeed, cbv evaluation only duplicates values. If such a value has an arrow type then it is a function (either an abstraction or a fixpoint) that can potentially increase the complexity of the whole program if we duplicate it. Hence we may need a bound on the number of times we instantiate it in order to control the complexity. This bound, call the potential of the value, is represented by I in the type ra ă Is ¨ pσ ( τ q aăI (also written σ ( τ ). As explained in Section 2, NatrI, Js is the type of programs evaluating to a natural number in the closed interval rI, Js. The potential for natural numbers is not specified, as they can be freely duplicated along cbv evaluation. 3.2.1 Summing types Intuitively, the modal type σ ” ra ă Is ¨ A is assigned to terms that can be copied I times, the k th copy being of type Atk ´ 1{au. For those readers who are familiar with Linear Logic, σ can be thought of as representing the type At0{au b ¨ ¨ ¨ b AtI ´ 1{au. In the typing rules we are going to define, modal types need to be manipulated in an algebraic way. For this reason, two operations on modal types are required. The first one is a binary operation Z on modal types. Suppose that σ ” ra ă Is ¨ Ata{cu and that τ ” ra ă Js ¨ AtI ` a{cu. In other words, σ consists of the first I instances of A, i.e. At0{cu b ¨ ¨ ¨ b AtI ´ 1{cu while τ consists of the next J instances of A, i.e. AtI ` 0{cu b ¨ ¨ ¨ b AtI ` J ´ 1{cu. Their sum σ Z τ is naturally defined as a modal type consisting of the first I ` J instances of A, i.e. rc ă I ` Js ¨ A. Furthermore, NatrI, Js Z NatrI, Js is just NatrI, Js. A bounded sum operator on modal types can be defined by generalising the idea above: suppose that # + ÿ σ “ rb ă Js ¨ A b ` Jtd{au{c . dăa ř Then its bounded sum aăI σ is just rc ă not occur free in J nor in K. 3.2.2 ř aăI Js ¨ A. Finally, ř aăI NatrJ, Ks “ NatrJ, Ks, provided a does Subtyping Central to d`PCF is the notion of subtyping. An inequality relation Ď between (linear or modal) types can be defined using the formal system in Fig. 3. This relation corresponds to lifting index inequalities to the 7 φ; Φ (E K ď I φ; Φ (E J ď H φ; Φ $E NatrI, Js Ď NatrK, Hs φ; Φ $E % Ď σ φ; Φ $E τ Ď ϕ φ; Φ $E σ ( τ Ď % ( ϕ pa, φq; pa ă J, Φq $E A Ď B φ; Φ (E J ď I φ; Φ $E ra ă Is ¨ A Ď ra ă Js ¨ B Figure 3: Subtyping derivation rules of d`PCFV . φ; Φ; Γ, x : σ $E0 x:σ pAxq φ; Φ; Γ $EI t : σ φ; Φ $E ∆ Ď Γ φ; Φ $E σ Ď τ φ; Φ; ∆ $EJ t : τ pa, φq; pa ă I, Φq; Γ, x : σ $EK t : τ ř p(q φ; Φ; aăI Γ $EI`ř K λx.t : ra ă Is ¨ σ ( τ aăI φ; Φ (E I ď J pSubsq φ; Φ; Γ $EK t : ra ă 1s ¨ σ ( τ φ; Φ; ∆ $EH u : σt0{au pAppq E φ; Φ; Γ Z ∆ $K`H tu : τ t0{au φ; pK ě 1, Φq; ∆ $EN s : τ φ; pJ ď 0, Φq; ∆ $EN u : τ φ; Φ; Γ $EM t : NatrJ, Ks pIfq E φ; Φ; Γ Z ∆ $M`N ifz t then u else s : τ φ; Φ; Γ $E0 n : Natrn, ns pnq φ; Φ; Γ $EM t : NatrI, Js psq φ; Φ; Γ $EM sptq : NatrI ` 1, J ` 1s φ; Φ; Γ $EM t : NatrI, Js ppq φ; Φ; Γ $EM pptq : NatrI ´ 1, J ´ 1s pb, φq; pb ă H, Φq; Γ, x : ra ă Is ¨ A $EJ t : ra ă 1s ¨ B Ïb`1,a pa, b, φq; pa ă I, b ă H, Φq $E Bt0{aut b I ` b ` 1{bu Ď A pFixq ř Ï0,a E ř φ; Φ; băH Γ $H` b I{bu J fix x.t : ra ă Ks ¨ Bt0{aut băH (where H “ Ï0,K b I) Figure 4: Typing rules of d`PCFV . type level. As defined here, Ď is a pre-order (i.e. a reflexive and transitive relation), which allows to cope with approximations in the typed analysis of programs. However, in the type inference algorithm we will present in next section only the symmetric closure ” of Ď, called type equivalence will be used. This ensures that the type produced by the algorithm is precise. 3.2.3 Typing A typing judgement is of the form φ; Φ; Γ $EK t : τ, where K is the weight of t, that is (informally) the maximal number of substitutions involved in the cbv evaluation of t (including the potential substitutions by t itself in its evaluation context). The index context Φ is as in a semantic judgement (see Section 3.1.2), and Γ is a (term) context assigning a modal type to (at least) each free variable of t. Both sums and bounded sums are naturally extended from modal types to contexts (with, for instance, tx : σ; y : τ u Z tx : %, z : ϕu “ tx : σ Z %; y : τ ; z : ϕu). There might be free index variables in Φ, Γ, τ and K, all of them from φ. Typing judgements can be derived from the rules of Figure 4. Observe that, in the typing rule for the abstraction ((), I represents the number of times the value λx.t can be copied. Its weight (that is, the number of substitutions involving λx.t or one of its subterms) is then I plus, for each of these copies, the weight of t. In the typing rule (App), on the other hand, t is used once as a function, without been copied. Its potential needs to be at least 1. The typing rule for the fixpoint is arguably the most complicated one. As a first approximation, assume that only one copy of fix x.t will 8 be used (that is, K ” 1 a does not occur free in B). To compute the weight of fix x.t, we need to know the number of times t will be copied during the evaluation, that is the number of nodes in the tree of its recursive calls. This tree is described by the index I (as explained in Section 3.1.1), since each occurrence Ï0,1 of x in t stands for a recursive call. It has H “ b I nodes. At each node b of this tree, there is a copy Ïb`1,a of t in which the ath occurrence of x will be replaced by the ath son of b, i.e. by b ` 1 ` b I. The types thus have to correspond, which is what the second premise of this rule prescribes. Now if fix x.t is in fact aimed at being copied K ě 0 times, then all the copies of t are represented in a forest of K trees described by I. For the sake of simplicity, we present here the type system with an explicit subsumption rule. The latter allows to relax any bound in the types (and the weight), thereby loosing some precision in the information provided by the typing judgement. However, we could alternatively replace this rule by relaxing the premises of all the other ones (which corresponds to the presentation of the type system given in [13], or in [12] for d`PCFN ). Restricting subtyping to type equivalence amounts to considering types up to index equality in the type system of Figure 4 without the rule (Subs) — this is what we do in the type inference algorithm in Section 4. In this case we say that the typing judgements are precise: Definition 3.1 A derivable judgement φ;Φ; Γ $EI t : σ is precise if $ & φ; Φ $E ∆ Ď Γ φ; Φ $E σ Ď τ φ; Φ; ∆ $EJ t : τ is derivable ùñ % φ; Φ (E I ď J 3.2.4 Call-by-value vs. Call-by-name In d`PCFN , the syntax of terms and of indexes is the same as in d`PCFV , but the language of types differs: A, B σ, τ ::“ σ ( A | NatrI, Js; ::“ ra ă Is ¨ A. linear types modal types Modal types still represent duplicable terms, except that now not only values but any argument to functions can be duplicated. So modal types only occur in negative position in arrow types. In the same way, one can find them in the context of any typing judgement, φ; Φ; px1 : σ1 , . . . , xn : σn q $EK t : A. When a term is typed, it is a priori not duplicable, and its type is linear. It is turned into a duplicable term when it holds the position of the argument in an application. As a consequence, the typing rule (App) becomes the most “expansive” one (for the weight) in d`PCFN : the whole context used to type the argument has to be duplicated, whereas in d`PCFV this duplication of context is “anticipated” in the typing rules for values. The readers who are familiar with linear logic, could have noted that, if we replace modal types by banged types, and we remove all annotations with indexes, then d`PCFN corresponds to the target fragment of the cbn translation from simply-typed λ-calculus to LL, and d`PCFV to the target of the cbv translation [26]. In d`PCFN , the weight K of a typing judgement represents the maximal number of substitutions that may occur in the cbn evaluation of t. We do not detail the typing rules of d`PCFN here (they can be found in [12]). However an important remark is that in d`PCFN , just like in d`PCFV , some semantic judgements can be found in the axioms of a typing derivation, and that every typing rule is reversible (except subsumption). The type inference algorithm for d`PCFV that we present in Section 4 can be easily adapted to d`PCFN . 3.3 Abstract Machines The evaluation of PCF terms can be simulated through an extension KAMPCF of Krivine’s abstract machine [24] (for cbn evaluation) or through an extension CEKPCF of the Felleisen and Friedman’s CEK machine [15] (for cbv evaluation). 9 x tu ; ξ y ‹ π x λx.t ; ξ y ‹ argpcq ¨ π x fix x.t ; ξ y ‹ π xx; ξy ‹ π x ifz t then u else s ; ξ y ‹ π ‹ fork xt ; u ; ξy ¨ π x 0 ; ξ1 y ‹ fork xt ; u ; ξy ¨ π x n`1 ; ξ 1 y x sptq ; ξ y ‹ π x pptq ; ξ y ‹ π ‹ s¨π xn; ξy ‹ p¨π xn; ξy ą ą ą ą ą ą ą ą ą ą ą xt; ξy x t ; px ÞÑ cq ¨ ξ y x t ; px ÞÑ x fix x.t ; ξ yq ¨ ξ y ξpxq xt; ξy xt; ξy xu; ξy xt; ξy xt; ξy x n`1 y x n´1 y ‹ argx u ; ξ y ¨ π ‹ π ‹ π ‹ π ‹ fork xu ; s ; ξy ¨ π ‹ π ‹ π ‹ s¨π ‹ p¨π ‹ π ‹ π Figure 5: KAMPCF evaluation rules. Both these machines have states in the form of processes, that are pairs of a closure (i.e. a term with an environment defining its free variables) and a stack, representing the evaluation context. In the KAMPCF , these objects are given by the following grammar: Closures: Environment: Stacks: c ξ π Processes: P :“ x t ; ξ y; :“ tx1 ÞÑ c1 ; ¨ ¨ ¨ ; xk ÞÑ ck u; :“ ˛ | argx t ; ξ y ¨ π | s ¨ π | fork xt ; u ; ξy ¨ π; :“ c ‹ π. | p¨π When the environment is empty, we may use the notation x t y instead of x t ; H y for closures. The evaluation rules of the KAMPCF are given in Figure 5. The fourth evaluation rule is said to be an instantiation step: the value of a variable x is replaced by the term x maps to in the underlying environment ξ. The CEKPCF machine, which performs cbv evaluation, is slightly more complex: within closures, the value closures are those whose first component is a value: v :“ x v ; ξ y (remember that a value v is of the form n, λx.t or fix x.t). Moreover, environments assign only value closures to variables: ξ :“ tx1 ÞÑ v1 ; ¨ ¨ ¨ ; xk ÞÑ vk u . The grammar for stacks is the same, with one additional construction (funpvq ¨ π) that is used to encapsulate a function (lambda abstraction or fixpoint) while its argument is computed. Indeed, the latter cannot be substituted for a variable if it is not a value. The evaluation rules for processes are the same than in Figure 5, except that the second and the third ones are replaced by the following: v ‹ argpcq ¨ π ą c ‹ funpvq ¨ π v ‹ funx λx.t ; ξ y ¨ π ą x t ; x ÞÑ v ¨ ξ y ‹ π v ‹ funx fix x.t ; ξ y ¨ π ą x t ; x ÞÑ x fix x.t ; ξ y ¨ ξ y ‹ argpvq ¨ π An example of the evaluation of a term in the CEKPCF machine has been shown in Figure 2. We say that a term t evaluates to u in an abstract machine when x t y ‹ ˛ ą x u ; ξ y ‹ ˛. Observe that if t is a closed term then u is necessarily a value. We write t ónN u whenever the KAMPCF evaluates t to u in exactly n steps, and t ónV u when the same holds for the CEKPCF (we may also omit the exponent n when the number of steps is not relevant). Abstract Machines and Weight The weight of a typable term was informally presented as the number of instantiation steps in its evaluation. Abstract machines enable a more precise formulation of this idea: Fact 1 1. If t óN u, and $EI t : A is derivable in d`PCFN , then JIKE is an upper bound for the number of instantiation steps in the evaluation of t by the KAMPCF . 10 2. If t óV u, and $EI t : ra ă 1s ¨ A is derivable in d`PCFV , then JIKE is an upper bound for the instantiation steps in the evaluation of t in the CEKPCF . This can be shown by extending the notion of weight and of typing judgement to stacks and processes [12, 13], and is the main ingredients for proving Intensional Soundness (see Section 3.4). 3.4 Key Properties In this section we briefly recall the main properties of d`PCF, arguing for its relevance as a methodology for complexity analysis. We give the results for d`PCFV , but they also hold for d`PCFN (all proofs can be found in [12, 13]). The subject reduction property guaranties as usual that typing is correct with respect to term evaluation, but specifies also that the weight of a term cannot increase along reduction: Proposition 3.1 (Subject Reduction) For any PCF-terms t,u, if φ; Φ; H $EI t : τ is derivable in d`PCFV , and if t Ñ u in cbv, then φ; Φ; H $EJ u : τ is also derivable for some J such that φ; Φ (E J ď I . As a consequence, the weight does not tell us much about the number of reduction steps bringing a (typable) term to its normal form. So-called Intensional Soundness, on the other hand, allows to deduce some sensible information about the time complexity of evaluating a typable PCF program in an abstract machine from its d`PCF typing judgement. Proposition 3.2 (Intensional Soundness) For any term t, if $EK t : NatrI, Js is derivable in d`PCFV , then t evaluates to n in k steps in the CEKPCF , with JIKE ď n ď JJKE and k ď |t| ¨ pJKKE ` 1q . Intensional Soundness guarantees that the evaluation of any program typable in d`PCF takes (at most) a number of steps directly proportional to both its syntactic size and its weight. A similar theorem holds when 1 t has a functional type: if, as an example, the type of t is Natras ( NatrJs, then K is parametric on a and p|t| ` 2q ¨ pJKKE ` 1q is an upper bound on the complexity of evaluating t on any integer a. But is d`PCF powerful enough to type natural complexity bounded programs? Actually, it is as powerful as PCF itself, since any PCF type derivation can be turned into a d`PCF one (for an expressive enough equational program), as formalised by the type inference algorithm (Section 4). We can make this statement even more precise for terms of base or first order type, provided two conditions are satisfied: • On the one hand, the equational program E needs to be universal, meaning that every partial recursive function is representable by some index term. This can be guaranteed, as an example, by the presence of a universal program in E. • On the other hand, all true statements in the form φ; Φ (E I ď J must be “available” in the type system for completeness to hold. In other words, one cannot assume that those judgements are derived in a given (recursively enumerable) formal system, because this would violate Gödel’s Incompleteness Theorem. In fact, in d`PCF completeness theorems are relative to an oracle for the truth of those assumptions, which is precisely what happens in Floyd-Hoare logics [9]. Proposition 3.3 (Relative Completeness) If E is universal, then for any PCF term t, 1. if t ókV m, then $Ek t : Natrms is derivable in d`PCFV . 2. if, for any n P N, there exist kn , mn such that t n ókV n mn , then there exist I and J such that a; H; H $EI t : rb ă 1s ¨ pNatras ( NatrJsq is derivable in d`PCFV , with (E Jtn{au “ mn and (E Itn{au ď kn for all n P N. The careful reader should have noticed that there is indeed a gap between the lower bound provided by completeness and the upper bound provided by soundness: this is indeed the reason why our complexity analysis is only meaningful in an asymptotic sense. Sometimes, however, programs with the same asymptotic behavior can indeed be distinguished, e.g. when their size is small relative to the constants in their weight. 11 In the next section, we will see how to make a concrete use of Relative Completeness. Indeed, we will describe an algorithm that, given a PCF term, returns a d`PCF judgement $EK t : τ for this term, where E is equational program that is not universal, but expressive enough to derive the typing judgement. To cope with the “relative” part of the result (i.e., the very strong assumption that every true semantic judgement must be available), the algorithm also return a set of side conditions that have to be checked. These side conditions are in fact semantic judgements that act as axioms (of instances of the subsumption rule) in the typing derivation. 4 Relative Type Inference Given on the one hand soundness and relative completeness of d`PCF, and on the other undecidability of complexity analysis for PCF programs, one may wonder whether looking for a type inference procedure makes sense at all. As stressed in the Introduction, we will not give a type inference algorithm per se, but rather reduce type inference to the problem of checking a set of inequalities modulo an equational program (see Figure 1). This is the reason why we can only claim type inference to be algorithmically solvable in a relative sense, i.e. assuming the existence of an oracle for proof obligations. Why is solving relative type inference useful? Suppose you have a program t : Nat ñ Nat and you want to prove that it works in a number of steps bounded by a polynomial p : N Ñ N (e.g., ppxq “ 4 ¨ x ` 7). You could of course proceed by building a d`PCF type derivation for t by hand, or even reason directly on the complexity of t. Relative type inference simplifies your life: it outputs an equational program E, a precise 1 type derivation for t whose conclusion is a; H; H $EI t : Natras ( NatrJs and a set I of inequalities on the same signature as the one of E. Your original problem, then, is reduced to verifying |ùE I Y tI ď ppaqu. This is arguably an easier problem than the original one: first of all, it has nothing to do with complexity analysis but is rather a problem about the value of arithmetical expressions. Secondly it only deals with first-order expressions. 4.1 An Informal Account From the brief discussion in Section 2, it should be clear that devising a compositional type inference procedure for d`PCF is nontrivial: the type one assigns to a subterm heavily depends on the ways the rest of the program uses the subterm. The solution we adopt here consists in allowing the algorithm to return partially unspecified equational programs: E as produced in output by T gives meaning to all the symbols in the output type derivation except those occurring in negative position in its conclusion. To better understand how the type inference algorithm works, let us consider the following term t: uv “ pλx.λy.xpxyqqpλz.spzqq. The subterm u can be given type pNat ñ Natq ñ Nat ñ Nat in PCF, while v has type Nat ñ Nat. This means t as a whole has type Nat ñ Nat and computes the function x ÞÑ 2 ¨ x. The type inference algorithm proceeds by giving types to u and to v separately, then assembling the two into one. Suppose we start with v. băhpaq The type inference algorithm refines Nat ñ Nat into σ “ Natrfpa, bqs ( Natrgpa, bqs and the equational program Av , which gives meaning to g in terms of f: gpa, bq “ fpa, bq ` 1. Observe how both f and h are not specified in Av , because they appear in negative position in σ: fpa, bq intuitively corresponds to the argument(s) v will be applied to, while hpaq is the number of times v will be used. Notice that everything is parametrised on a, which is something like a global parameter that will later 12 be set as the input to t. The function u, on the other hand, is given type pNatrppa, b, cqs căjpa,bq ( Natrqpa, b, cqsq băkpaq ( Natrlpa, b, cqs cămpa,bq ( Natrnpa, b, cqs. The newly introduced function symbols are subject to the following equations: jpa, bq “ 2 ¨ mpa, bq; npa, b, cq “ qpa, b, 2cq; ppa, b, 2cq “ qpa, b, 2c ` 1q; ppa, b, 2c ` 1q “ lpa, b, 2cq. Again, notice that some functions are left unspecified, namely l, m, q and k. Now, a type for uv can be found by just combining the types for u and v, somehow following the typing rule for applications. First of all, the number of times u needs to be copied is set to 1 by the equation kpaq “ 1. Then, the matching symbols of u and v are defined one in terms of the others: qpa, 0, bq “ gpa, bq; fpa, bq “ ppa, 0, bq; hpaq “ jpa, 0q. This is the last step of type inference, so it is safe to stipulate that mpa, 0q “ 1 and that lpa, 0, cq “ a, thus obtaining a fully specified equational program E and the following type τ for t: că1 Natras ( Natrnpa, 0, cqs. As an exercise, the reader can verify that the equational program above allows to verify that npa, 0, 0q “ a`2, and that a; H; H $E2 t : τ. 4.2 Preliminaries Before embarking on the description of the type inference algorithms, some preliminary concepts and ideas need to be introduced, and are the topic of this section. 4.2.1 Getting Rid of Subsumption The type inference algorithm takes in input a PCF term t, and returns a typing judgement J for t, together with a set R of so-called side conditions. We will show below that J is derivable iff all the side conditions in R are valid. Moreover, in this case J is precise (see Definition 3.1): all occurrences of the base type NatrI, Js are in fact of the form NatrIs, and the weight and all potentials H occurring in a sub-type ra ă Hs ¨ A are kept as low as possible. Concretely, this means that there is a derivation for J in which the subsumption rule is restricted to the following form: φ; Φ $E ∆ ” Γ φ; Φ $E σ ” τ φ; Φ; Γ $EI t : σ φ; Φ (E I “ J φ; Φ; ∆ $EJ t : τ ( The three premises on the right boil down to a set of semantic judgements of the form φ; Φ (E Ki “ Hi (see Figure 3), where the Ki ’s are indexes occurring in σ or ∆ (or I itself) and the Hi ’s occur in τ or Γ (or are J itself). If the equalities Ki “ Hi can all be derived from E, then the three premises on the right are equivalent to the conjunction (on i) of the following properties: 13 “JHi KEρ is defined for any ρ : φ Ñ N satisfying Φ” (see Section 3.1.2). Given E, this property (called a side condition) is denoted by φ; Φ ( Hi Ó. Actually the type inference algorithm does not verify any semantic or subtyping judgement coming from (instances of) the subsumption rule. Instead, it turns all index equivalences Hi “ Ki into rewriting rulesŹ in E, and put all side conditions φ; Φ ( Hi Ó in R. If every side condition in R is true for E, we write E , R. Informally, this means that all subsumptions assumed by the algorithm are indeed valid. 4.2.2 Function Symbols Types and judgements manipulated by our type inference algorithm have a very peculiar shape. In particular, not every index term is allowed to appear in types, and this property will be crucial when showing soundness and completeness of the algorithm itself: Definition 4.1 (Primitive Types) A type is primitive for φ when it is on the form Natrfpφqs, or A ( B with A and B primitive for φ, or ra ă fpφqs ¨ A with a R φ and A primitive for a; φ. A type is said to be primitive when it is primitive for some φ. căgpa,bq As an example, a primitive type for φ “ a; b is Natrfpa, b, cqs ( Natrhpa, b, cqs. Informally, then, a type is primitive when the only allowed index terms are function symbols (with the appropriate arity). 4.2.3 Equational Programs The equational program our algorithm constructs is in fact a rewriting program: every equality corresponds to the (partial) definition of a function symbol, and we may write it fpa1 , . . . , ak q :“ J (where all free variables of J are in ta1 , . . . , ak u). If there is no such equation in the rewriting program, we say that f is unspecified. An equational program E is completely specified if it allows to deduce a precise semantic (namely a partial recursive function) for each symbol of its underlying signature (written ΣE ), i.e. none of the symbols in ΣE are unspecified. In other words: a completely specified equational programs has only one model. On the other hand, a partially specified equational program (i.e. a program where symbols can possibly be unspecified) can have many models, because partial recursive functions can be assigned to function symbols in many different ways, all of them consistent with its equations. Up to now, we only worked with completely specified programs, but allowing the possibility to have unspecified symbols is crucial for being able to describe the type inference algorithm in a simple way. In the following, E and F denote completely specified equational programs, while A and B denote rewriting programs that are only partially specified. Definition 4.2 (Model of a Rewriting Program) An interpretation µ of A in E is simply a map from unspecified symbols of A to indexes on the signature ΣE , such that if f has arity n, then µpfq is a term in ΣE with free variables from ta1 , . . . , an u. When such an interpretation is defined, we say that E is a model of A, and we write µ : E |ù A. Notice that such an interpretation can naturally be extended to arbitrary index terms on the signature ΣA , and we assume in the following that a rewriting program and its model have disjoint signatures. Definition 4.3 (Validity in a Model) Given µ : E |ù A, we say that a semantic judgement φ; Φ (A I ď J is valid in the model (notation: φ; Φ (µ I ď J) when φ; Φ (F I ď J where F “ AŹY E Y tf :“ µpfq | f isŹunspecified in Au. This definition is naturally extended to side conditions (with µ , R standing for F , R). Please note that if A is a completely specified rewriting program, Ź Ź then any model µ : E |ù A has an interpretation µ with an empty domain, and µ , R iff A , R (still assuming that ΣA and ΣE are disjoint). Now, suppose that µ : E |ù A and that the index terms I (from ΣE ) and J (from ΣA ) are such that φ; Φ (E I ď µpJq. Then, with a slight abuse of notation, we simply write φ; Φ (µ I ď J. The same notation can be extended to types and judgements. 14 As already mentioned, the equational programs handled by our type inference algorithm are not necessarily completely specified. Function symbols which are not specified are precisely those occurring in “negative position” in the judgement produced in output. This invariant will be very useful and is captured by the following definition: Definition 4.4 (Positive and Negative Symbols) Given a primitive type τ , the sets of its positive and negative symbols (denoted by τ ` and τ ´ respectively) are defined inductively by Natripφqs` “ ra ă hpφqs ¨ pσ ( τ q` ; “ tiu; σ´ Y τ ` ; Natripφqs´ “ ra ă hpφqs ¨ pσ ( τ q´ ; “ H; thu Y σ ` Y τ ´ . Then the set of positive (resp. negative) symbols of a judgement φ; Φ; pxi : σi qiďn $EI t : τ is the union of all negative (resp. positive) symbols of the σi ’s and all positive (resp. negative) symbols of τ . Polarities in t`, ´u are indicated with symbols like p, q. Given such a p, the opposite polarity is p. Definition 4.5 (Specified Symbols, Types and Judgments) Given a set of function symbols S, a symbol f is said to be pS, Aq-specified when there is a rule fpφq :“ J in A such that any function symbol appearing in J is either f itself, or in S, or a symbol that is pS Y tfu, Aztfpφq :“ Juq-specified. Remember that when there is no rule fpφq :“ J in A the symbol f is unspecified in A. A primitive type σ is said to be pp, S, Aq-specified when all function symbols in σ p are pS, Aq-specified and all symbols in σ p are unspecified. A judgement φ; Φ; Γ $A I t : τ is correctly specified when τ and all types in Γ are primitive for φ, and τ is p`, N , Aq-specified, and all types in Γ are p´, N , Aq-specified, and all function symbols in I are pN , Aq-specified where N is the set of negative symbols of the judgement. In other words, a judgement is correctly specified if the underlying equational program (possibly recursively) defines all symbols in positive position depending on those in negative position. 4.3 The Structure of the Algorithm The type inference algorithm that we develop here receives in input a PCF term t and returns a d`PCF judgement H $EK t : τ for it, together with a set of side conditions R. We will prove that it is correct, in the sense that the typing judgement is derivable iff the side conditions hold. The algorithm proceeds as follows: 1. Compute dPCF , a PCF type derivation for t; 2. Proceeding by structural induction on dPCF , construct a d`PCF derivation for t (call it dv ) and the corresponding set of side conditions R; 3. Returns R and the conclusion of dv . The skeleton prσsq (or prAsq) of a modal type σ (resp. of a linear type A) is obtained by erasing all its indexes (and its bounds ra ă Is). The skeleton of a d`PCF derivation is obtained by replacing each type by its skeleton, and erasing all the subsumption rules. In PCF the type inference problem is decidable, and the Step 1. raises no difficulty: actually, one could even assume that the type dPCF attributes to t is principal. The core of the algorithm is of course Step 2. In Section. 4.5 we will define a recursive algorithm gen that build dv and R by annotating dPCF . The algorithm gen itself relies on some auxiliary algorithms, which will be described in Section 4.4 below. All auxiliary algorithms we will talk about have the ability to generate fresh variables and function symbols. Strictly speaking, then, they should take a counter (or anything similar) as a parameter, but we elide this for the sake of simplicity. Also we consider that we assume the existence of a function αpφ; T q that, given a set of index variables φ and a PCF type T , returns a modal type τ primitive for φ, containing only fresh function symbols, and such that prτ sq “ T . 4.4 Auxiliary Algorithms and Linear Logic The design of systems of linear dependent types such as d`PCFV and d`PCFN is strongly inspired by BLL, itself a restriction of linear logic. Actually, the best way to present the type inference algorithm consists in 15 first of all introducing four auxiliary algorithms, each corresponding to a principle regulating the behaviour of the exponential connectives in linear logic. Notice that these auxiliary algorithms are the main ingredients of both d`PCFV and d`PCFN type inference. Consistently to what we have done so far, we will prove and explain them with d`PCFV in mind. All the auxiliary algorithm we will talk about in this section will take a tuple of d`PCFV types as first argument; we assume that all of them have the same skeleton and, moreover, that all index terms appearing in them are pairwise distinct. Dereliction. Dereliction is the following principle: any duplicable object (say, of type !A) can be made linear (of type A), that is to say !A Ñ A. In d`PCF, being duplicable means having a modal type, which also contains some quantitative information, namely how many times the object can be duplicated, at most. In d`PCF, dereliction can be simply seen as the principle ra ă 1s ¨ A Ñ At0{au, and is implicitly used in the rules (App) and (Fix ). Along the type inference process, as a consequence, we often need to create “fresh instances” of dereliction in the form of pairs of types being in the correct semantic relation. This is indeed possible: Lemma 4.1 There is an algorithm der such that given two types τ (primitive for φ) and σ (primitive for a, φ) of the same skeleton, Ź derppσ, τ q; a; φ; Φ; pq “ pA, Rq where: 1. for every E Ě A, if E , R then φ; Φ $E σt0{au ” τ ; 2. whenever φ; Φ $E %t0{au Ź ” ξ where pr%sq ” prσsq, there is µ : E |ù A such that φ; Φ $µ σ ” %, φ; Φ $µ τ ” ξ, and µ , R; 3. σ is pp, τ p , Aq-specified and τ is p p, σ p , Aq-specified. Proof. The algorithm der is defined by recursion on the structure of σ: • Here are two base cases: derppNatrfpa, φqs, Natrgpφqsq; a; φ; Φ; `q “ ptgpφq :“ fp0, φqu, tφ, Φ |ù fp0, φq Óuq derppNatrfpa, φqs, Natrgpφqsq; a; φ; Φ; ´q “ ptfpa, φq :“ gpφqu, tφ, Φ |ù gpφq Óuq • Inductive cases are slightly more difficult: băfpa,φq derppσ1 ( σ2 , τ1 băgpφq ` ( τ2 q; a; φ; Φ; `q “ pA´ 1 Y A2 Y tgpφq :“ fp0, φqu, R1´ Y R2` Y tφ, Φ |ù fp0, φq Óuq; băfpa,φq derppσ1 ( σ2 , τ1 băgpφq ´ ( τ2 q; a; φ; Φ; ´q “ pA` 1 Y A2 Y tfpa, φq :“ gpφqu, R1´ Y R2` Y tφ, Φ |ù gpφq Óuq. where: ´ derppσ1 , τ1 q; a; b, φ; Φ, b ă fp0, φq; `q “ pA´ 1 , R1 q; ` derppσ1 , τ1 q; a; b, φ; Φ, b ă gpφq; ´q “ pA` 1 , R1 q; ` derppσ2 , τ2 q; a; b, φ; Φ, b ă fp0, φq; `q “ pA` 2 , R2 q; ´ derppσ2 , τ2 q; a; b, φ; Φ, b ă gpφq; ´q “ pA´ 2 , R2 q. Let us now prove the Lemma by induction on the structure of σ: • If σ “ Natrfp0, φs, then the thesis can be easily reached; băfpa,φq băgpφq • Suppose that σ “ σ1 ( σ2 and that τ “ τ1 ( τ2 . For simplicity, suppose that p “ ` (the case p “ ´ is analogous): Ź Ź ´ ` 1. If E Ź Ě A, then E Ě A´ R then, of course E , R1 and 1 and E Ě A2 . Moreover, if E , E , R2` . As a consequence, by induction hypothesis, we have φ, b; Φ, b ă gpφq $E σ1 t0{au ” τ1 ; φ, b; Φ, b ă fpa, φq $E σ2 t0{au ” τ2 . 16 From φ; Φ |ùE fp0, φq Ó it follows that φ; Φ |ùE gpφq “ fp0, φq. As a consequence, φ; Φ $E σ ” τ. 2. If φ; Φ $E %t0{au ” ξ where pr%sq ” prσsq, we can safely assume that băI % “ %1 ( %2 băJ ξ “ ξ1 ( ξ2 and moreover, that φ, b; Φ, b ă It0{au $E %1 t0{au ” ξ1 t0{au; φ, b; Φ, b ă J $E %2 ” ξ2 ; φ; Φ (E It0{au “ J. Assume for the sake of simplicity that p “ `. Then, from the two judgements above, one obtains: φ, b; Φ, b ă fp0, φq $EYtfpa,φq:“Iu %1 t0{au ” ξ1 t0{au φ, b; Φ, b ă gpφq $EYtgpφq:“Ju %2 ” ξ2 ` By induction hypothesis, there are µ1 : pE Y tfpa, φq :“ Iuq |ù A´ 1 and µ2 : pE Y tgpφq :“ Juq |ù A2 such that φ, b; Φ, b ă fp0, φq $EYtfpa,φq:“Iu σ1 t0{au ” %1 t0{au; φ, b; Φ, b ă fp0, φq $EYtfpa,φq:“Iu τ1 t0{au ” ξ1 t0{au; φ, b; Φ, b ă gpφq $EYtgpφq:“Ju σ2 ” %2 ; φ, b; Φ, b ă gpφq $EYtgpφq:“Ju τ2 ” ξ2 . Ź ´ Ź ` ´ and µ1 , R1 , and µ2 , R2 . By way Ź Ź of `the push-out technique, we get 1 : E |ù A1 and ` ´ 2 : E |ù A2 such that 1 , R1 , and 2 , R2 . Now, µ is Ź defined as µ1 Y µ2 , plus the assignment of I (after some α-renaming) to f. First of all, notice that µ , R, simply because φ; Φ (E It0{au Ó. Moreover, observe that, by easy manipulations of the derivations above, one gets: φ, b; Φ, b ă It0{au $µ σ1 t0{au ” %1 t0{au; φ, b; Φ, b ă It0{au $µ τ1 t0{au ” ξ1 t0{au; φ, b; Φ, b ă J $µ σ2 ” %2 ; φ, b; Φ, b ă J $µ τ2 ” ξ2 . 3. This is an easy consequence of how σ and τ are built. This concludes the proof. l The algorithm der works by recursion on the PCF type prσsq and has thus linear complexity in |prσsq|. Contraction. Another key principle in linear logic is contraction, according to which two copies of a duplicable object can actually be produced, !A Ñ!Ab!A. Contraction is used in binary rules like (App) or (If ), in the form of the operator Z. This time, we need an algorithm ctr which takes three linear types A, B and C (all of them primitive for pa, φq) and turn them into an equational program and a set of side conditions: ctrppA, B, Cq; pI, Jq; a; φ; Φ; pq “ pA, Rq. The parameters I and J are index terms capturing the number of times B and C can be copied. A Lemma akin to 4.1 can indeed be proved about ctr. 17 Lemma 4.2 There is an algorithm ctr such that whenever B and C are two linear types of the same skeleton and primitive for pa, φq, ctrppB, C, Iq; pJ, aq; φ; Φ; p; “qpA, A, Rq, where: • A is primitive for a, φ,Ź and prAsq “ prBsq “ prCsq; • For any E Ě A, E , R iff φ; Φ $E ra ă I ` Js ¨ A ” pra ă Is ¨ B 1 q Z pra ă Js ¨ C 1 q for some B 1 and C 1 such that φ; Φ, a ă I $E B 1 ” B and φ; Φ, a ă J $E C 1 ” C. • A is pp, B p Y C p , Aq-specified, and B and C are p p, A p , Aq-specified. Digging. In linear logic, any duplicable object having type !A can be turned into an object of type !!A, namely an object which is the duplicable version of a duplicable object. Digging is the principle according to which this transformation is possible, namely !A Ñ!!A. At the quantitative level, this corresponds to splitting a bounded sum into its summands. This is used in the typing rules for functions, (() and (Fix ). The auxiliary algorithm corresponding to the digging principle takes two linear types and builds, as usual, a rewriting program and a set of side conditions capturing the fact that the first of the two types is the bounded sum of the second: digppA, Bq; pI, Jq; φ; pa, bq; Φ; pq “ pA, Rq. The correctness of dig can again be Ź proved similarly to what we did in Lemma 4.1, the key statement being that for every E Ě A such that E , R, the following must hold ÿ ÿ φ; Φ $E rb ă Js ¨ A ” rb ă Js ¨ C aăI aăI for some C such that φ; Φ, a ă I, b ă J $E C ” B. Lemma 4.3 There is an algorithm dig such that for any linear type B primitive for pa, b, φq, digppB, Iq; pJ, φq; a; pb, Φq; p; q “ pA, A, Rq, where: • A is primitive for b, φ,Źand prAsq “ prBsq; • for any E Ě A, E , R iff ÿ ÿ φ; Φ $E rb ă Js ¨ A ” rb ă Js ¨ B 1 aăI aăI for some B 1 such that φ; Φ, a ă I, b ă J $E B 1 ” B; • A is pp, B p , Aq-specified and B is p p, A p , Aq-specified. Weakening. Weakening means that duplicable objects can also be erased, even when the underlying index is 0. Weakening is useful in the rules (Ax ) and (n). Once a fresh d`PCFV type A is produced, the only thing we need to do is to produce an equational program A specifying (in an arbitrary way) the symbols in Ap , this way preserving the crucial invariants about the equational programs manipulated by the algorithm. Formally, it means that there is an algorithm weak such that weakpA; φ; a; pq “ A, where A is pp, H, Aq-specified Lemma 4.4 There is an algorithm weak such that weakpT ; φ; a; pq “ pA, Aq where, • A is primitive for a; φ, and prAsq “ T ; • for every E Ě A, it holds that φ; Φ, a ă 0 $E A ” A; • A is pp, H, Aq-specified. Observe how no sets of constraints is produced in output by weak, contrarily to der and ctr. 18 Some Extra Functions. There are also some extra auxiliary algorithms that are used by the function gen. Although they are not related to some exponential rule of LL, they are defined in a similar way than the previous one. The following lemma is used for type checking the (Ax ) rule: Lemma 4.5 There is an algorithm eq such that, given two types σ and τ primitive for φ and of same skeleton, eqppτ ; σq; φ; Φ; pq Ź “ pA; Rq where, • for every E Ě A, E , R ðñ φ; Φ $E τ ” σ; • τ is pp, σ p , Aq-specified and σ is p p, τ p , Aq-specified. We also need a generalisation of the dereliction algorithm, where any index I can be used instead of 0 in der. It is necessary for type checking a fix point. Lemma 4.6 There is an algorithm subs such that, for any type τ primitive for φ and σ primitive for pφ, aq that have the same skeleton, Ź subsppσ, τ q; a; I; φ; Φ; pq “ pA, Rq where, • for any E Ě A, E , R ðñ φ; Φ $E σtI{au ” τ ; • σ is pp, τ p , Aq-specified and τ is p p, σ p , Aq-specified. The following lemma is needed to type check the (If ) rule. It requires to use a function symbol ifpa, b, cq with two equations: ifp0, b, cq “ b and ifpa ` 1, b, cq “ c. Lemma 4.7 There is an algorithm fork such that for any types τ1 , τ2 with the same skeleton, that are primitive for φ, forkpτ1 ; τ2 ; I; φ; Φ; pq “ pσ, A, Rq where, • σ is primitive for pa, φq, and prσsq “ prτi sq; Ź • For any equational program E Ě A, E , R iff φ; Φ, I “ 0 $E τ1 ” σ and φ; Φ, I ě 1 $E τ2 ” σ; • σ is pp, τ1p Y τ2p , Aq-specified, and τ1 and τ2 are p p, σ p , Aq-specified. 4.5 The Type Inference Procedure In this section, we will describe the core of our type inference algorithm. This consists in a recursive algorithm gen which decorates a PCF type derivation dPCF , producing in output a d`PCF judgement, together with an equational program and a set of side conditions. In order to correctly create fresh symbols and to format side conditions properly, the main recursive function gen also receives a set of index variables φ and a set of constraints Φ in input. Thus, it has the following signature: genpφ, Φ, dPCF q “ pΓ $I t : τ ; A; Rq. We will prove that the the output of gen satisfies the following two invariants: • Decoration. prΓsq $ t : prτ sq is the judgement concluding dPCF . • Polarity. φ; Φ; Γ $A I t : τ is correctly specified (Definition 4.5). The algorithm gen proceeds by inspecting dPCF in an inductive manner. It first annotates the types in the conclusion judgement with fresh function symbols to get a d`PCF judgement J . Then a recursive call is performed on the immediate sub-derivations of dPCF , this way obtaining some d`PCF typing judgement Ji . Finally gen generates, calling the auxiliary algorithms, the equations on function symbols that allow to derive J from the Ji ’s, The equations are written in A, and the required assumptions of index convergence in R. Decoration and Polarity are the invariants of the algorithm gen. In particular, the auxiliary algorithms are always called with the appropriate parameters, this way enforcing Polarity. The algorithm computing gen proceeds by case analysis on dPCF . pAxq . • Assume dPCF “ y1 : U 1 , . . . , y k : U k , x : T $ x : T For each i, let Bi “ αpφ; Ui q and Ai “ weakpBi ; φ; bi ; ´q (where all the bi ’s are fresh). Then let σ and τ produced by αpφ; T q, and write pA0 ; Rq “ eqppτ ; σq; φ; Φ; `q. Thus return pΓ, x : σ $0 x : τ ; A; Rq with 19 " Ť A “ A0 Y iďk pAi Y thi :“ 0uq Γ “ tyi : rbi ă hi s ¨ Bi uiďk where the hi ’s are fresh. pnq . • Suppose dPCF “ y1 : U1 , . . . , yk : Uk $ n : Nat Again, let Bi “ αpφ; Ui q and Ai “ weakpBi ; φ; bi ; ´q . Let ipφq be a fresh function symbol. Then return pΓ $0 n : Natripφqs; A; Hq where the hi ’s are fresh symbols and ď A “ pAi Y thi pφq :“ 0uq Y t ipφq :“ n u; i Γ “ tyi : rbi ă hi pφqs ¨ Bi uiďk . .. . pd1PCF q : Π $ t : Nat • If dPCF “ psq . Π $ sptq : Nat Let pΓ $K t : Natrjpφqs; A0 ; Rq “ genpd1PCF , φ, Φq, and let ipφq be a fresh symbol. Then return pΓ $K sptq : Natripφqs; A; Rq where A “ A0 Y t ipφq :“ jpφq ` 1 u. • For the typing rule (p), we do the same as previously but with ipφq “ jpφq ´ 1 instead of ipφq “ jpφq ` 1 in the equational program. .. .. .. . . . pdPCF0 q : Π $ t : Nat pdPCF1 q : Π $ u1 : T pdPCF2 q : Π $ u2 : T pIfq , Π $ ifz t then u1 else u2 : T let pΓ $K t : Natrjpφqs; A0 ; R0 q “ genpdPCF0 , φ, Φq, and p∆i $Hi ui : τi ; Ai ; Ri q “ genpdPCFi , φ, Φi q (for i “ 1, 2), with Φ1 “ pΦ, jpφq “ 0q and Φ2 “ pΦ, jpφq ě 1q. τ1 and τ2 both have skeleton T and are primitive for φ (since Decoration and Polarity hold by induction hypothesis). So we can compute pτ 1 ; A1 ; R 1 q “ forkpτ1 ; τ2 ; jpφq; φ; Φ; `q. In the same way, ∆1 and ∆2 have the same skeleton Π. So for each pyi : σi q in ∆1 there is pyi : σi1 q in ∆2 so that we can compute pσi2 , A1i , Ri1 q “ forkpσi ; σi1 ; jpφq; φ; Φ; ´q. Let ∆ “ tyi : σi2 u and write rai ă mi s ¨ Ci “ σi2 . ∆ also has skeleton Π, and so has Γ. So for each i, there is some variable declaration yi : rai ă ni s ¨ Bi in Γ, so that we can compute pAi , A2i , Ri2 q “ ctrppBi , Ci , ni q; pmi , ai q; φ; Φ; ´;). Then let hi pφq be a fresh symbol for each i, and return pΓ1 $K`H ifz t then u1 else u2 : τ 1 ; A; Rq where Ť R “ R0 Y R1 Y R2 Y R 1 Y i pRi1 Y Ri2 q A “ A0ŤY A1 Y A2 Y A1 Y t hi pφq :“ ni ` mi ui Y i pA1i Y A2i q 1 Γ “ tyi : rai ă hi pφqs ¨ Ai ui H “ ifpjpφq, H1 , H2 q • If dPCF = d1PCF : Π $ t : U ñ T d2PCF : Π $ u : U Π$tu:T • If dPCF = let pΓ1 $K t : ra ă fpφqs ¨ pσ1 ( σ2 q; A1 ; R1 q “ genpφ; Φ; dPCF1 q, and pΓ2 $H u : τ ; A2 ; R2 q “ genpφ; Φ; dPCF2 q. Let pB, S q “ derppσ1 , τ q; a; φ; Φ; `q. We then annotate T : let τ2 “ αpφ; T q, and let pC, U q “ derppσ2 , τ2 q; a; φ; Φ; ´q. Then we build a context equivalent to Γ1 Z Γ2 : for any y : rby ă iy pφqs ¨ By in Γ1 , there is some y : rby ă jy pφqs ¨ Cy in Γ2 (possibly after some α-conversion). Then let Ay “ αppby , φq; prBy sqq, and pAy ; Ry q “ ctrppAy , By , Cy q; piy pφq, jy pφqq; by ; φ; Φ; ´q. There Ť are ∆i ” Γi (for i “ 1, 2) such that φ; Φ $E ty : rby ă iy pφq ` jy pφqs ¨ Ay uy ” ∆1 Z ∆2 , for every E Ě y Ay such that 20 E, ŹŤ p y Ry q. Thus let hy ’s be fresh symbols and return p∆ $K`H t u : τ2 ; A; Rq with R “ R1 Y R2 Y S Y U ď` ˘ Ry Y tφ; Φ ( iy pφq ` jy pφq Óu ; Y y A “ A1 Y A2 Y B Y C Y tfpφq :“ 1u ď` ˘ Ay Y thy pφq :“ iy pφq ` jy pφqu ; Y y ∆ “ ty : rby ă hy pφqs ¨ Ay uy . • Assume that dPCF is d1PCF : Π, x : U $ t : T Π $ λx.t : U ñ T Let a be a fresh index variable, and ipφq be a fresh function symbol, and compute pΓ, x : σ $K t : ř τ ; B; S q “ genpd1PCF , pa, φq, pa ă ipφq, Φqq. We build a context equivalent to aăipφq Γ: for every y : rby ă jy pa, φqs ¨ By P Γ, let Ay “ αppby , φq; prBy sqq, let hy pφq be a fresh symbol, and write pAy , Ry q “ digppAy , By q; pipφq, jy pa, φqq; φ; pa, by q; Φ; ´q. Then return p∆ $ipφq`řaăipφq K λx.t : ra ă ipφqs ¨ pσ ( τ q; A; Rq where R“S Y ď pRy Y tφ; Φ (E y ÿ jy pa, φq Óuq; aăipφq A “ B Y Yy pAy Y thy pφq :“ ÿ jy pa, φquq; aăipφq ∆ “ ty : rby ă hy pφqs ¨ Ay uy . .. . pd1PCF q : Π, x : T $ t : T pFixq . • If dPCF “ Π $ fix x.t : T Let b be a fresh index variable, and hpφq be a fresh function symbol, and compute pΓ, x : ra ă ipb, φqs¨A $J t : ra ă mpb, φqs ¨ B; A1 ; R 1 q “ genpd1PCF , pb, φq, pb ă hpφq, Φqq (up to α-conversion we can assume that the index variable a is the same in the context and the type). Because of the type equations we have to Ïb`1,a ensure (namely pa, b, φq; pa ă ipb, φq, b ă hpφq, Φq $E Bt0{aut1 ` b ` b ipb, φq{bu ” A), we will use intermediate types. First we annotate T : let σ “ αpb, φ; T q. Up to α-conversion, σ “ ra ă lpb, φqs ¨ C for some C. Let pA1 , R1 q “ derppB, Cq; a; pb, φq; b ă hpφq, Φ; ´q. By Lemma 4.1, C is p`, B ` , A1 q-specified and B is p´, C ´ , A1 q-specified, and for any E Ě A1 , ľ E, R1 ðñ b, φ; b ă hpφq, Φ $E Bt0{au ” C . Ïb`1,a ipb, φq; pa, b, φq; a ă ipb, φq, b ă hpφq, Φ; ´q. Now let pA2 , R2 q “ subsppC, Aq; b; 1 ` b ` b Ź By Lemma 4.6, A is p`, C ` , A2 q-specified and C is p´, A´ , A2 q-specified, and for any E Ě A2 , E , R2 iff a, b, φ; a ă ipb, φq, b ă hpφq, Φ $E Ct1 ` b ` b`1,a ï b Here 21 ipb, φq{bu ” A . Hence E1 Y E2 is positively defined for A and negatively for B, and E1 Y E2 Ď F ( pR1 , R2 q implies a, b, φ; a ă ipb, φq, b ă hpφq, Φ $F Bt0{aut1 ` b ` b`1,a ï ipb, φq{bu ” A. b Again we annotate T : let τ “ αpφ; T q. Up to α-conversion, τ “ ra ă kpφqs ¨ D for some D. Let Ï0,a pE3 , R3 q “ subsppC, Dq; b; b ipb, φq; pa, φq; pa ă k, Φq; ´q. Then E3 is positively specified for D and negatively for A, and if E3 Ď F ( R3 then a, φ; a ă k, Φ $F Ct 0,a ï ipb, φq{bu ” D. b Hence E1 Y E2 Y E3 is positively defined for any F Ě E1 Y E2 Y E3 , Ï0,afor D and negatively for B, and Ï0,a F ( pR1 , R2 , R3 q implies a, φ; a ă k, b ipb, φq ă hpφq, Φ $F Bt0{aut b ipb, φq{bu ” D. Hence for Ï0,kpφq Ï0,kpφq any F Ě E1 YE2 YE3 Ythpφq “ b ipb, φqu such that F ( pR1 , R2 , R3 q and φ; Φ (F ipb, φq Ó, b φ; Φ $F ra ă ks ¨ Bt0{aut 0,a ï ipb, φq{bu ” ra ă ks ¨ D. b To deal with the context, we proceed as for ((): for every y : rby ă Jy s ¨ By P Γ, let pAy , Ey , Ry q “ digppBy , hpφqq; pJy , φq; b; pby , Φq; ´;). By Lemma 4.3, Ey is positively specified for By and negatively for Ay , and Ey Ď F ( Ry implies ÿ ÿ φ; Φ $F rby ă J y s ¨ Ay ” rby ă Jy s ¨ By1 băhpφq băhpφq 1 ” By . Let ly pφq be a fresh symbol, and write for some By1 such that ř φ; Φ, b ă hpφq,1 by ă Jy $F By ř 1 Ey “ Ey Y tly pφq “ băhpφq Jy u and Ry “ Ry Y tφ; Φ ( bălpφq Jy Óu. Finally we return pdv , Rq where Ï0,kpφq Ť R “ R 1 Y R1 Y R2 Y R3 Y tφ; Φ ( b ipb, φq Óu Y y Ry1 d1v dv “ φ; Φ; ∆ $Ehpφq`ř fix x.t : τ băhpφq J Ï0,kpφq Ť E “ E 1 Y E1 Y E2 Y E3 Y thpφq “ b ipb, φqu Y y Ey1 ∆ “ ty : rby ă ly pφqs ¨ Ay uy Lemma 4.8 For every φ, Φ, and every PCF derivation dPCF , genpφ; Φ; dPCF q is well defined on the form pΓ $I t : τ ; A; Rq, and satisfies Decoration and Polarity. 4.6 Correctness The algorithm we have just finished describing needs to be proved sound and complete with respect to d`PCFV typing. As usual, this is not a trivial task. Moreover, linear dependent types have a semantic nature which makes the task of formulating (if not proving) the desired results even more challenging. 4.6.1 Soundness A type inference procedure is sound when the inferred type can actually be derived by way of the type system at hand. As already remarked, gen outputs an equational program A which possibly contains unspecified symbols and which, as a consequence, cannot be exploited in typing. Moreover, the role of the set of proof obligations in Ris maybe not clear at first. Actually, soundness holds for every completely specified E Ě A which makes the proof obligations in R true: 22 Theorem 4.9 (Soundness) If dPCF is a PCF derivation for t, then for any φ and Φ, genpφ; Φ; dPCF q “ pΓ $I t : τ ; A; Rq where φ; Φ; Γ $A I t : τ is correctly specified and for any E Ě A, ľ E, R ùñ φ; Φ; Γ $EI t : τ is derivable and precise. 4.6.2 Completeness But are we sure that at least one type derivation can be built from the outcome of gen if one such type derivation exists? Again, it is nontrivial to formulate the fact that this is actually the case. Theorem 4.10 (Completeness) If φ; Φ; ∆ $EJ t : σ is a precise d`PCFV judgement derivable with dv , then Ź genpφ; Φ; prdv sqq is of the form pΓ $I t : τ ; A; Rq, and there is µ : E |ù A such that µ , R. A direct consequence of soundness and completeness (and the remark on Definition 4.3) is the following: Corollary 4.11 If a closed term t is typable in PCF with type Nat and a derivation dPCF , then genpH; H; dPCF q “ Ź and t is typable in d`PCFV iff E , R. 5 p$I t : Natrfs; E; Rq Type Inference at Work The type inference algorithm presented in the previous section has been implemented in Ocaml2 . Programs, types, equational programs and side conditions become values of appropriately defined inductive data structures in Ocaml, and the functional nature of the latter makes the implementation effort easier. This section is devoted to discussing the main issues we have faced along the process, which is still ongoing. The core of our implementation is an Ocaml function called CheckBound. Taking a closed term t having PCF type T in input, CheckBound returns a typing derivation dv , an equational program E and a set of side conditions R. The conclusion of dv is a d`PCF typing judgement for the input term. If T is a first-order type, then the produced judgement is derivable iff all the side conditions in R are valid (see Corollary 4.11). To do so, CheckBound calls (an implementation of) gen on t and a context φ consisting of n unconstrained index variables, where n is the arity of t. This way, CheckBound obtains A and R as results, and then proceeds as follows: • If T is Nat, then A is already completely specified and Corollary 4.11 ensures that we already have what we need. • If T has a strictly positive arity, then some of the symbols in A are unspecified, and appropriate equations for them need to be added to A. Take for instance a term s of type Nat ñ Nat. CheckBound(s) returns A, R, and a typing judgement on the form băfpaq a; H $A K t : Natrgpa, bqs ( Natrjpa, bqs, where j is a positive symbol while f and g are negative, thus unspecified in A. A can be appropriately “completed” by adding the equations fpaq :“ 1 and gpa, bq :“ a to it. This way, we are insisting on the behaviour of t when fed with any natural number (represented by a) and when the environment needs t only once. How about complexity analysis? Actually, we are already there: the problem of proving the number of machine reduction steps Ź needed by t to be at most p : N Ñ N (where p is, e.g. a polynomial) becomes the problem of checking E , S where E is the appropriate completion of A, and S is R Y tpK ` 1qp|t| ` 2q ď ppaqu (Proposition 3.2). 2 the source code is available at http://lideal.cs.unibo.it. 23 Simplifying Equations. Equational programs obtained in output from CheckBound contains many equations which are trivial (such as fpaq “ n or fpaq “ gpaq), and as such can be eliminated. Moreover, ř instances of forest cardinalities and bounded sums can sometime be greatly simplified. As an example, aă0 J can always be replaced by 0. This allows, in particular, to turn A into a set of fewer and simpler rules, thus facilitating the next phase. A basic simplification procedure has already been implemented, and are called by CheckBound on the output of gen. However, automatically treat the equational program by an appropriate prover would be of course desirable. For this purpose, the possibility for CheckBound to interact with Maude [8], a system supporting equational and rewriting logic specification, is currently investigated. Checking Side Conditions. As already stressed, once CheckBound has produced a pair pA, Rq, the task we started from, namely complexity analysis of t, is not finished, yet: checking proof obligations in R is as undecidable as analysing the complexity of t directly, since most of the obligations in R are termination statements anyway. There is an important difference, however: statements in R are written in a language (the first-order equational logic) which is more amenable to be treated by already existing automatic and semi-automatic tools. Actually, the best method would be to first call as many existing automatic provers on the set of side conditions, then asking the programmer to check those which cannot be proved automatically by way of an interactive theorem prover. For this purpose, we have implemented an algorithm translating a pair in the form pA, Rq into a Why3 [6] theory. Indeed, Why3 is an intermediate tool between first order logic and various theorem provers, from SMT solvers to the Coq proof assistant [5]3 on the side conditions produced by CheckBoundptq. Most of them are actually proved automatically, at least in the few example programs we have mentioned in the course of this paper 4 . Actually, the symbol names used in the Why3 theory are the same as the ones used for the annotation of the type derivation (that can be printed by CheckBound). Hence trying to check interactively some side conditions, the programmer can access both the definition of a symbol in the equational program, and the subterm of t it refers to in the type derivation. However, using the proof assistant Coq on the few side conditions that remain to be interactively checked through the Why3 tool is not as simple as it should be. This is due to the way we express bounded sum and forest cardinality indexes in a first order logic. To facilitate the work of the programmer checking the side conditions, it would thus be suitable to also translate them directly into Coq, making use of its higher order definition facilities. The interactive theorem prover would be called directly, but only on those side conditions that cannot be proved automatically. This of course requires some special care: we would like to preserve a formal link between the Why3 theory and the statement which that have to be proved in Coq (or in any interactive theorem prover). All these issues are currently investigated and developed within Lideal [25]. 6 Related Work Complexity analysis of higher-order programs has been the object of study of much research. We can for example mention the many proposals for type systems for the λ-calculus which have been shown to correspond in an extensional sense to, e.g. polynomial time computable functions as in implicit computational complexity. Many of them can be seen as static analysis methodologies: once a program is assigned a type, an upper bound to its time complexity is relatively easy to be synthesised. The problem with these systems, however, is that they are usually very weak from an intentional point of view, since the class of typable programs is quite restricted compared to the class of all terms working within the prescribed resource bounds. More powerful static analysis methodologies can actually be devised. All of them, however, are limited either to very specific forms of resource bounds or to a peculiar form of higher-order functions or else they 3 Alt-ergo, Cvc3, E-prover, Gappa, Simplify, Spass, Vampire, veriT, Yicex and Z3 results of these tests are available at http://lideal.cs.unibo.it/ 4 The 24 do not get rid of higher-order as the underlying logic. Consider, as an example, one of the earliest work in this direction, namely Sands’s system of cost closures [28]: the class of programs that can be handled includes the full lazy λ-calculus, but the way complexity is reasoned about remains genuinely higher-order, being based on closures and contexts. In Benzinger’s framework [4] higher-order programs are translated into higher-order equations, and the latter are turned into first-order ones; both steps, and in particular the second one, are not completeness-preserving. Recent works on amortised resource analysis are either limited to first-order programs [20] or to linear bounds [23]. A recent proposal by Amadio and Régis-Gianas [2] allows to reason on the the cost of higher-order functional programs by way of so-called cost-annotations, being sure that the actual behaviour of compiled code somehow reflects the annotation. The logic in which cost annotations are written, however, is a form of higher-order Hoare logic. None of the proposed systems, on the other hand, are known to be (relatively) complete in the sense we use here. Ghica’s slot games [16] are maybe the work which is closest to ours, among the many in the literature. Slot Games are simply ordinary games in the sense of game semantics, which are however instrumented so as to reflect not only the observable behaviour of (higher-order) programs, but also their performance. Indeed, slot games are fully abstract with respect to an operational theory of improvements due do Sands [29]: this can be seen as the counterpart of our relative completeness theorem. An aspect which has not been investigated much since Ghica’s proposal is whether slot games provides a way to perform actual verification of programs, maybe via some form of model checking. As we have already mentioned, linear dependency can be seen as a way to turn games and strategies into types, so one can see the present work also as an attempt to keep programs and strategies closer to each other, this way facilitating verification. 7 Conclusions A type inference procedure for d`PCF has been introduced which, given a PCF term, reduces the problem of finding a type derivation for it to the one of solving proof obligations on an equational program, itself part of the output. Truth of the proof obligations correspond to termination of the underlying program. Any type derivation in d`PCF comes equipped with an expression bounding the complexity of evaluating the underlying program. Noticeably, proof obligations and the related equational program can be obtained in polynomial time in the size of the input PCF program. The main contribution of this paper consists in having shown that linear dependency is not only a very powerful tool for the precise analysis of higher-order functional programs, but is also a way to effectively and efficiently turn a complex problem (that of evaluating the time complexity of an higher-order program) into a much easier one (that of checking a set of proof obligations for truth). Although experimental evaluation shows that proof obligations can potentially be handled by modern tools mixing automatic and semi-automatic reasoning, as explained in Section 5, much remains to be done about the technical aspects of turning proof obligations into a form which is suitable to automatic or semiautomatic solving. Actually, many different tools could conceivably be of help here, each of them requiring a specific input format. This implies, however, that the work described here, although not providing a fully-fledged out-of-the-box methodology, has the merit of allowing to factor a complex non-well-understood problem into a much-better-studied problem, namely verification of first-order inequalities on the natural numbers. References [1] S. Abramsky, R. Jagadeesan, and P. Malacaria. Full abstraction for PCF. I & C, 163(2):409–470, 2000. [2] R. M. Amadio and Y. Régis-Gianas. Certifying and reasoning on cost annotations of functional programs. CoRR, abs/1110.2350, 2011. [3] G. Barthe, B. Grégoire, and C. Riba. Type-based termination with sized products. In CSL 2008, volume 5213 of LNCS, pages 493–507. Springer, 2008. 25 [4] R. Benzinger. Automated higher-order complexity analysis. Theor. Comput. Sci., 318(1-2):79–103, 2004. [5] Y. Bertot and P. Castéran. Coq’Art: The Calculus of Inductive Constructions. Springer, 2004. [6] F. Bobot, J.-C. Filliatre, C. Marché, and A. Paskevich. Why3: Shepherd your herd of provers. In First International Workshop on Intermediate Verification Languages, pages 53–64, 2011. [7] E. M. Clarke. Programming language constructs for which it is impossible to obtain good hoare axiom systems. J. ACM, 26(1):129–147, 1979. [8] M. Clavel, F. Durán, S. Eker, P. Lincoln, N. Mart´i-Oliet, J. Meseguer, and C. Talcott. The Maude 2.0 system. In RTA 2003, volume 2706 of LNCS, pages 76–87, 2003. [9] S. A. Cook. Soundness and completeness of an axiom system for program verification. SIAM J. on Computing, 7:70–90, 1978. [10] K. Crary and S. Weirich. Resource bound certification. In ACM POPL, pages 184–198, 2000. [11] U. Dal Lago. Context semantics, linear logic and computational complexity. In LICS, pages 169–178, 2006. [12] U. Dal Lago and M. Gaboardi. Linear dependent types and relative completeness. In LICS, pages 133–142, 2011. [13] U. Dal Lago and B. Petit. Linear dependent types in a call-by-value scenario. In ACM PPDP 2012, pages 115–126, 2012. [14] E. Denney. Refinement types for specification. In IFIP-PROCOMET, pages 148–166, 1998. [15] M. Felleisen and D. P. Friedman. Control operators, the SECD-machine and the λ-calculus. Technical Report 197, Computer Science Department, Indiana University, 1986. [16] D. R. Ghica. Slot games: a quantitative model of computation. In ACM POPL, pages 85–97, 2005. [17] J.-Y. Girard. Linear logic. Theor. Comp. Sci., 50:1–102, 1987. [18] J.-Y. Girard, A. Scedrov, and P. Scott. Bounded linear logic. Theor. Comp. Sci., 97(1):1–66, 1992. [19] S. Gulwani. Speed: Symbolic complexity bound analysis. In CAV, pages 51–62, 2009. [20] J. Hoffmann, K. Aehlig, and M. Hofmann. Multivariate Amortized Resource Analysis. In ACM POPL, pages 357–370, 2011. [21] J. Hughes, L. Pareto, and A. Sabry. Proving the correctness of reactive systems using sized types. In ACM POPL, pages 410–423, 1996. [22] J. Iversen. An action compiler targeting Standard ML. Sci. Comput. Program., 68(2):79–94, 2007. [23] S. Jost, K. Hammond, H.-W. Loid, and M. Hofmann. Static determination of quantitative resource usage for higher-order programs. In ACM POPL, Madrid, Spain, 2010. [24] J.-L. Krivine. A call-by-name lambda-calculus machine. Higher-Order and Symbolic Computation, 20(3):199–207, 2007. [25] Lideal. Linear dependant analyser. http://lideal.cs.unibo.it, 2012. [26] J. Maraist, M. Odersky, D. N. Turner, and P. Wadler. Call-by-name, call-by-value, call-by-need and the linear lambda calculus. Electr. Notes Theor. Comput. Sci., 1:370–392, 1995. 26 [27] G. D. Plotkin. LCF considerd as a programming language. Theor. Comp. Sci., 5:225–255, 1977. [28] D. Sands. Complexity analysis for a lazy higher-order language. In ESOP 1990, volume 432 of LNCS, pages 361–376, 1990. [29] D. Sands. Operational theories of improvement in functional languages (extended abstract). In Functional Programming, pages 298–311, 1991. [30] R. Wilhelm, J. Engblom, A. Ermedahl, N. Holsti, S. Thesing, D. Whalley, G. Bernat, C. Ferdinand, R. Heckmann, T. Mitra, F. Mueller, I. Puaut, P. Puschner, J. Staschulat, and P. Stenstrom. The worst case execution time problem - overview of methods and survey of tools. ACM Trans. Embed. Comput. Syst., 2008. 27
6cs.PL
Logical Methods in Computer Science Vol. 13(1:8)2017, pp. 1–33 www.lmcs-online.org Submitted Published Jul. 15, 2010 Mar. 17, 2017 LINEAL: A LINEAR-ALGEBRAIC λ-CALCULUS PABLO ARRIGHI a AND GILLES DOWEK b a Université de Grenoble, Laboratoire LIG, UMR 5217, 220 rue de la Chimie, 38400 Saint-Martin d’Hères, France, and Université de Lyon, Laboratoire LIP, UMR 5668, 46 allée d’Italie 69007 Lyon, France. e-mail address: [email protected] b INRIA, 23 avenue d’Italie, CS 81321, 75214 Paris Cedex 13, France. e-mail address: [email protected] Abstract. We provide a computational definition of the notions of vector space and bilinear functions. We use this result to introduce a minimal language combining higherorder computation and linear algebra. This language extends the λ-calculus with the possibility to make arbitrary linear combinations of terms α.t + β.u. We describe how to “execute” this language in terms of a few rewrite rules, and justify them through the two fundamental requirements that the language be a language of linear operators, and that it be higher-order. We mention the perspectives of this work in the field of quantum computation, whose circuits we show can be easily encoded in the calculus. Finally, we prove the confluence of the entire calculus. 1. Motivations Knuth and Bendix have described a method to transform an equational theory into a rewrite system [35]. In this paper, we show that this can be achieved for the theory of vector spaces. This yields a computational definition of the notion of vector space. We then use this definition to merge at a fundamental level higher-order computation in its simplest and most general form, the untyped λ-calculus, together with linear algebra. We see this Linear-algebraic λ-calculus (also referred to as Lineal for short) as a platform for various applications, such as non-deterministic, probabilistic and quantum computation — each of these applications probably requiring their own type systems. This journal paper integrates the contributions from three already published conference papers [5, 6, 7]. There has been a number of recent works surrounding these papers, whose presentation we postpone till Section 8. The emphasis of the present introduction is on the original motivations behind this calculus; in the same way that the emphasis of the present paper is on providing an integrated, coherent, comprehensive presentation of the calculus without further add-ons. Key words and phrases: rewrite systems, untyped λ-calculus, quantum programming languageses. l LOGICAL METHODS IN COMPUTER SCIENCE c DOI:10.23638/LMCS-13(1:8)2017 CC P. Arrighi and G. Dowek Creative Commons 2 P. ARRIGHI AND G. DOWEK 1.1. Quantum programming languages. Over the last two decades, the discovery of several great algorithmic results [22, 52, 33] has raised important expectations in the field of quantum computation. Somewhat surprisingly however these results have been expressed in the primitive model of quantum circuits – a situation which is akin to that of classical computation in the 1950s. Over the last few years a number of researchers have sought to develop quantum programming languages as a consequence. Without aiming to be exhaustive and in order to understand where the perspectives of this work come in, it helps to classify these proposals according to “how classical” versus “how quantum” they are [50]. There are two ways a quantum mechanical system may evolve: according to a unitary transformation or under a measurement. The former is often thought of as “purely quantum”: it is deterministic and will typically be used to obtain quantum superpositions of base vectors. The latter is probabilistic in the classical sense, and will typically be used to obtain some classical information about a quantum mechanical system, whilst collapsing the system to a mere base vector. Note that these are only typical uses: it is well-known that one can simulate any unitary transformation by series of generalized measures on the one hand, and reduce all measures to a mere projection upon the canonical basis at the end of a computation on the other hand. It remains morally true nonetheless that measurement-based models of quantum computation tend to hide quantum superpositions behind a classical interface, whilst the unitary-based models of quantum computation tend to consider quantum superpositions as legitimate expressions of the language, and sometimes even seek to generalize their effects to control flow. Therefore one may say that measurement-based models of quantum computation – whether reliant upon teleportation [40], state transfer [43] or more astonishingly graph states [46] – lie on one extreme, as they keep the “quantumness” to a minimum. A more balanced approach is to allow for both unitary transformations and quantum measurements. Such models can be said to formalize the existing algorithm description methods to a strong extent: they exhibit quantum registers upon which quantum circuits may be applied, together with classical registers and programming structures in order to store measurements results and control the computation [48]. For this reason they are the more practical route to quantum programming. Whilst this juxtaposition of “quantum data, classical control” has appeared ad-hoc and heterogeneous at first, functional-style approaches together with linear type systems [50, 4] have ended up producing elegant quantum programming languages. Finally we may evacuate measures altogether – leaving them till the end of the computation and outside the formalism. This was the case for instance in [55, 56], but here the control structure remained classical. In our view, such a language becomes even more interesting once we have also overcome the need for any additional classical registers and programming structures, and aim to draw the full consequence of quantum mechanics: “quantum data, quantum control”. After all, classical control can be viewed as a particular case of quantum control. Moreover, avoiding this distinction leads to a simpler language, exempt of the separation between classical and quantum expressions. Finally recent results suggest that quantum control may turn out to be more efficient that classical control in the presence of Black-box algorithms [41, 18]. Quantum Turing Machines [13], for instance, lie on this other extreme, since the entire machine can be in a superposition of base vectors. Unfortunately they are a rather oblivious way to describe an algorithm. Functional-style control structure, on the other hand, LINEAL: A LINEAR-ALGEBRAIC λ-CALCULU 3 seem to merge with quantum evolution descriptions in a unifying manner. The functional language we describe may give rise to a “purely quantum” programming language, but only once settled the question of restricting to unitary operators. This language is exempt of classical registers, classical control structure, measurements, and allows arbitrary quantum superpositions of base vectors. A survey and comparison of these quantum programming languages can be found in [31]. 1.2. Current status of the language. In our view, the problem of formulating a language of higher-order computable operators upon infinite dimensional vector spaces was the first challenge that needed to be met, before even aiming to have a physically executable language. In the current state of affairs computability in vector spaces is dealt with matrices and compositions, and hence restricted to finite-dimensional systems – although this limitation is sometimes circumvented by introducing an extra classical control structure e.g. via the notions of uniform circuits or linear types. The language we provide achieves this goal of a minimal calculus for describing higher-order computable linear operators in a wide sense. Therefore this work may serve as a basis for studying wider notions of computability upon abstract vector spaces, whatever the interpretation of the vector space is (probabilities, number of computational paths leading to one result,. . . ). The downside of this generality as far as the previously mentioned application to quantum computation are concerned is that our operators are not restricted to being unitary. A further step towards specializing our language to quantum computation would be to restrict to unitary operators, as required by quantum physics. There may be several ways to do so. A first lead would be to design an a posteriori static analysis that enforces unitarity – exactly like typability is not wired in pure lambda-calculus, but may be enforced a posteriori. A second one would be to require a formal unitarity proof from the programmer. With a term and a unitarity proof, we could derive a more standard representation of the operator, for instance in terms of a universal set of quantum gates [17]. This transformation may be seen as part of a compilation process. In its current state, our language can be seen as a specification language for quantum programs, as it possesses several desirable features of such a language: it allows a high level description of algorithms without any commitment to a particular architecture, it allows the expression of black-box algorithms through the use of higher-order functionals, its notation remains close to both linear algebra and functional languages. Besides quantum computing, this work may bring contributions to other fields, which we now develop. 1.3. Logics, calculi. In this article linearity is understood in the sense of linear algebra, which is not to be confused with linearity in the sense of Linear λ-calculus [1]. It may help the reader to draw attention to this distinction: Linear λ-calculus is a calculus whose types are formulae of Linear Logic [32]. In such a λ-calculus, one distinguishes linear resources, which may be neither duplicated nor discarded, from nonlinear ones, whose fate is not subjected to particular restrictions. The Linear-algebraic λ-calculus we describe does have some resemblances with the Linear λ-calculus, as well as some crucial, strongly motivated differences. Duplication of a term t is again treated cautiously, but in a different way: only 4 P. ARRIGHI AND G. DOWEK terms expressing base vectors can be duplicated, which is compatible with linear algebra. As we shall see, terms of the form λx u are always base vectors. As a consequence, even when a term t cannot be duplicated the term λx t can. Since the term λx t is a function building the term t, it can be thought of as a description of t. (This suggests some possible connections between the abstraction λx, the ! bang operator of linear lambda-calculus and the ′ quote operator that transforms a term into a description of it as used for instance in LISP.) Again in connection with Linear Logic, Vaux has proposed an Algebraic λ-calculus [57] independently and simultaneously [5, 6, 7] with ours, and which is similar in the sense that it exhibits linear combinations of terms, and different in both the reduction strategy and the set of scalars considered. We will say more about this in Section 8. His work is both a restriction (less operators) and a generalization (positive reals) of Ehrhard and Regnier’s differential λ-calculus [26]. The functional style of programming is based on the λ-calculus together with a number of extensions, so as to make everyday programming more accessible. Hence, since the birth of functional programming there has been several theoretical studies of extensions of the λ-calculus in order to account for basic arithmetic (see for instance Dougherty’s algebraic extension [25] for normalising terms of the λ-calculus). Lineal could again be viewed as just an extension of the λ-calculus in order to handle operations over vector spaces, and make everyday programming more accessible upon them. The main difference in approach is that here the λ-calculus is not seen as a control structure which sits on top of the vector space data structure, controlling which operations to apply and when. Rather, the λ-calculus terms themselves can be summed and weighted, hence they actually are the basis of the vector space. . . upon which they can also act. This intertwining of concepts is essential if seeking to represent parallel or probabilistic computation as it is the computation itself which must be endowed with a vector space structure. The ability to superpose λ-calculus terms in that sense takes us back to Boudol’s parallel λ-calculus [15], and may also be viewed as taking part of a wave of probabilistic extensions of calculi, e.g.[16, 34, 30]. 1.4. Confluence techniques. A standard way to describe how a program is executed is to give a small step operational semantic for it, in the form of a finite set rewrite rules which gradually transform a program into a value. The main theorem proved in this paper is the confluence of our language. What this means is that the order in which those transformations are applied does not affect the end result of the computation. Confluence results are milestones in the study of programming languages and more generally in the theory of rewriting. Our proof uses many of the theoretical tools that have been developed for confluence proofs in a variety of fields (local confluence and Newman’s lemma; strong confluence and the Hindley-Rosen lemma) as well as the avatar lemma for parametric rewriting as introduced in [5]. These are fitted together in an elaborate architecture which may have its own interest whenever one seeks to merge a non-terminating conditional confluent rewrite system together with a terminating conditional confluent rewrite system. LINEAL: A LINEAR-ALGEBRAIC λ-CALCULU 5 1.5. Outline. Section 2 develops a computational definition of vector spaces and bilinear functions. This is achieved by taking the axioms of vector spaces and orienting them. Section 3 explains how to have a rewrite system for scalars that are enough to account for quantum computation. Section 4 presents the designing principles of the language, Section 5 formally describes the Linear-algebraic λ-calculus and its semantics. Section 6 shows that the language is expressive enough for classical and quantum computations. These are the more qualitative sections of the paper. We chose to postpone till Section 7 the various proofs of confluence, as they are more technical. Section 8 will be the opportunity to provide an overview of the most recent contributions surrounding this work. Section 9 provides a summary and some perspectives. 2. Computational vector spaces and bilinear functions One way to prove the equality of two vectors expressed by terms such as 2.x + y + 3.x and 5.(x + y) + (−4).y is to transform these terms into linear combinations of the unknowns and check that the terms obtained this way are the same. This algorithm transforming a term expressing a vector into a linear combination of the unknowns is also useful to express the operational semantic of programming languages for quantum computing, because in such languages a program and its input value form a term expressing a vector whose value, the output, is a linear combination of constants. More generally, several algorithms used in linear algebra, such as matrix multiplication algorithms, transform a term expressing a vector with various constructs into a linear combination of constants. The algorithm transforming a term expressing a vector into a linear combination of the unknowns is valid in all vector spaces. The goal of this Section is to show that, moreover, it completely defines the notion of vector space. This computational definition of the notion of vector space can be extended to define other algebraic notions such as bilinearity. 2.1. Algorithms and models. In this paper rewriting systems play a double role: they serve to provide an oriented version of the notion of vector space, and to provide a small step operational semantics for the introduced language. We now provide the standard definitions about them. Definition 2.1. (Rewriting) Let L be a first-order language. A rewrite system X on L is given by a finite set of rules of the form l −→ r. We define the relation −→X as follows: t −→X u if and only if there is an occurrence α in the term t, a rewrite rule l −→ r in X, and a substitution σ such that t|α = σl and u = t[σr]α , where t|α is the subterm of t at occurrence α, and t[v]α is the graft of v in t occurrence α. Definition 2.2. (AC-Rewriting) Let L be a first-order language. A AC-rewrite system X on L is given by binary function symbols f1 , . . . , fn of the language and a finite set of rules of the form l −→ r. We define the relation =AC as the congruence generated by the associativity and commutativity axioms of the symbols f1 , . . . , fn . We define the relation −→X as follows: t −→X u if and only if there exists a term t′ such that t =AC t′ , an occurrence α in t′ , a rewrite rule l −→ r in X and a substitution σ such that t′|α = σl and u =AC t′ [σr]α . Definition 2.3. (Algebra) Let L be a first-order language. An L-algebra is a family formed by a set M and for each symbol f of L of arity n, a function fˆ from M n to M . 6 P. ARRIGHI AND G. DOWEK The denotation JtKφ of a term t for an assignment φ is defined as usual: JxKφ = φ(x) and Jf (t1 , . . . , tn )Kφ = fˆ(Jt1 , . . . , tn K). Definition 2.4. (Model of a rewrite system) Let L be a first-order language and X an algorithm defined by a rewrite system on terms of the language L. An L-algebra M is a model of the algorithm X, or the algorithm X is valid in the model M, (M |= X) if for all rewrite rules l −→ r of the rewrite system and for all valuations φ, JlKφ = JrKφ . Example 2.5. Consider the language L formed by two binary symbols + and × and the algorithm X defined by the distributivity rules (x + y) × z −→ (x × z) + (y × z) x × (y + z) −→ (x × y) + (x × z) transforming for instance, the term (a + a) × a to the term a × a + a × a. The algebra h{0, 1}, min, maxi is a model of this algorithm. Remark 2.6. This definition of the validity of an algorithm in a model is strongly related with denotational semantics, as rewriting systems could also be seen as programs, and the algebraic structure as a denotational semantics. Definition 2.7. (Model of an AC-rewrite system) Let L be a first-order language. Let X be a AC-rewrite system. An L-algebra M is a model of the AC-rewrite system X (M |= R) if • for all rewrite rules l −→ r of X and for all valuations φ, JlKφ = JrKφ, • for all AC-symbol f of X and for all valuations φ and indices i Jf (x, f (y, z))Kφ = Jf (f (x, y), z)Kφ Jf (x, y)Kφ = Jf (y, x)Kφ As a consequence if t −→∗X u then for all φ, JtKφ = JuKφ . 2.2. Vector spaces: an algorithm. Let L be a 2-sorted language with a sort K for scalars and a sort E for vectors containing two binary symbols + and × of rank hK, K, Ki, two constants 0 and 1 of sort K, a binary symbol, also written +, of rank hE, E, Ei, a binary symbol . of rank hK, E, Ei and a constant 0 of sort E. To transform a term of sort E into a linear combination of the unknowns, we want to develop sums of vectors: α.(u + v) −→ α.u + α.v, but factor sums of scalars and nested products: α.u + β.u −→ (α + β).u, α.(β.u) −→ (α × β).u. We also need the trivial rules u + 0 −→ u, 0.u −→ 0 and 1.u −→ u. Finally, we need three more rules for confluence α.0 −→ 0, α.u + u −→ (α + 1).u, u + u −→ (1 + 1).u. As we want to be able to apply the factorization rule to a term of the form (3.x + 4.y) + 2.x, reductions in the above rewrite system must be defined modulo the associativity and commutativity of +. This leads to the following definition. Definition 2.8. (The rewrite system V ) The rewrite system V is the AC-rewrite system where the only AC-symbol is + and the rules are u + 0 −→ u 0.u −→ 0 LINEAL: A LINEAR-ALGEBRAIC λ-CALCULU 7 1.u −→ u α.0 −→ 0 α.(β.u) −→ (α.β).u α.u + β.u −→ (α + β).u α.u + u −→ (α + 1).u u + u −→ (1 + 1).u α.(u + v) −→ α.u + α.v To be complete, we should also transform the axioms of the theory of fields into a rewrite system, which is known to be impossible as there is no equational description of fields as a consequence of Birkhoff’s HSP theorem and the fact that the class of fields is not closed under direct product [14]. We could switch to the theory of modules and use the fact that the axioms of the theory of rings can be transformed into a rewrite system. An √ alternative is to provide term rewrite systems for specific rings or fields such as Z, Q, Q(i, 2), etc. as we shall do in Section 3. Notice that these rewrite system are in general richer than language of the rewrite system √ that of the theory of rings. For instance in the √ of Q(i, 2), we have terms expressing the numbers 1/2 or 2 that are not in the generic language of rings. Thus we shall introduce a general notion of “scalar rewrite system” and consider an arbitrary such system. Basically the notion of a scalar rewrite systems lists the few basic properties that scalars are usually expected to have: neutral elements, associativity of +, etc. Definition 2.9. (Scalar rewrite system) A scalar rewrite system is a rewrite system on a language containing at least the symbols +, ×, 0 and 1 such that: • S is terminating and ground confluent, • for all closed terms α, β and γ, the pair of terms – 0 + α and α, – 0 × α and 0, – 1 × α and α, – α × (β + γ) and (α × β) + (α × γ), – (α + β) + γ and α + (β + γ), – α + β and β + α, – (α × β) × γ and α × (β × γ), – α × β and β × α have the same normal forms, • 0 and 1 are normal terms. Later in Subsection 7.4 we shall prove that for any such scalar rewrite system S, S ∪ V is terminating and confluent. Proposition 2.10. Let t be a normal term whose variables are among x1 , ..., xn . The term t is 0 or a term of the form α1 .xi1 + ... + αk .xik + xik+1 + ... + xik+l where the indices i1 , ..., ik+l are distinct and α1 , ..., αk are neither 0 nor 1. 8 P. ARRIGHI AND G. DOWEK Proof. The term t is a sum u1 + ... + un of normal terms that are not sums (we take n = 1 if t is not a sum). A normal term that is not a sum is either 0, a variable, or a term of the form α.v. In this case, α is neither 0 nor 1 and v is neither 0, nor a sum of two vectors nor a product of a scalar by a vector, thus it is a variable. As the term t is normal, if n > 1 then none of the ui is 0. Hence, the term t is either 0 or a term of the form α1 .xi1 + ... + αk .xik + xik+1 + ... + xik+l where α1 , ..., αk are neither 0 nor 1. As the term t is normal, the indices i1 , ..., ik+l are distinct. 2.3. Vector spaces: a computational characterization. With respect to the notion of model, algorithms play the same role as sets of axioms: an algorithm may or may not be valid in a model, exactly like a set of axioms may or may not be valid in a model. The notion of validity may be used to study sets of axioms, typically building a model is a way to prove that some proposition is not provable from a set of axioms. But validity can also be used in the other direction: to define algebraic structures as models of some theories. For instance, given a field K = hK, +, ×, 0, 1i the class of K-vector spaces can be defined as follows. Definition 2.11. (Vector space) The algebra hE, +, ., 0i is a K-vector space if and only if K = hK, +, ×, 0, 1i is a field and the algebra hK, +, ×, 0, 1, E, +, ., 0i is a model of the 2-sorted set of axioms ∀u∀v∀w ((u + v) + w = u + (v + w)) ∀u∀v (u + v = v + u) ∀u (u + 0 = u) ∀u ∃u′ (u + u′ = 0) ∀u (1.u = u) ∀α∀β∀u (α.(β.u) = (α.β).u) ∀α∀β∀u ((α + β).u = α.u + β.u) ∀α∀u∀v (α.(u + v) = α.u + α.v) We now prove that, the class of K-vector spaces can be defined as the class of models of the rewrite system V . Proposition 2.12. Let K = hK, +, ×, 0, 1i be a field. The algebra hE, +, ., 0i is a K-vector space if and only if the algebra hK, +, ×, 0, 1, E, +, ., 0i is a model of the rewrite system V . LINEAL: A LINEAR-ALGEBRAIC λ-CALCULU 9 Proof. We first check that all the rules of V and the associativity and commutativity of addition are valid in all vector spaces. All of them are trivial except α.u + u = (α + 1).u, u + u = (1 + 1).u, 0.u = 0 and α.0 = 0. The first and second are consequence of 1.u = u and α.u + β.u = (α + β).u. To prove the third let u′ be such that u + u′ = 0. We have 0.u = 0.u + 0 = 0.u + u + u′ = 0.u + 1.u + u′ = 1.u + u′ = u + u′ = 0. The last one is a consequence of 0.u = 0 and α.(β.u) = (α.β).u. Conversely, we prove that all axioms of vector spaces are valid in all models of V . The validity of each of them is a consequence of the validity of a rewrite rule, except ∀u∃u′ (u + u′ = 0) that is a consequence of u + (−1).u = 0 itself being a consequence of α.u + β.u = (α + β).u and 0.u = 0. 2.4. Vector spaces: decidability. We now show that the rewrite system V (Definition 2.8) permits to prove the decidability of the word problem (i.e., whether two terms express the same vector or not) for vector spaces. Definition 2.13. The decomposition of t along x1 , ..., xn is the sequence α1 , ..., αn such that if there is a subterm of the form α.xi in t, then αi = α, if there is a subterm of the form xi in t, then αi = 1, and αi = 0 otherwise. Proposition 2.14. Let t and u be two terms whose variables are among x1 , ..., xn . The following propositions are equivalent: (i) the normal forms of t and u are identical modulo AC, (ii) the equation t = u is valid in all K-vector spaces, (iii) and the denotation of t and u in K n for the assignment φ = e1 /x1 , ..., en /xn , where e1 , ..., en is the canonical base of K n , are identical. Proof. Proposition (i) implies proposition (ii) and proposition (ii) implies proposition (iii). Let us prove that proposition (iii) implies proposition (i). Let t be a normal term whose variables are among x1 , ..., xn . Assume JtKφ = JuKφ . Let e1 , ..., en be the canonical base of K n and φ = e1 /x1 , ..., en /xn . Call α1 , ..., αn the coordinates of JtKφ in e1 , ..., en . Then the decompositions of the normal forms of t and u are both α1 , ..., αn and thus they are identical modulo AC. 2.5. Summary. We usually define an algebraic structure as an algebra hM, fˆ1 , . . . , fˆn i that validates some propositions. For instance K-vector spaces are defined as the algebras hE, 0, +, .i that validate the equations of Definition 2.11. We can, in a more computation-oriented way, define an algebraic structure as an algebra that validates an algorithm on terms constructed upon these operations. For instance Kvector spaces are are defined as the algebras hE, 0, +, .i that validate the algorithm V of Definition 2.8. This algorithm is a well-known algorithm in linear algebra: it is the algorithm that transforms any linear expression into a linear combination of the unknowns. If we chose a base, as will be the case in section 5, this algorithm may be used to transforms any linear expression into a linear combination of base vectors. Still the algorithm itself is not linked to any particular base and it may even be used if the unknowns represent a linearly dependent family. 10 P. ARRIGHI AND G. DOWEK This algorithm is, at a first look, only one among the many algorithms used in linear algebra, but it completely defines the notion of vector space: a vector space is any algebra where this algorithm is valid, it is any algebra where linear expressions can be transformed this way into linear combinations of the unknowns. 2.6. Bilinearity. Another important notion about vector spaces is that of bilinear functions. For instance the tensor product, matrix multiplication, the inner product and as we shall see the application in Lineal are all bilinear operations. The method we developed for a computational characterization of vector spaces extends to this notion: Definition 2.15. (Bilinear function) Let E, F , and G be three vector spaces on the same field. A function ⊗ from E × F to G is said to be bilinear if (u + v) ⊗ w = (u ⊗ w) + (v ⊗ w) (α.u) ⊗ v = α.(u ⊗ v) u ⊗ (v + w) = (u ⊗ v) + (u ⊗ w) u ⊗ (α.v) = α.(u ⊗ v) Definition 2.16. (Tensor product) Let E and F be two vector spaces, the pair formed by the vector space G and the bilinear function from E × F to G is a tensor product of E and F if for all bases (ei )i∈I of E and (e′ j )j∈J of F the family (ei ⊗ e′ j )hi,ji is a base of G. The corresponding algorithm is as follows: Definition 2.17. (The rewrite system V ′ ) Consider a language with four sorts: K for scalars and E, F , and G for the vectors of three vector spaces, the symbols +, ×, 0, 1 for scalars, three copies of the symbols +, . and 0 for each sort E, F , and G and a symbol ⊗ of rank hE, F, Gi. The system V ′ is the rewrite system formed by three copies of the rules of the system V and the rules (u + v) ⊗ w −→ (u ⊗ w) + (v ⊗ w) (α.u) ⊗ v −→ α.(u ⊗ v) u ⊗ (v + w) −→ (u ⊗ v) + (u ⊗ w) u ⊗ (α.v) −→ α.(u ⊗ v) 0 ⊗ u −→ 0 u ⊗ 0 −→ 0 Later in Subsection 7.4 we shall prove that for any such scalar rewrite system S, S ∪ V ′ is terminating and confluent. Propositions 2.10-2.14 generalize easily. LINEAL: A LINEAR-ALGEBRAIC λ-CALCULU 11 Proposition 2.18. Let t be a normal term whose variables of sort E are among x1 , ..., xn , whose variables of sort F are among y1 , ..., yp , and that has no variables of sort G and K. If t has sort E or F , then it has the same form as in Proposition 2.10. If it has sort G, then it has the form α1 .(xi1 ⊗ yj1 ) + ... + αk .(xik ⊗ yjk ) + (xik+1 ⊗ yjk+1 ) + ... + (xik+l ⊗ yjk+l ) where the pairs of indices hi1 , j1 i, ..., hik+l , jk+l i are distinct and α1 , ..., αk are neither 0 nor 1. Proposition 2.19. Let K = hK, +, ×, 0, 1i be a field. The structures hE, +, ., 0i, hF, +, ., 0i, hG, +, ., 0i are K-vector spaces and ⊗ is a bilinear function from E × F to G if and only if hK, +, ×, 0, 1, E, +, ., 0, F, +, ., 0, G, +, ., 0, ⊗i is a model of the system V ′ . Proposition 2.20. Let t and u be two terms whose variables of sort E are among x1 , ..., xn , whose variables of sort F are among y1 , ..., yp , and that have no variables of sort G and K. The following propositions are equivalent: (i) the normal forms of t and u are identical modulo AC, (ii) the equation t = u is valid in all structures formed by three vector spaces and a bilinear function, (iii) the equation t = u is valid in all structures formed by two vector spaces and their tensor product, (iv) and the denotation of t and u in K np for the assignment φ = e1 /x1 , ..., en /xn , e′ 1 /y1 , ..., e′ p /yp where e1 , ..., en is the canonical base of K n , e′ 1 , ..., e′ p that of K p and ⊗ is the unique bilinear function such that ei ⊗ e′ j = e′′ p(i−1)+j where e′′ 1 , ..., e′′ np is the canonical base of K np . 3. The field of quantum computing As explained in Section 2.2, fields are not easily implemented as term rewrite systems. In the previous section such problems were avoided by simply assuming the provision of some scalar rewrite system, i.e., some term rewrite system for scalars having a certain number of properties (Definition 2.9). However if the objective is to provide a formal operational semantics for a quantum programming language, up to the point that it provides a full description of a classical simulator for the language, then we must give such a term rewrite system explicitly. The present section briefly outlines how this can be achieved. √ 3.1. A rewrite system for the field Q(i, 2). In the circuit model of quantum computation the emphasis was placed on the ability to approximate any unitary transform from a finite set of gates, where approximation is defined in terms of the distance induced by the supremum norm. This line of research (cf. [53, 37] to cite a few) has culminated with [17], 12 P. ARRIGHI AND G. DOWEK where the following set  1  0 CN OT =   0 0 H= √1 2 √1 2 0 1 0 0 0 0 0 1 √1 2 − √12  0 0   1  0 ! (3.1) P =  1 0 0 eiπ/4  was proven to be universal, in the sense that its closure under composition, tensor product and tracing out forms a dense set relative √ to the set of unitary matrices — with respect to the supremum norm. Thus, the field Q(i, 2) is enough for quantum computation. To define a scalar rewrite system for this field we can proceed in three steps. • We define a scalar rewrite system for Q, • We use Section 2.2 to define a rewrite system for the vector space of linear combination of the form: i 1 α.1 + β. √ + γ.i + δ. √ . 2 2 • We use Section 2.6 to define multiplication as a bilinear AC-operation and with the rules 1 1 √ × √ −→ (1/2).1 1 × v −→ v 2 2 1 i i 1 √ × i −→ √ √ × √ −→ (1/2).i 2 2 2 2 1 i i × i −→ (−1/2).1 i × √ −→ (−1/2). √ 2 2 i i √ × √ −→ (−1/2).1 2 2 √ 3.2. Restricting to the ring D(i, 1/ 2). For the sake of implementation we can make further simplifications. As division does not appear when composing unitary operators, the only scalars that appear in the closure of gates (3.1) are those obtained by additive √ and multiplicative closure from the elements 1, i and √12 , i.e., elements of the ring D(i, 1/ 2) where D is the ring of numbers that have a finite dyadic development. Thus this ring is enough for quantum computing. Notice that, as noticed above, switching to the theory of ring would not be sufficient as, in order √to express the gates of quantum computing, we need terms expressing the scalars i and 1/ 2. An implementation of this ring, along these lines, can be found in [8] that builds upon Section 3.1 and [20, 58] for implementing binary numbers. 4. Towards a higher-order language We introduce a language combining higher-order computation and linear algebra. The syntax of this language is minimal, in the sense that it just contains the syntax of λ-calculus and the possibility to make linear combinations of terms α.t + β.u. This language is called Linear-algebraic λ-calculus, or just Lineal. LINEAL: A LINEAR-ALGEBRAIC λ-CALCULU 13 To start with, we take as the operational semantics, the rewrite rules of vector spaces of Section 2.2, the bilinearity of application of Section 2.6, and the β-reduction rule. The goal of this section is to present the issues arising. This will result in the fine-tuned system presented in Definition 5.1. 4.1. Higher-order λ-calculus. In quantum computing, many algorithms fall into the category of black-box algorithms. I.e., some mysterious implementation of a function f is provided to us which we call “oracle” – and we wish to evaluate some property of f , after a limited number of queries to its oracle. For instance in the Deutsch-Josza quantum algorithm, f is a function f : {false, true}n −→ {false, true} which is either constant (i.e., ∃c∀x[f (x) = c]) or balanced (i.e., |{x such that f (x) = false}| = |{x such that f (x) = true}|), and whose corresponding oracle is a unitary transformation Uf : H2n+1 −→ H2n+1 such that Uf : x ⊗ b 7→ x ⊗ (b ⊕ f (x)), where H2n+1 stands for a tensor product of n + 1 two-dimensional vector spaces, ⊗ is the tensor product and ⊕ just the addition modulo two. The aim is to determine whether f is constant or balanced, and it turns out that n+1 this can be done in one single query to its oracle. The algorithm works by applying H ⊗ n n+1 n+1 means applying the again, where H ⊗ upon (false⊗ ⊗ true), then Uf , and then H ⊗ Hadamard gate on each of the n + 1 qubits. It is clear that a desirable feature for a linearalgebraic functional language is to be able to express algorithms as a function of an oracle. E.g. we may want to define Dj1 ≡ λx ((H ⊗ H) (x ((H ⊗ H) (false ⊗ true))) so that Dj1 Uf reduces to (H ⊗H) (Uf ((H ⊗H) (false⊗true))). More importantly even, one must be able to express algorithms, whether they are black-box or not, independent of the size of their input. This is what differentiates programs from fixed-size circuits acting upon finite dimensional vector spaces, and demonstrates the ability to have control flow. The way to achieve this in functional languages involves duplicating basic components of the algorithm an appropriate number of times. E.g. we may want to define some Dj operator so that (Dj n) Uf reduces to the appropriate (Djn ) Uf , where n is a natural number. Clearly the language of uniform circuits does not offer an elegant presentation for this issue. Higher-order appears to be a desirable feature to have for black-box computing, but also for expressing recursion and for high-level programming. 4.2. Reduction strategies: copying and cloning. We seek to design a λ-calculus, i.e., have the possibility to introduce and abstract upon variables, as a mean to express functions of these variables. In doing so, we must allow functions such as λx (x ⊗ x), which duplicate their argument. This is necessary for expressiveness, for instance in order to obtain the fixed point operator or any other form of iteration/recursion. Now problems come up when functions such as λx (x ⊗ x) are applied to superpositions (i.e., sums of vectors). Linear-algebra brings a strong constraint: we know that cloning is not allowed, i.e., that the operator which maps any vector ψ onto the vector ψ ⊗ ψ is not linear. In quantum computation this impossibility is referred to as the no-cloning theorem [59]. Most quantum programming language proposals so far consist in some quantum registers undergoing unitary transforms and measures on the one hand, together with classical 14 P. ARRIGHI AND G. DOWEK registers and programming structures ensuring control flow on the other, precisely in order to avoid such problems. But as we seek to reach beyond this duality and obtain a purely quantum programming language, we need to face it in a different manner. This problem may be seen as a confluence problem. Faced with the term (λx (x ⊗ x)) (false + true), one could either start by substituting false + true for x and get the normal form (false + true) ⊗ (false + true), or start by using the fact that all the functions defined in our language must be linear and get ((λx (x ⊗ x)) false) + ((λx (x ⊗ x)) true) and finally the normal form (false⊗false)+(true⊗true), leading to two different results. More generally, faced with a term of the form (λx t) (u+v), one could either start by substituting u+v for x, or start by applying the right-hand-side linearity of the application, breaking the confluence of the calculus. So that operations remain linear, it is clear that we must start by developing over the + first, until we reach a base vector and then apply β-reduction. By base vector we mean a term which does not reduce to a superposition. Therefore, we define a reduction strategy where the β-reduction rule is restricted to cases where the argument is a base vector, as formalized later. With this restriction, we say that our language allows copying but not cloning [6, 4]. It is clear that copying has all the expressiveness required in order to express control flow, since it behaves exactly like the standard β-reduction as long as the argument passed is not in a superposition. This is the appropriate linear extension of the β-reduction, philosophically it comprehends classical computation as a (non-superposed) sub-case of linearalgebraic/quantum computation. The same applies to erasing: the term λxλy x expresses the linear operator mapping the base vector bi ⊗ bj to bi . Again this is in contrast with other programming languages where erasing is treated in a particular fashion whether for the purpose of linearity of bound variables or the introduction of quantum measurement. 4.3. Base (in)dependence. The main conceptual difficulty when seeking to let our calculus be higher-order is to understand how it combines with this idea of copying, i.e., duplicating only base vectors. Terms of the form (λx (x x)) (λx v) raise the important question of whether the λ-term λx v must be considered to be a base vector or not: • we need to restrict (λx t) u −→ t[u/x] to “base vectors”; • we want higher-order in the traditional sense (λx t) (λy u) −→ t[λy u/x]; • therefore abstractions must be the base vectors; • since variables will only ever be substituted by base vectors, they also are base vectors. It is clear that there is a notion of privileged basis arising in the calculus, but without us having to a priori choose a canonical basis (e.g. we do not introduce some arbitrary orthonormal basis {|ii} all of a sudden – i.e., we have nowhere specified a basis at the first-order level). The eventual algebraic consequences of this notion of a privileged basis arising only because of the higher-order level are left as a topic for further investigations. An important intuition is that (λx v) is not the vector itself, but its classical description, i.e., the machine constructing it – hence it is acceptable to be able to copy (λx v) whereas we cannot clone v. The calculus does exactly this distinction. LINEAL: A LINEAR-ALGEBRAIC λ-CALCULU 15 4.4. Infinities & confluence. It is possible, in our calculus, to define fixed point operators. For instance for each term b we can define the term   Yb = (λx (b + (x x)) λx (b + (x x))) Then the term Yb reduces to b + Yb , i.e., the term reductions generate a computable series of vectors (n.b + Yb )n whose “norm” grows towards infinity. This was expected in the presence of both fixed points and linear algebra, but the appearance of such infinities entails the appearance of indefinite forms, which we must handle with great caution. Marrying the full power of untyped λ-calculus, including fixed point operators etc., with linear-algebra therefore jeopardizes the confluence of the calculus, unless we introduce some further restrictions. Example 4.1. If we took an unrestricted factorization rule α.t + β.t −→ (α + β).t, then the term Yb − Yb would reduce to (1 + (−1)).Yb and then 0. It would also be reduce to b + Yb − Yb and then to b, breaking the confluence. Thus, exactly like in elementary calculus ∞ − ∞ cannot be simplified to 0, we need to introduce a restriction to the rule allowing to factor α.t+β.t into (α+β).t to the cases where t is finite. But what do we mean by finite? Notions of norm in the usual mathematical sense seem difficult to import here. In order to avoid infinities we would like to ask that t is normalizable, but this is impossible to test in general. Hence, we restrict further the rule α.t + β.t −→ (α + β).t to the case where the term t is normal. It is quite striking to see how this restriction equates the algebraic notion of “being normalized” with the rewriting notion of “being normal”. The next three examples show that this indefinite form may pop up in some other, more hidden, ways. Example 4.2. Consider the term (λx ((x ) − (x ))) (λy Yb ) where is any base vector, for instance false. If the term (x ) − (x ) reduced to 0 then this term would both reduce to 0 and also to Yb − Yb , breaking confluence. Thus, the term t we wish to factor must also be closed, so that it does not contain any hidden infinity. Example 4.3. If we took an unrestricted rule (t+u) v −→ (t v)+(u v) the term (λx (x )− λx (x )) (λy Yb ) would reduce to Yb − Yb and also to 0, breaking confluence. Thus we have to restrict the rule (t + u) v −→ (t v) + (u v) to the case where t + u is normal and closed. Example 4.4. If we took an unrestricted rule (α.u) v −→ α.(u v) then the term (α.(x + y)) Yb would reduce both to (α.x + α.y) Yb and to α.((x + y) Yb ), breaking confluence due to the previous restriction. Thus we have to restrict the rule (α.u) v −→ α.(u v) to the case where u is normal and closed. This discussion motivates each of the restrictions (∗)− (∗∗∗∗) in the rules below. These restrictions are not just a fix: they are a way to formalize vector spaces in the presence of limits/infinities. It may come as a surprise, moreover, that we are able to tame these infinities with this small added set of restrictions, and without any need for context-sensitive conditions, as we shall prove in Section 7. 16 P. ARRIGHI AND G. DOWEK 5. A higher-order language We consider a first-order language, called the language of scalars, containing at least constants 0 and 1 and binary function symbols + and ×. The language of vectors is a two-sorted language, with a sort for vectors and a sort for scalars, described by the following term grammar: t ::= x | λx t | t t | 0 | α.t | t + t where α is a term in the language of scalars. In this paper we consider only semi-open terms, i.e., terms containing vector variables but no scalar variables. In particular all scalar terms will be closed. As usual we write t u1 ... un for ...(t u1 ) ... un . Definition 5.1 (The system L). Our small-step semantics is defined by the relation −→L where L is the AC-rewrite system where the only AC-symbol is + and the rules are those of S, a scalar rewrite system (see Definition 2.9) and the union of four groups of rules E, F , A and B: - Group E – elementary rules u + 0 −→ u, 0.u −→ 0, 1.u −→ u, α.0 −→ 0, α.(β.u) −→ (α × β).u, α.(u + v) −→ α.u + α.v - Group F – factorisation α.u + β.u −→ (α + β).u, (∗) u + u −→ (1 + 1).u, (∗) α.u + u −→ (α + 1).u, (∗) - Group A – application (u + v) w −→ (u w) + (v w), (∗∗) w (u + v) −→ (w u) + (w v), (∗∗) (α.u) v −→ α.(u v), (∗ ∗ ∗) v (α.u) −→ α.(v u), 0 u −→ 0, u 0 −→ 0, (∗ ∗ ∗) - Group B – beta reduction (λx t) b −→ t[b/x] (∗ ∗ ∗∗) And: (∗) the three rules apply only if u is a closed L-normal term. (∗∗) the two rules apply only if u + v is a closed L-normal term. LINEAL: A LINEAR-ALGEBRAIC λ-CALCULU 17 (∗ ∗ ∗) the two rules apply only if u is a closed L-normal term. (∗∗∗∗) the rule applies only when b is a “base vector” term, i.e., an abstraction or a variable. Notice that the restriction (∗), (∗∗) and (∗ ∗ ∗) are well-defined as the terms to which the restrictions apply are smaller than the left-hand side of the rule. Notice also that the restrictions are stable by substitution. Hence these conditional rules could be replaced by an infinite number of non conditional rules, i.e., by replacing the restricted variables by all the closed normal terms verifying the conditions. Finally notice how the rewrite system R = S ∪ E ∪ F ∪ A, taken without restrictions, is really just the V ′ (see Definition 2.17) we have seen in Section 2, i.e., an oriented version of the axioms of vector spaces. Intuitively the restricted system defines a notion of vector space with infinities. Rewrite rules with closedness conditions are not new in the theory of λ-calculus (see, for instance, [29]). Normal forms. We have explained why abstractions ought to be considered as “base vectors” in our calculus. We have highlighted the presence of non-terminating terms and infinities, which make it impossible to interpret the calculus in your usual vector space structure. The following two results show that terminating closed terms on the other hand can really be viewed as superpositions of abstractions. Proposition 5.2. An L-closed normal form, that is not a sum, a product by a scalar, or the null vector, is an abstraction. Proof. By induction over term structure. Let t be a closed normal term that is not a sum, a product by a scalar, or the null vector. The term t is not a variable because it is closed, hence it is either an abstraction in which case we are done, or an application. In this case it has the form u v1 . . . vn where u, v1 , . . . vn are normal and closed and n is different from 0. Neither u nor v1 is a sum, a product by a scalar, or the null vector since the term being normal we then could apply rules of group A. Thus by induction hypothesis, both terms are abstractions, thus the rule B applies and the term t is not normal. Proposition 5.3 (Form P of closed normal P forms). A L-closed normal form is either the null vector or of the form i αi .λx ti + i λx ui where the scalars are different from 0 and 1 and the abstractions are all distinct. Proof. If the term is not the null vector it can be written as a sum of terms that are neither 0 nor sums. We partition these terms in order to group those which are weighted by a scalar and those which are not. Hence we obtain a term of the form X X u′ i α′i .t′ i + where the terms u′ i are neither null, nor sums, nor weighted by a scalar. Hence by Proposition 5.2 they are abstractions. Because the whole term is normal the terms t′ i are themselves neither null, nor sums, nor weighted by a scalar since we could apply rules of group E. Hence Proposition 5.2 also applies. 6. Encoding classical and quantum computation The restrictions we have placed upon our language are still more permissive than those of the call-by-value λ-calculus, hence any classical computation can be expressed in the linear-algebraic λ-calculus just as it can in the call-by-value λ-calculus. 18 P. ARRIGHI AND G. DOWEK It then suffices to express the three universal quantum gates H, Phase, Cnot [17] which we will do next. Encoding booleans. We encode the booleans as the first and second projections, as usual in the classical λ-calculus: true ≡ λx λy x, false ≡ λx λy y. Again, note that these are conceived as linear functions, the fact we erase the second/first argument does not mean that the term should be interpreted as a trace out or a measurement. Here is a standard example on how to use them:   Not ≡ λy y false true . Notice that this term expresses a unitary operator upon the vector space generated by true and false, even if some subterms express non unitary ones. Encoding unary quantum gates. For the Phase gate the naive encoding will not work, i.e.,   π Phase 6≡ λy y (ei 4 .true) false π since by bilinearity this would give Phase false −→∗L ei 4 .false, whereas the Phase gate is π supposed to place an ei 4 only on true. The trick is to use abstraction in order to retain π the ei 4 phase on true only (where is any base vector, for instance false).    i π4 y λx (e .true) λx false Phase ≡ λy Now, the term Phase true reduces in the following way      π π y λx (ei 4 .true) λx false λy true −→L true λx (ei 4 .true) λx false   π π π = (λx λy x) λx (ei 4 .true) λx false −→∗L (λx (ei 4 .true)) −→L ei 4 .true whereas the term Phase false reduces as follows      π i π4 false −→L false λx (ei 4 .true) λx false y λx (e .true) λx false λy   π = (λx λy y) λx (ei 4 .true) λx false −→∗L (λx false) −→L false This idea of using a dummy abstraction to restrict linearity can be generalized and made more elegant with the following syntactic sugar: • [t] ≡ λx t. The effect of this canon [.] is to associate to any state t a base vector [t]. • {t} ≡ t where is any closed normal base vector, for instance λx x. The effect of this uncanon is to lift the canon, i.e., we have the derived rule {[t]} −→L t. Note that {.} is a “left-inverse” of [.], but not a ”right inverse”, just like eval and ′ (quote) in LISP. Again these hooks do not add anymore power to the calculus, in particular they do not enable cloning. We cannot clone a given state α.t + β.u, but we can copy its classical description [α.t + β.u]. For instance the function λx [x] will never “canonize” anything else than a base vector, because of restriction (∗ ∗ ∗∗). The phase gate can then be written  π Phase ≡ λy (y [ei 4 .true]) [false] For the Hadamard gate the game is just the same: √ √  2 2 .(false + true)] [ .(false − true)] H ≡ λy y [ 2 2 LINEAL: A LINEAR-ALGEBRAIC λ-CALCULU 19 Encoding tensors. In quantum mechanics, vectors are put together via the bilinear symbol ⊗. But because in our calculus application is bilinear, the usual encoding of pairs does just what is needed.  ⊗ ≡ λx λy λf f x y , π1 ≡ λp(p λx λy x), π2 ≡ λp(p λx λy y),   O   ≡ λf λg λx ⊗ f (π1 x) g (π2 x)  N E.g. H⊗2 ≡ HH . N From there on the infix notation for tensors will be used, i.e., N t ⊗ u ≡ ⊗ t u, t u ≡ t u. Encoding the Cnot gate. This binary gate is essentially a classical gate, its encoding is standard. !   (π1 x) Not (π2 x) (π2 x) Cnot ≡ λx (π1 x) ⊗ Expressing the Deutsch-Josza algorithm parametrically. As discusses in Section 4, an advantage of a higher-order language is that it permits to express black-box algorithms, such as the Deutsch-Josza algorithm, in a parametric way. We show now how to encode this algorithm in Lineal. Here is the well-known simple example of the Deutsch algorithm, which is the n = 1 case of the Deutsch-Josza algorithm !     Dj1 ≡ λx H⊗2 x H⊗2 false ⊗ true But we can also express control structure and use them to express the dependence of the Deutsch-Josza algorithm with respect to the size of the input. Encoding the natural number N n+1 and n as the Church numeral n ≡ λx λf (f n x) the term (n H λy (H y)) reduces to H⊗ n similarly the term (n true λy (false ⊗ y)) reduces to false⊗ ⊗ true. Thus the expression of the Deutsch-Josza algorithm term of the introduction is now straightforward: Dj ≡ λnλx (n H λy (H N !    N . y)) x (n H λy (H y)) n true λy (false ⊗ y) Infinite dimensional operators. Notice that our language enables us to express operators independently of the dimension of the space they apply to, even when this dimension is infinite. For instance the identity operator is not expressed as a sum of projections whose number would depend on the dimension of the space, but as the mere lambda term λx x. In this sense our language is a language of infinite dimensional computable linear operators, in the same way that matrices are a language of computable finite dimensional linear operators. 7. Confluence The main theorem of this paper is the confluence of the system L. Along the way, we will also prove the confluence of the unrestricted systems V and V ′ which we introduced for the sake of our computational definition of vector spaces. This section is quite technical. A reader who is not familiar with rewriting techniques may be happy with reading just Definition 7.6 and Theorem 7.25, and then skipping to Section 8. A reader with an interest 20 P. ARRIGHI AND G. DOWEK in such techniques may on the other hand find the architecture of the proof quite useful. The rationale is as follows: • There is only a very limited set of techniques available for proving the confluence of non-terminating rewrite systems (mainly the notions of parallel reductions and strong confluence). Hence we must distinguish the non-terminating rules, which generate the infinities (the B rule), from the others (the R rules) and show that they are confluent on their own; • We then must show that the terminating rules and the non-terminating rules commute, so that their union is confluent. (The conditions on B, F, A are key to obtaining the commutation. Without them, both subsets are confluent, but not their union.) • The rules of R being terminating, the critical pairs lemma applies. The critical pairs can be checked automatically for the non-conditional rules, but the conditional ones must be checked by hand. Hence we must distinguish the non-conditional rules (E rules), from the others (the F and A rules). • In order to handle the parametricity with respect to the scalars rewrite system, we shall introduce a new technique called the avatar’s lemma. The first step is to prove the confluence of the system R = S ∪ E ∪ F ∪ A, i.e., the system L of Definition 5.1, minus the rule B. To prove the confluence of this system we shall prove that of the system R0 = S0 ∪ E ∪ F ∪ A where S0 is a small avatar of S, namely the simplest possible scalar rewrite system. Then we use the avatar lemma to extend the result from S0 to S, hereby obtaining the confluence of R = S ∪ E ∪ F ∪ A. Definition 7.1 (The rewrite system S0 ). The system S0 is formed by the rules 0 + α −→ α 0 × α −→ 0 1 × α −→ α α × (β + γ) −→ (α × β) + (α × γ) where + and × are AC-symbols. To be able to use a critical pair lemma in an AC context, we shall use a well-known technique, detailed in the Section 7.1, and introduce addenda S0ext , Eext and Fext to the systems S0 , E and F , with some extra rules called extension rules, but with a more restricted form of AC-rewriting and the system R0ext = S0ext ∪ Eext ∪ Fext ∪ A. The second step towards our main goal is show that the B k rule, the parallel version of the rule B defined in Definition 7.17, is strongly confluent on the term algebra, and commutes with R∗ , hence giving the confluence of L (Section 7.5). As the system R = S ∪ E ∪ F ∪ A does not deal at all with abstractions and bound variables, we have, throughout this first part of the proof, considered λx as a unary function symbol and the bound occurrences of x as constants. This way we can safely apply known theorems about first-order rewriting. LINEAL: A LINEAR-ALGEBRAIC λ-CALCULU 21 7.1. Reminder on rule extensions and the critical pairs lemma. The term ((a + 2.a) + b) + c reduces to the term ((2 + 1).a + b) + c, as it contains a subterm a + 2.a that is AC-equivalent to an instance of the left hand side of the rule α.u + u −→ (α + 1).u. The term ((2.a + b) + a) + c does not contain such a subterm, yet it can be reduced, because it is itself AC-equivalent to the term ((2.a + a) + b) + c that contain a subterm that is an instance of the left hand side of this rule. This suggests that there is a more local way to define reduction modulo AC where the first reduction is possible but not the second. Unfortunately, the critical pair lemma for AC-rewrite system gives the confluence of this local version of AC-reduction system and not the global one we are interested in. This problem has been solved by [42, 36] that show that the globally AC reduction relation is confluent if the locally AC reduction relation of an extended rewrite system is confluent. Definition 7.2 (The extension rules). Let X be a AC-rewrite system with AC symbols f1 , . . . , fn . We define the AC-rewrite system Xext as containing the same AC symbols as X, the same rules as X, plus the rules fi (t, x) −→ fi (u, x) for each rule t −→ u of X where the head symbol of t is fi . Proposition 7.3 (R0ext ). The system S0ext is formed by the rules of S0 and the rule (0 + α) + χ −→ α + χ The system Eext (0 × α) × χ −→ 0 × χ (1 × α) × χ −→ α × χ (α × (β + γ)) × χ −→ ((α × β) + (α × γ)) × χ is formed by the rules of E and the rule: (u + 0) + x −→ u + x The system Fext is formed by the rules of F and these three rules: (α.u + β.u) + x −→ (α + β).u + x (∗) (α.u + u) + x −→ (α + 1).u + x (∗) (u + u) + x −→ (1 + 1).u + x (∗) where (∗) imposes the three rules apply only if u is a closed normal term. The system Aext is A. The system R0ext is S0ext ∪ Eext ∪ Fext ∪ A. As usual we write t −→∗X u if and only if t = u or t −→X . . . −→X u. We also write t −→?X u if and only if t = u or t −→X u t −→X;Y u if there exist a v such that t −→X v −→Y u, and t −→X↓ u if t −→∗X u and u is normal for the relation X. 7.2. Termination. Proposition 7.4. The systems S0ext terminates. Proof. Consider the following interpretation (compatible with AC) |x|s = |0|s = |1|s = 2 |t + u|s = 1 + |t|s + |u|s |t × u|s = |t|s × |u|s Each time a term t rewrites to a term t′ we have |t|s > |t′ |s . Hence, the system terminates. 22 P. ARRIGHI AND G. DOWEK Proposition 7.5. The systems R0ext , Rext , S ∪ V and S ∪ V ′ terminate. Proof. [The system Eext ∪ Fext ∪ A terminates] Consider the following interpretation (compatible with AC) |(u v)| = (3|u| + 2)(3|v| + 2) |u + v| = 2 + |u| + |v| |α.u| = 1 + 2|u| |0| = 0 ′ Each time a term t rewrites to a term t we have |t| > |t′ |. Hence, the system terminates. [The system R0ext terminates] The system R0ext is S0ext ∪ Eext ∪ Fext ∪ A. It is formed of two subsystems S0ext and Eext ∪ Fext ∪ A. By definition of the function | |, if a term t S0ext -reduces to a term t′ then |t| = |t′ |. Consider a R-reduction sequence. At each Eext ∪ Fext ∪ A-reduction step, the measure of the term strictly decreases and at each S0ext -reduction step it remains the same. Thus there are only a finite number of Eext ∪ Fext ∪ A-reduction steps in the sequence and, as S0ext terminates, the sequence is finite. The same argument applies for Rext , S ∪ V and S ∪ V ′ , with respect to S instead of S0ext . 7.3. Critical pairs. Definition 7.6 (Confluence and local confluence). A relation X is said to be confluent if whenever t −→∗X u and t −→∗X v, there exists a term w such that u −→∗X w and v −→∗X w. A relation X is said to be locally confluent if whenever t −→X u and t −→X v, there exists a term w such that u −→∗X w and v −→∗X w. Definition 7.7 (Critical pair). Let l −→ r and l′ −→ r ′ be two rewrite rules of an ACrewrite system X, let p be an occurrence in l such that l|p is not a free variable. Let σ be  an AC-unifier for l|p and l′ , the pair σr, σ(l[p ← r ′ ]) is a critical pair of the the rewrite system X. Proposition 7.8 (Peterson-Stickel Theorem). If −→Xext terminates and for each critical pair (t, u) of Xext there exists a term w such that t −→∗Xext w u −→∗Xext w. Then the relation −→X is confluent. Proof. See [42], Theorems 10.5., 9.3 and 8.9. Proposition 7.9. The system S0 ∪ E is confluent. The systems S0 ∪ V and S0 ∪ V ′ are confluent. Proof. First notice that (S0 ∪ E)ext = (S0ext ∪ Eext ) and that this system terminates (see Proposition 7.5). Thus by proposition 7.8 all we need to do is to check that all the critical pair close. As these rules are not conditional, we have used the system CIME [19] to check this automatically. The same applies to S0 ∪ Vext and S0 ∪ V ′ ext . LINEAL: A LINEAR-ALGEBRAIC λ-CALCULU 23 Proposition 7.10. The system S0 ∪ E ∪ F is confluent. Proof. First notice that the system (S0ext ∪ E ∪ F )ext = S0ext ∪ Eext ∪ Fext and that this system terminates (see Proposition 7.5). Thus by proposition 7.8 all we need to do is to check that all the critical pair close. If both rules used are rules of the system S0ext ∪ Eext , then the critical pair closes by Proposition 7.9. There are no critical pairs between S0ext and Eext ∪ Fext . Thus, all we need to check are the critical pairs between one rule of Eext and one of Fext or one rule of Fext and one of Fext . To find the critical pairs, we used CIME [19]. There are 251 critical pairs, not taking the fact that some rules are conditional and thus may not apply. Indeed, among these critical pairs 81 do not verify the conditions of the rules Fext . For instance, the pair given by CIME α.(0 + u) + u ←− 0 + α.(0 + u) + u −→ (1 + α).(0 + u) does not verify the condition because u + 0 is never closed normal: we do not need to close this pair because our conditions forbid that it opens. We need to check the 170 other pairs by hands. Some close easily, for instance the pair 0 + α.u ←− 0.u + α.u −→ (0 + α).u closes on α.u. Some other require a short analysis of the conditions. For instance, for the pair α.u + α.v + β.(u + v) ←− α.(u + v) + β.(u + v) −→ (α + β).(u + v) the fact that we have been able to factor α.(u + v) + β.(u + v) into (α + β).(u + v) shows that the term u + v is closed normal, thus the terms u and v are closed normal, which permits to reduce both terms to (α + β).u + (α + β).v. All the cases are analyzed in [9]. Proposition 7.11. The system R0 = S0 ∪ E ∪ F ∪ A is confluent. Proof. First notice that R0ext = S0ext ∪ Eext ∪ Fext ∪ A and that this system terminates (see Proposition 7.5). Thus by proposition 7.8 all we need to do is to check that all the critical pair close. If both rules used are rules of the system S0ext ∪ Eext ∪ Fext , then the critical pair closes by Proposition 7.10. It is not possible that the top-level rule is in S0ext ∪ Eext ∪ Fext and the other in A since the rules of S0ext ∪ Eext ∪ Fext do not contain any application. Thus the top-level rule must be in A and the (S0ext ∪ Eext ∪ Fext )-reduction must be performed in a non-toplevel non-variable subterm of the left-hand-side of a rule of A. By inspection of the left-hand-sides of rules S0ext ∪ Eext ∪ Fext the subterm must be of the form u + v, α.u or 0. But this subterm cannot be of the form u + v, because, by restriction (**), the term itself would not be A-reducible. It cannot be 0 since this term is normal. Thus it is of the form α.u. As there are five rules reducing a term of this form, there are 10 critical pairs to check. Because of the conditionality of the rewrite system we check them by hand. Pair 1: 0 v ←− (0.u) v −→ 0.(u v): this critical pair closes on 0. Pair 2: u v ←− (1.u) v −→ 1.(u v): this critical pair closes on u v. Pair 3: 0 v ←− (α.0) v −→ α.(0 v): this critical pair closes on 0. Pair 4: ((α × β).u) v ←− (α.(β.u)) v −→ α.((β.u) v): the term u is closed and normal by (∗ ∗ ∗). Hence, the critical pair closes on (α × β).(u v). Pair 5: (α.u + α.v) w ←− (α.(u + v)) w −→ α.((u + v) term u + v is closed and Pw): the P normal. Hence, byP Proposition 5.3 itP is of the form i βi .ai + i bi . Therefore the top reduct reduces to ( i (α×βi ) ↓ .ai + i α.bi ) w, where ↓ denotes normalization by S0ext . We treat only the case where the terms (l×βi ) ↓ are neither 0 nor 1, the other cases being 24 P. ARRIGHI AND G. DOWEK P P similar. Hence, we can apply rules of group A yielding i (α×βi ) ↓ .(ai w)+ i α.(bi w). It is routine to check that the bottom reduct also reduces to this term. The five next critical pairs are the symmetrical cases, permuting the left and righthand-sides of the application. Now, when both rules are in the group A, there are 9 critical pairs to check. Pair 11: u(w + x) + v(w + x) ←− (u + v)(w + x) −→ (u + v)w + (u + v)x: as u + v and w + x are normal and closed, so are u, v, w and x. Hence the critical pair closes on uw + ux + vw + vx. Pair 12: u(α.w) + v(α.w) ←− (u + v)(α.w) −→ α.((u + v).w): as, by (∗∗) and (∗ ∗ ∗), u + v and w are closed normal terms , so are u and v. Thus the top reduct further reduces to α.(u w) + α.(v w) and the bottom reduct further reduces to α.((u w) + (v w)) and both terms reduce to α.(u w) + α.(v w). Pair 13: 0 ←− (u + v)0 −→ (u0) + (v0): this critical pair closes on 0. Pair 14: α.(u(v + w)) ←− (α.u)(v + w) −→ (α.u)v + (α.u)w: the terms u and v + w are closed normal. Thus, the top reduct further reduces to α.(uv + uw) and the bottom reduct to α.(uv) + α.(uw). Hence the critical pair closes on α.(uv) + α.(uw). Pair 15: α.(u(β.v)) ←− (α.u)(β.v) −→ β.((α.u)v): as u and v are closed normal, the first term reduces to α.(β.(uv)) and the second to β.(α.(uv)) and both terms reduce to (α × β).(uv). Pair 16: α.(u0) ←− (α.u)0 −→ 0: this critical pair closes on 0. Pair 17: 0 ←− 0(u + v) −→ (0u) + (0v): this critical pair closes on 0. Pair 18: 0 ←− 0(α.u) −→ α.(0u): this critical pair closes on 0. Pair 19: 0 ←− 00 −→ 0: this critical pair closes on 0. 7.4. The avatar lemma. Definition 7.12 (Subsumption). A terminating and confluent relation S subsumes a relation S0 if whenever t −→S0 u, t and u have the same S-normal form. Definition 7.13 (Commuting relations). Two relations X and Y are said to be commuting if whenever t −→X u and t −→Y v, there exists a term w such that u −→Y w and v −→X w. Proposition 7.14 (The avatar lemma). [6] Let X, S and S0 be three relations defined on a set such that: • S is terminating and confluent; • S subsumes S0 ; • S0 ∪ X is locally confluent; • X commutes with S ∗ . Then, the relation S ∪ X is locally confluent. Proof. [X can be simulated by X; S ↓]. If t −→X u and t −→S ↓ v, then there exists w such that u −→S ↓ w and v −→X;S ↓ w. Indeed by commutation of X and S ∗ there exists a such that u −→S ∗ a and v −→X a. Normalizing a under S yields the w. [S0 ∪ X can be simulated by (X; S ↓)? ]. If t −→S0 ∪X u and t −→S ↓ v, then there exists w such that u −→S ↓ w and v −→?X;S ↓ w. Indeed if t −→S0 u this is just subsumption, else the first point of this proof applies. LINEAL: A LINEAR-ALGEBRAIC λ-CALCULU 25 [S ∪ X can be simulated by (X; S ↓)? ]. If t −→S∪X u and t −→S ↓ v, then there exists w such that u −→S ↓ w and v −→?X;S ↓ w. Indeed if t −→S u this is just the normalization of S, else the first point of this proof applies. [X; S ↓ is locally confluent]. If t −→X;S ↓ u and t −→X;S ↓ v, then there exists w such that u −→∗X;S ↓ w and v −→∗X;S ↓ w. Indeed if t −→X a −→S ↓ u and t −→X b −→S ↓ v we know from the local confluence of S0 ∪ X that there exists c such that a −→∗S0 ∪X c and b −→∗S0 ∪X c. Normalizing c under S yields the w. This is because by the second point of the proof u −→∗X;S ↓ w and v −→∗X;S ↓ w. [S ∪ X is locally confluent]. If t −→S∪X u and t −→S∪X v, then there exists w such that u −→∗S∪X w and v −→∗S∪X w. Indeed call t↓ , u↓ , v ↓ the S normalized version of t, u, v. By the third point of our proof we have t↓ −→?X;S ↓ u↓ and t↓ −→?X;S ↓ v ↓ . By the fourth point of our proof there exists w such that u↓ −→∗X;S ↓ w and v ↓ −→∗X;S ↓ w. Proposition 7.15. For any scalar rewrite system S the systems R = S ∪ E ∪ F ∪ A, S ∪ V and S ∪ V ′ are confluent. Proof. The system S is confluent and terminating because it is a scalar rewrite system. The system S subsumes S0 because S is a scalar rewrite system. From Proposition 7.11, the system R0 = S0 ∪ E ∪ F ∪ A is confluent. Finally, the system E ∪ F ∪ A commutes with S ∗ . Indeed, each rule of E ∪ F ∪ A commutes with S ∗ as each subterm of sort scalar in the left member of a rule is either a variable or 0 or 1, which are normal forms. We conclude with Proposition 7.14 that R = S ∪ E ∪ F ∪ A is locally confluent. Hence as it is terminating it is confluent by Newman’s lemma [39].The same argument applies for S ∪ V and S ∪ V ′ . 7.5. The system L. We now want to prove that the system L is confluent. With the introduction of the rule B, we lose termination, hence we cannot use Newman’s lemma [39] anymore. Thus we shall use for this last part techniques coming from the proof of confluence of the λ-calculus and prove that the parallel version of the B rule is strongly confluent. In our case as we have to mix the rule B with R we shall also prove that it commutes with −→∗R . Definition 7.16 (Strong confluence). A relation X is said to be strongly confluent if whenever t −→X u and t −→X v, there exists a term w such that u −→X w and v −→X w. k k Definition 7.17 (The relation −→B ). The relation −→B is the smallest reflexive congruk k ence such that if u is a base vector, t −→B t′ and u −→B u′ then k (λx t) u −→B t′ [u′ /x] Proposition 7.18. If v1 −→∗R w1 then v1 [b/x] −→∗R w1 [b/x], where b is a base vector. Proof. If the reduction of v1 to w1 involves an application of a conditional rule, then the condition is preserved on v1 [v2 /x]. Indeed, substituting some term in a closed normal term yields the same term. Proposition 7.19. If v2 −→∗R w2 then v1 [v2 /x] −→∗R v1 [w2 /x]. Proof. The reduction is a congruence. 26 P. ARRIGHI AND G. DOWEK k Proposition 7.20. If t = u or t −→R u and if t −→B v then there exists w such that k u −→B w and v −→∗R w. Proof. By induction on the structure of t. If t = u we just take w = v. Thus we focus in the rest of the proof to the case where t −→R u. If the B k -reduction takes place at the toplevel, then t = (λx t1 ) t2 , t2 is a base vector k k and there exists terms v1 and v2 such that t1 −→B v1 , t2 −→B v2 and v = v1 [v2 /x]. Neither λx t1 nor t2 is a sum, a product by a scalar or the null vector, hence the Rreduction is just an application of the congruence thus there exists terms u1 and u2 such that and t1 −→?R u1 and t2 −→?R u2 . Since t2 is a base vector, u2 is also a base vector. k By induction hypothesis, there exist terms w1 and w2 such that u1 −→B w1 , v1 −→∗R w1 , k k u2 −→B w2 and v2 −→∗R w2 . We take w = w1 [w2 /x]. We have (λx u1 ) u2 −→B w and by Proposition 7.18 and 7.19 we also have v1 [v2 /x] −→∗R w. If the R-reduction takes place at the toplevel, we have to distinguish several cases according to the rule used for this reduction. k • If t = t1 + 0 and u = t1 , then there exists a term v1 such that t1 −→B v1 and v = v1 + 0. We take w = v1 . k • If t = 0.t1 and u = 0, then there exists a term v1 such that t1 −→B v1 and v = 0.v1 . We take w = 0. k • If t = 1.t1 and u = t1 , then there exists a term v1 such that t1 −→B v1 and v = 1.v1 . We take w = v1 . • If t = α.0 and u = 0, then v = t. We take w = 0. k • If t = α.(β.t1 ) and u = (α × β).t1 , then there exists a term v1 such that t1 −→B v1 and v = α.(β.v1 ). We take w = (α × β).v1 . • If t = α.(t1 + t2 ) and u = α.t1 + α.t2 , then there exist terms v1 and v2 such that k k t1 −→B v1 , t2 −→B v2 and v = α.(v1 + v2 ). We take w = α.v1 + α.v2 . • If t = α.t1 + β.t1 and u = (α + β).t1 , then by (∗) t1 is L-normal, thus v = t. We take w = u. The cases of the two other factorisation rules are similar. • If t = (t1 + t2 ) t3 and u = t1 t3 + t2 t3 , then by (∗∗) the term t1 + t2 is L-normal. There k exists a term v3 such that t3 −→B v3 and v = (t1 + t2 ) v3 . We take w = t1 v3 + t2 v3 . • If t = (α.t1 ) t2 and u = α.(t1 t2 ), then by (∗ ∗ ∗) t1 is L-normal. There exists a term v2 k such that t2 −→B v2 and v = (α.t1 ) v2 . We take w = α.(t1 v2 ). k • If t = 0 t2 and u = 0, then there exists a term v2 such that t2 −→B v2 and v = 0 v2 . We take w = 0. The three other cases where a rule of group A is applied are symmetric. Finally if both reductions are just applications of the congruence we apply the induction hypothesis to the subterms. k Proposition 7.21 (−→∗R commutes with −→B ). k k If t −→∗R u and t −→B v then there exists w such that u −→B w and v −→∗R w. Proof. By induction on the length of the −→∗R derivation. If t = u then we take w = v. Otherwise there exists a term t1 such that t −→R t1 −→∗R u with a shorter reduction k from t1 to u. Using Proposition 7.20, there exists a term w1 such that t1 −→B w1 and LINEAL: A LINEAR-ALGEBRAIC λ-CALCULU 27 k v −→∗R w1 . By induction hypothesis, there exists a term w such that u −→B w and k w1 −→∗R w. We have u −→B w and v −→∗R w. Proposition 7.22 (Substitution for B k ). k k k If t −→B t′ and b −→B b′ then t[b/x] −→B b′ [b′ /x]. Here b denotes a base vector. Proof. By induction on the structure of t. k • If t = x then t′ = x and hence t[b/x] = b −→B b′ = t′ [b′ /x]. • If t = y then t′ = y and hence t[b/x] = y = t′ [b′ /x]. • If t = λy t1 the B k -reduction is just an application of the congruence. We have t′ = λy .t′1 k k with t1 −→B t′1 and the induction hypothesis tells us that t1 [b/x] −→B t′1 [b′ /x]. Hence k t[b/x] = λy t1 [b/x] −→B λy t′1 [b′ /x] = t′ [b′ /x]. • If t = (t1 t2 ) then we consider two cases. – We have t1 = λy t3 , t2 a base state, and t′ = t′3 [t′2 /x], i.e., a B-reduction ock curs at top-level. By induction hypothesis we know that t3 [b/x] −→B t′3 [b′ /x] and k t2 [b/x] −→B t′2 [b′ /x]. Because t2 and b are base vectors, so is t2 [b/x]. Hence k t[b/x] = (λy t3 [b/x])t2 [b/x] −→B t′3 [b′ /x][t′2 [b′ /x]/y] = t′3 [t′2 /y][b′ /x] = t′ [b′ /x]. k k – If t′ = (t′1 t′2 ) with t1 −→B t′1 , t2 −→B t′2 , then by induction hypothesis we know that k k k t1 [b/x] −→B t′1 [b′ /x] and t2 [b/x] −→B t′2 [b′ /x]. Hence t[b/x] = (t1 [b/x] t2 [b/x]) −→B ′ ′ ′ ′ ′ ′ (t1 [b /x] t2 [b /x]) = t [b /x]. • If t = 0 then t′ = 0 and hence t[b/x] = 0 = t′ [b′ /x]. • If t is a sum the B k -reduction is just an application of the congruence. Therefore t is ACk k equivalent to t1 + t2 and t′ is AC-equivalent to t′1 + t′2 with t1 −→B t′1 , t2 −→B t′2 . Then k k by induction hypothesis we know that t1 [b/x] −→B t′1 [b′ /x] and t2 [b/x] −→B t′2 [b′ /x]. k Hence t[b/x] = t1 [b/x] + t2 [b/x] −→B t′1 [b′ /x] + t′2 [b′ /x] = t′ [b′ /x]. • If t = α.t1 the B k -reduction is just an application of the congruence. We have t′ = α.t′1 k k with t1 −→B t′1 and the induction hypothesis tells us that t1 [b/x] −→B t′1 [b′ /x]. Hence k t[b/x] = α.t1 [b/x] −→B α.t′1 [b′ /x] = t′ [b′ /x]. Proposition 7.23 (Strong confluence of B k ). k k k k If t −→B u and t −→B v then there exists w such that u −→B w and v −→B w. Proof. By induction on the structure of t. • If t is a variable then u = t and v = t. We take w = t. • If t = 0 then u = 0 and v = 0. We take w = 0. k k • If t = λx t1 then u = λx u1 with t1 −→B u1 and v = λx v1 with t1 −→B v1 . By k k induction hypothesis, there exists a w1 such that u1 −→B w1 and v1 −→B w1 . We take w = λx w1 . • If t = (t1 t2 ) then we consider two cases. – If the term t1 has the form λx t3 and t2 is a base vector. We consider three subcases, k according to the form of the B k -reductions. Either v = (v1 v2 ) with t1 −→B v1 , k k k t2 −→B v2 , and u = (u1 u2 ) with t1 −→B u1 , t2 −→B u2 . By induction hypothesis, k k k there exists terms w1 and w2 such that u1 −→B w1 , v1 −→B w1 , u2 −→B w2 , k v2 −→B w2 . We take w = (w1 w2 ). 28 P. ARRIGHI AND G. DOWEK k k k Or v = v3 [v2 /x] with t3 −→B v3 , t2 −→B v2 , and u = ((λx u3 ) u2 ) with t3 −→B u3 , k t2 −→B u2 . Since t2 is a base vector, u2 and v2 are also base vectors. By induction k k k hypothesis, there exist terms w3 and w2 such that u3 −→B w3 , v3 −→B w3 , u2 −→B k k w2 , v2 −→B w2 . We take w = w3 [w2 /x]. We have (λx u3 ) u2 −→B w3 [w2 /x] by k definition of B k . By Proposition 7.22 we also have v3 [v2 /x] −→B w3 [w2 /x]. k k k Or v = v3 [v2 /x] with t3 −→B v3 , t2 −→B v2 , and u == u3 [u2 /x] with t3 −→B k u3 , t2 −→B u2 . Since t2 is a base vector, u2 and v2 are base vectors also. By k k induction hypothesis, there exist terms w3 and w2 such that u3 −→B w3 , v3 −→B w3 , k k u2 −→B w2 , v2 −→B w2 . We take w = w3 [w2 /x]. By Proposition 7.22 we have both k k u3 [u2 /x] −→B w3 [w2 /x] and v3 [v2 /x] −→B w3 [w2 /x]. – Otherwise the B k -reduction is just an application of the congruence, i.e., v = (v1 v2 ) k k k k with t1 −→B v1 , t2 −→B v2 , and u = (u1 u2 ) with t1 −→B u1 , t2 −→B u2 . By k k induction hypothesis, there exists terms w1 and w2 such that u1 −→B w1 , v1 −→B w1 , k k u2 −→B w2 , v2 −→B w2 . We take w = (w1 w2 ). • If t is a sum then the B k -reduction is just an application of the congruence. The term t is AC-equivalent to a sum t1 + t2 , the term u is AC-equivalent to a sum u1 + u2 with k k t1 −→B u1 , t2 −→B u2 , and the term v is AC-equivalent to a sum v1 + v2 such that k k t1 −→B v1 and t2 −→B v2 . By induction hypothesis, there exist terms w1 and w2 such k k k k that u1 −→B w1 , v1 −→B w1 , u2 −→B w2 , v2 −→B w2 . We take w = w1 + w2 . • If finally, t = α.t1 then the B k -reduction is just an application of the congruence. We k k have u = α.u1 with t1 −→B u1 , and v = αv1 with t1 −→B v1 . By induction hypothesis, k k there exists a term w1 such that u1 −→B w1 , v1 −→B w1 . We take w = α.w1 . Proposition 7.24 (Hindley-Rosen lemma). If the relations X and Y are strongly confluent and commute then the relation X ∪ Y is confluent. Theorem 7.25. The system L is confluent. Proof. By Proposition 7.15, the relation −→R is confluent, hence −→∗R is strongly confluent. k By Proposition 7.23, the relation −→B is strongly confluent. By Proposition 7.21, the k k relations −→∗R and −→B commute. Hence, by Proposition 7.24 the relation −→∗R ∪ −→B is confluent. Hence, the relation −→L is confluent. Corollary 7.26 (No-cloning in the Linear-algebraic λ-calculus). There is no term Clone such that for all term v, (Clone v) −→∗L (v ⊗ v). Proof. Note that ⊗, true and false stand for the terms introduced in Section 6. Say (Clone v) −→∗L (v ⊗ v) for all v. Let v = α.true + β.false be in closed normal form. Then by the A-rules we have (Clone (α.true + β.false)) −→∗L α.(Clone true) + β.(Clone false). Next, according to our supposition on Clone, this further reduces to α.(true ⊗ true)+β.(false ⊗ false). But our supposition on Clone, also says that (Clone (α.true + β.false)) reduces to (α.true + β.false) ⊗ (α.true + β.false). Moreover the two cannot be reconciled into a common reduct, because they are normal. Hence our supposition would break the confluence; it cannot hold. Note that λx v on the other hand can be duplicated, because it is thought as the (plans of) the classical machine for LINEAL: A LINEAR-ALGEBRAIC λ-CALCULU 29 building v – in other words it stands for potential parallelism rather than actual parallelism. As expected there is no way to transform v into λx v in general; confluence ensures that the calculus handles this distinction in a consistent manner. 8. Current works 8.1. Algebraic λ-calculus. As we have mentioned in the introduction the idea of endowing the λ-calculus with a vector space has emerged simultaneously and independently in a different context. Indeed, the exponential-free fragment of Linear Logic is a logic of resources where the propositions themselves stand for those resources – and hence cannot be discarded nor copied. When seeking to find models of this logic, one obtains a particular family of vector spaces and differentiable functions over these. It is by trying to capture back these mathematical structures into a programming language that T. Ehrhard and L. Regnier have defined the differential λ-calculus [26], which has an intriguing differential operator as a builtin primitive, and some notion of module of the λ-calculus terms, over the natural numbers. More recently L. Vaux [57] has focused his attention on a “differential λ-calculus without differential operator”, extending the module to finitely splitting positive real numbers. He obtained a confluence result in this case, which stands even in the untyped setting. More recent works on this Algebraic λ-calculus tend to consider arbitrary scalars [28, 49]. This Algebraic λ-calculus and the Linear-algebraic λ-calculus we presented in this paper are very similar not only in names: they both merge higher-order computation, be it terminating or not, in its simplest and most general form (namely the untyped λ-calculus) together with linear algebra in its simplest and most general form also (the axioms of vector spaces). Skipping over details a closer inspection unravels that: • the application in the Algebraic λ-calculus is left linear but not right linear; • the abstraction in the Algebraic λ-calculus is a linear unary operator; • the rewriting is modulo vector space axioms, and these axioms are not transformed into rewrite rules of the system. It could be said the last two points are only minor differences; design choices in some sense. Arguably those of Lineal are advantageous because they yield a more robust confluence proof, valid for arbitrary scalars. If we lift these two differences, Lineal simulates the Algebraic λ-calculus [12]. The first point is a more important difference, with justification right within the origins of the Algebraic λ-calculus and the Differential λ-calculus. Recently, however, it has been shown that the difference really amounts to a choice between call-by-name and call-by-value oriented strategies. The encoding of one strategy into another still works [23] — hence it could be said that the two calculi are essentially equivalent. 8.2. Types. Whilst terms in our calculus seem to form a vector space, the very definition of a norm is difficult in our context: deciding whether a term terminates is undecidable; but these terms produce infinities, hence convergence of a vector space norm is undecidable. Related to this precise topic, L. Vaux has studied simply typed algebraic λ-calculus, ensuring convergence of a vector space norm [57]. Following his work, C. Tasson has studied some P model-theoretic properties of the barycentric ( αi = 1) subset of this simply typed calculus [49]. A recent work by T. Ehrhard proves the convergence of a Taylor series expansion of Algebraic λ-calculus terms, via a System F typing system [28]. 30 P. ARRIGHI AND G. DOWEK Hence, standard type systems ensure the convergence of the vector space norm of a term. And indeed it is not so hard to define a simple extension of System F that fits Lineal — just by providing the needed rules to type additions, scalar products and the null vector in some trivial manner, as we did in [10, 11]. As expected one obtains strong normalisation from this type system. An important byproduct of this result is that one can then remove the conditions (∗) − (∗ ∗ ∗) that limit the reduction rules of Lineal (see Section 5), because their purpose was really to keep indefinite forms from reducing (such as t − t, with t not normal and hence potentially infinite). In other words types make Lineal into a simpler language. Yet standard type systems are unable forPinstance toP impose upon the language that any well-typed linear combination of terms αi .ti has αi = 1. That is unless they are provided with a handle upon these scalars. This is the purpose of the scalar type system which was recently proposed [10, 11]. This type system which manages to keep track of “the amount of a type” by summing the amplitudes of its contributing terms, and reflects this amount within the type. As an example of its uses, it was demonstrated that this provides a type system which guarantees well-definiteness of probabilistic functions in the sense that it specializes Lineal into a probabilistic, higher-order λ-calculus. P We are still looking for a P type system that would impose that linear combination of terms αi .ti have |αi |2 = 1, as suited for quantum computing. 8.3. Models. The functions expressed in our language are linear operators upon the space constituted by its terms. It is strongly inspired from the more preliminary [6], where terms clearly formed a vector space. However because the calculus higher-order, we get forms of infinities coming into the game. Thus, the underlying algebraic structure is not as obvious as in [6]. Moreover one can notice already that since the non-trivial models of the untyped λ-calculus are all uncountable, the models of (Linear-)Algebraic λ-calculus are likely to be vector spaces having an uncountable basis. These are fascinating, open questions, but whose difficulty explain why we have not provided a denotational semantics for Lineal in this paper. This issue of models of (Linear-)Algebraic λ-calculus is a challenging, active topic of current research. We know of the categorical model of simply typed Lineal with fixpoints [51], which establishes a connection between the canon and uncanon construct of Section 6 and monads à la Moggi [38]. The finiteness space model of simply typed Algebraic λ-calculus [27, 49] does not easily carry through to Lineal, which is call-by-value oriented. Recently, a syntactic finiteness space model of System F algebraic λ-calculus has been developed in [28]. 9. Conclusion 9.1. Summary. When merging the untyped λ-calculus with linear algebra one faces two different problems. First of all simple-minded duplication of a vector is a non-linear operation (cloning) unless it is restricted to base vectors and later extended linearly (copying). Second of all we can express computable but nonetheless infinite series of vectors, hence yielding some infinities and the troublesome indefinite forms. Here again this is fixed by restricting the evaluation of these indefinite forms, this time to normal vectors. Both problems show up when looking at the confluence of the Linear-algebraic λ-calculus (Lineal). LINEAL: A LINEAR-ALGEBRAIC λ-CALCULU 31 The architecture of the proof of confluence seems well-suited to any non-trivial rewrite systems having both some linear algebra and some infinities as its key ingredients. Moreover the proof of confluence entails a no-cloning result for Lineal, in accordance with the linearity of quantum physics. 9.2. Perspectives. Lineal merges higher-order computation with linear algebra in a minimalistic manner. Such a foundational approach is also taking place for instance in [2] via some categorical formulations of quantum theory exhibiting nice composition laws and normal forms, without explicit states, fixed point or the possibility to replicate gate descriptions. As for [2] although we have shown that quantum computation can be encoded in our language, Lineal remains some way apart from a model of quantum computation, because it allows evolutions which are not unitary. Establishing formal connections with this categorical approach does not seem an easy matter but is part of our objectives. These connections might arise through typing. Finding a type system which specializes Lineal into a strictly quantum programming language (enforcing the unitary constraint) is not only our next step on the list, it is actually the principal aim and motivation for this work: we wish to extend the Curry-Howard isomorphism between proofs/propositions and programs/types to a linear-algebraic, quantum setting. Having merged higher-order computation with linear-algebra in a minimalistic manner, which does not depend on any particular type systems, grants us a complete liberty to now explore different forms of this isomorphism. For instance we may expect different type systems to have different fields of application, ranging from fine-grained entanglement-analysis for quantum computation [44, 45], to opening connections with linear logic [24] or even giving rise to some novel, quantitative logics [10]. Acknowledgments The authors would like to thank Alejandro Dı́az-Caro, Evelyne Contejean, Philippe Jorrand, Jean-Pierre Jouannaud, Claude Marché, Simon Perdrix, Benoı̂t Valiron and Lionel Vaux for some enlightening discussions. References [1] S. Abramsky, Computational Interpretations of Linear Logic, Theoretical Computer Science, 111, 3–57, (1993). [2] S. Abramsky, B. Coecke, A categorical semantics of quantum protocols LICS, IEEE Computer Society, 415-425, (2004). [3] L. Adleman, J. DeMarrais, M. Huang, Quantum Computability, SIAM J. on Comp., 26, 5, 1524-1540, (1997). [4] T. Altenkirch, J. Grattage, J.K. Vizzotto, A. Sabry, An Algebra of Pure Quantum Programming, Third International Workshop on Quantum Programming Languages, Electronic Notes of Theoretical Computer Science, 170C, 23-47, (2007). [5] P. Arrighi, G. Dowek, A computational definition of the notion of vector space, ENTCS 117, 249-261, (2005). [6] P. Arrighi, G. Dowek, Linear-algebraic lambda-calculus, in P. Selinger (Ed.), International workshop on quantum programming languages, Turku Centre for Computer Science General Publication, 33, 21-38, (2004). 32 P. ARRIGHI AND G. DOWEK [7] P. Arrighi, G. Dowek, Linear-algebraic lambda-calculus: higher-order, encodings, confluence, arXiv:quant-ph/0612199. [8] P. Arrighi, G. Dowek, www-roc.inria.fr/who/Gilles.Dowek/Prog/lineal.html. [9] P. Arrighi, G. Dowek, On the critical pairs of a rewrite system for vector spaces, available on the web page of the authors, see www-roc.inria.fr/who/Gilles.Dowek/Publi/criticalpairs.pdf, (2012). [10] P. Arrighi, A. Dı́az-Caro, Scalar System F for Linear-Algebraic λ-Calculus: Towards a Quantum Physical Logic, Proceedings of the 6th International Workshop on Quantum Physics and Logic, ENTCS 206–215, (2009). [11] P. Arrighi, A. Dı́az-Caro, A System F accounting for scalars, Preprint: arXiv:0903.3741, (2009). [12] P. Arrighi, L. Vaux, Embedding Algebraic Lambda-calculus into Lineal, Private communication, (2009). [13] E. Bernstein, U. Vazirani, Quantum Complexity Theory, Annual ACM symposium on Theory of Computing, 25, (1993). [14] G. Birkhoff, On the Structure of Abstract Algebras, Proc. Cambridge Phil. Soc., 31, (1935). [15] G. Boudol, Lambda-calculi for (strict) parallel functions, Information and Computation, 108(1), 51-127, (1994). [16] O. Bournez, M. Hoyrup, Rewriting Logic and Probabilities, Rewriting Techniques and Applications, LNCS 2706, (2003). [17] P. Boykin, T. Mor, M. Pulver, V. Roychowdhury, F. Vatan, On universal and fault-taulerant quantum computing, arxiv:quant-ph/9906054 [18] G. Chiribella, G. D’Ariano, P. Perinotti, B. Valiron, Beyond Quantum Computers, Arxiv preprint arXiv:0912.0195, (2009). [19] The CiME Rewrite Tool, http://cime.lri.fr/. [20] D. Cohen, P. Watson, An efficient representation of arithmetic for term rewriting, Proc. of the 4th Conference on Rewrite Techniques and Applications, LNCS [21] N. Dershowitz, J.-P. Jouannaud, Rewrite systems, Handbook of theoretical computer science, Vol. B: formal models and semantics, MIT press, (1991). [22] D. Deutsch, R. Josza, Rapid solution of problems by quantum computation. Proc. of the Roy. Soc. of London A, 439, 553-558, (1992). [23] A. Dı́az-Caro, S. Perdrix, C. Tasson, B. Valiron Equivalence of Algebraic λ-calculi, HOR 2010. [24] A. Dı́az-Caro, B. Petit, From Additive Logic to Linear Logic, manuscript, (2010). [25] D. Dougherty, Adding Algebraic Rewriting to the Untyped Lambda Calculus, Proc. of the Fourth International Conference on Rewriting Techniques and Applications, 1992. [26] T. Ehrhard, L. Regnier, The differential lambda-calculus, Theoretical Computer Science, 309, 1–41, (2003). [27] T. Ehrhard, Finiteness spaces, Mathematical Structures in Computer Science, 15(4), 615–646, (2005). [28] T. Ehrhard, A finiteness structure on resource terms, LICS 2010, to appear. [29] M. Fernandez and I. Mackie, Closed Reductions in the λ-calculus, Computer Science Logic, Lecture Notes in Computer Science 1683, (1999). [30] A. Di Pierro, C. Hankin, H. Wiklicky, Probabilistic λ-calculus and quantitative program analysis, J. of Logic and Computation, 15(2), 159-179, (2005). [31] S. J. Gay, Quantum programming languages: survey and bibliography, Mathematical Structures in Computer Science, 16(4), 581–600, (2006). [32] J.-Y. Girard. Linear logic. Theoretical Computer Science, 50, 1-102, (1987). [33] L. K. Grover, Quantum Mechanics Helps in Searching for a Needle in a Haystack, Phys. Rev. Lett., 79(2), 325–328, (1997). [34] O. M. Herescu, C. Palamidessi, Probabilistic asynchronous pi-calculus, ETAPS, LNCS 1784, 146–160, (2000). [35] G. Huet, A complete proof of correctness of the Knuth-Bendix completion algorithm, Journal of Computer and System Sciences, 23(1), pages 11–21, (1981). [36] J.-P. Jouannaud, H. Kirchner, Completion of a Set of Rules Modulo a Set of Equations, SIAM J. of Computing, 15(4), 1155–1194, (1986). [37] A. Kitaev, Quantum computation, algorithms and error correction, Russ. Math. Surv., 52, 6, 1191-1249, (1997). [38] E. Moggi, Notions of computation and monads, Information and Computation, 93, 55–92, (1991). LINEAL: A LINEAR-ALGEBRAIC λ-CALCULU 33 [39] M. H. A. Newman, On theories with a combinatorial definition of ”equivalence”, Annals of Mathematics, 432, 223–243, (1942). [40] M. A. Nielsen, Universal quantum computation using only projective measurement, quantum memory, and preparation of the 0 state, Phys. Rev. A, 308, 96-100, (2003). [41] , O. Oreshkov, F. Costa, C. Brukner, Quantum correlations with no causal order, Arxiv preprint arXiv:1105.4464, (2011). [42] G. E. Peterson, M. E. Stickel, Complete Sets of Reductions for Some Equational Theories, J. ACM, 28(2), 233-264, (1981). [43] S. Perdrix, State transfer instead of teleportation in measurement-based quantum computation, Int. J. of Quantum Information , 1(1), 219-223, (2005). [44] S. Perdrix, Quantum entanglement analysis based on abstract interpretation, SAS 2008, LNCS 5079, (2008). [45] F. Prost, C. Zerrari, Reasoning about Entanglement and Separability in Quantum Higher-Order Functions, UC 2008, Proceedings of the 8th International Conference on Unconventional Computation, 219–235 (2009). [46] R. Raussendorf, D.E. Browne, H.J. Briegel, The one-way quantum computer - a non-network model of quantum computation, Journal of Modern Optics, 49, p. 1299, (2002). [47] T. Rudolph, L. Grover, A two rebit gate universal for quantum computing, october 2002, arxiv:quantph/0210187. [48] P. Selinger, Towards a quantum programming language, Math. Struc. in Computer Science, 14(4), 527-586, (2004). [49] C. Tasson, Algebraic Totality, towards Completeness, TLCA 2009: Proceedings of the 9th International Conference on Typed Lambda Calculi and Applications, 325–340, (2009). [50] P. Selinger, B. Valiron, A lambda calculus for quantum computation with classical control, Math. Struc. in Computer Science, 16(3), 527-552, (2006). [51] B. Valiron, A Typed, Algebraic, Computational Lambda-Calculus. Mathematical Structures in Computer Science (to appear). [52] P. W. Shor, Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer, SIAM J. on Computing, 26, 1484-1509, (1997). [53] R. Solovay, manuscript, (1995). [54] R. Solovay, A. Yao, Quantum Circuit Complexity and Universal Quantum Turing Machines, manuscript, (1996). [55] A. Van Tonder, A Lambda Calculus for Quantum Computation, july 2003, arXiv:quant-ph/0307150. [56] A. Van Tonder, Quantum Computation, Categorical Semantics and Linear Logic, december 2003, arXiv:quant-ph/0312174. [57] L. Vaux, On linear combinations of lambda-terms, Proceedings of RTA 2007, LNCS 4533, (2007). [58] H. Walters, H. Zantema, Rewrite systems for integer arithmetic, Proc. of Rewriting Techniques and Applications 94, 6th Int. Conf., LNCS 914, 324-338, (1995). [59] W. K. Wooters, W. H. Zurek, A single quantum cannot be cloned, Nature 299, 802-803, (1982). This work is licensed under the Creative Commons Attribution-NoDerivs License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nd/2.0/ or send a letter to Creative Commons, 171 Second St, Suite 300, San Francisco, CA 94105, USA, or Eisenacher Strasse 2, 10777 Berlin, Germany
6cs.PL
arXiv:1709.08094v1 [math.ST] 23 Sep 2017 Robust estimation of mixing measures in finite mixture models Nhat Ho* , XuanLong Nguyen** , and Ya’acov Ritov** * ** Department of EECS, University of California, Berkeley Department of Statistics, University of Michigan, Ann Arbor September 26, 2017 Abstract In finite mixture models, apart from underlying mixing measure, true kernel density function of each subpopulation in the data is, in many scenarios, unknown. Perhaps the most popular approach is to choose some kernel functions that we empirically believe our data are generated from and use these kernels to fit our models. Nevertheless, as long as the chosen kernel and the true kernel are different, statistical inference of mixing measure under this setting will be highly unstable. To overcome this challenge, we propose flexible and efficient robust estimators of the mixing measure in these models, which are inspired by the idea of minimum Hellinger distance estimator, model selection criteria, and superefficiency phenomenon. We demonstrate that our estimators consistently recover the true number of components and achieve the optimal convergence rates of parameter estimation under both the well- and mis-specified kernel settings for any fixed bandwidth. These desirable asymptotic properties are illustrated via careful simulation studies with both synthetic and real data. 1 AMS 2000 subject classification: Primary 62F15, 62G05; secondary 62G20. Keywords and phrases: model misspecification, convergence rates, mixture models, Fisher singularities, strong identifiability, minimum distance estimator, model selection, superefficiency, Wasserstein distances. 1 Introduction Finite mixture models have long been a popular modeling tool for making inference about the heterogeneity in data, starting, at least, with the classical work of Pearson [1894] on biometrical ratios on crabs. They have been used in numerous domains arising from biological, physical, and social sciences. For a comprehensive introduction of statistical inference in mixture models, we refer the readers to the books of [McLachlan and Basford, 1988, Lindsay, 1995, McLachlan and Peel, 2000]. In finite mixture models, we have our data X1 , X2 , . . . , Xn ∈ X ⊂ Rd (d ≥ 1) to be i.i.d observations from a finite mixture with density function pG0 ,f0 (x) := Z f0 (x|θ)dG0 (θ) = k0 X p0i f0 (x|θi0 ), i=1 1 This research is supported in part by grants NSF CCF-1115769, NSF CAREER DMS-1351362, and NSF CNS-1409303 to XN. YR gratefully acknowledges the partial support from NSF DMS-1712962. 1 Pk 0 0 mixing measure with exactly k0 < ∞ non-zero i=1 pi δθi0 is a true but unknown   components and f0 (x|θ), θ ∈ Θ ⊂ Rd1 is a true family of density functions, possibly partially where G0 = unknown where d1 ≥ 1. There are essentially three principal challenges to the models that have attracted a great deal of attention from various researchers. They include estimating the true number of components k0 , understanding the behaviors of parameter estimation, i.e., the atoms and weights of true mixing measure G0 , and determining the underlying kernel density function f0 of each subpopulation in the data. The first topic has been an intense area of research recently, see for example [Roeder, 1994, Escobar and West, 1995, Dacunha-Castelle and Gassiat, 1997, Richardson and Green, 1997, Dacunha-Castelle and Gassiat, 1999, Keribin, 2000, James et al., 2001, Chen et al., 2012, Chen and Khalili, 2012, Kasahara and Shimotsu, 2014]. However, the second and third topic have received much less attention due to their mathematical difficulty. When the kernel density function f0 is assumed to be known and k0 is bounded by some fixed positive integer number, there have been considerable recent advances in the understanding of parameter estimation. In particular, when k0 is known, i.e., the exact-fitted setting of finite mixtures, Ho and Nguyen [2016c] introduced a stronger version of classical parameter identifiability condition, which is first order identifiability notion, see Definition 2.2 below, to guarantee the standard convergence rate n−1/2 of parameter estimation. When k0 is unknown and bounded by a given number, i.e., the over-fitted setting of finite mixtures, Chen [1995], Nguyen [2013], Ho and Nguyen [2016c] utilized a notion of second order identifiability to establish convergence rate n−1/4 of parameter estimation, which is achieved under some minimum distance based estimator and the maximum likelihood estimator. Sharp minimax rates of parameter estimation for finite mixtures under strong identifiability conditions in sufficiently high orders have been obtained by Heinrich and Kahn [2015]. On the other hand, Ho and Nguyen [2016a,b] studied the singularity structure of finite mixture’s parameter space and its impact on rates of parameter estimation when either the first or the second order identifiability condition fails to hold. When the kernel density function f0 is unknown, there have been some work utilizing the semiparametric approaches [Bordes et al., 2006, Hunter et al., 2007]. The salient feature of these work is to estimate f0 from certain classes of functions with infinite dimension and achieve parameter estimation accordingly. However, it is usually very difficult to establish a strong guarantee for the identifiability of the parameters, even when the parameter space is simple [Hunter et al., 2007]. Therefore, semiparametric approaches for estimating true mixing measure G0 are usually not reliable. Perhaps, the most common approach to avoid the identifiability issue of f0 is to choose some kernel function f that we tactically believe the data are generated from, and utilize that kernel function to fit the model to obtain an estimate of the true mixing measure G0 . In view of its simplicity and prevalence, this is also the approach that we consider in this paper. However, there is a fundamental challenge with that approach. It is likely that we are subject to a misspecified kernel setting, i.e., the chosen kernel f and the true kernel f0 are different. Hence, parameter estimation under this approach will be potentially unstable. The robustness question is unavoidable. Our principal goal in the paper therefore, is the construction of robust estimators of G0 where the estimation of both its number of components and its parameters is of interest. Moreover, these estimators should achieve the best possible convergence rates under various assumptions of both the chosen kernel f and the true kernel f0 . When the true number of components k0 is known, various robust methods had been proposed in the literature, see for example [Woodward et al., 1984, Donoho and Liu, 1988, Cutler and Cordero-Brana, 1996]. However, there are scarce work for robust estimators when the true number of components k0 is unknown. Recently, Woo and Sriram [2006] proposed a robust estimator of the number of components based on the idea of minimum Hellinger distance estimator [Beran, 1977, Lindsay, 1994, Lin and He, 2006, Karunamuni and Wu, 2009]. However, their work faced certain limitations. Firstly, their estima- 2 tor greatly relied upon the choice of kernel bandwidth. In particular, in order to achieve the consistency of the number of components under the well-specified kernel setting, i.e., when {f } = {f0 }, the bandwidth should vanish to 0 sufficiently slowly (cf. Theorem 3.1 in [Woo and Sriram, 2006]). Secondly, the behaviors of parameter estimation from their estimator are difficult to interpret due to the subtle choice of bandwidth. Last but not least, they also argued that their method achieved the robust estimation of the number of components under the misspecified kernel setting, i.e., when {f } 6= {f0 }. Not only did their statement lack theoretical guarantee, their argument turned out to be also erroneous (see Section 5.3 in [Woo and Sriram, 2006]). More specifically, they considered the chosen kernel f to be Gaussian kernel while the true kernel f0 to be Student’s t-kernel with a given fixed degree of freedom. The parameter space Θ only consists of mean and scale parameter while the true number of components k0 is 2. They demonstrated that their estimator still maintained the correct number of components of G0 , i.e., k0 = 2, under that setting of f and f0 . Unfortunately, their argument is not clear as their estimator should maintain the number of components of a mixing measure G∗ which minimizes the appropriate Hellinger distance to the true model. Of course, establishing the consistency of their parameter estimation under the misspecified kernel setting is also a non-trivial problem. Inspired by the idea of minimum Hellinger distance estimator, we propose flexible and efficient robust estimators of mixing measure G0 that address all the limitations from the estimator in [Woo and Sriram, 2006]. Not only our estimators are computationally feasible and robust but they also possess various desirable properties, such as the flexible choice of bandwidth, the consistency of the number of components, and the best possible convergence rates of parameter estimation. In particular, the main contributions in this paper can be summarized as follows (i) We treat the well-specified kernel setting, i.e., {f } = {f0 }, and the misspecified kernel setting, i.e., {f } = 6 {f0 }, separately. Under both settings, we achieve the consistency of our estimators regarding the true number of components for any fixed bandwidth. Furthermore, when the bandwidth vanishes to 0 at an appropriate rate, the consistency of estimating the true number of components is also guaranteed. (ii) For any fixed bandwidth, when f0 is identifiable in the first order, the optimal convergence rate n−1/2 of parameter estimation is established under the well-specified kernel setting. Additionally, when f0 is not identifiable in the first order, we also demonstrate that our estimators still achieve the best possible convergence rates of parameter estimation. (iii) Under the misspecified kernel setting, we prove that our estimators converge to a mixing measure G∗ that is closest to the true model under the Hellinger metric for any fixed bandwidth. When f is first order identifiable and G∗ has finite number of components, the optimal convergence rate n−1/2 is also established under mild conditions of both kernels f and f0 . Furthermore, when G∗ has infinite number of components, some analyses about the consistency of our estimators are also discussed. Finally, our argument, so far, has mostly focused on the setting when the true mixing measure G0 is fixed with the sample size n. However, we note in passing that in a proper asymptotic model, G0 may also vary with n and converge to some probability distribution in the limit. Under the well-specified kernel setting, we verify that our estimators also achieve the minimax convergence rate of estimating G0 under sufficiently strong condition on the identifiability of kernel density function f0 . Paper organization The rest of the paper is organized as follows. Section 2 provides preliminary backgrounds and facts. Section 3 presents an algorithm to construct a robust estimator of mixing measure based on minimum Hellinger distance estimator idea and model selection perspective. Theoretical 3 results regarding that estimator are treated separately under both the well- and mis-specified kernel setting. Section 4 introduces another algorithm to construct a robust estimator of mixing measure based on superefficiency idea. Section 5 addresses the performance of our estimators developed in previous sections under non-standard setting of our models. The theoretical results are illustrated via careful simulation studies with both synthetic and real data in Section 6. Discussions regarding possible future work are presented in Section 7 while self-contained proofs of key results are given in Section 8 and proofs of the remaining results are given in the Appendices. Given two densitiesZp, q (with respect to the Lebesgue measure µ), the total variation dis1 |p(x) − q(x)|dµ(x). Additionally, the square Hellinger distance is tance is given by V (p, q) = Z p2 p 1 given by h2 (p, q) = ( p(x) − q(x))2 dµ(x). 2 ∂ |κ| f ∂ |κ| f (x|θ) = For any κ = (κ1 , . . . , κd1 ) ∈ Nd1 , we denote κd (x|θ) where θ = ∂θ κ ∂θ1κ1 . . . ∂θd1 1 (θ1 , . . . , θd1 ). Additionally, the expression an & bn will be used to denote the inequality up to a constant multiple where the value of the constant is independent of n. We also denote an ≍ bn if both an & bn and an . bn hold. Finally, for any a, b ∈ R, we denote a ∨ b = max {a, b} and a ∧ b = min {a, b}. Notation 2 Background Throughout the paper, we assume that the parameter space Θ is a compact subset of Rd1 . For any kernel density function f and mixing measure G, we define Z pG,f (x) := f (x|θ)dG(θ). Additionally, we denote Ek0 := Ek0 (Θ) the space of discrete mixing measures with exactly k0 distinct support points on Θ and Ok := Ok (Θ) the space of discrete mixing measures with at most k distinct support points on Θ. Additionally, denote G := G(Θ) = ∪ Ek the set of all discrete measures k∈N+ with finite supports on Θ. Finally, G denotes the space of all discrete measures (including those with countably infinite supports) on Θ. As described in the introduction, a principal goal of our paper is to construct robust estimators that maintain the consistency of the number of components and the best possible convergence rates of parameter estimation. As in Nguyen [2013], our tool-kit for analyzing the identifiability and convergence of parameter estimation in mixture models is based on Wasserstein distance, which can be defined as the optimal cost of moving masses transforming one probability measure to another [Villani, 2008]. In k P particular, consider a mixing measure G = pi δθi , where p = (p1 , p2 , . . . , pk ) denotes the propori=1 P ′ tion vector. Likewise, let G′ = ki=1 p′i δθi′ . A coupling between p and p′ is a joint distribution q on ′ [1 . . . , k] × [1, . . . , k′ ], which is expressed as a matrix q = (qij )1≤i≤k,1≤j≤k′ ∈ [0, 1]k×k with margins k k′ P P qmj = p′j and qim = pi for any i = 1, 2, . . . , k and j = 1, 2, . . . , k′ . We use Q(p, p′ ) to m=1 m=1 denote the space of all such couplings. For any r ≥ 1, the r-th order Wasserstein distance between G 4 and G′ is given by ′ Wr (G, G ) = X inf q∈Q(p,p′ ) i,j qij (kθi − θj′ k)r 1/r , where k·k denotes the l2 norm for elements in Rd1 . It is simple to argue that if a sequence of probability measures Gn ∈ Ok0 converges to G0 ∈ Ek0 under the Wr metric at a rate ωn = o(1) then there exists a subsequence of Gn such that the set of atoms of Gn converges to the k0 atoms of G0 , up to a permutation of the atoms, at the same rate ωn . We recall now the following key definitions that are used to analyze the behavior of mixing measures in finite mixture models (cf. [Ho and Nguyen, 2016b, Heinrich and Kahn, 2015]). We start with Definition 2.1. We say the family of densities {f (x|θ), θ ∈ Θ} is uniformly Lipschitz up to the order r, for some r ≥ 1, if f as a function of θ is differentiable up to the order r and its partial derivatives with respect to θ satisfy the following inequality  X  ∂ |κ| f ∂ |κ| f (x|θ ) − (x|θ ) γ κ ≤ Ckθ1 − θ2 kδr kγkrr 1 2 ∂θ κ ∂θ κ |κ|=r for any γ ∈ Rd1 and for some positive constants δ and C independent of x and θ1 , θ2 ∈ Θ. Here, d1 Q γκ = γiκi where κ = (κ1 , . . . , κd1 ). i=1 We can verify that many popular classes of density functions, including Gaussian, Student’s t, and skewnormal family, satisfy the uniform Lipschitz condition up to any order r ≥ 1. The classical identifiability condition entails that the family of density function {f (x|θ), θ ∈ Θ} is identifiable if for any G1 , G2 ∈ G, pG1 ,f (x) = pG2 ,f (x) almost surely implies that G1 ≡ G2 [Teicher, 1961]. To be able to establish convergence rates of parameters, we have to utilize the following stronger notion of identifiability: Definition 2.2. For any r ≥ 1, we say that the family {f (x|θ), θ ∈ Θ} (or in short, f ) is identifiable in the r-th order if f (x|θ) is differentiable up to the r-th order in θ and the following holds (i) A1. For any k ≥ 1, given k different elements θ1 , . . . , θk ∈ Θ. If we have αη such that for almost all x k r XX X α(i) η l=0 |η|=l i=1 ∂ |η| f (x|θi ) = 0 ∂θ η (i) then αη = 0 for all 1 ≤ i ≤ k and |η| ≤ r. T) Rationale of the first order identifiability: Throughout the paper, we denote I(G, f ) := E(lG lG the Fisher information matrix of the kernel density f at a given mixing measure G. Here, lG := ∂ ∂ log pG,f (x) is the score function, where denotes the derivatives with respect to all the compo∂G ∂G nents and masses of G. The first order identifiability of f is an equivalent way to say that the Fisher information matrix I(G, f ) is non-singular for any G. Now, under the first order identifiability and the first order uniform Lipschitz condition on f , a careful investigation of Theorem 3.1 and Corollary 3.1 in Ho and Nguyen [2016c] yields the following result: 5 Proposition 2.1. Suppose that the density family {f (x|θ, θ ∈ Θ} is identifiable in the first order and uniformly Lipschitz up to the first order. Then, there is a positive constant C0 depending on G0 , Θ, and f such that as long as G ∈ Ok0 we have h(pG,f , pG0 ,f ) ≥ C0 W1 (G, G0 ). Note that, the result of Proposition 2.1 is slightly stronger than that of Theorem 3.1 and Corollary 3.1 in Ho and Nguyen [2016c] as it holds for any G ∈ Ok0 instead of only for any G ∈ Ek0 as in these later results. The first order identifiability property of kernel density function f implies that any estimation method that yields the convergence rate n−1/2 for pG0 ,f under the Hellinger distance, the induced rate of convergence for the mixing measure G0 is n−1/2 under W1 distance. 3 Minimum Hellinger distance estimator with non-singular Fisher information matrix Throughout this section, we assume that two families of density functions {f0 (x|θ), θ ∈ Θ} and {f (x|θ), θ ∈ Θ} are identifiable in the first order and admit the uniform Lipschitz condition up to the first order. 1 x for any σ > 0. We Now, let K be any fixed multivariate density function and Kσ (x) = d K σ σ define Z f ∗ Kσ (x|θ) := f (x − y|θ)Kσ (y)dy for any θ ∈ Θ. The notation f ∗Kσ can be thought as the convolution of the density family {f (x|θ), θ ∈ Θ} with the kernel function Kσ . From that definition, we further define pG,f ∗ Kσ (x) := k X i=1 pi f ∗ Kσ (x|θi ) = for any discrete mixing measure G = k P i=1 k X i=1 pi Z f (x − y|θi )Kσ (y)dy pi δθi in G. For the convenience of our argument later, we also denote that pG,f ∗ Kσ := pG,f as long as σ = 0. Now, our approach to define a robust estimator of G0 is inspired by the minimum Hellinger distance estimator [Beran, 1977] and the model selection criteria. Indeed, we have the following algorithm Algorithm 1: Let Cn n−1/2 → 0 and Cn n1/2 → ∞ as n → ∞. bn,m = arg min h(pG,f ∗ Kσ , Pn ∗ Kσ ) for any m ≥ 1. • Step 1: Determine G 0 1 G∈Om • Step 2: Choose  m b n = inf m ≥ 1 : h(pGbn,m ,f ∗ Kσ1 , Pn ∗ Kσ0 ) ≤ h(pGbn,m+1 ,f ∗ Kσ1 , Pn ∗ Kσ0 )  +Cn n−1/2 , bn = G bn,m • Step 3: Let G b n for each n. 6 Note that, σ1 ≥ 0 and σ0 > 0 are two chosen bandwidths that control the amount of smoothness that we would like to add to f and f0 respectively. The choice of Cn in Algorithm 1 is to guarantee that m bn is finite. Additionally, p it can be chosen based on certain model selection criteria. For instance, if we use BIC, then Cn = (d1 + 1)logn/2 where d1 is the dimension of parameter space. Algorithm 1 is in fact the generalization of the algorithm considered in Woo and Sriram [2006] when σ1 = 0 and σ0 > 0. In particular, with the adaptation of notations as those in our paper, the algorithm in Woo and Sriram [2006] can be stated as follows. Woo-Sriram (WS) Algorithm: • Step 1: Determine Gn,m = arg min h(pG,f , Pn ∗ Kσ0 ) for any n, m ≥ 1. G∈Om • Step 2: Choose   ′ −1/2 , mn = inf m ≥ 1 : h(pGn,m ,f , Pn ∗ Kσ0 ) ≤ h(pGn,m+1 ,f , Pn ∗ Kσ0 ) + Cn n where Cn′ n−1/2 → 0. • Step 3: Let Gn = Gn,mn for each n. The main distinction between our estimator and Woo-Sriram’s (WS) estimator is that we also allow the convolution of mixture density pG,f with Kσ1 . This double convolution trick in Algorithm 1 was also considered in James et al. [2001] to construct the consistent estimation of mixture complexity. However, their work was based on the Kullback-Leibler (KL) divergence rather than the Hellinger distance and was restricted to only the choice that σ1 = σ0 . Under the misspecified kernel setting, i.e., {f } = 6 {f0 }, the estimation of mixing measure G0 from KL divergence can be highly unstable. Additionally, James et al. [2001] only worked with the Gaussian case of true kernel function f0 , while in many applications, it is not realistic to expect that f0 is Gaussian. To demonstrate the advantages of bn over WS estimator Gn , we will provide careful theoretical studies of these our proposed estimator G estimators in the paper. For readers’ convenience, we provide now a brief summary of our analyses of bn and Gn . the convergence behaviors of G Under the well-specified setting, i.e., {f } = {f0 }, the optimal choice of σ1 and σ0 in Algorithm 1 is σ1 = σ0 > 0, which guarantees that G0 is the exact mixing measure that we seek for. Now, the double convolution trick in Algorithm 1 is sufficient to yield the optimal convergence rate n−1/2 of bn to G0 for any fixed bandwidth σ0 > 0 (cf. Theorem 3.1). The core idea of this result comes from G the fact that Pn ∗ Kσ0 (x) is an unbiased estimator of pG0 ,f0 ∗ Kσ0 (x) for all x ∈ X . It guarantees that h(Pn ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) = Op (n−1/2 ) under suitable conditions of f0 when the bandwidth σ0 is fixed. However, it is not the case for WS Algorithm. Indeed, we demonstrate later in Section 3.3 that for any fixed bandwidth σ0 > 0, Gn converges to G0 where G0 = arg min h(pG,f0 , pG0 ,f0 ∗ Kσ0 ) G∈G under certain conditions of f0 , K, and G0 . Unfortunately, G0 can be very different from G0 even if they may have the same number of components. Therefore, even though we may still be able to recover the true number of components with WS Algorithm, we hardly can obtain exact estimation of true parameters. It shows that Algorithm 1 is more appealing than WS Algorithm under the well-specified kernel setting with fixed bandwidth σ0 > 0. When we allow the bandwidth σ0 to vanish to 0 as n → ∞ under the well-specified kernel setting with σ1 = σ0 , we are able to guarantee that m b n → k0 almost surely when nσ0d → 0 (cf. Proposition 3.1). This result is also consistent with the result mn → k0 almost surely from Theorem 1 in 7 Woo and Sriram [2006] under the same assumptions of σ0 . Moreover, under these conditions of bandbn and Gn converge to G0 as n → ∞. However, instead of obtaining the width σ0 , both the estimators G −1/2 bn to G0 , we are only able to achieve its convergence rate to be n−1/2 exact convergence rate n of G up to some logarithmic factor when the bandwidth σ0 vanishes to 0 sufficiently slowly. It is mainly due to the fact that our current technique is based on the evaluation of the term h(Pn ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ), which may not converge to 0 at the exact rate n−1/2 when σ0 → 0. The situation is even worse for the convergence rate of Gn to G0 as it relies not only on the evaluation of h(Pn ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) but also on the convergence rate of G0 to G0 , which depends strictly on the vanishing rate of σ0 to 0. Therefore, the convergence rate of Gn in WS Algorithm may be much slower than n−1/2 . As a consequence, our estimator in Algorithm 1 may be also more efficient than that in WS Algorithm when the bandwidth σ0 is allowed to vanish to 0. Under the misspecified kernel setting, i.e., {f } 6= {f0 }, the double convolution technique in bn to G∗ where G∗ = Algorithm 1 continues to be useful for studying the convergence rate of G arg min h(pG,f ∗ Kσ1 , pG0 ,f0 ∗ Kσ0 ). Unlike the well-specified kernel setting, we allow σ1 and σ0 G∈G to be different under the misspecified kernel setting. It is particularly useful if we can choose σ1 and σ0 such that two families {f ∗ Kσ1 } and {f0 ∗ Kσ0 } are identical under Hellinger distance. The consequence is that G∗ and G0 will be identical under Wasserstein distance, which means that our estimator is still able to recover true mixing measure even though we choose the wrong kernel to fit our data. Granted, the misspecified setting means that we are usually not in such a fortunate situation, but our theory entails a good performance for our estimate when f ∗ Kσ1 ≈ f0 ∗ Kσ0 . Now, for the general choice of σ1 and σ0 , as long as G∗ has finite number of components, we are able to establish the bn to G∗ under sufficient conditions on f, f0 , and K (cf. Theorem 3.2). convergence rate n−1/2 of G However, when the number of components of G∗ is infinite, we are only able to achieve the consistency bn (cf. Proposition 3.2). Even though we do not have specific result of the number of components of G bn to G∗ under that setting of G∗ , we also provide important insights regarding the convergence rate of G regarding that convergence in Section 3.2.2. 3.1 Well-specified kernel setting In this section, we consider the setting that f0 is known, i.e., {f } = {f0 }. Under that setting, the optimal choice of σ1 and σ0 is σ1 = σ0 > 0 to guarantee that G0 is the exact mixing measure that we estimate. As we have seen from the discussion in Section 2, the first order identifiability condition plays an important role to obtain the convergence rate n−1/2 of parameter estimation. Since Algorithm 1 relies on investigating the variation around kernel function f0 ∗ Kσ0 in the limit, we would like to guarantee that f0 ∗ Kσ0 is identifiable in the first order for any σ0 > 0. It appears that we have a mild condition of K such that the first order identifiability of f0 ∗ Kσ0 is maintained. b b Lemma 3.1. Assume that K(t) 6= 0 for almost all t ∈ Rd where K(t) is the Fourier transform of kernel function K. Then, as long as f0 is identifiable in the first order, we obtain that f0 ∗ Kσ0 is identifiable in the first order for any σ0 > 0. b The assumption K(t) 6= 0 is very mild. Indeed, popular choices of K to satisfy that assumption include the Gaussian and Student’s t kernel. Inspired by the result of Lemma 3.1, we have the following bn to G0 under W1 distance for any fixed bandwidth σ0 > 0. result establishing the convergence rate of G Theorem 3.1. Let σ0 > 0 be given. (i) If f0 ∗ Kσ0 is identifiable, then m b n → k0 almost surely. (ii) Assume further the following conditions 8 (P.1) The kernel function K is chosen such that f0 ∗ Kσ0 is also identifiable in the first order and admits a uniform Lipschitz property up to the first order. Z g(x|G0 , σ0 ) (P.2) Ψ(G0 , σ0 ) := dx < ∞ where we have that Z pG0 ,f0 ∗ Kσ0 (x) Kσ20 (x − y)pG0 ,f0 (y)dy. g(x|G0 , σ0 ) := Then, we obtain bn , G0 ) = Op W1 (G where C1 (σ0 ) := inf G∈Ok0 s Ψ(G0 , σ0 ) −1/2 n C12 (σ0 )  h(pG,f0 ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) . W1 (G, G0 ) Remarks: (i) Condition (P.1) is satisfied by many kernel functions K according to Lemma 3.1. By assumption (P.1) and Proposition 2.1, we obtain the following bound h(pG,f0 ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) & W1 (G, G0 ) for any G ∈ Ok0 , i.e., C1 (σ0 ) > 0. (ii) Condition (P.2) is mild. One easy example for such setting is when f0 and K are both Gaussian kernels. In fact, when {f0 (x|η, τ ), (η, τ ) ∈ Θ} is a family of univariate Gaussian distributions where η and τ are location and scale parameter respectively and K is a standard univariate Gaussian kernel, we achieve Ψ(G0 , σ0 ) = k0 Z X p0i i=1 < ∝ k0 Z X i=1 k0 X i=1 R R Kσ20 (x − y)f0 (y|ηi0 , τi0 )dy dx pG0 ,f0 ∗ Kσ0 (x) Kσ20 (x − y)f0 (y|ηi0 , τi0 )dy dx f0 ∗ Kσ0 (x|ηi0 , τi0 )  (τi0 )2 + σ02 /σ02 < ∞. Another specific example is when f0 and K are both Cauchy kernels or generally Student’s t kernels with odd degree of freedom. However, assumption (P.2) may fail when K has much shorter tails than f0 . For example, if f0 is Laplacian kernel and K is Gaussian kernel, then Ψ(G0 , σ0 ) = ∞. bn as σ0 → 0: To avoid the ambiguity, we now denote {σ0,n } as the sequence of Comments on G varied bandwidths σ0 . The following result shows the consistency of m b n under specific conditions on σ0,n → 0. d → ∞ as Proposition 3.1. Given a sequence of bandwidths {σ0,n } such that σ0,n → 0 and nσ0,n n → ∞. If f0 is identifiable, then m b n → k0 almost surely. 9 bn Our previous result with Theorem 3.1 shows that the parametric n−1/2 rate of convergence of G to G0 is achieved for any fixed σ0 > 0. It would be more elegant to argue that this rate is achieved for some sequence σ0,n → 0. However, this cannot be done with the current technique employed in the proof of Theorem 3.1. In particular, even though we still can guarantee that lim C1 (σ0,n ) > 0 (cf. σ0,n →0 −β(d) O(σ0,n ) for Lemma .2 in Appendix B), the technical difficulty is that Ψ(G0 , σ0,n ) = some β(d) > 0 depending on d as σ0,n → 0. As a consequence, whatever the sequence of bandwidths σ0,n → 0 we bn to choose, we will be only able to obtain the convergence rate n−1/2 up to the logarithmic term of G G0 . It can be thought as the limitation of the elegant technique employed in Theorem 3.1. We leave the bn to G0 under the setting σ0,n → 0 for the future work. exact convergence rate n−1/2 of G 3.2 Misspecified kernel setting In the previous section, we assume the well-specified kernel setting, i.e., {f } = {f0 }, and achieve the bn to G0 under mild conditions on f0 and K and the choice that σ1 = σ0 convergence rate n−1/2 of G for any fixed bandwidth σ0 > 0. However, the well-specified kernel assumption is often violated in practice, i.e., the chosen kernel f may be different from the true kernel f0 . Motivated by this challenge, in this section we consider the setting when {f } = 6 {f0 }. Additionally, we also take into account the case when the chosen bandwidths σ1 and σ0 may be different. We will demonstrate that the convergence bn is still desirable under certain assumptions on f, f0 , and K. Furthermore, we also argue that rate of G the choice that σ1 and σ0 are different can be very useful under the case when two families of density functions {f ∗ Kσ1 (x|θ), θ ∈ Θ} and {f0 ∗ Kσ0 (x|θ), θ ∈ Θ} are identical. Due to the complex nature bn when the bandwidth σ1 ≥ 0 and of misspecified kernel setting, we will only study the behavior of G σ0 > 0 are fixed in this section. Now, for fixed bandwidths σ1 , σ0 assume that there exists a discrete mixing measure G∗ that minimizes the Hellinger distance between pG,f ∗ Kσ1 and pG0 ,f0 ∗ Kσ0 , i.e., G∗ := arg min h(pG,f ∗ Kσ1 , pG0 ,f0 ∗ Kσ0 ). G∈G As G∗ may not be unique, we denote  M := G∗ ∈ G : G∗ is a minimizer of h(pG,f ∗ Kσ1 , pG0 ,f0 ∗ Kσ0 ) . When f ∗ Kσ1 = f0 ∗ Kσ0 , it is clear that G0 is an element of M such that it has the minimum number of components among all the elements in M. To further investigate M under general setting of f, f0 , σ1 , σ0 , and K, we start with the following key property of elements G∗ in M: Lemma 3.2. For any G ∈ G and G∗ ∈ M, there holds s Z q Z q pG0 ,f0 ∗ Kσ0 (x) pG∗,f ∗ Kσ1 (x) pG0 ,f0 ∗ Kσ0 (x)dx. dx ≤ pG,f ∗ Kσ1 (x) pG∗ ,f ∗ Kσ1 (x) (1) Equipped with this bound, we have the following important property of M. Lemma 3.3. For any two elements G1,∗ , G2,∗ ∈ M, we obtain pG1,∗ ,f ∗ Kσ1 (x) = pG2,∗ ,f ∗ Kσ1 (x) for almost surely x ∈ X . Now, we consider the partition of M into the union of Mk = {G∗ ∈ M : G∗ has k elements} where k ∈ [1, ∞]. Let k∗ := k∗ (M) be the minimum number k ∈ [1, ∞] such that Mk is non-empty. We divide our argument into two distinct settings of k∗ : k∗ is finite and k∗ is infinite. 10 Finite k∗ : 3.2.1 By Lemma 3.3, Mk∗ will have exactly one element G∗ provided that f ∗ Kσ is identifiable. Furthermore, Mk is empty for all k∗ < k < ∞. However, it is possible that M∞ still contains various elements . Due to the parsimonious nature of Algorithm 1 and the result of Theorem 3.2, we will be bn still converges to the unique element G∗ ∈ Mk at the optimal rate n−1/2 able to demonstrate that G ∗ regardless of the behavior of M∞ . For the simplicity of our later argument under that setting of k∗ , we denote by G∗ the unique element in Mk∗ . As we mentioned earlier, one simple example for k∗ < ∞ is when {f ∗ Kσ1 } = {f0 ∗ Kσ0 }. Another example is when f is a location-scale family and f0 is a finite mixture of f  1 while σ1 = σ0 > 0. In particular, f (x|η, τ ) = f (x − η)/τ where η and τ are location and scale τ Pm ∗ ∗ ∗ parameters respectively. Additionally, f0 (x) = i=1 pi f (x|ηi , τi ) for some fixed positive integer ∗ ∗ ∗ m and fixed pairwise distinct components (pi , ηi , τi ) where 1 ≤ i ≤ m. Under that setting, if we choose σ1 = σ0 , then we can check that k∗ ≤ mk0 and pG∗ ,f (x) = pG0 ,f0 (x) almost surely. The explicit formulation of G∗ , therefore, can be found from the combinations of G0 and (p∗i , ηi∗ , τi∗ ) where 1 ≤ i ≤ m. From inequality (1) in Lemma 3.2, we have the following well-defined weighted version of Hellinger distance. Definition 3.1. Given σ1 > 0. For any two mixing measures G1 , G2 ∈ G, we define the weighted Hellinger distance h∗ (pG1 ,f ∗ Kσ1 , pG2 ,f ∗ Kσ1 ) by  2 ∗ Kσ1 ) = ∗ h (pG1 ,f ∗ Kσ1 , pG2 ,f 1 2 2 s Z q q pG0 ,f0 ∗ Kσ0 (x) dx. pG1 ,f ∗ Kσ1 (x) − pG2 ,f ∗ Kσ1 (x) × pG∗ ,f ∗ Kσ1 (x) p The notable feature of h∗ is the presence of term pG0 ,f0 ∗ Kσ0 (x)/pG∗ ,f ∗ Kσ1 (x) in its formulation, which makes it different from the traditional Hellinger distance. As long as {f } = {f0 } and σ1 = σ0 , we obtain h∗ (pG1 ,f ∗ Kσ1 , pG2 ,f ∗ Kσ1 ) ≡ h(pG1 ,f ∗ Kσ1 , pG2 ,f ∗ Kσ1 ) for any G1 , G2 ∈ G, i.e., the traditional Hellinger distance is a special case of h∗ under the well-specified kernel setting and the choice that σ1 = σ0 . The weighted Hellinger distance h∗ is particularly useful for studying the bn to G∗ for any fixed σ1 ≥ 0 and σ0 > 0. convergence rate of G Note that, in the context of the well-specified kernel setting in Section 3.1, the key step that we bn to G0 is based on the lower bound of the Hellinger utilized to obtain the convergence rate n−1/2 of G distance and the first order Wasserstein distance in inequality (1). With the modified Hellinger distance h∗ , it turns out that we still have the similar kind of lower bound as long as k∗ < ∞. Lemma 3.4. Assume that f ∗Kσ1 is identifiable in the first order and admits uniform Lipschitz property up to the first order. If k∗ < ∞, then for any G ∈ Ok∗ there holds h∗ (pG,f ∗ Kσ1 , pG∗ ,f ∗ Kσ1 ) & W1 (G, G∗ ). Equipped with the above inequality, we have the following result regarding the convergence rate of bn to G∗ : G Theorem 3.2. Assume k∗ < ∞ for some σ1 ≥ 0 and σ0 > 0. (i) If f ∗ Kσ1 is identifiable, then m b n → k∗ almost surely. 11 (ii) Assume further that condition (P.2) in Theorem 3.1 holds, i.e., Ψ(G0 , σ0 ) < ∞ and the following conditions hold: (M.1) The kernel K is chosen such that f ∗ Kσ1 is identifiable in the first order and admits the uniform Lipschitz property up to the first order. Z p f ∗ Kσ1 (x|θ)dx ≤ M1 (σ1 ) for some positive constant M1 (σ1 ). (M.2) sup θ∈Θ (M.3) sup θ∈Θ 3/4 ∂f ∗ Kσ1 (x|θ)/ f ∗ Kσ1 (x|θ) ∂θ ∞ ≤ M2 (σ1 ) for some positive constant M2 (σ1 ). Then, we have bn , G∗ ) = Op W1 (G where C∗,1 (σ1 ) := inf G∈Ok∗ s M 2 (σ1 )Ψ(G0 , σ0 ) −1/2 n 4 (σ ) C∗,1 1  h∗ (pG,f ∗ Kσ1 , pG∗ ,f ∗ Kσ1 ) and M (σ1 ) is some positive constant. W1 (G, G∗ ) Remarks: (i) As being mentioned in Lemma 3.4, condition (M.1) is sufficient to guarantee that C∗,1 (σ1 ) > 0. (ii) Conditions (M.2) and (M.3) are mild. An easy example is when f is Gaussian kernel and K is standard Gaussian kernel. (iii) When f0 is indeed a finite mixture of f , a close investigation of the proof of Theorem 3.2 reveals that we can relax condition (M.2) and (M.3) for the conclusion of this theorem to hold. (iv) Under the setting that {f ∗ Kσ1 } = {f0 ∗ Kσ0 }, i.e., G∗ ≡ G0 , the result of Theorem 3.2 implies bn converges to the true mixing measure G0 at optimal rate n−1/2 even though we are under that G the misspecified kernel setting. 3.2.2 Infinite k∗ : So far, we have assumed that k∗ has finite number of support points and achieve the cherished converbn to unique element G∗ ∈ Mk under certain conditions on f, f0 , and K. It is gence rate n−1/2 of G ∗ due to the fact that m b n → k∗ < ∞ almost surely, which is eventually a consequence of the identifibility of kernel density function f ∗ Kσ1 . However, for the setting k∗ = ∞, to establish the consistency of m b n , we need to resort to a slightly stronger version of identifiability, which is finitely identifiable condition. We adapt Definition 3 in Nguyen [2013] as follows. Definition 3.2. The family {f (x|θ), θ ∈ Θ} is finitely identifiable if for any G1 ∈ G and G2 ∈ G, |pG1 ,f (x) − pG2 ,f (x)| = 0 for almost all x ∈ X implies that G1 ≡ G2 . An example of finite identifiability is when f is Gaussian kernel with both location and variance parameter. Now, a close investigation of the proof of Theorem 3.2 quickly yields the following result. Proposition 3.2. Given σ1 > 0 such that f ∗ Kσ1 is finitely identifiable. If k∗ = ∞, we achieve m b n → ∞ almost surely. 12 bn Even though we achieve the consistency result of m b n when k∗ = ∞, the convergence rate of G to G∗ still remains an elusive problem. However, an important insight from Proposition 3.2 indicates bn to some element G∗ ∈ M∞ may be much slower than n−1/2 when that the convergence rate of G bn and G∗ ∈ M∞ have unbounded numbers of components in k∗ = ∞. It is due to the fact that both G which the kind of bound in Lemma 3.4 is no longer sufficient. Instead, something akin to the bounds given in Theorem 2 of Nguyen [2013] in the misspecified setting is required. We leave the detailed bn under that setting of k∗ for the future work. analyses of G 3.3 Comparison to WS Algorithm bn in Algorithm In the previous sections, we have established a careful study regarding the behaviors of G 1, i.e., we achieved the consistency of the number of components as well as the convergence rates of parameter estimation under various settings of f and f0 when the bandwidths σ1 and σ0 are fixed. As we mentioned at the beginning of Section 3, Algorithm 1 is the generalization of WS Algorithm when bn in Theorem 3.2 are still applicable σ1 = 0 and σ0 > 0. Therefore, the general results with estimator G to Gn under that special case of σ1 and σ0 . To rigorously demonstrate the flexibilities and advantages bn over WS estimator Gn , we firstly discuss the behaviors of estimator Gn from WS of our estimator G Algorithm under the well-specified kernel setting, i.e., {f } = {f0 }, and the fixed bandwidth setting of σ0 . Remember that f0 is assumed to be identifiable in the first order and to have uniform Lipschitz property up to the first order. Assume now we can find G0 := arg min h(pG,f0 , pG0 ,f0 ∗ Kσ0 ), G∈G i.e., G0 is the discrete mixing measure that minimizes the Hellinger distance between pG,f0 and pG0 ,f0 ∗ Kσ0 . Note that, G0 is a special case of G∗ when {f } = {f0 } and σ1 = 0. The form of G0 can be determined explicitly under various settings of f0 and K. For instance, assume that f0 are either univariate Gaussian kernel or Cauchy kernel with parameters θ = (η, τ ) where η and τ are location and variance parameter and K are either standard univariate Gaussian kernel or Cauchy kernel respectively. q k0 P Then, a simple calculation shows that G0 = p0i δ(θ0 ,τ 0 ) where τ 0i = (τi0 )2 + σ02 for any 1 ≤ i ≤ i i=1 i k0 and σ0 > 0. As being argued in Section 3.2, G0 may have infinite number of components in general; however, for the sake of simplicity, we assume that there exists G0 having finite number of components, which is also unique according to the argument in Section 3.2. Under the assumptions of Theorem 3.2 when σ1 = 0, we eventually achieve that s   2 M Ψ(G0 , σ0 ) −1/2 W1 (Gn , G0 ) = Op n [C]4 where C := h∗ (pG,f0 , pG0 ,f0 ) inf and M is some positive constant. The above result implies that W1 (G, G0 ) the estimator Gn from WS Algorithm will not converge to the true mixing measure G0 for any fixed bandwith σ0 . It demonstrates that Algorithm 1 is more appealing than WS Algorithm under the wellspecified kernel setting with fixed bandwidth σ0 > 0. For the setting when the bandwidth σ0 is allowed to vanish to 0, our result indicates that the convergence rate of Gn to G0 will depend not only on the vanishing rate of the term Ψ(G0 , σ0 ) to 0 but also on the convergence rate of G0 to G0 . Intuitively, to ensure that the convergence of Gn to G0 is n−1/2 , we also need to achieve that of G0 to G0 to be n−1/2 . Under the specific case that f0 and K are univariate Gaussian kernels, the convergence rate of G0 to G0 G∈Ok 0 13 is n−1/2 only when σ0 goes to 0 at the same rate n−1/2 . However, it will lead to a strong convergence of Ψ(G0 , σ0 ) to ∞, which makes the convergence rate of Gn → G0 become much slower than n−1/2 . Therefore, it is possible that the convergence rate of WS estimator Gn to G0 may be much slower than n−1/2 regardless of the choice of bandwidth σ0 . As a consequence, our estimator in Algorithm 1 may also be more efficient than WS estimator under that regime of vanishing bandwidth σ0 . bn is also Under the misspecified kernel setting, we would like to emphasize that our estimator G more flexible than WS estimator Gn as we provide more freedom with the choice of bandwidth σ1 in Algorithm 1, instead of specifically fixing σ1 = 0 as that in WS Algorithm. If there exists σ1 > 0 such bn will converge to G0 while WS estimator Gn will that {f ∗ Kσ1 } = {f0 ∗ Kσ0 }, then our estimator G converge to G0 that can be very different from G0 . Therefore, the performance of our estimator is also better than that of WS estimator under that specific misspecified kernel setting. 4 Different approach with minimum Hellinger distance estimator Thus far, we have developed a robust estimator of mixing measure G0 based on the idea of minimum Hellinger distance estimator and model selection criteria. That estimator is shown to attain various desirable properties, including the consistency of number of components m b n and the optimal convergence b rates of Gn . In this section, we take a rather different approach of constructing such robust estimator. In fact, we have the following algorithm: Algorithm 2: bn,m = arg min h(pG,f ∗ Kσ , Pn ∗ Kσ ) for any n, m ≥ 1. • Step 1: Determine G 1 0 G∈Om • Step 2: Choose   m e n = inf m ≥ 1 : h(pGbn,m ,f ∗ Kσ1 , Pn ∗ Kσ0 ) < ǫ , where ǫ > 0 is any given positive constant and σ1 , σ0 are two chosen bandwidths. en = G bn,m • Step 3: Let G e n for each n. Unlike Step 2 in Algorithm 1 where we consider the difference between h(pGbn,m ,f ∗Kσ1 , Pn ∗Kσ0 ) and h(pGbn,m+1 ,f ∗ Kσ1 , Pn ∗ Kσ0 ), here we consider solely the evaluation of h(pGbn,m ,f ∗ Kσ1 , Pn ∗ Kσ0 ) in Algorithm 2. The above robust estimator of mixing measure is based on the idea of minimum Hellinger distance estimator and superefficiency phenomenon. A related approach considered in the well-specified setting was taken by Heinrich and Kahn [2015]. Their construction was based on minimizing supremum norm based distance, without using the convolution kernels Kσ1 and Kσ0 ; moreover, the threshold ǫ was set to vanish as n → ∞. Although of theoretical interest, their estimator appears difficult to compute efficiently and may be unstable due to the use of the supremum norm. Our focus with Algorithm 2 in this section will be mainly about its attractive theoretical performance. As we observe from Algorithm 2, the values of f, f0 , K, and G0 along with the bandwidths en to G0 for any given ǫ > 0. Similar σ1 , σ0 play crucial roles in determining the convergence rate of G to the argument of Theorem 3.1 and Theorem 3.2, one of the key ingredients to fulfill that goal is to find the conditions of these factors such that we obtain the consistency of m e n . The following theorem yields the sufficient and necessary conditions to address the consistency question. Theorem 4.1. Given σ1 ≥ 0 and σ0 > 0. Then, we have 14 (i) Under the well-specified kernel setting and the case that σ1 = σ0 , m e n → k0 almost surely if and only if ǫ < h(pG0,k0 −1 ,f0 ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) (2) where G0,k0 −1 = arg min h(pG,f0 ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ). G∈Ek0 −1 (ii) Under the misspecified kernel setting, if k∗ < ∞, then m e n → k∗ almost surely if and only if h(pG∗ ,f ∗ Kσ1 , pG0 ,f0 ∗ Kσ0 ) ≤ ǫ < h(pG∗,k∗ −1 ,f ∗ Kσ1 , pG0 ,f0 ∗ Kσ0 ) (3) where G∗,k∗ −1 = arg min h(pG,f ∗ Kσ1 , pG0 ,f0 ∗ Kσ0 ) and G∗ ∈ M with exactly k∗ compoG∈Ek∗ −1 nents. If we allow ǫ → 0 in Algorithm 2, we achieve the inconsistency of m e n under the misspecified kernel setting when k∗ < ∞. Hence, the choice of threshold ǫ from Heinrich and Kahn [2015] is not optimal regarding the misspecified kernel setting. Unfortunately, conditions (2) and (3) are rather cryptic as in general, it is hard to determine the exact formulation of G0,k0 −1 , G∗,k∗ −1 , and G∗ . It would be of interest to find relatively simple sufficient conditions on f, f0 , K, G0 , σ1 , and σ0 according to which either (2) or (3) holds. Unfortunately, this seems to be a difficult task in the mis-specified setting. Under the well-specified kernel setting, a sufficient condition for (2) can be reformulated as a condition regarding the lower bound on the smallest mass of G0 , the minimal distance between its point masses, and the lower bound between the Hellinger distance and Wasserstein distance: Proposition 4.1. (Well-speficied kernel setting) For any given σ0 > 0, assume that f0 ∗ Kσ0 admits uniform Lipschitz property up to the first oder and is identifiable. If we have inf G∈Ek0 −1 h(pG,f0 ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) min p0i min kθi0 − θj0 k ≥ ǫ, 1≤i≤k0 1≤i6=j≤k0 W1 (G, G0 ) then we obtain the inequality in (2). 5 Non-standard settings In this section, we briefly demonstrate that our robust estimator in Algorithm 1 (similarly Algorithm 2) also achieves desirable convergence rates under non-standard settings. In particular, in the first setting, either f0 or f may not be identifiable in the first order. In the second setting, the true mixing measure e0 under W1 distance. G0 changes with the sample size n and converges to some discrete distribution G 5.1 Singular Fisher information matrix The results in the previous sections are under the assumption that both the true kernel f0 and the chosen kernel f are identifiable in the first order. This is equivalent to the non-singularity of the Fisher information matrix of pG0 ,f0 and pG∗ ,f when G∗ ∈ M, i.e., both I(G0 , f0 ) and I(G∗ , f ) are non-singular. bn . Unfortunately, these assumptions Therefore, we achieve the cherished convergence rate n−1/2 of G do not always hold. For instance, both the Gamma and skewnormal kernel are not identifiable in the first order [Ho and Nguyen, 2016a,b]. According to Azzalini and Valle [1996], Wiper et al. [2001], these kernels are particularly useful for modelling various kinds of data: the Gamma kernel is used for modeling non-negative valued data and the skewnormal kernel is used for modeling asymmetric data. 15 Therefore, it is worth considering the performance of our estimator in Algorithm 1 under the nonidentifiability in the first order of both kernels f0 and f . Throughout this section, for the simplicity of the argument we consider only the well-specified kernel setting and the setting that f0 may not be identifiable in the first order. Additionally, we also choose σ1 = σ0 > 0. The argument for the misspecified kernel setting, the non-identifiability in the first order setting of either f or f0 , and the general choices of σ1 , σ0 can be argued in the similar fashion. The non-identifiability in the first order of f0 implies that the Fisher information matrix I(G0 , f0 ) of bn to G0 will be much pG0 ,f0 is singular at particular values of G0 . Therefore, the convergence rate of G −1/2 slower than the standard convergence rate n . In order to precisely determine the convergence rates of parameter estimation under the singular Fisher information matrix setting, Ho and Nguyen [2016b] introduced a notion of singularity level of the mixing measure G0 relative to the mixture model class; alternatively we say the singularity level of Fisher information matrix I(G0 , f0 ) (cf. Definition 3.1 and Definition 3.3). Here, we briefly summarize the high level idea of singularity level according to the notations in our paper for the convenience of readers. In particular, we say that I(G0 , f0 ) admits r-th level of singularity relative to the ambient space Ok0 for 0 ≤ r < ∞ if we have: inf V (pG,f0 , pG0 ,f0 )/Wss (G, G0 ) = 0, G∈Ok0 r+1 V (pG,f0 , pG0 ,f0 ) & Wr+1 (G, G0 ), s = 1, . . . , r. for all G ∈ Ok0 . (4) The infinite singularity level of the Fisher information matrix I(G0 , f0 ) implies that inequality (4) will not hold for any r ≥ 0. (Actually, these are consequences, not the original definition of singularity level in Ho and Nguyen [2016b], but this is sufficient for our purpose.) When f0 is identifiable in the first order, I(G0 , f0 ) will only have singularity level zero for all G0 ∈ Ek0 , i.e., r = 0 in (4). However, the singularity levels of the Fisher information matrix I(G0 , f0 ) are generally not uniform over G0 when I(G0 , f0 ) is singular. For example, when f0 is skewnormal kernel, I(G0 , f0 ) will admit any level of singularity, ranging from 0 to ∞ depending on the interaction of atoms and masses of G0 [Ho and Nguyen, 2016b]. The notion of singularity level allows us to establish precisely the convergence rate of any estimator of G0 . In fact, if r < ∞ is the singularity level of I(G0 , f0 ), for any estimation method that yields the convergence rate n−1/2 for pG0 ,f0 under the Hellinger distance, the induced best possible rate of convergence for the mixing measure G0 is n−1/2(r+1) under Wr+1 distance. If r = ∞ is the singularity level of I(G0 , f0 ), all the estimation methods will yield a non-polynomial convergence rate of G0 , one that is slower than n−1/2s for any s ≥ 1. Now, by using the same line of argument as that of Theorem 3.1 we have the following result bn to G0 when the Fisher information matrix I(G0 , f0 ) has r-th regarding the convergence rate of G singularity level for some r < ∞. Proposition 5.1. Given the well-specified kernel setting, i.e., {f } = {f0 }, and the choice that σ1 = σ0 > 0. Assume that the Fisher information I(G0 , f0 ) has r-th singularity level where r < ∞ and condition (P.2) in Theorem 3.1 holds, i.e., Ψ(G0 , σ0 ) < ∞. Furthermore, the kernel K is chosen such that the Fisher information matrix I(G0 , f0 ∗ Kσ0 ) has r-th singularity level and f0 ∗ Kσ0 admits a uniform Lipschitz property up to the r-th order. Then, we have  s Ψ(G0 , σ0 ) −1/2(r+1) bn , G0 ) = Op n Wr+1 (G Cr2 (σ0 ) where Cr (σ0 ) = inf G∈Ok0 h(pG,f0 ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) . r+1 Wr+1 (G, G0 ) 16 Remarks: (i) A mild condition such that I(G0 , f0 ) and I(G0 , f0 ∗ Kσ ) have the same singularity level is b b K(t) 6= 0 for all t ∈ Rd where K(t) denotes the Fourier transformation of K (cf. Lemma .3 in Appendix B). (ii) Examples of f0 that are not identifiable in the first order and satisfy Ψ(G0 , σ) < ∞ are skewnormal and exponential kernel while K is chosen to be Gaussian or exponential kernel respectively. (iii) The result of Proposition 5.1 implies that under suitable choices of kernel K, our estimator in Algorithm 1 still achieves the best possible convergence rate for estimating G0 even when the Fisher information matrix I(G0 , f0 ) is singular. 5.2 Varying true parameters So far, our analysis has relied upon the assumption that G0 is fixed as n → ∞. However, there are situations such as in an asymptotic minimax analysis the true mixing measure G0 is allowed to vary e0 under W1 distance as n → ∞. In this section, we will with n and converge to some distribution G demonstrate that our estimator in Algorithm 1 still achieves the optimal convergence rate under that setting of G0 . e0 by e Denote the number of components of G k0 . For the clarity of our argument we only work with the well-specified kernel setting and with the setting that f0 is identifiable in the first order. As we have seen from the analysis of Section 3.1, when G0 does not change with n, the key steps used to establish bn to G0 are through the combination of the convergence of the standard convergence rate n−1/2 of G m b n to k0 almost surely and, under the first order identifiability of f0 ∗ Kσ0 , the lower bound h(pG,f0 ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) & W1 (G, G0 ) (5) holds for any G ∈ Ok0 . Unfortunately, these two results no longer hold as G0 varies with n. The varying G0 is now denoted by Gn0 , the true mixing distribution when the sample size is n. Let k0n be the number of components of Gn0 . Assume moreover that lim sup k0n = k < ∞. We start with the n→∞ following result regarding the convergence rate of m b n under that setting of Gn0 : Proposition 5.2. Given σ0 > 0, m b n obtained by Algorithm 1. If f0 ∗ Kσ0 is identifiable, then |m bn − n k0 | → 0 almost surely as n → ∞. According to the above proposition, m b n will not converge to e k0 almost surely when k > e k0 . Additionally, from that proposition, inequality (5) no longer holds since both the number of components bn and Gn vary. To account for that problem, we need to impose a much stronger condition on the of G 0 identifiability of f0 ∗ Kσ0 . Throughout the rest of this section, we assume that d = d1 = 1, i.e., we specifically work with the univariate setting of f0 , and k > ke0 . Using a bound of Heinrich and Kahn [2015], we obtain the following: k0 )Proposition 5.3. Given σ0 > 0. Let K be chosen such that f0 ∗Kσ0 is identifiable up to the (2k −2e e order and admits a uniform Lipschitz condition up to (2k − 2k0 )-order. Then, there exist ǫ0 > 0 and N (ǫ0 ) ∈ N such that e h(pG,f0 ∗ Kσ0 , pGn0 ,f0 ∗ Kσ0 ) ≥ Cv (σ)W12k−2k0 +1 (G, Gn0 ) (6) e0 ) ≤ ǫ0 . Here, Cv (σ) is some positive for any n ≥ N (ǫ0 ) and for any G ∈ Ok0n such that W1 (G, G e0 and σ. constant depending only on G 17 Similar to the argument of Lemma 3.1, a simple example of K and f0 for the assumptions of b Proposition 5.3 to hold is K(t) 6= 0 for all t ∈ Rd and f0 is identifiable up to the (2k − 2e k0 )-order. Now, a combination of Proposition 5.2 and Proposition 5.3 yields the following result regarding the bn to Gn . convergence rate of G 0 Corollary 5.1. Given the assumptions in Proposition 5.3. Assume that Ψ(Gn0 , σ0 ) < ∞ for all n ≥ 1. Then, we have  s n, σ ) Ψ(G e 0 −1/(4k−4 k +2) n 0 0 bn , G0 ) = Op n W1 (G Cv2 (σ0 ) where Cv (σ0 ) is the constant in inequality (6). Remark: (i) If f0 and K are univariate Gaussian kernels or Cauchy kernel respectively, then Ψ(Gn0 , σ0 ) → e0 , σ0 ) as n → ∞. Ψ(G e0 ) = O(n−1/(4k−4k0 +2)+κ ) for some κ > 0, then the convergence rate n−1/(4k−4k0 +2) (ii) If W1 (Gn0 , G bn to Gn is sharp in the sense of minimax (cf. Theorem 3.2 in [Heinrich and Kahn, 2015]). of G 0 Therefore, our estimator in Algorithm 1 also achieves the minimax rate of convergence for estimating Gn0 . However, our estimator from Algorithm 1 may be more appealing than that from Heinrich and Kahn [2015] for computational reasons. We will illustrate the result of Corollary 5.1 via careful simulation studies in Section 6. 6 Empirical studies We present in this section numerous numerical studies to validate our theoretical results in the previous bn,m = arg min h(pG,f ∗ Kσ , Pn ∗ Kσ ), we utilize the HMIX sections. To find the mixing measure G 1 0 G∈Om algorithm developed in Section 4.1 of [Cutler and Cordero-Brana, 1996]. This algorithm is essentially similar to the EM algorithm and ultimately gives us local solutions to the previous minimization problem. 6.1 Synthetic Data We start with testing Algorithm 1 using synthetic data. The discussion is divided into separate enquiries of the well- and mis-specified kernel setups. Well-specified kernel setting Under this setting, we assess the performance of our estimator in Algorithm 1 under two cases of G0 : Case 1: G0 is fixed with the sample size. Under this case, we consider three choices of f0 : Gaussian and Cauchy kernel for satisfying first order identifiability condition, and skewnormal kernel for failing the first order identifiability condition. • Case 1.1 - Gaussian family: f0 (x|η, τ ) = G0 =   (x − η)2 1 √ exp − 2τ 2 2πτ 1 √ 1 1 √ √ δ + δ + δ . 2 (0, 10) 4 (−0.3, 0.05) 4 (0.3, 0.05) 18 • Case 1.2 - Cauchy family: f0 (x|η, τ ) = G0 = • Case 1.3 - Skewnormal family: f0 (x|η, τ, m) = G0 = 1 πτ (1 + (x − η)2 /τ 2 ) 1 √ 1 1 δ(0, 10) + δ(−0.3,√0.05) + δ(0.3,√0.05) . 2 4 4   2 (x − η)2 √ Φ (m(x − η)/τ ) exp − 2τ 2 2πτ 1 √ 1 1 δ(0, 10,0) + δ(−0.3,√0.05,0) + δ(0.3,√0.05,0) . 2 4 4 where Φ is the cumulative function of standard normal distribution. For the Gaussian case and skewnormal case of f0 , we choose K to be the standard Gaussian kernel while K is chosen to be the standard Cauchy kernel for the Cauchy case of f0 . Note that, regarding skewnormal case it was shown that the Fisher information matrix I(G0 , f0 ) has second level singularity (cf. Theorem 5.3 in [Ho and Nguyen, 2016b]); therefore, from the result of Proposition 5.1, the bn to G0 will be at most n−1/6 . Now for the bandwidths, we choose σ1 = σ0 = 1. convergence rate of G The sample sizes will be n = 200 ∗ i where 1 ≤√i ≤ 20. √ The tuning parameter Cn is chosen according to √ BIC criterion. More specifically, Cn = 3 log n/ 2 for Gaussian and Cauchy family while Cn = 2 log n for skewnormal family. For each sample size n, we perform Algorithm 1 exactly 100 times and then choose m b n to be the estimated number of components with the highest probability of appearing. Afterwards, we take the average among all the replications with the estimated number of bn , G0 ). See Figure 1 where the Wasserstein distances W1 (G bn , G0 ) components m b n to obtain W1 (G and the percentage of time m b n = 3 are plotted against increasing sample size n along with the error bars. The simulation results regarding Gaussian and Cauchy family match well with the standard n−1/2 convergence rate from Theorem 3.1 while the simulation results regarding skewnormal family also fit with the best possible convergence rate n−1/6 as we argued earlier. 3 W1 20*n−1/2 2.5 4 5 W1 25*n−1/2 1 W3 6.35*n−1/6 4 3 0.95 0.9 0.85 2 3 1.5 0.8 2 0.75 2 0.7 1 0.65 1 1 0.5 Gaussian Cauchy Skewnormal 0.6 0.55 0 0 1000 2000 3000 n=sample size 4000 0 0 1000 2000 3000 n=sample size 0 0 4000 1000 2000 3000 n=sample size 4000 0.5 0 500 1000 1500 2000 2500 3000 3500 4000 n=sample size Figure 1: Performance of Gbn in Algorithm 1 under the well-specified kernel setting and fixed G0 . Left to right: (1) b n , G0 ) under Gaussian case. (2) W1 (G b n , G0 ) under Cauchy case. (3) W1 (G b n , G0 ) under Skewnormal case. (4) W 1 (G Percentage of time m b n = 3 obtained from 100 runs. Case 2: G0 is varied with the sample size. Under this case, we consider two choices of f0 : Gaussian and Cauchy kernel with only location parameter. 19 • Case 2.1 - Gaussian family: f0 (x|η) = G0 =   1 (x − η)2 √ exp − 2 2π 1 1 1 δ1−1/n + δ1+1/n + δ2 , 4 4 2 where n is the sample size. • Case 2.2 - Cauchy family: 1 π(1 + (x − η)2 ) 1 1 1 √ + δ √ + δ √ . δ 4 1−1/ n 4 1+1/ n 2 1+2/ n f0 (x|η) = G0 = e0 = 1 δ1 + 1 δ2 for the Gaussian case and G e0 = δ1 for the With these settings, we can verify that G 2 2 e0 ) ≍ 1/n for the Gaussian case and W1 (G0 , G e0 ) ≍ 1/√n for Cauchy case. Additionally, W1 (G0 , G bn , G0 ) is the Cauchy case. According to the result of Corollary 5.1, the convergence rate of W1 (G −1/6 −1/10 n for the Gaussian case and is n for the Cauchy case, which are also minimax according to e0 ). The procedure for choosing K, σ1 , σ0 , n, and m the values of W1 (G0 , G b n is similar to that of Case b bn = 3 1. See Figure 2 where the Wasserstein distances W1 (Gn , G0 ) and the percentage of time m are plotted against increasing sample size n along with the error bars. The simulation results for both Gaussian and Cauchy family agree with the convergence rates n−1/6 and n−1/10 respectively. 5 W1 5.95*n−1/6 4 5 1 W1 5.8*n−1/10 4 0.9 0.8 3 3 2 2 1 1 0 0 0 0 0.7 0.6 1000 2000 3000 n=sample size 4000 Gaussian Cauchy 0.5 1000 2000 3000 n=sample size 4000 0.4 0 500 1000 1500 2000 2500 3000 3500 4000 n=sample size Figure 2: Performance of Gbn in Algorithm 1 under the well-specified kernel setting and varied G0 . Left to right: (1) b n , G0 ) under Gaussian case. (2) W1 (G b n , G0 ) under Cauchy case. (3) Percentage of time m W 1 (G b n = 3 obtained from 100 runs. Misspecified kernel setting Under that setting, we assess the performance of Algorithm 1 under two cases of f, f0 , K, σ1 , σ0 , and G0 . Case 3: f0 is a finite mixture of f and σ1 = σ0 > 0. Under this case, we consider two choices of f : Gaussian and Cauchy kernel with both location and scale parameter. • Case 3.1 - Gaussian distribution: f is normal kernel, f0 (x|η, τ ) = G0 = 1 1 f (x − 2|η, τ ) + f (x + 2|η, τ ) 2 2 2 1 δ + δ . 3 (0,2) 3 (1,3) 20 • Case 3.2 - Cauchy distribution: f is Cauchy kernel, f0 (x|η, τ ) = G0 = 1 1 f (x − 2|η, τ ) + f (x + 2|η, τ ) 2 2 1 2 δ + δ . 3 (0,2) 3 (1,3) 1 1 1 1 With these settings of f, f0 , G0 , we can verify that G∗ = δ(−2,2) + δ(−1,3) + δ(2,2) + δ(3,3) for 6 3 6 3 any σ1 = σ0 > 0. The procedure for choosing K, σ0 , n, and m b n is similar to that of Case 1 in the wellbn , G∗ ) and the percentage specified kernel setting. Figure 3 illustrates the Wasserstein distances W1 (G of time m b n = 4 along with the increasing sample size n and the error bars. The simulation results under that simple misspecified seting of both families suit with the standard n−1/2 rate from Theorem 3.2. 4 W1 33*n−1/2 3 4 1 W1 42*n−1/2 0.9 3 0.8 2 2 1 1 0.7 0.6 Gaussian Cauchy 0.5 0 0 1000 2000 3000 n=sample size 4000 0 0 1000 2000 3000 n=sample size 4000 0.4 0 500 1000 1500 2000 2500 3000 3500 4000 n=sample size Figure 3: Performance of Gbn in Algorithm 1 under misspecified kernel setting and f0 is a finite mixture of f . Left to b n , G∗ ) under Gaussian case. (2) W1 (G b n , G∗ ) under Cauchy case. (3) Percentage of time m right: (1) W1 (G b n = 4 obtained from 100 runs. Case 4: σ1 , σ0 are chosen such that {f ∗ Kσ1 } = {f0 ∗ Kσ0 }. Under this case, we consider two choices of f and f0 : Gaussian and Cauchy kernel with only location parameter. • Case 4.1 - Gaussian distribution:     1 (x − η)2 (x − η)2 1 , f0 (x|η) = √ exp − f (x|η) = √ exp − 2 8 2π 2 2π 2 1 δ−1 + δ2 G0 = 3 3 • Case 4.2 - Cauchy distribution: f is Cauchy kernel, f (x|η) = G0 = 1 4 , f0 (x|η) = 2 π(1 + (x − η) ) 2π(4 + (x − η)2 ) 2 1 δ−1 + δ2 3 3 To ensure that {f ∗ Kσ1 } = {f0 ∗ Kσ0 }, we need to choose σ12 + 1 = σ02 + 4 for both the cases of Gaussian and Cauchy distribution when K is chosen to be the standard Gaussian and Cauchy kernel respectively. Therefore, with our simulation studies of Algorithm 1 in this case, we choose σ1 = 2 while σ0 = 1. Under these choices of bandwidths, we quickly have G∗ = G0 . Note that, since there 21 exists no value of σ0 > 0 such that σ02 + 4 = 1, it implies that the estimator from WS algorithm may not be able to estimate the true mixing measure G0 regardless the value of σ0 . Now, the procedure for choosing K, n, and m b n is similar to that of Case 1 in the well-specified kernel seting. Figure 4 bn , G0 ) and the percentage of time m illustrates the Wasserstein distances W1 (G b n = 2 along with the increasing sample size n and the error bars. The simulation results under that misspecified seting of both families fit with the standard n−1/2 rate from Theorem 3.2. 2 W1 −1/2 22*n 3 1 W1 −1/2 24*n 2.5 0.95 0.9 1.5 0.85 2 0.8 1 1.5 0.75 0.7 1 0.65 0.5 0.6 0.5 Gaussian Cauchy 0.55 0 0 1000 2000 3000 n=sample size 4000 0 0 1000 2000 3000 n=sample size 4000 0.5 0 500 1000 1500 2000 2500 3000 3500 4000 n=sample size Figure 4: Performance of Gbn in Algorithm 1 under misspecified kernel setting and {f ∗ Kσ1 } = {f0 ∗ Kσ0 }. Left to b n , G∗ ) under Gaussian case. (2) W1 (G b n , G∗ ) under Cauchy case. (3) Percentage of time m right: (1) W1 (G b n = 2 obtained from 100 runs. 6.2 Real Data We begin investigating the performance of Algorithm 1 on the well-known data set of the Sodiumlithium countertransport (SLC) data [Dudley et al., 1991, Roeder, 1994, Ishwaran et al., 2001]. This simple dataset includes red blood cell sodium-lithium countertransport (SLC) activity data collected from 190 individuals. As being argued by Roeder [1994], the SLC activity data were believed to be derived from either mixture of two normal distributions or mixture of three normal distributions. Therefore, we will fit this data by using mixture of normal distributions with unknown√mean and√variance. We choose the bandwidths σ1 = σ0 = 0.05 and the tuning parameter Cn = 3 log n/ 2 where n is the sample size. This follows BIC, which is the criterion appropriate for modelling parameter bn are reported in Table 1. estimation. The simulation result yields m b n = 2 while the values of G The SLC activity data was also considered in Woo and Sriram [2006] when the authors achieved mn = 2. In particular, they allowed the bandwidth σ0 in WS Algorithm to go to 0 and chose the tuning parameter Cn = 3/n, which is inspired by AIC criterion. They also obtained similar result of estimating the true number of components when utilizing the minimum Kulback-Leibler divergence estimator (MKE) from [James et al., 2001]. The values of parameter estimation from these two algorithms were presented in Table 7 in Woo and Sriram [2006] where we will use them for the comparison purpose with the results from Algorithm 1. Moreover, we also run the EM Algorithm to determine the parameter estimation when we assume the data come from mixture of two normal distributions. All the values of parameter estimation from these three algorithms are included in Table 1. Finally, Figure 5 represents the fits from parameter estimation of all the aforementioned algorithms to SLC data. Even though the weights from Algorithm 1 are not very close to those from WS Algorithm and EM Algorithm, the fit from Algorithm 1 is comparable to those from these algorithms, i.e., their fits look fairly similar. As a consequence, the results from Algorithm 1 with SLC data are in agreement with those from several state-of-the-art algorithms in the literature. 22 Algorithm 1 WS Algorithm MKE Algorithm EM Algorithm p1 0.264 0.305 0.246 p2 0.736 0.695 0.754 η1 0.368 0.352 0.378 η2 0.231 0.222 0.225 τ1 0.118 0.106 0.102 τ2 0.065 0.060 0.060 0.328 0.672 0.363 0.227 0.115 0.058 Table 1: Summary of parameter estimates in SLC activity data from mixture of two normal distributions with Algorithm 1, WS Algorithm, MKE Algorithm, and EM Algorithm. Here, pi , ηi , τi represents the weights, means, and variance respectively. 6 25 5 20 4 density 30 15 3 10 2 5 1 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0 0 0.7 slc activity Algo 1 WS MKE EM 0.2 0.4 0.6 slc activity 0.8 1 Figure 5: From left to right: (1) Histogram of SLC activity data. (2) Density plot from mixture of two normals based on Algorithm 1, WS Algorithm, MKE Algorithm, and MLE. 7 Summaries and discussions In this paper, we propose flexible robust estimators of mixing measure in finite mixture models based on the idea of minimum Hellinger distance estimator, model selection criteria, and super-efficiency phenomenon. Our estimators are shown to exhibit the consistency of the number of components under both the well- and mis-specified kernel setting. Additionally, the best possible convergence rates of parameter estimation are derived under various settings of both kernel f and f0 . Another salient feature of our estimators is the flexible choice of bandwidths, which circumvents the subtle choices of bandwidth from proposed estimators in the literature. However, there are still many open questions relating to the performance or the extension of our robust estimators in the paper. We give several examples: • As being mentioned in the paper, our estimator in Algorithm 1 and WS estimator achieve the consistency of the number of components when the bandwidth σ0 goes to 0 sufficiently slow. Can we determine the setting of bandwidth such that the convergence rates of parameter estimation from these estimators are optimal, at least under the well-specified kernel setting? • Our analysis is based on the assumption that the parameters of G0 belong to the compact set Θ. When G0 is finitely supported, this is always the case, but the set is unknown in advance and, in practice, we often do not know the range of the true parameters. Therefore, it would be interesting to see whether our estimators in Algorithm 1 and Algorithm 2 still achieve both the consistency of the number of components and best possible convergence rates of parameter estimation when Θ = Rd1 . • Bayesian robust inference of mixing measure in finite mixture models has been of interest recently, see for example [Miller and Dunson, 2015]. Whether the idea of minimum Hellinger 23 distance estimator can be adapted to that setting is also an interesting direction to consider in the future. 8 Proofs of key results In this section, we provide the proofs of Theorem 3.1 and Theorem 3.2 in Section 3. The remaining proofs are given in the Appendices. PROOF OF THEOREM 3.1 We divide the main argument into three key steps: Step 1: m b n → k0 almost surely. The proof of this step follows the argument from [Leroux, 1992]. In fact, for any positive integer m we denote G0,m = arg min h(pG,f0 ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ). G∈Om Now, as n → ∞ we have almost surely that h(pGbn,m ,f0 ∗ Kσ0 , Pn ∗ Kσ0 ) − h(pGbn,m+1 ,f0 ∗ Kσ0 , Pn ∗ Kσ0 ) → dm , where dm = h(pG0,m ,f0 ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) − h(pG0,m+1 ,f0 ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) and the limit is due to the fact that h(Pn ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) → 0 almost surely for all σ0 > 0. From the formulation of Step 2 in Algorithm 1 and the fact that Cn n−1/2 → 0 as n → ∞, we obtain h(pGb n,m b n ,f0 ∗ Kσ0 , Pn ∗ Kσ0 ) − h(pGb n,m b n +1 ,f0 ∗ Kσ0 , Pn ∗ Kσ0 ) ≤ Cn n−1/2 → 0. Therefore, to demonstrate that m b n → k0 almost surely, it is sufficient to prove that dm = 0 as m ≥ k0 and dm > 0 as m < k0 . In fact, as m ≥ k0 , we have inf h(pG,f0 ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) = 0. G∈Om Therefore, dm = 0 as m ≥ k0 . When m < k0 , we assume that dm = 0, i.e., h(pG0,m ,f0 ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) = h(pG0,m+1 ,f0 ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ). It implies that h(pG0,m ,f0 ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) ≤ h(pG,f0 ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) ∀ G ∈ Om+1 . For any ǫ > 0, we choose G = (1 − ǫ)G0,m + ǫδθ where θ ∈ Θ is some component. The inequality in the above display implies that Z (pG0 ,f0 ∗ Kσ0 (x))1/2  1/2 (1 − ǫ)pG0,m ,f0 ∗ Kσ0 (x) + ǫf0 ∗ Kσ0 (x|θ)  1/2 −(pG0,m ,f0 ∗ Kσ0 (x)) dx ≤ 0. As ǫ → 0, the above inequality divided by ǫ becomes Z (pG0 ,f0 ∗ Kσ0 (x))1/2 (pG0,m ,f0 ∗ Kσ0 (x))1/2 dx ≥ Z (pG0 ,f0 ∗ Kσ0 (x))1/2 f0 ∗ Kσ0 (x|θ)(pG0,m ,f0 ∗ Kσ0 (x))−1/2 dx. 24 Now, by choosing θ = θi0 for all 1 ≤ i ≤ k0 , as we sum up the right hand side of the above inequality, we obtain Z (pG0 ,f0 ∗ Kσ0 (x))1/2 (pG0,m ,f0 ∗ Kσ0 (x))1/2 dx ≥ ≥ Z Z (pG0 ,f0 ∗ Kσ0 (x))1/2 X k0 i=1  p0i f0 ∗ Kσ0 (x|θi0 ) (pG0,m ,f0 ∗ Kσ0 (x))−1/2 (pG0 ,f0 ∗ Kσ0 (x))3/2 (pG0,m ,f0 ∗ Kσ0 (x))−1/2 dx ≥ 1 R 3/2 −1/2 where the final inequality is due to the inequality q1 (x)q2 (x)dx ≥ 1 for any two density functions q1 (x) and q2 (x). Therefore, we have h(pG0,m ,f0 ∗Kσ0 , pG0 ,f0 ∗Kσ0 ) = 0. Due to the identifiability assumption of f0 ∗ Kσ0 , the previous equation implies that G0,m ≡ G0 , which is a contradiction as m < k0 . Thus, we have dm > 0 for any m < k0 . We achieve the conclusion that m b n → k0 almost surely. Step 2: h(Pn ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) = Op to the first order, we have r  Ψ(G0 , σ0 ) . Indeed, by means of Taylor expansion up n h2 (Pn ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) s  Z  Pn ∗ Kσ0 (x) − pG0 ,f0 ∗ Kσ0 (x) 2 pG0 ,f0 ∗ Kσ0 (x)dx = 1− 1+ pG0 ,f0 ∗ Kσ0 (x) Z (Pn ∗ Kσ0 (x) − pG0 ,f0 ∗ Kσ0 (x))2 1 ≃ dx. 4 pG0 ,f0 ∗ Kσ0 (x) Notice that,  Z (Pn ∗ Kσ0 (x) − pG0 ,f0 ∗ Kσ0 (x))2 Var(Pn ∗ Kσ0 (x)) dx = dx, E pG0 ,f0 ∗ Kσ0 (x) pG0 ,f0 ∗ Kσ0 (x)   Z Var(Pn ∗ Kσ0 (x)) Ψ(G0 , σ0 ) From assumption (P.2), we obtain dx = O . It follows that pG0 ,f0 ∗ Kσ0 (x) n Z    (Pn ∗ Kσ0 (x) − pG0 ,f0 ∗ Kσ0 (x))2 Ψ(G0 , σ0 ) dx = O . E pG0 ,f0 ∗ Kσ0 (x) n  r Ψ(G0 , σ0 ) Therefore, we achieve h(Pn ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) = Op . It implies that for any ǫ > 0, n we can find Mǫ > 0 and the index N1 (ǫ) ≥ 1 such that r   Ψ(G0 , σ0 ) P h(Pn ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) > Mǫ < ǫ/2 (7) n Z for all n ≥ N1 (ǫ). 25 Step 3: Now, denote the event A = {m b n → k0 as n → ∞}. Under this event, for each ω ∈ A, we bn ∈ Ok as n ≥ N (ω). can find N (ω) such that as n ≥ N (ω), we have m b n = k0 . It suggests that G 0 Define Am = {ω ∈ A : ∀ n ≥ m we have m b n = k0 }. From this definition, we obtain A1 ⊂ A2 . . . ⊂ ∞ S Am ⊂ . . . and Am = A. Therefore, lim P (Am ) = P (A) = 1. Therefore, for any ǫ > 0 we can m=1 m→∞ find the corresponding index N2 (ǫ) such that P (AN2 (ǫ) ) > 1 − ǫ/2. Now, for any ω ∈ AN2 (ǫ) , we have m b n = k0 as n ≥ N2 (ǫ). From assumptions (P.1) and the definition of C1 (σ0 ) in Theorem 3.1, we obtain bn , G0 ) ≤ h(p b C1 (σ)W1 (G Gn ,f0 ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) ≤ h(pGbn ,f0 ∗ Kσ0 , Pn ∗ Kσ0 ) + h(Pn ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) ≤ 2h(Pn ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ). (8) Using the inequalities from (7) and (8), we have s s      Ψ(G , σ ) Ψ(G0 , σ0 ) 0 0 b b =P W1 (Gn , G0 ) > 2Mǫ 1AcN2 (ǫ2 ) P W1 (Gn , G0 ) > 2Mǫ C12 (σ0 )n C12 (σ0 )n s    Ψ(G0 , σ0 ) b +P W1 (Gn , G0 ) > 2Mǫ 1AN2 (ǫ) C12 (σ0 )n s    bn , G0 ) > 2Mǫ Ψ(G0 , σ0 ) 1A <ǫ ≤ ǫ/2 + P W1 (G N2 (ǫ) C12 (σ0 )n for all n ≥ max {N1 (ǫ), N2 (ǫ)}. We achieve the conclusion of the theorem. PROOF OF THEOREM 3.2 We divide our argument in the proof of this theorem into two key steps. Step 1 m b n → k∗ almost surely. Indeed, by carrying out the same argument as that of Step 1 in the proof of Theorem 3.1 (here, we replace f0 by f and G0,m by G∗,m , as m < k∗ ), we eventually obtain the following inequality Z (pG0 ,f0 ∗ Kσ0 (x))1/2 (pG∗,m ,f ∗ Kσ1 (x))1/2 dx ≥ Z (pG0 ,f0 ∗ Kσ0 (x))1/2 f ∗ Kσ1 (x|θ)(pG∗,m ,f ∗ Kσ1 (x))−1/2 dx. for any θ ∈ Θ. By choosing θ ∈ supp(G∗ ), which is the set of all support points of G∗ , and sum over all of these components, we achieve Z (pG0 ,f0 ∗ Kσ0 (x))1/2 (pG∗,m ,f ∗ Kσ1 (x))1/2 dx ≥ Z (pG0 ,f0 ∗ Kσ0 (x))1/2 pG∗ ,f ∗ Kσ1 (x)(pG∗,m ,f ∗ Kσ1 (x))−1/2 dx. 26 From the above inequality, we have 2 s Z q q pG0 ,f0 ∗ Kσ0 (x) dx pG∗,m ,f ∗ Kσ1 (x) − pG∗ ,f ∗ Kσ1 (x) pG∗,m ,f ∗ Kσ1 (x) Z q q ≤2 pG0 ,f0 ∗ Kσ0 (x) pG∗,m ,f ∗ Kσ1 (x)dx  Z q q − pG0 ,f0 ∗ Kσ0 (x) pG∗ ,f ∗ Kσ1 (x)dx ≤ 0, where the second inequality is due to the fact that G∗ minimizes h(pG,f ∗ Kσ1 , pG0 ,f0 ∗ Kσ0 ) among all G ∈ G. The above inequality implies that pG∗,m ,f ∗ Kσ1 (x) = pG∗ ,f ∗ Kσ1 (x) for almost surely x ∈ X . Due to the identifiability of f ∗ Kσ1 , we obtain G∗,m ≡ G∗ , which is a contradiction to the fact that m < k∗ . Therefore, we achieve m b n → k∗ almost surely. Step 2 Now, since m b n → k∗ almost surely, using the same argument as Step 3 in the proof of Theorem 3.1, we can find N (ǫ) such that m b n = k∗ for any n ≥ N (ǫ) and such that P (AN (ǫ) ) > 1−ǫ/2 b bn,m for any ǫ > 0. Additionally, since Gn = G b n minimizes h(pG,f ∗ Kσ1 , Pn ∗ Kσ0 ) among all , it follows that G ∈ Om bn Z q Z q p p pGbn ,f ∗ Kσ1 (x) Pn ∗ Kσ0 (x)dx ≥ pG∗ ,f ∗ Kσ1 (x) Pn ∗ Kσ0 (x)dx. when n ≥ N (ǫ). From this inequality, we obtain   Z q q q p pGbn ,f ∗ Kσ1 (x) − pG∗ ,f ∗ Kσ1 (x) Pn ∗ Kσ0 (x) − pG0 ,f0 ∗ Kσ0 (x) dx ≥ (9) Z Z q q q q pG0 ,f0 ∗ Kσ0 (x) pG∗ ,f ∗ Kσ1 (x)dx − pG0 ,f0 ∗ Kσ0 (x) pGbn ,f ∗ Kσ1 (x)dx := B. By means of the key inequality in Lemma 3.2, we have s Z q Z q q pG0 ,f0 ∗ Kσ0 (x) pGbn ,f ∗ Kσ1 (x) pG0 ,f0 ∗ Kσ0 (x) pGbn ,f ∗ Kσ1 (x)dx B ≥ dx − pG∗ ,f ∗ Kσ1 (x) 2  = 2 h∗ (pGbn ,f ∗ Kσ1 , pG∗ ,f ∗ Kσ1 ) − B. 2  It implies that B ≥ h∗ (pGbn ,f ∗ Kσ1 , pG∗ ,f ∗ Kσ1 ) . Plugging this inequality to (9) leads to C := ≥ Z q  ∗ pGbn ,f ∗ Kσ1 (x) − h (pGbn ,f ∗ Kσ1 , pG∗ ,f q pG∗ ,f ∗ Kσ1 (x) 2 ∗ Kσ1 ) .  p Pn ∗ Kσ0 (x) − q  pG0 ,f0 ∗ Kσ0 (x) dx (10) 27 For the left hand side (LHS) of (10), we have the following inequality Z  1/4 1/4 C ≤ (pGbn ,f ∗ Kσ1 ) − (pG∗ ,f ∗ Kσ1 ) (pGbn ,f ∗ Kσ1 (x))1/4 ∞  q p Pn ∗ Kσ0 (x) − pG0 ,f0 ∗ Kσ0 (x) dx +(pG∗ ,f ∗ Kσ1 (x))1/4 ≤ (pGbn ,f ∗ Kσ1 )1/4 − (pG∗ ,f ∗ Kσ1 )1/4 ∞ (pGbn ,f ∗ Kσ1 )1/4 + (pG∗ ,f ∗ Kσ1 )1/4 √ × 2h(Pn ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) 2 (11) where the last inequality is due to Holder’s inequality. Now, our next argument will be divided into two small key steps. Step 2.1 With assumption (M.3), we will show that D = (pG,f ∗ Kσ1 )1/4 − (pG∗ ,f ∗ Kσ1 )1/4 ∞ ≤ M3 (σ1 )W1 (G, G0 ) (12) for any G ∈ Ok∗ where M3 (σ1 ) is some positive constant. k k∗ P P In fact, denote G = pi δθi where k ≤ k∗ and G∗ = p∗i δθi∗ . Using the same proof argument i=1 i=1 as that of (27) in the proof of Proposition 4.1, there exists a positive number ǫ0 depending only G∗ such that as long as W1 (G, G∗ ) ≤ ǫ0 , G will have exactly k∗ components, i.e., k = k∗ . Additionally, up to the relabelling of the components of G, we also obtain that |pi − p∗i | ≤ c0 W1 (G, G∗ ) where c0 is some positive constant depending only on G∗ . Therefore, by choosing G such that W1 (G, G∗ ) ≤   p∗i , we achieve |pi − p∗i | ≤ min p∗i /2. Hence, pi ≥ min p∗i /2 for all C0 = min ǫ0 , min 1≤i≤k∗ 1≤i≤k∗ 1≤i≤k∗ 2c0 1 ≤ i ≤ k∗ . Under this setting of G, for any coupling q of p = (p1 , . . . , pk ) and p∗ = (p∗1 , . . . , p∗k∗ ), by means of triangle inequality we obtain pG,f ∗ Kσ1 − pG∗ ,f ∗ Kσ1   1/4 (pG,f ∗ Kσ1 ) + (pG∗ ,f ∗ Kσ1 )1/4 (pG,f ∗ Kσ1 )1/2 + (pG∗ ,f ∗ Kσ1 )1/2 X f ∗ Kσ1 (x|θi ) − f ∗ Kσ1 (x|θj∗ )  ≤ qij  (pG,f ∗ Kσ1 )1/4 + (pG∗ ,f ∗ Kσ1 )1/4 (pG,f ∗ Kσ1 )1/2 + (pG∗ ,f ∗ Kσ1 )1/2 i,j D = ∞ . ∞ where the ranges of i, j in the above sum satisfy 1 ≤ i, j ≤ k∗ . It is clear that for any α ∈ {1/2, 1/4} (pG,f ∗ Kσ1 (x))α + (pG∗ ,f ∗ Kσ1 (x))α   > min pαi , (p∗j )α (f ∗ Kσ1 (x|θi ))α + (f ∗ Kσ1 (x|θj∗ ))α  ∗ α  pi > min f ∗ Kσ1 (x|θi ))α + (f ∗ Kσ1 (x|θj∗ ))α . 1≤i≤k∗ 2 Therefore, we eventually achieve that D. X i,j qij (f ∗ Kσ1 (x|θi ))1/4 − (f ∗ Kσ1 (x|θj∗ ))1/4 . ∞ Now, due to assumption (M.3) and mean value theorem, we achieve for any x ∈ X that f ∗ Kσ1 (x|θi ))1/4 − (f ∗ Kσ1 (x|θj∗ ))1/4 ≤ M2 (σ1 )||θi − θj∗ ||. 28 Thus, for any coupling q of p and p∗ D. X i,j qij ||θi − θj∗ ||. As a consequence, we eventually have D. inf q∈Q(p,p∗ ) X i,j qij ||θi − θj∗ || = W1 (G, G∗ ) for any G ∈ Ok∗ such that W1 (G, G∗ ) ≤ C0 . Now, for any G ∈ Ok∗ such that W1 (G, G∗ ) > C0 , as D is bounded, it is clear that D . W1 (G, G∗ ). In sum, we achieve inequality (12). Step 2.2 Due to assumption (M.2), we also can quickly verify that (pGbn ,f ∗ Kσ1 )1/4 + (pG∗ ,f ∗ Kσ1 )1/4 2 p ≤ 2 k∗ M1 (σ1 ). (13) Combining (11), (12), (13), we ultimately achieve that  2 bn , G∗ )h(Pn ∗ Kσ , pG ,f ∗ Kσ ) h∗ (pGbn ,f ∗ Kσ1 , pG∗ ,f ∗ Kσ1 ) ≤ M (σ1 )W1 (G 0 0 0 0 where M (σ1 ) is some positive constant. Due to assumption (M.1), from the result of Lemma 3.4 and the definition of C∗,1 (σ1 ), we have bn , G∗ ). h∗ (pGbn ,f ∗ Kσ1 , pG∗ ,f ∗ Kσ1 ) & C∗,1 (σ1 )W1 (G r Ψ(G0 , σ0 ) Combining the above results with the bound h(Pn ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) = Op n Step 2 in the proof of Theorem 3.1, we quickly obtain the conclusion of the theorem.  from References A. Azzalini and A. D. Valle. The multivariate skew-normal distribution. Biometrika, 83:715–726, 1996. R. Beran. Minimum hellinger distance estimates for parametric models. Annals of Statistics, 5:445– 453, 1977. L. Bordes, S. Mottelet, and P. Vandekerkhove. Semiparametric estimation of a two-component mixture model. Annals of Statistics, 34:1204–1232, 2006. J. Chen. Optimal rate of convergence for finite mixture models. Annals of Statistics, 23(1):221–233, 1995. J. Chen and A. Khalili. Order selection in finite mixture models with a nonsmooth penalty. Journal of the American Statistical Association, 103:1674–1683, 2012. J. Chen, P. Li, and Y. Fu. Inference on the order of a normal mixture. Journal of the American Statistical Association, 107:1096–1105, 2012. 29 A. Cutler and O. I. Cordero-Brana. Minimum Hellinger distance estimation for finite mixture models. Journal of the American Statisticial Association, 91:1716–1723, 1996. D. Dacunha-Castelle and E. Gassiat. The estimation of the order of a mixture model. Bernoulli, 3: 279–299, 1997. D. Dacunha-Castelle and E. Gassiat. Testing the order of a model using locally conic parametrization: population mixtures and stationary ARMA processes. Annals of Statistics, 27:1178–1209, 1999. L. Devroye and Laszlo Gyorfi. Nonparametric density estimation: the L1 view. John Wiley and Sons, 1985. D. Donoho and R. C. Liu. The automatic robustness of minimum distance functionals. Annals of Statistics, 16:552–586, 1988. C. R. K. Dudley, L. A. Giuffra, A. E. G. Raine, and S. T. Reeders. Assessing the role of apnh, a gene encoding for a human amiloride- sensitive na+ /h+ antiporter, on the interindividual variation in red cell na+ /li+ countertransport. Journal of the American Society of Nephrology, 2:937–943, 1991. M. D. Escobar and M. West. Bayesian density estimation and inference using mixtures. Journal of the American Statistical Association, 90:577–588, 1995. P. Heinrich and J. Kahn. Optimal rates for finite mixture estimation. arXiv:1507.04313, 2015. N. Ho and X. Nguyen. Convergence rates of parameter estimation for some weakly identifiable finite mixtures. Annals of Statistics, 44:2726–2755, 2016a. N. Ho and X. Nguyen. Singularity structures and impacts on parameter estimation in finite mixtures of distributions. arXiv:1609.02655, 2016b. N. Ho and X. Nguyen. On strong identifiability and convergence rates of parameter estimation in finite mixtures. Electronic Journal of Statistics, 10:271–307, 2016c. D. R. Hunter, S. Wang, and T. P. Hettmansperger. Inference for mixtures of symmetric distributions. Annals of Statistics, 35:224–251, 2007. H. Ishwaran, L. F. James, and J. Sun. Bayesian model selection in finite mixtures by marginal density decompositions. Journal of the American Statistical Association, 96:1316–1332, 2001. L. F. James, C. E. Priebe, and D. J. Marchette. Consistent estimation of mixture complexity. Annals of Statistics, 29:1281–1296, 2001. R.J. Karunamuni and J. Wu. Minimum hellinger distance estimation in a nonparametric mixture model. Journal of Statistical Planning and Inference, 139:1118–1133, 2009. H. Kasahara and K. Shimotsu. Non-parametric identification and estimation of the number of components in multivariate mixtures. Journal of the Royal Statistical Society: Series B (Methodological), 76:97–111, 2014. C. Keribin. Consistent estimation of the order of mixture models. Sankhya Series A, 62:49–66, 2000. B. G. Leroux. Consistent estimation of a mixing distribution. Annals of Statistics, 20:1350–1360, 1992. N. Lin and X. He. Robust and efficient estimation under data grouping. Biometrika, 93:99–112, 2006. 30 B. Lindsay. Mixture models: Theory, Geometry and Applications. NSF-CBMS Regional Conference Series in Probability and Statistics, Institute of Mathematical Statistics, Hayward, CA, 1995. B. G. Lindsay. Efficiency versus robustness: The case for minimum hellinger distance and related methods. Annals of Statistics, 22:1081–1114, 1994. G. J. McLachlan and K. E. Basford. Mixture models: Inference and Applications to Clustering. Statistics: Textbooks and Monographs. New York, 1988. G. J. McLachlan and D. Peel. Finite mixture models. Wiley Series in Probability and Statistics, 2000. J. Miller and D. Dunson. Robust bayesian inference via coarsening. arXiv:1506.06101, 2015. X. Nguyen. Convergence of latent mixing measures in finite and infinite mixture models. Annals of Statistics, 4(1):370–400, 2013. K. Pearson. Contributions to the theory of mathematical evolution. Philosophical Transactions of the Royal Society of London A, 185:71–110, 1894. S. Richardson and P. J. Green. On bayesian analysis of mixtures with an unknown number of components. Journal of the Royal Statistical Society: Series B (Methodological), 59:731–792, 1997. K. Roeder. A graphical technique for determining the number of components in a mixture of normals. Journal of the American Statisticial Association, 89:487–495, 1994. H. Teicher. Identifiability of mixtures. Annals of Statistics, 32:244–248, 1961. Cédric Villani. Optimal transport: Old and New. Springer, 2008. M. Wiper, D. R. Insua, and F. Ruggeri. Mixtures of gamma distributions with applications. Journal of Computational and Graphical Statistics, 10:440–454, 2001. M. Woo and T. N. Sriram. Robust estimation of mixture complexity. Journal of the American Statistical Association, 101:1475–1486, 2006. W. A. Woodward, W. C. Parr, W. R. Schucany, and H. Lindsey. A comparison of minimum distance and maximum likelihood estimation of a mixture proportion. Journal of the American Statistical Association, 79:590–598, 1984. 31 Appendix A In this Appendix, we provide the proofs of several key results in Section 3 and Section 4. PROOF OF LEMMA 3.1 The proof of this lemma is a straightforward application of the Fourier transform. In fact, for any finite k different elements θ1 , . . . , θk ∈ Θ, assume that we have αi ∈ R, βi ∈ Rd1 (for all i = 1, . . . , k) such that for almost all x k X i=1 αi f0 ∗ Kσ0 (x|θi ) + βiT ∂f0 ∗ Kσ0 (x|θi ) = 0, ∂θ By means of the Fourier transformation on both sides of the above equation, we obtain for all t ∈ Rd that X  k b T ∂ f0 b d αi f0 (t|θi ) + βi Kσ0 (t) (t|θi ) = 0. ∂θ i=1 d d b Since K σ0 (t) = K(σ0 t) 6= 0 for almost all t ∈ R and f is identifiable in the first order, we obtain that αi = 0, βi = 0 ∈ Rd1 for all 1 ≤ i ≤ k. We achieve the conclusion of this lemma. PROOF OF LEMMA 3.4 V ∗ (pG1 ,f We denote the following weighted version of the total variation distance Z 1 |pG1 ,f ∗ Kσ1 (x) − pG2 ,f ∗ Kσ1 (x)| ∗ Kσ1 , pG2 ,f ∗ Kσ1 ) = 2   pG0 ,f0 ∗ Kσ0 (x) 1/4 × dx. pG∗ ,f ∗ Kσ1 (x) for any two mixing measures G1 , G2 ∈ G. By Holder’s inequality, we have 1 V ∗ (pG,f ∗ Kσ1 , pG∗ ,f ∗ Kσ1 ) ≤ √ h∗ (pG,f ∗ Kσ1 , pG∗ ,f ∗ Kσ1 ) 2  Z q 2 1/2 q × pG,f ∗ Kσ1 (x) + pG∗ ,f ∗ Kσ1 (x) dx √ ≤ 2h∗ (pG,f ∗ Kσ1 , pG∗ ,f ∗ Kσ1 ). (14) Therefore, in order to obtain the conclusion of the lemma it suffices to demonstrate that inf V ∗ (pG,f ∗ Kσ1 , pG∗ ,f ∗ Kσ1 )/W1 (G, G∗ ) > 0. (15) G∈Ok∗ Firstly, we will show that lim inf ǫ→0 G∈Ok∗  V ∗ (pG,f ∗ Kσ1 , pG∗ ,f ∗ Kσ1 ) : W1 (G, G∗ ) ≤ ǫ W1 (G, G∗ )  > 0. Assume that the above inequality does not hold. There exists a sequence Gn ∈ Ok∗ such that W1 (Gn , G∗ ) → 0 and V ∗ (pGn ,f ∗ Kσ1 , pG∗ ,f ∗ Kσ1 )/W1 (Gn , G∗ ) → 0. By means of Fatou’s lemma, we obtain V ∗ (pGn ,f ∗ Kσ1 , pG∗ ,f ∗ Kσ1 ) 0 = lim inf n→∞ W1 (Gn , G∗ )   pG0 ,f0 ∗ Kσ0 (x) 1/4 |pGn ,f ∗ Kσ1 (x) − pG∗ ,f ∗ Kσ1 (x)| Z pG∗ ,f ∗ Kσ1 (x) 1 ≥ dx. lim inf n→∞ 2 W1 (Gn , G∗ ) 32 Therefore, for almost surely x ∈ X , we have lim inf |pGn ,f n→∞  pG0 ,f0 ∗ Kσ0 (x) ∗ Kσ1 (x) − pG∗ ,f ∗ Kσ1 (x)| pG∗ ,f ∗ Kσ1 (x) W1 (Gn , G∗ ) 1/4 = 0. (16) Since W1 (Gn , G∗ ) → 0 and Gn ∈ Ok∗ , we can find a subsequence of kn such that kn = k∗ . Without loss of generality, we replace that subsequence of kn by its whole sequence. Then, Gn will have exactly k∗ components for all n ≥ 1. From here, by using the same argument as that in the proof of Theorem 3.1 in Ho and Nguyen [2016c], equality (16) cannot happen – a contradiction. Therefore, we can find a positive constant number ǫ0 such that V ∗ (pG,f ∗ Kσ1 , pG∗ ,f ∗ Kσ1 ) & W1 (G, G∗ ) for any W1 (G, G∗ ) ≤ ǫ0 . Now, to obtain the conclusion of (15), we only need to verify that inf G∈Ok∗ :W1 (G,G∗ )>ǫ0 V ∗ (pG,f ∗ Kσ1 , pG∗ ,f ∗ Kσ1 )/W1 (G, G∗ ) > 0. In fact, if the above statement does not hold, we can find a sequence G′n ∈ Ok∗ such that W1 (Gn , G∗ ) > ǫ0 and V ∗ (pG′n ,f ∗ Kσ1 , pG∗ ,f ∗ Kσ1 )/W1 (G′n , G∗ ) → 0. Since Θ is a closed bounded set, we can find G′ ∈ Ok∗ such that a subsequence of G′n satisfies W1 (G′n , G′ ) → 0 and W1 (G′ , G∗ ) > ǫ0 . Without loss of generality, we replace that subsequence of G′n by its whole sequence. Therefore, V ∗ (pG′n ,f ∗ Kσ1 , pG∗ ,f ∗ Kσ1 ) → 0 as n → ∞. Since W1 (G′n , G′ ) → 0, due to the first order uniform Liptschitz property of f ∗ Kσ1 we obtain pG′n ,f ∗ Kσ1 (x) → pG′ ,f ∗ Kσ1 (x) for almost all x ∈ X when n → ∞. Now, by means of Fatou’s lemma lim V ∗ (pG′n ,f ∗ Kσ1 , pG∗ ,f ∗ Kσ1 )   Z pG0 ,f0 ∗ Kσ0 (x) 1/4 dx ≥ lim inf pG′n ,f ∗ Kσ1 (x) − pG∗ ,f ∗ Kσ1 (x) n→∞ pG∗ ,f ∗ Kσ1 (x) = V ∗ (pG′ ,f ∗ Kσ1 , pG∗ ,f ∗ Kσ1 ), 0 = n→∞ which only happens when pG′ ,f ∗ Kσ1 (x) = pG∗ ,f ∗ Kσ1 (x) for almost surely x. Due to the identifiability of f ∗ Kσ1 , the former equality implies that G′ ≡ G∗ , which is a contradiction to the condition that W1 (G′ , G∗ ) > ǫ0 . As a consequence, we achieve the conclusion of the lemma. bn,m = PROOF OF PROPOSITION 3.1 For the simplicity of presentation we implicitly denote G bn,m (σ0,n ) and G0,m = G0,m (σ0,n ) = arg min h(pG,f ∗ Kσ , pG ,f ∗ Kσ ) for any element G 0,n 0,n 0 0 0 G∈Om bn,m and G0,m strictly depend on σ0,n and will vary as long as σ0,n → 0. Now, as σ0,n > 0, i.e., both G n → ∞, we will prove for almost surely that h(pGbn,m ,f0 ∗ Kσ0,n , Pn ∗ Kσ0,n ) − h(pGbn,m+1 ,f0 ∗ Kσ0,n , Pn ∗ Kσ0,n ) → d′m , (17) e0,m = arg min h(pG,f , pG ,f ). To where d′m = h(pGe0,m ,f0 , pG0 ,f0 ) − h(pGe0,m+1 ,f0 , pG0 ,f0 ) where G 0 0 0 G∈Om achieve this result, we start with the following lemma Lemma .1. For any sequence Gn and σn → 0, we have as n → ∞ that h(pGn ,f0 ∗ Kσn , pGn ,f0 ) → 0. 33 The proof of this lemma is deferred to Appendix B. Now, applying the result of Lemma .1 to the sequences G0,m and σ0,n , we have lim h(pG0,m ,f0 ∗ Kσ0,n , pG0 ,f0 ∗ Kσ0,n ) = n→∞ lim h(pG0,m ,f0 , pG0 ,f0 ) n→∞ ≥ h(pGe0,m ,f0 , pG0 ,f0 ). (18) On the other hand, from the definition of G0,m , we have h(pG0,m ,f0 ∗ Kσ0,n , pG0 ,f0 ∗ Kσ0,n ) ≤ h(pGe0,m ,f0 ∗ Kσ0,n , pG0 ,f0 ∗ Kσ0,n ). Therefore, lim h(pGe0,m ,f0 ∗ Kσ0,n , pG0 ,f0 ∗ Kσ0,n ) lim h(pG0,m ,f0 ∗ Kσ0,n , pG0 ,f0 ∗ Kσ0,n ) ≤ n→∞ n→∞ = h(pGe0,m ,f0 , pG0 ,f0 ). (19) Combining the results from (18) and (19), we have lim h(pG0,m ,f0 ∗ Kσ0,n , pG0 ,f0 ∗ Kσ0,n ) = h(pGe0,m ,f0 , pG0 ,f0 ). n→∞ (20) Now, we will demonstrate that lim h(pGbn,m ,f0 ∗ Kσ0,n , Pn ∗ Kσ0,n ) = lim h(pG0,m ,f0 ∗ Kσ0,n , pG0 ,f0 ∗ Kσ0,n ). n→∞ n→∞ (21) bn,m we quickly obtain that In fact, from the definition of G lim h(pGbn,m ,f0 ∗ Kσ0,n , Pn ∗ Kσ0,n ) ≤ n→∞ = lim h(pG0,m ,f0 ∗ Kσ0,n , Pn ∗ Kσ0,n ) n→∞ lim h(pG0,m ,f0 ∗ Kσ0,n , pG0 ,f0 ∗ Kσ0,n ) n→∞ (22) where the last equality is due to the fact that h(Pn ∗ Kσ0,n , pG0 ,f0 ) → 0 almost surely as n → ∞, d → ∞. On the other hand, from the formulation of G σ0,n → 0 and nσ0,n 0,m we have lim h(pG0,m ,f0 ∗ Kσ0,n , pG0 ,f0 ∗ Kσ0,n ) ≤ n→∞ = lim h(pGbn,m ,f0 ∗ Kσ0,n , pG0 ,f0 ∗ Kσ0,n ) n→∞ lim h(pGbn,m ,f0 ∗ Kσ0,n , Pn ∗ Kσ0,n ) n→∞ (23) Combining (22) and (23), we obtain equality (21). Now, the combination of (20) and (21) leads to lim h(pGbn,m ,f0 ∗ Kσ0,n , Pn ∗ Kσ0,n ) = h(pGe0,m ,f0 , pG0 ,f0 ). n→∞ Therefore, we obtain the conclusion of (17). From here, by using the same argument as Step 1 of Theorem 3.1, we ultimately get d′m = 0 as m ≥ k0 and d′m > 0 as m < k0 . As a consequence, m b n → k0 almost surely as n → ∞. The conclusion of the proposition follows. PROOF OF LEMMA 3.2 The proof proceeds by using the idea from Leroux’s argument [Leroux, 1992]. In fact, from the definition of G∗ , we have h(pG∗ ,f ∗Kσ1 , pG0 ,f0 ∗Kσ0 ) ≤ h(pG,f ∗Kσ1 , pG0 ,f0 ∗ Kσ0 ) for any G ∈ G. Now, for any θ ∈ Θ, by choosing G = (1 − ǫ)G∗ + ǫδθ and letting ǫ → 0 as in Step 1 of the proof of Theorem 3.1, we eventually obtain Z (pG0 ,f0 ∗ Kσ0 (x))1/2 (pG∗ ,f ∗ Kσ1 (x))1/2 dx Z ≥ (pG0 ,f0 ∗ Kσ0 (x))1/2 f ∗ Kσ1 (x|θ)(pG∗ ,f ∗ Kσ1 (x))−1/2 dx. By choosing θ ∈ supp(G∗ ) and summing over all of these components, we readily obtain inequality (1), which concludes the result of the lemma. 34 PROOF OF LEMMA 3.3 By means of Holder inequality, we obtain s Z q 2 Z q pG0 ,f0 ∗ Kσ0 (x) dx pG1,∗ ,f ∗ Kσ1 (x) pG0 ,f0 ∗ Kσ0 (x)dx ≤ pG1,∗ ,f ∗ Kσ1 (x) pG2,∗ ,f ∗ Kσ1 (x) Z q q × pG2,∗ ,f ∗ Kσ1 (x) pG0 ,f0 ∗ Kσ0 (x)dx. From the definition of G1,∗ and G2,∗ , we have Z q Z q q q pG1,∗ ,f ∗ Kσ1 (x) pG0 ,f0 ∗ Kσ0 (x)dx = pG2,∗ ,f ∗ Kσ1 (x) pG0 ,f0 ∗ Kσ0 (x)dx. Therefore, the above inequality along with innequality (1) in Lemma 3.2 lead to s Z q Z q pG0 ,f0 ∗ Kσ0 (x) pG2,∗ ,f ∗ Kσ1 (x) pG0 ,f0 ∗ Kσ0 (x)dx. dx = pG1,∗ ,f ∗ Kσ1 (x) pG2,∗ ,f ∗ Kσ1 (x) It eventually implies that Z q pG1,∗ ,f ∗ Kσ1 (x) − q pG2,∗ ,f ∗ Kσ1 (x) 2 s pG0 ,f0 ∗ Kσ0 (x) dx = 0. pG2,∗ ,f ∗ Kσ1 (x) Therefore, pG1,∗ ,f ∗ Kσ1 (x) = pG2,∗ ,f ∗ Kσ1 (x) almost surely x ∈ X . As a consequence, we obtain the conclusion of the lemma. PROOF OF THEOREM 4.1 Here, we only provide the proof for part (b) as it is the generalization of part (a). The proof is similar to that in Step 1 of Theorem 3.2. In fact, as n → ∞ we have for almost surely that h(pGbn,m ,f ∗ Kσ1 , Pn ∗ Kσ0 ) → h(pG∗,m ,f ∗ Kσ1 , pG0 ,f0 ∗ Kσ0 ) (24) where G∗,m = arg min h(pG,f ∗ Kσ1 , pG0 ,f0 ∗ Kσ0 ). From the argument of Step 1 in the proof of G∈Om Theorem 3.2, we have h(pG∗,m+1 ,f ∗ Kσ1 , pG0 ,f0 ∗ Kσ0 ) < h(pG∗,m ,f ∗ Kσ1 , pG0 ,f0 ∗ Kσ0 ) (25) for any 1 ≤ m ≤ k∗ − 1. It implies that G∗,m ∈ Em for all 1 ≤ m ≤ k∗ . Now, if we would like to have m e n → k∗ as n → ∞, the sufficient and necessary condition is h(pG∗ ,f ∗ Kσ1 , pG0 ,f0 ∗ Kσ0 ) ≤ ǫ < h(pG∗,k∗ −1 ,f ∗ Kσ1 , pG0 ,f0 ∗ Kσ0 ), which is precisely the conclusion of the theorem. PROOF OF PROPOSITION 4.1 Using the argument from Step 1 in the proof of Theorem 3.1, we obtain that G0,k0 −1 has exactly k0 − 1 elements. Now, since f0 ∗ Kσ0 is uniformly Lipschitz up to the first order and identifiable, we obtain inf G∈Ek0 −1 h(pG,f0 ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 )/W1 (G, G0 ) = C ′ 35 where C ′ is some positive constant depending only on f0 , G0 , Θ, and σ0 . Therefore, we get h(pG0,k0 −1 ,f0 ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) ≥ C ′ W1 (G0 , G0,k0 −1 ) ≥ C ′ Now, for any G = kP 0 −1 i=1 inf G∈Ek0 −1 W1 (G, G0 ). (26) pi δθi ∈ Ek0 −1 , we can find the index j ∗ ∈ [1, k0 ] such that kθi − θj0∗ k ≥ min 1≤j6=j ∗ ≤k0 for any 1 ≤ i ≤ k0 − 1. Therefore, we obtain 2||θi − θj0∗ || ≥ ||θi − θj0∗ || + min 1≤j6=j ∗ ≤k0 ||θi − θj0 || ||θi − θj0 || ≥ ||θu0 − θv0 || min 1≤u6=v≤k0 for any 1 ≤ i ≤ k0 − 1. From the P definition of W1 (G, G0 ), we can find the optimal coupling q ∈ Q(p, p0 ) such that W1 (G, G0 ) = qij kθi − θj0 k. Hence, we get i,j W1 (G, G0 ) ≥ ≥ k0 X i=1  inf min 1≤i≤k0 for all G ∈ Ek0 −1 . It implies that G∈Ek0 −1 qij ∗ kθi − θj0∗ k ≥ p0j ∗ W1 (G, G0 ) ≥  p0i min 1≤i≤k0 × p0i By combining (26) and (27), if we choose min p0i 1≤i≤k0 min 1≤i6=j≤k0 × ||θi0 min 1≤i6=j≤k0 min 1≤i6=j≤k0 min 1≤i≤k0 −1 − ||θi0 θj0 || − kθi − θj0∗ k  /2  θj0 || /2. (27) ||θi0 − θj0 || ≥ 2ǫ/C ′ , then ǫ < h(pG0,k0 −1 ,f0 ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ). As a consequence, by defining C = 1/C ′ we obtain the conclusion of the lemma. PROOF OF PROPOSITION 5.3 The proof of this proposition is a straightforward combination of Fatou’s lemma and the argument from Theorem 4.6 in [Heinrich and Kahn, 2015]. In fact, for any e0 ) < ǫ for any n ≥ M (ǫ). e0 ) → 0 we can find M (ǫ) ∈ N such that W1 (Gn , G ǫ > 0, as W1 (Gn0 , G 0 n n Additionally, as lim sup k0 = k, we can find T (ǫ) ∈ N such that k0 ≤ k for all n ≥ T (ǫ). Denote n→∞ N (ǫ) = max {M (ǫ), T (ǫ)} for any ǫ > 0. Now, assume that for any ǫ > 0, we have inf e0 )<ǫ G∈Okn :W1 (G,G 0 e h(pG,f0 ∗ Kσ0 , pGn0 ,f0 ∗ Kσ0 )/W12k−2k0 +1 (G, Gn0 ) = 0. as long as n ≥ N (ǫ). For each n ≥ N (ǫ), it implies that we have a sequence Gnm ∈ Ok0n ⊂ Ok such e0 ) < ǫ for all m ≥ 1 and that W1 (Gnm , G e h(pGnm ,f0 ∗ Kσ0 , pGn0 ,f0 ∗ Kσ0 )/W12k−2k0 +1 (Gnm , Gn0 ) → 0 as m → ∞. By means of Fatou’s lemma, we eventually have  e lim inf pGnm ,f0 ∗ Kσ0 (x) − pGn0 ,f0 ∗ Kσ0 (x) /W12k−2k0 +1 (Gnm , Gn0 ) → 0 m→∞ almost surely x ∈ X . However, from the argument of Theorem 4.6 in Heinrich and Kahn [2015], e0 ) < ǫ0 , not e0 ) ∨ W1 (Gn , G we can find ǫ0 > 0 such that for all Gnm , Gn0 ∈ Ok where W1 (Gnm , G 0  e almost surely x ∈ X that pGnm ,f0 ∗ Kσ0 (x) − pGn0 ,f0 ∗ Kσ0 (x) /W12k−2k0 +1 (Gnm , Gn0 ) → 0 for each n ≥ N (ǫ0 ), which is a contradiction. Therefore, we achieve the conclusion of the proposition. 36 Appendix B This appendix contains remaining proofs of the main results in the paper. PROOF OF PROPOSITION 2.1 [2016c] implies that A careful investigation of the proof of Theorem 3.1 in Ho and Nguyen h(pG,f , pG0 ,f ) & W1 (G, G0 ), (28) for any G ∈ Ok0 such that W1 (G, G0 ) is sufficiently small. The latter restriction means that the result in (28) is of a local nature. We also would like to extend this lower bound of h(pG,f , pG0 ,f ) for any G ∈ Ok0 . It appears that the first order Lipschitz continuity of f is sufficient to extend (28) for any G ∈ Ok0 . In fact, by the result in (28), we can find a positive constant ǫ0 such that inf G∈Ok0 :W1 (G,G0 )≤ǫ0 h(pG,f , pG0 ,f )/W1 (G, G0 ) > 0 Therefore, to extend (28) for any G ∈ Ok0 , it is sufficient to demonstrate that inf G∈Ok0 :W1 (G,G0 )>ǫ0 h(pG,f , pG0 ,f )/W1 (G, G0 ) > 0 Assume by the contrary that the above result does not hold. It implies that we can find a sequence Gn ∈ Ok0 such that W1 (Gn , G0 ) > ǫ0 and h(pGn ,f , pG0 ,f )/W1 (Gn , G0 ) → 0 as n → ∞. Since Θ is a compact set, we can find G′ ∈ Ok0 such that a subsequence of Gn satisfies W1 (Gn , G′ ) → 0 and W1 (G′ , G0 ) > ǫ0 . Without loss of generality, we replace that subsequence by its whole sequence. Therefore, h(pGn ,f , pG0 ,f ) → 0 as n → ∞. Due to the first order Lipschitz continuity of f , we obtain pGn ,f (x) → pG′ ,f (x) for any x ∈ X when n → ∞. Now, by means of Fatou’s lemma, we have 2 q Z q pGn ,f (x) − pG0 ,f (x) dx = h(pG′ ,f , pG0 ,f ). 0 = lim h(pGn ,f , pG0 ,f ) ≥ lim inf n→∞ n→∞ Since f is identifiable, the above result implies that G′ ≡ G0 , which contradicts the assumption that W1 (G′ , G0 ) > ǫ0 . As a consequence, we can extend inequality (28) for any G ∈ Ok0 when f is uniformly Lipschitz up to the first order. PROOF OF LEMMA .1 The proof idea of this lemma is similar to that of Theorem 1 in Chapter 2 of [Devroye and Gyorfi, 1985]. However, it is slightly more complex than the proof of this theorem as we allow Gn to vary when σn vary. Here, we provide the proof of this lemma for the completeness. Since the Hellinger distance is upper bound by the total variation distance, it is sufficient to demonstrate that V (pGn ,f0 ∗ Kσn , pGn ,f0 ) → 0 as n → ∞. Firstly, assume that f0 (x|θ) is continuous and vanishes outside a compact set which is independent of θ and Σ. For any large number M , we split K = K ′ +K ′′ where K ′ = K1kx| ≤M and K ′′ = K1kx| >M . Now, by using Young’s inequality we obtain Z |pGn ,f0 ∗ Kσn (x) − pGn ,f0 (x)|dx Z Z pGn ,f0 ∗ Kσ′ n (x) − pGn ,f0 (x) Kσ′ n (y)dy dx ≤ Z Z Z ′′ + |pGn ,f0 ∗ Kσn (x)|dx + pGn ,f0 (x)dx Kσ′′n (x)dx Z Z Z ′ ≤ pGn ,f0 ∗ Kσn (x) − pGn ,f0 (x) Kσn (y)dy dx + 2 Kσ′′n (x)dx. A 37 for Z some compactZ set A. It is clear that for any ǫ > 0, we can choose M (ǫ) such that as M > M (ǫ), Kσ′′n (x)dx = K ′′ (x)dx < ǫ. Regarding the first term in the right hand side of the above display, by denoting Gn = m Pn i=1 Z pni δθin we obtain pGn ,f0 ∗ Kσn (x) − pGn ,f0 (x) A ≤ Z Z Z Kσ′ n (y)dy dx |pGn ,f0 (x − y) − pGn ,f0 (x)|Kσ′ n (y)|dydx A Z Z X mn pni |f0 (x − y|θin ) − f0 (x|θin )|Kσ′ n (y)|dydx ≤ ω(M σn ) |Kσ′ n (y)|dydx ≤ ω(M σn )µ(A) → 0 ≤ A i=1 Z Z A where ω(t) = sup ||x−y||≤t |f0 (x|θ) − f0 (y|θ)| denotes the modulus of continuity of f0 and µ denotes the Lebesgue measure. Therefore, the conclusion of this lemma holds for that setting of f0 (x|θ). Regarding the general setting of f0 (x|θ), for any ǫ > 0 since Θ is a bounded set, we can find a continous function g(x|θ) being supported on a compact set B(ǫ) that is independent of θ ∈ Θ such Z |f0 (x|θ) − g(x|θ)|dx < ǫ. Hence, we obtain that Z where  Z  |pGn ,f0 ∗ Kσn (x) − pGn ,f0 (x)|dx ≤ pGn ,f0 − pGn ,g ∗ Kσn (x) dx Z Z + |pGn ,f0 (x) − pGn ,g (x)|dx + |pGn ,g ∗ Kσn (x) − pGn ,g (x)|dx Z ≤ 2ǫ + |pGn ,g ∗ Kσn (x) − pGn ,g (x)|dx Z |pGn ,g ∗ Kσn (x) − pGn ,g (x)|dx → 0 as n → ∞. We achieve the conclusion of the lemma. Lemma .2. Assume that f0 and K satisfy condition (P.1) in Theorem 3.1. Furthermore, K has an integrable radial majorant Ψ ∈ L1 (µ) where Ψ(x) = sup |K(y)|. Then, we can find a positive constant ǫ01 such that as σ ≤ ǫ01 , ||y||≥||x|| for any G ∈ Ok0 we have h(pG,f0 ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) ≥ V (pG,f0 ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) & W1 (G, G0 ). , i.e., C1 (σ0 ) ≥ C1 as σ0 → 0 where C1 only depends on G0 . Proof. We divide the proof of this lemma into two key steps Step 1: We firstly demontrate the following result   V (pG,f0 ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) : W1 (G, G0 ) ∨ σ0 ≤ ǫ > 0. lim inf ǫ→0 G∈Ok0 ,σ0 >0 W1 (G, G0 ) 38 (29) The proof idea of the above inequality is essentially similar to that from the proof of Theorem 3.1 in [Ho and Nguyen, 2016c]. Here, we provide such proof for the completeness. Assume that the conclusion of inequality (29) does not hold. Therefore, we can find two sequences {Gn } and {σ0,n } such that V (pGn ,f0 ∗ Kσ0,n , pG0 ,f0 ∗ Kσ0,n )/W1 (Gn , G0 ) → 0 where W1 (Gn , G0 ) → 0 and σ0,n → 0 as n → ∞. As Gn ∈ Ok0 , it implies that there exists a subsequence {Gnm } of {Gn } such that Gnm has exactly k0 elements for all m. Without loss of generality, we replace this subsequence by the k0 P pni δθin such that (pni , θin ) → (p0i , θi0 ). whole sequence {Gn }. Now, we can represent Gn as Gn = i=1 Similar to the argument in Step 1 from the proof of Theorem 3.1 in Ho and Nguyen [2016c], we have k0 P W1 (Gn , G0 ) . d(Gn , G0 ) where d(Gn , G0 ) = pni k∆θin k + |∆pni | and ∆pni = pni − p0i , ∆θin = i=1 θin − θi0 for all 1 ≤ i ≤ k0 . It implies that V (pGn ,f0 ∗ Kσ0,n , pG0 ,f0 ∗ Kσ0,n )/d(Gn , G0 ) → 0. Z Now, we denote gn (x|θ) = f0 (x − y|θ)Kσ0,n (y)dy for all θ ∈ Θ. Similar to Step 2 from the proof of Theorem 3.1 in Ho and Nguyen [2016c], by means of Taylor expansion up to the first order we can represent pGn ,f0 ∗ Kσ0,n (x) − pG0 ,f0 ∗ Kσ0,n (x) 1 ≍ d(Gn , G0 ) d(Gn , G0 ) X k0  ∂gn ∆pni gn (x|θi0 ) + pni (x|θi0 ) i=1 ∂θ ∂gn (x|θi0 ) for 1 ≤ i ≤ k0 . Denote mn which is the linear combinations of the elements of gn (x|θi0 ), ∂θ to be the maximum of the absolute values of these coefficients. We can argue that mn 6→ 0 as n → ∞. Additionally, since K has an integrable radial majorant Ψ ∈ L1 (µ), from Theorem 3 in Chapter 2 of ∂gn ∂f0 Devroye and Gyorfi [1985], we have gn (x|θ) → f0 (x|θ) and (x|θ) → (x|θ) for almost surely ∂θ ∂θ x and for any θ ∈ Θ. Therefore, we obtain   dn pGn ,f0 ∗ Kσ0,n (x) − pG0 ,f0 ∗ Kσ0,n (x) k0 X 1 ∂f0 αi f0 (x|θi0 ) + βiT → (x|θi0 ) mn d(Gn , G0 ) ∂θ i=1 where not all the elements of αi , βi equal to 0. Due to the first order identifiability of f0 and the Fatou’s lemma, V (pGn ,f0 ∗ Kσ0,n , pG0 ,f0 ∗ Kσ0,n )/d(Gn , G0 ) → 0 will lead to αi = 0, βi = 0 ∈ Rd1 for all 1 ≤ i ≤ k0 , which is a contradiction. We achieve the conclusion of (29). Step 2: The result of (29) implies that we can find a positive number ǫ01 such that as W1 (G, G0 )∨σ0 ≤ ǫ01 , we have h(pG,f0 ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) ≥ V (pG,f0 ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) & W1 (G, G0 ). (30) In order to extend the above inequality to any G ∈ Ok0 , it is sufficient to demonstrate that inf σ0 <ǫ01 ,W1 (G,G0 )>ǫ01 h(pG,f0 ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) > 0. W1 (G, G0 ) ′ such that In fact, if the above result does not hold, we can find two sequences G′n ∈ Ok0 and σ0,n ′ 0 ′ ′ 0 ′ ′ , pG0 ,f0 ∗ Kσ0,n )/W1 (Gn , G0 ) → 0 as n → ∞. W1 (Gn , G0 ) > ǫ1 , σ0,n ≤ ǫ1 and h(pG′n ,f0 ∗ Kσ0,n  ′  ′ of {G′n } and {σn′ } Since Θ is closed bounded set, we can find two subsequences Gnm and σ0,n m 39 ′ − σ ′ | → 0 as m → ∞ where G′ ∈ Ok0 and respectively such that W1 (G′nm , G′ ) → 0 and |σ0,n m σ ′ ∈ [0, ǫ01 ]. ′ for any m ≥ 1, we achieve that Due to the first order Lipschitz continuity of f ∗ Kσ0,n m pGn′ m ,f0 ′ (x) → pG′ ,f0 ∗ Kσ′ (x) ∗ Kσ0,n m for any x ∈ X . Here, pG′ ,f0 ∗ Kσ′ = pG′ ,f0 when σ ′ = 0. Therefore, by utilizing the Fatou’s argument, we obtain h(pG′ ,f0 ∗ Kσ′ , pG0 ,f0 ∗ Kσ′ ) = 0, which implies that G′ ≡ G0 , a contradiction. As a consequence, when σ0 ≤ ǫ01 , for any G ∈ Ok0 we have h(pG,f0 ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) ≥ V (pG,f0 ∗ Kσ0 , pG0 ,f0 ∗ Kσ0 ) & W1 (G, G0 ). We achieve the conclusion of the lemma. b b is the Fourier transform of kernel Lemma .3. Assume that K(t) 6= 0 for almost all t ∈ Rd where K(t) function K. If I(G0 , f0 ) has r-th singularity level for some r ≥ 0, then I(G0 , f0 ∗ Kσ0 ) also has r-th singularity level for any σ0 > 0. Proof. Remind that, I(G0 , f0 ) has r-th singularity level is equivalent to the fact that G0 is r-singular relative to the ambient space Ok0 (cf. Definition 3.1 and Definition 3.2 in [Ho and Nguyen, 2016b]). kn P Now, for any ρ ∈ N, given any sequence Gn = pni δθin ∈ Ok0 such that Gn → G0 in Wρ metric. i=1 We can find a subsequence of Gn such that kn = k0 and each atoms of G0 will have exactly one component of Gn converges to. Without loss of generality, we replace the subsequence of Gn by its whole sequence and relabel the atoms of Gn such that (pni , θin ) → (p0i , θi0 ) for all 1 ≤ i ≤ k0 . Denote ∆θin = θin −θi0 and ∆pni = pni −p0i for all 1 ≤ i ≤ k0 . From Definition 3.1 in Ho and Nguyen [2016b], a ρ-minimal form of Gn from Taylor expansion up to the order ρ satisfies  Tρ  (ρ) ξl (Gn ) pGn ,f0 (x) − pG0 ,f0 (x) X (ρ) = Hl (x) + o(1), Wρρ (Gn , G0 ) Wρρ (Gn , G0 ) (31) l=1 (ρ) (ρ) for all x. Here, Hl (x)are linearly independent functions of x for all l, and coefficients ξl (G) are polynomials of the components of ∆θi and ∆pi for l ranges from 1 to a finite Tρ . From the above representation, we achieve pGn ,f0 ∗Kσ0 (x) − pG0 ,f0 ∗Kσ0 (x) Wρρ (Gn , G0 ) (ρ) where Hl ∗Kσ0 (x) = Z =  Tρ  (ρ) X ξl (Gn ) (ρ) Hl ∗ Kσ0 (x) + o(1), Wρρ (Gn , G0 ) (32) l=1 (ρ) (ρ) Hl (x − y)Kσ0 (y)dy for all 1 ≤ l ≤ Tρ . We will show that Hl ∗Kσ0 (x) are linearly independent functions of x for all 1 ≤ l ≤ Tρ . In fact, assume that we can find the coefficients αl ∈ R such that Tρ X (ρ) αl Hl l=1 ∗ Kσ0 (x) = 0 for all x. By means of Fourier transformation in both sides of the above equation, we obtain X  Tρ (ρ) b c Kσ0 (t) αl Hl (t) = 0 l=1 40 b σ (t) = K(σ b 0 t) 6= 0 for all t ∈ Rd and H (ρ) (x) for all l are linearly independent for all t ∈ Rd . As K 0 l functions of x for all 1 ≤ l ≤ Tρ , the above equation implies that αl = 0 for all 1 ≤ l ≤ Tρ . Therefore, (ρ) Hl ∗ Kσ0 (x) are linearly independent functions of x for all 1 ≤ l ≤ Tρ and ρ ∈ N. According to Definition 3.2 in Ho and Nguyen [2016b], since I(G0 , f0 ) has r-th singularity level, r+1 it implies that for any sequence Gn ∈ Ok0 such that Wr+1 (Gn , G0 ) → 0, we do not have all the (r+1) ratios ξl (r+1) ξl r+1 (Gn )/Wr+1 (G0 , Gn ) in (31) go to 0 for 1 ≤ l ≤ Tr+1 . It means that not all the ratios r+1 (Gn )/Wr+1 (G0 , Gn ) in (32) go to 0. Additionally, as I(G0 , f0 ) has r-th singularity level, we (r) can find a sequence G′n ∈ Ok0 such that Wrr (G′n , G0 ) → 0 and ξl (G′n )/Wrr (G0 , G′n ) in (31) go to (r) 0 for 1 ≤ l ≤ Tr . It in turns also means that all the ratios ξl (G′n )/Wrr (G0 , G′n ) in (32) go to 0. As a consequence, from Definition 3.3 in Ho and Nguyen [2016b], we achieve the conclusion of the lemma. 41
10math.ST
1 On approximations via convolution-defined mixture models arXiv:1611.03974v3 [stat.OT] 2 Mar 2018 Hien D. Nguyen and Geoffrey J. McLachlan Abstract An often-cited fact regarding mixing or mixture distributions is that their density functions are able to approximate the density function of any unknown distribution to arbitrary degrees of accuracy, provided that the mixing or mixture distribution is sufficiently complex. This fact is often not made concrete. We investigate and review theorems that provide approximation bounds for mixing distributions. Connections between the approximation bounds of mixing distributions and estimation bounds for the maximum likelihood estimator of finite mixtures of locationscale distributions are reviewed. Index Terms Mixing distributions; Finite mixture models; convolutions; Kullback-Leibler divergence; Maximum likelihood estimators. I. I NTRODUCTION Mixing distributions and finite mixture models are important classes of probability models that have found use in many areas of application, such as in artificial intelligence, machine learning, pattern recognition, statistics, and beyond. Mixing distributions provide probability models with probability density functions (PDFs) of the form ´ f (x) = X f (x; θ) dΠ (θ), where f (·; θ) is a PDF (with respect to a random variable X ∈ X) that is dependent on some parameter θ ∈ Θ ⊆ Rd with distribution function (DF) Π. Here, X ⊆ Rp is the support of the PDFs f and f (·; θ), where X is not functionally dependent on θ. Notice that the mixing distributions contain the finite mixture Pn models by setting the DF to Π (θ) = i=1 πi δ (θ − θi ), for n ∈ N, where δ is the Dirac delta function (cf. [1]), Pn πi ≥ 0, i=1 πi = 1, θi ∈ X (for each i ∈ [n] = {1, . . . , n}), and N is the natural numbers (zero exclusive); see [2, Sec. 1.2.2] and [3, Sec. 1.12] for descriptions and references regarding mixing distributions. The appeal of finite mixture models largely comes from their flexibility of representation. The folk theorem regarding mixture models generally states that a mixture model can approximate any distribution to a sufficient level of accuracy, provided that the number of mixture components is sufficiently large. Example statements of the folk theorem include: “provided the number of component densities is not bounded above, certain forms of Hien Nguyen is with the Department of Mathematics and Statistics, La Trobe University, Bundoora, Melbourne, Australia 3086. Geoffrey McLachlan is with the School of Mathematics and Physics, The University of Queensland, St. Lucia, Brisbane, Australia 4075. *Corresponding Author: Hien Nguyen (Email: [email protected]). March 1, 2018 DRAFT 2 mixture can be used to provide arbitrarily close approximations to a given probability distribution” [4, p. 50], “any continuous distribution can be approximated arbitrarily well by a finite mixture of normal densities with common variance (or covariance matrix in the multivariate case)” [3, p. 176], “there is an obvious sense in which the mixture of normals approach, given enough components, can approximate any multivariate density” [5, p. 5], “the [mixture] model forms can fit any distribution and significantly increase model fit” [6, p. 173], and “a mixture model can approximate almost any distribution” [7, p. 500]. From the examples, we see that statements regarding the flexibility of mixture models are generally left technically vague and unclear. 1/q ´ q 1 |f (x)| dx for q ∈ [1, ∞] Let dTV X (f, g) = 2 kf − gkX,1 be the total-variation distance, where kf kX,q = X is the Lq -norm over support X. Here, f (x) and g (x) are functions over the support X ⊆ Rd . We also let kf kX,∞ = supx∈X |f (x)|. Further define the location-scale family of PDFs over R as 1 F =  f: ˆ R 1 f σ  x−µ σ   dx = 1, for all µ ∈ R and σ ∈ (0, ∞) . Define xi to be the ith element of x, for i ∈ [p]. Historical technical justifications for the folk theorem include [8] and [9]. Within more recent literature, it is difficult to obtain clear technical statements of such results. Among the only references that we could find is the exposition of [10, Sec. 33.1], and in particular, the following theorem statement. Theorem 1 (DasGupta 2008, Thm. 33.1). Let f be a probability density function over Rp for p ∈ N. If Fg2 is the class of mixtures of g ∈ F 1 : ( Fg2 = ∗ ∗ f : f (x) = ˆ 0 ∞ ˆ Rp   p xi − µi 1 Y g dΠµ (µ) dΠσ (σ) σ d i=1 σ ) Then, given any  > 0, there exists a f ∗ ∈ F 2 such that dTV (f, f ∗ ) < , where Πµ (µ) and Πσ (σ) are DFs over Rd Rd and (0, ∞), respectively. Upon inspection, Theorem 1 states that the class of marginally-independent location-scale mixing distributions have PDFs that can approximate any other PDF arbitrarily well, with respect to the total-variation distance. Unfortunately, the proof of Theorem 1 is not provided in [10]. Remarks regarding the theorem relegate the proof to an unknown location in [11], which makes it difficult to investigate the structure and nature of the theorem. The lack of transparency from the cited text has lead us to investigate the nature of the presented theorem. The outcome of our investigation is the collection of the various proofs and technical results that are reviewed in this article. The contents of our review are as follows. Firstly, we investigate the proofs from [11] and consider alternative versions of Theorem 1 that provide more insight into the structure of the result. For example, we present an alternative to Theorem 1, whereupon only a mixture over the location parameter is required. That is, no integration over the scale parameter element is needed, as in Fg2 . Furthermore, we state a uniform approximation alternative to Theorem 1 that is applicable to the approximation of target PDFs over compact sets. Rates of convergence are also obtainable if we make a Lipschitz assumption on the target PDF. March 1, 2018 DRAFT 3 In addition to the presentation of Theorem 1 and its variants, we also review the relationship between the mixing distributions results and the approximation bounds of [12]. Via the approximation and estimation bounding results for the maximum likelihood estimator (MLE) from [13] and [14], we further present results for bounding Kullback-Leibler errors [KL; [15]] of the MLE for finite mixtures of location-scale PDFs. The article proceeds as follows. In Section 2, we discuss Theorem 1 and its variants. The relationship between the mixing distributions approximation results and the results of [12], [13], and [14] are then presented in Sections 3, 4, and 5, respectively. II. M IXING DISTRIBUTION APPROXIMATION THEOREMS Let Lq (X) be the space of functions having the property kf kX,q < ∞, with support X, and which map to R. Further, we define the convolution between f ∈ Lq (X) and g ∈ Lr (X) as (f ∗ g) (x) = ˆ X f (y) g (x − y) dy, (1) where (1) exists and is measurable for specific cases, due to results such as the following from [16, Sec. 9.3]. Theorem 2 (Makarov and Podkorytov, 2013, Sec. 9.3.1-2). Let f ∈ Lq (Rp ) and g ∈ Lr (Rp ), for q, r ∈ [1, ∞]. We have the following results: (i) (ii) if q = 1, then f ∗ g exists and kf ∗ gkRp ,r ≤ kf kRp ,1 kgkRp ,r . if 1/q + 1/r = 1, then f ∗ g exists and kf ∗ gkRp ,∞ ≤ kf kRp ,q kgkRp ,r . Remark 3. When q = r = 1, not only do we have inequality (i) of Theorem 2, but also that ˆ ˆ ˆ (f ∗ g) (x)dx = f (y) g (x − y) dxdy p Rp Rp ˆR ˆ = f (x) dx g (x) dx < ∞. Rp Rp Moreover, this implies that if f and g are PDFs over Rp , then f ∗ g is also a PDF over Rp . Let a function αk ∈ L1 (Rp ) for k ∈ R+ be called an approximate identity in Rp if there exists a k ∗ ∈ [0, ∞] ´ ´ such that (i) αk ≥ 0, (ii) Rp αk (x) dx = 1, and (iii) kxk >δ αk (x) dx → 0 as k → k ∗ , for every δ > 0 [cf. [16, 1 Pp q 1/q Sec. 7.6.1]]. Here, kxkq = ( i=1 |xi | ) is the lq -vector norm. The following result of [11] provides a useful generative method for constructing approximate identities. Lemma 4 (Cheney and Light, 2000, Ch. 20, Thm. 4). Let α ∈ L1 (Rp ) and let k ∈ N. If α ∈ F 3 , where ( ) ˆ p Y 3 p F = f ∈ L1 (R ) : f (x) = g (xi ) , g (x) dx = 1, and g (x) ≥ 0 for all x ∈ R , i=1 R then the dilations αk (x) = k p α (kx) is an approximate identity, with k ∗ = ∞. W may call F 3 the class of marginally-independent scaled density functions. With an ability to construct approximate identities, the following theorem from [16] provides a powerful means to construct approximations for any function over Rp . The corollary to the result provides a statistical interpretation. March 1, 2018 DRAFT 4 Theorem 5 (Makarov and Podkorytov, 2013, Sec. 9.3.3). Let αk be an approximate identity in Rp for some k ∗ ∈ [0, ∞]. If f ∈ Lq (Rp ) for q ∈ [1, ∞), then kf ∗ αk − f kRp ,q → 0 as k → k ∗ . Corollary 6. Let f be a PDF in Lq (Rp ), for q ∈ [1, ∞). If g ∈ F 3 , then for any  > 0, there exists a PDF f ∗ in   ˆ 4 ∗ ∗ p Fg = f : f (x) = k g (kx − km) f (m) dm, k ∈ N Rp such that kf − f ∗ kRp ,q < , for any q ∈ [1, ∞). Proof: From Lemma 4 and Theorem 5, for any g ∈ F 3 and f ∈ Lq (Rp ), we have kf ∗ [k p g (k × ·)] − f kRp ,q → ´ 0, where the convolution f ∗ [k p g (k × ·)] = Rp k p g (kx − km) f (m) dm. By the definition of convergence, we have the fact that for every  > 0, there exists some K such that for all k > K, kf ∗ [k p g (k × ·)] − f kRp ,q < . Putting the convolutions f ∗ [k p g (k × ·)] for all k ∈ N into Fg4 provides the desired convergence result. Lastly, f ∗ is a PDF via Remark 3. Remark 7. Corollary 6 improves upon Theorem 1 in several ways. Firstly, the total variation bound is replaced by the stronger Lq -norm result. Secondly, mixing only occurs over the mean parameter element m, via the PDF dΠm (m) /dm = f (m), and not over the scaling parameter element k, which can be taken as a constant value. That is, we only require that the class Fg4 be mixing distributions over the location parameter element of g, where Πm is the DF that is determined by the density being approximated and the scale parameter element is picked to be some fixed value k ∈ N. Lastly, we note that Theorem 1 can simply be obtained as the q = 1 case of Corollary 6 by setting σ = 1/k and µ = m/k. Notice that Theorem 5 cannot be used to provide L∞ -norm approximation results. Let C (X) be the class of continuous functions over the set X. If one assumes that the target PDF f is bounded and belongs to C (Rp ), then a uniform approximation alternative to Theorem 5 is possible for compact subsets of Rp . Theorem 8 (Cheney and Light, 2000, Ch. 20, Thm. 2). Let αk be an approximate identity in Rp for some k ∗ ∈ [0, ∞]. If f is a bounded function in C (Rp ), then kf ∗ αk − f kK,∞ → 0 as k → k ∗ , for all compact K ⊂ Rp . We note in passing that Theorem 8 can be used to prove density results for finite mixture models, such as that of [10, Thm. 33.2]. For further details, see [11, Thm. 5] and [17]. Let Lipa (X) be the class of Lipschitz functions a f , where |f (x) − f (y)| ≤ C kx − yk∞ , for some a, C ∈ [0, ∞), where x, y ∈ X. If one assumes that the target PDF is in Lipa (X) for some a ∈ (0, 1], then the following approximation rate result is available. Theorem 9 (Cheney and Light, 2000, Ch. 21, Thm. 1). Let αk be an approximate identity in Rp for some k ∗ ∈ [0, ∞] ´ a with the additional property that Rp kxk1 α1 (x) dx < ∞ for some a ∈ (0, 1]. If f ∈ Lipa (Rp ), then there exists a constant A > 0 such that kf ∗ αk − f kRp ,∞ ≤ A/k a for k ∈ N. Example 10. Let α ∈ F 3 be generated by taking the marginal location-scale density g = φ, where φ is the standard ´ a normal PDF. The condition Rp kxk1 α1 (x) dx < ∞ is satisfied for a = 1 since the multivariate normal distribution has all of its polynomial moments; see for example [18]. March 1, 2018 DRAFT 5  ´ Qp Corollary 11. Let f ∈ Lip1 Rd be a PDF. If f ∗ (x) = Rd k p i=1 φ (kxi − kmi ) f (m) dm, then kf − f ∗ kRp ,∞ ≤ A/k for k ∈ N and some constant A > 0. Thus, the mixing distribution generated via marginally-independent normal PDFs convergences uniformly for target PDFs f ∈ Lip1 (Rp ), at a rate of 1/k. III. B OUNDING OF K ULLBACK -L EIBLER DIVERGENCE VIA RESULTS FROM Z EEVI AND M EIR (1997) Let K ⊂ Rp be a compact subset and let  ˆ  5 FK,β = f : f (x) dx = 1 and f (x) ≥ β > 0, for all x ∈ K K be the class of lower-bounded target PDFs over K. In [12], the approximation errors for finite mixtures of marginally5 independent PDFs are studied in the context of approximating functions in FK,β . Remark 12. The use of finite mixtures of marginally-independent PDFs is implicit in [12] as they report on approximation via product kernels of radial basis functions. The products of kernels is equivalent to taking products over marginally-independent densities to yield a joint density. Univariate radial basis functions that are positive and integrate to unity are symmetric PDFs in one dimension. Thus, the product of univariate radial basis functions that generate PDFs correspond to a subclass of F 3 ; see [19] regarding radial basis functions. Let the KL divergence between two PDFs f, g ∈ L1 (X) be defined as   ˆ f (x) dx. dKL (f, g) = f (x) log X g (x) X The KL divergence between f and g is difficult to work with as it is not a distance function. That is, it is asymmetric and it does not obey the triangle inequality. As such, bounding the KL divergence by a distance function provides a useful means of manipulation and control. The following useful result is obtained by [12]. 2 5 −1 Lemma 13 (Zeevi and Meir, 1997, Lemma 3). If f, g ∈ FK,β , then dKL kf − gkK,2 . K (f, g) ≤ β p Let Fg6 = {k p g (kx − km) : m ∈ [m, m] and k ∈ N}, and for any g ∈ F 3 , define the n-component bounded finite mixtures of g as the class 7 Fg,n = ( f : f (x) = n X i=1 πi k p g (kx − km) , p mi ∈ [m, m] , k ∈ N, πi ≥ 0, and where i ∈ [n] and −∞ < m < m < ∞. n X i=1 ) πi = 1 , For an arbitrary family of functions F, define the n-point convex hull of F to be ( n ) n X X Convn (F) = πi fi : fi ∈ F, πi ≥ 0, and πi = 1 , i=1 i=1  7 and refer simply to Conv∞ (F) = Conv (F) as the convex hull. Observe that Fg,n = Convn Fg6 . By Corollary 1 of [12], we have the fact that Conv March 1, 2018 Fg6  =  f : f (x) = ˆ Rp p k g (kx − km) dΠm , and Πm ∈ Mm  DRAFT 6  is the closure of Conv Fg6 , where Mm is the sets of all probability measures over m. Here, we generically denote the closure of Conv (F) by Conv (F). The following result from [20] relates the closure of convex hulls to the L2 -norm. Lemma 14 (Barron, 1993, Lemma 1). If f¯ is in Conv (F), where F is a Hilbert space of functions over support 2 X, such that kf kX,2 ≤ B for each f ∈ F, then for every n ∈ N, and every C > B 2 − f¯ fn ∈ Convn (F) such that f¯ − fn 2 X,2 2 , X,2 there exists an ≤ C/n.  Thus, from Lemma 14, we know that if f¯ ∈ Conv Fg6 , then there exists an n-component finite mixture of 2 ≤ C/n, K,2 Fg6 , which we 7 density g, fn ∈ Fg,n , such that f¯ − fn is a constant that depends on the class f∈ 5 FK,β ∩L2 where K is the compact support of both densities and C > 0 know to be bounded on K. From Corollary 6 we know that if  2 (K), then for every  > 0, there exists an f¯ ∈ Fg4 such that f¯ − f K,2 < . Since Fg4 ⊂ Conv Fg6 , we can set f¯ = f ∗ . An application of the triangle inequality yields the following result from [12]. 5 Theorem 15 (Zeevi and Meir, 1997, Eqn. 27). If f ∈ FK,β ∩ L2 (K), then for any  > 0 and g ∈ F 3 , there exists an f ∈ F 7 such that dKL (f, f ) ≤ /β + C/ (nβ), for some C > 0 and n ∈ N. n g,n K n 2 Proof: By the triangle inequality, we have kfn − f kK,2 ≤ fn − f¯ apply Lemma 13 to obtain the desired result. 2 K,2 + f¯ − f 2 K,2 ≤  + C/n. We then Remark 16. The application of Corollary 6 requires the convolution of a compactly supported function with a function over Rp . In general, the convolution of two functions on different supports produces a function with a support that is itself a function of the original supports. That is, if f is supported on supp (f ) and g is supported on supp (g), then the support of f ∗ g is a subset of the closure of the set {x + y : x ∈ supp (f ) , y ∈ supp (g)}. In order to mitigate against any problems relating to the algebra of supports, we can allow any compactly supported PDF f to take values outside of its support K by simply setting f (x) = 0 if x ∈ / K and thus implicitly only work with functions over Rp . Remark 17. We note that [12] utilized a slightly different version of Corollary 6 that makes use of the alternative approximate identity αk (x) = k −p g (x/k) with k ∗ = 0. Here, g is taken to be a product kernel of radial basis functions. An approach for quantifying the error of the quasi-maximum likelihood estimator (quasi-MLE) for finite mixture models, with respect to the Hellinger divergence is then developed by [12] via the theory of [21]. We will instead pursue the bounding of KL errors for the MLE via the directions of [13] and [14]. IV. M AXIMUM LIKELIHOOD ESTIMATION BOUNDS VIA RESULTS FROM L I AND BARRON (1999) As alternatives to Lemma 14 and Theorem 15, we can interpret the following results from [13] for finite mixtures of location-scale PDFs over compact supports K. March 1, 2018 DRAFT 7  7 Theorem 18 (Li and Barron, 1999, Thm. 1). If g ∈ F 3 and f¯ ∈ Conv Fg6 , then there exists an fn ∈ Fg,n such  that dKL f¯, fn ≤ Cγ/n, where K ˆ ´ 2 [k p g (kx − km)] dΠm K ´ dx C= k p g (kx − km) dΠm K K √ with DFs Πm over Rp corresponding to f¯, and γ = 4 (log (3 e) + A) with A= sup log m1 ,m2 ,x k p g (kx − km1 ) . k p g (kx − km2 ) Remark 19. Although it is not explicitly mentioned in [13], a condition for the application of Theorem 18 is that g must be such that A < ∞ over K. This was alluded to in [14]. This assumption is implicitly made in the sequel.  5 Theorem 20 (Li and Barron, 1999, Thm. 2). For every f¯ ∈ Conv Fg6 (with corresponding DF Πm ), if f ∈ FK,β  7 KL f, f¯ + Cγ/n, where γ is as defined in and g ∈ F 3 , then there exists an fn ∈ Fg,n such that dKL K (f, fn ) ≤ dK Theorem 18, and C= ˆ K 2 [k p g (kx − km)] dΠm 2 f (x) dx. ´ k p g (kx − km) dΠm K ´ K   By Corollary 6 and Lemma 13, for every  > 0, there exists an f¯ ∈ Conv Fg6 , such that dKL f, f¯ < /β. K We thus have the following outcome. 5 7 such that dKL Corollary 21. If f ∈ FK,β and g ∈ F 3 , then for any  > 0, there exists an fn ∈ Fg,n K (f, fn ) ≤ /β + Cγ/n, where γ and C are as defined in Theorems 18 and 20. Corollary 21 implies that we can approximate a compactly supported PDF to arbitrary degrees of accuracy using finite mixtures of location-scale PDFs of increasing large number of components n. Thus far, the results have focused on functional approximation. We now present a KL error bounding result for the MLE. Let X1 , ..., XN be N independent and identically distributed (IID) random sample generated from a distribution 5 with density f ∈ FK,β . Define the log-likelihood function of an n-component mixture of location-scale PDFs g ∈ F 3 as `g,n,N (θ) = N X log j=1 " n X i=1 p # πi k g (kXi − kmi ) , where θ contains πi , k, and mi for i ∈ [n]. The MLE can then be defined as fˆg,n,N (x) = n X i=1 where θ̂n,N ∈ π̂i k p g (kx − k m̂i ) , n   o 7 θ̂ : `g,n,N θ̂ = sup `g,n,N (θ) , satisfying the restrictions of Fg,n Put the the corresponding estimators of πi and mi (i.e. π̂i , and m̂i ) into θ̂n,N . For B > 0, if K is a compact set and the Lipschitz condition sup |log [k p g (kx − m1 )] − log [k p g (kx − m2 )]| ≤ B km1 − m2 k1 (2) x∈K holds, then the following bound on the expected KL divergence for fˆg,n,N can be adapted from [13]. March 1, 2018 DRAFT 8 Theorem 22 (Li and Barron, 1999, Thm. 3). Let g ∈ F 3 and suppose that X1 , ..., XN is an IID random sample 5 from a distribution with density f ∈ FK,β . For every  > 0, if (2) is satisfied and A = m − m, then under the restrictions of Fg6 , there exists a finite C ∗ > 0, such that h  i  C ∗2 2np Ef dKL f, fˆg,n,N ≤ + γ 2 +γ log (N ABe) , K β n N γ is as in defined in Theorem 18. Proof: The original theorem provides the inequality  i h  C ∗2 2np f, fˆg,n,N ≤ dKL f, f¯∗ + γ 2 +γ log (N ABe) , Ef dKL K K n N    dKL f, f¯ . By definition dKL where f¯∗ is the argument that achieves inf ¯ f, f¯∗ ≤ dKL f, f¯ , and K K f ∈Conv(Fg6 ) K    f, f¯ < /β. Thus select any f¯ that satisfies dKL f, f¯ < /β and there exists an f¯ ∈ Conv Fg6 such that dKL K K we have the desired result. Remark 23. Since  can be made as small as we would like, the expected KL divergence between f and the MLE fˆg,n,N can be made arbitrarily small by choosing an increasing sequence of n that grows slower than N/ log N . For example, one can take n = O (log N ). Via some calculus, we obtain the optimal convergence rate by setting p  n=O N/ log N . V. C ONCENTRATION INEQUALITIES VIA RESULTS FROM R AKHLIN ET AL . (2005) We now proceed to utilize the theory of [14] to provide a concentration inequality for the MLE of finite mixtures of location-varying PDFs. Let N (∆, F, d) denote the ∆-covering number of the class F, with respect to the distance d. That is, N (∆, F, d) is the minimum number of ∆-balls that is needed to cover F, where a ∆-ball around f (with centre not necessarily in F) is defined as {g : d (f, g) < δ}; see for example [22, Sec. 2.2.2]. Further, define dn as the empirical distance. That is for functions f and g, and realizations x1 , ..., xN of the random variables PN 2 X1 , ..., XN , we have d2n (f, g) = N −1 i=1 [f (xi ) − g (xi )] . The following theorem can be adapted from [14, Thm. 2.1]. Theorem 24 (Rakhlin et al., 2005, Thm. 2.1). Let g ∈ F 3 and suppose that X1 , ..., XN is an IID random sample 5 from a distribution with PDF f ∈ FK,β such that f (x) < β for all x ∈ K. If fˆg,n,N is the MLE for an n-component finite mixture of g (under the restrictions of Fg6 ), then for any  > 0  2  h  i  8β β KL ˆ 2 + log Ef dK f, fg,n,N ≤ + β β nβ 2 ! ! ˆ β  1 βC 8β 1/2 6 +√ Ef log N ∆, Fg , dn dδ + β N β2 0 r   √ t β + 4 2 log , N β for some universal constant C, with probability at least 1 − exp (−t). March 1, 2018 DRAFT 9  Proof: The original statement of [14, Thm. 2.1] has dKL f, f¯∗ in place of /β. Thus, we obtain the desired K result via the same technique as that used in Theorem 22. Remark 25. To make it directly comparable to Theorem 22, one can integrate out the probability statement of Theorem 24 to obtain the inequality in expectation Ef h  i f, fˆg,n,N dKL K  2   β 8β ≤ + 2 + log β β nβ 2 " !# ˆ β  1 βC 1/2 6 +√ Ef log N δ, Fg , dn dδ N β2 0   √ 1 8β β +√ . + 4 2 log β β N See the proof of [14, Thm. 2.1] for details. The following corollary specializes the results of Theorem 24 to conform with the conclusion of Theorem 22. Corollary 26 (Rakhlin et al., 2005, Cor. 2.2). Let g ∈ F 3 and suppose that X1 , ..., XN is an IID random sample 5 from a distribution with density f ∈ FK,β such that f (x) < β for all x ∈ K. For every  > 0, if (2) is satisfied and A = m − m, under the restrictions of Fg6 , h  i C1 C2  Ef dKL +√ , f, fˆg,n,N ≤ + K β n N where C1 and C2 are constants that depend on β, β, A, B, C, and p. Here, C is the same universal constant as in Theorem 24. Remark 27. Corollary 26 directly improves upon the result of Theorem 22 by allowing n and N to increase independently of one another and still be able to achieve an arbitrarily small bound on the expected KL divergence of the MLE for finite mixtures of location-scale PDFs, under the same hypothesis. The corollary implies that the √  optimal choice for the number of components is to set n = O N . R EFERENCES [1] R. F. Hoskins, Delta Functions: Introduction to Generalized Functions. Oxford: Woodhead, 2009. [2] B. G. Lindsay, “Mixture models: theory, geometry and applications,” in NSF-CBMS Regional Conference Series in Probability and Statistics, 1995. [3] G. J. McLachlan and D. Peel, Finite Mixture Models. New York: Wiley, 2000. [4] D. M. Titterington, A. F. M. Smith, and U. E. Makov, Statistical Analysis Of Finite Mixture Distributions. [5] P. E. Rossi, Bayesian Non- and Semiparametric Methods and Applications. [6] J. L. Walker and M. Ben-Akiva, A Handbook of Transport Economics. New York: Wiley, 1985. Princeton: Princeton University Press, 2014. Edward Edgar, 2011, ch. Advances in discrete choice: mixture models, pp. 160–187. [7] G. Yona, Introduction to Computational Proteomics. Boca Raton: CRC Press, 2011. [8] J. T.-H. Lo, “Finite-dimensional sensor orbits and optimal nonlinear filtering,” IEEE Transactions on Information Theory, vol. IT-18, pp. 583–588, 1972. [9] T. S. Ferguson, Recent Advances in Statistics: Papers in Honour of Herman Chernoff on His Sixtieth Birthday. New York: Academic Press, 1983, ch. Bayesian density estimation by mixtures of normal distributions, pp. 287–302. [10] A. DasGupta, Asymptotic Theory Of Statistics And Probability. [11] W. Cheney and W. Light, A Course in Approximation Theory. March 1, 2018 New York: Springer, 2008. Pacific Grove: Brooks/Cole, 2000. DRAFT 10 [12] A. J. Zeevi and R. Meir, “Density estimation through convex combinations of densities: approximation and estimation bounds,” Neural Computation, vol. 10, pp. 99–109, 1997. [13] J. Q. Li and A. R. Barron, “Mixture density estimation,” in Advances in Neural Information Processing Systems, S. A. Solla, T. K. Leen, and K. R. Mueller, Eds., vol. 12. Cambridge: MIT Press, 1999. [14] A. Rakhlin, D. Panchenko, and S. Mukherjee, “Risk bounds for mixture density estimation,” ESAIM: Probability and Statistics, vol. 9, pp. 220–229, 2005. [15] S. Kullback and R. A. Leibler, “On information and sufficiency,” Annals of Mathematical Statistics, vol. 22, pp. 79–86, 1951. [16] B. Makarov and A. Podkorytov, Real Analysis: Measures, Integrals and Applications. New York: Springer, 2013. [17] W. A. Light, “Techniques for generating approximations via convolution kernels,” Numerical Algorithms, vol. 5, pp. 247–261, 1993. [18] R. Willink, “Normal moments and Hermite polynomials,” Statistics and Probability Letters, vol. 73, pp. 271–275, 2005. [19] M. D. Buhmann, Radial Basis Functions: Theory And Implementation. Cambridge University Press, 2003. [20] A. R. Barron, “Universal approximation bound for superpositions of a sigmoidal function,” IEEE Transactions on Information Theory, vol. IT-39, pp. 930–945, 1993. [21] H. White, “Maximum likelihood estimation of misspecified models,” Econometrica, vol. 50, pp. 1–25, 1982. [22] M. R. Kosorok, Introduction to Empirical Processes and Semiparametric Inference. March 1, 2018 New York: Springer, 2008. DRAFT
10math.ST
Quasi-regular sequences and optimal schedules for security games David Kempe∗ Leonard J. Schulman† Omer Tamuz‡ arXiv:1611.07169v6 [cs.GT] 29 Oct 2017 October 31, 2017 We study security games in which a defender commits to a mixed strategy for protecting a finite set of targets of different values. An attacker, knowing the defender’s strategy, chooses which target to attack and for how long. If the attacker spends time t at a target i of value αi , and if he leaves before the defender visits the target, his utility is t · αi ; if the defender visits before he leaves, his utility is 0. The defender’s goal is to minimize the attacker’s utility. The defender’s strategy consists of a schedule for visiting the targets; it takes her unit time to switch between targets. Such games are a simplified model of a number of real-world scenarios such as protecting computer networks from intruders, crops from thieves, etc. We show that optimal defender play for such security games, although played in continuous time, reduces to the solution of a combinatorial question regarding the existence of infinite sequences over a finite alphabet, with the following properties for each symbol i: (1) i constitutes a prescribed limiting fraction pi of the sequence. (2) The occurrences of i are spread apart close to evenly, in that the ratio of the longest to shortest interval between consecutive occurrences is bounded by a parameter K. We call such sequences K-quasi-regular; a 1-quasi-regular sequence is one in which the occurrences of each symbol form an arithmetic sequence. As we show, a 1-quasi-regular sequence ensures an optimal defender strategy for these security games: the intuition for this fact lies in the famous “inspection paradox.” However, as we demonstrate, for K < 2 and general pi , K-quasi-regular sequences may not exist. Fortunately, this does not turn out to be an obstruction: we show that, surprisingly, 2-quasi-regular sequences also suffice for optimal defender play. What is more, even randomized 2-quasi-regular sequences suffice for optimality. We show that such sequences always exist, and can be calculated efficiently. Thus, we can ensure optimal defender play for these security games. The question of the least K for which deterministic K-quasi-regular sequences exist is fascinating. Using an ergodic theoretical approach, we proceed to show that deterministic 3-quasi-regular sequences always exist (and can be calculated efficiently). We also show that these deterministic 3-regular sequences give rise to a ≈ 1.006-approximation algorithm for the defender’s optimal strategy. For 2 ≤ K < 3 we do not know whether deterministic K-quasi-regular sequences always exist; however, when the pi are all small, improved bounds are possible, and in fact, (1 + ǫ)-quasi-regular deterministic sequences exist for any ǫ > 0 for sufficiently small pi . ∗ Department of Computer Science, University of Southern California. Supported in parts by NSF grants 1619458 and 1423618. † Engineering and Applied Science, California Institute of Technology. Supported in part by NSF grants 1319745, 1618795, and a EURIAS Senior Fellowship co-funded by the Marie Sklodowska-Curie Actions under the 7th Framework Programme. ‡ Departments of Economics and Mathematics, California Institute of Technology 1 1 Introduction One of the most successful real-world applications at the intersection of game theory and computer science has been security games. Security games have been used recently to model and address problems including the protection of infrastructure (airports, seaports, flights), deterrence of fare evasion and smuggling, as well as the protection of wildlife and plants. The related model of inspection games [4] has been used to model interactions as varied as arms control, accounting and auditing, environmental controls, or data verification. In general models of security games, there are n targets of various values that the defender tries to protect with her limited resources.1 Different assumptions and scenarios can lead to different interesting combinatorial constraints; see [31] for an overview of much recent work. In the present work, we are concerned with a defender who cannot switch instantaneously between different targets, which introduces a timing component and a scheduling problem. At a high level, such constraints arise in many natural security settings, including: 1. Protection of computer networks (with multiple databases or account holders) from infiltrators. 2. Protection of wildlife from poachers (e.g., [13, 12]), crops or other plants from thieves, or homes in a neighborhood from burglars. Stripping away details, we propose the following simplified model for these types of settings: If the attacker has access to an unprotected target, he gains utility in proportion to the value of the target and to the time he spends at the target.2 The game is zero-sum, i.e., the attacker’s gain is the defender’s loss. If the attack is interrupted by the defender at any time, both players receive utility 0. Due to physical distances between targets or switching costs between databases, the defender requires one unit of time to switch between any two targets. The problem of interest is to determine a schedule for the defender that will lead to minimum expected defender loss against a best-responding attacker. P More formally, each of the n targets has value αi ≥ 0, scaled so that i αi = 1. We assume that no target is strictly more valuable than all other targets combined,3 so that αi ≤ 1/2. Time is continuous, and the game has an infinite time horizon. A defender strategy is a schedule of which target is visited at each point in time, with some time spent in transit. An attacker strategy consists of a choice of a single time interval [t0 , t0 + t] and a target i to attack. If the defender does not visit target i during this interval, the attacker obtains a utility of U = t · αi , and the defender receives −U . If the defender visits the target at any point during the interval, both players’ utilities are 0. In our modeling of the security setting, an attack is a sufficiently disruptive event that it effectively ends the game, by which we mean that the defender will subsequently re-randomize her schedule. Thus, the entire game is concluded after one attack. We assume that the defender’s mixed strategy (but not randomness) is known to the attacker who will best-respond by choosing 1 For consistency, we always refer to the attacker with male pronouns and the defender with female pronouns. In the case of access to computer systems, this models a scenario observed in recent attacks where the attacker lurks — whether in order to monitor legitimate users, create ongoing damage, or because file sizes or bandwidth concerns make it impossible to download the entire database in a short amount of time. 3 See Section 7 for a discussion of this choice; outside of this assumption is a different régime that requires different analysis. 2 1 an attack (i, t0 , t), comprising the target i and the start time and duration4 of the attack, t0 and t. Accordingly, the defender chooses a Min-Max strategy: a strategy which minimizes the maximum expected return of any attack (i, t0 , t). Although the game is played in continuous time, we show (in Section 2) that under the assumption that αi ≤ 1/2 for all i, optimal defender strategies can be obtained as follows: choose a suitable (random) discrete sequence s0 , s1 , s2 , . . . of targets and a uniformly random τ ∈ [0, 1]; then visit each target st at time t + τ ∈ R+ . At all other times, the defender is in transit, so that each target is visited instantaneously, with the next target visited exactly one time unit later. It is not difficult to show that if each target i occupies a αi fraction of the sequence and is exactly evenly spaced in the sequence, the resulting defender schedule is optimal. Some intuition is derived from the famous “Inspection Paradox” or “Waiting Time Problem:” passengers of a bus service which departs a station with perfect regularity (e.g., 15 minutes apart) wait on average half as long as passengers of a service with the same frequency of operation but Poisson departure times. In our case, higher variance in the defender’s interarrival times lengthens the expected time until the next defender visit, making longer attacks more attractive. We call sequences in which each target i is exactly evenly spaced regular ; generalizing this notion, we call a sequence s K-quasi-regular (with respect to frequencies pi ; in our applications, we typically choose pi = αi ) if, as before, each target i takes up a pi fraction of the sequence, and the ratio of the longest to shortest interval between consecutive occurrences of i in s is bounded by K. Our first result (Theorem 3.1) is that — surprisingly — it suffices for optimality that the sequence is 2-quasi-regular. 1.1 Our Main Result It is fairly straightforward to show that there is some vector (pi )i such that there are no (2−ǫ)-quasiregular sequences for any ǫ > 0; we do this in Section 4. Our main result (Theorem 4.1 in Section 4) is that for any values pi , there exists a 2-quasi-regular random sequence, which can furthermore be efficiently computed from the pi . By the aforementioned Theorem 3.1, the corresponding defender mixed strategy is optimal. 1.2 Ergodic Schedules Quasi-regular sequences are basic combinatorial objects, quite apart from our application of them. One limitation of our work (although it does not affect the application) is that the resulting schedules are not ergodic: they randomize between different schedules in which the targets have frequencies differing from the desired pi . It is then a natural question whether 2-quasi-regular ergodic sequences can be obtained as well. This is related to the following combinatorial question: given densities pi , does there always exist a 2-quasi-regular deterministic sequence? We provide two partial answers to this question. In Section 5, we analyze a very simple schedule called the Golden Ratio Schedule (variations of which have been studied in the context of hashing [22, pp. 510,511,543], bandwidth sharing [21, 26] and elsewhere). This schedule is generated by the following random sequence: partition the circle of circumference 1 into intervals of size pi 4 One could consider an “adaptive” attacker, who initially only chooses the start time t0 , and decides on t on the fly. The resulting model would be equivalent, as such an adaptive attacker at any time t′ > t0 has learned no new information aside from the fact that he has not yet been caught; any attacker who under these conditions will decide to wait for exactly t units of time (if not caught) is exactly equivalent to one who chooses the attack (i, t0 , t) at once. 2 corresponding to the targets i. Choose a uniformly √ random starting point on the circle. In each 1 step, add ϕ to the current point; here, ϕ = 2 (1 + 5) is the Golden Ratio. In each time step, the defender visits the target i into whose interval the current point falls. This random sequence is ergodic, and at worst 3-quasi-regular.5 Moreover, for any choice of the random starting point, the deterministic sequence is 3-quasi-regular. Thus we show that there always exist deterministic 3-quasi-regular sequences. We do not know if this is true for any K < 3. It is interesting that such a simple schedule achieves constant quasi-regularity, but the bound is not strong enough to guarantee optimality of the schedule for the defender. However, we show that the schedule is nearly optimal for the defender: the attacker’s utility is within a factor of at most 1.006 of the minimum attacker utility (and this bound is tight). The proof of this approximation guarantee relies on a theorem of Slater about simple dynamical systems like the Golden Ratio shift, and a somewhat intricate analysis of the attacker’s response. We find it remarkable that such a simple policy comes provably within 0.6% of the optimum, in particular compared to another very simple policy: as we show in Appendix A, the simple i.i.d. schedule, which always chooses the next target i to visit with probability αi , independent of the history, is only a 4/e-approximation. As a second partial result towards obtaining an optimal ergodic schedule, in Section 6, we show a sufficient condition for the existence of (1 + ǫ)-quasi-regular sequences, for any ǫ > 0. Specifically, ǫ ) for all i, then a (1 + ǫ)let M be the smallest common denominator of all pi . If pi = O( √n log M quasi-regular periodic schedule exists and can be found efficiently using a randomized algorithm that succeeds with high probability. The algorithm is based on placing points for target i at uniform distance proportional to 1/pi on the unit circle, with independent uniformly random offsets. Points can only be matched to sufficiently close multiples of 1/M . An application of Hall’s Theorem, similar to [32, 17], shows that under the conditions of the theorem, this algorithm succeeds with high probability in producing a (1 + ǫ)-quasi-regular sequence. Related Work Several notions of “sequences in which elements i are roughly regularly spaced, with given frequencies pi ” have been studied in different contexts. Dating back to the work of Tijdeman [32, 33], several papers [1, 17, 32, 33, 9] (see also an overview in [8]) have studied sequences with low discrepancy in the following sense: up to any time t, the number of occurrences of element i approximates t · pi as closely as possible. For our application, the rate of convergence of the frequencies to pi is not essential; but it is crucial that the defender’s interarrival times at each target be as regular as possible. Consequently, methods from this literature are not sufficient to optimally solve our problem. In the PinwheelP Problem [18, 19, 6, 24, 14], one is given integers n1 , n2 , . . . , nk ≥ 2, whose density is defined by β := i 1/ni ≤ 1. The goal is to produce a sequence s of the elements {1, . . . , k} such that for each i, each subsequence (st , st+1 , . . . , st+ni −1 ) of length ni contains at least one occurrence of the symbol i. One of the main questions in this area is what values β are sufficient to guarantee the existence of such a sequence. Currently, it is known that β ≤ 5/6 is necessary (i.e., there are examples with β = 5/6 + ǫ such that no s exists), and β ≤ 7/10 is sufficient. In our case, we always have desired frequencies adding up to 1, and we have not only (looser) upper bounds, but also lower bounds on the distance between consecutive occurrences. While some of the basic techniques 5 When all pi ≤ 1 − 1/ϕ, the quasi-regularity guarantee improves to 8/3, and as pi → 0, it converges to ϕ2 . 3 in the context of the Pinwheel Problem are similar to the ones we use (in Section 4), solutions for one problem do not imply solutions to the other. In concurrent and independent work, Immorlica and Kleinberg [20] — motivated in part also by applications to preventing wildlife poaching — defined a “Recharging Bandits” problem in which the available reward at targets grows according to (unknown) concave functions. In the full-information setting (in which the functions are known), (near-)optimal solutions correspond to schedules that visit targets with given frequencies at roughly evenly spaced intervals. The precise definition of “roughly evenly spaced” differs from ours, and while some of the techniques used in [20] are similar to ours, optimality results and approximation guarantees do not imply each other in either direction. Our work is related to the inspection games literature (see, e.g., [4, 35]). Specifically, several articles [11, 2, 3] consider models in which an inspectee indulges in illegal activity once or multiple times within a finite time interval. An inspector distributes optimally the times at which she performs a fixed number of inspections, and suffers a loss that is proportional to the time that has elapsed between the beginning of illegal activity and the next inspection. In these models, as in ours, the inspector wants to visit inspectees regularly while keeping the inspectee uncertain about visit times. The lack of travel time restrictions as well as the lack of a need to catch the inspectee at the time of his action make the models mathematically incomparable. Finally, our work is also related to the literature on patrol games. Here, as in our model, a defender (or multiple cooperating defenders) must decide on a schedule of visits to targets facing attacks. However, unlike our model, the attacker observes the past locations of the defender(s) before deciding whether and where to attack (see, e.g., [5, 36]). 2 Preliminaries The n targets have values αi >P 0 for all i. Because the units in which target values are measured are irrelevant, we assume that i αi = 1. We assume that no target has value exceeding the sum of all other targets’ values, meaning (after normalization) that αi ≤ 12 for all i. A pure strategy (schedule) for the defender is a measurable mapping ℓ : R≥0 → {1, 2, . . . , n, ⊥}, where ⊥ denotes that the defender is in transit. A schedule ℓ is valid if ℓ(t) = i and ℓ(t′ ) = j 6= i implies that |t′ − t| ≥ 1. In other words, there is enough time for the defender to move from i to j (or from j to i). We use L to denote the set of all valid pure defender strategies. The defender moves first and chooses a mixed strategy, i.e., a distribution Λ over L, or a random ℓ. Then, the attacker chooses an attack (i, t0 , t) consisting of a target i, a start time t0 , and an attack duration t. Subsequently, a mapping ℓ is drawn from the defender’s distribution Λ. The attacker’s utility is ( 0 if ℓ(τ ) = i for some τ ∈ [t0 , t0 + t] (1) U (ℓ, (i, t0 , t)) = αi · t otherwise. Since we are considering a zero-sum game (see Section 7 for a discussion), the defender’s utility is −U (ℓ, (i, t0 , t)). Note that the attacker attacks only once. A rational attacker will choose (i, t0 , t) so as to maximize Eℓ∼Λ [U (ℓ, (i, t0 , t))]; therefore, the defender’s goal is to choose Λ to minimize U (Λ) = sup Eℓ∼Λ [U (ℓ, (i, t0 , t))] . i,t0 ,t 4 The fact that we assume an infinite time horizon is primarily an idealization, in order to avoid mathematical inconveniences at the end of the time horizon. The reader is encouraged to think of the “infinite” time horizon as one or a few days, long enough that a significant schedule needs to be planned and boundary effects can be ignored at small cost; but short enough that the attacker cannot observe early parts of the schedule to infer which schedule ℓ was drawn from Λ. 2.1 Canonical, Shift-Invariant, and Ergodic Schedules The general definition of defender schedules allows for strange schedules that are clearly suboptimal. We would like to restrict our attention to “reasonable” schedules. In particular, we will assume the two following conditions, which we later show to hold without loss of generality. (Here, we will be slightly informal in our definitions. Precise definitions and constructions ensuring these properties are given in Appendix B.) • Whenever the defender transitions from one target i to a target i′ (i′ = i is possible), she spends exactly one time unit in transit. We call such schedules canonical. • To the attacker, any two times t and t′ “look the same,” in that for any t, t′ , τ ∈ R+ , the distributions of the defender’s schedule restricted to the time intervals [t, t + τ ] and [t′ , t′ + τ ] are the same. We call such schedules shift-invariant or stationary. Because the strategy spaces of both players are infinite, it is not clear a priori that a Min-Max schedule for the defender exists. In Appendix B, we show that an optimal mixed Min-Max defender strategy does exist, and is w.l.o.g. canonical and shift-invariant. Therefore, for the remainder of this paper, we will focus only on shift-invariant canonical schedules. When the defender’s strategy is shift-invariant, the start time t0 of the attack does not matter, so shift-invariance allows us to implicitly assume that the attacker always attacks at time t0 = 0. We then simply write U (Λ, (i, t)) for the attacker’s expected utility from attacking target i for t units of time. One may additionally be interested in constructing ergodic shift-invariant mixed schedules: Λ is ergodic if Λ cannot be written as the convex combination Λ = λΛ1 + (1 − λ)Λ2 of two different shift-invariant mixed schedules (see the formal discussion in Appendix B). While we are not aware of game-theoretical implications of ergodicity, the question is mathematically natural, and may be important in some extensions of our model. 2.2 Return Times and Target Visit Frequencies For the following definitions, recall that we are focusing only on shift-invariant canonical schedules. Accordingly, we assume without loss of generality that the attacker starts his attack at time 0. Since the attacker chooses only the target i and the duration t of the attack, from his perspective, the property of the defender’s strategy that matters is the distribution of her next return time to target i, defined as Ri = min{t ≥ 0 | ℓ(t) = i}. Given a target i and a defender strategy, let Fi (t) = P[Ri ≤ t] denote the CDF of Ri . In particular, notice that Fi (0) is the fraction of time the defender spends waiting at target i. In terms of the distribution of return times Fi , the attacker’s utility can be expressed as follows: U (Fi , (i, t)) = αi · t · (1 − Fi (t)). 5 (2) Next, we define a random variable Bi capturing the (random) duration between consecutive visits to the same target i. Notice the subtle difference between this quantity and the time from the defender’s perspective between leaving a target and returning to it. By comparison, the distribution of Bi should assign higher probability to higher values: as in the inspection paradox, at a random point in time, the attacker is more likely to find himself in a large gap. In other words, larger gaps are more likely to appear at a fixed time than on average over a long time stretch. Defining the distribution for Bi precisely requires some care, and is done formally in Appendix B. The construction formalizes the following intuition: we can consider the limit as we shift the random schedule ℓ left by a real number t → ∞. This extends a shift-invariant random schedule from the non-negative reals to all reals, and allows us to consider the random variable Bi = (inf{t ∈ R, t > 0 | ℓ(t) = i}) − (sup{t ∈ R, t ≤ 0 | ℓ(t) = i}). The random variable Bi captures the time between consecutive visits before and after time 0 — by shift-invariance, the time 0 is arbitrary here. Our constructions will always ensure that Bi is finite. We can write Fi in terms of Bi . First, we note that conditioned on Bi = τ , the distribution of Ri is uniform between 0 and τ . Hence, its conditional CDF is P[Ri ≤ t | Bi = τ ] = min(1, t/τ ). The unconditional CDF of Ri for t > 0 is then Z ∞ Z 1 Z 1 P[Bi ≤ τ ] P[Bi ≤ t/τ ]dτ = t · dτ ; P[t/Bi ≥ τ ]dτ = Fi (t) = EBi [min(1, t/Bi )] = τ2 t 0 0 (3) the final equality uses a change of integration variable. For t = 0, we have that Fi (0) = P[Bi = 0] is the probability that the defender is at target i at time 0. Two key quantities for our analysis are pi = Fi (1), Ti = 1 − Fi (0) . pi − Fi (0) In every canonical schedule, pi is the fraction of time that the defender is either at target i or in P transit to i. Thus, i pi = 1 in every canonical schedule. Ti intuitively captures the “expected time” between consecutive visits to target i, as seen by the defender. However, this intuition formally holds only for periodic schedules, necessitating the preceding more complex definition for arbitrary schedules. The most useful facts about Fi are summarized by the following proposition: Proposition 2.1 1. Fi (·) is concave. 2. Fi (t) ≤ Fi (0) + (pi − Fi (0)) · t, with equality iff P[Bi = 0 or Bi > t] = 1. Proof. 1. For each x, the function min(1, t/x) is concave in t. Hence, Fi (t) = Ex [min(1, t/x)], being a convex combination of concave functions, is concave. 2. Rearranging and applying (3), we want to show that Z ∞ Z ∞ P[Bi ≤ τ ] P[Bi ≤ τ ] dτ − t · dτ ≥ (t − 1) · Fi (0). t· 2 τ τ2 t 1 Combining the two integrals and lower-bounding P[Bi ≤ τ ] ≥ Fi (0) yields that the left hand side is at least Z t 1 Fi (0) · t · dτ = Fi (0) · (t − 1), 2 1 τ with the lower bound holding with equality iff P[Bi = 0 or Bi > t] = 1. 6 2.3 Schedules from Sequences All the constructions of mixed defender schedules in this paper will have the property that the defender never waits at any target, instead traveling immediately to the next target. That such schedules are optimal (and hence the focus on such constructions is w.l.o.g.) is a consequence of our main Theorem 3.1, and hinges on the restriction that αi ≤ 1/2 for all i. A brief discussion of what happens when this assumption is relaxed is given in Section 7. Canonical schedules without waiting are readily identified with schedules defined only on integer times, since the defender must only choose, after visiting a target, which target she will visit next. We call such schedules sequences, defined as s : N → {1, . . . , n}. A sequence, together with a start time t0 , naturally defines a canonical schedule, by setting ℓ(t) = st−t0 if t − t0 ∈ N, and ℓ(t) =⊥ otherwise. Σ denotes a distribution over sequences, or the distribution of a random sequence s. Shift-invariance (or stationarity) can be defined for random sequences as for (continuous) mixed schedules. When s is a periodic sequence, i.e., there is a k such that st+k = st for all t, a shiftinvariant random sequence can be obtained particularly easily, by choosing a uniformly random κ ∈ {0, . . . , k − 1}, and defining s′ via s′t = st+κ ; for aperiodic sequences, we give a construction in Appendix B. From a shift-invariant random sequence, we can obtain a shift-invariant mixed schedule straightforwardly, by choosing the start time t0 ∈ [0, 1] uniformly. For the special case of random sequences, the definitions of pi and Ti simplify to pi = P[s1 = i] (which is now exactly the fraction of target visits devoted to target i), and Ti = 1/pi (since Fi (0) = 0). 2.4 Regular and Quasi-Regular Sequences We say that a shift-invariant random sequence s is K-quasi-regular (with respect to target frequencies pi ) if the following two hold for each target i: 1. P[s1 = i] = pi . 2. There is some bi such that P[bi ≤ Bi ≤ K · bi ] = 1. In other words, each target i is visited with frequency pi , and the maximum gap for consecutive visits to target i is within a factor K of the minimum gap with probability 1. A random sequence is regular if it is 1-quasi-regular, meaning that all visits to target i are spaced exactly Ti apart. (All definitions extend directly to canonical, mixed, shift-invariant schedules.) A particularly straightforward way to obtain a K-quasi-regular random sequence Σ is to consider the a subsequential limit of uniformly random shifts of a deterministic sequence s in which the gaps between consecutive visits to i are bounded between bi and Kbi , and the density of entries which are i is pi . 3 The Attacker’s Response, and Optimal Schedules In this section, we show the following main theorem, a sufficient condition for a random sequence to be optimal for the defender. Theorem 3.1 Consider a random shift-invariant sequence such that the following two hold for each target i: 7 • Ti = 1/αi . i Ti ≤ Bi ≤ ηi Ti ] = 1. • For each i, there exists an ηi such that P[ ηiη+1 Then, the associated mixed strategy is optimal for the defender. In particular, these conditions hold for 2-quasi-regular random sequences with respect to αi . In Section 4, we show that there always exists a 2-quasi-regular sequence. With the eventual goal of proving Theorem 3.1, we fix a target i, and for now drop the subscript i, so that p = pi F (t) = Fi (t) T = Ti B = Bi . We fix p and T and study which sequences — among all those with given p and T — are optimal for the defender. Our algorithmic constructions will choose pi = αi for all i; however, in order to show the optimality of this choice, the following proposition and corollary are proved for general p, T . Proposition 3.2 Consider any canonical shift-invariant mixed defender schedule (over the nonnegative real numbers). By choosing t = T /2, the attacker guarantees himself a utility of at least α · 1−F4 (0) · T . Proof. By Equation (2), the attacker’s utility at time t = T /2 is α · (T /2) · (1 − F (T /2)). Using Proposition 2.1, we can bound   p − F (0) 1 − F (0) 1 − F (T /2) ≥ 1 − F (0) − (p − F (0)) · (T /2) = (1 − F (0)) · 1 − · (T /2) = . 1 − F (0) 2 Hence, the attacker’s utility is at least α · 1−F (0) 4 · T. Recalling that a random sequence by definition does not involve waiting at any target, we obtain the following simple corollary about random sequences that are worst for the attacker: Corollary 3.3 Among random sequences with fixed T and p, any random sequence is optimal for the defender if the attacker’s payoff is upper-bounded by 14 · α · T . The following corollary is particularly useful: Corollary 3.4 Fix T and p, and consider a random sequence in which the attacker’s optimal attack duration t satisfies P[B > t] = 1. Then, this random sequence is optimal for the defender. Furthermore, in this case, w.l.o.g., t = T /2. Proof. By the assumption that P[B > t] = 1 and Proposition 2.1, we have that F (t) = p · t. Hence, the attacker’s utility is α · (1 − p · t) · t = α · t·(TT−t) ≤ α · T4 . Now, the claim follows directly from Corollary 3.3. That t = T /2 is a best response follows from Proposition 3.2. We can now apply these corollaries to show optimality for a single target for which the “quasiregularity” of return times holds. 8 Proposition 3.5 Fix T and p, and consider a random sequence such that for some η, P[ η T ≤ B ≤ ηT ] = 1. η+1 Then, this schedule is optimal for the defender among schedules with these T and p. η . By Proposition 3.2, choosing t = T /2, the attacker can guarantee Proof. We write ξ = η+1 1 himself at least a utility of 4 · α · T . We will show below that the attacker’s utility for any attack duration t ∈ [ξT, ∞) is at most 14 · α · T . Hence, the attacker has an optimal attack duration t ≤ ξT (either t = T /2 or a different t). By the assumption that P[ξT ≤ B] = 1 and Proposition 2.1, F (ξT ) = p · ξT . Using the concavity of F , this implies that F (t) = p · t for all t ≤ ξT . Thus, whichever such t is optimal for the attacker, Corollary 3.4 implies that F is optimal for the defender, and furthermore, that t = T /2 is optimal for the attacker after all. It remains to prove the upper bound for t ≥ ξT . For any t ≥ ηT , the assumption that B ≤ ηT with probability 1 implies that F (ηT ) = 1, and hence a utility of 0 for the attacker. So we focus on t ∈ [ξT, ηT ], and show that in this range, the maximum utility of the attacker is at most α · T /4. We proved above that F (ξT ) = ξ, and by the assumption P[B ≤ ηT ] = 1, we get that F (ηT ) = 1. Since F is concave by Proposition 2.1, for t ∈ [ξT, ηT ], F is bounded below by the line connecting (ξT, ξ) and (ηT, 1), so η−1 1−ξ η−1 1 t t − ξT · (1 − ξ) = ξ · + ·t = + 2· . (η − ξ)T η − ξ (η − ξ)T η η T   Hence, the attacker’s utility is upper-bounded by α · t · (1 − F (t)) ≤ α · t · η1 − η12 · Tt . This is   ∗ · 1 − 1 · t∗ maximized at t∗ = ηT , so we obtain that α · t · (1 − F (t)) ≤ α · t = α · T4 . 2 η η2 T F (t) ≥ ξ + Proof of Theorem 3.1. To complete the proof of Theorem 3.1, we now consider multiple targets i. By the assumptions of the theorem and Proposition 3.5, against the proposed class of random sequences, the attacker can obtain utility at most 14 , regardless of which target i he attacks and for how long; this follows by substituting Ti = 1/pi = 1/αi . We will show that no shift-invariant mixed defender schedule (now considered over the nonnegative real numbers) can achieve an expected attacker payoff strictly smaller than 14 . Focus on a shift-invariant mixed defender schedule Λ. By Lemma B.2, we may assume that ΛP is canonical. Such an index must exist because i αi = 1 and P Fix some index i such that αi /pi ≥ 1. 1 1 for all i, this also implies that p ≤ . p ≤ 1. Because we assumed that α ≤ i i i i 2 2 By Proposition 3.2, attacking target i for t = Ti /2 units of time, the attacker can guarantee himself a utility of at least 1 αi · (1 − Fi (0))2 pi ≤ 2 1 1 1 − Fi (0) · Ti = αi · ≥ αi · ≥ , 4 4(pi − Fi (0)) 4pi 4 where the final inequality followed because the chosen index i satisfied αi /pi ≥ 1. Hence, the attacker can guarantee himself a payoff of at least 41 against any mixed defender schedule, proving optimality of the proposed class of random sequences. 9 Finally, we show that this applies to 2-quasi-regular random sequences. Assume that there exists a b such that P[b ≤ Bi ≤ 2b] = 1, and define ηi = 2b/Ti . First, this definition directly implies that Bi ≤ ηi Ti with probability 1. Second, because Bi ≤ 2b with probability 1, we get that i Ti = 2b/T2bi +1 ≤ b. Hence, the fact that Bi ≥ b with probability 1 implies Ti ≤ 2b, and hence ηiη+1 i that Bi ≥ ηiη+1 Ti with probability 1, completing the proof. 4 An Optimal Defender Strategy In this section, we present Algorithm 1, constructing a 2-quasi-regular random sequence. Such a random sequence is optimal for the defender by Theorem 3.1. We begin with the high-level algorithm, and fill in the details of the key steps below. Algorithm 1 An optimal schedule for the defender 1: Let pi = αi for all i. 2: For each i, let mi be such that 2−mi ≤ pi < 21−mi . Let Ii = [2−mi , 21−mi ]. 3: Use the algorithm from the proof of Lemma 4.3 for p and the Ii to randomly round p to a probability vector q, such that all but at most one index i have qi = 2−mi or qi = 21−mi . 4: Use the algorithm from the proof of Lemma 4.5 to produce a periodic sequence s. 5: Return the random sequence obtained by choosing a uniform random shift of s. Notice that the sequence produced by Algorithm 1 is shift-invariant by construction, but not ergodic, since it randomizes over different shift-invariant distributions. Theorem 4.1 The random sequence generated by Algorithm 1 is 2-quasi-regular, and hence optimal for the defender. We begin with a simple technical lemma. Lemma 4.2 Let S be a multiset of powers of 2, such that maxp∈S p ≤ 2−k ≤ P exists a submultiset T ⊆ S with p∈T p = 2−k . P p∈S p. Then, there Proof. We prove this claim by induction on |S|. The claim is trivial for |S| = 1. Consider |S| ≥ 2, and distinguish two cases. 1. If S contains two copies of some number p < 2−k , then construct S ′ by replacing these two copies with p′ = 2p. By induction hypothesis, S ′ contains a subset T ′ adding up to 2−k . If T ′ contained the newly constructed element p′ , then replace it with the two copies of p. In either case, we have the desired set T ⊆ S. 2. Otherwise, S contains at most one copy of each number p ≤ 2−k . If S did not contain 2−k , P P∞ −(k+i) then p∈S p < i=1 2 = 2−k , contradicting the assumptions of the lemma. Hence, S contains 2−k , and the singleton set of that number is the desired subset. Lemma 4.3 Let p = (p1 , p2 , . . . , pn ) be a probability distribution. For each i, let Ii = [ℓi , ri ] ∋ pi be an interval. Then, there exists a distribution D over probability distributions q = (q1 , q2 , . . . , qn ) such that: 10 1. E [qi ] = pi for all i, 2. qi ∈ Ii for all q in the support of D, and 3. For each q in the support of D, all but at most one of the qi are equal to ℓi or ri . Proof. We will give a randomized “rounding” procedure that starts with p and produces a q, satisfying all of the claimed properties, by making the pi equal to ℓi or ri one at a time. The randomized rounding bears similarity to dependent randomized rounding algorithms in the approximation algorithms literature (e.g., [7, 15, 30]), though we do not require concentration bounds, and allow one of the qi to be an interior point of its interval. In the rounding, we always consider two indices i, j with pi = ℓi + ǫi , pj = ℓj + ǫj , such that 0 < ǫi < ri − ℓi , 0 < ǫj < rj − ℓj . (That is, neither pi nor pj is on the boundary of its interval.) We probabilistically replace them with p′i , p′j , such that all of the following hold: • At least one of p′i , p′j is at the boundary of its interval. • ℓi ≤ p′i ≤ ri and ℓj ≤ p′j ≤ rj . • p′i + p′j = pi + pj . h i • E [p′i ] = pi and E p′j = pj . The rounding terminates when there is at most one pi that is not at the boundary of its interval; let q be the vector of probabilities at that point. By iterating expectations, we obtain that E [qi ] = pi for all i. The upper and lower bounds on qi are maintained inductively, and the termination condition ensures the third claimed property of q. So consider arbitrary pi , pj as above. Let δi = min(ǫi , rj − ℓj − ǫj ) and δj = min(ǫj , ri − ℓi − ǫi ). δj δj With probability δi +δ , round pi to p′i = pi − δi and pj to p′j = pj + δi . With probability 1 − δi +δ = j j δi δi +δj , round pi to p′i = pi + δj and pj to p′j = pj − δj . First, it is clear that p′i + p′j = pi + pj . Also, by definition of δi , δj , we get that ℓi ≤ p′i ≤ ri and ℓj ≤ p′j ≤ rj . If we round according to the first case, then p′i = pi − δi and p′j = pj + δi . If δi = ǫi , then we get that p′i = ℓi , while if δi = rj − ǫj , then p′j = ℓj + ǫj + (rj − ℓj − ǫj ) = rj . Calculations are similar in the other case. Finally, E [p′i ] = the claimed properties hold in each step. δj δi +δj · (pi − δi ) + δi δi +δj · (pi + δj ) = pi . Hence, all As a first step towards a 2-quasi-regular random sequence, we consider the case of probability vectors in which all probabilities are powers of 2.6 Lemma 4.4 Assume that the probability vector p is such that each pi = 2−mi is a power of 2. Then, there exists a regular sequence for p. 6 Lemma 4.4 generalizes to powers of any integer, and in fact to any probabilities pi such that for any i, j, we have that pi |pj or pj |pi . The existence of a schedule for powers of 2 (and the generalization) has been previously observed in the context of the Pinwheel Problem in [18]. 11 Proof. We will prove this claim by induction on the number of targets. If we have a single target, then its probability must be 1, so it is visited at intervals of 1 and we set s to be the constant sequence. Otherwise, the maximum probability of any target is 21 , and the sum of all probabilities is 1. Lemma 4.2 therefore guarantees the existence of a subset S whose probabilities add up to 12 . Consider instances obtained from S and S̄ by scaling up all probabilities by a factor of 2, resulting in p′i = 2pi . By induction hypothesis, each of those instances can be scheduled such that each target i is visited every 1/p′i = 1/(2pi ) time steps. Now alternate between the two sequences. In this new sequence, each target i is visited every 2/p′i = 1/pi steps, as desired. Next, we show that sufficiently good sequences can also be achieved when at most one of the probabilities is not a power of 2. Lemma 4.5 Assume that the probability vector p is such that each pi = 2−mi is a power of 2, except for (possibly) p1 = 2−m1 − ǫ, with 0 ≤ ǫ < 2−(m1 +1) . Then, there exists a (non-random) periodic sequence s with the following properties: 1. The time between consecutive visits to target i > 1 is always exactly 1/pi . 2. The time between consecutive visits to target 1 is always either 2m1 or 2m1 +1 . 3. The frequency of target i is pi for all i. Proof. We distinguish two cases7 : P 1 1. If p1 ≤ 21 , then by Lemma 4.2, there exists a subset S ⊆ {2, . . . , n} with i∈S pi = 2 . ′ Schedule the targets in S regularly in the odd time slots, and set pi = 2pi for all i ∈ / S. The p′i satisfy the conditions of the lemma, so we inductively find a schedule for all the i ∈ / S satisfying the conclusion of the lemma, then stretch this schedule by a factor of 2 and use all the even time slots for it. 2. If p1 > 12 , then we schedule target 1 in all odd time slots, and set p′1 = 2(p1 − 21 ) and p′i = 2pi for all i ≥ 2. The new p′i sum to 1 and satisfy the conditions of the lemma. So we inductively find a schedule for the frequencies p′i , stretch it by a factor of 2, and use all the even time slots for it. Notice that item 1 is scheduled at distance at most 2, and at least 1, while all other items are scheduled regularly. That the resulting schedule is periodic is seen inductively over the applications of the two cases. Proof of Theorem 4.1. Consider any target i. The rounding of Lemma 4.3 guarantees that 2−mi ≤ qi ≤ 21−mi . Therefore, the algorithm of Lemma 4.5 produces a random sequence Σq in which the time intervals between consecutive occurrences of target i lie between 2mi −1 and 2mi . Thus to verify that Σq is 2-quasi-regular is remains to show that the expected density of each target is equal to αi . But this is guaranteed by (1) in Lemma 4.3. The optimality of Σq now follows from Theorem 3.1. The second part of Theorem 4.1 shows that 2-quasi regular random sequences exist; here, we remark that this result cannot be improved, in the following sense (proved in Appendix C). 7 We would like to thank an anonymous reviewer for suggesting this elegant proof. 12 Proposition 4.6 Let n = 3 and α = (1/2, 1/3, 1/6). Then, for every ǫ > 0, there are no (2 − ǫ)quasi-regular random sequences. 5 Golden Ratio Scheduling In this section, we present a very simple ergodic random sequence. The associated schedule may in general be suboptimal, but we prove that it is within less than 0.6% of optimal. √ Let ϕ = 21 (1 + 5) denote the Golden Ratio, solving ϕ2 = ϕ + 1. Given a desired frequency vector p (which will equal the targets’ values, pi = αi ), we identify the unit circle with [0, 1), −1 and P addition modulo 1. We define the function h : [0, 1) → {1, . . . , n} via h (i) = P equip it with [ i′ <i pi′ , pi + i′ <i pi′ ); that is, we assign consecutive intervals of length pi for the targets i. Algorithm 2 The Golden Ratio Schedule 1: Let λ be uniformly random in [0, 1). 2: for t = 0, 1, 2, . . . do 3: In step t, set st = h((λ + ϕt) mod 1). We can think of advancing a “dial” by ϕ (or ϕ − 1) at each step, and visiting the target whose interval the dial falls into. This algorithm is nearly identical to one previously proposed for hashing [22, pp. 510,511,543] and broadcast channel sharing [21, 26]. While the algorithm is simple, as stated, it seems to require precise arithmetic with real numbers. This issue is discussed in more detail in Appendix E. That Algorithm 2 returns an ergodic random sequence follows from the classical fact that the action on the interval by an irrational rotation is ergodic. Our main theorem in this section is the following: Theorem 5.1 The Golden Ratio algorithm is a fender. √ 2966−1290 5 81 ≈ 1.00583 approximation for the de- The underlying reason that this schedule performs so well, and the reason for choosing specifically the Golden Ratio, is related to the hardness of diophantine approximation of the Golden Ratio: it is an irrational number that is hardest to approximate by rational numbers (see, e.g., [16]). Our analysis relies heavily on various properties of Fibonacci numbers. We denote the kth Fibonacci number by fk , indexed as f0 = 0, f1 = 1 and fk+2 = fk + fk+1 . The following basic facts about Fibonacci numbers are well-known, and easily proved directly or by induction. Lemma 5.2 2 1. For any k, we have that fk+2 fk − fk+1 = (−1)k+1 . 2. For any k, we have that fk = k ϕk −(−1/ϕ) √ . 5 3. For any odd k, we have that fk+1 /fk < ϕ. 4. For any even k, we have that fk+1 /fk > ϕ. To prove Theorem 5.1, we analyze the distribution of Bi for any target i. The proof of Theorem 5.1 consists of two parts. First, Theorem 5.3 precisely characterizes the distribution of Bi for every target i, i.e., it characterizes exactly, for each target i and τ , how frequently a visit to target 13 i is followed by another visit τ steps later. (We call such a τ a return time.) As a second part, we characterize the attacker’s best response against this distribution, and calculate its cost to the defender. Theorem 5.3 (Slater [28]) Assume that p ≤ 21 . Let k be smallest such that |fk+1 − ϕfk | ≤ ϕp (4) Then, the distribution of return times is   P[Bi = fk+1 ] = fk+1 · p − (1/ϕ)k+1 ,   P[Bi = fk+2 ] = fk+2 · p − (1/ϕ)k+2 ,   P[Bi = fk+3 ] = fk+3 · −p + (1/ϕ)k , (5) P[Bi = t] = 0 for all other t. Theorem 5.3 shows, remarkably, that for each possible p, there are at most three possible return times, and they are three consecutive Fibonacci numbers. Theorem 5.3 is a special case of a theorem of Slater [28, Theorem 4] (see also [29]), which characterizes the distribution when the Golden Ratio ϕ is replaced by an arbitrary real number. We give a self-contained proof for the simpler case of the Golden Ratio in Appendix D. As a direct corollary of Theorem 5.3, we obtain an upper bound on the quasi-regularity of the Golden Ratio schedule. Corollary 5.4 The Golden Ratio schedule is 3-quasi-regular. If pi ≤ 1 − 1/ϕ for all i, then it is 8/3-quasi-regular. As the frequencies pi → 0, the regularity guarantee improves to ϕ2 -quasi-regular. Proof. Consider one target i with desired frequency pi , and define k as in Theorem 5.3. The schedule is at worst (fk+3 /fk+1 )-quasi-regular. For all k, we have the bound fk+3 /fk+1 ≤ 3. If pi < 1 − 1/ϕ, then k ≥ 2, and for k ≥ 2, the ratio fk+3 /fk+1 is upper-bounded by 8/3, converging to ϕ2 as k → ∞. 5.1 The Optimal Attacker Response to 3-Point Distributions Next, we characterize the optimal attacker response to defender strategies in which the return time distribution to target i is supported on three points 1 ≤ x1 < x2 < x3 only, so that with probability one, Bi ∈ {x1 , x2 , x3 }. In the remainder of this section, we omit the subscript i, as we will always analyze one target only. P P Recall that T = 1/F (1), and let qj = P[B = xj ]· xTj . Note that j qj xj = j P[B = xj ]·T = T . Informally (but in a sense that can be formalized), the qj ’s are the return time probabilities from the point of view of the defender, rather than those of the attacker at a fixed time 0. (The attacker’s distribution of Bi oversamples long return times, compared to the defender’s distribution.) The attacker’s response and utility are summarized by the following lemma. Lemma 5.5 Assume that x2 ≤ 2x1 , x3 ≤ 2x2 (as is the case with Fibonacci numbers). Let u∗1 = (T −q1 x1 )2 1 1 ∗ 4 · α · T , and u2 = 4 · α T (1−q1 ) . Then, against the given three-point distribution, the attacker’s utility is at most max(u∗1 , u∗2 ). Against any distribution with expected defender absence T , the attacker’s utility is at least u∗1 . 14 Proof. The lower bound of u∗1 is simply the statement of Corollary 3.3. So we focus on the upper bound of max(u∗1 , u∗2 ) for the remainder of the proof. From the attacker’s perspective, when arriving at a target, by Equations (5) and (3), the CDF of the distribution of the defender’s next return time is  1  for t ≤ x1 ,  T ·t    1 · (t(1 − q ) + q x ) for x1 ≤ t ≤ x2 , 1 1 1 F (t) = T1  for x2 ≤ t ≤ x3 ,  T · (t(1 − q1 − q2 ) + q1 x1 + q2 x2 )   1 for t ≥ x3 . Since the attacker’s utility for waiting for t steps is t(1 − F (t)), t ≥ x3 cannot be optimal for him. By taking derivatives with respect to t, we obtain the following local optima for the functions in the remaining three cases: t∗1 = T 2 t∗2 = T − q 1 x1 2(1 − q1 ) t∗3 = T − q 1 x1 − q 2 x2 x3 = . 2(1 − q1 − q2 ) 2 These are all local maxima because the functions are concave. Under the assumption of the theorem, t∗3 = x3 /2 ≤ x2 . Therefore, t∗3 does not lie in the interval it optimized for, and can never be optimal. As a result, the attacker’s best response8 will always be t∗1 or t∗2 . The attacker’s utility for these two attack times will be αT 1 αT · = , 2 2 4   T − q 1 x1 T − q 1 x1 1 ∗ ∗ ∗ u2 = α · t2 · (1 − F (t2 )) = α · · 1− · + q 1 x1 2(1 − q1 ) T 2 α (q2 x2 + q3 x3 )2 α (T − q1 x1 )2 · = · . = 4 T (1 − q1 ) 4 T (q2 + q3 ) u∗1 = α · t∗1 · (1 − F (t∗1 )) = The attacker’s utility will thus be at most the maximum of u∗1 , u∗2 . 5.2 The Attacker’s Response to the Golden Ratio Schedule max(u∗ ,u∗ ) 1 2 Proof of Theorem 5.1. Applying Lemma 5.5, it is our goal to upper-bound . If u∗1 ∗ ∗ ∗ ∗ ∗ max(u2 , u1 ) = u1 , the approximation ratio is 1; hence, it suffices to upper-bound u2 /u1 . In applying Lemma 5.5, we have T = 1/α, x1 = fk+1 , x2 = fk+2 , x3 = fk+3 , and the qj are given via Equation (5) and qj = P[Bi = xj ] · xTj . Then, u∗2 /u∗1 can be written as follows: 8 It is possible that one of t∗1 , t∗2 also lies outside its interval. But our goal here is only to derive an upper bound. 15 2 (T − q1 x1 )2 2 (q2 fk+2 + q3 fk+3 ) = α · T 2 (1 − q1 ) q2 + q3 2   α − (1/ϕ)k+2 · fk+2 + −α + (1/ϕ)k · fk+3 =α· (α − (1/ϕ)k+2 ) + (−α + (1/ϕ)k ) 2  (1/ϕ)k+2 · (ϕ2 − 1) · fk+2 + −α + (1/ϕ)k · fk+1 =α· . (1/ϕ)k+2 · (ϕ2 − 1)  2 = α · (1/ϕ)k+1 · fk+2 + ϕfk+1 − α · ϕk+1 · fk+1 . (6) Treating everything except α as a constant, the approximation ratio is thus of the form g(α) = aα · (c − bα)2 . g has a local maximum of 4ac3 /27b at α = c/(3b), a local minimum of 0 at α = c/b, and goes to infinity as α → ∞. Thus, the two candidates for α that we need to check are (1) the largest α that is possible for a given k, and (2) the value α = c/(3b). We therefore next calculate the largest possible α for a given k. By recalling the definition of k from Equation (4) (smallest such that |fk+1 /ϕ − fk | ≤ α), and using Lemma D.1,  we can solve for  α to determine the range in which we obtain a particular k, giving us that α ∈ (1/ϕ)k+1 , (1/ϕ)k . 1. If we substitute the upper bound α = (1/ϕ)k , Equation (6) simplifies to  2 α · (1/ϕ)k+1 · fk+2 + ϕfk+1 − (1/ϕ)k · ϕk+1 · fk+1 = (1/ϕ)k · (1/ϕ)k+1 · (fk+2 + ϕfk+1 − ϕfk+1 )2   1 = · (1/ϕ)2k+1 · ϕ2k+4 − 2ϕk+2 (−1/ϕ)k+2 + (−1/ϕ)2k+4 5   1 = · (1/ϕ)2k+1 · ϕ2k+4 − 2(−1)k + (1/ϕ)2k+4 5 1 1 ≤ · (ϕ3 + 3/ϕ2k+1 ) ≤ · (ϕ3 + 3/ϕ3 ) < 1. 5 5 This shows that the attacker’s utility cannot be maximized by waiting for more than x1 steps when α is as large as it can be for a given k. 2. Next, we investigate the local maximum9 of Equation (6). Substituting a = (1/ϕ)k+1 , b = ϕk+1 · fk+1 , and c = fk+2 + ϕfk+1 , the approximation ratio is 3 4 2k+2 (fk+2 + ϕfk+1 ) · (1/ϕ) · 27 fk+1 ϕk+2 − (−1/ϕ)k+2 + ϕ · ϕk+1 − ϕ · (−1/ϕ)k+1 4 1 · · (1/ϕ)2k+2 · = 27 5 ϕk+1 − (−1/ϕ)k+1 3 2ϕk+2 − (−1/ϕ)k+1 4 1 2k+2 = · · (1/ϕ) · . 27 5 ϕk+1 − (−1/ϕ)k+1 9 3 This local maximum is indeed always a feasible choice for α for a given k, but since we are only interested in an upper bound, we omit the feasibility proof. 16 We will approximate the function (2ϕk+2 −(−1/ϕ)k+1 ) 3 ϕk+1 −(−1/ϕ)k+1 3 by 8 ϕ2k+5 , its highest-order term. We (2ϕk+2 −(−1/ϕ)k+1 ) therefore consider ϕk+1 −(−1/ϕ)k+1 /(8ϕ2k+5 ). When k is even, this ratio is always upperbounded by 1 (and increasing in k, converging to 1). When k is odd, this ratio is lower-bounded by 1, and decreasing in k, also converging to 1. Thus, it is maximized among feasible values 15 6 +6ϕ−3 −ϕ−12 of k for k = 3, where it equals 8ϕ −12ϕ . Overall, we get an upper bound on the 8ϕ15 −8ϕ7 attacker’s utility of 1 4 · 5 27 ϕ3 = 5 8ϕ15 − 12ϕ6 + 6ϕ−3 − ϕ−12 · (1/ϕ)2k+2 · (8ϕ2k+5 ) 8ϕ15 − 8ϕ7 4 8ϕ15 − 12ϕ6 + 6ϕ−3 − ϕ−12 · · . 27 ϕ15 − ϕ7 · To evaluate this ratio, we can repeatedly apply the fact that ϕ2 = 1 + ϕ, then substitute that √ 1+ 5 ϕ = 2 , make the denominator rational, and cancel out common factors. This shows that ϕ3 5 · 4 27 · 8ϕ15 −12ϕ6 +6ϕ−3 −ϕ−12 ϕ15 −ϕ7 = √ 2966−1290 5 81 ≈ 1.00583, completing the proof. Remark 5.6 The analysis of Theorem 5.1 is actually tight. By choosing k = 3, b =√ϕ4 · f4 , and 23 − 25 ≈ 0.1597. c = f5 + ϕf4 , we obtain that the worst-case value of a target is α = c/(3b) = 18 Substituting k = 3 into the attacker’s utility in Case (2) (before the lower bound is applied) gives √ 2966−1290 5 us exactly a ratio of ≈ 1.00583. 81 6 Scheduling via Matching In this section, we show that for every ǫ > 0, if the individual probabilities αi are small enough (as a function of ǫ), then (1 + ǫ)-quasi-regular ergodic, periodic schedules exist. In order to obtain a periodic strategy, it is clearly necessary for all target values αi (equaling the visit frequencies) to be rational. Write αi = ai /bi , and let M = lcm(b1 , . . . , bn ). Our algorithm is based on embedding M slots for visits evenly on the unit circle, and matching them with targets to visit. We identify the circle with the interval [0, 1] and use the distance d(x, y) = min(|x − y|, 1 − |x − y|). q 2 ǫ · n log Theorem 6.1 Fix ǫ > 0, and assume that αi ≤ 4+2ǫ M for all i. Then, Algorithm 3 succeeds with high probability. Whenever Algorithm 3 succeeds, it produces a (1 + ǫ)-quasi-regular (and hence defender-optimal) sequence. We begin by proving the second part of the theorem. First, in a perfect matching, exactly Ai of the M slots, i.e., an αi fraction, are scheduled for target i, giving that pi = ai /bi = αi . Thus, Ti = 1/αi . If t is matched with (i, j), by definition of the edges, d(yi,j , t/M ) ≤ δ. Consider two occurrences ′ j, j of target i, and let t, t′ be the slots they are matched to. Then, by triangle inequality, d(t/M, t′ /M ) ≥ d(yi,j , yi,j ′ ) − 2δ ≥ 1 − 2δ. Ai (7) On the other hand, specifically for consecutive occurrences of target i, i.e., the slots matched to yi,j and yi,j+1 , we get 17 Algorithm 3 A matching-based algorithm for a periodic defender strategy 1: for each target i do 2: Let θi ∈ [0, 1] independently uniformly at random. 3: Let Ai = M · αi . 4: For j = 0,q . . . , Ai − 1, let yi,j = (θi + j/Ai ) mod 1. 5: 6: 7: 8: 9: 10: M 1 Let δ = M · n log . 2 Let Z = {0, 1, . . . , M −1} be the set of slots and let Y = {(i, j) | 0 ≤ j < Ai }. Define a bipartite graph G on Z ∪ Y by including an edge between t ∈ Z and (i, j) ∈ Y iff d(yi,j , t/M ) ≤ δ. if G contains a perfect matching M then Define a sequence s with period M as follows: For each time t, set st to be the (unique) target i such that t is matched with (i, j) in M for some j. else Start from the beginning. 1 + 2δ. (8) Ai q ǫ 2 and αi ≤ 4+2ǫ · n log M , we obtain that d(t/M, t′ /M ) ≤ d(yi,j , yi,j ′ ) + 2δ ≤ Using that δ = 1 Ai 1 Ai + 2δ − 2δ = 1 M 1 αi 1 αi · q n log M , 2 as well as q M + 2 n log 2 q ≤ M − 2 n log 2 4+2ǫ ǫ 4+2ǫ ǫ 1 Ai · · = q q 1 M ·αi n log M 2 n log M 2 q M + 2 n log 2 q = M − 2 n log 2 4+2ǫ ǫ 4+2ǫ ǫ +2 = 1 + ǫ, −2 proving that the resulting sequence is (1 + ǫ)-quasi-regular. To complete the proof, it remains to show that with high probability, the graph G contains a perfect matching. We will prove this using Hall’s Theorem and a direct application of the Hoeffding Bound: Lemma 6.2 (Hoeffding Bound) Let Xi be independent random variables such that ai ≤ Xi ≤ bi P with probability 1. Let X = i Xi . Then, for all t > 0, −P P[X < E [X] − t], P[X > E [X] + t] < e 2t2 i (bi −ai ) 2 . To establish the Hall condition of G, we begin with intervals W ⊆ Z of slots, and then use the bounds for intervals to derive the condition for arbitrary sets of slots. A similar style of proof was used by Tijdeman [32] to construct a schedule with somewhat different specific combinatorial properties. For any set W ⊆ Z of slots, let Γ(W ) denote the neighborhood of W in G. Fix an interval W = {ℓ, ℓ + 1, . . . , r − 1} ⊆ [0, M ) with ℓ, r integers. Let the random variable XW = |Γ(W )| denote the number of neighbors in G of slots in thePinterval W . For each target i, let XW,i be the number of j such that (i, j) ∈ Γ(W ). Then, XW = i XW,i , and the XW,i are independent. Lemma 6.3 Fix a target i, and assume that |W | ≤ (1− 2δ)M , and write xi = Ai ·(2δ + (r − ℓ)/M ). Then, E [XW,i ] = xi and XW,i ∈ {⌊xi ⌋, ⌊xi ⌋ + 1}. 18 Proof. For each slot t ∈ W , let Jt be the interval S [(t/M − δ) mod 1, (t/M + δ) mod 1]. Then, (i, j) is adjacent to t iff yi,j ∈ Jt . Define J := t∈W Jt ; then, (i, j) is adjacent to a slot in W q M 1 iff yi,j ∈ J. Because δ = M · n log ≥ 1/(2M ), J is an interval, of the form [(ℓ/M − δ) 2 mod 1, (r/M + δ) mod 1]. The length of the interval is |J| = 2δ +(r−ℓ)/M . Because each yi,j is uniformly random in [0, 1], |J| ⌋ E [XW,i ] = Ai ·|J|. Furthermore, because d(yi,j , yi,j+1 ) = 1/Ai , there can be no more than 1+⌊ 1/A i |J| ⌋. Finally, note that pairs (i, j) with yi,j ∈ J, and no fewer than ⌊ 1/A i |J| 1/Ai = Ai (2δ+(r−ℓ)/M ) = xi . We use Lemma 6.3 to show that with high probability, G has a perfect matching. q 2 ǫ 2 · n log Lemma 6.4 Whenever αi ≤ 4+2ǫ M for all i, with probability at least 1 − 1/M , G contains a perfect matching. Proof. First, we show that when the Hall condition holds for all intervals W of slots, it holds for all sets W . We prove this by induction on the number of disjoint intervals that W comprises. The base case S of W being an interval is true by definition. For the induction step, suppose that k ≥ 2 and W = kj=1 Wj , where the Wj are disjoint intervals. P P If the neighborhoods of all the Wj are disjoint, then |Γ(W )| = j |Γ(Wj )| ≥ j |Wj | = |W |, where the inequality was from the base case (intervals). Otherwise, w.l.o.g., Γ(Wk ) ∩ Γ(Wk−1 ) 6= ∅. Then, there exists an interval I ′ ⊃ Wk ∪Wk−1 with Γ(I ′ ) = Γ(Wk )∪Γ(Wk−1 ). Let W ′ = W ∪I ′ . We get that |Γ(W )| = |Γ(W ′ )| ≥ |W ′ | ≥ |W |, where the first inequality was by induction hypothesis (because W ′ has at least one less interval). Next, we establish that the Hall Condition holds with high probability for all M 2 intervals. First, focus on one interval W = [ℓ, r), with ℓ, r ∈ N. If |W | > (1 − 2δ)M , then Γ(W ) contains all pairs (i, j), so the Hall Condition is satisfied. So focus on |W | ≤ (1 − 2δ)M . From Lemma 6.3, we get that X p E [XW ] = Ai · (2δ + (r − ℓ)/M ) = 2δM + (r − ℓ) = 2n log M + (r − ℓ). i Furthermore, XW is the sum of independent random variables XW,i which each takes on one of two adjacent values. From the Hoeffding Bound (Lemma 6.2), we get that X 2 P[XW < (r − ℓ) + 2 Ai δ − τ ] < e−2τ /n . i √ = 2M δ = 2n log M , we get that X ≥ (r − ℓ) + 2 Ai δ − τ = r − ℓ, Because |W | = r − ℓ, choosing τ = 2 |Γ(W )| = XW P i Ai δ i with probability at least 1 − e−4n log M/n = 1 − 1/M 4 . Taking a union bound over all M 2 candidate intervals W , we obtain that the probability of having a perfect matching is at least 1 − 1/M 2 . Thus, with high probability, G contains a perfect matching. This completes the proof of Lemma 6.4 and thus also Theorem 6.1. 19 7 Future Work Our work suggests a number of directions for future work. Most immediately, it suggests trying to find optimal ergodic schedules for all value vectors (not only those covered by Theorem 6.1). A promising approach toward this goal is to use the randomized rounding of Section 4, but re-round the probabilities every T steps, for some sufficiently large “epoch size” T . The difficulty with this approach is “stitching together” the schedules for different rounded frequencies at the boundary of epochs, without violating the conditions of Theorem 3.1. Throughout, we assumed that no target had value more than the sum of all other targets’ values, i.e., αi ≤ 21 for all i. When this assumption is violated, the optimal schedule will wait at the highest-value target. In the specific case of two targets of values α1 > 21 and α2 = 1 − α1 , it is q fairly straightforward to calculate that the wait time at target 1 is 2( αα12 − 1). We anticipate that a similar analysis will extend to more than two targets. The difficulty is that the waiting time at one target will result in qualitatively different schedules, likely to complicate the analysis. We assumed here that the game is zero-sum. In general, the utilities of the attacker and defender may be different. A general treatment is likely quite difficult. One special case is motivated directly by the wildlife protection application, and appears quite amenable to analysis. Specifically, when a poacher kills animals (or chops down trees), even if the poacher is captured, the damage is not reversed. Thus, while the attacker’s utility is as before, the defender’s utility from visiting target i at time τ when the attacker intends to stay for t units of time is −αi · min(τ, t). Because the sum of utilities is thus not constant (and typically negative), the defender’s goal becomes more strongly that of deterring (rather than just capturing) the attacker. As a result, the ability to commit to a strategy first (i.e., treating the game as a Stackelberg Game [34, 10]) may now carry some advantage for the defender. One can show that in the model in this paragraph, whenever the attacker attacks target i for t ≤ Ti /2 units of time, the defender’s utility is − 23 U (Fi , (i, t)). Since the optimal defender strategies of Section 4 and 6 ensure such a choice of t by the attacker, the algorithms in those sections are optimal in the non-zero sum model as well. Among the other natural generalizations are the attacker’s (and defender’s) utility function and more complex constraints on the defender’s schedule. Throughout, we have assumed that the attacker’s utility grows linearly in the time spent at a target. The security game formulations studied in much of the prior work in the area [31] correspond to a step function at 0: when the attacker reaches an unprotected target, he immediately causes the maximum target-specific damage αi (e.g., by blowing up the target). Other natural utility functions suggest themselves: if the resources to collect at targets are limited, the utility function would be linear with a cap. If a destructive attack takes a non-zero amount of time to set up, one obtains a step function at a time other than 0. The latter leads to a scheduling problem with a harder constraint on the inter-visit absence time from targets i — as in some of the prior security games literature, the defender may “sacrifice” some low-value targets to be able to fully protect the others. The other natural generalization is to relax the assumption of uniform travel time between targets. If an arbitrary metric is defined between targets, the problem becomes significantly more complex: even if all targets have value 1, the attacker’s utility will be proportional to the cost of a minimum TSP tour, and thus the defender’s optimization problem is NP-hard. However, it is far from obvious how to adapt standard TSP approximation techniques to the general problem with non-uniform values: high-value targets should be visited more frequently, and TSP approximation algorithms are not suited to enforce constraints that these visits be spaced out over time. 20 As with TSP problems and past work on security games, a further natural generalization is to consider multiple defenders, as, e.g., in [23]. Acknowledgments We would like to thank Omer Angel, Sami Assaf, Shaddin Dughmi, Fei Fang, Ron Graham, Bobby Kleinberg, Jim Propp, and Milind Tambe for useful discussions, and anonymous referees for useful feedback. 21 A Utility of an i.i.d. Defender One of the most natural random sequences to consider is the i.i.d. one, in which at each step t, the defender visits target i with probability pi , independent of any past choices. Intuitively, this strategy is suboptimal because it may visit a target i several times in close succession, or go for a long time without visiting target i. Here, we calculate the approximation ratio of this strategy, showing: Proposition A.1 The i.i.d. strategy is a 4/e-approximation for the defender, and this is tight. Proof. From the attacker’s viewpoint, the defender’s next arrival time at target i is the sum of two independent random variables geom(pi )+ unif([0, 1]). Given a t, the defender will return within at most t steps if and only if geom(pi ) ≤ ⌊t⌋ or geom(pi ) = 1 + ⌊t⌋ and unif([0, 1]) ≤ (t mod 1). The two events are disjoint, the first one having probability 1 − (1 − pi )⌊t⌋ , and the second having probability pi · (1 − pi )⌊t⌋ · (t mod 1). Hence, Fi (t) = 1 − (1 − pi · (t mod 1)) · (1 − pi )⌊t⌋ , and the attacker’s utility from attacking target i for t time units is αi · t · (1 − Fi (t)) = αi · t · (1 − pi · (t mod 1)) · (1 − pi )⌊t⌋ . Writing t = x + k for an integer k = ⌊t⌋ and x = (t mod 1) ∈ [0, 1), a derivative test shows that the expression is monotone decreasing in x for any k ≥ 1, whereas for k = 0, it has a local maximum at x = 2p1 i ≥ 1. Because the latter is not feasible, we only need to consider the case (t mod 1) = 0 for the remainder, so the attacker’s utility simplifies to αi · t · (1 − pi )⌊t⌋ . Taking a derivative with respect to t and setting it to 0 gives us that the unique local extremum pi −1 , where the attacker’s utility is e·ln(1/(1−p . This local extremum is a maximum is at t = ln(1−p i) i )) because the attacker’s utility at t = 0 and t = ∞ is 0. pi A derivative test and Taylor series bound shows that e·ln(1/(1−p is monotone decreasing in pi , i )) so it is maximized as pi → 0, where it converges to 1/e. Notice that as pi → 0, there are infinitely −1 is an integer, so the choice of t in our previous optimization is many values of pi for which ln(1−p i) indeed valid. Under an optimal schedule, the attacker’s expected utility is 14 , completing the proof of the approximation guarantee. B Formalization of Notions about Schedules B.1 Canonical Schedules The general definition of defender schedules allows for strange schedules that are clearly suboptimal, such as the defender leaving a target i and returning to it shortly afterwards, or visiting a target infinitely often within a bounded time interval with shorter and shorter return times. For ease of notation and analysis, we would like to rule out such schedules. The following definition captures “reasonable” schedules. Definition B.1 (canonical schedules) We say that a valid schedule ℓ is canonical if R+ can be partitioned into countably many disjoint intervals I1 , I2 , I3 , . . . with the following properties: 1. All S odd intervals I2k−1 are open and of length exactly 1, and ℓ(t) =⊥ if and only if t ∈ k I2k−1 . 22 2. All even intervals I2k are closed. (Even intervals could consist of a single point.) A defender mixed schedule Λ is canonical if it is a distribution over canonical deterministic schedules. Note that it follows from validity that any canonical ℓ is constant on the even intervals. Intuitively, a canonical schedule is one in which the defender travels as quickly as possible (in one unit of time) from one target to the next target, visits it for some (possibly zero) time, then travels to the next (necessarily different) target, etc. That we may focus on canonical schedules w.l.o.g. is captured by the following proposition: Proposition B.2 For each valid schedule ℓ, there exists a canonical schedule ℓ′ that is at least as good for the defender, in the sense that for any choice (i, t0 , t) of the attacker, U (ℓ′ , (i, t0 , t)) ≤ U (ℓ, (i, t0 , t)). Proof. Given ℓ, define ℓ′ as follows. 1. For every t with ℓ(t) 6=⊥ let ℓ′ (t) = ℓ(t). 2. For every t with ℓ(t) =⊥ (a) If t is in the closure of ℓ−1 (i), set ℓ′ (t) = i. (b) Denote by i(t) the last target visited before time t (setting i(t) = 1 if none exists) and by j(t) the first target visited after time t (again setting j(t) = 1 if none exists). Note that i(t) and j(t) are well-defined because ℓ is valid; this would not in general be true for an arbitrary ℓ : R+ → {1, . . . , n, ⊥}. (c) If i(t) = j(t) then set ℓ′ (t) = i(t). That is, if in ℓ, the defender leaves a target i and then comes back to it without visiting another, then in ℓ′ , the defender just stays at i. (In addition to the defining property of being canonical, this ensures that no target i is visited twice in a row.) (d) If i(t) 6= j(t) and the difference between t and inf{τ > t | ℓ(τ ) = j(t)} is at least 1, then set ℓ′ (t) = i(t). That is, if the defender took more than one unit of time to reach target j(t) from i(t), then she might as well have stayed at i(t) until one time unit before getting to j(t). (e) Otherwise, set ℓ′ (t) =⊥. It is easy to verify that ℓ′ is indeed canonical. Consider any choice of attack (i, t0 , t). Because the preceding transformations only replaced ⊥ (i.e., transit) times with times at targets, whenever the attacker is not caught in ℓ′ , he was not caught in ℓ, so his utility can only decrease: U (ℓ′ , (i, t0 , t)) ≤ U (ℓ, (i, t0 , t)). 23 B.2 Shift Invariance To simplify the analysis, we would like to restrict our attention to shift invariant schedules for the defender: schedules such that the attacker’s and defender’s utilities depend only on the duration t′ − t of the attack, but not on the start time t. We formally define this notion as follows, and show that this restriction is without loss of generality, as there is always an optimal shift-invariant schedule. For each τ ∈ R+ , define the shift operator Mτ : L → L by [Mτ (ℓ)](t) = ℓ(t + τ ). That is, the pure schedule Mτ (ℓ) is equal to ℓ, but leaves out the first τ time units of ℓ, shifting the remainder of the schedule forward in time. Note that U (Mτ (ℓ), (i, t0 , t)) = U (ℓ, (i, t0 + τ, t)). (9) The operator Mτ extends naturally to act on mixed schedules Λ.10 We say that a mixed schedule Λ is shift-invariant if Mτ (Λ) = Λ for all τ ∈ R+ . The following lemma shows that an optimal schedule for the defender exists, and that we may focus on shift-invariant schedules without loss of generality. Lemma B.3 The defender has an optimal mixed schedule that is shift-invariant. Proof. To prove this lemma, we introduce a natural topology on L, the space of valid canonical pure strategies. This topology is related to the Skorohod topology [27]. Given a ℓ ∈ L, define ℓ̄ : R+ → {1, . . . , n} by setting ℓ̄(t) to be either ℓ(t), if ℓ(t) 6=⊥, or else setting it to be the first target visited after time t. Thus, ℓ̄(t) is the target visited at time t, or the target that the defender is en route to visiting. Note that ℓ̄−1 (i) is the union of a countable set of intervals of length at least 1, each open on the left and closed on the right. Note also that the map ℓ 7→ ℓ̄ is “almost” invertible; since travel times are always 1, we know when each visit to each target began. The exception is the first visit, and so ℓ is determined by ℓ̄, together with the time of the beginning of the first target visit, which is always at most 1. The topology on L is the topology of convergence in L1 on compact sets. Specifically, for any t1 , t2 ∈ R+ , define ∆t1 ,t2 (ℓ′ , ℓ) to be the measure of the subset of [t1 , t2 ] on which at least one of the following two holds: (1) ℓ′ 6= ℓ, or (2) ℓ̄′ 6= ℓ̄. Then, we say that the limit of ℓm for m → ∞ is equal to ℓ iff ∆t1 ,t2 (ℓm , ℓ) → 0 for all t1 , t2 ∈ R+ . It is straightforward to verify that this topology is compact and metrizable.11 Hence the corresponding weak* topology on mixed strategies is also compact. Note also that the shift operator Mτ : S → S is continuous in this topology. Note that if ℓm →m→∞ ℓ, and if target i is visited in [t0 , t0 + t] in every ℓm , then it is also visited in [t0 , t0 + t] in ℓ. Hence, lim U (ℓm , (i, t0 , t)) ≥ U (ℓ, (i, t0 , t)), m→∞ and so U (·, (i, t0 , t)) is a lower semi-continuous map from L to R+ . It follows that Λ 7→ Eℓ∼Λ [U (ℓ, (i, t0 , t))] 10 A measurable map P : X → X can be extended to a linear operator on probability measures on X as follows: For any measurable A ⊆ X, define [P (µ)](A) = µ(P −1 (A)). This defines a mapping µ 7→ P (µ). Psubset−m 11 The metric is ∞ 2 dm (ℓ1 , ℓ2 ), where dm (ℓ1 , ℓ2 ) is the measure of the subset of [0, m] in which either ℓ1 and m=1 ℓ2 differ, or ℓ̄1 and ℓ̄2 differ. 24 is lower semi-continuous as well. Hence U (Λ) = sup Eℓ∼Λ [U (ℓ, (i, t0 , t))] i,t0 ,t is also lower-semicontinuous, and thus attains a minimum on the compact space of mixed strategies. Thus we have shown that an optimal schedule exists. When the attacker can obtain expected utility u against Mτ (ℓ) by choosing (i, t0 , t), he can obtain the same utility u against Λ by choosing (i, t0 + τ, t). Therefore, the defender’s utility is (weakly) monotone in τ , in the following sense: U (Mτ (Λ)) ≤ U (Λ). (10) Let Λ1 and Λ2 be mixed strategies, and let Λ = βΛ1 + (1 − β)Λ2 be the schedule in which Λ1 is carried out with probability β and Λ2 with probability 1 − β. Since suprema are subadditive, the attacker’s utility is convex: U (Λ) ≤ βU (Λ1 ) + (1 − β)U (Λ2 ). (11) Let Λ be an optimal mixed schedule. For m ∈ N let Z 1 m Mτ (Λ) dτ. Λm = m 0 By the monotonicity (Eq. (10)) and convexity (Eq. (11)) of U (Λ), we have that U (Λm ) ≤ U (Λ). Since L is compact, the sequence (Λm )m has a converging subsequence that converges to some Λ∞ . By the lower semi-continuity of U (Λ), U (Λ∞ ) ≤ lim U (Λm ) ≤ U (Λ); m→∞ therefore Λ∞ is also optimal. Finally, Λ∞ is by construction shift-invariant. B.3 Transitive and Ergodic Schedules We say that a shift-invariant mixed schedule Λ is transitive if almost every pure schedule ℓ0 chosen from Λ is periodic with some period τ (i.e., Mτ (ℓ0 ) = ℓ0 ) and Z 1 τ Λ= δ dt, τ 0 Mt (ℓ0 ) where δℓ is the point mass on ℓ. Intuitively, Λ simply repeats the same periodic schedule, with a phase chosen uniformly at random. A weaker property of a shift-invariant mixed schedule Λ is ergodicity: Λ is ergodic if almost every pure schedule ℓ0 chosen from Λ satisfies Z 1 τ δMt (ℓ0 ) dt. Λ = lim τ →∞ τ 0 In fact, this is not the usual definition of an ergodic measure, but the conclusion of the Ergodic Theorem. An equivalent property is that Λ cannot be written as the convex combination Λ = βΛ1 + (1 − β)Λ2 of two different shift-invariant measures. That is, Λ is an extremal point in the convex set (simplex, in fact) of shift-invariant measures. 25 B.4 Times Between Visits to Targets We now more formally define the notion of the (random) time between visits to a target i. While the notion is intuitively clear, for arbitrary defender strategies Λ, a precise definition requires some subtlety. We give a general definition for arbitrary mixed schedules, not just random sequences. Having defined schedules on R+ , we now extend the definition to schedules on [−τ, ∞) and eventually to R, using a standard construction called the bi-infinite extension. We define a modified shift operator M̃τ (·), mapping schedules (ℓ : R+ → {1, . . . , n, ⊥}) to τ -schedules ℓ′ : [−τ, ∞) → {1, . . . , n, ⊥}, via [M̃τ (ℓ)](t) = ℓ(t + τ ). Thus, M̃τ (ℓ) is simply a version of ℓ shifted τ units to the left. The map M̃τ (·) extends to a map on mixed schedules in the obvious way. For any shiftinvariant mixed schedule Λ, M̃τ (Λ) is also shift-invariant, and furthermore, for any τ ′ < τ , the distribution M̃τ (Λ), projected to [−τ ′ , ∞), is the same distribution as M̃τ ′ (Λ). It follows that Λ∞ = lim M̃τ (Λ) τ →∞ (12) is a well defined measure on pure schedules that are functions ℓ∞ : R → {1, . . . , n, ⊥}. We call Λ∞ the bi-infinite extension of Λ. It is straightforward to verify that it, too, is shift-invariant. Note that the distribution of the first visit to i at non-negative times, Ri = min{t ≥ 0 | ℓ(t) = i}, has the same distribution under Λ∞ as under Λ, since the restriction of Λ∞ to non-negative times is equal to Λ. Given a target i and a shift-invariant mixed schedule Λ, let ℓ̃ : (−∞, ∞) → {1, . . . , n, ⊥} be a random schedule with distribution Λ∞ . Let Bi be the (random) time between the last visit to i before time zero, until the first visit to i after time zero: Bi = (inf{t ≥ 0 | ℓ̃(t) = i}) − (sup{t ≤ 0 | ℓ̃(t) = i}). The choice of time 0 here is immaterial because of shift invariance. Bi could be infinite, but this will never happen in an optimal Λ, because it would imply that the attacker’s expected utility for choosing i is infinite; we hence assume henceforth that P[Bi = ∞] = 0. Finally, contrary to what one might intuitively guess, even for transitive Λ, the distribution of Bi is not the same as the longrun empirical distribution of times between visits, as gaps are chosen at time 0 with probability proportional to their length. The same holds for general Λ. C Tightness of the 2-Quasi-Regularity Result In this section, we prove Proposition 4.6. For convenience, we restate the proposition here: Proposition 4.6 Let n = 3 and p = (1/2, 1/3, 1/6). Then, for every ǫ > 0, there are no (2 − ǫ)-quasi-regular random sequences. Proof. Let s be a (2 − ǫ)-quasi-regular random sequence. We claim that B1 = 2 with probability 1, and B2 = 3 with probability 1. For suppose that with positive probability B1 ≤ 1. Then, because T1 = 2, we also would have to have B1 ≥ 3 with positive probability, and vice versa. Similarly, B2 ≤ 2 with positive probability iff B2 ≥ 4 with positive probability. Either of those cases would lead to a ratio (3/1 or 4/2) larger than 2 − ǫ, violating (2 − ǫ)-quasi-regularity. Hence, with probability one, target 1 appears in every other time period and target 2 appears in every third time period, which is impossible. 26 D Proof of Theorem 5.3 In this section, we prove Theorem 5.3, restated here for convenience: Theorem 5.3 (Slater [28]) Assume that p ≤ 21 . Let k be smallest such that |fk+1 /ϕ − fk | ≤ p. Then, the distribution of return times is   P[Bi = fk+1 ] = fk+1 · p − (1/ϕ)k+1 ,   k+2 , P[Bi = fk+2 ] = fk+2 · p − (1/ϕ)   P[Bi = fk+3 ] = fk+3 · −p + (1/ϕ)k , P[Bi = t] = 0 for all other t. We begin with a few simple, but useful, technical lemmas. First, we give a closed form for expressions of the form fk+1 − ϕfk . Lemma D.1 For any k, we have that fk+1 − ϕfk = (−1/ϕ)k . Proof. write Using the closed-form expression for Fibonacci Numbers (Part 2 of Lemma 5.2), we can   ϕk+1 − (−1/ϕ)k+1 − ϕk+1 − ϕ(−1/ϕ)k √ fk+1 − ϕfk = 5 k+1 −(−1/ϕ) + ϕ(−1/ϕ)k √ = 5 1/ϕ + ϕ = (−1/ϕ)k · √ = (−1/ϕ)k ϕ. 5 Lemma D.2 1. For all δ ∈ (− 12 , 12 ] and integers N ≥ 1, the following two are equivalent: • δ = (ϕN ) mod 1. • There exists a positive integer D with N/D − ϕ = δϕ/D. 2. Let δ = (ϕfk ) mod 1 for k ≥ 2 (where we consider the range of the (− 21 , 12 ]). Then, δ = fk /ϕ − fk−1 . mod operation to be Proof. 1. Because ϕ = 1 + 1/ϕ, the first condition can be rewritten as (1 + 1/ϕ)N = δ + D ′ for some integer D ′ . When δ < 0, we must have D ′ > N ; when δ ≥ 0, because N/ϕ > 12 ≥ δ, we again have D ′ > N . The preceding equality can therefore be rearranged to N/ϕ = δ + (D ′ − N ). Multiplying by ϕ/(D ′ − N ) now gives equivalence with the second condition, writing D = D ′ − N . 27 2. In the first part of the lemma, set N = fk . Then, the condition is equivalent to the existence of a positive integer D with fk /D − ϕ = δϕ/D, implying that |fk − Dϕ| = |δ|ϕ. By choosing D = fk−1 , according to Lemma D.1, we get that k≥2 |fk /ϕ − fk−1 | = (1/ϕ)k ≤ 1 . 2 Therefore, for any D 6= fk−1 , we get that |fk /ϕ − D| > 1 − 12 = 12 , meaning that no D 6= fk−1 can satisfy fk /D − ϕ = δϕ/D. By substituting the unique choice D = fk−1 , we obtain the second part of the lemma. Because the Fibonacci numbers are the convergents of the Golden Ratio, they provide the best rational approximation, in the following sense. Theorem D.3 Let M̂ ≥ 1 be arbitrary. Let k be the largest even number with fk ≤ M̂ , and k′ the largest odd number with fk′ ≤ M̂ . Then, for all M ≤ M̂ and all N , we have the following: 1. N/M > ϕ implies fk+1 /fk ≤ N/M . 2. N/M < ϕ implies fk′ +1 /fk′ ≥ N/M . Theorem D.3 follows directly from standard results stating that the convergents provide the best approximation to real numbers (e.g., [25, p. 11], noting that the second (intermediate) case cannot happen for the Golden Ratio). We are now ready to prove the characterization of the distribution of Bi under the Golden Ratio schedule. Proof of Theorem 5.3. We begin by showing that the support of return times consists only of Fibonacci Numbers. Consider the interval I = [0, p). Let m ≥ 1 be a return time. Let x ∈ I be arbitrary, and y = (x + ϕm) mod 1, which is in I by assumption. Define δ = y − x. Because both x, y ∈ I, we have that δ ∈ [−x, p − x). By Part 1 of Lemma D.2, there is a positive integer D such that m/D − ϕ = δϕ/D ∈ [−xϕ/D, (p − x)ϕ/D). We now distinguish two cases: • If δ > 0, then m/D > ϕ, so Case 1 of Theorem D.3 implies that the largest even j such that fj ≤ D satisfies fj+1 /fj > ϕ and fj+1 /fj ≤ m/D. Thus, (x + ϕfj+1 ) mod 1 ∈ I, meaning that the defender returns to the target in fj+1 steps. Because D ≥ fj and m/D ≥ fj+1 /fj , we get that m ≥ fj+1 ; unless m = fj+1 , this would contradict the definition of m as a return time, so we have shown that m is a Fibonacci number. • Similarly, if δ < 0, and thus m/D − ϕ < 0, then Case 2 of Theorem D.3 implies that the largest odd j such that fj ≤ D satisfies fj+1 /fj − ϕ < 0 and fj+1 /fj ≥ m/D. By the same argument, we obtain now that m = fj+1 . 28 Next, we prove the second part of the theorem. First, notice that the k defined in the theorem actually exists. By Lemma D.1, we get that |fk+1 − ϕfk | = (1/ϕ)k → 0 as k → ∞, so there exists a k (and thus a smallest k) with |fk+1 − ϕfk | ≤ ϕp. We show that there cannot be a return time m < fk+1 . If there were, then by the previous part of the proof, m would be a Fibonacci number, say, m = fℓ . And because m ≥ 1, we get that ℓ ≥ 2. By Part 2 of Lemma D.2, that means that fℓ /ϕ−fℓ−1 = y −x, and hence |fℓ /ϕ−fℓ−1 | = |y −x| < p, contradicting the definition of k as smallest with that property. Consider a return to I within m steps, starting from x ∈ I and ending at y ∈ I, so that δℓ := y − x satisfies |δℓ | < p. By the preceding analysis, m = fℓ for some ℓ ≥ k + 1. Again, by Part 2 of Lemma D.2, we obtain that δℓ = fℓ /ϕ − fℓ−1 . When δℓ < 0, the x ∈ I with x + δℓ ∈ I are exactly captured by the interval Jℓ := [|δℓ |, p], while for δℓ > 0, they are exactly the interval Jℓ := [0, p − δℓ ). In either case, the interval Jℓ has size exactly |Jℓ | = p − |δℓ |. We will show that Jk+2 ∪ Jk+3 = I. By Lemma 5.2, the signs of δℓ are alternating, meaning that the intervals Jℓ alternate being of the form [0, x] and [y, p). In particular, to show that Jk+2 ∪Jk+3 = I, it suffices to show that |Jk+2 | + |Jk+3 | ≥ p. Because |Jk+2 | + |Jk+3 | = 2p − |δk+2 | − |δk+3 |, this is equivalent to showing that |δk+2 | + |δk+3 | ≤ p. We distinguish two cases, based on whether k is even or odd. • If k is even, then δk+2 = fk+2 /ϕ − fk+1 < 0 and δk+3 = fk+3 /ϕ − fk+2 > 0, so we obtain that |δk+3 | + |δk+2 | = fk+3 /ϕ − fk+2 − fk+2 /ϕ + fk+1 = fk+1 /ϕ − fk = |fk+1 /ϕ − fk | ≤ p, by the definition of k. • If k is odd, then δk+2 = fk+2 /ϕ − fk+1 > 0 and δk+3 = fk+3 /ϕ − fk+2 < 0, so we obtain that |δk+2 | + |δk+3 | = fk+2 /ϕ − fk+1 − fk+3 /ϕ + fk+2 = fk − fk+1 /ϕ = |fk+1 /ϕ − fk | ≤ p. Thus, we have shown that the support of the distribution is indeed contained in {fk+1 , fk+2 , fk+3 }. Finally, we can work out the frequencies. Conditioned on being in the interval of size p, the probability of being in Jℓ is qℓ = |Jℓ |/p. To arrive at the attacker’s observed distribution of Bi , we notice that the probability of time 0 being in an interval of length fℓ is Thus, we obtain that qf qf P ℓ ℓ = ℓ ℓ = fℓ · |Jℓ |. 1/p q f j j j P[Bi = fk+1 ] = fk+1 · |Jk+1 | = fk+1 · (p − |fk+1 /ϕ − fk |), P[Bi = fk+2 ] = fk+2 · |Jk+2 | = fk+2 · (p − |fk+1 − fk+2 /ϕ|), P[Bi = fk+3 ] = 1 − q1 − q2 = fk+3 · (−p + |fk+1 /ϕ − fk + fk+1 − fk+2 /ϕ|) = fk+3 · (−p + |fk−1 − fk /ϕ|). Notice that we arranged the terms inside absolute values such that for even k, they are all positive, while for odd k, they are all negative. This allowed us to simply add inside the absolute value. Applying Lemma D.1 to all three terms now completes the proof. 29 E Computational Considerations for the Golden Ratio Schedule As phrased, Algorithm 2 requires precise arithmetic on irrational numbers, and drawing a uniformly random number from [0, 1]. Here, we discuss how to implement the algorithm such that each target i visited in step t can be computed in time polynomial in the input size. Let pi = aP i /bi for each i, and write M = lcm(b1 , . . . , bm ) for the common denominator. Notice that log M ≤ i log bi is polynomial P in the input size. For each i, the number Pi = i′ <i pi′ is rational. To decide whether target i is visited in step t, the algorithm needs to decide if (λ + t/ϕ) mod 1 ∈ [Pi , Pi+1 ], or — equivalently — if there is an integer D with λ+t/ϕ ∈ [D+Pi , D+Pi+1 ]. To decide whether λ+t/ϕ < D+Pj or λ+t/ϕ > D+Pj (for j ∈ {i, i + 1}), the algorithm needs to decide if ϕ < D+Pt j −λ or ϕ > D+Pt j −λ . The key question is how many digits of ϕ the algorithm needs to evaluate for this decision, and how many digits of the uniformly random offset λ it needs to decide on. Suppose that the algorithm has generated the first k random digits of λ, having committed for some ℓ ∈ {0, 1, . . . , 10k − 1}. Writing Pj = Nj /M (using the denominator to 10ℓk ≤ λ < ℓ+1 10k M defined above), a decision about target Pj can be made whenever ϕ < ϕ > tM 10k 10k ·M D+10k Nj −M ·(ℓ+1) tM 10k 10k ·M D+10k Nj −M ·ℓ or . In both cases, the right-hand side is a rational approximation to ϕ with denominator bounded by M̂ := 2 · 10k · M D. It is well known (see, e.g., [16, Theorems 193–194]) that |ϕ − N̂ | M̂ ≥ √ 1 ( 5−ǫ)M̂ 2 for all ǫ > 0. In particular, this implies that evaluating ϕ to within O(log M̂ 2 ) = O(k + log M + log D) digits is tM 10k tM 10k sufficient to test whether ϕ < 10k ·M D+10 k N −M ·ℓ , and whether ϕ > 10k ·M D+10k N −M ·(ℓ+1) . In either j of these cases, the algorithm has resolved whether ϕ < D+Pt j −λ . The only case where the algorithm cannot resolve whether ϕ < j t D+Pj −λ is when tM 10k tM 10k < ϕ < . 10k · M D + 10k Nj − M · ℓ 10k · M D + 10k Nj − M · (ℓ + 1) In this case, the number of digits for λ is insufficient. Notice that there is a unique value of ℓ for which this happens, so the probability of failure is at most 10−k . Taking a union bound over all n interval boundaries and all t rounds, we see that in order to succeed with high probability, the number of digits of λ the algorithm needs to generate is O(log n + log t). In particular, the computation and required randomness are polynomial. References [1] Omer Angel, Alexander E. Holroyd, James B. Martin, and James Propp. Discrete lowdiscrepancy sequences. https://arxiv.org/abs/0910.1077, 2010. [2] Rudolf Avenhaus and Morton John Canty. Playing for time: A sequential inspection game. European Journal of Operational Research, 167(2):475–492, 2005. [3] Rudolf Avenhaus and Thomas Krieger. Distributing inspections in space and time–proposed solution of a difficult problem. European Journal of Operational Research, 231(3):712–719, 2013. 30 [4] Rudolf Avenhaus, Bernhard von Stengel, and Shmuel Zamir. Inspection games. In Robert J. Aumann and Sergiu Hart, editors, Handbook of Game Theory, Vol. 3, chapter 51, pages 1947– 1987. North-Holland, Amsterdam, 2002. [5] Nicola Basilico, Nicola Gatti, and Francesco Amigoni. Leader-follower strategies for robotic patrolling in environments with arbitrary topologies. In Proc. 8th Intl. Conf. on Autonomous Agents and Multiagent Systems, pages 57–64, 2009. [6] Mee Yee Chan and Francis Y. L. Chin. Schedulers for larger classes of pinwheel instances. Algorithmica, 9:425–462, 1993. [7] Chandra Chekuri, Jan Vondák, and Rico Zenklusen. Dependent randomized rounding via exchange properties of combinatorial structures. In Proc. 51st IEEE Symp. on Foundations of Computer Science, pages 575–584, 2010. [8] William Chen, Anand Srivastav, and Giancarlo Travaglini, editors. A Panorama of Discrepancy Theory, volume 2107 of Lecture Notes in Mathematics. Springer, 2014. [9] Fan Chung and Ron Graham. On the discrepancy of circular sequences of reals. Journal of Number Theory, 164:52–65, 2016. [10] Vincent Conitzer and Tuomas Sandholm. Computing the optimal strategy to commit to. In Proc. 7th ACM Conf. on Electronic Commerce, pages 82–90, 2006. [11] Harvey Diamond. Minimax policies for unobservable inspections. Mathematics of Operations Research, 7(1):139–153, 1982. [12] Fei Fang, Thanh H. Nguyen, Rob Pickles, Wai Y. Lam, Gopalasamy R. Clements, Bo An, Amandeep Singh, Brian C. Schwedock, Milind Tambe, and Andrew Lemieux. PAWS — a deployed game-theoretic application to combat poaching. AI Magazine, 2017. (to appear). [13] Fei Fang, Peter Stone, and Milind Tambe. When security games go green: Designing defender strategies to prevent poaching and illegal fishing. In Proc. 24th Intl. Joint Conf. on Artificial Intelligence, pages 2589–2595, 2015. [14] Peter C. Fishburn and Jeffrey C. Lagarias. Pinwheel scheduling: achievable densities. Algorithmica, 22:14–38, 2002. [15] Rajiv Gandhi, Samir Khuller, Srinivasan Parthasarathy, and Aravind Srinivasan. Dependent rounding and its applications to approximation algorithms. Journal of the ACM, 53:324–360, 2006. [16] Godfrey H. Hardy and Edward M. Wright. An Introduction to the Theory of Numbers. Oxford University Press, fourth edition, 1960. [17] Alexander E. Holroyd and James Propp. Rotor walks and markov chains. Algorithmic probability and combinatorics, 520:105–126, 2010. [18] Robert Holte, Al Mok, Louis Rosier, Igor Tulchinsky, and Donald Varvel. The pinwheel: a realtime scheduling problem. In Proc. Twenty-Second Annual Hawaii International Conference on System Sciences. Vol.II: Software Track, 1989. 31 [19] Robert Holte, Louis Rosier, Igor Tulchinsky, and Donald Varvel. Pinwheel scheduling with two distinct numbers. Theoretical Computer Science, 100:105–135, 1992. [20] Nicole Immorlica and Robert D. Kleinberg. Recharging bandits. Manuscript. Available upon request, 2017. [21] Alon Itai and Zvi Rosberg. A golden ratio control policy for a multiple-access channel. IEEE Transactions on Automatic Control, 29(8):712–718, 1984. [22] Donald E. Knuth. The Art of Computer Programming: Sorting and Searching, volume 3. Pearson Education, 1998. [23] Dmytro Korzhyk, Vincent Conitzer, and Ronald Parr. Security games with multiple attacker resources. In Proc. 22nd Intl. Joint Conf. on Artificial Intelligence, pages 273–279, 2011. [24] Shun-Shii Lin and Kwei-Jay Lin. A pinwheel scheduler for three distinct numbers with a tight schedulability bound. Algorithmica, 19:411–426, 1997. [25] László Lovász. An Algorithmic Theory of Numbers, Graphs and Convexity, volume 50 of CBMS-NSF Regional Conference Series in Applied Mathematics. SIAM, 1986. [26] Shivendra S. Panwar, Thomas K. Philips, and Mon Song Chen. Golden ratio scheduling for flow control with low buffer requirements. IEEE Transactions on Communications, 40(4):765–772, 1992. [27] Anatolii Volodimirovich Skorokhod. Limit theorems for stochastic processes with independent increments. Theory of Probability & Its Applications, 2(2):138–171, 1957. [28] Noel B. Slater. The distribution of the integers n for which {θn} < ϕ. Proceedings of the Cambridge Philosophical Society, 46(4):525–534, 1950. [29] Noel B. Slater. Gaps and steps for the sequence nθ mod 1. Mathematical Proceedings of the Cambridge Philosophical Society, 63(04):1115–1123, 1967. [30] Aravind Srinivasan. Distributions on level-sets with applications to approximation algorithms. In Proc. 42nd IEEE Symp. on Foundations of Computer Science, pages 588–597, 2001. [31] Milind Tambe. Security and Game Theory: Algorithms, Deployed Systems, Lessons Learned. Cambridge University Press, 2011. [32] Robert Tijdeman. On a distribution problem in finite and countable sets. Journal of Combinatorial Theory, Series A, 15(2):129–137, 1973. [33] Robert Tijdeman. The chairman assignment problem. Discrete Mathematics, 32:323–330, 1980. [34] Heinrich von Stackelberg. Marktform und Gleichgewicht. Springer, 1934. [35] Bernhard von Stengel. Recursive inpection games. Mathematics of Operations Research, 41:935–952, 2016. [36] Yevgeniy Vorobeychik, Bo An, and Milind Tambe. Adversarial patrolling games. In Proc. 11th Intl. Conf. on Autonomous Agents and Multiagent Systems, pages 1307–1308, 2012. 32
8cs.DS
arXiv:1606.08948v1 [cs.SE] 29 Jun 2016 PRESAGE: Protecting Structured Address Generation against Soft Errors Vishal Chandra Sharma, Ganesh Gopalakrishnan Sriram Krishnamoorthy School of Computing, University of Utah Email: {vcsharma,ganesh}@cs.utah.edu Pacific Northwest National Laboratory Email: [email protected] Abstract—Modern computer scaling trends in pursuit of larger component counts and power efficiency have, unfortunately, lead to less reliable hardware and consequently soft errors escaping into application data (“silent data corruptions”). Techniques to enhance system resilience hinge on the availability of efficient error detectors that have high detection rates, low false positive rates, and lower computational overhead. Unfortunately, efficient detectors to detect faults during address generation (to index large arrays) have not been widely researched. We present a novel lightweight compiler-driven technique called PRESAGE for detecting bit-flips affecting structured address computations. A key insight underlying PRESAGE is that any address computation scheme that flows an already incurred error is better than a scheme that corrupts one particular array access but otherwise (falsely) appears to compute perfectly. Enabling the flow of errors allows one to situate detectors at loop exit points, and helps turn silent corruptions into easily detectable error situations. Our experiments using PolyBench benchmark suite indicate that PRESAGE-based error detectors have a high error-detection rate while incurring low overheads. I. I NTRODUCTION High performance computing (HPC) applications will soon be running at very high scales on systems with large component counts. The shrinking dimensions and reducing power requirements of the transistors used in the memory elements of these massively parallel systems make them increasingly vulnerable to temporary bit-flips induced by energetic particle strikes such as alpha particle and cosmic rays. These temporary bit-flips occurring in memory elements are often referred as soft errors. Previous studies project an upward trend in soft error induced vulnerabilities in HPC systems thereby pushing down their Mean-Time-To-Failure (MTTF) [1], [2]. These trends drastically increase the likelihood of a bit-flip occurring in long-lived computations. Specifically, a bit-flip affecting computational states of a program under execution such as ALU operations or live register values, may lead to a silent data corruption (SDC) in the final program output. Making the matter worse, such erroneous values may propagate to multiple compute nodes in massively parallel HPC systems [3]. The key focus of this paper is to detect bit-flips affecting address computation of array elements. For example, to load a value stored in an array A at an index i, a compiler must first compute the address of the location referred by the index i. A compiler performs this operation under-the-hood by using the base address of A and adding to it an offset value computed using the index i. This style of address generation scheme which uses a base address and an offset to generate the destination address is often referred as the structured address generation. Accordingly, the computations done in the context of a structured address generation are referred as structured address computations. Computational kernels used in HPC applications often involve array accesses inside loops thus requiring structured address computations. For these kernels, there is a real chance of one of their structured address computations getting affected by a bit-flip. A structured address computation, pertaining to an array, when subjected to a bit-flip may produce an incorrect address which still refers to a valid address in the address space of the array. Using the value stored at this incorrect but a valid address may lead to SDC without causing a program crash or any other user-detectable-errors. In this paper, we demonstrate that the bit-flips affecting structured address computations for aforementioned class of computational kernels lead to non-trivial SDC rates. We also present a novel technique for detecting bit-flips impacting structured address computations. Given that the structured address computations involve arithmetic operations thus requiring the use of a CPU’s computational resources, we consider an error model where bit-flips affect ALU operations and CPU register files. We assume DRAM and cache memory to be error-free which is a reasonable assumption as they are often protected using ECC mechanism [4]–[7]. We further limit the scope of our error model by considering only those ALU operations and register values which correspond to structured address computations. Specifically, we make following contributions in this paper: 1) A fault injection driven study done on 10 benchmarks drawn from PolyBench/C benchmark [8] demonstrating that the structured address computations in those benchmarks when subjected to bit-flips lead to non-trivial SDC rates. 2) We present a novel scheme which employs instructionlevel rewriting of the address computation logic used in structured address computations. This rewrite preserves an error in a structured address computation by intentionally corrupting all structured address computations that follow it. This requires creation of a dependency-chain between all structured address computation pertaining to a given array. Enabling the flow of error helps in following ways: • Strategic Placement of Error Detectors: Instead of checking each and every structured address computations for soft errors (which is prohibitively expensive), we strategically place our error detectors at the end of a dependency chain. • Promoting SDCs to Program Crashes: By enabling the flow of error in address computation logic, we increase the chances of promoting an SDC to a uservisible program crash. 3) We present a methodology for implementing our proposed scheme as a compiler-level technique called PRESAGE (PRotEcting Structured Address GEneration). Specifically, we have implemented PRESAGE using LLVM compiler infrastructure [9], [10] as a transformation pass. LLVM preserves the pointer related information at LLVM intermediate representation (IR) level (as also highlighted in recent works [11], [12]) while providing the access to a rich set of application programming interfaces (APIs) for seamlessly implementing PRESAGE transformations. This is the key reason behind choosing LLVM as tool-of-choice. In summary, our error-detection approach is based on the following principle: The larger the fraction of system state an error corrupts, the easier it is to detect them. The rest of the paper is organized as follows. Sec. §II provides a literary review of the closely related work done in this area. Sec. §III explains the key idea through a set of small examples. Sec. §IV formally introduces the key concepts and the methodology used for implementing PRESAGE. In Sec. §V, we provide a detailed analysis of the experimental results carried out to measure the efficacy of PRESAGE. Finally, Sec. §VI summarizes they key takeaways and future directions for this work. II. BACKGROUND & R ELATED W ORK A previous work by Casas-Guix et al. [13] shows that an Algebraic Multigrid (AMG) solver is relatively immune to faults as they can often recover to an acceptable final answer even after encountering a momentary bit-flip in the data state. They however realize that any fault in the space of pointers often wreaks havoc, since the corrupted pointers tend to write data values into intended memory spaces. As a solution, they propose the use of pointer triplication, which not only helps detect errors in the value of a pointer variable but also correct the same. Unfortunately, pointer triplication comes with a high overhead of runtime checks. Also, they do not focus on the scenarios where corruptions in structured address computations lead to SDC which is the key focus of our work. Another work by Wei et al. [11] highlights the difference between the results of the fault injection experiments done using a higher-level fault injector LLFI targeting instructions at LLVM IR level, and a lower-level, PIN based, fault injector performing fault injections at x86 level. This work highlights that LLVM offers a separate instruction called getElementPtr for carrying out structured address computations whereas at x86-level same instruction can be used for computing address as well as performing non-address arithmetic computations. Another recent work by Nagarakatte et al. [12] shows how by associating meta-data and by using Intel’s recently introduced MPX instructions, one can guard C/C++ programs against pointer-related memory attacks. The key portion of this work is also implemented using LLVM infrastructure. The above two works, in a way, influenced our decision to choose LLVM for implementing PRESAGE. Researchers have also explored the development of application-level error detectors for detecting soft-error affecting a program’s control states [14]–[16]. Another key area in application-level resilience is the algorithm based fault tolerance (ABFT) which exploits the algorithmic properties of well-known applications to derive efficient error detectors [17], [18]. Researchers have also focused in the past to optimize the placement of application level error detectors at strategic program points.The information about these strategic location are usually derived through well established static and dynamic program analysis techniques [19]–[22]. To the best of our knowledge, none of the previous works have focused on protecting structured address generation leading to SDC which is the key focus of our work. III. M OTIVATING E XAMPLE Fig. 2 presents a simple C function foo1 performing store operations to even-indexed memory locations of an array a[] of size 2n inside a for loop. It also stores the last accessed array address into a variable addr at the end of every loop-iteration. Fig. 1 represents the corresponding x86 code emitted for the foo1 function when compiled using clang compiler with O1 optimization level. Registers %esi and %ecx represent the variable n and the loop iterator i of the function foo1 whereas registers %rdi and %rax correspond to the array’s base address and index respectively. In every loop iteration, a destination array address is computed by the expression (%rdi,%rax,0x8) which evaluates to (0x8*%rax +%rdi), the value in register %rax is incremented by 2, and the base address stored in %rdi remains fixed. It is worth noting that the final address computation denoted by the expression (%rdi,%rax,0x8) is not uservisible and is something compiler does under-the-hood. In contrast to the fixed base address (FBA) scheme used in the function foo1, function foo2 (shown in Fig. 3), a semantically equivalent version of foo1, introduces a novel relative base address (RBA) scheme. Specifically, foo2 uses an array address computed in a loop iteration (addr) as the new base address for the next loop iteration along with a relative index (rid) as shown in Fig. 2. This simple but powerful scheme creates a dependency chain in the address computation logic as the computation of any new address would depend on the last computed address. L0 : L1 : L2 : L3 : L4 : L5 : L6 : L7 : L8 : L9 : L10 : L11 : L12 : cmp 0 x2 ,% e s i jl L12 xor %eax ,% eax mov 0 x1 ,% e c x x o r p s %xmm0,%xmm0 c v t s i 2 s d %ecx ,%xmm0 cltq movsd %xmm0,(% r d i ,% rax , 8 ) add 0 x2 ,% eax inc %e c x cmp %ecx ,% e s i jne L4 retq Fig. 1: x86 representation of the foo() function L0 : v o i d f o o 1 ( d o u b l e * a , u n s i g n e d n ) { L1 : d o u b l e * a d d r =a ; L2 : f o r ( i n t i =1 ; i <n ; i ++){ L3 : i n t i d =2 * i −2; L4 : a d d r=&a [ i d ] ; L5 : * addr= i ; } } Fig. 2: foo1() function L0 : v o i d f o o 2 ( d o u b l e * a , i n t n ) { L1 : d o u b l e * a d d r =a ; L2 : i n t p i d =0 ; L3 : f o r ( i n t i =1 ; i <n ; i ++){ L4 : i n t i d =2 * i −2; L5 : i n t r i d = i d−p i d ; L6 : addr [ r i d ]= i ; L7 : pid=id ; L8 : a d d r=&a d d r [ r i d ] ; } } Fig. 3: foo2() function Fig. 4: Function foo1 with no dependency-chains Therefore, our RBA scheme guarantees that if an address computation of an array element gets corrupted then all subsequent address computations would also become erroneous. This in turn enables us to strategically place error detectors at a handful of places in a program (preferably at all program exit points) thereby making the whole error detection process very lightweight. For example, in functions foo1 and foo2, the address of a new array element, computed during every loop iteration, is stored in the variable addr. The value stored in the variable addr may get corrupted in following scenarios: Error Scenario I: A bit-flip occurs in the value stored in the loop-iterator variable i in functions foo1 and foo2. Error Scenario II: A bit-flip affecting the value stored in the absolute index variable id in functions foo1 and foo2. Error Scenario III: A bit-flip occurs in the value stored in the relative index variable rid which is only present in the functions foo2. Error Scenario IV: A bit-flip affecting the value stored in the variable addr in functions foo1 and foo2. The above program-level sites are listed in Table I for easy reference. With respect to the error scenario IV, it is evident that only in the case of foo2, when the result of final address Fig. 5: Function foo2 with a dependency-chain introduced in addr computation stored in addr is corrupted during one of the loop iterations, all subsequent address computations in the remaining loop iterations would also get corrupted due to the dependency chain introduced in the address computation logic. We further demonstrate the evidence of these dependency chains, introduced by our RBA scheme, through a small set of fault injection driven experiments. Fig. 4 presents the result of two independent runs for function foo1. The X-axis shows the number of loop iteration whereas the Y-axis shows the value stored in the variable addr. The execution with label foo1_addr represents a fault-free execution of foo1. The execution with label foo1_addr_corrupt represents a faulty execution of foo1 where a single bit fault is introduced at bit position 6 of the value stored in addr during the tenth loop iteration. Similarly, Fig. 5 presents the result of two independent runs for function foo2 such that a single bit fault is introduced at bit position 6 of the value stored in addr during the first loop iteration in the faulty execution represented by the label foo2_addr_corrupt We can clearly notice that only in the case of function foo2, once an address value stored in addr gets corrupted, all subsequent address values stored in addr are also corrupted. Fault Site i id addr rid Description Loop iterator variable. Absolute index variable. A variable containing an address of a location in the array a[]. Relative index variable (only present in foo2). represents the ith element of the array from its first element which starts with an index 0. The address γ(Ai ) of Ai is computed using FBA scheme as shown in Eq. 1 where β(Ai ) represents the base address used to calculate the address of Ai , and sA denotes the size (in bytes) of the elements of the array A. γ(Ai ) = β(Ai ) + (sA ∗ i) (1) TABLE I: List of fault sites in functions foo1 and foo2 IV. M ETHODOLOGY Sec. §III demonstrates that a simple rewrite of the address computation logic introduces a dependency chain thereby enabling the flow of error. Given that the address computation is often done in a user-transparent manner by a compiler, we implement our technique at the compiler-level. Specifically, we choose LLVM compiler infrastructure to implement our technique as a transformation pass (hereon referred as PRESAGE) which works on LLVM’s intermediate representation (IR). Our implementation eliminates the need for any manual effort from programmers thereby allowing our technique to scale to non-trivial programs. LLVM’s intermediate representation (IR) provides a special instruction called getelementptr (hereon referred as GEP for brevity) for performing address computation of Aggregate types including Array type1 . Therefore, all analyses implemented as part of PRESAGE are centered around the GEP instruction. A GEP instruction requires a base address, one or more index values, and size of an element to compute an address and the computed address is often referred as structured address. Given the key focus of our work is to protect these structured addresses, the definition of an array on which PRESAGE transformations are applied closely follows the LLVM’s Array type definition with some restrictions as explained below: Definition 1: An array in this paper always refers to a contiguous arrangement of elements of the same type laid out linearly in the memory. Definition 2: All structured address computations protected using PRESAGE must always use only one index for address computations. It is important to note that this is needed only to simplify the implementation and does not limit the scope of PRESAGE as multi-dimensional arrays can be easily represented using single-indexed scheme. For example, a twodimensional array could be laid out linearly in memory by traversing it in row-major or column-major fashion. Definition 3: The base addresses used in all structured address computations protected by PRESAGE must be immutable. For example, if a PRESAGE transformation is applied on a callee function to protect its structured address computations then the callee function must not mutate those base addresses which are referenced in structured address computations protected by PRESAGE. Definition 4: Let A be an array of arbitrary length and Ai 1 LLVM’s type system is explained in its language reference manual located at: http://llvm.org/docs/LangRef.html Definition 5: The address of Ai when computed using our RBA scheme uses a previously computed address γ(Aj ) as the new base address (hereafter referred as relative base) and is denoted as γ(Aij ) as shown in Eq. 2. The relative index value used in Eq. 2 is computed by simply subtracting the index value of the relative base (Aj ) from the index value of Ai . In scenarios where the relative base information is not known, the RBA scheme falls back to the FBA scheme for address computation. γ(Aij ) = γ(Aj ) + (sA ∗ (i − j)) (2) Theorem: If we consider Ai and Aj as valid elements of an array A, then γ(Aij ) ≡ γ(Ai ) iff β(Ai ) ≡ β(Aj ). Proof : Rewriting γ(Aj ) in Eq. 2 using Eq. 1, we get Eq. 3. γ(Aij ) = β(Aj ) + (sA ∗ j) + (sA ∗ (i − j)) (3) By further simplying Eq. 3, we finally get Eq. 4. γ(Aij ) = β(Aj ) + (sA ∗ i) (4) Using Eqs. 4 and 1, we get: γ(Aij ) ≡ γ(Ai ) iff β(Ai ) ≡ β(Aj ). Term F b B E(B1 , B2 ) LBp (B) LBs (B) LBe (F) Lb (F) LG (B, b) Mφ MG Description A target function on which PRESAGE transformations are applied. A base address with at least one user in the target function. A basic block in the target function. A boolean function which returns true only if an edge exists from B1 to B2 . A set of all immediate predecessor basic blocks of B. A set of all immediate successor basic blocks of B. A set of all exit basic blocks in the target function F. A set of all immutable base addresses in F. A set of all GEP instructions in B which use the base address b. A two-level nested hashmap with first key a basic block, second key a base address mapped to a phi node. A two-level nested hashmap with first key a basic block, second key a base address mapped to a GEP instruction. TABLE II: Glossary of terms referred in this paper. A. Error Model We consider an error model where soft errors induce a single-bit fault affecting CPU register files and ALU operations. We assume that memory elements such as datacache and DRAM are error free as they are usually protected using ECC mechanism. We implement our error model by targeting runtime instances of LLVM IR level instructions of a target function for fault injection. For example, if there are N dynamic IR-level instructions observed corresponding to a target function, then we choose one out of N dynamic instructions with a uniform random probability of N1 and flip the value of a randomly chosen bit of the destination virtual register, i.e., the l.h.s. of the randomly chosen dynamic instruction. Similar error models have been proposed in the past for various resilience studies and it provides a reasonable estimate of application-level resiliency of an application [16], [23]. Given that our focus is to study soft errors affecting structured address computation, we consider all fault sites which when subjected to a random single-bit bit-flip may affect the output of one or more GEP instructions of a target program. Specifically, we propose two following error models which mainly differ in the dynamic fault site selection strategy. 1) Error Model I: As described in Sec. §III, error scenario affecting structured addressed computations are broadly categorized into soft errors affecting index values and the final output of GEP instructions. Error model I considers the scenario where index values are corruption-free but the final output of one of the GEP instruction has a random single-bit corruption. This is done by randomly choosing from dynamic instances of all GEP instructions of a target function, and injecting a bit-flip in the final address computed the GEP instruction. 2) Error Model II: Error model II considers the case where the index value of one of the dynamic instances of GEP instructions are corrupted including the dynamic fault sites corresponding to the set of def-use leading to the index-value The above two error models are implemented using an opensource and publicly available fault injector tool VULFI [24], [25]. Also, note that in our error models, we do not target base addresses as these are small in numbers (one per array) and can be easily protected through replication without incurring severe performance or space overhead. B. PRESAGE Transformations We refer to two or more GEP instructions as same-class GEPs if they use the same base address. PRESAGE creates a dependency chain between same-class GEPs in a two-stage process. 1) Inter-Block Dependency Chains: The first stage involves enabling dependency chains between same-class GEPs in different basic blocks. Intuitively, it would require first GEP, for a given base address, appearing in all basic blocks be transformed in a manner such that it uses the address computed by the last same-class GEP in its predecessor basic block as the relative base. However, we need a bit more careful analysis as a basic block may have more than one predecessor basic blocks. Moreover, it might be possible that not all predecessor blocks have a same-class GEP or a predecessor block might be a back edge (i.e., there is a loop enclosing the basic block and its predecessor basic block). Therefore, we propose a threestep process for linking same-class GEPs in different basic blocks as explained by Figs. 6 and 7. 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: procedure C REATE I NTER B LK D EP C HAIN (F ,MG ,Mφ ) for all B in BFS(F) do e ← GetIncomingEdgeCount(B) for all b in Lb (F) do φ ← CreateEmptyPHINode(b,e) InsertPHINodeEntry(B,b,φ,Mφ ) for all Bp in LBp (B) do if HasGEP(Bp ,b,MG ) then G ← GetGEP(Bp ,b,MG ) SetIncomingEdge(Bp ,B,φ,G) end if end for end for end for end procedure Fig. 6: Creating Inter-Block Dependency Chains As a first step, as shown in Fig. 6, we iterate over all basic blocks of a target function F in a breadth-first order. In a given basic block B with an incoming edge count e, we insert a phi node for each unique base address appearing in Lb (F) for selecting a value from same-class incoming GEP values (each belonging to a unique predecessor basic block). For a given base address b, the respective phi node entry is used as the relative base by the first GEP (with base b) in the current basic block B. In case, B does not have a valid GEP entry for b , then we call B a pass-through basic block with respect to b. In this case, we simply pass the phi node value to the successor basic blocks. We use a phi node because all PRESAGE transformations are applied at LLVM IR and LLVM uses the single static assignment (SSA) form thus requiring a phi node to select a value from one or more incoming values. For each phi node entry created in B, if valid incoming GEP values are available from one or more predecessor basic blocks, the phi node is updated with those values by calling the SetIncomingEdge routine. At this point, we already have created phi node entries in each basic block (including all pass-through basic blocks), and have populated these phi nodes with incoming GEP values wherever applicable. As a next step, as shown in Fig. 7, for a basic block B with each of its pass-through predecessor basic block with respect to a base address b, the respective phi node φ is updated with the predecessor’s phi node entry φp by calling SetIncomingEdge routine. If a back-edge exists from a pass-through predecessor basic block Bp to B (i.e., there is exists a loop enclosing B and Bp ) then B may receive invalid data from Bp as Bp is also successor basic block of B. Therefore, we invoke the procedure UpdateInterBlkDepChain 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: procedure U PDATE I NTER B LK D EP C HAIN (F ,Mφ ,MG ,P ) for all B in BFS(F) do for all Bp in LBp (B) do for all b in Lb (F) do s ← ¬HasGEP(Bp ,b,MG ) s ← s ∧ HasPHI(Bp ,b,Mφ ) s1 ← s ∧ ¬IsBackEdge(Bp ,B) s1 ← s1 ∧ (P = P ass1) s2 ← s ∧ IsBackEdge(Bp ,B) s2 ← s2 ∧ (P = P ass2) if s1 ∨ s2 then φ ← GetPHINode(B,b,Mφ ) φp ← GetPHINode(Bp ,b,Mφ ) SetIncomingEdge(Bp ,B,φ,φp ) end if end for end for end for end procedure Fig. 7: Updating Inter-Block Dependency Chains in Fig. 7 twice. In the first pass, the phi node entries of all pass-through predecessor basic blocks of B which do not have back edges to B, are assigned to the respective phi node entries in B. In the second pass, we repeat the steps of the first pass with the exception that this time we select the phi node entries of all pass-through predecessor basic blocks of B which do have back edges to B. 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: procedure C REATE I NTRA B LK D EP C HAIN (F ,MG ,Mφ ) for all B in BFS(F) do for all b in Lb (F) do for all G in LG (B, b) do if IsFirstGEP(G) then φ ← GetPHINode(B,b,Mφ ) br ← GetRelativeBase(φ,b) pid ← GetPrevIdx(φ) end if id ← GetCurrentIdx(G) rid ← GetRelativeIdx(id,pid) Gn ← CreateNewGEP(γ,rid) pid ← id InsertGEP(Gn ,G) ReplaceAllUses(G,Gn ) DeleteGEP(G) end for end for end for end procedure Fig. 8: Creating Intra-Block Dependency Chains 2) Intra-Block Dependency Chains: The second stage involves creating intra-block dependency chains. As shown in Fig. 8, for each basic block B of a target function F and for each unique base address b ∈ Lb (B), if there exist one or more same-class GEP instructions which use b as the base, we need to transform these GEPs to create a dependency chain. In other words, each GEP uses the value computed by the previous GEP as the relative base using our RBA scheme as explained in Eq. 2. For the first occurrence of GEP instruction in B with base b, we extract the relative base information using the phi node entry φ created in the previous stage. At runtime, the phi node φ will receive the last address computed using the base address b from one of the predecessor basic blocks of B. In summary, for each GEP instruction G, an equivalent version Gn is created using the relative base and the relative index values. All uses of G are then replaced by Gn and G is then finally deleted. C. Detector Design 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: procedure I NSERT D ETECTORS (F ,MG ,Mφ ) for all Be in LBe (F) do for all b in Lb do φ ← GetPHINode(B,b,Mφ ) br ← GetRelativeBase(φ,b) rid ← GetRelativeIdx(φ) pid ← GetPrevIdx(φ) G ← CreateNewGEP(br ,rid) Gd ← CreateNewGEP(b,pid) InsertEqvCheck(G,Gd ) end for end for end procedure Fig. 9: Algorithm for Error Detectors The error detectors are designed to protect against singlebit faults injected using error model I. As shown in Fig. 9, in each exit basic block Be , for each unique base address b, PRESAGE makes available the value computed of the last run GEP instruction with base b and the relative index value used. Additionally, PRESAGE also makes available the absolute index value which along with the base address b can also be used to reproduce the output of the last run GEP instruction with base b. The error detectors then simply check if the output G produced by the last run GEP instruction matches the recomputed value Gd using the base address b and the absolute index value. Given that in error model I, we consider the base address and index value to be corruption free, the error detectors are precise with respect to error model I as they do not report any false positives. Fig. 10 shows the LLVM-level control-flow graph (CFG) of the function foo1 presented in Sec.§III. Similarly, Fig. 11 shows the LLVM-level CFG of the PRESAGE transformed version of the function foo1. The GEP instruction in function foo1 (Fig. 10) which stores the computed address in register %13 is replaced by a new GEP instruction (Fig. 11) in the PRESAGE transformed version of foo1 which uses relative base and relative index value for address computation. The PRESAGE transformed version of foo1 in Fig. 10 also has Fig. 10: LLVM IR level CFG representation of the function foo1 Fig. 11: LLVM IR level CFG representation of PRESAGE transformed version of the function foo1 error detector code inserted in the exit basic block. Specifically, %GEP_duplct represents the recomputed version of the address which is compared against the observed address value %GEP_obsrvd. In case of a mismatch, the global variable @detectCounter is set to report error detection to the end user. V. E XPERIMENTAL R ESULTS A. Evaluation Strategy Our evaluation strategy involves measuring the effectiveness of the proposed error detectors in terms of SDC detection rate and performance overhead. In addition, we analyze the impact of PRESAGE transformations on an application’s resiliency using a fault injection driven study. We consider 10 benchmarks listed in TableIV drawn from the PolyBench/C benchmark suite [26]. These benchmarks represent a diverse set of applications from areas such as stencils, algebraic kernels, solvers, and BLAS routines. For each of these benchmarks, Experiment Set Native FIC EM-I Native FIC EM-II Presage FI EM-I Presage FI EM-II Description A fault-injection campaign (FIC) using error model I on the native version of a target benchmark. Same as Native FIC EM-I except that error model II is used. A fault-injection campaign (FIC) using error model I on benchmarks transformed using PRESAGE. Same as Presage FI EM-I except that error model II is used. TABLE III: Summary of experiments we perform four set of experiments, summarized in TableIII. Each experiment set involves a fault injection campaign (FIC), consisting of 5000 independent experimental runs. In each experimental run, we carry out a fault-free and a faulty execution of a target benchmark using identical program input parameters and compare the outcome of the two executions. The program input parameters (such as array size used in the benchmark) are randomly chosen from a predefined range of values. During a fault-free execution, no faults are injected whereas during a faulty execution, a single-bit fault is injected in a dynamic LLVM IR instruction selected randomly using either error model I or error model II as explained in Sec. §IV. Note that we only target the key function(s) that implement the core logic of a benchmark for fault injection. For example, in the jacobi-2d benchmark, we only target the kernel jacobi 2d which implements the core jacobi kernel and ignore the other auxiliary functions such as the function used for array initialization or the program’s main(). Given that the benchmarks chosen produce one or more result arrays as the final program output, we compare respective elements of the result arrays produced by the faulty and faultfree executions to categorize the outcome of the experimental run as: SDC: The executions ran to completion, but the corresponding elements of the result arrays of the fault-free and faulty execution are not equivalent. Benign: The correponding elements of the result arrays of the fault-free and faulty execution are equivalent. Program Crash: The program crashes or terminates prematurely without producing the final output. We analyze the impact of PRESAGE transformations on Fig. 12: Outcomes of the fault injection campaigns an application’s resiliency by comparing the outcomes of the experiment sets Native FIC EM I with Presage FI EM-I, and Native FIC EM-II with Presage FI EM-II. B. Fault Injection Campaigns Fig.12 shows the result of FIC done under each experiment set listed in TableIII. Each column in the figure represents an FIC consisting of 5000 runs. Therefore, the total number of fault injections done across 10 benchmarks and 4 experiment sets stands at 0.2 million (4 experiment sets × 10 benchmarks × 5000 fault injections). Non-trivial SDC Rates: The results for experiment sets Native FIC EM-I and Native FIC EM-II shown in Fig.12 demonstrate that non-trivial SDC rates are observed when structured address computations are subjected to bit flips. Specifically, for the experiment set Native FIC EM-I, we observe a maximum and a minimum SDC rates of 32.2% and 18.5%, for the benchmarks trmm and bicg, respectively. In case of Native FIC EM-II, we observe a greater contrast, with a maximum SDC rate of 43.6% and a minimum SDC rate of 2.3% for the benchmarks trmm and adi, respectively. Promotion of SDCs to Program Crashes: When comparing the results of experiment sets Presage FI EM-I and Presage FI EM-II with that of Native FIC EM-I and Native FIC EM-II, we observe that PRESAGE transformations lead to a sizable fraction of SDCs getting promoted to program crashes. Specifically, Presage FI EM-I reports an average increase of 12.5% (averaged across all 10 benchmarks) in the number of program crashes when compared to Native FI EM-I, with a maximum increase of 19.3% reported for the cholesky benchmark. Similarly, Presage FI EMII reports an average increase of 7.8% (averaged across all 10 benchmarks) in the number of program crashes when compared to Native FI EM-II with a maximum increase of 16.8% reported for the jacobi-2d benchmark. C. Detection Rate & Performance Overhead Fig.13 shows the percentage of SDCs reported in Fig.12 under Presage FIC EM-I that are detected by the PRESAGEinserted error detectors. Except for the benchmark fdtd-2d, we are able to detect 100% of the SDCs caused by a random Fig. 13: SDC detection rate & performance overhead bit-flip injected using error model I. In case of fdtd-2d, we are able to detect only 74% of the reported SDCs because a fraction of GEP instructions in fdtd-2d have mutable base addresses. Recall that the PRESAGE transformations can only be applied to GEP instructions with immutable base addresses. For the benchmarks adi, seidel-2d, gesummv, bicg, and cholesky, we notice that the error detectors incur almost negligible overheads ranging between 0.3% and 3.2%. Benchmarks lu and atax report overhead figures of less than 20% whereas the benchmarks jacobi-2d, fdtd-2d, trmm, and atax report overhead figures of close to 40%. Upon further investigation (details omitted for brevity), we found that the higher overheads for some of the benchmarks are due to the dependency chains (especially interblock dependency chains) introduced by the PRESAGE transformations. Recall that due to these dependency chains, a structured address computation in a basic block might require a previously computed address from one of its predecessor basic blocks. Due to this dependency, a register value may have to be kept alive for a longer duration, increasing the chances of a register spill, which in turn leads to a higher overhead. Therefore, we recommend additional care while deploying PRESAGE on any new program by first checking (on small test inputs) if the introduced overhead is within acceptable limits for the end user. Finding an optimal set of dependency chains or splitting a dependency chain into smaller ones to provide the best trade-off between the detection rate and overhead is beyond the scope of this paper and constitutes future work. D. False Positives & False Negatives We refer to the errors flagged during the execution of a PRESAGE-transformed program as a false positive when no faults are injected during the execution. Conversely, if there are no errors reported during the execution of a PRESAGEtransformed program while an error is actually injected during the execution, then we regard it as a false negative. The basic philosophy of the PRESAGE detectors is to recompute the final address observed at the end point of a dependency chain and compare the recomputed address against the observed final address. Also, in error model I, the index and the base address of a GEP instruction are assumed to be corruption-free but the final address computed by it can be erroneous. Therefore, under error model I, whenever the recomputed address does not match the observed address, it attributes it to an actual bit-flip. In summary, the detectors never report false positives under error model I. Even in the case of error model II, where we subject the index value of a GEP instruction to a bit-flip, the value recomputed by the detectors would use the same corrupted index value to reproduce the same corrupted observed value. Thus even under error model II, the error detectors must not report false positive. However, it may report false negatives, including in cases where we inject bif flips into GEP instructions that have mutable base addresses, as in the case of fdtd-2d benchmark. E. Coverage Analysis Table IV provides an insight into the kind of coverage provided by the PRESAGE-based error detectors. Total SIC denotes the total static instruction count of the LLVM IR instructions corresponding to key function(s) of a benchmark that are targeted for fault injections. SIC-I and SIC-II represents the subset of instructions represented by SIC chosen using error model I and error model II respectively. Clearly, SIC-I and SIC-II represent a significant portion of SIC with the share of SIC-I ranging between 15.5% and 28.5% where as that of SIC-II ranging between 63.3% and 21.7%. The ratio between SIC-I and SIC-II roughly varies from 1:3 (in case of seidel-2d) to 1:1 (in case of gesummv and bicg). Avg. DIC-I is a counterpart of SIC-I, representing the average dynamic instruction count averaged over DIC observed during each experimental run of an FIC done under the experiment set Native FIC EM-I. Similarly, Avg. DIC-II denotes the average dynamic instruction count averaged over DIC observed during each experimental run of an FIC done under the experiment set Native FIC EM-II. Clearly, the fault sites considered under error model I and II constitute a significant part of the overall static instruction count of the benchmarks considered in our experiments. VI. C ONCLUSIONS & F UTURE WORK Researchers in the HPC community have highlighted the growing need for developing cross-layer resilience solutions with application-level techniques gaining a prominent place due to their inherent flexibility. Developing efficient lightweight error detectors has been a central theme of applicationlevel resilience research dealing with silent data corruption. Through this work, we argue that, often, protecting structured address computations is important due to their vulnerability to bit flips, resulting in non-trivial SDC rates. We experimentally support this argument by carrying out fault injection driven experiments on 10 well-known benchmarks. We witness SDC rates ranging between 18.5% and 43.6% when instructions in these benchmarks pertaining to structured address computations are subjected to bit flips. Next, guided by the principle that maximizing the propagation of errors would make them easier to detect, we introduce a novel approach for rewriting the address computation logic used in structured address computations. The rewriting scheme, dubbed the RBA scheme, introduces a dependency chain in the address computation logic, enabling sufficient propagation of any error and, thus, allowing efficient placement of error detectors. Another salient feature of this scheme is that it promotes a fraction of SDCs (user-invisible) to program crashes (user-visible). One can argue that promoting SDCs to program crashes may lead to a bad user experience. However, a program crash is far better than an SDC whose insidious nature does not raise any user alarms while silently invalidating the program output. We have implemented our scheme as a compiler-level technique called PRESAGE developed using the LLVM compiler infrastructure. In Sec.§IV, we formally presented the key steps involved in implementing the PRESAGE transformations which include creating inter-block and intra-block dependency chains, and a light-weight detector placed strategically at all exit points of a program. We reported high detection rates ranging between 74% and 100% with the performance overhead ranging between 0.3% and 42.8% across 10 benchmarks. In addition, the PRESAGE-transformed benchmarks witness an average and a maximum increase of 12.5% and 19.3% respectively in program crashes as compared to their original versions when faults are injected using error model I. These figures stands at 7.8% and 16.8% respectively when error model II is used instead of error model I for fault injections. Our current work also identifies some challenges we plan to address as part of the future work. Specifically, we observe a relatively higher detection overhead for some of the benchmarks, due to increased register pressure caused by the introduction of dependency chains as explained earlier. In the future, we plan to explore efficient ways of mining GEP instructions in a program that are best suited for PRESAGE transformations without adversely impacting performance. Although, the main focus of our work is to provide coverage explicitly for error model I, we also observe that PRESAGE provides partial coverage for error model II by promoting a Benchmark adi fdtd-2d seidel-2d jacobi-2d gesummv trmm atax bicg cholesky lu Avg. DIC-I (in millions) 59.2 63.7 74.8 64.2 0.4 39.1 0.5 0.4 0.3 0.6 Avg. DIC-II (in millions) 157.5 24.8 36.8 97.1 0.7 107.1 0.7 0.7 0.8 1.9 SIC-I 30 68 42 56 5 14 22 5 16 15 SIC-II 69 98 114 112 5 39 26 5 39 35 Total SIC 161 249 180 196 22 90 91 23 89 77 %SI-I 18.6% 27.3% 23.3% 28.5% 22.7% 15.5% 24.1% 21.7% 17.9% 19.4% %SI-II 42.8% 39.3% 63.3% 57.1% 22.7% 43.3% 28.5% 21.7% 43.8% 45.4% TABLE IV: Benchmark description fraction of SDCs to program crashes. As future work, we plan to explore techniques used in the context of verification and polyhedral transformations to develop comprehensive error detection mechanisms for error model II. Finally, through this work, we hope to bring to the resilience community’s notice the importance and the need for developing efficient error detectors for protecting structured address computations. VII. ACKNOWLEDGEMENT This work was supported in part by the U.S. Department of Energys (DOE) Office of Science, Office of Advanced Scientific Computing Research, under award 66905. Pacific Northwest National Laboratory is operated by Battelle for DOE under Contract DE-AC05-76RL01830. The Utah authors were supported in part under the same DOE project with award number 55800790, NSF Award CCF 1255776, and SRC Tasks 2425.001, 2426.001. R EFERENCES [1] F. Cappello, A. Geist, B. Gropp, L. Kale, B. Kramer, and M. Snir, “Toward Exascale Resilience,” International Journal of High Performance Computing Applications, vol. 23, no. 4, pp. 374–388, 2009. [2] F. Cappello, A. Geist, W. Gropp, S. Kale, B. Kramer, and M. Snir, “Toward Exascale Resilience: 2014 update,” Supercomputing frontiers and innovations, vol. 1, no. 1, pp. 5–28, 2014. [3] R. Ashraf, R. Gioiosa, G. Kestor, R. F. DeMara, C. Cher, and P. Bose, “Understanding the propagation of transient errors in HPC applications,” in International Conference for High Performance Computing,Networking, Storage and Analysis (SC), Austin, TX, USA, 2015. [4] C. Chen and M. Hsiao, “Error-correcting codes for semiconductor memory applications: A state-of-the-art review,” IBM Journal of Research and Development, vol. 28, no. 2, pp. 124–134, 1984. [5] C. W. Slayman, “Cache and memory error detection, correction, and reduction techniques for terrestrial servers and workstations,” IEEE Transactions on Device and Materials Reliability, vol. 5, no. 3, pp. 397–404, Sept 2005. [6] J. Kim, M. Sullivan, S. Gong, and M. Erez, “Frugal ECC: efficient and versatile memory error protection through fine-grained compression,” in International Conference for High Performance Computing, Networking, Storage and Analysis, SC 2015, Austin, TX, USA, 2015, pp. 12:1–12:12. [7] J. Kim, M. Sullivan, and M. Erez, “Bamboo ECC: strong, safe, and flexible codes for reliable computer memory,” in International Symposium on High Performance Computer Architecture, HPCA, Burlingame, CA, USA, 2015, pp. 101–112. [8] “PolyBench/C: The polyhedral benchmark suite,” http://web.cs.ucla.edu/ ∼pouchet/software/polybench/. [9] C. Lattner and V. Adve, “LLVM: A compilation framework for lifelong program analysis & transformation,” in International Symposium on Code Generation and Optimization (CGO), 2004, pp. 75–86. [10] “The LLVM Compiler Infrastructure,” http://llvm.org/. [11] J. Wei, A. Thomas, G. Li, and K. Pattabiraman, “Quantifying the accuracy of high-level fault injection techniques for hardware faults,” in International Conference on Dependable Systems and Networks, DSN 2014, Atlanta, GA, USA, 2014, pp. 375–382. [12] S. Nagarakatte, M. M. Martin, and S. Zdancewic, “Everything you want to know about pointer-based checking,” in Summit on Advances in Programming Languages (SNAPL), 2015, pp. 190–208. [13] M. Casas, B. Supinski, G. Bronevetsky, and M. Schulz, “Fault Resilience of the Algebraic Multi-Grid Solver,” in Proc. of the 2012 International Conference on Supercomputing (ICS). IEEE Computer Society Press, 2012, pp. 00–00. [14] N. Oh, P. P. Shirvani, and E. J. McCluskey, “Control-flow checking by software signatures,” IEEE Transactions on Reliability, vol. 51, pp. 111–122, 2002. [15] D. S. Khudia and S. A. Mahlke, “Low Cost Control Flow Protection Using Abstract Control Signatures,” in LCTES, 2013, pp. 3–12. [16] V. C. Sharma, A. Haran, Z. Rakamaric, and G. Gopalakrishnan, “Towards Formal Approaches to System Resilience,” in PRDC, 2013. [17] J. Sloan, R. Kumar, and G. Bronevetsky, “An algorithmic approach to error localization and partial recomputation for low-overhead fault tolerance,” in International Conference on Dependable Systems and Networks (DSN), 2013. [18] D. Tao, S. L. Song, S. Krishnamoorthy, P. Wu, X. Liang, E. Z. Zhang, D. Kerbyson, and Z. Chen, “New-sum: A novel online abft scheme for general iterative methods,” in International Symposium on HighPerformance Parallel and Distributed Computing (HPDC), 2016, pp. 43–55. [19] K. Pattabiraman, Z. Kalbarczyk, and R. Iyer, “Application-Based Metrics for Strategic Placement of Detectors,” IEEE Pacific Rim International Symposium on Dependable Computing (PRDC), pp. 75–82, 2005. [20] S. Feng, S. Gupta, A. Ansari, and S. Mahlke, “Shoestring: Probabilistic Soft Error Reliability on the Cheap,” in Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2010, pp. 385–396. [21] M. a. de Kruijf, K. Sankaralingam, and S. Jha, “Static analysis and compiler design for idempotent processing,” Programming Language Design and Implementation (PLDI), 2012. [22] S. Sastry Hari, S. Adve, H. Naeimi, and P. Ramachandran, “Relyzer: Application resiliency analyzer for transient faults,” in IEEE Micro, vol. 33, no. 3, pp. 58–66, May 2013. [23] Q. Lu, M. Farahani, J. Wei, A. Thomas, and K. Pattabiraman, “LLFI: an intermediate code-level fault injection tool for hardware faults,” in International Conference on Software Quality, Reliability and Security, QRS Vancouver, BC, Canada, 2015, pp. 11–16. [24] V. C. Sharma, G. Gopalakrishnan, and S. Krishnamoorthy, “Towards reseiliency evaluation of vector programs,” in 21st IEEE Workshop on Dependable Parallel, Distributed and Network-Centric Systems (DPDNS), 2016. [25] “VULFI - an LLVM based fault injection framework,” fv.cs.utah.edu/ fmr/vulfi. [26] “Polybench benchmark suite,” https://sourceforge.net/projects/ polybench.
6cs.PL
The Reactor: A Sample-Efficient Actor-Critic Architecture Audrunas Gruslys 1 Mohammad Gheshlaghi Azar 1 Marc G. Bellemare 1 Remi Munos 1 arXiv:1704.04651v1 [cs.AI] 15 Apr 2017 Abstract In this work we present a new reinforcement learning agent, called Reactor (for Retraceactor), based on an off-policy multi-step return actor-critic architecture. The agent uses a deep recurrent neural network for function approximation. The network outputs a target policy π (the actor), an action-value Q-function (the critic) evaluating the current policy π, and an estimated behavioural policy µ̂ which we use for off-policy correction. The agent maintains a memory buffer filled with past experiences. The critic is trained by the multi-step off-policy Retrace algorithm and the actor is trained by a novel β-leave-oneout policy gradient estimate (which uses both the off-policy corrected return and the estimated Qfunction). The Reactor is sample-efficient thanks to the use of memory replay, and numerical efficient since it uses multi-step returns. Also both acting and learning can be parallelized. We evaluated our algorithm on 57 Atari 2600 games and demonstrate that it achieves state-of-the-art performance. 1. Introduction Model free deep reinforcement learning has achieved remarkable success lately in many domains ranging from achieving human and super-human level control in video games (Mnih et al., 2016), (Mnih et al., 2015) to continuous motor control tasks (Lillicrap et al., 2015). However, two of the most popular frameworks, DQN (Mnih et al., 2015) and A3C (Mnih et al., 2016), have several disadvantages: DQN suffers from potentially slow learning caused by single-step temporal difference updates, while A3C has a relatively low data-efficiency (since it does not use a memory buffer) and requires being trained on several copies of the same environment simultaneously. Also A3C is an on-policy algorithm which does not separate the evaluation policy from the behaviour policy, making it difficult to explore safely. Data-efficiency and off-policy learning are arguably impor1 DeepMind, London, UK. tant for many real-world problems where interactions with the environment is expensive. For this reason we wanted to exploit the off-policy advantage of DQN while also getting the benefits of using multi-step returns and an explicit policy evaluation of A3C framework. In this work we introduce a new agent architecture, called Reactor (for Retrace-actor), which has the following features. The Reactor uses an off-policy multi-step learning algorithm based on an actor-critic architecture. The critic implements the Retrace (Munos et al., 2016) algorithm, while the actor is trained by a new policy gradient algorithm, called β-leave-one-out, which makes use of both the off-policy Retrace-corrected return and the estimated Q-function. The Reactor is sample-efficient thanks to the use of memory replay, and numericaly efficient since it uses multi-step returns which improves the speed of reward propagation backwards in time, while the off-policy nature of the algorithm enables to reuse old data and be sample efficient. The reason we use an actor-critic architecture is to explicitly evaluate behavioural policies which may differ from policies derived from learned Q-values (such as epsilongreedy policies). This can be beneficial for several reasons. Firstly, a policy may be easier to learn than action values or action advantages. A second advantage is that estimating an explicit behavioural policy may reduce the problem of Q-value over-estimation when bootstrapping in the presence of noise, as the best action and the actual action value are evaluated by different functional approximations. Similar reasoning led to the introduction of Double DQN algorithm (Van Hasselt et al., 2016). The third advantage is that evaluating non-deterministic policies can potentially lead to less trace cutting while using Retrace algorithm. For this reason it is beneficial to be stochastic when actions are of equal value and the easiest way to do this is to have an explicit actor which is trained with some entropy reward. A main difference compared to DQN is that in order to implement the multi-step Retrace algorithm, we need to replay sequences of (instead of individual) transitions. Since we do so, using a recurrent network architecture comes at no cost. Actually, using a recurrent network architecture avoids complications related to frame-stacking and gives computational gains, as each frame has to be processed by The Reactor: A Sample-Efficient Actor-Critic Architecture a convolutional network only once in each sequence. While using a recurrent network architecture may not be required in Atari, it may become useful in more complex partially observable domains. And even in Atari domain, recent work (Harb & Precup) showed that using LSTM (combined with Watkins Q(λ) algorithm) can improve learning compared to feed-forward networks. Lastly, we decoupled acting from learning by allowing the actor and the learner to run in parallel. This does not block the actor during batched learning and does not block the learner while the actor is acting which in turn allows to achieve greater CPU utilization. Related works: Like A3C (Mnih et al., 2016), Reactor is an actor-critic multi-step returns algorithm. Reactor differs from A3C in that it uses a memory buffer and an offpolicy learning algorithm. Compared to DQN, Reactor brings the multi-step returns and the actor-critic architecture. DDPG (Lillicrap et al., 2015) uses an actor-critic architecture but in a continuous control setting making use of the deterministic policy gradient algorithm and does not consider multi-step returns. UNREAL agent (Jaderberg et al., 2016) improved final performance and data efficiency of A3C framework by introducing replay memory and unsupervised auxiliary tasks. The closest work to ours is the ACER algorithm (Wang et al., 2017) which is also an actor-critic based on the Retrace algorithm which makes use of memory replay. The main differences are (1) Reactor use a different policy gradient algorithm for the actor (see discussion in Section 2.2), (2) ACER mixes on-policy (from current run) and offpolicy (from memory) updates whereas Reactor uses offpolicy updates replayed from the memory exclusively, (3) Reactor makes use of an estimated µ̂ behaviour policy instead of storing µ in memory, and (4) Reactor uses an actor and learner that can run in parallel independently from each other. 2. The actor-critic algorithm In this section we first describe the general algorithm we used for the critic (Retrace) and the actor (β-leave-oneout). We describe our specific implementation in the next section. We first define some notation. We consider a Markov decision process with state space X and finite action space A. A (stochastic) policy is a mapping from X to distributions over actions. We consider a γ-discounted infinite-horizon criterion and define for any policy π, the Q-value of any state-action pair (x, a) as hX i Q (x, a) = E γ t r(xt , at )|x0 = x, a0 = a, π , π def t≥0 where ({xt }t≥0 ) is a trajectory generated by choosing a in x and following π thereafter, i.e., at ∼ π(·|xt ) (for t ≥ 1), and r(xt , at ) is a reward function. Our goal is to find an optimal policy π ∗ , which maximizes Qπ (x, a). Q∗ (x, a) = maxπ Qπ (x, a) represents the optimal Qvalues. We have the property that any policy defined in any state x as ∈ arg maxa Q∗ (x, a) is an optimal policy. 2.1. The critic: Retrace(λ) For the critic we use the Retrace(λ) algorithm introduced in (Munos et al., 2016). This is a general off-policy RL algorithm which uses multi-step returns. Assume that some trajectory {x0 , a0 , r0 , x1 , a1 , r1 , . . . , xt , at , rt , . . . , } has been generated according to some behaviour policy µ, i.e., at ∼ µ(·|xt ). Now we want to evaluate the value of a different target policy π, i.e. we want to estimate Qπ . The Retrace algorithm will update our current estimate Q of Qπ in the direction of X def ∆Q(xt , at ) = γ s−t (ct+1 . . . cs )δsπ Q, (1) s≥t def where δsπ Q = rs + γEπ [Q(xs+1 , ·)] − Q(xs , as ) is the temporal difference of Q at time s under policy π, and cs = λ min 1, π(as |xs )  . µ(as |xs ) (2) The Retrace algorithm comes with the theoretical guarantee that in finite state and action spaces, repeatedly updating our current estimate Q according to (1) produces a sequence which converges to Qπ for a fixed π or to Q∗ if we consider a sequence of policies π which become increasing greedy w.r.t. the Q estimates, see (Munos et al., 2016). 2.2. The actor: β-LOO policy gradient algorithm The Reactor architecture represents both a policy π(a|x) and Q-values Q(x, a). We use a policy gradient algorithm to train the actor π which makes use of our current estimate Q(x, a) of Qπ (x, a). Let V π (x0 ) be the value function at some initial state x0 , the policy gradient theorem et al., 2000) says that ∇V π (x0 ) = P P (Sutton t π E tγ a Q (xt , a)∇π(a|xt ) , where ∇ refers to the gradient w.r.t. policy parameters. We now consider several possible ways to estimate this gradient. To simplify notation, we drop the dependence on the state x for now and consider the problem of estimating the quantity X G= Qπ (a)∇π(a). (3) a Since we consider the off-policy case, consider estimating G using a single action A drawn from a (possibly different from π) behaviour distribution A ∼ µ. Let us assume that The Reactor: A Sample-Efficient Actor-Critic Architecture for the chosen action A we have access to an estimate R(A) of Qπ (A). Then we can use likelihood ratio (LR) method combined with an importance sampling (IS) ratio (which we call ISLR) to build an unbiased estimate of G: ĜISLR = π(A) (R(A) − V )∇ log π(A), µ(A) where V is a baseline that depend on the state but not on the chosen action. However this estimate suffers from high variance. A possible way for reducing variance is to estimate G directly from (3) by using the return R(A) for the chosen action A and our current estimate Q of Qπ for the other actions, which lead to the so-called leave-one-out (LOO) policy gradient estimate: X ĜLOO = R(A)∇π(A) + Q(a)∇π(a). (4) a6=A This estimate has low variance but may be biased if the estimated Q values differ from Qπ . A better bias-variance tradeoff may be obtained by considering the more general β-LOO policy gradient estimate: X Ĝβ-LOO = β(R(A) − Q(A))∇π(A) + Q(a)∇π(a), a (5) where β = β(µ, π, A) can be a function of both policies π and µ and the selected action A. Notice that when β = 1, (5) reduces to (4), and when β = 1/µ(A), then (5) is the Q-estimates are close to the true Qπ values. Now its variance is low when β is small. So in order to have a good bias-variance tradeoff we recommend using the β-LOO es1 , for some timate with β defined as: β(A) = min c, µ(A) constant c ≥ 1. Note that β(A) = 1 when c = 1. This truncated 1/µ coefficient shares similarities with the truncated IS gradient estimate introduced in (Wang et al., 2017) (which we call TISLR for truncated-ISLR):  π(A)  (R(A) − V )∇ log π(A) ĜTISLR = min c, µ(A)  X  π(a) + − c µ(a)(Qπ (a) − V )∇ log π(a). µ(a) + a The differences are: (i) we truncate 1/µ(A) = π(A)/µ(A) × 1/π(A) instead of truncating π(A)/µ(A), which provides an additional variance reduction due to the variance of the LR ∇ log π(A) = ∇π(A) π(A) (since this LR may be large when a low probability action is chosen), and (ii) we use our Q-baseline instead of a V baseline, reducing further the variance of the LR estimate. In our experiments we compare the different policy gradient estimates ĜISLR , ĜTISLR , and Ĝβ-LOO for β = 1, β = 1/µ, β = min(5, 1/µ). Remark: In off-policy learning it is very difficult to produce an unbiased sample R(A) of Qπ (A) when following another policy µ. This would require using full importance X sampling correction along the trajectory. Instead, in our π(A) (R(A)−Q(A))∇ log π(A)+ Q(a)∇π(a). Ĝ µ1 -LOO = implementation we use the off-policy corrected return comµ(A) a puted by the Retrace algorithm, which produces a (biased) (6) estimate of Qπ (A) but whose bias vanishes asymptotically, This estimate is unbiased and can be seen as a generalizasee (Munos et al., 2016). tion of ĜISLR where instead of using a state-only dependent baseline, we use a state-and-action-dependent baseline (our current estimate Q) and add the correction term 3. Reactor implementation P a ∇π(a)Q(a) to cancel the bias. We now analyze the 3.1. Off-policy past actions handled by Retrace bias of the Gβ-LOO estimate. Proposition 1. Assume A ∼ µ and that E[R(A)] = P Qπ (A). Then, the bias of Gβ-LOO is (1 − a µ(a)β(a))∇π(a)[Q(a) − Qπ (a)] . Since the agent’s policy changes with time, we need to take into account that past actions {as ∼ πs }s≤t , which have been stored in memory, have been generated according to a policy which is different from the policy πt we wish to evaluate at current time t. As described in Section 2.1, the Proof. We have that E[Ĝ]β-LOO is Retrace algorithm makes use of two policies, the behaviour X X Q(a)∇π(a) and target policies. In Reactor, the behaviour policy µ cor= µ(a)[β(a)(E[R(a)] −Q(a))]∇π(a) + | {z } responds to the actions {as }s≤t that have been generate by a a =Qπ (a) the agent in the past and have been stored in the memory X π buffer. The target policy corresponds to the current policy =G+ (1 − µ(a)β(a))[Q(a) − Q (a)]∇π(a) πt of the agent, which is the one we wish to evaluate. a 3.2. Behaviour probability estimates µ̂ Thus the bias is small when β(a) is close to 1/µ(a) (and unbiased for Ĝ µ1 -LOO whatever the Q estimates are) or when The agent’s behaviour is defined by sampling actions from the current policy πt and stores observed states, actions, re- The Reactor: A Sample-Efficient Actor-Critic Architecture wards and selected action probabilities (xt , at , rt , µt ) into the replay memory. Retrace uses an off-policy correction which requires the knowledge of the probability under which actions have been generated (i.e. the trace cutting coefficient cs in (2) depends on µ(as |xs )). We can either use stored in the memory the behaviour probabilities µ(as |xs ) of the chosen actions or we can construct and estimate µ̂ based on past samples by training to predict previously taken actions P (as |xs ). The replay memory contains a mixture of trajectories generated by the sequence of policies π1 , π2 , ..., πt during the learning process. To see the difference between µ and µ̂, consider that from a state x, actions 1 and 2 have been chosen in a deterministic way with same proportion. Thus the replay memory contains equal amounts of samples for both actions (in that state). From the off-policy batched learning perspective, from that state, the empirical distribution of actions is similar to that of a stochastic policy which would have chosen both actions with equal probabilities of 1/2. Thus the memorized probabilities µ(as |x) are either 1 or 0, whereas a learnt µ̂(as |x) will predict 1/2. It can be beneficial to use µ̂ since the trace cutting coefficients ct would be higher leading to less cutting and faster reward propagation by Retrace algorithm. This might make off-policy corrected returns less biased but at the cost of a higher variance. On the other hand if behavioural probability estimates are inaccurate, Retrace algorithm may produce biased returns. In the experimental section we report experiments for both approaches. Learnt estimate µ̂ may improve performance compared to using the true action probabilities in some circumstances, which is an interesting finding since those probabilities may not always be available (such as when learning from offline log data). Note that some theoretical findings (Li et al., 2015) support that using a regression estimate may indeed improve importance sampling. 3.3. Network architecture The Reactor architecture uses a recurrent neural network architecture which takes an observation xt as input and produces three outputs: current action-value estimates Q(xt , a), current policy π(a|xt ) and estimated behavioural policy µ̂(a|xt ), for all actions a (Figure 1). Action-values use a duelling architecture (Wang et al., 2015) which internally splits Q-value into state-value and advantage estimation, which in turn is connected to an LSTM recurrent network (Hochreiter & Schmidhuber, 1997). Policy and behaviour policy heads use last softmax layer mixed with a fixed uniform distribution of choosing a random action where this mixing ratio is a hyperparameter. Each policy network µ̂ and π have their own separate LSTM, as this was found to work much better than sharing the same LSTM with action-value head Q. Figure 1. The Reactor architecture. All three LSTMs in turn are connected to a shared linear layer which is connected to a shared convolutional neural network (Krizhevsky et al., 2012). Gradients coming from both policy LSTMs are blocked and only gradients originating from Q value LSTM is allowed to back-propagate to the convolutional neural network. We block gradients from π head for increasing stability, as this avoids positive feedback loops between π and Q caused by shared representations. Gradients originating from the µ̂ LSTM are also blocked in order to make experiments with memorized µ and estimated µ̂ values more comparable. Concatenated rectified linear units are used as nonlinearities in the network (Shang et al., 2016). We did this for two reasons. Firstly, as was shown by (Shang et al., 2016), convolutional neural networks with rectified linear units tend to lead to pairs of opposite features. Using concatenated rectified linear units allows to reduce the size of the filters by half, saving computation. Secondly, neural networks with rectified linear units tend to age, when a given unit gets pushed below zero by a wild gradient and being clamped at zero there is no gradient to ever pull it back up again. Using concatenated rectified linear units helps to solve this problem as if a neuron gets pushed below zero, a value pops up again on the negative side. It is up to the next linearity to learn not to use a value if it is not necessary. Finally, although we have chosen a recurrent (LSTM) network, a feed-forward implementation is still possible. However in some problems (such as in the Atari domain) it is often useful to base our decisions on a short history of past observations. We chose a recurrent network architecture instead of frame stacking for the reasons of implementation simplicity and computational efficiency. As Re- The Reactor: A Sample-Efficient Actor-Critic Architecture Table 1. Specification of the neural network used. L AYER I NPUT PARAMETERS SIZE C ONVOLUTIONAL C ONV 1 C ONCAT R E LU C ONV 2 C ONCAT R E LU C ONV 3 C ONCAT R E LU Figure 2. Unrolling current and target networks. Target network T is fixed while current network N is being trained. The target network is unrolled over a window of sequences offset by one compared to the current network. A new target network Q value estimate (shown in red) depend on target network values and rewards surrounded by red dashed rectangles. trace algorithm requires evaluating Q-values over contiguous sequences of trajectories, using a recurrent architecture allowed each frame to be processed by the convolutional network only once, as opposed to several times if several frame concatenations were used. Precise network specification is given in Table 1. The value of  is the minimum probability of choosing a random action and it is hard-coded into the policy network. F ULLY CONNECTED L INEAR C ONCAT R E LU R ECURRENT π AND µ̂ LSTM L INEAR C ONCAT R E LU L INEAR S OFTMAX X (1-)+/# ACTIONS R ECURRENT Q LSTM VALUE HEAD L INEAR C ONCAT R E LU L INEAR A DVANTAGE HEAD L INEAR C ONCAT R E LU L INEAR [84, 84, 1] [20, 20, 16] [20, 20, 32] [9, 9, 32] [9, 9, 64] [7, 7, 32] [7, 7, 64] [128] KERNEL WIDTH OUTPUT CHANNELS STRIDES [8, 8] 16 4 [4, 4] 32 2 [3, 3] 32 1 O UTPUT SIZE 128 O UTPUT SIZE [256] [128] [32] [64] [# ACTIONS ] [# ACTIONS ] [256] [128] [32] [64] [128] [32] [64] 128 32 # ACTIONS # ACTIONS # ACTIONS O UTPUT SIZE 128 O UTPUT SIZE 32 1 O UTPUT SIZE 32 # ACTIONS distances than it was trained on, we evaluated target Q values on sub-sequences of 32 shifted by 1 comparing to the current learning network (Figure 2). When the agent was acting, the internal state of its policy LSTM was reset only at the beginning of each episode. 3.5. Learning Q, π, µ̂, from a replayed sequence 3.4. Target networks We used a target network QT (fixed copy of the current network) similar to that of DQN (Mnih et al., 2015). Our implementation of the Retrace algorithm makes use of the target network QT . Contiguous sequences {xu , . . . , xu+τ } of length τ are sampled uniformly at random from our memory buffer. We use the target network QT to update our current Q-estimate Q(xt , at ) at every state xt (t ∈ [u, u + τ ]) in the direction of the new target value: Figure 3. Relationship between different network outputs. µ̂ are estimated behavioural probabilities, Q are estimation of the value function Qπ , and π is the current agent’s policy. Q is learnt using u+τ X the Retrace algorithm. π is learnt using the β-LOO policy gradirt + γEπ [QT (xt+1 , ·)] + γ s−t (ct+1 . . . cs )δsπ QT , (7) ent algorithm, and µ̂ is trained by supervised learning to predict s=t+1 past actions given past states. where δsπ QT = rs + γEπ [QT (xs+1 , ·)] − QT (xs , as ). The target network is updated every Tupdate ∈ {1000, 10000} learning steps. We trained all neural networks by sampling contiguous sequences of length τ = 33 and during learning time we always reset the LSTM internal state. In order not to unroll target network over longer In each learning step, a sequence of length τ is sampled (uniformly) at random from the memory. The target QT values are evaluated along the sequence and the current policy π and behaviour policy µ̂ probabilities are evaluated by the current network. Learning Q-values: Retrace algorithm is used to regress The Reactor: A Sample-Efficient Actor-Critic Architecture (using an L2-loss) all current Q-values along the sequence towards the new target-values defined by (7). If µ̂ values are used they are evaluated from the moving network in order to get the most up-to-date behavioural estimates. Learning π: the current policy π is updated by using the β-LOO policy gradient estimate discussed earlier. In order to avoid converging too quickly to deterministic policies we add a scaled entropy reward to the policy gradient. In order to make entropy reward scale to be more uniform across games with different reward amplitudes and frequencies, during each learning step we evaluated a mean action-gap over a batch of sampled sequences and used it to scale entropy. We defined a mean action-gap as a mean difference between the best action value and a (uniformly) randomly chosen other action. We used 0.1 as a scaling constant for entropy reward. Learning µ̂: We regress µ̂ towards actions sampled from replay memory using a cross entropy loss. We summed all losses, evaluated gradients and used ADAM optimizer (Kingma & Ba, 2014) to train the neural network. 3.6. Parallelism exploit computational benefits of batched learning. 4. Results 4.1. Comparison of different policy gradients within Reactor architecture We trained different versions of Reactor on 57 Atari games for 200 million frames with 3 randomly initialized seeds per experiment. We used the following method to compare algorithm performance across all games as a function of training time: (1). For each game for each algorithm pair and for each time step we evaluated the probability that algorithm 1 has more score than algorithm 2 by comparing all seeds pair-wise. This produced a tensor of size P[game x alg1 x alg2 x time]. (2). For each algorithm pair and for each time-step we averaged probabilities across games producing Q[alg1 x alg2 x time]. This quantity has an interpretable meaning of the probability that a random instance of algorithm 1 would be outperforming a random instance of algorithm 2 at time t given a randomly chosen game. (3). For each algorithm and each time we evaluated the average probability by averaging across all other algorithms. This produced a matrix S[alg x time] which has a meaning of a probabiliy that an algorithm outperforms any other randomly selected algorithm on a randomly selected game at training step t. We plot those curves as a function of time in order to compare relative algorithm performance at different stages of learning. 4.2. Estimating versus memorizing behavioural probabilities Figure 4. The model of parallelism. Reactor uses a single actor thread acting on the environment and a single learner thread training the neural network by sampling batched trajectories from the neural network. Both threads run asynchronously. This is different than the approach used by DQN (a single thread alternating acting and learning) and an A3C (multiple asynchronous threads alternating learning and acting). In order to improve CPU/GPU utilization we can decouple acting from learning. This is an important aspect of our architecture: an acting thread receives observations, submits actions to the environment, and stores transition information into the memory, while an learning thread resamples sequences of experiences from the memory and learns from them (Figure 4). Comparing to the standard DQN framework (Mnih et al., 2015) Reactor is able to improve CPU/GPU utilization by learning while acting, and comparing to A3C framework (Mnih et al., 2016) we can We evaluated inter-game performance metric described in section 4.1. Using the slowest target network update frequency Tupdate = 10000 gave better results than using Tupdate = 1000 and using a lower value of λ = 0.9 gave better results than λ = 1.0. The results are shown in Figures 5 and 6. As it is seen, memorizing behavioural probability values on average gave better results for most algorithms and most parameter configurations that when using estimated values, especially for target network update period Tupdate = 10000. A notable exception is TISLR algorithm, where estimated behavioural probabilities gave better scores over most training steps and most parameter configurations. Still, a difference in performance was not so huge, as at 200 million steps learning behavioural probabilities had roughly 1/3 chance of giving better results than memorizing values for both beta-LOO algorithms and gave similar performance in the case of TSILR (Figure 5). This demonstrates that estimating behavioural probabilities is a feasible approach when actual behaviour probability values are not available, which could happen when learning from offline log data or in the case of apprentice learning. The Reactor: A Sample-Efficient Actor-Critic Architecture gorithm B if it collects more score on a given Atari game when using 30 random human starts. In our Elo evaluation difference in ranking 400 correspond to the odds of winning of 10:1. Table 2. Comparison of algorithm performance across 57 Atari games with 30 random human starts. Human Elo was defined to be zero. Value above zero indicate super-human performance. Reactor was trained with λ = 1.0 and target network update period of 104 learning steps. A LGORITHM Figure 5. Comparison of a relative performance of memorizing versus learning behaviour probability values for three different tested policy gradient algorithms as a function of training epoch and the best found parameter configuration of Tupdate = 10000, λ = 0.9. Y axis represents a probability that a given policy gradient algorithm would score more when memorized behaviour probability µ values are used than when estimating behaviour probability µ̂ values are used on a randomly selected Atari game at a given training epoch. Each training epoch consisted of 1 million environment steps. Each algorithm was run with three random seeds and the curves include a comparison of all pairs of seeds. 4.3. Comparing different policy gradients As can be seen from Figure 6, leave-one-out with β = 1 performed slightly better than leave-one-out with β = min(1/µ, 5) for both memorized and estimated behaviour probability values. Both algorithms performed better than TISLR for memorized behavioural probabilities and performed similarly when probabilities were estimated. 4.4. Comparing different architectures In order to compare different algorithms, we evaluated the best Reactor version obtained from Figure 6 by evaluating it on 200 episodes with 30 random human starts on each Atari game. We evaluated mean episode rewards for each atari game and human normalized scores. We calculated mean and median human normalized scores across all games. In addition to that, we ranked all algorithms (including random and human scores) for each game and evaluated mean rank of each algorithm across all 57 Atari games. We believe that this is a better metric to compare algorithms across different games with vastly different rewards scales because it is less sensitive to the errors introduced when measuring human play, which otherwise is present in the denominator when calculating human normalized scores. We also evaluated an Elo scores for each algorithm, where algorithm A is considered to win over al- R ANDOM H UMAN DQN DDQN D UEL P RIOR P RIOR . D UEL . R EACTOR M1 N ORMALIZED SCORES R ANK MEAN MEAN MEDIAN Across all games 0.00 0.00 1.00 1.00 2.17 0.69 3.31 1.11 3.42 1.17 3.84 1.13 5.65 1.15 5.55 1.40 7.67 4.19 5.61 4.42 3.49 3.77 3.47 3.40 E LO -520 0 -153 -24 71 43 73 81 Table 3. Comparison of algorithm performance across 57 Atari games with 30 random noop starts. We reported the final performance by taking the best training curve value from each learning curve in order to make evaluation comparable to the results reported by (Wang et al., 2017). Experiments marked with letter M indicate memorized µ while L indicates learnt value of µ̂. Algorithms L1 and M1 correspond to β-LOO with β = 1 while L5 and M5 correspond to β-LOO with β = min(1/µ̂, 5) and β = min(1/µ, 5) respectively. A LGORITHM R ANDOM H UMAN ACER R EACTOR M5 R EACTOR M1 R EACTOR M TISLR R EACTOR L5 R EACTOR L1 R EACTOR L TISLR N ORMALIZED M EAN SCORES RANK 0.00 1.00 1.55 1.40 1.51 1.28 1.54 1.61 1.72 8.00 4.74 3.81 3.42 4.82 4.12 3.84 3.65 E LO -808 0 100 139 -2 71 99 116 Table 2 contains a comparison of our algorithm with several other synchronous state-of-art algorithms across 57 Atari games for a fixed random seed across all games (Bellemare et al., 2013). The algorithms that we compare Reactor to are: DQN (Mnih et al., 2015), Double DQN (Van Hasselt et al., 2016), DQN with prioritized experience replay (Schaul et al., 2015), duelling architecture and prioritized duelling architecture (Wang et al., 2015). Each algorithm was exposed to 200 million frames of experience and the The Reactor: A Sample-Efficient Actor-Critic Architecture λ = 0.9 Tupdate = 103 Tupdate = 104 λ = 1.0 Figure 6. Comparison of performance of different policy gradient algorithms with memorized µt and estimated µ̂t values of behavioural probabilities. Darker colours correspond to learnt values µ̂t while lighter curves correspond to memorized probabilities µt . Y axis represents a probability that a given algorithm would score more on a randomly selected algorithm with one of three randomly selected Tupdate and λ configurations on a randomly selected Atari game at a training given epoch. Each training epoch consisted of 1 million environment steps. The Reactor: A Sample-Efficient Actor-Critic Architecture same pre-processing pipeline including 4 action repeats was used as in the original DQN paper (Mnih et al., 2015). We tested the version of Reactor which memorized past behaviour probabilities and used β = 1. Reactor was able to improve over prioritized duelling agent in terms of median human normalized scores, mean rank and Elo, but was slightly worse in terms of mean human normalized scores. Table 3 contains a comparison of our algorithm with ACER algorithm (Wang et al., 2017). In the case of Reactor, the table was produced in the following way. While the agent was training on each game, scores were averaged over 200 windows of length 1 million. The maximum value was taken from each curve and it was human-normalized. A median value was evaluated for each algorithm across all games. The best value for ACER was obtained from Figure 1 in (Wang et al., 2017) by reading off the highest learning curve below 200 million steps. As it is seen from the results two versions of Reactor improved over the ACER algorithm in terms of median human normalized scores. On the other hand our evaluation was somewhat more pessimistic than the one used by (Wang et al., 2017), because we averaged rewards over windows of 1 million steps, while in the case of ACER the rewards were averaged over windows of 200 thousand frames. Averaging over longer windows leads to less variance, which in turn introduces less optimistic bias encountered during the maximization process. We were not able to evaluate Rank and Elo scores for ACER because we did not have per-game evaluations. One interesting finding was that our implementation of TISLR algorithm with learnt probabilities achieved better results than the ones reported in the ACER paper when using learn behavioural probabilities. 5. Conclusion In this work we presented a new off-policy agent based on Retrace actor critic architecture and demonstrated that it can achieve similar performance as the current state of the art. We also demonstrated that estimated behavioural probabilities can outperformed memorized behavioural probabilities under some circumstances when used for off-policy correction. As the framework is fully off-policy, it can be used to test different exploration ideas. References Bellemare, Marc G, Naddaf, Yavar, Veness, Joel, and Bowling, Michael. The arcade learning environment: An evaluation platform for general agents. J. Artif. Intell. Res.(JAIR), 47:253–279, 2013. Harb, Jean and Precup, Doina. Investigating recurrence and eligibility traces in deep q-networks. Hochreiter, Sepp and Schmidhuber, Jürgen. Long shortterm memory. Neural computation, 9(8):1735–1780, 1997. Jaderberg, Max, Mnih, Volodymyr, Czarnecki, Wojciech Marian, Schaul, Tom, Leibo, Joel Z, Silver, David, and Kavukcuoglu, Koray. Reinforcement learning with unsupervised auxiliary tasks. arXiv preprint arXiv:1611.05397, 2016. Kingma, Diederik and Ba, Jimmy. method for stochastic optimization. arXiv:1412.6980, 2014. Adam: A arXiv preprint Krizhevsky, Alex, Sutskever, Ilya, and Hinton, Geoffrey E. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012. Li, Lihong, Munos, Rémi, and Szepesvári, Csaba. Toward minimax off-policy value estimation. In Proceedings of the Eighteenth International Conference on Artificial Intelligence and Statistics, AISTATS 2015, San Diego, California, USA, May 9-12, 2015, 2015. Lillicrap, Timothy P, Hunt, Jonathan J, Pritzel, Alexander, Heess, Nicolas, Erez, Tom, Tassa, Yuval, Silver, David, and Wierstra, Daan. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015. Mnih, Volodymyr, Kavukcuoglu, Koray, Silver, David, Rusu, Andrei A, Veness, Joel, Bellemare, Marc G, Graves, Alex, Riedmiller, Martin, Fidjeland, Andreas K, Ostrovski, Georg, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529– 533, 2015. Mnih, Volodymyr, Badia, Adria Puigdomenech, Mirza, Mehdi, Graves, Alex, Lillicrap, Timothy P, Harley, Tim, Silver, David, and Kavukcuoglu, Koray. Asynchronous methods for deep reinforcement learning. In International Conference on Machine Learning, 2016. Munos, Rémi, Stepleton, Tom, Harutyunyan, Anna, and Bellemare, Marc. Safe and efficient off-policy reinforcement learning. In Advances in Neural Information Processing Systems, pp. 1046–1054, 2016. Schaul, Tom, Quan, John, Antonoglou, Ioannis, and Silver, David. Prioritized experience replay. arXiv preprint arXiv:1511.05952, 2015. Shang, Wenling, Sohn, Kihyuk, Almeida, Diogo, and Lee, Honglak. Understanding and improving convolutional neural networks via concatenated rectified linear units. In Proceedings of the International Conference on Machine Learning (ICML), 2016. The Reactor: A Sample-Efficient Actor-Critic Architecture Sutton, Richard S., Mcallester, David, Singh, Satinder, and Mansour, Yishay. Policy gradient methods for reinforcement learning with function approximation. In In Advances in Neural Information Processing Systems 12, pp. 1057–1063. MIT Press, 2000. Van Hasselt, Hado, Guez, Arthur, and Silver, David. Deep reinforcement learning with double q-learning. In AAAI, pp. 2094–2100, 2016. Wang, Ziyu, Schaul, Tom, Hessel, Matteo, van Hasselt, Hado, Lanctot, Marc, and de Freitas, Nando. Dueling network architectures for deep reinforcement learning. International Conference on Machine Learning, pp. 1995–2003, 2015. Wang, Ziyu, Bapst, Victor, Heess, Nicolas, Mnih, Volodymyr, Munos, Remi, Kavukcuoglu, Koray, and de Freitas, Nando. Sample efficient actor-critic with experience replay. In International Conference on Learning Representations, 2017. The Reactor: A Sample-Efficient Actor-Critic Architecture 6. Appendix Table 4. Scores for each game evaluated with 30 random human starts. Reactor was evaluated by averaging scores over 200 episodes while other algorithms were evaluated by averaging scores over 100 episodes. All scores (except for Reactor) were taken from (Wang et al., 2015) . G AME AGENT A LIEN A MIDAR A SSAULT A STERIX A STEROIDS ATLANTIS BANK H EIST BATTLEZONE B EAM R IDER B ERZERK B OWLING B OXING B REAKOUT C ENTIPEDE C HOPPER C OMMAND C RAZY C LIMBER D EFENDER D EMON ATTACK D OUBLE D UNK E NDURO F ISHING D ERBY F REEWAY F ROSTBITE G OPHER G RAVITAR H.E.R.O. I CE H OCKEY JAMES B OND 007 K ANGAROO K RULL K UNG -F U M ASTER M ONTEZUMA’ S R EVENGE M S . PAC -M AN NAME T HIS G AME P HOENIX P ITFALL ! P ONG P RIVATE E YE Q* BERT R IVER R AID ROAD RUNNER ROBOTANK S EAQUEST S KIING S OLARIS S PACE I NVADERS S TARGUNNER S URROUND T ENNIS T IME P ILOT T UTANKHAM U P ’ N D OWN V ENTURE V IDEO P INBALL W IZARD OF W OR YARS ’ R EVENGE Z AXXON R ANDOM 128.3 11.8 166.9 164.5 871.3 13463.0 21.7 3560.0 254.6 196.1 35.2 -1.5 1.6 1925.5 644.0 9337.0 1965.5 208.3 -16.0 -81.8 -77.1 0.1 66.4 250.0 245.5 1580.3 -9.7 33.5 100.0 1151.9 304.0 25.0 197.8 1747.8 1134.4 -348.8 -18.0 662.8 183.0 588.3 200.0 2.4 215.5 -15287.4 2047.2 182.6 697.0 -9.7 -21.4 3273.0 12.7 707.2 18.0 20452.0 804.0 1476.9 475.0 H UMAN 6371.3 1540.4 628.9 7536.0 36517.3 26575.0 644.5 33030.0 14961.0 2237.5 146.5 9.6 27.9 10321.9 8930.0 32667.0 14296.0 3442.8 -14.4 740.2 5.1 25.6 4202.8 2311.0 3116.0 25839.4 0.5 368.5 2739.0 2109.1 20786.8 4182.0 15375.0 6796.0 6686.2 5998.9 15.5 64169.1 12085.0 14382.2 6878.0 8.9 40425.8 -3686.6 11032.6 1464.9 9528.0 5.4 -6.7 5650.0 138.3 9896.1 1039.0 15641.1 4556.0 47135.2 8443.0 DQN 634.0 178.4 3489.3 3170.5 1458.7 292491.0 312.7 23750.0 9743.2 493.4 56.5 70.3 354.5 3973.9 5017.0 98128.0 15917.5 12550.7 -6.0 626.7 -1.6 26.9 496.1 8190.4 298.0 14992.9 -1.6 697.5 4496.0 6206.0 20882.0 47.0 1092.3 6738.8 7484.8 -113.2 18.0 207.9 9271.5 4748.5 35215.0 58.7 4216.7 -12142.1 1295.4 1293.8 52970.0 -6.0 11.1 4786.0 45.6 8038.5 136.0 154414.1 1609.0 4577.5 4412.0 DDQN 1033.4 169.1 6060.8 16837.0 1193.2 319688.0 886.0 24740.0 17417.2 1011.1 69.6 73.5 368.9 3853.5 3495.0 113782.0 27510.0 69803.4 -0.3 1216.6 3.2 28.8 1448.1 15253.0 200.5 14892.5 -2.5 573.0 11204.0 6796.1 30207.0 42.0 1241.3 8960.3 12366.5 -186.7 19.1 -575.5 11020.8 10838.4 43156.0 59.1 14498.0 -11490.4 810.0 2628.7 58365.0 1.9 -7.8 6608.0 92.2 19086.9 21.0 367823.7 6201.0 6270.6 8593.0 D UEL 1486.5 172.7 3994.8 15840.0 2035.4 445360.0 1129.3 31320.0 14591.3 910.6 65.7 77.3 411.6 4881.0 3784.0 124566.0 33996.0 56322.8 -0.8 2077.4 -4.1 0.2 2332.4 20051.4 297.0 15207.9 -1.3 835.5 10334.0 8051.6 24288.0 22.0 2250.6 11185.1 20410.5 -46.9 18.8 292.6 14175.8 16569.4 58549.0 62.0 37361.6 -11928.0 1768.4 5993.1 90804.0 4.0 4.4 6601.0 48.0 24759.2 200.0 110976.2 7054.0 25976.5 10164.0 P RIOR 1334.7 129.1 6548.9 22484.5 1745.1 330647.0 876.6 25520.0 31181.3 865.9 52.0 72.3 343.0 3489.1 4635.0 127512.0 23666.5 61277.5 16.0 1831.0 9.8 28.9 3510.0 34858.8 269.5 20889.9 -0.2 3961.0 12185.0 6872.8 31676.0 51.0 1865.9 10497.6 16903.6 -427.0 18.9 670.7 9944.0 11807.2 52264.0 56.2 25463.7 -10169.1 2272.8 3912.1 61582.0 5.9 -5.3 5963.0 56.9 12157.4 94.0 295972.8 5727.0 4687.4 9474.0 P RIOR . D UEL . 823.7 238.4 10950.6 364200.0 1021.9 423252.0 1004.6 30650.0 37412.2 2178.6 50.4 79.2 354.6 5570.2 8058.0 127853.0 34415.0 73371.3 -10.7 2223.9 17.0 28.2 4038.4 105148.4 167.0 15459.2 0.5 585.0 861.0 7658.6 37484.0 24.0 1007.8 13637.9 63597.0 -243.6 18.4 1277.6 14063.0 16496.8 54630.0 24.7 1431.2 -18955.8 280.6 8978.0 127073.0 -0.2 -13.2 4871.0 108.6 22681.3 29.0 447408.6 10471.0 58145.9 11320.0 R EACTOR M1 856.5 221.4 15511.3 16797.0 6207.4 705930.5 901.2 76385.0 6994.8 912.5 70.3 68.2 457.3 3522.4 5080.0 144593.5 50490.5 45122.3 21.5 2110.1 16.0 29.2 3348.9 60018.6 497.2 10604.0 5.4 3049.0 7163.5 8148.6 46172.5 23.0 1207.5 11897.0 5844.1 -198.4 18.9 -161.4 7413.5 6113.6 49709.0 59.3 5943.3 -15464.8 840.2 1704.8 45829.0 -0.9 22.5 14596.0 130.5 165934.0 7.5 550035.6 8658.0 65248.1 11980.0 The Reactor: A Sample-Efficient Actor-Critic Architecture Table 5. Human normalized scores obtained by evaluating agents with 30 random human starts. . G AME AGENT A LIEN A MIDAR A SSAULT A STERIX A STEROIDS ATLANTIS BANK H EIST BATTLEZONE B EAM R IDER B ERZERK B OWLING B OXING B REAKOUT C ENTIPEDE C HOPPER C OMMAND C RAZY C LIMBER D EFENDER D EMON ATTACK D OUBLE D UNK E NDURO F ISHING D ERBY F REEWAY F ROSTBITE G OPHER G RAVITAR H.E.R.O. I CE H OCKEY JAMES B OND 007 K ANGAROO K RULL K UNG -F U M ASTER M ONTEZUMA’ S R EVENGE M S . PAC -M AN NAME T HIS G AME P HOENIX P ITFALL ! P ONG P RIVATE E YE Q* BERT R IVER R AID ROAD RUNNER ROBOTANK S EAQUEST S KIING S OLARIS S PACE I NVADERS S TARGUNNER S URROUND T ENNIS T IME P ILOT T UTANKHAM U P ’ N D OWN V ENTURE V IDEO P INBALL W IZARD OF W OR YARS ’ R EVENGE Z AXXON R ANDOM 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 H UMAN 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 DQN 0.08 0.11 7.19 0.41 0.02 21.28 0.47 0.69 0.65 0.15 0.19 6.47 13.42 0.24 0.53 3.81 1.13 3.82 6.25 0.86 0.92 1.05 0.10 3.85 0.02 0.55 0.79 1.98 1.67 5.28 1.00 0.01 0.06 0.99 1.14 0.04 1.07 -0.01 0.76 0.30 5.24 8.66 0.10 0.27 -0.08 0.87 5.92 0.25 2.21 0.64 0.26 0.80 0.12 8.56 0.21 0.07 0.49 DDQN 0.14 0.10 12.76 2.26 0.01 23.35 1.39 0.72 1.17 0.40 0.31 6.76 13.97 0.23 0.34 4.48 2.07 21.52 9.81 1.58 0.98 1.13 0.33 7.28 -0.02 0.55 0.71 1.61 4.21 5.90 1.46 0.00 0.07 1.43 2.02 0.03 1.11 -0.02 0.91 0.74 6.43 8.72 0.36 0.33 -0.14 1.91 6.53 0.77 0.93 1.40 0.63 2.00 0.00 22.21 1.44 0.10 1.02 D UEL 0.22 0.11 8.29 2.13 0.03 32.94 1.78 0.94 0.97 0.35 0.27 7.10 15.59 0.35 0.38 4.94 2.60 17.35 9.50 2.63 0.89 0.00 0.55 9.61 0.02 0.56 0.82 2.39 3.88 7.21 1.17 -0.00 0.14 1.87 3.47 0.05 1.10 -0.01 1.18 1.16 8.74 9.17 0.92 0.29 -0.03 4.53 10.20 0.91 1.76 1.40 0.28 2.62 0.18 5.79 1.67 0.54 1.22 P RIOR 0.19 0.08 13.81 3.03 0.02 24.19 1.37 0.75 2.10 0.33 0.15 6.65 12.98 0.19 0.48 5.07 1.76 18.88 20.00 2.33 1.06 1.13 0.83 16.79 0.01 0.80 0.93 11.72 4.58 5.98 1.53 0.01 0.11 1.73 2.84 -0.01 1.10 0.00 0.82 0.81 7.80 8.28 0.63 0.44 0.03 2.91 6.89 1.03 1.10 1.13 0.35 1.25 0.07 17.62 1.31 0.07 1.13 P RIOR . D UEL . 0.11 0.15 23.34 49.38 0.00 31.25 1.58 0.92 2.53 0.97 0.14 7.27 13.42 0.43 0.89 5.08 2.63 22.62 3.31 2.80 1.14 1.10 0.96 50.90 -0.03 0.57 1.00 1.65 0.29 6.80 1.82 -0.00 0.05 2.36 11.25 0.02 1.09 0.01 1.17 1.15 8.15 3.43 0.03 -0.32 -0.20 6.86 14.31 0.63 0.56 0.67 0.76 2.39 0.01 27.30 2.58 1.24 1.36 R EACTOR M1 0.12 0.14 33.21 2.26 0.15 52.81 1.41 2.47 0.46 0.35 0.32 6.28 17.33 0.19 0.54 5.80 3.94 13.89 23.44 2.67 1.13 1.14 0.79 29.00 0.09 0.37 1.48 9.00 2.68 7.31 2.24 -0.00 0.07 2.01 0.85 0.02 1.10 -0.01 0.61 0.40 7.41 8.75 0.14 -0.02 -0.13 1.19 5.11 0.58 2.99 4.76 0.94 17.98 -0.01 33.86 2.09 1.40 1.44
2cs.AI
Solution of linear ill-posed problems by model arXiv:1710.10921v1 [stat.ME] 30 Oct 2017 selection and aggregation Felix Abramovich Daniela De Canditiis Department of Statistics Istituto per le Applicazioni and Operations Research del Calcolo ”M. Picone”, CNR Tel Aviv University Rome Israel Italy [email protected] [email protected] Marianna Pensky Department of Mathematics University of Central Florida USA [email protected] Abstract We consider a general statistical linear inverse problem, where the solution is represented via a known (possibly overcomplete) dictionary that allows its sparse representation. We propose two different approaches. A model selection estimator selects a single model by minimizing the penalized empirical risk over all possible models. By contrast with direct problems, the penalty depends on the model itself rather than on its size only as for complexity penalties. A Q-aggregate estimator averages over the entire collection of estimators with properly chosen weights. Under mild conditions on the dictionary, we establish oracle inequalities both with high probability and in expectation for the two estimators. Moreover, for the latter estimator these inequalities are sharp. The proposed procedures are implemented numerically and their performance is assessed by a simulation study. Keywords: Aggregation, ill-posed linear inverse problems, model selection, oracle inequality, overcomplete dictionary AMS (2000) Subject Classification: Primary: 62G05. Secondary: 62C10 1 1 Introduction Linear inverse problems, where the data is available not on the object of primary interest but only in the form of its linear transform, appear in a variety of fields: medical imaging (X-ray tomography, CT and MRI), astronomy (blured images), finance (model calibration of volatility) to mention just a few. The main difficulty in solving inverse problems is due to the fact that most of practically interesting and relevant cases fall into into the category of so-called ill-posed problems, where the solution cannot be obtained numerically by simple invertion of the transform. In statistical inverse problems the data is, in addition, corrupted by random noise that makes the solution even more challenging. Statistical linear inverse problems have been intensively studied and there exists an enormous amount of literature devoted to various theoretical and applied aspects of their solutions. We refer a reader to to Cavalier (2009) for review and references therein. Let G and H be two separable Hilbert spaces and A : G → H be a bounded linear operator. Consider a general statistical linear inverse problem y = Af + σε, (1) where y is the observation, f ∈ G is the (unknown) object of interest, ε is a white noise and σ is a (known) noise level. For ill-posed problems A−1 does not exist as a linear bounded operator. Most of approaches for solving (1) essentially rely on reduction of the original problem to a sequence model using the following general scheme: 1. Choose some orthonormal basis {φj } on G and expand the unknown f in (1) as f= X hf, φj iG φj (2) j 2. Define ψj as the solution of A∗ ψj = φj , where A∗ is the adjoint operator, that is, ψj = A(A∗ A)−1 φj . Reduce (1) to the equivalent sequence model: hy, ψj iH = hAf, ψj iH + hε, ψj iH = hf, φj iG + hε, ψj iH , (3) where for ill-posed problems Var (hy, ψj iH ) = σ 2 kψj k2H increases with j. Following the common terminology, an inverse problem is called mildly ill-posed, if the variances increase polynomially and severely ill-posed if their growth is exponential (see, e.g., Cavalier, 2009). \ 3. Estimate the unknown coefficients hf, φj iG from empirical coefficients hy, ψj iH : hf, φj iG = δ{hy, ψj iH }, where δ(·) is some truncating/shrinking/thresholding procedure (see, e.g., Cavalier 2009, Section 1.2.2.2 for a survey), and reconstruct f as fˆ = X j 2 \ hf, φj iG φj Efficient representation of f in a chosen basis {φj } in (2) is essential. In the widely-used singular value decomposition (SVD), φj ’s are the orthogonal eigenfunctions of the self-adjoint operator A∗ A and ψj = λ−1 j Aφj , where λj is the corresponding eigenvalue. SVD estimators are known to be optimal in various minimax settings over certain classes of functions (e.g., Johnstone & Silverman, 1990; Cavalier & Tsybakov, 2002; Cavalier et al., 2002). A serious drawback of SVD is that the basis is defined entirely by the operator A and ignores the specific properties of the object of interest f ∈ G. Thus, for a given A, the same basis will be used regardless of the nature of a scientific problem at hand. While the SVD-basis could be very efficient for representing f in one area, it might yield poor approximation in the other. The use of SVD, therefore, restricts one within certain classes G depending on a specific operator A. See Donoho (1995) for further discussion. In wavelet-vaguelette decomposition (WVD), φj ’s are orthonormal wavelet series. Unlike SVD- basis, wavelets allows sparse representation for various classes of functions and the resulting WVD estimators have been studied in Donoho (1995), Abramovich & Silverman (1998), Kalifa & Mallat (2003), Johnstone et al. (2004). However, WVD imposes relatively stringent conditions on A that are satisfied only for specific types of operators, mainly of convolution type. A general shortcoming of orthonormal bases is due to the fact that they may be “too coarse” for efficient representation of unknown f . Since 90s, there was a growing interest in the atomic decomposition of functions over overcomplete dictionaries (see, for example, Mallat & Zhang, 1993; Chen, Donoho & Saunders, 1999; Donoho & Elad, 2003). Every basis is essentially only a minimal necessary dictionary. Such “miserly” representation usually causes poor adaptivity (Mallat & Zhang, 1993). Application of overcomplete dictionaries improves adaptivity of the representation, because one can choose now the most efficient (sparse) one among many available. One can see here an interesting analogy with colors. Theoretically, every other color can be generated by combining three basic colors (green, red and blue) in corresponding proportions. However, a painter would definitely prefer to use the whole available palette (overcomplete dictionary) to get the hues he needs! Selection of appropriate subset of atoms (model selection) that allows a sparse representation of a solution is a core element in such an approach. Pensky (2016) was probably the first to use overcomplete dictionaries for solving inverse problems. She utilized the Lasso techniques for model selection within the overcomplete dictionary, established oracle inequalities with high probability and applied the proposed procedure to several examples of linear inverse problems. However, as usual with Lasso, it required somewhat restrictive compatibility conditions on the design matrix Φ. In this paper we propose two alternative approaches for overcomplete dictionaries based estimation in linear ill-posed problems. The first estimator is obtained by minimizing penalized P empirical risk with a penalty on model M proportional to j∈M kψj2 k. The second one is based on a Q-aggregation type procedure that is specifically designed for solution of linear ill-posed problems and is different from that of Dai et al. (2012) developed for solution of direct problems. We 3 establish oracle inequalities for both estimators that hold with high probabilities and in expectation. Moreover, for the Q-aggregation estimator, the inequalities are sharp. Simulation study shows that the new techniques produce more accurate estimators than Lasso. The rest of the paper is organized as follows. Section 2 introduces the notations and some preliminary results. The model selection and aggregation-type procedures are studied respectively in Section 3 and Section 4. The simulation study is described in Section 5. All proofs are given in the Appendix. 2 Setup and notations Consider a discrete analog of a general statistical linear inverse problem (1): y = Af + σε, (4) where y ∈ Rn is the vector of observations, f ∈ Rn is the unknown vector to be recovered, A is a known (ill-posed) n × m (n ≥ m) matrix with rank(A) = m, and ε ∼ N (0, In ). In what follows k · k and h·, ·i denote respectively a Euclidean norm and an inner product in Rn . Let φj ∈ Rn , j = 1, · · · , p with kφj k = 1 be a set of normalized vectors (dictionary), where typically p > n (overcomplete dictionary). Let Φn×p be the complete dictionary matrix with the columns φj , j = 1, . . . , p, and Ψn×p is such that AT Ψ = Φ, that is, Ψ = A(AT A)−1 Φ and ψj = A(AT A)−1 φj . In what follows, we assume that, for some positive r, the minimal r-sparse eigenvalue of ΦT Φ is separated from zero: νr2 = kΦxk2 >0 x∈Rn ,kxk0 ≤r kxk2 min and consider a set of models M = {M ⊆ {1, . . . , p} : |M | ≤ r/2} of sizes not larger than r/2. For a given model M ⊆ {1, . . . , p} define a p × p diagonal indicator matrix DM with diagonal entries dM j = I{j ∈ M }. The design matrix corresponding to M is then ΦM = ΦDM , while ΨM = ΨDM = A(AT A)−1 ΦM . Let HM = ΦM (ΦTM ΦM )−1 ΦTM be the projection matrix on a span of nonzero columns of ΦM and fM = HM f = ΦM (ΦTM ΦM )−1 ΦTM f = ΦM (ΦTM ΦM )−1 ΨTM Af be the projection of f on M . Denote z = (AT A)−1 AT y = f + ξ, where ξ = (AT A)−1 AT ε. (5) Consider the corresponding projection estimator fˆM = HM z = HM (AT A)−1 AT y = ΦM (ΦTM ΦM )−1 ΨTM y = ΦM θ̂M , 4 (6) where the vector of projection coefficients θ̂M = (ΦTM ΦM )−1 ΨTM y. By straightforward calculus, fˆM ∼ N (fM , σ 2 HM (AT A)−1 HM ) and the quadratic risk EkfˆM − f k2 = kfM − f k2 + σ 2 Tr (AT A)−1 HM  (7) The oracle model is the one that minimizes (7) over all models M ∈ M and the ideal oracle risk is   R(oracle) = inf EkfˆM − f k2 = inf kfM − f k2 + σ 2 Tr (AT A)−1 HM M ∈M M (8) The oracle risk is obviously unachievable but can be used as a benchmark for a quadratic risk of any available estimator. 3 Model selection by penalized empirical risk For a given model M ∈ M, fˆM in (6) minimizes the corresponding empirical risk kz − f˜M k2 , where c by minimizing the penalized empirical risk: z was defined in (5). Select a model M n o n o c = argmin kz − fˆM k2 + Pen(M ) = argmin −kfˆM k2 + Pen(M ) , (9) M M ∈M M ∈M where Pen(M ) is a penalty function on a model M . The proper choice of Pen(M ) is the core of such an approach. For direct problems (A = I), the penalized empirical risk approach, with the complexity type penalties Pen(|M |) on a model size, has been intensively studied in the literature. In the last decade, in the context of linear regression, the in-depth theories (risk bounds, oracle inequalities, minimaxity) have been developed by a number of authors (see, e.g., Foster & George (1994), Birgé & Massart (2001, 2007), Abramovich & Grinshtein (2010), Rigollet & Tsybakov (2011), Verzelen (2012) among many others). For inverse problems, Cavalier et al. (2002) considered a truncated orthonormal series estimator, where the cut-off point was chosen by SURE criterion corresponding to the AIC-type penalty Pen(M ) = 2σ 2 Tr((AT A)−1 HM ) and established oracle inequalities for the resulting estimator fˆc. M It was further generalized and improved by risk hull minimization in Cavalier & Golubev (2006). To the best of our knowledge, Pensky (2016) was the first to consider model selections within overcomplete dictionaries by empirical risk minimization for statistical inverse problems. She utilized Lasso penalty. However, as usual with Lasso, it required somewhat restrictive compatibility conditions on the design matrix Φ (see Pensky, 2016 for more details). In this paper, we utilize the penalty Pen(M ) that depends on the Frobenius norm of the matrix ΨM : kΨM k2F = X j∈M kψj k2 = Tr (AT A)−1 ΦM ΦTM  The following theorem provides nonasymptotic upper bounds for the quadratic risk of the resulting estimator fˆc both with high probability and in expectation: M 5 Theorem 1. Consider the model (4) and the penalized empirical risk estimator fˆM c, where the c is selected w.r.t. (9) with the penalty model M Pen(M ) ≥ 4σ 2 (δ + 1) kΨM k2F ln p aνr2 (10) for some δ > 0 and 0 < a < 1. Then, 1. With probability at least 1 − q 2 π p−δ   1+a a2 + a + 4 2 2 ˆ kfM min kfM − f k + Pen(M ) c − fk ≤ 1 − a M ∈M 2(1 + a) (11) 2. If, in addition, we restrict the set of admissible models to Mγ = {M ∈ M : kΨM k2F ≤ γ 2 n} for some constant γ, 1+a 2 EkfˆM c − fk ≤ 1−a  min kfM − f k2 + M ∈Mγ  4γ 2 σ 2 3 Pen(M ) + np−δ 2(1 + a) a(1 − a)νr2 (12) The additional restriction on the set of models M in the second part of Theorem 1 is required to guarantee that the oracle risk in (8) does not grow faster than n. Note that for the direct problems, ΨM = ΦM and the penalty (10) is the RIC-type complexity penalty of Foster & George (1994) of the form Pen(M ) = C|M | ln p. We can compare the quadratic risk of the proposed estimator with the oracle risk R(oracle) in (8). Consider the penalty Pen(M ) = 4σ 2 (δ + 1) kΨM k2F ln p aνr2 (13) for some 0 < a < 1 and δ ≥ 2. Assume that p ≥ n (overcomplete dictionary) and choose δ ≥ 2. Then, the last term in the RHS of (12) turns to be of a smaller order and we obtain   γσ 2 2 2 2 ˆ EkfM kfM − f k + C2 2 kΨM kF ln p c − f k ≤ C1 min M ∈Mγ νr for some positive constants C1 , C2 depending on a and δ only. By standard linear algebra   arguments, kΨM k2F = Tr (AT A)−1 ΦM ΦTM ≤ κ2r Tr (AT A)−1 HM and, therefore, the following oracle inequality holds: c from Corollary 1. Assume that p ≥ n and consider the penalized empirical risk estimator M c is selected w.r.t. (9) over Mγ with the penalty (13) for some 0 < a < 1 and Theorem 1, where M δ ≥ 2. Then, 2 EkfˆM c − f k ≤ C0 κ2r ln p R(oracle) νr2 for some constant C0 > 0 depending on a, δ and γ only. 6 Thus, the quadratic risk of the proposed estimator fˆM c is within ln p-factor of the ideal oracle risk. The ln p-factor is a common closest rate at which an estimator can approach an oracle even in direct (complete) model selection problems (see, e.g., Donoho & Johnstone, 1994; Birgé & Massart, 2001; Abramovich & Grinshtein, 2010; Rigollet & Tsybakov, 2011; and also Pensky (2016) for inverse problems). For an ordered model selection within a set of nested models, it is possible to construct estimators that achieve the oracle risk within a constant factor (see, e.g., Cavalier et al., 2002 and Cavalier & Golubev, 2006). Similar oracle inequalities (even sharp with the coefficient in front of kfM − f k2 equals to one) with high probability were obtained for the Lasso estimator but under the additional compatibility assumption on the matrix Φ (Pensky, 2016). 4 Q-aggregation Note that inequalities (11) and (12) in Theorem 1 for model selection estimator are not sharp in the sense that the coefficient in front of the minimum is greater than one. In order to derive sharp oracle inequalities both in probability and expectation, one needs to aggregate the entire collection P of estimators: fˆ = M ∈M θM fˆM rather than to select a single estimator fˆM c. Leung & Barron (2006) considered exponentially weighted aggregation (EWA) with θM ∝ πM exp{kz − fˆM k2 /β}, where π is some (prior) probability measure on M and β > 0 is a tuning parameter. They established sharp oracle inequalities in expectation for EWA in direct problems. Dalalyan & Salmon (2012) proved sharp oracle inequalities in expectation for EWA of affine estimators in nonparametric regression model. Their paper offers limited extension of the theory to the case of mildly ill-posed inverse problems where Var(hy, ψiH ) = σ 2 kψj k2H increase at most polynomially with j. However, their results are valid only for the SVD decomposition and require block design which seriously limits the scope of application of their theory. Moreover, Dai et al. (2012) argued that EWA cannot satisfy sharp oracle inequalities with high probability and proposed instead to use Q-aggregation. Define a general Q-aggregation estimator of f as fˆθ̂ = X θM fˆM , (14) M ∈M where the vector of weights θ̂ is the solution of the following optimization problem: ) ( X X 2 2 θ̂ = argmin α θM kz − fˆM k + (1 − α) z − θM fˆM + Pen(θ) θ∈ΘM M ∈M (15) M ∈M for some 0 ≤ α ≤ 1 and a penalty Pen(θ), and ΘM is the simplex ΘM = {θ ∈ Rcard(M) : θM ≥ 0, 7 X M ∈M θM = 1} (16) In particular, Dai et al. (2012) considered Pen(θ) proportional to the Kullback-Leibler divergence KL(θ, π) for some prior π on ΘM . For direct problems, they derived sharp oracle inequalities both in expectation and with high probability for Q-aggregation with such penalty. In fact, EWA can also be viewed as an extreme case of Q-aggregation of Dai et al. for α = 1 (see Rigolette & Tsybakov, 2012). However, the results for Q-aggregation with Kullback-Leibler-type penalty are not valid for ill-posed problems. In this section we propose a different type of penalty for Q-aggregation in (15) that is specifically designed for the solution of inverse problems. In particular, this penalty allows one to obtain sharp oracle inequalities both in expectation and with high probability in both mild and severe ill-posed linear inverse problems. Namely, we consider the penalty Pen(θ) = 4σ 2 (δ + 1) ln p X θM kΨM k2F νr2 (17) M ∈M with a tuning parameter δ > 0. For such a penalty and α = 1/2, the resulting θ̂ is (   X X 8σ 2 (δ + 1) ln p 2 2 ˆ θM kz − fM k + θ̂ = argmin kΨ k + z − θM fˆM M F νr2 θ∈ΘM M ∈M M ∈M 2 ) (18) Note that the first term in the minimization criteria (18) is the same as in model selection (9) with the penalty (10) for a = 1/2. The presence of the second term is inherent for Q-aggregation. In fact, the model selection estimator fˆc from Section 3 is a particular case of a Q-aggregate estimator M fˆθ̂ with the weights obtained by solution of problem (15) with α = 1. The non-asymptotic upper bounds for the quadratic risk of fˆθ̂ , both with high probability and in expectation, are given by the following theorem : Theorem 2. Consider the model (4) and the Q-aggregate estimator fˆθ given by (14), where the weights θ are selected as a solution of the optimization problem (18). Then, 1. With probability at least 1 − q 2 π kfˆθ̂ − f k2 ≤ min M ∈M p−δ  kfM − f k2 + 10νr−2 σ 2 (δ + 1) kΨM k2F ln p (19) 2. If, in addition, we restrict the set of admissible models to Mγ = {M ∈ M : kΨM k2F ≤ γ 2 n} for some constant γ, then 2 EkfˆM c − f k ≤ min M ∈Mγ  kfM − f k2 + νr−2 σ 2 kΨM k2F (3 + 2(δ + 1) ln p) + 2γ 2 np−δ (20) Observe that unlike Theorem 1 for model selection estimator, inequalities in both (19) and (20) for Q-aggregation are sharp. 8 5 Simulation study In this section we present results of a simulation study that illustrates the performance of the model c from (9) with the penalty (10) and the Q-aggregation estimator fˆ given by selection estimator M θ̂ (14) where the weights are defined in (18). The data were generated w.r.t. a (discrete) ill-posed statistical linear problem (4) corresponding Rt to the convolution-type operator Af (t) = 0 e−(t−x) f (x)dx, 0 ≤ t ≤ 1, on a regular grid ti = i/n: Aij = e− i−j n I(j ≤ i), i, j = 1, . . . , n, where I(·) is the indicator function and n = 128. We considered the dictionary obtained by combining two wavelet bases of different type: the H H H D D Daubechies 8 wavelet basis {φD 3,0 , ..., ψ3,0 , ..., ψ6,63 } and the Haar basis {φ3,0 , ..., ψ3,0 , ..., ψ5,53 }, with the overall dictionary size p = 128+64 = 192. In our notations, φD and φH are the scaling functions, while ψ D and ψ H are the wavelets functions of the Daubechies and Haar bases respectively with the initial resolution level J0 = 3. In order to investigate the behavior of the estimators, we considered various sparsity and noise levels. In particular, we used four test functions, presented in Figure 2, that correspond to different sparsity scenarios: H 1. f1 = φD 3,4 + φ3,0 (high sparsity) H D D 2. f2 = φD 3,0 + φ3,6 + ψ3,7 + φ3,6 (moderate sparsity) D D D D D H H 3. f3 = φD 3,1 + φ3,5 + φ3,7 + ψ3,0 + ψ3,3 + ψ3,5 + φ3,0 + φ3,3 (low sparsity) 4. f4 is the well-known HeaviSine function from Donoho & Johnstone (1994) (uncontrolled sparsity) For each test function, we used three different values of σ that were chosen to ensure a signal-tonoise ratios SN R = 10, 7, 5, where SN R(f ) = kf k/σ. The accuracy of each estimator was measured by its relative integrated error: R(fˆ) = kf − fˆk2 /kf k2 ˆ 2 Since the model selection estimator fˆM c involves minimizing a cost function of the form −kfM k + 4σ 2 λ ln pkΨM k2F over the entire model space M of a very large size, we used a Simulated Annealing (SA) stochastic optimization algorithm for an approximate solution. The SA algorithm is a kind of a Metropolis sampler where the acceptance probability is “cooled down” by a synthetic temperature parameter (see Brémaud 1999, Chapter 7, Section 8). More precisely, if M (r) is a solution at step 9 r > 0 of the algorithm, at step r + 1 a tentative solution M ∗ is selected according to a given symmetric proposal distribution and it is accepted with probability ( !) ∗ ) − π(M (r) ) π(M a(M ∗ , M (r) ) = min 1, exp − . T (r) (21) where T (r) is a temperature parameter at step r. The expression (21) is motivated by the fact that while M ∗ is always accepted if π(M (r) ) ≥ π(M ∗ ), it can still be accepted even if π(M (r) ) < π(M ∗ ) in spite of being worse than the current one. The chance of acceptance of M ∗ for the same value of π(M (r) ) − π(M ∗ ) < 0 diminishes at every step as the temperature T (r) decreases with r. The law that reduces the temperature is called the cooling schedule, in particular, here we choose T (r) = 1/(1 + log(r)). In this paper we adopted the classical symmetric uniform proposal distribution and selected a starting solution M (0) according to the following initial probability p(j) = C exp{hψj , yi2 − ckψj k2 }, where c = P 2 j hψj , yi / P 2 j kψj k and C = hP for j = 1, . . . , p p 2 j=1 exp{hψj , yi (22) i−1 − ckψj k2 } is the normalizing constant. Observe that the argument in the exponent in (22) is the difference of hψj , yi2 and kψj k2 where the first term hψj , yi2 is the squared j-th empirical coefficient while the second term kψj k2 is the increase in the variance due to the addition of the j-th dictionary function. Hence, the prior p(j) is more likely to choose dictionary functions with small variances that are highly correlated to the true function f . Thus, the adopted SA procedure can be summarized as follows: • generate a random number m ≤ n/ log(p). Set T (1) = 1 • generate a starting solution M (0) with card(M (0) ) = m by sampling indices j ∈ {1, . . . , p} according to the probability given by equation (22) • repeat for r = 1, 2, ...rmax 1. generate a variable j ∗ ∼ Uniform (1, ..., p) 2. if j ∗ ∈ / M (r) propose M ∗ = M (r) ∪ {j ∗ } else propose M ∗ = M (r) − {j ∗ } 3. with probability a(M ∗ , M (r) ) given in equation (21) assign M (r+1) = M ∗ , otherwise M (r+1) = M (r) 4. update the temperature parameter T (r+1) = 1/(1 + log(r + 1)) 10 SNR=10 0.02 SNR=7 0.1 0.05 0 0.04 0.02 0 0.01 0 Oracle PER Agg Lasso Oracle PER Agg Lasso 0.2 0.2 0.1 0 Oracle PER Agg Lasso Oracle PER Agg Lasso 0.4 0.3 0.08 0.06 0.04 0.02 0 SNR=5 0 OraclePER Agg Lasso 0.2 Oracle PER Agg Lasso 0.6 0.2 0.1 0.4 0.1 0.2 0 0 Oracle PER Agg Lasso 0 OraclePER Agg Lasso 0.1 0.08 0.06 0.04 0.02 0.06 0.04 0.02 Oracle PER Agg Lasso 0.4 0.2 0 Oracle PER Agg Lasso Oracle PER Agg Lasso Oracle PER Agg Lasso ˆ ˆ Figure 1: The boxplots of the relative integrated errors of fˆoracle , fˆM c, fθ and fLasso over 100 independent runs. Top row: f1 , second row: f2 , third row f3 , bottom row f4 . While various stopping criteria could be used in the SA procedure, we found rmax = 100, 000 to be sufficient for obtaining a good approximation of the global minimum in (9). Once the algorithm (r) ) was the “best” model in the c is terminated, we evaluated fˆM c, where M = arg min0≤r≤rmax π(M chain of models generated by SA algorithm. Similarly, the Q-aggregation estimator fˆθ̂ involves computationally expensive aggregation of estimators over the entire model space M. We, therefore, approximated it by aggregating over the P ′ subset M of the last 50 “visited” models in the SA chain, i.e. fˆθ̂ = M ∈M′ θ̂M fˆM with θ̂ being a solution of (18). For f1 , f2 and f3 we also considered the oracle projection estimator fˆoracle based on the true model. In addition, we compared the proposed estimators with the Lasso-based estimator P fˆLasso = pj=1 θ̂j φj of Pensky (2016), where the vector of coefficients θ̂ is a solution of the following 11 7 0.3 0.25 6 1 14 f fˆoracle fˆM b fˆ Af y f fˆoracle fˆM b fˆ Af y 12 0.8 10 0.6 8 0.4 6 0.2 4 0 2 −0.2 θ̂ 0.2 θ̂ fˆLasso 5 fˆLasso 0.15 4 0.1 3 0.05 2 0 1 0 −0.05 0 50 100 150 −0.1 0 50 100 0 150 0 50 100 150 0 50 100 150 1 10 f fˆoracle Af y 9 0.8 1.2 Af y 35 f fˆM b fˆθ̂ fˆLasso 1 30 fˆLasso 0.6 7 40 fˆM b fˆθ̂ 8 0.8 25 6 0.4 5 0.2 4 3 20 0.6 15 0.4 10 0 0.2 5 2 −0.2 1 0 −0.4 0 0 0 50 100 150 −0.4 0 50 100 −5 150 0 50 100 150 −0.2 0 50 100 150 Figure 2: The test functions, observed data and estimators for SN R = 5. In each block of figures corresponding to four test functions, the left panel shows the data y and the true Af ; the right panel shows the true f and the four estimators. Top left: f1 ; top right: f2 ; bottom left: f3 ; bottom right: f4 . optimization problem θ̂ = arg min θ and λ is a tuning parameter.  p  X  2 θj φj j=1 −2 p X j=1 θj hy, ψj i + λ p X j=1 |θj | kψj k2    , ˆ The tuning parameters λ for fˆM c and fLasso , were chosen by minimizing the error on a grid of possible values. To reduce heavy computational costs we used the same λ of fˆM c for all 50 ˆ aggregated models used for calculating f . θ̂ Figure 1 presents the boxplots of R(fˆ) over 100 independent runs for fˆoracle (for f1 , f2 and f3 ), fˆc, fˆ and fˆLasso . Performances of all estimators deteriorate as SNR decreases especially for the M θ̂ ˆ ˆ less sparse test functions. The estimators fˆM c and fθ̂ always outperform fLasso and, as it is expected from our theoretical statements, fˆ yields somewhat better results than fˆc. We expect that the θ̂ M ˆ differences in precisions of fˆM c and fθ̂ would be more significant if we carried out aggregation over 12 a larger portion of the model space than the last 50 visited models. Figure 2 illustrates these conclusion by displaying examples of the estimators for SN R = 5. We should also mention that estimator fˆc was usually more sparse than fˆLasso . M Acknowledgments Marianna Pensky was partially supported by National Science Foundation (NSF), grants DMS1407475 and DMS-1712977. References [1] Abramovich, F. and Grinshtein, V. (2010). MAP model selection in Gaussian regression. Electr. J. Statist. 4, 932–949. [2] Abramovich F. and Silverman B.W. (1998). Wavelet decomposition approaches to statistical inverse problems. Biometrika 85, 115–129. [3] Akaike, H. (1973). Information theory and an extension of the maximum likelihood principle. in Second International Symposium on Information Theory. (Eds. B.N. Petrov and F. Czáki). Akademiai Kiadó, Budapest, 267–281. Birgé, L. and Massart, P. (2001). Gaussian model selection. J. Eur. Math. Soc. 3, 203–268. [4] Birgé, L. and Massart, P. (2007). Minimal penalties for Gaussian model selection. Probab. Theory Relat. Fields 138, 33–73. [5] Brémaud, P. (1999). Markov Chains. Text in Applied Mathematics. Springer [6] Cavalier, L. (2012). Inverse problems in staistics. Inverse Problems and High Dimensional Estimation (Eds. Alquier, P., Gautier, E. and Gilles, G.), Lecture Notes in Statistics 203, Springer, 3–96. [7] Cavalier, L. and Golubev, Yu. (2006) Risk hull method and regularization by projections of ill-posed inverse problems. Ann. Statist. 34, 1653–1677. [8] Cavalier, L., Golubev, G.K., Picard, D. and Tsybakov, A.B. (2002). Oracle inequalities for inverse problems. Ann. Statist. 30, 843–874. [9] Cavalier, L. and Tsybakov, A. (2002). Sharp adaptation for inverse problems with random noise, Probab. Theory Related Fields 123, 323-354. [10] Chen, S., Donoho, D.L. and Saunders, M. A. (1999). Atomic decomposition by basic pursuit. SIAM J. Scient. Comput. 20, 33–61. 13 [11] Dai, D., Rigolette, P. and Zhang, T. (2012) Deviation optimal leaning using greedy Qaggregation. Ann. Statist. 40, 1878–1905. [12] Dalalyan, A. and Salmon, J. (2012) Sharp oracle inequalities for aggregation of affine estimators. Ann. Statist. 40, 2327–2355. [13] Donoho, D.L. (1995). Nonlinear solutions of linear inverse problems by wavelet-vaguelette decomposition. Appl. Comput. Harmon. Anal. 2, 101-126. [14] Donoho, D.L. and Elad, M. (2003). Optimally sparse representation in general (nonorthogonal) dictionaries via l1 minimization. PNAS 100, 2197–2202. [15] Donoho, D.L. and Johnstone, I.M. (1994). Ideal spatial adaptation by wavelet shrinkage. Biometrika 81, 425–455. [16] Foster, D.P. and George, E.I. (1994) The risk inflation criterion for multiple regression. Ann. Statist. 22, 1947–1975. [17] Johnstone, I.M., Kerkyacharian, G., Picard, D. and Raimondo, M. (2004) Wavelet decomposition in a periodic setting. J. R. Statist. Soc. B 66, 547–573 (with discussion). [18] Johnstone, I.M. and Silverman, B.W. (1990) Speed of estimation in positron emission tomography and related inverse problems. Ann. Statist. 18, 251–280. [19] Kalifa, J. and Mallat, S. (2003) Thresholding estimators for linear inverse problems and deconvolution. Ann. Statist. 31, 58–109. [20] Leung, G. and Barron, A.R. (2006) Information theory and mixing least-squares regressions. IEEE Trans. Inf. Theory 52, 3396–3410. [21] Mallat, S. and Zhang, Z. (1993). Matching pursuit with time-frequency dictionaries. IEEE Trans. in Signal Proc. 41, 3397–3415. [22] Pensky, M. (2016) Solution of linear ill-posed problems using overcomplete dictionaries. Ann. Statist. 44, 1739–1754. [23] Rigollet, P. and Tsybakov, A. (2011) Exponential screening and optimal rates of sparse estimation. Ann. Statist. 39, 731–771. [24] Rigollet, P. and Tsybakov, A. (2012) Sparse estimation by exponential weighting. Statist. Science 27, 558–575. [25] Stephens, M. (2000) Bayesian Analysis of Mixture Models with an Unknown Number of Components- An Alternative to Reversible Jump Methods. The Annals of Statistics 28(1), 40–74 14 [26] Verzelen, N. (2012). Minimax risks for sparse regressions: Ultra-high dimensionals phenomenon. Electr. J. Statist. 6, 38–90. Appendix The proofs of the main results are based on the following auxiliary lemmas. Lemma 1. For any x > 0, r    T 2 2 −x 2 2 e P sup kΨM εk − 2σ kΨM kF (ln p + x) ≤ 0 ≥ 1 − π M ∈M P Proof. For any model M ∈ M, kΨTM εk2 = j∈M (ψjT ε)2 , where ψjT ε ∼ N (0, σ 2 kψj k2 ). By Mill’s ratio P (ψjT ε)2  > 2σ kψj k (ln p + x) ≤ 2 2 r 2 −1 −x p e π for any x > 0. Then,   X \   (ψjT ε)2 − 2σ 2 kψj k2 (ln p + x) ≤ 0  ≥ 1 − P (ψjT ε)2 − 2σ 2 kψj k2 (ln p + x) > 0 P j∈M ≥1− r j∈M 2 −x e π and, therefore, P   sup kΨTM εk2 − 2σ 2 kΨM k2F (ln p + x) ≤ 0 M ∈M  =P p \  j=1 (ψjT ε)2   ≥P  2  \  (ψjT ε)2 − 2σ 2 kψj k2 (ln p + x) ≤ 0  M ∈M j∈M − 2σ kψj k (ln p + x) ≤ 0  ≥ 1 − 2 \ r 2 −1 −x p e π Lemma 2. For any M1 , M2 ∈ M, one has Tr(ΨTM1 ∪M2 ΨM1 ∪M2 ) ≤ Tr(ΨTM1 ΨM1 ) + Tr(ΨTM2 ΨM2 )   λmax (ΨTM1 ∪M2 ΨM1 ∪M2 ) ≤ 2 λmax (ΨTM1 ΨM1 ) + λmax (ΨTM2 ΨM2 ) Proof. Inequality (23) follows from Tr(ΨTM1 ∪M2 ΨM1 ∪M2 ) = X j∈M1 ∪M2 kψj k2 ≤ Tr(ΨTM1 ΨM1 ) + Tr(ΨTM2 ΨM2 ) In order to prove inequality (24), observe that kΨM1 xM1 + ΨM2 \M1 xM2 \M1 k2 kxk2 x∈R|M1 +M2 |   kΨM1 xM1 k2 kΨM2 xM2 k2 + ≤ 2 max kxk2 kxk2 x∈R|M1 +M2 | λmax (ΨTM1 ∪M2 ΨM1 ∪M2 ) = max 15 (23) (24) which implies (24). Lemma 3. If θ ∈ ΘM where ΘM is defined in (16), then, for any function f˜ X M ∈M θ̂M kf˜ − fˆM k2 = kf˜ − fˆθ̂ k2 + X M ∈M θ̂M kfˆθ̂ − fˆM k2 . (25) Proof. Note that for any f˜ one has X M ∈M θ̂M kf˜ − fˆM k2 = X M ∈M θ̂M kf˜ − fˆθ̂ k2 + + 2hf˜ − fˆθ̂ , X M ∈M X M ∈M θ̂M kfˆM − fˆθ̂ k2 θ̂M (fˆθ̂ − fˆM i. Now validity of (25) follows from the fact that θ ∈ ΘM , so that the scalar product term in the last identity is equal to zero. Lemma 4. Let ξ be defined in formula (5) and M0 ⊆ {1, · · · , p} be an arbitrary fixed model. Denote UM = 4νr−2 σ 2 (δ + 1) kΨM k2F ln p and X 1 X 3 σ2 θ̂M kfˆM − fˆM0 k2 . θ̂M UM − ∆0 = 2σhξ, fˆθ̂ − fˆM0 i + 2 kΨTM0 εk2 − UM0 − νr 2 2 M ∈M Then, with probability at least 1 − p (26) M ∈M 2/π p−δ , one has ∆0 ≤ 0. Moreover, if the set of models is restricted to Mγ = {M ∈ M : kΨM k2F ≤ γ 2 n}, then   3 4σ 2 γ 2 −δ 3 − np . + E(∆0 ) ≤ UM0 4(δ + 1) ln p 2 νr2 Proof. Note that due to θ̂ ∈ ΘM , one has 2σhξ, fˆθ̂ − fˆM0 i = 2σ X M ∈M (27) θ̂M hξ, fˆM − fˆM0 i. √ Recall that fˆM = HM z, hence, applying the inequality 2 uv ≤ au + a1 v for any positive a, u, v > 0 and M ∈ M, one obtains 2σ |hξ, fˆθ̂ − fˆM0 i| = 2σ |ξ T HM ∪M0 (HM − HM0 )z| ≤ 2σ 2 νr−2 kΨTM ∪M0 εk2 + 0.5 kfˆM − fˆM0 k2 . Combining the last two inequalities, taking into account that kΨTM ∪M0 εk2 ≤ kΨTM εk2 + kΨTM0 εk2 and plugging them into (26), obtain ∆0 ≤ X 3σ 2 3 2σ 2 X T 2 θ̂M UM . θ̂ kΨ εk + kΨTM0 εk2 − UM0 − M M 2 2 νr νr 2 M ∈M M ∈M 16 (28) Applying Lemma 1 with x = δ ln p, expressing UM via kΨM k2F and taking into account that p θ̂ ∈ ΘM , we derive that ∆0 ≤ 0 on the set Ω with P (Ω) ≥ 1 − 2/π p−δ on which sup M ∈M  kΨTM εk2 − 2σ 2 kΨM k2F ln p(1 + δ) ≤ 0. In order to derive inequality (27), plugging in the expression for UM and UM0 into (28), derive that ∆0 ≤ ∆01 + ∆02 where ∆01 = ∆02 =  3σ 2  T kΨM0 εk2 − 2(δ + 1) ln pkΨM0 k2F 2 νr   2σ 2 X θ̂M kΨTM εk2 − 2(δ + 1) ln pkΨM k2F 2 νr M ∈M By direct calculations, one can easily show that  E(∆01 ) = UM0 3 3 − 4(δ + 1) ln p 2  . (29) In order to derive an upper bound for E(∆02 ), recall that Z ∞ P (∆02 > t)dt E(∆02 ) ≤ E(∆02 )+ = 0 Plugging in the expression for ∆02 , taking into account that kΨM k2F ≤ γ 2 n, replacing t by 4σ 2 γ 2 νr−2 n ln p u, making a change of variables for integration and applying Lemma 1, similarly to the proof of Theorem 1, we arrive at E(∆02 ) ≤ 4σ 2 γ 2 νr−2 np−δ (30) Combination of (29) and (30) complete the proof. Proof of Theorem 1 c is the minimizer in (9), for any given model M ∈ M Let z be defined in (5). Since M 2 ˆ 2 c kz − fˆM ck + Pen(M ) ≤ kz − fM k + Pen(M ) and, by a straightforward calculus, one can easily verify that 2 2 ˆ ˆc − fˆM i + Pen(M ) − Pen(M c) kfˆM c − f k ≤ kfM − f k + 2hξ, fM (31) f=M c∪M and recall that, by the definition of M, |M f| ≤ r. Thus, by the Cauchy-Schwarz Denote M inequality and the definition of νr2 T −1 T T ˆ 2hξ, fˆM c − θ̂M i c − fM i = 2h(A A) A ε, ΦM f(θ̂M c − θ̂M )i = 2hΨM fε, θ̂M −1 ˆ T ˆ ≤ 2kΨTM c − fM k c − θ̂M k ≤ 2 kΨM fεk νr kfM fεk kθ̂M 17 (32) √ Using inequalities 2 uv ≤ au + a1 v for any positive a, u, v > 0 and ku − vk2 ≤ 2(kuk2 + kvk2 ), from (32) obtain ˆ ˆc − f k2 + akfˆM − f k2 + 2 kΨT εk2 2hξ, fˆM c − fM i ≤ akfM f aνr M Thus, from (31) it follows that for any 0 < a < 1 2 2 2 ˆ c) (1 − a)kfˆM kΨTfεk2 − Pen(M c − f k ≤ (1 + a)kfM − f k + Pen(M ) + aνr2 M (33) Note that kfˆM − f k2 = kfˆM − fM k2 + kfM − f k2 = εT ΨM (ΦTM ΦM )−1 ΨTM ε + kfM − f k2 ≤ 1 kΨTM εk2 νr2 implies + kfM − f k2 , while, by Lemma 2, kΨTfεk2 ≤ kΨTcεk2 + kΨTM εk2 . Therefore, (33) M M a2 + a + 2 T 2 2 T 2 c kΨM εk + 2 kΨM cεk −P en(M ) (34) aνr2 aνr q Applying Lemma 1 with x = δ ln p for any δ > 0, w.p. at least 1 − π2 p−δ one derives 2 2 (1−a)kfˆM c −f k ≤ (1+a)kfM −f k +P en(M )+ 2 kΨTM εk2 ≤ 2σ 2 kΨM k2F (δ + 1) ln p and kΨTcεk2 ≤ 2σ 2 kΨM ckF (δ + 1) ln p. Hence, for the penalty M p c) ≤ 0. Thus, after a Pen(M ) in (10), w.p. at least 1 − 2/π p−δ one has aν2 2 kΨTcεk2 − Pen(M M r straightforward calculus, 2 2 (1 − a)kfˆM c − f k ≤ (1 + a)kfM − f k + (a2 + a + 4) P en(M ) 2 for any model M ∈ M that proves (11). To prove the oracle inequality in expectation (12), note that it follows from inequality (33) and Lemma 2 that  2 2 T 2 2 T 2 (1 − a)kfˆM c − f k ≤ (1 + a)kfM − f k + (1 + a)kΨM εk + Pen(M ) + 2/(aνr ) kΨM εk + ∆ (35) where ∆ = kΨTcεk2 − 2(δ + 1) ln p kΨTck2F . Using Lemma 1, obtain M M E∆ ≤ E(∆)+ = ≤ 2γ 2 n p−δ Z ∞ Z 0∞ 2 P (∆ > t)dt = 2γ n ln p Z ∞ P (∆ > 2γ 2 n ln p u)du 0 p−u ln p du = 2γ 2 n p−δ 0 Taking expectation in (35) and combining it with the last inequality, we obtain (12). ✷ Proof of Theorem 2 Denote 1 1 X b θM kz − fˆM k2 + kz − fˆθ k2 , S(θ) = 2 2 S(θ) = M ∈M 1 1 X θM kf − fˆM k2 + kf − fˆθ k2 2 2 M ∈M 18 Note that, by definition, S(θ̂) − S(θ) = i 1h 1 X (θ̂M − θM )kf − fˆM k2 + kf − fˆθ̂ k2 − kf − fˆθ k2 , 2 2 (36) M ∈M and also b S(θ) = S(θ) + kzk2 − kf k2 − 2σ hξ, fˆθ i (37) where ξ is defined in (5). By definition of θ̂, one has b θ̂) + S( X M ∈M b + θ̂M UM ≤ S(θ) X θM UM (38) M ∈M where UM = 4νr−2 σ 2 (δ + 1) kΨM k2F ln p is defined in Lemma 4. Then, combination of (37) and (38) yields S(θ̂) − S(θ) ≤ X M ∈M (θM − θ̂M )UM + 2σ hξ, fˆθ̂ − fˆθ i (39) Fix β ∈ (0, 1), M0 ∈ ΘM and let eM be the M -th vector of the canonical basis. Consider θ = (1 − β)θ̂ + βeM0 , fˆθ = (1 − β)fˆθ̂ + β fˆM0 . (40) and, due to kf − fˆM0 k2 − kf − fˆθ̂ k2 − kfˆθ̂ − fˆM0 k2 = 2hf − fˆθ̂ , fˆθ̂ − fˆM0 i, one can write k(1 − β)(f − fˆθ̂ ) + β(f − fˆM0 )k2 = (1 − β)kf − fˆθ̂ k2 − β(1 − β)kfˆθ̂ − fˆM0 k2 + βkf − fˆM0 k2 Combining the last equality with (40) obtain i h kf − fˆθ̂ k2 − kf − fˆθ k2 = β kf − fˆθ̂ k2 + kfˆθ̂ − fˆM0 k2 − kf − fˆM0 k2 − β 2 kfˆθ̂ − fˆM0 k2 . Plugging the last equality into (36) derive i 1 1 h 1 1−β ˆ 1 S(θ̂) − S(θ) = kf − fˆθ̂ k2 − kf − fˆM0 k2 + kfθ̂ − fˆM0 k2 + ∆1 β 2 2 2 2 (41) where, due to (40), ∆1 = X 1 X θ̂M kf − fˆM k2 − kf − fˆM0 k2 . (θ̂M − θM )kf − fˆM k2 = β M ∈M M ∈M Now rewrite ∆1 as ∆1 = X M ∈M θ̂M kfˆθ̂ − fˆM k2 . using identity (25) of Lemma 3 with f˜ = f . Combining the last formulae with (41), we arrive at ) ( i X 1 h 1 θ̂M kfˆθ̂ − fˆM k2 + (1 − β)kfˆθ̂ − fˆM0 k2 . (42) S(θ̂) − S(θ) = kf − fˆθ̂ k2 − kf − fˆθ̂ k2 + β 2 M ∈M 19 Now, using fˆθ given by (40), derive 2σ hξ, fˆθ̂ − fˆθ i = 2βσ hξ, fˆθ̂ − fˆM0 i Similarly, X M ∈M (θ̂M − θM )UM = β " X M ∈M (43) # θ̂M UM − UM0 . (44) Plugging (42)–(44) into (39) and setting β → 0, arrive at kf − fˆθ̂ k2 ≤ kf − fˆM0 k2 + UM0 − X M ∈M 1 θ̂M UM + 2σ hξ, fˆθ̂ − fˆM0 i − ∆2 2 (45) where, applying Lemma 3 with f˜ = fˆM0 , we obtain ∆2 = X M ∈M θ̂M kfˆθ̂ − fˆM k2 + kfˆθ̂ − fˆM0 k2 = X M ∈M θ̂M kfˆM − fˆM0 k2 Recall that kfˆM0 − f k2 = σ 2 ξ T HM0 ξ + kfM0 − f k2 ≤ σ 2 νr−2 kΨTM0 εk2 + kfM0 − f k2 and re-write (45) as 5 kf − fˆθ̂ k2 ≤ kf − fM0 k2 + UM0 + ∆0 2 (46) where ∆0 is defined by formula (26) of Lemma 4. Now, in order to complete the proof apply Lemma 4 and note that the set M0 ∈ M is arbitrary. ✷ 20
10math.ST
N2SID: Nuclear Norm Subspace Identification ? Michel Verhaegen a Anders Hansson b arXiv:1501.04495v2 [cs.SY] 14 Dec 2016 a Delft Center for Systems and Control Delft University Delft, The Netherlands b Division of Automatic Control Linköping University Linköping, Sweden Abstract The identification of multivariable state space models in innovation form is solved in a subspace identification framework using convex nuclear norm optimization. The convex optimization approach allows to include constraints on the unknown matrices in the data-equation characterizing subspace identification methods, such as the lower triangular block-Toeplitz of weighting matrices constructed from the Markov parameters of the unknown observer. The classical use of instrumental variables to remove the influence of the innovation term on the data equation in subspace identification is avoided. The avoidance of the instrumental variable projection step has the potential to improve the accuracy of the estimated model predictions, especially for short data length sequences. This is illustrated using a data set from the DaSIy library. An efficient implementation in the framework of the Alternating Direction Method of Multipliers (ADMM) is presented that is used in the validation study. Key words: Subspace system identification, Nuclear norm optimization, Rank constraint, Short data batches, Alternating Direction Method of Multipliers 1 Introduction The generation of Subspace IDentification (SID) methods for the identification of Linear Time-Invariant (LTI) state space models as developed originally in [20, 10, 21] derive approximate models rather than models that are “optimal” with respect to a goodness of fit criterium defined in terms of the weighted norm of the difference between the measured output and the model predicted output. The approximation is based on linear algebra transformations and factorizations of structured Hankel matrices constructed from the input-output data that are related via the so-called data equation [25]. All existing SID methods aim to derive a low rank matrix from which key subspaces, hence the name subspace identification, are derived. The low rank approximation is in general done using a Singular Value Decomposition (SVD). ? Part of the research was done while the first author was a Visiting Professor at the Division of Automatic Control, Department of Electrical Engineering, Linköping University, Sweden. This work was partially supported by the European Research Council Advanced Grant Agreement No. 339681. Corresponding Author: [email protected]. Preprint submitted to Automatica A number of recent developments have been made to integrate the low rank approximation step in SID with a goodness of fit into a single multi-criteria convex optimization problem. These contributions were inspired by the work in [3] to approximate a constraint on the rank of a matrix by minimizing its nuclear norm. It resulted into a number of improvements to the low rank approximation step over the classically used SVD in SID, [12, 13, 16, 5, 7, 11, 18, 19]. When considering identifying innovation state space models, a common approach is to make use of instrumental variables [7] . It is well known that the projection operation related to the use of instrumental variables may result into a degradation of the accuracy of the estimated quantities. In this paper we present a new SID method for identifying multivariable state space models in innovation form within the framework of nuclear norm optimization. The new SID method avoids the use of instrumental variables. The method is a convex relaxation of Pareto optimization in which structural constraints are imposed on the unknowns in the data equation, such as their blockToeplitz matrix structure. This Pareto optimization ap- 26 May 2016 / subspace identification method is presented in Section 3. The multi-criteria optimization problem, the analysis of the uniqueness of solution and its convex relaxation are presented in Section 4. In Section 5 we explain how to obtain an efficient ADMM code. The results of the performances are illustrated in Section 6 in a comparison study of N2SID with two other SID methods, N4SID and the recent Nuclear Norm based SID methods presented in [11] and with PEM. Finally, we end this paper with some concluding remarks. proach allows to make a trade-off between a Prediction Error type of optimality criteria, that is minimizing the (co-)variance of the one-step ahead prediction of a linear Kalman filter type observer, on one hand, and finding an observer of lowest complexity, i.e. of lowest model order, on the other hand. A key result is that the structural Toeplitz constraint is sufficient to find the minimal observer realization when the optimal one-step ahead prediction of the output is known. The incentive to estimate a Kalman filter type of observer also justifies the constraint to attempt to minimize the variance of the one-step ahead prediction error. It is interesting to note that this key result stipulates precise conditions on the persistancy of excitation of the input (in open-loop experiments). For many instrumental variable based SID methods it is still an open question what the persistency of excitation condition is on a generic input sequence to guarantee the algorithm to work for finite data length samples or to be consistent [9]. 1.1 Notations We introduce the Matlab-like notation that for a vector  or matrix X ∈ RM ×N CM ×N it holds that Xm:n,p:q is the sub-matrix of X with rows m through n and columns p through q. If one of the dimensions of the matrix is n, then 1 : n can be abbreviated as just :. Moreover, with Xm:−1:n,p:q is meant the sub-matrix of X obtained by taking rows m through n in reverse order, where m is greater than or equal to n. Similar notation may be used for the columns. The convex relaxation of the new SID approach is denoted by Nuclear Norm Subspace IDentification (N2SID). Its advantages are demonstrated in a comparison study on real-life data sets in the DaSIy data base, [2]. In this comparison study N2SID demonstrated to yield models that lead to improved predictions over two existing SID methods, N4SID and the recent Nuclear Norm based SID methods presented in [11] and with the Prediction Error Method (PEM) [15]. For the sake of brevity the results about only one data set are reported. For more information on a more extensive experimental analysis leading to similar conclusions we refer to [24]. 2 The Subspace Identification Problem In system identification a challenging problem is to identify Linear Time Invariant (LTI) systems with multiple inputs and multiple outputs using short length data sequences. Taking process and measurement noise into consideration, a general state space model for LTI systems can be given in so-called innovation form, [25]: The foundations for N2SID were presented in [23]. There the resulting optimization problem was solved using a Semi-Definite Programming (SDP) solver after a reformulation of the problem into an equivalent SDP problem. In addition to this the problem formulation was approximated in order to obtain a problem of manageable size for current SDP solvers. In this paper we will instead solve the problem with the Alternating Direction Method of Multipliers (ADMM). ADMM is known to be a good choice for solving regularized nuclear norm problems as the ones we are solving in this paper, [11]. In order to get an efficient implementation we have customized the computations for obtaining the coefficient matrix of the normal equations associated with our formulation using Fast Fourier Transformation (FFT) techniques. This is the key to obtain an efficient implementation. ( x(k + 1) = Ax(k) + Bu(k) + Ke(k) (1) y(k) = Cx(k) + Du(k) + e(k) with x(k) ∈ Rn , y(k) ∈ Rp , u(k) ∈ Rm and e(k) a zeromean white noise sequence. Since we are interested in short data sets no requirement on consistency is included in the following problem formulation. Problem Formulation: Given the input-ouput (i/o) data batches {u(k), y(k)}N k=1 , with N > n and assumed to be retrieved from an identification experiment with a system belonging to the class of LTI systems as represented by (1), the problem is to determine approximate system matrices (ÂT , B̂T , ĈT , D̂, K̂T ) that define the n̂-th order observer of “low” complexity:     x̂T (k + 1) = ÂT x̂T (k) + B̂T uv (k) + K̂T yv (k) − ĈT x̂T  ŷv (k) = ĈT x̂T (k) + D̂uv (k) (2) such that the approximated output ŷv (k) is “close” to the measured output yv (k) of the validation pair The paper is organized as follows. In Section 2 the identification problem for identifying a multi-variable state space model in a subspace context while taking a prediction error cost function into consideration is presented. The data equation and necessary preliminaries on the assumptions made in the analysis and description of the 2 v {uv (k), yv (k)}N k=1 as expressed by a small value of the cost function, Nv 1 X kyv (k) − ŷv (k)k22 . Nv The Hankel matrices from the output y(k) and the innovation e(k) are defined similarly and denoted by Ys,N and Es,N , respectively. The relationship between these Hankel matrices, that readily follows from the linear model equations in (5), require the definition of the following structured matrices. First we define the extended observability matrix Os : (3) k=1 The quantitative notions like “low” and “close approximation” will be made more precise in the new N2SID solution toward this problem. The solution to this problem is provided under 2 Assumptions. The first is listed here, the second at the end of Section 3. h i s−1 T OsT = C T AT C T · · · AT C . Second, we define a Toeplitz matrix from the quadruple of systems matrices {A, B, C, D} as: Assumption h A.1. i The pair (A, C) is observable and the pair (A, B K ) is reachable.  A key starting point in the formulation of subspace methods is the relation between structured Hankel matrices constructed from the i/o data. This relationship will as defined in [25] be the data equation. It will be presented in the next section. 3 Tu,s (4) (8) (9) (10) This equation is a simple linear matrix equation that highlights the challenges in subspace identification, which is to approximate from the given Hankel matrices Ys,N and Us,N the column space of the observability matrix and/or that of the state sequence of the observer (5). (5) y(k) = Cx(k) + Du(k) + e(k) The equation is highly structured. In this paper we focus on the following key structural properties about the unknown matrices in (10): with A the observer system matrix (A − KC) and B equal to (B − KD). Though this property will not be used in the sequel, the matrix A can be assumed to be asymptotically stable. (1) The matrix product Os XN is low rank when s > n. (2) The matrices Tu,s and Ty,s are block-Toeplitz. (3) The matrix Es,N is block-Hankel. For the construction of the data equation, we store the measured i/o data in block-Hankel matrices. For fixed N assumed to be larger then the order n of the underlying system, the definition of the number of block-rows fully defines the size of these Hankel matrices. Let this dimensioning parameter be denoted by s, then the Hankel matrix of the input is defined as: Us,N    CB D 0   =  .. ..  .  .   s−2 CA B ··· D Ys,N = Os XN + Tu,s Us,N + Ty,s Ys,N + Es,N . We will denote this model compactly as:  · · · u(N − s + 1)  ..   . .  ..  .  ··· u(N )  Then the data equation compactly reads: y(k) = Cx(k) + Du(k) + e(k)  u(1) u(2)   u(2) u(3) =  .  ..  u(s) u(s + 1) 0 ··· 0 h i XN = x(1) x(2) · · · x(N − s + 1) . Let the LTI model (1) be represented in its so-called observer form: ( x(k + 1) = (A − KC)x(k) + (B − KD)u(k) + Ky(k) x(k + 1) = Ax(k) + Bu(k) + Ky(k) D and in the same way we define a Toeplitz matrix Ty,s from the quadruple {A, K, C, 0}. Finally, let the state sequence be stored as: The Data Equation, its structure and Preliminaries ( (7) The interesting observation is that these 3 structural properties can be added as constraints to the multicriteria optimization problem considered while preserving convexity. This is demonstrated in Section 4. The analysis in Section 4 requires the following preliminaries. (6) Definition 1 [25]: A signal u(k) ∈ Rm is persistently exciting of order s if and only if there exists an integer N such that the matrix Us,N has full row rank. 3 Lemma 2 [9]: Consider the state space model in innovation form (1) and let all stochastic signals be stationary and ergodic, let Assumption A.1 be satisfied and let the input u(k) be quasi-stationary [15] and persistently exciting of order s + n, then: Assumption A.2. Consider the model (5), then there exists an integer N such that the compound matrix,  has full row rank. 4 Corollary 3 Let the conditions stipulated in Lemma 2 hold, and let u(k) be statistically independent from the innovation sequence e(`) for all k, `, then, XN 4.1 i h 1  Us,N  X T U T E T >0 N s,N s,N   N →∞ N Es,N (11)   rank Γs,N − Θu Us,N − Θy Ys,N   T and Tr E[ y(k) − γ(k) y(k) − γ(k) ] Considering model (1), let the block-Toeplitz matrices 0 and Te,s be defined as the Toeplitz matrix Tu,s in (8) Tu,s but from the quadruples (A, i h B, C, D) and (A, K, C, I), respectively. Let OsT = C T AT C T · · · A CT . Then we can state the following alternative data equation: 0 Ys,N = Os XN + Tu,s Us,N + Te,s Es,N An optimal trade-off between the above two cost functions is called a Pareto optimal solution. Moreover, the Pareto optimization problem is not tractable. For that purpose we will develop in the next subsection a convex relaxation of the cost functions. This will make it possible to obtain all Pareto optimal solutions using scalarization. By this data equation, we have that, XN   I 0 0  XN (13) Here E denotes the expectation operator. The matrix Γs,N ∈ Hp is the (block-) Hankel matrix approximating the Hankel matrix Ŷs,N and constructed from the approximation of the one-step ahead prediction of the output denoted by γ(k) in the same way Ŷs,N was constructed from ŷ(k). Further, we have the following constraints on the matrices Θu ∈ Tp,m and Θy ∈ Tp,p . T s−1  (12) Let Tp,m denote the class of lower triangular blockToeplitz matrices with block entries p × m matrices and let Hp denote the class of block-Hankel matrices with block entries of p column vectors. Then the three key structural properties listed in Section 3 are taken into account in an optimization problem seeking a trade-off between the following cost functions,  lim Pareto optimal Subspace Identification Ŷs,N = Os XN + Tu,s Us,N + Ty,s Ys,N . Proof: Since e(k) is white noise, it follows that E[x(k)e(`)T ] = 0 (with E denoting the expectation operator), for ` ≥ k. This in combination with the independency between u(k) and e(`), the white noise property of e(k) and the ergodicity or the quasi-stationarity of the signals yields, XN N2SID When assuming the optimal observer given, the quantity ŷ(k) is the minimum variance prediction of the output and equal to y(k) − e(k). Let the Hankel matrix Ŷs,N be defined from this sequence ŷ(k) as we defined Ys,N from y(k). Then the data equation (10) can be reformulated into:  i h 1  Us,N  X T U T Y T > 0 lim  N s,N s,N N →∞ N  Ys,N     Us,N    Ys,N " # 1 XN h T T i lim XN Us,N > 0 N →∞ N U s,N  XN       Us,N  =  0 I   0      Us,N  0 Ys,N Os Tu,s Te,s Es,N The results follows from (11) and the fact that the matrix Te,s is square and invertible. 2 Before stating this convex relaxation an analysis is made on the additional structure that can be imposed on the block-Toeplitz matrices Θu and Θy and/or under what conditions their block-Toeplitz structure is sufficient to find a unique solution. Based on this result the following assumption is stipulated. 4 4.2 (13) only with Γs,N fixed to Ŷs,N , let s > n and let Assumptions A.1 and A.2 be satisfied, Then, Additional structure in the block-Toeplitz matrices Tu,s and Ty,.s   rank Ŷs,N − Θu Us,N − Θy Ys,N = n In this section we analyse the additional structure present in the block-Toeplitz matrices Tu,s and Ty,.s as well as the conditions under which the block-Toeplitz structure is sufficient to find the system matrices (AT , BT , CT , D, KT ). These conditions, not including the additional structural constraint highlighted in Lemma 4, is summarized in Theorem 1 of this paper. Further the arguments optimizing the above optimization problem, denoted as Θ̂u , Θ̂y are unique and equal to, Lemma 4 Let s > n, then we can partition the blockToeplitz matrices Tu,s and Ty,.s , defined in the data equation (10) as, with Tu,s , Ty,s the true underlying block-Toeplitz matrices in the data equation(10).  Tu,s =  Tu,n | min Θu ∈Tp,m ,Θy ∈Tp,p Θ̂u = Tu,s Proof: Let δu ∈ Tp,m , δy ∈ Tp,p , then,  0 Hu,s−n | Tu,s−n  (14) Ŷs,N − Θu Us,N − Θy Ys,N = Ŷs,N − (Tu,s + δu )Us,N − (Ty,s + δy )Ys,N = Os XN − δu Us,N − δy Ys,N and likewise for the matrix Ty,s . Here the matrices Hu,s−n and Hy,s−n can be decomposed as,   [ Hu,s−n | Hy,s−n ] =   C CA . . . Therefore,    [ An−1 B    rank Ŷs,N − Θu Us,N − Θy Ys,N = · · · B | An−1 K · · · K ]   rank Os XN − δu Us,N − δy Ys,N CAs−n−1 (15) Application of Sylvester’s inequality [25] and under Assumption A.2, we further have, 2 Proof: Follows by construction.   h i rank Ŷs,N − Θu Us,N − Θy Ys,N = rank Os δu δy (16) First notice that under Assumption A.1 the rank of this matrix is ni  for δu = 0 and h  δy = 0. Since the Remark 5 Lemma 4 can be used to impose an additional constraint on the block-Toeplitz matrices Θu and Θy . If we partition these block-Toeplitz matrices conformal their counterparts Tu,s and Ty,s as highlighted in Lemma 4, as follows,   Θu,s =  Θu,n | Θ̂y = Ty,s rank Os δu δy ≥ rank Os for all δu , δy , we have that n is the minimal value of the rank in (16). 0 Θ Hu,s−n | Θu,s−n  It will now be shown that this minimal value of the rank, can only be reached for both δu and δy equal to zero. (likewise for Θy,s ), then for the case s ≥ 2n we can impose the following additional constraint, For that purpose, let t = {ti ∈ Rp×(m+p) }si=1 be a sequence of arbitrary matrices that define the lower triangular block-Toeplitz matrix ∆s (t) as: h i Θ Θ rank Hu,s−n =n Hy,s−n  t1 0   t2 t1 ∆s (t) =  .  ..  ts ts−1 The additional constraint highlighted in Remark 5 can be reformulated, as done e.g. in [18, 19], as a rank minimization constraint, that can be relaxed to a convex constraint using the nuclear norm. However we seek to avoid imposing this additional constraint in order to minimize the number of regularization parameters. The basis herefore is provided in the next Theorem.  ··· 0  ..  .  ∈ Rsp×s(m+p) . . ..  . .  · · · t1 h i The columns of the compound matrix δu δy in (16) can always be permuted into a matrix of the form ∆s (t) Theorem 1 Consider the observer in (1) with x(k) ∈ Rn and consider the rank optimization problem in Eq. 5 and since column permutations do not change the rank of a matrix we have that, all Pareto optimal solutions of the convex reformulation of the N2SID problem can be obtained by solving: h i h i rank Os δu δy = rank Os ∆s (t) minΓs,N ∈ Hp , Θu,s ∈ Tp,m , Θy,s ∈ Tp,p kΓs,N − Θu,s Us,N − Θy,s Ys,N k? . PN 2 λ +N ky(k) − γ(k)k 2 k=1 (18) Now we show that the following condition for all values of λ ∈ [0, ∞). h i rank Os ∆s (t) =n Remark 4 The method can be extended to other related identification problems. For example one way to consider the identification problem of an innovation model with absence of a measurable input, is to consider the following convex relaxed problem formulation: implies that ∆s (t) has to be zero. In order for the above rank constraint to hold we need ∆s (t) to be of the following form:  t1  t 2   .. .  0 ··· 0 0 t1  h i 0 0   = Os q1 q2 · · · qs−1 qs  ..  .  · · · t2 t1 ts ts−1 minΓs,N ∈Hp ,Θy,s ∈Tp,p kΓs,N − Θy,s Ys,N k? + PN λ 2 k=1 ky(k) − γ(k)k2 . N  (17) It is well-known that the problem (18) can be recast as a Semi-Definite Programming (SDP) problem, [4, 3], and hence it can be solved in polynomial time with standard SDP solvers. The reformulation, however, introduces additional matrix variables of dimension N × N , unless the problem is not further approximated using randomization techniques as in [23]. In section 5 we will present an alternative exact method using ADMM inspired by its successful application in [11].   The fact that s > n, we have that rank Os−1 = n and therefore we can deduce from the first p(s − 1) rows of the last p + m columns in the expression (17) that, qs = 0 ⇒ t1 = 0 Using this result, and the Toeplitz structure of ∆s (t), we can in the same way conclude from the first p(s−1) rows and from the columns (s−2)(m+p)+1 to (s−1)(m+p) in (17) that, 4.4 Calculation of the system matrices The convex-optimization problem (18) yields the estimates of the quantities Γs,N , Θu,s and Θy,s . Since the outcome depends on the regularization parameter λ, let us denote these estimates as Γ̂s,N (λ), Θ̂u,s (λ) and Θ̂y,s (λ) respectively. The determination of the system matrices starts with an SVD of the “low rank” approximated matrix as follows: qs−1 = 0 ⇒ t2 = 0 etc. Hence there cannot be a ∆s (t) with the given Toeplitz structure from zero such that  h that is idifferent  s rank Os ∆ (t) = n. Hence the minimal value of the h i rank of the matrix Os δu δy in (16) w.r.t. δu , δy yields zero value of both. This concludes the proof. 2 4.3 (19) Γ̂s,N (λ) − Θ̂u,s (λ)Us,N − Θ̂y,s (λ)Ys,N =    h i Σn̂ (λ) | 0 Vn̂T (λ)   Un̂ (λ) | ?  0 |? ? (20) A convex relaxation where n̂ is an integer denoting the n̂ largest singular values and the notation ? denotes a compatible matrix not of interest here. The selection of n̂ is outlined in the algorithmic description given next. A convex relaxation of the NP hard problem formulation in (13) will now be developed. The original problem is reformulated in two ways. First, the rank operator is substituted by the nuclear norm. The nuclear norm of a matrix X denoted by kXk? is defined as the sum of the singular values of the matrix X. It is also known as the trace norm, the Ky Fan norm or the Schatten norm, [14]. This is known to be a good approximation of the rank operator when it is to be minimized, [4, 3]. Second, the minimum variance criterium is substituted by the PN following sample average N1 k=1 ky(k) − γ(k)k22 . By introducing a scalarization parameter λ ∈ [0, ∞), which can be interpreted as a regularization parameter, The algorithm requires in addition to the input-output data sequences the user to specify the parameter s to fix the number of block rows in the block-Hankel matrices Us,N and Ys,N and an interval for the parameter λ denoted by Λ = [λmin , λmax ]. As for the implementation described in [11], which we will refer to as WNNopt, the identification data set could be partitioned in two parts. The first part is referred to as the ide-1 part of 6 Un̂ as done in classical SID methods by considering Un̂ to be an approximation of the extended observability matrix Os , see e.g. [25]. e STEP 2: With Un̂ and the estimated matrix Ty,s we exploit that the latter matrix approximates the blockToeplitz matrix Ty,s to estimate the observer gain K̂T via the solution of a standard linear least squares problem. This is seen as follows. Let us assume the block Toeplitz matrix Ty,s be given and denoted explicitly as,   0 0 ··· 0 0    CK 0 0 0      0 0 Ty,s =  CAK CK    .. ..   . .   the identification data set and the remaining part of the identification data set is referred to as the ide-2 part. This splitting of the data set was recommended in [11] to avoid overfitting. In the N2SID algorithm three variants can be substituted in the algorithmic block ’compute Mj (λ)’ for j = 1, 2, 3. This algorithmic block performs the actual calculation of the one-step ahead predictor and the three variants are summarized after the description of the core part of N2SID. N2SID algorithm: Grid the interval Λ = [λmin , λmax ] in N different points, e.g. using theMatlab  notation Λ = logspace log(λmin ), log(λmax ), L for i=1:L, CAs−2 K Solve (18) for λ = Λ(i) and data set ide-1. Compute the SVD as in (20) for λ = Λ(i). Select Select the model order n̂ form the singular values in (20). This can be done manually by the user or automatically. Such automatic selection can be done as in the N4SID implementation in [15] as highlighted in [11]: order the singular values in (20) in descending order, then select that index of the singular value that in logarithm is closest to the logarithmic mean of the maximum and minimum singular values in (20). Compute system matrices {ÂT , B̂T , CˆT , D̂, K̂T } according to the procedure ’Compute Mj (λ)’ for j = 1, 2, 3 and λ = Λ(i). Using the estimated system matrices {ÂT , B̂T , CˆT , D̂}, and the validation data in ide-2, compute the simulated output ŷ(k, λ) as, x̂T (k + 1) = ÂT x̂T (k) + B̂T u(k) ŷ(k, λ) = ĈT x̂T (k) + D̂u(k) If we know the matrix Os , we can write the following set of equations, Os (1 : (s − 1)p, :)K = Ty,s (p + 1 : ps, 1 : p) Let us now denote the first (s − 1)p rows of the matrix Un̂ (λi ) by Ôs−1,T and let us denote the submatrix of the matrix Θ̂y,s (λi ) from rows p + 1 to row ps and from column 1 to p by T̂y,s (p + 1 : ps, 1 : p), then we can estimate KT from: min kÔs−1,T KT − T̂y,s (p + 1 : ps, 1 : p)k2 KT N X (22) This estimate of the observer gain is used to estimate the system matrix AT as: ÂT = ÂT + K̂T ĈT (23) (21) STEP 3: Let the approximation of the observer be denoted as: and evaluate the cost function, J(λ) = · · · CK 0 x̂T (k + 1) = ÂT x̂T (k) + B̂T u(k) + K̂T y(k) ŷ(k) = ĈT x̂T (k) + D̂u(k) ky(k) − ŷ(k, λ)k22 i=1 end Select Mj (λopt ) with λopt given as: (24) Then the estimation of the pair B̂T , D̂ and the initial conditions of the above observer can again be done via a linear least squares problem as outlined in [25] by minimizing the RMS value of the prediction error y(k) − ŷ(k) determined from the identification data in ide-1. The estimated input matrix B̂T is then determined as: B̂T = B̂T + K̂T D (25) λopt = min J(λ) λ∈Λ The subsequent three ways to compute the model are summarized as: Compute M2 (λ): Compute M1 (λ): STEP 1: as in Compute M1 (λ). STEP 2: Derive an estimate of the state sequence of the observer (24) from the SVD (20), where for the STEP 1: From the SVD in (20), and the selected model order n̂, the pair ÂT , ĈT is derived from the matrix 7 sake of compactness again the system symbol x̂T (k) will be used, For our problem the linear operator consists of a sum of Hankel and Toeplitz operators, and we will show how FFT techniques can be used also for this operator. For more details on the ADMM algorithm see the appendix. h i x̂T (1) x̂T (2) · · · x̂T (N − s + 1) ≈ Vn̂T (λ) 5.1 Using the singular p values this approximation could also be scaled as Σn̂ (λ)Vn̂T (λ). STEP 3: Knowledge of the estimated state sequence of the observer (24) turns the estimation of the system matrices ÂT , B̂T , ĈT , D̂, K̂T and the observer inititial conditions into linear least squares problem. The estimated pair (ÂT , B̂T ) can be computed from this quintuple as outlined in (23) and (25), respectively. We define the circulant matrix operator C n : Rn → Rn×n of a vector x ∈ Rn via   x1 xn · · · x3 x2    x x1 xn x3    2   . . . ..   . n (27) C (x) =  . x2 x1 . .  .     .. .. xn−1 . . xn    xn xn−1 · · · x2 x1 Compute M3 (λ): STEP 1 and 2: as in Compute M1 (λ). STEP 3: With Un̂ and the estimated Markov parame eters in Tu,s we could similarly to estimating the Kalman gain, also estimate the pair B̂T , D̂ via a linear least squares problem. The matrix B̂T can be estimated from B̂T as outlined in (25), We also define the Hankel matrix operator H(m,n) : Rm+n−1 → Rm×n of a vector x ∈ Rm+n−1 via   x1 x2 · · · xn   ..   . .   . x2 . . H(m,n) (x) =  (28)  .  ..  ..  .   In the experiments reported in Section 6 use will be made of N 2SID Algorithm with the model computation block Compute M1 (λ). It turned out that the N2SID algorithm is much less sensitive to overparametrization compared as compared to WNNopt. For that reason we will use the whole identification data set in all steps of the N2SID algorithm for the experiments reported in Section 6, i.e. ide-1 and ide-2 are identical and equal to the identification data set. 5 xm · · · · · · xm+n−1 For a vectorx ∈ Rm+n−1 it holds that H(m,n) (x) = m+n−1 Cn:n+m−1,n:−1:1 (x), i.e. the Hankel operator is the lower left corner of the circulant operator where the columns are taken in reverse order. We also define the Toeplitz operator T n : R2n−1 → Rn×n of a vector x ∈ R2n−1 via   xn xn−1 · · · x1   ..   ..  . xn+1 .  . T n (x) =  (29)  . . . ..   ..  . .   ADMM The problem we like to solve is exactly of the form in (20) in [11], i.e. 1 min kA(x) + A0 k? + (x − a)T H(x − a) x 2 Circulant, Toeplitz and Hankel Matrices (26) x2n−1 · · · · · · xn (n,n) We realize that T n (x) = H:,n:−1:1 (x), i.e. a Toplitz operator can be obtained from a square Hankel operator by taking the columns in reverse order. We are finally interested in upper triangular Toeplitz operators with and without zeros on the diagonal, and we remark that these are easily obtained from the normal Toeplitz oph iT erator by replacing x with xT 0 , which will be upper triangular with a non-zero diagonal if x ∈ Rn and with a zero diagonal if x ∈ Rn−1 . for some linear operator A(x) and some positive semidefinite matrix H. In the above mentioned reference the linear operator is a Hankel matrix operator, and this structure is used to tailor the ADMM code to run efficiently. Essentially the key is to be able to compute the coefficient matrix related to the normal equations of the linear operator in an efficient way using FFT. This matrix M is defined via Aadj (A(x)) = M x, ∀x 5.2 where Aadj (·) is the adjoint operator of A(·). Similar techniques have been used for Toeplitz operators in [17], and are closely related to techniques for exploiting Toeplitz structure in linear systems of equations, [6]. The Fourier Transform and Hankel Matrices It is well-known, [6], that if we let F n ∈ Cn×n be the discrete Fourier transform matrix of dimension n, then 8 the circulant matrix can be expressed as C n (x) = 5.4 1 n H (F ) diag(F n x)F n . n Forming the Coefficient Matrix A key matrix in the ADDM algorithm is the matrix M defined via (30) Aadj (A(x)) = M x, From this we immediately obtain that the Hankel matrix can be expressed as H(m,n) (x) = 1 H H diag(F N x)G N We will now show how this matrix can be formed efficiently using the Fast Fourier Transform (FFT). We partition the matrix as (31)   M11 M12 M13   T  M = M12 M22 M23  T T M13 M23 M33 N where N = n + m − 1, F = F , G = F:,n:−1:1 and H = F:,n:n+m−1 . This expression will make it easy for us to represent the adjoint of the Hankel operator. It is (m,n) straight forward to verify that the adjoint Hadj (Z) : Rm×n → Rn+m−1 is given by (m,n) Hadj (Z) = where the partition is done to conform with the partition x = (y, v, w). It is then clear that M11 is defined via 1 H F diag(HZGH ). N (s,n) Hadj (H(s,n) (y)) = M11 y, Notice that we are abusing the operator diag(·). In case the argument is a vector the operator produces a diagonal matrix with the vector on the diagonal, and in case the argument is a square matrix, the operator produces a vector with the components equal to the diagonal of the matrix. 5.3 ∀x. ∀y The left hand side can be expressed as  1 H F diag HH H diag (F y) GGH . 2 N From the identity diag (A diag (x) B) = (A The Linear Operator A B T )x where denotes the Hadamard product of matrices, it follows that     1 M11 = 2 F H HH H GGH F N We will now present the linear operator that we are interested in for the SISO case: A : RN × Rs × Rs−1 → Rs×n , where T  T v w  s:−1:1  V + T s  s−1:−1:1  W 0 0  (s,n) A(x) = H (ŷ) + T s The efficient way to form M11 is to first compute F ,G and H using an FFT algorithm, and then to form the matrix    GGH . X = HH H where n = N − s + 1, x = (ŷ, v, w) with ŷ ∈ RN , v ∈ Rs , w ∈ Rs−1 , V ∈ Rs×N , and W ∈ Rs×N . By taking V = −Us,N and W = −Ys,N we obtain the linear operator for N2SID. Then, v and w are the first columns of the Toeplitz matrices Tu,s and Ty,s , respectively. We can express A(x) in terms of Hankel operators as:  A(x) = H (s,n) (s,s) (ŷ)+H:,s:−1:1  vs:−1:1 0 T  (s,s)  V +H:,s−1:−1:1  ws−1:−1:1 0 After this one should apply the inverse FFT algorithm to X T , and then to the transpose of the resulting matrix once more the inverse FFT algorithm. The expressions for the other blocks of the matrix M can be derived in a similar way, and they are given by: T  W. M12 = The adjoint of this operator can be expressed in terms of the adjoint of the Hankel operator as  (s,n) Hadj (Z) M13 = M22 =  M23 =   (s,s) T  Aadj (Z) =   Hadj,s:−1:1 (V Zs:−1:1,: )  (s,s) T Hadj,s−1:−1:1 (W Zs:−1:1,: ) M33 = 9    1 H H T GH F H H GV F:,s:−1:1 :,s:−1:1 :,1:s N2     1 H F H:,s:−1:1 H H GW T GH F:,s−1:−1:1 :,1:s 2 N     1 H F HV V H H H GGH F:,s:−1:1 κ2 :,s:−1:1     1 H F:,s:−1:1 HV W H H H GGH F:,s−1:−1:1 2 κ     1 H H H H F HW W H GG F:,s−1:−1:1 . κ2 :,s−1:−1:1 Notice that for the last three blocks the matrices F , G, and H are defined via a discrete Fourier transform matrix of order κ = 2s − 1. for the SISO case for all i. Below are formulas given for sub-blocks of each of the other matrices M12j = 5.5 MIMO Systems M13j = So far we have only discussed SISO systems. For a general p × m system we may write the linear operator A : RpN × Rpms × Rpp(s−1) → Rps×n as: A(x) = p X M22jk = M23jk = Ai (xi ) ⊗ ei M33jk = i=1    1 H F H:,s:−1:1 H H F:,s:−1:1 GVjT GH :,1:s 2 N     1 H F:,s−1:−1:1 F H:,s:−1:1 H H GWjT GH :,1:s 2 N     1 H F HVj VkH H H GGH F:,s:−1:1 κ2 :,s:−1:1     1 H H H H F:,s−1:−1:1 F HV W H GG j :,s:−1:1 k κ2     1 H F:,s−1:−1:1 HWj WkH H H GGH F:,s−1:−1:1 . 2 κ It is interesting to notice that these formulas do not depend on index i. This means that all Mi are the same. where Ai (xi ) = H (s,n) (ŷi ) + m X " (s,s) H:,s:−1:1 i,j vs:−1:1 j=1 + p X (s,s) H:,s−1:−1:1 " i,j ws−1:−1:1 0 j=1 #!T Vj 0 #!T 6 In this section we report results on numerical experiments using real-life data sets. We will make use of some representative data sets from the DaISy collection, [2]. For preliminary test with the new N2SID mehod based on academic examples, we refer to [23]. Wj j j where Vj = −Us,N and Wj = −Ys,N are Hankel matrices defined from uj and yj , i.e. from the jth inputs and outputs, respectively, and where ei is the ith basis vector. Hence we may interpret each term Ai (xi ) as defining a MISO system in the sense that each predicted output can be written as a linear combination of all the intputs and outputs. If we Ppwrite the adjoint variable Z in a similar way as Z = i=1 Zi ⊗ei , it follows that the adjoint operator is given by Aadj (Z) = (Aadj,1 (Z1 ), . . . , Aadj,p (Zp )). Hence the matrix M will now be blockdiagonal with blocks defined from the identity Aadj,i (Ai (xi )) = Mi xi , The numerical results reported in Subsection 6.3 were performed with Matlab. The implementations have been carried out in MATLAB R2013b running on an Intel Core i7 CPU M 250 2 GHz with 8 GB of RAM. 6.1 ∀xi , i = 1, . . . , p. (s,n) Hadj (Zi ) Data selection and pre-processing From the DaISy collection, [2], five representative data sets were selected. These sets contain SISO, SIMO, MISO and MIMO systems. Information about the selected data sets is provided in Table 1. In order to evaluate the performances for small length data sets, data sets of increasing length are considered. The data length is indicated by Nide in Table 2 for each data set of Table 1 . To test the sensitivity of the identification mehods with respect to the length of the identification data set, Nide is increased from a small number, as compared to the total number of samples available, in a way as indicated in Table 2 From each identification and validation data set the offset is removed. Data set 2 from the continuous stirred tank reactor is scaled in such a way that both outputs have about the same numerical range. This is achieved by scaling the detrended versions of these outputs such that the maximum value of each output equals 1. It is not difficult to realize that the operators Aadj,i (Zi ) will be given by  Validation Study    T  H(s,s)  adj,s:−1:1 (V1 Zi;s:−1:1,: )     .   ..    (s,s)  T  Aadj,i (Zi ) =   Hadj,s:−1:1 (Vm Zi;s:−1:1,: )  .  (s,s)  T Hadj,s−1:−1:1 (W1 Zi;s:−1:1,: )     ..   .   (s,s) T Hadj,s−1:−1:1 (Wp Zi;s:−1:1,: ) Since many of the data sets contain poorly excited data at their beginning, the first del samples are discarded from each data set. The actual value of del for each data set is listed in Table 2. Finally each identified model is validated for each test case on the same validation data set. These validation data sets contain the Nval samples Hence each of the blocks Mi will have a similar structure as the M matrix for the SISO system. However, the sub-blocks M12 , M13 , M22 , M23 and M33 will have sub-blocks themselves reflecting that fact that there are several inputs and outputs. M11 will be the same as M1 10 Table 1 Five benchmark problems from the DaISy collection, [2]; Ntot is the total number of data samples available Nr 1 Data set Description Inputs Outputs Ntot 96-007 CD player arm 2 2 2048 2 98-002 Continuous stirring tank reactor 1 2 7500 3 96–006 Hair dryer 1 1 1000 4 97-002 Steam heat exchanger 1 1 4000 5 96-011 Heat flow density 2 1 1680 Table 2 The increasing length Nide of the data sets used for system identification starting with the sample index del; Nval indicates the length of the validation data set starting with the sample index max(Nide ) + 1. Nide Nr Nval 1 80 120 150 175 200 300 400 500 600 120 500 2 100 150 200 300 400 500 600 700 800 200 1500 3 80 100 120 140 160 180 200 250 300 120 600 4 150 200 300 500 750 1000 1250 1500 1750 200 1500 5 175 200 250 300 350 400 450 500 550 200 1000 following the sample with index max(Nide )+1. The value of Nval is listed in Table 2. 6.2 del 400 600 in order to avoid overfitting. In this paper both data sets are retrieved from the identification data set of length Nide by splitting it into two almost equal parts differing in length by at most one sample. Compared Identification methods Three SID methods are compared in the tests. Their key user selection parameters are listed in Table 3. One of the key user selection parameters of the SID methods is the number of block rows s of the Hankel data matrices. In methods like N4SID or WNNopt of Table 3 a distinction could be made in the number of block rows of so-called future and past Hankel matrices. Such differentiation is not necessary for the N2SID algorithm. Since such differentation is still an open research problem we opted in this simulation study to take the number of block rows of the future and past Hankel matrices in N4SID or WNNopt equal to the number of block rows in the N2SID algorithm. Table 3 also lists the interval of the regularization parameter λ to be specified for the Nuclear Norm based methods. For N2SID we used the ADMM algorithm presented in [11], where we have provided our own routines for computing M as explained in section 5. As explained in [11] we also make use of simultaneous diagonalization of M and the positive semidefinite matrix H in (26) in order not to have to make different factorizations for each value of the regularization parameter λ. The maximum number of iterations in the ADMM algorithm have been set to 200, the absolute and relative solution accuracy tolerances have been set to 10−6 , and 10−3 , respectively. The parameters used to update the penalty parameter have been set to τ = 2 and µ = 10. We label our N2SID Algorithm with N2SID). Also we do not split the data for N2SID. We have also carried out experiments when we did split the data. This resulted in most cases in comparable results and in some cases even better results. For N4SID we further used the default settings except that the Kalman filter gain is not estimated, a guaranteed stable simulation model is identified, no input delays are estimated and these are fixed to zero, and finally no covariance estimates are determined. The order selection is done with N4SID using the option ’best’, [15]. This results in a similar automatic choise as we have implemented for N2SID. The SID methods are compared with the prediction error method PEM of the matlab System Identification toolbox [15]. Here the involvement of the user in specifying the model structure is avoided by initializing PEM with the model determined by N4SID. Therefore, the model order of PEM is the same as that determined by the N4SID method. In this way no user selection parameters are needed to be specified for PEM. This is in agreement with the recommendation given on the PEM help page http://nf.nci.org.au/facilities/software/ Matlab/toolbox/ident/pem.html when identifying black-box state space models. For WNNopt in [11] the weighting according to the CVA method is used. Also here no Kalman gain is estimated and the input delay is set to zero. As indicated in [11] an ’identification’ and a ’validation’ data set is needed to perform the selection of the regularization parameter λ 11 Table 3 Three SID methods and their user selection parameters and the number of block-rows in the data Hankel matrices s. Method λ Nide s Weighting N4SID [[15]] / 15 automatic 3 15 CVA 3 15 / −3 [10 WNNopt, [[11] ] −1.5 [10 N2SID Algorithm 6.3 λ Nide The three SID methods in Table 3 and the PEM method will be compared for the data sets in Table 1. The results of this comparison are for each data set summarized in two graphs in the same figure. The left graph of the figure displays the goodness of fit criterium VAF. This is defined using the identified quadruple of system matrices [ÂT , B̂T , ĈT , D̂] obtained with each method to predict the output using the validation data set. Let the predicted output be denoted by ŷv (k) for each method, and let the output measurement in the validation data set be denoted by yv (k). Then VAF is defined as: 1 Nval The efffect of the use of instrumental variables and the splitting of the identification data set to avoid overfitting on the order selection is clear from the singular values of N2SID and WNNopt given in Figure 2 for Nide = 600. This plot visually supports the selection of a 7-th order model by N2SID and it also explains why WNNopt selects a larger model order. One possible explanation is that the instrumental variables and projections have “projected away” crucial information in the data. PNval 2 k=1 kyv (k) − ŷv (k)k2 100% 1 2 Nval kyv (k)k2 , 10 ] N2SID, but this a the cost of a lower VAF. For Nide = 150 and 175, the same order as for N4SID was detected, however with worser VAF as compared to both N4SID and PEM. For Nide ≥ 400 the limit set on the model order, which was 10 in all experiments, was selected by WNNopt, sometimes but not always yielding a better VAF. Results and Discussion  VAF = 1 − , 10 ] (32) The right graph of the figure displays the model complexity as defined by the model order of the state space model. Both the goodness of fit and estimated model order are graphed versus the length of the identification data batch as indicated by the symbol Nide in Table 2. All these results are obtained in a similar “automized manner” for fair comparison as outlined in section 6.2. In order to evaluate the results additional information is retrieved from the singular values as computed by the SID methods WNNopt and N2SID. This is done in order to see possible improvements in the low rank detection by the new SID method N2SID over WNNopt. For an illustration of the potential improvement of the latter over N4SID we refer to [11]. 10 N2SID WNNopt N4SID PEM 85 VAF 80 The CD player arm data set (# 1 in Table 1) 75 70 The results are summarized in Figure 1. The goodness of fit is given on the left side of this figure and the detected order n̂ on the right side. For Nide ≤ 400, N2SID outperforms all other methods and it was always better then N4SID. PEM is able to improve the results of N4SID in most cases. Its results remain however inferior to N2SID. In general N2SID detects a larger model order. For the shortest data lengths Nide = 80 and 120, WNNopt was not able to produce results since for that case the ADMM implementation broke down. The reason being that the Schur form was no longer computable as it contained NaN numbers. For that reason both the VAF and the order were put to zero. The WNNopt determined for 150 ≤ Nide ≤ 300 a lower model order n̂ compared to N2SID WNNopt N4SID 8 Order n 6.3.1 CD player arm 90 6 4 2 65 60 0 260 N ide 600 0 0 260 N ide Fig. 1. VAF Daisy # 1 - CD player arm. 12 600 10 2 95 N2SID WNNopt Continuous stirring tank reactor 10 N2SID WNNopt N4SID 90 10 0 10 −2 8 85 75 70 10 −4 65 60 10 55 0 −6 0 5 10 15 20 Number of singular value 25 30 350 N 6 4 2 800 0 0 350 N 800 ide Fig. 3. VAF Daisy # 2 - Continuous Stirred Tank Reactor. The Continuous stirred Tank Reactor data set (# 2 in Table 1) fluctuating behavior of the other methods, both with respect to VAF and estimated model order. WNNop fails to address the case of very small data length sets, i.e. when Nide = 80 and 100. The combination of N4SID and PEM enables in a number of cases to provide models with a similar VAF compared to N2SID and in a small number of cases to slightly improve the results over N2SID. However, this is not consistent, since for Nide = 400 the VAF is worsened compared to the intialization with N4SID. The goodness of fit parameter VAF and the estimated model order n̂ are plotted in Figure 3 in the left and right graphs, respectively. For Nide = 100 and 150 WNNopt was not able to provide numerical results. For that reason the corresponding VAF values are again fixed to zero. PEM resulted in bad VAF results for Nide = 100, probably as a consequence of bad initialization from N4SID. However, also for Nide = 800 PEM had severly degraded results despite the fact that N4SID provided a model of comparable quality with the other SID methods. Figure 6 diplays the singular values for the last data set where Nide = 400 in Figure 6. It confirms the improved potential in low rank approximation by N2SID over WNNopt. The latter method diminishes the gap, leading in general to a larger model order estimation. This larger model order does however for this example not lead to a better output prediction. The singular values in Figure 4 indicate that for Nide = 800 both N2SID and WNNopt have the same order estimate n̂. There is a clear gap in the singular values for WNNopt. The difference in detected order despite similar VAF indicates that order detection is not so critical for this example. 6.3.3 N2SID WNNopt N4SID PEM ide Fig. 2. Singular values Daisy # 1 - CD player arm. 6.3.2 Order n VAF 80 6.3.4 The Hair dryer data set (# 3 in Table 1) The Steam Heat Exchanger data set (# 4 in Table 1) The goodness of fit parameter VAF and the estimated model order n̂ are plotted in Figure 7. The goodness of fit parameter VAF and the estimated model order n̂ are plotted in Figure 5 in the left and right graphs, respectively. Here it is again clear that N2SID outperforms all other SID methods and provides more stable behavior when increasing Nide compared to the N2SID again for small data sets with Nide ranging between 150 and 750 yields the best output predictions of all methods. Comparing the VAF value in Figure 7 with those for the previous Daisy data sets reveals that the 13 2 10 0 10 −2 Hair dryer 95 10 90 8 85 6 VAF N2SID WNNopt Order n 10 80 10 10 −4 75 70 0 −6 0 5 10 15 20 Number of singular value 25 30 160 N 400 ide Fig. 4. Singular values Daisy # 2 - Continuous Stirred Tank Reactor. 4 2 0 0 N2SID WNNopt N4SID 160 N 400 ide Fig. 5. VAF Daisy # 3 - Hair dryer. inferior VAF. N2SID provides a better VAF prediction compared to N4SID and PEM and this for a smaller model order n̂ as compared to WNNopt. values are smaller. This reflects problems with the data set due to lower signal to noise ratio, system nonlinearity, etc. Because of this we started the analysis with the smallest value of Nide equal to 150, since for smaller values poor results were obtained for all methods. From the singular values in Figure 10 for Nide = 600 an order selection of 1 up to 4 is clearly justified by N2SID. The order selection made by WNNopt is much less clear. The other methods show a similar behavior as for the previously analysed data sets: in most cases but not all PEM improves over N4SID, WNNopt displays inferior behavior for Nide ≤ 1250, and both N2SID and N4SID (PEM) determine a smaller order then WNNopt. 6.3.6 General Observation from the analysed Daisy data sets. The automized analysis of the 5 Daisy data sets clearly demonstrates the merit of the new SID method N2SID over the other representative identification methods considered. Especially when considering data sets of small length it is able to make a good and sometimes excellent trade-off between model complexity and model accuracy as expressed by the goodness of fit. The improvement over the other analysed nuclear norm subspace identification method WNNopt in order detection both in revealing a clear gap as well as in detecting models of low complexity is evident. Finally, the plot of the singular values for the last data set in Figure 8 displays a similar behavior. Both singular value plots clearly support the automatic order selection made. However N2SID has a better trade-off between model complexity and model accuracy as expressed by the VAF. 6.3.5 N2SID WNNopt N4SID PEM Heat flow density data set (# 5 in Table 1) The goodness of fit parameter VAF and the estimated model order n̂ are plotted in Figure 9. 7 For this data set WNNopt provides for 200 ≤ Nide ≤ 450 the best results but in general detects a larger model order. For the smallest length data set WNNopt produced Concluding Remarks Subspace identification of multivariable state space innovation models is revisited in this paper in the scope 14 80 N2SID WNNopt Steam heat exchanger 10 75 8 70 6 10 65 −2 N2SID WNNopt N4SID PEM 60 10 N2SID WNNopt N4SID 0 VAF 10 2 Order n 10 55 0 −4 0 5 10 Number of singular value 15 800 N ide Fig. 6. Singular values Daisy # 3 - Hair dryer. 1750 4 2 0 0 800 N 1750 ide Fig. 7. VAF Daisy # 4 - Steam Heat Exchanger. with Dr. Chengpu Yu of the Delft Center for Systems and Control on the topic of Theorem 1 are very much appreciated. of nuclear norm optimization methods and using the observer form. A new subspace identification method is presented, referred to as N2SID. N2SID is the first subspace identification method that addresses the identification of innovation state space models without the use of instrumental variables (IVs). The avoidance of using IVs leads to a number of improvements. First as shown in the experimental study in [24], it leads to improved results in identifying innovation models when compared to existing SID methods, like N4SID and the recent Nuclear Norm based SID methods presented in [11] and with the Prediction Error Method (PEM) [15]. This improvement especially holds for small length data batches, i.e. when the number of samples is only a small multiple of the order of the underlying system. Second, as illustrated by Theorem 1, the methodology presented enables to provide insight on the necessary conditions of persistency of excitation of the input on the existance of a unique solution. Finally, the new N2SID methodology will enable to address other interesting identification problems in a subspace identification framework, such as the identification of distributed systems as shown in [26, 27, 22]. The authors express their full appreciation for the constructive comments raised by the anonymous reviewers. References [1] [2] [3] [4] Acknowledgement: The authors kindly acknowledge Mr. Baptiste Sinquin from Ecole Centrale Lyon for his help in a preliminary matlab comparison study with N2SID during his internship at the Delft Center for Systems and Control under the supervision of Prof. M. Verhaegen. Also the discussions [5] 15 S. Boyd, N. Parikh, E. Chu, B. Peleato, and J. Eckstein. Distributed optimization and statistical learning via the alternating direction method of multipliers. Foundations and Trends in Machine Learning, 3(1):1âĂŞ122, 2011. Michael Jordan, Editor in Chief. B. De Moor, P. De Gersem, B. De Schutter, and W. Favoreel. DAISY: A database for the identification of systems. Journal A: Special Issue on CACSD (Computer Aided COntrol System Design), 38(3):4– 5, Sep. 1997. M. Fazel. Matrix Rank Minimization with Applications. PhD thesis, Stanford University, 2002. M. Fazel, H. Hindi, and S. Boyd. A rank minimization heuristic with application to minimum order system approximation. In Proceedings of the American Control Conference, pages 4734–4739, 2001. M. Fazel, T. K. Pong, D. Sun, and P. Tseng. Hankel matrix rank minimization with applications to 10 Heat flow density 2 90 N2SID WNNopt 88 10 0 10 −2 VAF 84 −4 10 −6 82 0 5 10 Number of singular value 80 0 15 Fig. 8. Singular values Daisy # 4 - Steam Heat Exchanger. [6] [7] [8] [9] [10] [11] [12] 8 Order n 86 10 10 N2SID WNNopt N4SID PEM N2SID WNNopt N4SID 6 4 2 212 N 600 ide 0 0 212 N 600 ide Fig. 9. VAF Daisy # 5 -Heat flow density. system identification and realization. SIAM Journal on Matrix Analysis and Applications, 34(3):946– 977, 2013. G. H. Golub and Ch. F. van Loan. Matrix Computations. The Johns Hopkins University Press, Baltimore, Maryland, 1996. Third Edition. A. Hansson, Z. Liu, and L. Vandenberghe. Subspace system identification via weighted nuclear norm optimization. In Proceedings of the 51st IEEE Conference on Decision and Control, pages 3439–3444, 2012. B. S. He, H. Yang, and S. L. Wang. Alternating direction method with self adaptive penalty parameters for monotone variational inequalities. Journal of Optimization Theory and Applications, 106(2):337âĂŞ356, 2000. M. Jansson and B. Wahlberg. On consistency of subspace methods for system identification. Automatica, 34(12):1507âĂŞ1519, 1998. W.E. Larimore. Canonical variate analysis in identification, filtering, and adaptive control. In Proceedings of the 29th IEEE Conference on Decision and Control, 1990.,, pages 596–604 vol.2, 1990. Z. Liu, A. Hansson, and L. Vandenberghe. Nuclear norm system identification with missing inputs and outputs. Systems & Control Letters, 62:605–612, 2013. Z. Liu and L. Vandenberghe. Interior-point method [13] [14] [15] [16] [17] [18] [19] 16 for nuclear norm approximation with application to system identification. SIAM Journal on Matrix Analysis and Applications, 31(3):1235–1256, 2009. Z. Liu and L. Vandenberghe. Semidefinite programming methods for system realization and identification. In Proceedings of the Joint 48th IEEE Conference on Decision and Control and 28th Chinese Control Conference, pages 4676–4681, 2009. Z. Liu and L. Vandenberghe. Interior-point method for nuclear norm approximation with application to system identification. SIAM Journal on Matrix Analysis and Applications, 31(3):1235–1256, 2010. L. Ljung. System Identification Toolbox for use with Matlab. Version 7. The MathWorks, Inc, Natick, MA, 7th edition, 2007. K. Mohan and M. Fazel. Reweighted nuclear norm minimization with application to system identification. In Proceedings of American Control Conference, pages 2953–2959, 2010. T. Roh and L. Vandenberghe. Discrete transforms, semi-definite programming, sum-of-squares representations of nonnegative polynomials. SIAM Journal on Optimization, 16(4):939–964, 2006. R.S. Smith. Frequency domain subspace identification using nuclear norm minimization and hankel matrix realizations. IEEE-TAC, 59(11):2886 – 2896, 2012. R.S. Smith. Nuclear norm minimization methods Table 4 ADMM algorithm 1. Initialize x, X, Z, ρ. For example, set x = 0, X = A0 , Z = 0, ρ = 1. 2. Update x := argminx̂ Lρ (x̂, X, Z). See (37). 10 2 10 1 10 0 10 −1 10 −2 10 −3 3. Update X := argminX̂ Lρ (x, X̂, Z). See (39). 4. Update Z := Z + ρ(A(x) + A0 − X). 5. Terminate if krp kF ≤ p and krd k2 ≤ d (see (40)–(43)). Otherwise, go to step 2. N2SID WNNopt [27] C. Yu, M. Verhaegen, and A. Hansson. Subspace identification of local 1d homogeneous systems. In IFAC Symposium SYSID. Beijing, pages 886–890, 2015. Appendix: ADMM Algorithm 0 5 10 Number of singular value 15 We here state the ADMM algorithm for a generic nuclear norm optimization problem with a quadratic regularization term: 1 minimize kA(x) + A0 k∗ + (x − a)T H(x − a). (33) 2 The presentation is an allmost exact citation from [11]. The variable is a vector x ∈ Rn . The first term in the objective is the nuclear norm of a p×q matrix A(x)+A0 where A : Rn → Rp×q is a linear mapping. The parameters in the second, quadratic, term in the objective of (33) are a vector a ∈ Rn and a positive semidefinite matrix H ∈ Sn . Fig. 10. Singular values Daisy # 5 - Heat flow density. [20] [21] [22] [23] [24] [25] [26] for frequency domain subspace identification. In Proceedings of the American Control Conference, pages 2689 – 2694, 2012. P. Van Overschee and B. De Moor. N4sid: Subspace algorithms for the identification of combined deterministic-stochastic systems. Automatica, 30(1):75 – 93, 1994. M. Verhaegen. Identification of the deterministic part of mimo state space models given in innovations form from input-output data. Automatica, 30(1):61 – 74, 1994. M. Verhaegen. System identification for high resolution optical imaging, 2015. Plenary talk at IFAC Symposium SYSID. Beijing. M. Verhaegen and A. Hansson. Nuclear norm subspace identification (n2sid) for short data batches. In Proceedings of the 19th World Congress IFAC, pages 9528–9533, Cape Town, South Africa, 2014. M. Verhaegen and A. Hansson. N2sid: Nuclear norm subspace identification. CoRR, abs/1401.4273, 2015. M. Verhaegen and V. Verdult. Filtering and Identification: A Least Squares Approach. Cambridge University Press, 2007. C. Yu and M. Verhaegen. Local subspace identification of distributed homogeneous systems with general interconnection patterns. In IFAC Symposium SYSID. Beijing, pages 585–589, 2015. To derive the ADMM iteration we first write (33) as minimize kXk∗ + (1/2)(x − a)T H(x − a) subject to A(x) + A0 = X with two variables x ∈ Rn and X ∈ Rp×q . The augmented Lagrangian for this problem is 1 Lρ (x, X, Z) = kXk∗ + (x − a)T H(x − a) 2 + Tr(Z T (A(x) + A0 − X)) ρ + kA(x) + A0 − Xk2F , 2 (34) (35) (36) where ρ is a positive penalty parameter. Each iteration of the ADMM consists of a minimization of Lρ over x, a minimization of Lρ over X, and a simple update of the dual variable Z. This is summarized in Table 4. The update in step 2 requires the solution of a linear equation, since Lρ (x̂, X, Z) is quadratic in x̂. Setting the gradient of Lρ (x̂, X, Z) with respect to x̂ equal to zero 17 gives the equation (M + ρH)x̂ = Aadj (ρX + ρA0 − Z) + Ha (37) where Aadj is the adjoint of the mapping A and M is the positive semidefinite matrix defined by the identity M z = Aadj (A(z)) ∀z. (38) The minimizer X in step 4 is obtained by softthresholding the singular values of the matrix A(x) + A0 + Z/ρ: min{p,q} 1 max{0, σi − } ui viT ρ X̂ i=1 (39) where ui , vi , σi are given by a singular value decomposition argmin Lρ (X̂, x, Z) = X 1 A(x) + A0 + Z = ρ min{p,q} X σi ui viT . i=1 The residuals and tolerances in the stopping criterion in step 5 are defined as follows [1]: rp = A(x) + A0 − X rd = ρAadj (Xprev − X) √ p = pq abs + rel max{kA(x)kF , kXkF , kA0 kF } √ d = nabs + rel kAadj (Z)k2 , (40) (41) (42) (43) Typical values for the relative and absolute tolerances are rel = 10−3 and abs = 10−6 . The matrix Xprev in (41) is the value of X in the previous iteration. Instead of a using a fixed penalty parameter ρ, one can vary ρ to improve the speed of convergence. An example of such a scheme is to adapt ρ at the end of each ADMM iteration as follows [8] ρ :=    τρ  ρ/τ   ρ krp kF > µkrd k2 krd k2 > µkrp kF otherwise. This scheme depends on parameters µ > 1, τ > 1 (for example, µ = 10 and τ = 2). Note that varying ρ has an important consequence on the algorithm in Table 4. If ρ is fixed, the coefficient matrix H + ρM in the equation (37) that is solved in step 2 of each iteration is constant throughout the algorithm. Therefore only one costly factorization of H + ρM is required. If we change ρ after step 6, a new factorization of H + ρM is needed before returning to step 3. I is explain in [11] how the extra cost of repeated factorizations can be avoided. 18
3cs.SY
UNIVERSALITY LAWS FOR RANDOMIZED DIMENSION REDUCTION, WITH APPLICATIONS arXiv:1511.09433v3 [math.PR] 17 Sep 2017 SAMET OYMAK AND JOEL A. TROPP A BSTRACT. Dimension reduction is the process of embedding high-dimensional data into a lower dimensional space to facilitate its analysis. In the Euclidean setting, one fundamental technique for dimension reduction is to apply a random linear map to the data. This dimension reduction procedure succeeds when it preserves certain geometric features of the set. The question is how large the embedding dimension must be to ensure that randomized dimension reduction succeeds with high probability. This paper studies a natural family of randomized dimension reduction maps and a large class of data sets. It proves that there is a phase transition in the success probability of the dimension reduction map as the embedding dimension increases. For a given data set, the location of the phase transition is the same for all maps in this family. Furthermore, each map has the same stability properties, as quantified through the restricted minimum singular value. These results can be viewed as new universality laws in high-dimensional stochastic geometry. Universality laws for randomized dimension reduction have many applications in applied mathematics, signal processing, and statistics. They yield design principles for numerical linear algebra algorithms, for compressed sensing measurement ensembles, and for random linear codes. Furthermore, these results have implications for the performance of statistical estimation methods under a large class of random experimental designs. Date: 30 November 2015. Revised 7 August 2017 and 5 September 2017 and 14 September 2017. 2010 Mathematics Subject Classification. Primary: 60D05, 60F17. Secondary: 60B20. Key words and phrases. Conic geometry, convex geometry, dimension reduction, invariance principle, limit theorem, random code, random matrix, randomized numerical linear algebra, signal reconstruction, statistical estimation, stochastic geometry, universality. ii S. OYMAK AND J. A. TROPP C ONTENTS 1. Overview of the Universality Phenomenon 1.1. Randomized Dimension Reduction 1.2. Technical Setting 1.3. A Phase Transition for Uniformly Random Partial Isometries 1.4. Other Types of Random Linear Maps? 1.5. A Universality Law for the Embedding Dimension 1.6. A Universality Law for the Restricted Minimum Singular Value 1.7. Applications of Universality 1.8. The Scope of the Universality Phenomenon 1.9. Reproducible Research 1.10. Roadmap 1.11. Notation 1 1 1 1 2 4 4 5 6 7 7 8 Part I. Main Results 2. Random Matrix Models 2.1. Bounded Random Matrix Model 2.2. Heavy-Tailed Random Matrix Model 3. A Universality Law for the Embedding Dimension 3.1. Embedding Dimension: Problem Formulation 3.2. Some Concepts from Spherical Geometry 3.3. The Statistical Dimension Functional 3.4. Theorem I: Universality of the Embedding Dimension 3.5. Theorem I: Proof Strategy 3.6. Theorem I: Extensions 4. A Universality Law for the Restricted Minimum Singular Value 4.1. Restricted Minimum Singular Value: Problem Formulation 4.2. The Excess Width Functional 4.3. Theorem II: Universality for the Restricted Minimum Singular Value 4.4. Theorem II: Proof Strategy 4.5. Theorem II: Extensions 9 9 9 9 10 11 11 11 13 14 15 15 15 15 16 17 18 Part II. Applications 5. Recovery of Structured Signals from Random Measurements 5.1. The Phase Transition for Sparse Signal Recovery 5.2. Other Signal Recovery Problems 5.3. Complements 6. Decoding with Structured Errors 6.1. Decoding with Sparse Errors 6.2. Other Demixing Problems 7. Randomized Numerical Linear Algebra 7.1. Subspace Embeddings 7.2. Sketching and Least Squares 8. The Prediction Error for LASSO 8.1. The Sparse Linear Model and the LASSO 8.2. Proof of Proposition 8.1 19 19 19 22 22 23 23 26 26 26 28 31 31 33 Part III. Universality of the Restricted Minimum Singular Value: Proofs of Theorem II and Theorem I(a) 36 UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 9. The Restricted Singular Values of a Bounded Random Matrix 9.1. Theorem 9.1: Main Result for the Bounded Random Matrix Model 9.2. Proof of Theorem 9.1(1): Concentration 9.3. Setup for Proof of Theorem 9.1(2) and (3): Dissection of the Index Set 9.4. Proof of Theorem 9.1(2): Lower Bound for the RSV 9.5. Proof of Theorem 9.1(3): Upper Bound for the RSV of a Convex Set 10. The Restricted Singular Values of a Heavy-Tailed Random Matrix 10.1. Corollary 10.1: Main Result for the p-Moment Random Matrix Model 10.2. Proof of Theorem II from Corollary 10.1 10.3. Proof of Theorem I(a) from Corollary 10.1 11. Theorem 9.1: Concentration for Restricted Singular Values 11.1. Proposition 11.1: The Lower Tail of the RSV 11.2. Proposition 11.1: The Upper Tail of the RSV 12. Theorem 9.1: Probability Bounds for Dissections 12.1. Dissection of the Excess Width 12.2. Dissection of the Restricted Singular Value 13. Theorem 9.1: Replacing Most Entries of the Random Matrix 13.1. Proof of Proposition 13.1 13.2. Proposition 13.1: Discretizing the Index Set 13.3. Proposition 13.1: Smoothing the Minimum 13.4. Proposition 13.1: Exchanging the Entries of the Random Matrix 14. Theorem 9.1: Bounding the Restricted Singular Value by the Excess Width 14.1. Proof of Proposition 14.1 14.2. Proposition 14.1: Moment Comparison Inequality for the Hybrid RSV 14.3. Proposition 14.1: The Role of the Gaussian Minimax Theorem 14.4. Proposition 14.1: Reducing the Gaussian Matrix to Some Gaussian Vectors 14.5. Proposition 14.1: Removing the Remaining Part of the Original Random Matrix 14.6. Proposition 14.1: Replacing the Coordinates Missing from the Excess Width 15. Proof of Corollary 10.1 from Theorem 9.1 by Truncation 15.1. Proof of Corollary 10.1 15.2. Corollary 10.1: Truncation of Individual Random Variables Part IV. Universality of the Embedding Dimension: Proof of Theorem I(b) 16. When Embedding Fails for a Bounded Random Matrix 16.1. The RAP Functional: Dual Condition for Failure 16.2. Theorem 16.2: Main Result for the Bounded Random Matrix Model 16.3. Proof of Theorem 16.2: Lower Tail Bound 16.4. Proof of Theorem 16.2: Truncation and Dissection 16.5. Proof of Theorem 16.2: Lower Bound for RAP Functional 17. When Embedding Fails for a Heavy-Tailed Random Matrix 17.1. Corollary 17.1: Main Result for the p-Moment Random Matrix Model 17.2. Proof of Theorem I(b) from Corollary 17.1 17.3. Proof of Proposition 6.1: Application of RAP functional to decoding with structured errors 18. Theorem 16.2: Truncation of the Cone 19. Theorem 16.2: Replacing Most Entries of the Random Matrix 19.1. Proof of Proposition 19.1 19.2. Proposition 19.1: Discretizing the Index Sets 19.3. Proposition 19.1: Smoothing the Minimum 19.4. Proposition 19.1: Exchanging the Entries of the Random Matrix 20. Theorem 16.2: Bounding the RAP Functional by the Excess Width iii 36 36 36 37 37 38 39 39 39 40 41 41 42 43 43 44 45 45 46 47 47 52 53 53 54 57 58 59 59 59 60 63 63 63 63 64 64 64 65 65 66 66 67 68 68 69 69 69 70 iv S. OYMAK AND J. A. TROPP 20.1. 20.2. 20.3. 20.4. Proof of Proposition 20.1 Proposition 20.1: Duality for the RAP Functional Proposition 20.1: Reducing the Gaussian Matrix to Some Gaussian Vectors Proposition 20.1: Finding the Gaussian Width Part V. Back Matter Appendix A. Tools from Gaussian Analysis A.1. Concentration for Gaussian Lipschitz Functions A.2. The Gaussian Minimax Theorem Appendix B. Spectral Bounds for Random Matrices Acknowledgments References 71 71 72 72 79 79 79 79 80 81 81 L IST OF F IGURES 1.1 Geometry of a Random Linear Map 2 1.2 Universality of the Embedding Dimension 3 1.3 Geometry of the Restricted Minimum Singular Value 4 1.4 Universality of the Restricted Minimum Singular Value 5 1.5 Non-Universality of the `1 Restricted Minimum Singular Value 7 1.6 Non-Universality of the Restricted Maximum Singular Value 8 5.1 Universality of the `1 Recovery Phase Transition 20 6.1 Universality of the `1 Decoding Phase Transition 24 8.1 Universality of the LASSO Prediction Error 32 UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 1 1. O VERVIEW OF THE U NIVERSALITY P HENOMENON This paper concerns a fundamental question in high-dimensional stochastic geometry: (Q1) Is it likely that a random subspace of fixed dimension does not intersect a given set? This problem has its roots in the earliest research on spherical integral geometry [San52, San76], and it also arises in asymptotic convex geometry [Gor88]. In recent years, this question has attracted fresh attention [Don06c, RV08, Sto09, DT09b, CRPW12, ALMT14, Sto13, MT13, OH13, OTH13, TOH15, TAH15] because it is central to the analysis of randomized dimension reduction. This paper establishes that a striking universality phenomenon takes place in the stochastic geometry problem (Q1). For a given set, the answer to this question is essentially the same for every distribution on random subspaces that is induced by a natural model for random linear maps. Universality also manifests itself in metric variants of (Q1), where we ask how far the random subspace lies from the set. We discuss the implications of these results in high-dimensional geometry, random matrix theory, numerical analysis, optimization, statistics, signal processing, and beyond. 1.1. Randomized Dimension Reduction. Dimension reduction is the operation of mapping a set from a large space into a smaller space. Ideally, this action distills the “information” in the set, and it allows us to develop more efficient algorithms for processing that information. In the setting of Euclidean spaces, a fundamental method for dimension reduction is to apply a random linear map to each point in the set. It is important that the random linear map preserve geometric features of the set. In particular, we do not want the linear map to map a point in the set to the origin. Equivalently, the null space of the random linear map should not intersect the set. We see that (Q1) emerges naturally in the context of randomized dimension reduction. 1.2. Technical Setting. Let us introduce a framework in which to study this problem. It is natural to treat (Q1) as a question in spherical geometry because it is scale invariant. Fix the ambient dimension D, and consider a closed subset Ω of the Euclidean unit sphere in RD . For the moment, we also assume that Ω is spherically convex; that is, Ω is the intersection of a convex cone1 with the unit sphere. Construct a random linear map Π : RD → Rd , where the embedding dimension d does not exceed the ambient dimension D. As we vary the distribution of the random linear map Π, the map Π 7→ null(Π) induces different distributions on the subspaces in RD with codimension at most d . We may now reformulate (Q1) in this language: (Q2) For a given embedding dimension d , what is the probability that Ω ∩ null(Π) = ;? Equivalently, what is the probability that 0 ∉ Π(Ω)? We say that the random projection succeeds when 0 ∉ Π(Ω). Conversely, when 0 ∈ Π(Ω), we say that the random projection fails. See Figure 1.1 for an illustration. We have the intuition that, for a fixed choice of Ω, the projection is more likely to succeed as the embedding dimension d increases. Furthermore, a random linear map Π with fixed embedding dimension d is less likely to succeed as the size of the set increases. We will justify these heuristics in complete detail. 1.3. A Phase Transition for Uniformly Random Partial Isometries. We begin with a case where the literature already contains a comprehensive answer to the question (Q2). The most natural type of random embedding is a uniformly random partial isometry. That is, Π : RD → Rd is a partial isometry2 whose null space, null(Π), is drawn uniformly at random from the Haar measure on the Grassmann manifold of subspaces in RD with codimension d . The invariance properties of the distribution of Π allow for a complete analysis of its action on Ω, the spherically convex set [SW08, Chap. 6.5]. Recent research [ALMT14, MT14a, GNP14] has shown how to convert the complicated exact formulas into interpretable results. 1A convex cone is a convex set K that satisfies αK = K for all α > 0. 2A partial isometry Π satisfies the condition ΠΠ∗ = I, where ∗ is the transpose operation and I is the identity map. 2 S. OYMAK AND J. A. TROPP range(P ) Ω Ω range(P ) P (Ω) P (Ω) null(P ) null(P ) F IGURE 1.1: Geometry of a Random Linear Map. We can identify a linear map Π : RD → Rd with an orthogonal projector P : RD → RD whose range is the orthogonal complement of null(Π). In this diagram, P : R2 → R2 is a random orthogonal projector applied to a closed, spherically convex set Ω. The likelihood of a given configuration depends on the statistical dimension δ(Ω) of the set. L EFT: Success Regime. The null space, null(P ), does not intersect Ω, and the image P (Ω) does not contain the origin. R IGHT: Failure Regime. The null space, null(P ), intersects the set Ω, and the image P (Ω) contains the origin. The modern theory is expressed in terms of a geometric functional δ(Ω), called the statistical dimension: ·µ ¶2 ¸ δ(Ω) := E max g · t , where g is NORMAL(0, I). t ∈Ω + The statistical dimension is increasing with respect to set inclusion, and its values range from zero (for the empty set) up to D (for the whole sphere). Furthermore, the functional can be computed accurately in many cases of interest. See Section 3.3 for more details. The statistical dimension demarcates a phase transition in the behavior of a uniformly random partial isometry Π as the embedding dimension d varies. For a closed, spherically convex set Ω, the results [ALMT14, Thm. I and Prop. 10.2] demonstrate that p d ≤ δ(Ω) − C δ(Ω) implies 0 ∈ Π(Ω) with high probability; (1.1) p d ≥ δ(Ω) + C δ(Ω) implies 0 ∉ Π(Ω) with high probability. The number C is a positive universal constant. In other terms, a uniformly random projection Π(Ω) of a spherically convex set Ω is likely to succeed precisely when the embedding dimension d is larger than the statistical dimension δ(Ω). See Figure 1.2 for a plot of the exact probability that a uniformly random partial isometry annihilates a point in a specific set Ω. Remark 1.1 (Related Work). The results [ALMT14, Thm. 7.1] and [MT13, Thm. A] contain good bounds for the probabilities in (1.1). The probabilities can be approximated more precisely by introducing a second geometric functional [GNP14]. These estimates depend on the spherical Crofton formula [SW08, Eqns. (6.62), (6.63)], which gives the exact probabilities in a less interpretable form. Related phase transition results can also be obtained via the Gaussian Minimax Theorem; see [Gor88, Cor. 3.4], [ALMT14, Rem. 2.9], [Sto13], or [TOH15, Thm. II.1]. See [TH15] for other results on uniformly random partial isometries. 1.4. Other Types of Random Linear Maps? The research outlined in Section 1.3 delivers a complete account of how a uniformly random partial isometry behaves in the presence of some convexity. In UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 3 Probability of Success, Random Embedding of Nonnegative Unit Vectors in R 64 1 0.9 Probability of Success 0.8 Uniformly Random (theory) Rademacher (empirical) 20% Nonzero Rademacher (empirical) Student t with 5 dof (empirical) 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 20 25 30 35 Embedding Dimension (d) 40 45 F IGURE 1.2: Universality of the Embedding Dimension. This plot describes the behavior of four types of random linear maps applied to the set Ω of unit vectors with nonnegative coordinates: Ω := {t ∈ R64 : kt k = 1, t i ≥ 0}. The dashed line marks the statistical dimension of the set: δ(Ω) = 32. The gray curve interpolates the exact probability that a uniformly random partial isometry Π : R64 → Rd succeeds (i.e., 0 ∉ Π(Ω)) as a function of the embedding dimension d . The markers indicate the empirical probability (over 100 trials) that dimension reduction succeeds for a random linear map with the specified distribution. See Sections 1.4 and 1.9 for further details. contrast, the literature contains almost no precise information about the behavior of other random linear maps. Nevertheless, in applications, we may prefer—or be forced—to work with other types of random linear maps. Here is a motivating example. Many algorithms for numerical linear algebra now depend on randomized dimension reduction. In this context, uniformly random partial isometries are expensive to construct, to store, and to perform arithmetic with. It is more appealing to implement a random linear map that is discrete, or sparse, or structured. The lack of detailed theoretical information about how these linear maps behave makes it difficult to design numerical methods with guaranteed performance. We can, however, use computation to investigate the behavior of other types of random linear maps. Figure 1.2 presents the results of the following experiment. Consider the set Ω of unit vectors in R64 with nonnegative coordinates: © ª Ω := t ∈ R64 : kt k = 1 and t i ≥ 0 for i = 1, . . . , 64 . According to (3.6), below, the statistical dimension δ(Ω) = 32, so the formula (1.1) tells us to expect a phase transition in the behavior of a uniformly random partial isometry when the embedding dimension d = 32. Using [ALMT14, Ex. 5.3 and Eqn. (5.10)], we can compute the exact probability that a uniformly random partial isometry Π : R64 → Rd succeeds as a function of d . Against this baseline, we compare the empirical probability (over 100 trials) that a random linear map with independent Rademacher3 entries succeeds. We also display experiments for a 20% nonzero Rademacher linear map and for a linear map with Student t 5 entries. See Section 1.9 for more details. From this experiment, we discover that all three linear maps act almost exactly the same way as a uniformly random partial isometry! This universality phenomenon is remarkable because the four 3A Rademacher random variable takes the two values ±1 with equal probability. 4 S. OYMAK AND J. A. TROPP null(P ) E range(P ) σmin (P ; E ) P (E ) F IGURE 1.3: Geometry of the Restricted Minimum Singular Value. We can identify a partial unitary linear map Π : RD → Rd with an orthogonal projector P : RD → RD whose range is the orthogonal complement of null(Π). In this diagram, P : R2 → R2 is an orthogonal projector applied to a compact convex set E . The restricted minimum singular value σmin (P ; E ) is the distance from the origin to the image P (E ). linear maps have rather different distributions. At present, the literature contains no information about when—or why—this phenomenon occurs. 1.5. A Universality Law for the Embedding Dimension. The central goal of this paper is to show that there is a substantial class of random linear maps for which the phase transition in the embedding dimension is universal. Here is a rough statement of the main result. Let Ω be a closed, spherically convex set in RD . Suppose that the entries of the matrix of the random linear map Π : RD → Rd are independent, standardized,4 and symmetric,5 with a modest amount of regularity.6 In particular, we may consider random linear maps that have an arbitrarily small, but constant, proportion of nonzero entries. For this class of random linear maps, we will demonstrate that d ≤ δ(Ω) − o(D) implies 0 ∈ Π(Ω) with high probability; d ≥ δ(Ω) + o(D) implies 0 ∉ Π(Ω) with high probability. (1.2) The little-o notation suppresses constants that depend only on the regularity of the random variables that populate Π. See Theorem I in Section 3.4 for a more complete statement. The result (1.2) states that a random linear map Π is likely to succeed for a spherically convex set Ω precisely when the embedding dimension d exceeds the statistical dimension δ(Ω) of the set. We learn that the phase transition in the embedding dimension is universal over our class of random linear maps, provided that Ω is not too small as compared with the ambient dimension D. Note that a random linear map Γ : RD → Rd with standard normal entries has the same behavior as a d × D uniformly random partial isometry because, almost surely, the null space of Γ is a uniformly random subspace of RD with codimension d . This analysis explains the dominant features of the experiment in Figure 1.2! 1.6. A Universality Law for the Restricted Minimum Singular Value. It is also a matter of significant interest to understand the stability of randomized dimension reduction. We quantify the stability of the random linear map Π : RD → Rd on a compact, convex set E in RD using the restricted minimum singular value: σmin (Π; E ) := min kΠt k . t ∈E 4A standardized random variable has mean zero and variance one. 5A symmetric random variable X has the same distribution as its negation −X . 6 For concreteness, we may assume that the entries of Π have five uniformly bounded moments. UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 5 Restricted Minimum Singular Value Restricted Minimum Singular Value, Random Embedding of Probability Simplex in R 0.5 64 d-Excess Width (asymptotic theory) Rademacher (empirical) 20% Nonzero Rademacher (empirical) Student t with 5 dof (empirical) 0.4 0.3 0.2 0.1 0 20 25 30 35 40 45 Embedding Dimension (d) 50 55 60 F IGURE 1.4: Universality of the Restricted Minimum Singular Value. This plot describes the behavior of P three types of random linear maps applied to the probability simplex ∆64 := {t ∈ R64 : i t i = 1, t i ≥ 0}. The dashed line marks the minimum dimension d = 32 where uniformly random¡embedding of the set ∆64 ¢ is likely to succeed. The gray curve interpolates the value of the positive part Ed (∆64 ) + of the d -excess width of ∆64 , obtained from the asymptotic calculation (4.4). The markers give an empirical estimate (over 100 trials) for the restricted minimum singular value σmin (Π; ∆64 ) of a random linear map Π : R64 → Rd drawn from the specified distribution. See Section 1.9 for more information. When the restricted minimum singular value σmin (Π; E ) is large, the random image Π(E ) is far from the origin, so the embedding is very stable. That is, we can deform either the linear map Π or the set E and still be sure that the embedding succeeds. When the restricted minimum singular value is small, the random dimension reduction map is unstable. When it is zero, the random dimension reduction map fails. See Figure 1.3 for a diagram. Our second major theorem is a universality law for the restricted minimum singular values of a random linear map. This result is expressed using a geometric functional Ed (E ), called the d -excess width of E : ¢ ¡p Ed (E ) := E min d kt k + g · t , where g is NORMAL(0, I). t ∈E The d -excess width increases p with the parameter d , and it decreases with respect to set inclusion. The typical scale of Ed (E ) is O( d ). In addition, the excess width can be evaluated precisely in many situations of interest. See Section 4.2 for more details. Now, suppose that the entries of the matrix of Π : RD → Rd are independent, standardized, and symmetric, with a modest amount of regularity. For a compact, convex subset E of the unit ball in RD , we will establish that p ¡ ¢ σmin (Π; E ) = Ed (E ) + + o( d ) with high probability. (1.3) The little-o notation suppresses constants that depend only on the regularity of the random variables. Theorem II in Section 4.3 contains a more detailed statement of (1.3). In summary, provided that the set E is not too small, the restricted minimum singular value σmin (Π; E ) depends primarily on the geometry of the set E and the embedding dimension d , rather than on the distribution of the random linear map Π. See Figure 1.4 for a numerical illustration of this fact. 1.7. Applications of Universality. Randomized dimension reduction and, more generally, random matrices have become ubiquitous in the information sciences. As a consequence, the universality laws that we outlined in Section 1.5 and 1.6 have a wide range of implications. 6 S. OYMAK AND J. A. TROPP Signal Processing: The main idea in the field of compressed sensing is that we can acquire information about a structured signal by taking random linear measurements. The literature contains extensive empirical evidence that many types of random measurements behave in an indistinguishable fashion. Our work gives the first explanation of this phenomenon. (Section 5) Stochastic Geometry: Our results also indicate that the facial structure of the convex hull of independent random vectors, drawn from an appropriate class, does not depend heavily on the distribution. (Section 5.3.1) Coding Theory: Random linear codes provide an efficient way to protect transmissions against error. We demonstrate that a class of random codes is resilient against sparse corruptions. The number of errors that can be corrected does not depend on the specific choice of codebook. (Section 6) Numerical Analysis: Our research provides an engineering design principle for numerical algorithms based on randomized dimension reduction. We can select the random linear map that is most favorable for implementation and still be confident about the detailed behavior of the algorithm. This approach allows us to develop efficient numerical methods that also have rigorous performance guarantees. (Section 7) Random Matrix Theory: Our work leads to a new proof of the Bai–Yin law for the minimum singular value of a random matrix with independent entries. (Section 7.1) High-Dimensional Statistics: The LASSO is a widely used method for performing regression and variable selection. We demonstrate that the prediction error associated with a LASSO estimator is universal across a large class of random designs and statistical error models. We also show that leastabsolute-deviation (LAD) regression can correct a small number of arbitrary statistical errors for a wide class of random designs. (Section 8 and Remark 6.2) Neuroscience: Our universality laws may even have broader scientific significance. It has been conjectured, with some experimental evidence, that the brain may use dimension reduction to compress information [GG15]. Our universality laws suggest that many types of uncoordinated (i.e., random) activity lead to dimension reduction methods with the same behavior. This result indicates that the hypothesis of neural dimensionality reduction may be biologically plausible. 1.8. The Scope of the Universality Phenomenon. The universality phenomenon developed in this paper extends beyond the results that we establish, but there are some (apparently) related problems where universality does not hold. Let us say a few words about these examples and non-examples. First, it does not appear important that the random linear map Π has independent entries. There is extensive evidence that structured random linear maps also have some universality properties; for example, see [DT09a]. Second, the restricted minimum singular value is not the only type of functional where universality is visible. For instance, suppose that f is a convex, Lipschitz function. Consider the quantity ¡ ¢ min kΠt k2 + f (t ) . t ∈E Optimization problems of this form play a central role in contemporary statistics and machine learning. It is likely that the value of this optimization problem is universal over a wide class of random linear maps. Furthermore, we believe that our techniques can be adapted to address this question. On the other hand, geometric functionals involving non-Euclidean norms need not exhibit universality. Consider the `1 restricted minimum singular value (1.4) min kΠt k`1 . t ∈E There are nontrivial sets E where the value of the optimization problem (1.4) varies a lot with the choice of the random linear map Π. For instance, let e1 ∈ RD be the first standard basis vector, and define the shifted Euclidean ball © ª E α := t ∈ RD : kt − e1 k ≤ α for 0 ≤ α ≤ 1. UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 7 l1 Restricted Minimum Singular Value, Random Embedding of Shifted Euclidean Ball in R Rademacher (empirical) Gaussian (empirical) Student t with 5 dof (empirical) 20% Nonzero Rademacher (empirical) 20 l1 Restricted Minimum Singular Value 64 15 10 5 0 0 10 20 30 40 Embedding Dimension (d) 50 60 F IGURE 1.5: Non-Universality of the `1 Restricted Minimum Singular Value. This plot describes the behavior of four types of random linear maps applied to the set E 1/2 := {t ∈ R64 : kt − e1 k ≤ 1/2}, where e1 is the first standard basis vector. The dashed line stands at the phase transition d ≈ 16 for the embedding dimension of the set E 1/2 . The markers give an empirical estimate (over 100 trials) for the `1 restricted minimum singular value mint ∈E 1/2 kΠt k`1 of a random linear map Π : R64 → Rd with the specified distribution as a function of the embedding dimension d . See Section 1.9 for more details. Using Theorem I and the calculation [ALMT14, Sec. 3.4] of the statistical dimension of a circular cone, we can verify that there is a universal phase transition for successful embedding of the set E α when the embedding dimension d = α2 D + O(1). The result (1.3) implies that the minimum restricted singular value of E α also takes a universal value. At the same time, Figure 1.5 illustrates that the functional (1.4) is not universal for the set E α . Finally, functionals involving maximization do not necessarily exhibit universality. The restricted maximum singular value is defined as σmax (Π; E ) := max kΠt k . t ∈E It is not hard to produce examples where the restricted maximum singular value depends on the choice of the random matrix Π. For instance, Figure 1.6 demonstrates that the random linear map Π has a substantial impact on the maximum singular value σmax (Π; ∆D ) restricted to the probability simplex ∆D in RD . This observation may surprise researchers in random matrix theory because the ordinary maximum singular value is universal over the class of random matrices with independent entries [BS10, Thm. 3.10]. 1.9. Reproducible Research. This paper is accompanied by MATLAB code [Tro15a] that reproduces each figure from stored data. This software can also repeat the numerical experiments to obtain new instances of each figure. By modifying the parameters in the code, the reader may explore how changes affect the universality phenomenon. We omit meticulous descriptions of the numerical experiments from the text because these recitations are tiresome for the reader and the code offers superior documentation. 1.10. Roadmap. This paper is divided into five parts. Part I offers a complete presentation of our universality laws, some comments about the proofs, and some prospects for further research. Part II outlines the applications of universality in several disciplines, and it contains more empirical confirmation of our analysis. Part III presents the proof that the restricted minimum singular value exhibits universal 8 S. OYMAK AND J. A. TROPP Restricted Maximum Singular Value Restricted Maximum Singular Value, Random Embedding of Probability Simplex in R64 10 8 6 4 Student t with 5 dof (empirical) 20% Nonzero Rademacher (empirical) Gaussian (empirical) Rademacher (empirical) 2 0 0 10 20 30 40 Embedding Dimension (d) 50 60 F IGURE 1.6: Non-Universality of the Restricted Maximum Singular Value. This plot describes the behavior P of four types of random linear maps applied to the probability simplex ∆64 := {t ∈ R64 : i t i = 1, t i ≥ 0}. The markers give an empirical estimate (over 100 trials) for the restricted maximum singular value σmax (Π; ∆64 ) of a random linear map Π : R64 → Rd with the specified distribution. See Section 1.9 for more details. behavior; this argument also yields the condition in which randomized embedding is likely to succeed. Part IV contains the proof of the condition in which randomized embedding is likely to fail. Finally, Part V includes background results, the acknowledgments, and the list of works cited. 1.11. Notation. Let us summarize our notation. We use italic lowercase letters (for example, a) for scalars, boldface lowercase letters (a) for vectors, and boldface uppercase letters (A) for matrices. Uppercase italic letters (A) may denote scalars, sets, or random variables, depending on the context. Roman letters (c, C) denote universal constants that may change from appearance to appearance. We sometimes delineate specific constant values with subscripts (Crad ). Given a vector a and a set J of indices, we write a J for the vector restricted to those indices. In particular, a j is the j th coordinate of the vector. Given a matrix A and sets I and J of row and column indices, we write A I J for the submatrix indexed by I and J . In particular, a i j is the component in the (i , j ) position of A. If there is a single index A J , it always refers to the column submatrix indexed by J . We always work in a real Euclidean space. The symbol Bn is the unit ball in Rn , and Sn−1 is the unit sphere in Rn . The unadorned norm k·k refers to the `2 norm of a vector or the `2 operator norm of a matrix. We use the notation s · t for the standard inner product of vectors s and t with the same length. We write ∗ for the transpose of a vector or a matrix. For a real number a, we define the positive-part and negative-part functions: (a)+ := max{a, 0} and (a)− := max{−a, 0}. These functions bind before powers, so (a)2+ is the square of the positive part of a. The symbols E and Var refer to the expectation and variance of a random variable, and P {·} returns the probability of an event. We use the convention that powers bind before the expectation, so E X 2 returns the expectation of the square. We write 1 A for the 0–1 indicator random variable of the event A. A standardized random variable has mean zero and variance one. A symmetric random variable X has the same distribution as its negation −X . We reserve the letter γ for a standard normal random variable; the boldface letters γ, g , h are always standard normal vectors; and Γ is a standard normal matrix. The dimensions are determined by context. UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 9 Part I. Main Results This part of the paper introduces two new universality laws, one for the phase transition in the embedding dimension and a second one for the restricted minimum singular values of a random linear map. We also include some high-level remarks about the proofs, but we postpone the details to Parts III and IV. In Section 2, we introduce two models for random linear maps that we use throughout the paper. Section 3 presents the universality result for the embedding dimension, and Section 4 presents the result for restricted singular values. 2. R ANDOM M ATRIX M ODELS To begin, we present two models for random linear maps that arise in our study of universality. One model includes bounded random matrices with independent entries, while the second allows random matrices with heavy-tailed entries. 2.1. Bounded Random Matrix Model. Our first model contains matrices whose entries are uniformly bounded. This model is useful for some applications, and it plays a central role in the proofs of our universality results. Model 2.1 (Bounded Matrix Model). Fix a parameter B ≥ 1. A random matrix in this model has the following properties: • • • • Independence. The entries are stochastically independent random variables. Standardization. Each entry has mean zero and variance one. Symmetry. Each entry has a symmetric distribution. Boundedness. Each entry X of the matrix is uniformly bounded: |X | ≤ B . Identical distribution of entries is not required. In some cases, which we will note, the symmetry requirement can be dropped. This model includes several types of random matrices that appear frequently in practice. Example 2.2 (Rademacher Matrices). Consider a random matrix whose entries are independent, Rademacher random variables. This type of random matrix meets the requirements of Model 2.1 with B = 1. Rademacher matrices provide the simplest example of a random linear map. They are appealing for many applications because they are discrete. Example 2.3 (Sparse Rademacher Matrices). Let α ∈ (0, 1] be a thinning parameter. Consider a random variable X with distribution  −1/2 , with probability α/2;  +α X= −α−1/2 , with probability α/2;   0, otherwise. A random matrix whose entries are independent copies of X satisfies Model 2.1 with B = α−1/2 . These random matrices are useful because we can control the sparsity. 2.2. Heavy-Tailed Random Matrix Model. Next, we introduce a more general class of random matrices that includes heavy-tailed examples. Our main results concern random linear maps from this model. Model 2.4 (p-Moment Model). Fix parameters p > 4 and ν ≥ 1. A random matrix in this model has the following properties: • • • • Independence. The entries are stochastically independent random variables. Standardization. Each entry has mean zero and variance one. Symmetry. Each entry has a symmetric distribution. Bounded Moments. Each entry X has a uniformly bounded pth moment: E |X |p ≤ νp . Identical distribution of entries is not required. 10 S. OYMAK AND J. A. TROPP Model 2.4 subsumes Model 2.1, but it also encompasses many other types of random matrices. Example 2.5 (Gaussian Matrices). Consider an m × n random matrix Γ whose entries are independent, standard normal random variables. The matrix Γ satisfies the requirements of Model 2.4 for each p > 4 p with ν ≤ p. In some contexts, we can use a Gaussian random matrix to study the behavior of a uniformly random partial isometry. Indeed, the null space, null(Γ), of the standard normal matrix is a uniformly random subspace of Rn with codimension min{m, n}, almost surely. Model 2.4 contains several well-studied classes of random matrices. Example 2.6 (Subgaussian Matrices). Suppose that the entries of the random matrix are independent, and each entry X is symmetric, standardized, and uniformly subgaussian. That is, there is a parameter α > 0 where ¡ ¢1/p p E |X |p ≤ α p for all p ≥ 1. p These matrices are included in Model 2.4 for each p > 4 with ν ≤ α p. Rademacher, sparse Rademacher, and Gaussian matrices fall in this category. Example 2.7 (Log-Concave Entries). Suppose that the entries of the random matrix are independent, and each entry X is a symmetric, standardized, log-concave random variable. Recall that a real log-concave random variable X has a density f of the form f (x) := 1 −h(x) e Z where h : R → R is convex and Z is a normalizing constant. It can be shown [BGVV14, Thm. 2.4.6] that these matrices are included in Model 2.4 for any p > 4. In contrast with most research on randomized dimension reduction, we allow the random linear map to have entries with heavy tails. Here is one such example. Example 2.8 (Student t Matrices). Suppose that each entry of the random matrix is an independent Student t random variable with α degrees of freedom, for α > 4. This matrix also follows Model 2.4 for each p < α. Finally, we present a general construction that takes a matrix from Model 2.4 and produces a sparse matrix that also satisfies the model, albeit with a larger value of the parameter ν. Example 2.9 (Sparsified Random Matrix). Let Φ be a random matrix that satisfies Model 2.4 for some value p > 4 and ν ≥ 1. Let α ∈ (0, 1] be a thinning parameter, and construct a new random matrix Φ(α) whose entries ϕ(α) are independent random variables with the distribution ij ϕ(α) ij = ( α−1/2 ϕi j , with probability α 0, with probability 1 − α. Then the sparsified random matrix Φ(α) still follows Model 2.4 with the same value of p and with a modified value ν0 of the other parameter: ν0 = α−1/p ν. 3. A U NIVERSALITY L AW FOR THE E MBEDDING D IMENSION In this section, we present detailed results which show that, for a large class of sets, the embedding dimension is universal over a large class of linear maps. UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 11 3.1. Embedding Dimension: Problem Formulation. Let us begin with a more rigorous statement of the problem. • Fix the ambient dimension D. • Let E be a nonempty, compact subset of RD that does not contain the origin. • Let Π : RD → Rd be a random linear map with embedding dimension d . We are interested in understanding the probability that the random projection Π(E ) does not contain the origin. That is, we want to study the following predicate: 0 ∉ Π(E ) or, equivalently, E ∩ null(Π) = ;. (3.1) We say that the random projection succeeds when the property (3.1) holds; otherwise, the random projection fails. Our goal is to argue that there is a large class of sets and a large class of random linear maps where the probability that (3.1) holds depends primarily on the choice of the embedding dimension d and an appropriate measure of the size of the set E . In particular, the probability does not depend significantly on the distribution of the random linear map Π. 3.2. Some Concepts from Spherical Geometry. The property (3.1) does not reflect the scale of the points in the set E . As a consequence, it is appropriate to translate the problem into a question about spherical geometry. We begin with a definition. Definition 3.1 (Spherical Retraction). The spherical retraction map θ : RD → RD is defined as ( t / kt k , t 6= 0 θ(t ) := 0, t = 0. For every set E in RD , we have the equivalence 0 ∉ Π(E ) if and only if 0 ∉ Π(θ(E )). (3.2) Therefore, we may pass to the spherical retraction θ(E ) of the set E without loss of generality. To obtain a complete analysis of when random projection succeeds or fails, we must restrict our attention to sets that have a convexity property. Definition 3.2 (Spherical Convexity). A nonempty subset Ω of the unit sphere in RD is spherically convex when the pre-image θ −1 (Ω) ∪ {0} is a convex cone. By convention, the empty set is also spherically convex. In particular, suppose that T is a compact, convex set that does not contain the origin. Then the retraction θ(T ) is compact and spherically convex. Next, we introduce a polarity operation for spherical sets that supports some crucial duality arguments. Definition 3.3 (Spherical Polarity). Let Ω be a subset of the unit sphere SD−1 in RD . The polar of Ω is the set © ª Ω◦ := x ∈ SD−1 : x · t ≤ 0 for all t ∈ Ω . By convention, the polar of the empty set is the whole sphere: ;◦ := SD−1 . This definition is simply the spherical analog of polarity for cones. It can be verified that Ω◦ is always closed and spherically convex. Furthermore, the polarity operation is an involution on the class of closed, spherically convex sets in SD−1 . 3.3. The Statistical Dimension Functional. We have the intuition that, for a given compact subset E of RD , the probability that a random linear map Π : RD → Rd succeeds decreases with the “content” of the set E . In the present context, the correct notion of content involves a geometric functional called the statistical dimension. 12 S. OYMAK AND J. A. TROPP Definition 3.4 (Statistical Dimension). Let Ω be a nonempty subset of the unit sphere in RD . The statistical dimension δ(Ω) is defined as h³ ´2 i δ(Ω) := E sup g · t (3.3) t ∈Ω + In addition, define δ(;) := 0. We extend the statistical dimension to a general subset T in RD using the spherical retraction: δ(T ) := δ(θ(T )). (3.4) D Recall that the random vector g ∈ R has the standard normal distribution. The statistical dimension has a number of striking properties. We include a short summary; see [ALMT14, Prop. 3.1] and the citations there for further information. • For a set T in RD , the statistical dimension δ(T ) takes values in the range [0, D]. • The statistical dimension is increasing with respect to set inclusion: S ⊂ T implies that δ(S) ≤ δ(T ). • The statistical dimension agrees with the linear dimension on subspaces: δ(L) = dim(L) for each subspace L in RD . • The statistical dimension interacts nicely with polarity: δ(Ω◦ ) = D − δ(Ω) for each spherically convex set Ω ∈ RD . (3.5) The same relation holds if we replace Ω by a convex cone K in RD and use conic polarity. As a specific example of (3.5), we can evaluate the statistical dimension of the nonnegative orthant RD +. Indeed, the orthant is a self-dual cone, so δ(RD + ) = D/2. (3.6) There is also powerful machinery, developed in [Sto09, OH10, CRPW12, ALMT14, FM14], for computing the statistical dimension of a descent cone of a convex function. Finally, we mention that the statistical dimension can often be evaluated by sampling Gaussian vectors and approximating the expectation in (3.3) with an empirical average. Remark 3.5 (Gaussian Width). The statistical dimension is related to the Gaussian width functional. For a bounded set T in RD , the Gaussian width W (T ) is defined as W (T ) := E sup g · t . (3.7) t ∈T For a subset Ω of the unit sphere in RD , we have the inequalities W 2 (Ω) ≤ δ(Ω) ≤ W 2 (Ω) + 1. (3.8) See [ALMT14, Prop. 10.3] for a proof. The relation (3.8) allows us to pass between the squared width and the statistical dimension. The Gaussian width of a set is closely related to its mean width [Ver15, Sec. 1.3.5]. The mean width is a canonical functional in the Euclidean setting [Gru07, Sec. 7.3], but it is not quite the right choice for spherical geometry. We have chosen to work with the statistical dimension because it has many geometric properties that the width lacks in the spherical setting. Remark 3.6 (Convex Cones). The papers [ALMT14, MT14a] define the statistical dimension of a convex cone using intrinsic volumes. It can be shown that the statistical dimension is the canonical (additive, continuous) extension of the linear dimension to the class of closed convex cones [ALMT14, Sec. 5.6]. Our general definition (3.4) agrees with the original definition on this class. UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 13 3.4. Theorem I: Universality of the Embedding Dimension. We are now prepared to state our main result on the probability that a random linear map succeeds or fails for a given set. Theorem I (Universality of the Embedding Dimension). Fix the parameters p > 4 and ν ≥ 1 for Model 2.4. Choose parameters % ∈ (0, 1) and ε ∈ (0, 1). There is a number N := N (p, ν, %, ε) for which the following statement holds. Suppose that • • • • The ambient dimension D ≥ N . E is a nonempty, compact subset of RD that does not contain the origin. The statistical dimension of E is proportional to the ambient dimension: δ(E ) ≥ %D. The d × D random linear map Π obeys Model 2.4 with parameters p and ν. Then d ≥ (1 + ε) δ(E ) implies P {0 ∉ Π(E )} ≥ 1 − Cp D 1−p/4 . (a) Furthermore, if θ(E ) is spherically convex, then d ≤ (1 − ε) δ(E ) implies P {0 ∈ Π(E )} ≥ 1 − Cp D 1−p/4 . (b) The constant Cp depends only on the parameter p in the random matrix model. Section 3.5 summarizes our strategy for establishing Theorem I. The detailed proof of Theorem I(a) appears in Section 10.3; the detailed proof of Theorem I(b) appears in Section 17.2. Let us mention that stronger probability bounds hold when the random linear map is drawn from Model 2.1. For any random linear map Π drawn from Model 2.4, Theorem I(a) ensures that the random dimension reduction Π(E ) is likely to succeed when the embedding dimension d exceeds the statistical dimension δ(E ). Similarly, Theorem I(b) shows that Π(E ) is likely to fail when the embedding dimension d is smaller than the statistical dimension δ(E ), provided that θ(E ) is spherically convex. Note that both of these interpretations require that the statistical dimension δ(E ) is not too small as compared with the ambient dimension D. We have already seen a concrete example of Theorem I at work. In view of the calculation (3.6) of the statistical dimension of the orthant, the theorem provides a satisfying explanation of Figure 1.2! Remark 3.7 (Prior Work). When the random linear map Π is Gaussian, the result Theorem I(a) follows from Gordon [Gor88, Cor. 3.4], while the conclusion (b) seems to be more recent [ALMT14, Thm. I]. To our knowledge, the literature contains no precedent for Theorem I for general sets and for non-Gaussian linear maps. We can identify only a few sporadic special cases. Donoho & Tanner [DT10] studied the problem of recovering a “saturated vector” from random measurements via `∞ minimization. Their work can be interpreted as a statement about random embeddings of the set of unit vectors with nonnegative coordinates. They demonstrate that the phase transition in the embedding dimension is universal when the rows of the linear map matrix are independent, symmetric random vectors with a density; this result actually follows from classical work of Schäfli [Sch50] and Wendel [Wen62]. Let us emphasize that this result does not apply to discrete random linear maps. Bayati et al. [BLM15] have studied the problem of recovering a sparse vector from random measurements via `1 minimization. Their work can be interpreted as a result on the embedding dimension of the set of descent directions of the `1 norm at a sparse vector. They showed that, asymptotically, the phase transition in the embedding dimension is universal. Their result requires the linear map matrix to contain independent, subgaussian entries that are absolutely continuous with respect to the Gaussian density. See Section 5.1 for more discussion of this result. There are also many papers in asymptotic convex geometry and mathematical signal processing that contain theory about the order of the embedding dimension for linear maps from Model 2.4; see [MPTJ07, Men10, Men14, Tro15b, Ver15]. These results do not allow us to reach any conclusions about the existence of a phase transition or its location. There is also an extensive amount of empirical work, such as [DT09a, 14 S. OYMAK AND J. A. TROPP Sto09, OH10, CSPW11, DGM13, MT14b], that suggests that phase transitions are ubiquitous in highdimensional signal processing problems, but there has been no theoretical explanation of the universality phenomenon until now. 3.5. Theorem I: Proof Strategy. The proof of Theorem I depends on converting the geometric question to an analytic problem. First, recall the equivalence (3.2), which allows us to pass from the compact set E to its spherical retraction Ω := θ(E ). Next, we identify two analytic quantities that determine whether a linear map annihilates a point in the set Ω. Proposition 3.8 (Analytic Conditions for Embedding). Let Ω be a nonempty, closed subset of the unit sphere SD−1 in RD , and let A : RD → Rd be a linear map. Then min kAt k > 0 implies 0 ∉ A(Ω). t ∈Ω (3.9) Furthermore, if Ω is spherically convex and cone(Ω) is not a subspace, min min kt k=1 s∈cone(Ω◦ ) ks − A ∗ t k > 0 implies 0 ∈ A(Ω). (3.10) Finally, if cone(Ω) is a subspace, select an arbitrary subset Ω0 ⊂ Ω with the property that cone(Ω0 ) is a (dim(Ω) − 1)-dimensional subspace. Then min min kt k=1 s∈cone(Ω◦0 ) ks − A ∗ t k > 0 implies 0 ∈ A(Ω). (3.11) Recall that cone(S) is the smallest convex cone containing the set S. Proof. The implication (3.9) is quite easy to check. At each point t ∈ Ω, we have kAt k > 0, which implies that At 6= 0. In other words, 0 ∉ A(Ω). The second implication (3.10) follows from a spherical duality principle. Suppose that Ω and Υ are closed and spherically convex, and assume cone(Ω) is not a subspace. If Ω◦ and −Υ◦ do not intersect, then Ω and Υ must intersect; see [Kle55, Thm (2.7)]. The analytic condition min min kt k=1 s∈cone(Ω◦ ) ks − A ∗ t k > 0 ensures that cone(Ω◦ ) lies at a positive distance from θ(range(A ∗ )). It follows that Ω◦ does not intersect θ(range(A ∗ )). By duality, we conclude that Ω ∩ θ(null(A)) 6= ;, which yields (3.10). Finally, if cone(Ω) is a subspace, we use a dimension counting argument. As before, the analytic condition (3.11) implies that Ω◦0 ∩ θ(range(A ∗ )) = ;. Since these sets do not intersect, the sum of their dimensions cannot exceed the ambient dimension: D ≥ dim(Ω◦0 ) + dim(range(A ∗ )) = (D − dim(Ω0 )) + (D − dim(null(A))) = 2D + 1 − dim(Ω) − dim(null(A)). We see that dim(Ω) + dim(null(A)) ≥ D + 1. As a consequence, the subspace cone(Ω) and (A) must have a nontrivial intersection.  In view of Proposition 3.8, we can establish Theorem I(a) by showing that d ≥ (1 − ε) δ(Ω) implies min kΠt k > 0 with high probability. t ∈Ω This condition follows from a universality result, Corollary 10.1, for the restricted minimum singular value. The proof appears in Section 10.3. Similarly, we can establish Theorem I(b) by showing that d ≤ (1 + ε) δ(Ω) implies min min kt k=1 s∈cone(Ω◦ ) ks − Π∗ t k > 0 with high probability. This condition follows from a specialized argument that culminates in Corollary 17.1. The proof appears in Section 17.2. We need not lavish extra attention on the case where cone(Ω) is a subspace. Indeed, the dimension of Ω and Ω0 only differ by one, which is invisible in the final results. UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 15 3.6. Theorem I: Extensions. It is an interesting challenge to delineate the scope of the universality phenomenon described in Theorem I. We believe that there remain many opportunities for improving on this result. • Theorem I only shows that the width of the phase transition ©p is o(D). ª [ALMT14, Thm. 7.1] p It is known that the width of the phase transition has order min δ(E ), D − δ(E ) for a linear map with standard normal entries. How wide is the phase transition for more general random linear maps? • A related question is whether Theorem I holds for those sets E whose statistical dimension δ(E ) is much smaller than the ambient dimension. • There is empirical evidence that the location of the phase transition is universal over a class wider than Model 2.4. In particular, results like Theorem I may be valid for structured random linear maps. • Figure 1.2 suggests that the probability of successful embedding is universal. Under what conditions can this observation be formalized? In summary, Theorem I is just the first step toward a broader theory of universality in high-dimensional stochastic geometry. 4. A U NIVERSALITY L AW FOR THE R ESTRICTED M INIMUM S INGULAR VALUE This section describes a quantitative universality law for random linear maps. We show that the restricted minimum singular value of a random linear map takes the same value for every linear map in a substantial class. This type of result provides information about the stability of randomized dimension reduction. 4.1. Restricted Minimum Singular Value: Problem Formulation. Let us frame our assumptions: • Fix the ambient dimension D. • Let E be a nonempty, compact subset of the unit ball BD . • Let Π : RD → Rd be a random linear map with embedding dimension d . In this section, our goal is to understand the distance from the random projection Π(E ) to the origin. The following definition captures this property. Definition 4.1 (Restricted Minimum Singular Value). Let A : RD → Rd be a linear map, and let T be a nonempty subset of RD . The restricted minimum singular value of A with respect to the set T is the quantity σmin (A; T ) := inf kAt k . t ∈T More briefly, we write restricted singular value or RSV. Proposition 3.8 shows that the restricted minimum singular value is a quantity of interest when studying the embedding dimension of a linear map. It is also productive to think about σmin (A; T ) as a measure of the stability of inverting the map A on the image A(T ). In particular, note that the restricted singular value σmin (A; T ) is a generalization of the ordinary minimum singular value σmin (A), which we obtain from the selection T = SD−1 . 4.2. The Excess Width Functional. It is clear that the restricted singular value σmin (A; ·) decreases with respect to set inclusion. In other words, the restricted singular value depends on the “content” of the set T . In the case of a random linear map, the following geometric functional provides the correct notion of content. Definition 4.2 (Excess Width). Let m be a positive number, and let T be a nonempty, bounded subset of RD . The m-excess width of T is the quantity ¡p ¢ Em (T ) := E inf m kt k + g · t . (4.1) t ∈T 16 S. OYMAK AND J. A. TROPP Versions of the excess width appear as early as the work of Gordon [Gor88, Cor. 1.1]. It has also come up in recent papers [Sto13, OTH13, TOH15, TAH15] on the analysis of Gaussian random linear maps. The excess width has a number of useful properties. These results are immediate consequences of the definition. • For a subset T of the unit ball in RD , the m-excess width satisfies the bounds p p p m − D ≤ Em (T ) ≤ m. • • • • In particular, the excess width can be positive or negative. The m-excess width is weakly increasing in m. That is, m ≤ n implies Em (T ) ≤ En (T ). The m-excess width is decreasing with respect to set inclusion: S ⊂ T implies Em (S) ≥ Em (T ). The m-excess width is absolutely homogeneous: Em (αT ) = |α| Em (T ) for α ∈ R. The excess width (4.1) is related to the Gaussian width (3.7): p (4.2) Em (Ω) = m − W (Ω) for Ω ⊂ SD−1 . Using (3.8), we can also relate the excess width to the statistical dimension: p p p p m − 1 + δ(Ω) ≤ Em (Ω) ≤ m − δ(Ω) for Ω ⊂ SD−1 . (4.3) The term “excess width” is not standard, but the formula (4.2) suggests that this moniker is appropriate. According to Theorem I, the sign (±) of the excess width Ed (Ω) indicates that random dimension reduction Π(Ω) with embedding dimension d succeeds (+) or fails (−) with high probability. The papers [Sto13, OTH13, TOH15] develop methods for computing the excess width in a variety of situations. For instance, if L is a k-dimensional subspace of RD , then p p Em (L ∩ SD−1 ) ≈ m − k. For a more sophisticated example, consider the probability simplex n o XD ∆D := t ∈ RD : i =1 t i = 1, t i ≥ 0 for i = 1, . . . , D . We can develop an asymptotic expression for its excess width: ³ p £ ¡ ¢´ ¤ lim Ed (∆D ) = inf α − inf s + α %q(s) where q(s) := E (γ − s)2+ . D,d →∞ D/d =% α≥0 s∈R (4.4) The proof of the formula (4.4) is involved, so we must omit the details; see [TAH15] for a framework for making such computations. See Part II for some other examples. It is also possible to estimate the excess width numerically by approximating the expectation in (4.1) with an empirical average. 4.3. Theorem II: Universality for the Restricted Minimum Singular Value. With this preparation, we can present our main result about the universality properties of the restricted minimum singular value of a random linear map. Theorem II (Universality for the Restricted Minimum Singular Value). Fix the parameters p and ν for Model 2.4. Choose parameters λ ∈ (0, 1) and % ∈ (0, 1) and ε ∈ (0, 1). There is a number N := N (p, ν, λ, %, ε) for which the following statement holds. Suppose that • • • • • The ambient dimension D ≥ N . E is a nonempty, compact subset of the unit ball BD in RD . The embedding dimension d is in the range λD ≤ dp≤ D 6/5 . The d -excess width of E is not too small: Ed (E ) ≥ % d . The random linear map Π : RD → Rd obeys Model 2.4 with parameters p and ν. Then © ¡ ¢ ª P σmin (Π; E ) ≥ (1 − ε) Ed (E ) + ≥ 1 − Cp D 1−p/4 . (a) UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION Furthermore, if E is convex, then © ¡ ¢ ª P σmin (Π; E ) ≤ (1 + ε) Ed (E ) + ≥ 1 − Cp D 1−p/4 . 17 (b) The constant Cp depends only on the parameter p in the random matrix model. Section 4.4 contains an overview of the argument. The detailed proof of Theorem II appears in Section 10.2. Stronger probability bounds hold when the random linear map is drawn from Model 2.1. For any random linear map Π drawn from Model 2.4, Theorem II asserts that the distance of the random projection Π(E ) from the origin is typically not much smaller than the d -excess width Ed (E ). Similarly, when E is convex, the distance of the random image from the origin is typically not much larger than the d -excesspwidth. These conclusions require that the excess width Ed (E ) is not too small as compared with the root d of the embedding dimension. Theorem IIpis vacuous when Ed (E ) ≤ 0. Nevertheless, in case θ(E ) is spherically convex, the condition Ed (θ(E )) + o( D) ≤ 0 implies that σmin (Π; E ) = 0 with high probability because of (4.3) and Theorem I. We have already seen an illustration of Theorem II in action. In view of the expression (4.4) for the excess width of the probability simplex, the theorem explains the experiment documented in Figure 1.4! Remark 4.3 (Prior Work). When the random linear map Π is Gaussian, Gordon’s work [Gor88, Cor. 1.1] yields the conclusion Theorem II(a), while the second conclusion (b) appears to be more recent; see [Sto13, OTH13, TOH15, TAH15]. Korada & Montanari [KM11] have established universality laws for some optimization problems that arise in communications. The mathematical challenge in their work is similar to showing that the RSV of a cube is universal for Model 2.4 with p ≥ 6. We have adopted some of their arguments in our work. On the other hand, the cube does not present any of the technical difficulties that arise for general sets. For other types of random linear maps and other types of sets, we are not aware of any research that yields the precise value of the restricted singular value, which is required to assert universality. The literature on asymptotic convex geometry and mathematical signal processing, e.g., [MPTJ07, Men10, Men14, Tro15b, Ver15], contains many results on the restricted singular value that provide bounds of the correct order with unspecified multiplicative constants. 4.4. Theorem II: Proof Strategy. One standard template for proving a universality law factors the problem into two parts. First, we compare a general random structure with a canonical structure that has additional properties. Then we use these extra properties to obtain a complete analysis of the canonical structure. Because of the comparison, we learn that the general structure inherits some of the behavior of the canonical structure. This recipe describes Lindeberg’s approach [Lin22] to the central limit theorem; see [Tao12, Sec. 2.2.4]. More recently, similar methods have been directed at harder problems, such as the universality of local spectral statistics of a non-symmetric random matrix [TV15]. Our research is closest in spirit to the papers [MOO10, Cha06, KM11]. Let us imagine how we could apply this technique to prove Theorem II. Suppose that E is a compact, convex set. After performing standard discretization and smoothing steps, we might invoke the Lindeberg exchange principle to compare the restricted singular value of the d × D random linear map Π with that of a d × D standard normal matrix Γ: E σmin (Π; E ) ≈ E σmin (Γ; E ). To evaluate the restricted minimum singular value of a standard normal matrix, we can use the Gaussian Minimax Theorem, as in [Gor88, Cor. 1.1]: ¡ ¢ E σmin (Γ; E ) ' Ed (E ) + . Last, we can incorporate a convex duality argument, as in [Sto13, OTH13, TOH15, TAH15], to obtain the reverse inequality: ¡ ¢ E σmin (Γ; E ) / Ed (E ) + . 18 S. OYMAK AND J. A. TROPP Unfortunately, this simple approach is not adequate. Our argument ultimately follows a related pattern, but we have to overcome a number of technical obstacles. Let us explain the most serious issue and our mechanism for handling it. We would like to apply the Lindeberg exchange principle to σmin (Π; E ) to replace each entry of Π with a standard normal variable. The problem is that E may contain a vector t 0 with large entries. If we try to replace the columns of Π associated with the large components of t 0 , we incur an intolerably large error. Moreover, for any given coordinate j , the set E may contain a vector t j that takes a large value in the distinguished coordinate j . This fact seems to foreclose the possibility of replacing any part of the matrix Π. We address this challenge by dissecting the index set E . For each (small) subset J of {1, . . . , D}, we define the set E J of vectors in E whose components in J c are small. First, we argue that the restricted singular value of a subset does not differ much from the restricted singular value of the entire set: E σmin (Π; E ) ≈ min J E σmin (Π; E J ). We may now use the Lindeberg method to make the comparison E σmin (Π; E J ) ≈ E σmin (Ψ; E J ), where the matrix Ψ is a hybrid of the form Ψ J = Π J and Ψ J c = Γ J c . That is, we only replace the columns of Π listed in the set J c with independent standard normal variables. At this point, we need to compare the minimum singular value of Ψ restricted to the subset E J against the excess width of the full set: ¡ ¢ E σmin (Ψ; E J ) ≈ Ed (E ) + . In other words, the remaining part Ψ J of the original matrix plays a negligible role in determining the restricted singular value. We perform this estimate using the Gaussian Minimax Theorem [Gor85], some convex duality arguments [TOH15], and some coarse results from nonasymptotic random matrix theory [Ver12, Tro15c]. See Part III for detailed statements of the main technical results that support Theorem II and the proofs of these results. Most of the ingredients are standard tools from modern applied probability, but we have combined them in a subtle way. To make the long argument clearer, we have attempted to present the proof in a multi-resolution fashion where pieces from each level are combined explicitly at the level above. 4.5. Theorem II: Extensions. We expect that there are a number of avenues for extending Theorem II. • Our p analysis shows that the error in estimating σmin (Π; E ) by the excess width Ed (E ) is at most o( D). In case Π is a standard normal matrix, the error actually has constant order [TOH15, Thm. II.1]. Can we improve the error bound for more general random linear maps? • A related question is whether thep universality of σmin (Π; E ) persists when the excess width Ed (E ) is very small in comparison with d . • There is some empirical evidence that the restricted minimum singular value may have universality properties for a class of random linear maps wider than Model 2.4. • Our proof can probably be adapted to show that other types of functionals exhibit universal behavior. For example, we can study ¡ ¢ min kΠt k2 + f (t ) t ∈E where f is a convex, Lipschitz function. This type of optimization problem plays an important role in statistics and machine learning. At the same time, we know that many natural functionals do not exhibit universal behavior. In particular, consider the restricted maximum singular value: σmax (A; T ) := sup kAt k . t ∈T There are many sets T where the maximum singular value σmax (·; T ) does not take a universal value for linear maps in Model 2.4; for example, see Figure 1.6. It is an interesting challenge to determine the full scope of the universality principle uncovered in Theorem II. UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 19 Part II. Applications In this part of the paper, we outline some of the implications of Theorems I and II in the information sciences. We focus on problems involving least squares and `1 minimization to reduce the number of distinct calculations that we need to perform; nevertheless the techniques apply broadly. In an effort to make the presentation shorter and more intuitive, we have also chosen to sacrifice some precision. Section 5 discusses structured signal recovery and, in particular, the compressed sensing problem. Section 6 presents an application in coding theory. Section 7 describes how the results allow us to analyze randomized algorithms for numerical linear algebra. Finally, Section 8 gives a universal formula for the prediction error in a sparse regression problem. 5. R ECOVERY OF S TRUCTURED S IGNALS FROM R ANDOM M EASUREMENTS In signal processing, dimension reduction arises as a mechanism for signal acquisition. The idea is that the number of measurements we need to recover a structured signal is comparable with the number of degrees of freedom in the signal, rather than the ambient dimension. Given the measurements, we can reconstruct the signal using nonlinear algorithms that take into account our prior knowledge about the structure. The field of compressed sensing is based on the idea that random linear measurements offer an efficient way to acquire structured signals. The practical challenge in implementing this proposal is to find technologies that can perform random sampling. Our universality laws have a significant implication for compressed sensing. We prove that the number of random measurements required to recover a structured signal does not have a strong dependence on the distribution of the random measurements. This result is important because most applications offer limited flexibility in the type of measurement that we can take. Our theory justifies the use of a broad class of measurement ensembles. 5.1. The Phase Transition for Sparse Signal Recovery. In this section, we study the phase transition that appears when we reconstruct a sparse signal from random measurements via `1 minimization. For a large class of random measurements, we prove that the distribution does not affect the location of the phase transition. This result resolves a major open question [DT09a] in the theory of compressed sensing. Let us give a more precise description of the problem. Suppose that x ? ∈ Rn is a fixed vector with precisely s nonzero entries. Let Φ : Rn → Rm be a random linear map, and suppose that we have access to the image y = Φx ? . We interpret this data as a list of m samples of the unknown signal. A standard approach [CDS98, DH01, Tro06, CRT06, Don06a] for reconstructing the sparse signal x ? from the data is to solve a convex optimization problem: minimize n x∈R kxk`1 subject to Φx = y. (5.1) Minimizing the `1 norm promotes sparsity in the optimization variable x, and the constraint ensures that the virtual measurements Φx are consistent with the observed data y. We say that the optimization problem (5.1) succeeds if it has a unique solution xb that coincides with x ? . Otherwise, it fails. In this setting, the following challenge arises. The Compressed Sensing Problem: Is the optimization problem (5.1) likely to succeed or to fail to recover x ? as a function of the sparsity s, the number m of measurements, the ambient dimension n, and the distribution of the random measurement matrix Φ? This question has been a subject of inquiry in thousands of papers over the last 10 years; see the books [EK12, FR13] for more background and references. In a series of recent papers [DT09b, Sto09, CRPW12, BLM15, ALMT14, Sto13, OTH13, FM14, GNP14], the compressed sensing problem has been solved completely in the case where the random measurement matrix Φ follows the standard normal distribution. See Remark 5.2 for a narrative of who did what when. 20 S. OYMAK AND J. A. TROPP Probability of Exact Recovery (20% Nonzero Rademacher) Probability of Exact Recovery (Student t with 5 dof) Number of Measurements (m) 0.8 50 0.7 0.6 40 0.5 30 0.4 20 0.3 0.2 10 Theory 0 0 10 20 30 40 Sparsity (s) 50 60 0.1 0 0.9 60 0.8 50 0.7 0.6 40 0.5 30 0.4 20 0.3 0.2 10 Theory 0 Empirical Probability 0.9 60 0 10 20 30 40 Sparsity (s) 50 60 0.1 0 F IGURE 5.1: Universality of the `1 Recovery Phase Transition. These plots depict the empirical probability that the `1 minimization problem (5.1) recovers a vector x ? ∈ R64 with s nonzero entries from a vector of random measurements y = Φx ? ∈ Rm . The heatmap indicates the empirical probability, computed over 100 trials. The white curve is the phase transition nψ`1 (s/n) promised by Proposition 5.1. L EFT: The random measurement matrix Φ is a sparse Rademacher matrix with an average of 20% nonzero entries. R IGHT: The random measurement matrix Φ has independent Student t 5 entries. See Section 1.9 for more details. In brief, there exists a phase transition function ψ`1 : [0, 1] → [0, 1] defined by ! à r Z 2 ∞ 2 2 −ζ2 /2 ψ`1 (%) := inf %(1 + τ ) + (1 − %) (ζ − τ) e dζ . τ≥0 π τ (5.2) The phase transition function is increasing and convex, and it satisfies ψ`1 (0) = 0 and ψ`1 (1) = 1. When the measurement matrix Φ is standard normal, m/n < ψ`1 (s/n) − o(1) implies (5.1) fails with probability 1 − o(1); m/n > ψ`1 (s/n) + o(1) implies (5.1) succeeds with probability 1 − o(1). (5.3) In other words, as the number m of measurements increases, the probability of success jumps from zero to one at the point nψ`1 (s/n) over a range of o(n) measurements. The error terms in (5.3) can be improved substantially, but this presentation suffices for our purposes. Donoho & Tanner [DT09a] have performed an extensive empirical investigation of the phase transition in the `1 minimization problem (5.1). Their work suggests that the Gaussian phase transition (5.3) persists for many other types of random measurements. See Figure 5.1 for a small illustration. Our universality results provide the first rigorous explanation of this phenomenon for measurement matrices drawn from Model 2.4. Proposition 5.1 (Universality of `1 Phase Transition). Assume that • • • • The ambient dimension n and the number m of measurements satisfy m ≤ n. The vector x ? ∈ Rn has exactly s nonzero entries. The random measurement matrix Φ : Rn → Rm follows Model 2.4 with parameters p and ν. We observe the vector y = Φx ? . UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 21 Then, as the ambient dimension n → ∞, m/n < ψ`1 (s/n) − o(1) implies (5.1) fails with probability 1 − o(1); m/n > ψ`1 (s/n) + o(1) implies (5.1) succeeds with probability 1 − o(1). The little-o suppresses constants that depend only on p and ν. Proposition 5.1 follows directly from our universality result, Theorem I, and the established calculation (5.3) of the phase transition in the standard normal setting. Proof. The approach is quite standard. Let Ω be the set of unit-norm descent directions of the `1 norm at the point x ? . That is, © ª Ω := u ∈ Sn−1 : kx ? + λuk1 ≤ kx ? k1 for some λ > 0 . The primal optimality condition for (5.1) demonstrates that the reconstruction succeeds if and only if Ω∩null(Φ) = ;. Since the `1 norm is a closed convex function, the set θ −1 (Ω)∪{0} of all descent directions forms a closed, convex cone. Therefore, the set Ω is closed and spherically convex. It follows from Theorem I that the behavior of (5.1) undergoes a phase transition at the statistical dimension δ(Ω) for any random linear map drawn from Model 2.4. The result [ALMT14, Prop. 4.5] contains the first complete and accurate computation of the statistical dimension of a descent cone of the `1 norm: p nψ`1 (s/n) − O( n) ≤ δ(Ω) ≤ nψ`1 (s/n). (5.4) See also [FM14, Prop. 1]. This fact completes the proof.  Note that Proposition 5.1 requires the sparsity level s to be proportional to the ambient dimension n before it provides any information. By refining our argument, we can address the case when s is proportional to n 1−ε for a small number ε that depends on the regularity of the random linear map. The empirical work [DT09a] of Donoho & Tanner is unable to provide statistical evidence for the universality hypothesis in the regime where s is very small. It remains an open problem to understand how rapidly s/n can vanish before the universality phenomenon fails. The paper [DT09a] also contains numerical evidence that the `1 phase transition persists for random measurement systems that have more structure than Model 2.4. It remains an intriguing open question to understand these experiments. Remark 5.2 (Prior Work). In early 2005, Donoho [Don06c] and Donoho & Tanner [DT06] observed that there is a phase transition in the number of standard normal measurements needed to reconstruct a sparse signal via `1 minimization. Using methods from integral geometry, they were able to perform a heuristic computation of the location of the phase transition function (5.2). In subsequent work [DT09b], they proved that the transition (5.3) is valid in some parameter regimes. They later reported extensive empirical evidence [DT09a] that the distribution of the random measurement map has little effect on the location of the phase transition. In early 2005, Rudelson & Vershynin [RV08] proposed a different approach to studying `1 minimization by adapting results of Gordon [Gor88] that depend on Gaussian process theory. Stojnic [Sto09] refined this argument to obtain an empirically sharp success condition for standard normal linear maps, but his work did not establish a matching failure condition. Stojnic’s calculations were clarified and extended to other signal recovery problems in the papers [OH10, CRPW12, ALMT14, FM14]. Bayati et al. [BLM15] is the first paper to rigorously demonstrate that the phase transition (5.3) is valid for standard normal measurements. The argument is based on a state evolution framework for an iterative algorithm inspired by statistical physics. This work also gives the striking conclusion that the `1 phase transition is universal over a class of random measurement maps. This result requires the measurement matrix to have independent, standardized, subgaussian entries that are absolutely continuous with respect to the Gaussian distribution. As a consequence, the paper [BLM15] excludes discrete and heavy-tailed 22 S. OYMAK AND J. A. TROPP models. Furthermore, it only applies to `1 minimization. In contrast, Proposition 5.1 and its proof have a much wider compass. The paper [ALMT14] of Amelunxen et al. contains the first complete integral-geometric proof of (5.3) for standard normal measurements. This work is significant because it established for the first time that phase transitions are ubiquitous in signal reconstruction problems. It also forged the first links between the approach to phase transitions based on integral geometry and those based on Gaussian process theory. The papers [MT14a, GNP14] build on these ideas to obtain precise estimates of the success probability in (5.3). Subsequently, Stojnic [Sto13] refined the Gaussian process methods to obtain more detailed information about the behavior of the errors in noisy variants of the `1 minimization problem. His work has been extended in a series [OTH13, TOH15, TAH15] of papers by Abbasi, Oymak, Thrampoulidis, Hassibi, and their collaborators. Because of this research, we now have a very detailed understanding of the behavior of convex signal recovery methods with Gaussian measurements. To our knowledge, the current paper is the first work that extends the type of general analysis in [ALMT14, OTH13, TAH15] beyond the confines of the standard normal model. 5.2. Other Signal Recovery Problems. The compressed sensing problem is the most prominent example from a large class of related questions. Our universality results have implications for this entire class of problems. We include a brief explanation. Let f : Rn → R be a proper7 convex function whose value increases with the “complexity” of its argument. The `1 norm is an example of a complexity measure that is appropriate for sparse signals [CDS98]. Similarly, the Schatten 1-norm is a good complexity measure for low-rank matrices [Faz02]. Let x ? ∈ Rn be a vector with “low complexity.” Draw a random linear map Φ : Rn → Rm , and suppose we have access to x ? only through the measurements y = Φx ? . We can attempt to reconstruct x ? by solving the convex optimization problem minimize n x∈R f (x) subject to Φx = y. In other words, we find the vector with minimum complexity that is consistent with the observed data. We say that (5.2) succeeds when it has a unique optimal point that coincides with x ? ; otherwise, it fails. The paper [ALMT14] proves that there is a phase transition in the behavior of (5.2) when Φ is standard normal. Our universality law, Theorem I, allows us to extend this result to include every random linear map from Model 2.4. Define the set Ω of unit-norm descent directions of f at the point x ? : © ª Ω := u ∈ Sn−1 : f (x ? + λu) ≤ f (x ? ) for some λ > 0 . Then, as the ambient dimension n → ∞, m < δ(Ω) − o(n) implies (5.2) fails with probability 1 − o(1); m > δ(Ω) + o(n) implies (5.2) succeeds with probability 1 − o(1). In other words, there is a phase transition in the behavior of (5.2) when the number m of measurements equals the statistical dimension δ(Ω) of the set of descent directions of f at the point x ? . See the papers [CRPW12, ALMT14, FM14] for some general methods for computing the statistical dimension of a descent cone. 5.3. Complements. We conclude this section with a few additional remarks about the scope of our results on signal recovery. First, we discuss some geometric applications. Second, we mention some other signal processing problems that can be studied using the same methods. 7A proper convex function takes at least one finite value and never takes the value −∞. UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 23 5.3.1. Geometric Implications. Proposition 5.1 can be understood as a statement about the facial structure of a random projection of the `1 ball. Equivalently, it provides information about the facial structure of the convex hull of random points. Suppose that Bn1 is the n-dimensional `1 ball, and fix an (s−1)-dimensional face F of Bn1 . Let Φ : Rn → Rm be a random linear map from Model 2.4. We say that Φ preserves the face F when Φ(F ) is an (s − 1)dimensional face of the projection Φ(Bn1 ). We can reinterpret Proposition 5.1 as saying that m/n < ψ`1 (s/n) − o(1) implies Φ is unlikely to preserve F ; m/n > ψ`1 (s/n) + o(1) implies Φ is likely to preserve F . The connection between `1 minimization and the facial structure of the `1 ball was identified in [Don06b]; see also [ALMT14, Sec. 10.1.1]. Here is another way of framing the same result. Fix an index set J ⊂ {1, . . . , n} with cardinality #J = s and a vector η ∈ Rn with ±1 entries. Let ϕ1 , . . . , ϕn ∈ Rm be independent random vectors, drawn from Model 2.4, and consider the absolute convex hull E := conv{±ϕ1 , . . . , ±ϕn }. The question is whether the set F := conv{η j ϕ j : j ∈ J } is an (s − 1)-dimensional face of E . We have the statements s/n < ψ−1 `1 (m/n) − o(1) implies F is likely to be an (s − 1)-dimensional face of E ; s/n > ψ−1 `1 (m/n) + o(1) implies F is unlikely to be an (s − 1)-dimensional face of E . See the paper [DT09b] for more discussion of the connection between the facial structure of polytopes and signal recovery. Some universality results of this type also appear in Bayati et al. [BLM15]. 5.3.2. Other Signal Processing Applications. We often want to perform signal processing tasks on data after reducing its dimension. In this section, we have focused on the problem of reconstructing a sparse signal from random measurements. Here are some related problems: • Detection. Does an observed signal consist of a template corrupted with noise? Or is it just noise? • Classification. Does an observed signal belong to class A or to class B? The literature contains many papers that propose methods for solving these problems after dimension reduction; for example, see [DDW+ 07]. The existing analysis is either qualitative or it assumes that the dimension reduction map is Gaussian. Our universality laws can be used to study the precise behavior of compressed detection and classification with more general types of random linear maps. For brevity, we omit the details. 6. D ECODING WITH S TRUCTURED E RRORS One of the goals of coding theory is to design codes and decoding algorithms that can correct gross errors in transmission. In particular, it is common that some proportion of the received symbols are corrupted. In this section, we show that a large family of random codes can be decoded in the presence of structured errors. The number of errors that we can correct is universal over this family. This result is valuable because it applies to random codebooks that are closer to realistic coding schemes. The result on random decoding can also be interpreted as a statement about the behavior of the least-absolute-deviation (LAD) method for regression. We also discuss how our universality results apply to a class of demixing problems. 6.1. Decoding with Sparse Errors. We work with a random linear code over the real field. Consider a fixed message x ? ∈ Rm . Let Φ ∈ Rn×m be a random matrix, which is called a codebook in this context. Instead of transmitting the original message x ? , we transmit the coded message Φx ? . Suppose that we receive a version y of the message where some number s of the entries are corrupted. That is, y = Φx ? +z ? where the error vector z ? has at most s nonzero entries. For simplicity, we assume that z ? does not depend on the codebook Φ. 24 S. OYMAK AND J. A. TROPP Empirical Probability of Decoding a Message of Length m = 64 (20% Nonzero Rademacher Codebook) 30 0 Theory 0.1 Number of Errors (s) 0.3 20 0.4 0.5 15 0.6 10 0.7 0.8 5 0 Empirical Probability 0.2 25 0.9 70 80 90 100 Length of Code (n) 110 120 F IGURE 6.1: Universality of the `1 Decoding Phase Transition. This plot shows the empirical probability that the `1 method (6.1) decodes the message x ? ∈ R64 from the received message y = Φx ? + z ? ∈ Rn where the corruption z ? ∈ Rn has exactly s nonzero entries. The codebook Φ ∈ Rn×64 is a sparse Rademacher matrix with an average of 20% nonzero entries. The heatmap gives the empirical probability of correct decoding, computed over 100 trials. The white curve is the exact phase transition nψ−1 (1−64/n) promised `1 by Proposition 6.1. See Section 1.9 for more details. In this setting, one can attempt to decode the message using an `1 minimization method [DH01, CRTV05, DT06, MT14b]. We solve the optimization problem minimize m n x∈R ,z∈R kzk`1 subject to y = Φx + z. (6.1) In other words, we search for a message x and a sparse corruption z that match the received data. We say that the optimization (6.1) succeeds if it has a unique optimal point (xb, zb) that coincides with (x ? , z ? ); otherwise it fails. The question is when the optimization problem (6.1) is effective at decoding the received transmission. That is, how many errors s can we correct as a function of the message length m and the code length n? The following result gives a solution to this problem for any codebook drawn from Model 2.4. Proposition 6.1 (Universality of Sparse Error Correction). Assume that • • • • • The message length m and the code length n satisfy m ≤ n. The message x ? ∈ Rm is arbitrary. The error vector z ? ∈ Rn has exactly s nonzero entries, where s ≤ (1 − ξ)n for some ξ > 0. The random codebook Φ ∈ Rn×m follows Model 2.4 with parameters p and ν. We observe the vector y = Φx ? + z ? . Then, as the message length m → ∞, s/n < ψ−1 `1 (1 − m/n − o(1)) implies s/n > ψ−1 `1 (1 − m/n + o(1)) implies (6.1) succeeds with probability 1 − o(1); (6.1) fails with probability 1 − o(1). The function ψ`1 is defined in (5.2). The little-o suppresses constants that depend only on ξ and p and ν. UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 25 This result is significant because it allows us to understand the behavior of this method for a sparse, discrete codebook. This type of code is somewhat closer to a practical coding mechanism than the ultrarandom codebooks that have been studied in the past; see Remark 6.3. Figure 6.1 contains an illustration of how the theory compares with the actual performance of this coding scheme. Proof. To analyze the decoding problem (6.1), we change variables: u := x − x ? and v := z − z ? . We obtain the equivalent optimization problem minimize m n u∈R ,v ∈R kz ? + v k`1 subject to Φu = v . (6.2) b vb) of the problem (6.2) The decoding procedure (6.1) succeeds if and only if the unique optimal point (u, is the pair (0, 0). Introduce the set Ω of unit-norm descent directions of the `1 norm at z ? : © ª Ω := v ∈ Sn−1 : kz ? + λv k`1 ≤ kz ? k`1 for some λ > 0 . The primal optimality condition for (6.2) shows that decoding succeeds if and only if Ω ∩ range(Φ) = ;. Let us compute the statistical dimension of Ω◦ : δ(Ω◦ ) = n − δ(Ω) = n − (nψ`1 (s/n) + o(n)) = n(1 − ψ`1 (s/n) + o(1)). (6.3) The first relation is the polar identity (3.5) for the statistical dimension, and the value of the statistical dimension appears in (5.4). Since s ≤ (1 − ξ)n, the properties of the function ψ`1 ensure that δ(Ω◦ ) ≥ %n for some % > 0. First, we demonstrate that decoding fails when the number s of errors is too large. To do so, we must show that Ω ∩ range(Φ) 6= ;. By polarity [Kle55, Thm. (2.7)], it suffices to check that Ω◦ ∩ null(Φ∗ ) = ;. With probability at least 1 − o(1), this relation follows from Theorem I(a), provided that m > δ(Ω◦ ) + o(n) = n(1 − ψ`1 (s/n)) + o(n). Finally, revert the inequality so that it is expressed in terms of s. Last, we must check that decoding succeeds when the number s of errors is sufficiently small. To do so, we must verify that Ω ∩ range(Φ) = ; with high probability. This relation follows from ideas closely related to the proof of Theorem I, but it is not a direct consequence. See Section 17.3 for the details.  Remark 6.2 (Least-Absolute-Deviation Regression). Proposition 6.1 can also be interpreted as a statement about the performance of the least-absolute deviation method for fitting models with outliers. Suppose that we observe the data y = X β? + z. Each of the n rows of X is interpreted as a vector of m measured variables for an independent subject in an experiment. The vector β? lists the coefficients in the true linear model, and the sparse vector z contains a small number s of arbitrary statistical errors. The least-absolute deviation method fits a model by solving minimize β∈Rm kX β − yk`1 . Proposition 6.1 shows that the procedure identifies the true model β? exactly, provided that the number s of contaminated data points satisfies s/n < ψ−1 (1 − m/n) − o(1). ` 1 Remark 6.3 (Prior Work). The idea of using `1 minimization for decoding in the presence of sparse errors dates at least as far back as the paper [DH01]. This scheme received further attention in the work [CRTV05]. Later, Donoho & Tanner [DT06] applied phase transition calculations to assess the precise performance of this coding scheme for a standard normal codebook; the least-absolute-deviation interpretation of this result appears in [DT09a, Sec. 1.3]. The paper [MT14b] revisits the coding problem and develops a sharp analysis in the case where the codebook is a random orthogonal matrix. The current paper contains the first precise result that extends to codebooks with more general distributions. 26 S. OYMAK AND J. A. TROPP 6.2. Other Demixing Problems. The decoding problem (6.1) is an example of a convex demixing problem [MT14b, ALMT14]. Our universality results can be used to study other questions of this species. Let f 0 : Rn → R and f 1 : Rn → R be proper convex functions that measure the complexity of a signal. Suppose that x ?0 ∈ Rn and x ?1 ∈ Rn are signals with “low complexity.” Draw random matrices Φ0 : Rn → Rm and Φ1 : Rn → Rm from Model 2.4. Suppose that we observe the vector y = Φ0 x ?1 + Φ1 x ?1 . We interpret the random matrices as known transformations of the unknown signals. For example, the matrices Φi might denote dictionaries in which the two components of y are sparse. We can attempt to reconstruct the original signal pair by solving © ª minimize max f 0 (z 0 ), f 1 (z 1 ) subject to Φ0 z 0 + Φ1 z 1 = y. (6.4) z 0 ∈Rn ,z 1 ∈Rn In other words, we witness a superposition of two structured signals, and we attempt to find the lowest complexity pair (z 0 , z 1 ) that reproduces the observed data. The demixing problem succeeds if it has a unique optimal point that equals (x ?0 , x ?1 ). To analyze this problem, we introduce two descent sets: © ª Ωi := u ∈ Sn−1 : f i (x ?i + λu) ≤ f i (x ?i ) for some λ > 0 for i = 1, 2. Up to scaling, the descent directions of max{ f 0 (·), f 1 (··)} at the pair (x ?0 , x ?1 ) coincide with the direct product Ω0 × Ω1 . The statistical dimension of a direct product of two spherical sets satisfies δ(Ω0 × Ω1 ) = δ(Ω0 ) + δ(Ω1 ). Therefore, Theorem I demonstrates that m < δ(Ω0 ) + δ(Ω1 ) − o(n) implies (6.4) fails with probability 1 − o(1); m > δ(Ω0 ) + δ(Ω1 ) + o(n) implies (6.4) succeeds with probability 1 − o(1). In other words, the amount of information needed to extract a pair of signals from the superposition equals the total complexity of the two signals. This result holds true for a wide class of distributions on Φ0 and Φ1 . 7. R ANDOMIZED N UMERICAL L INEAR A LGEBRA Numerical linear algebra (NLA) is the study of computational methods for problems in linear algebra, including the solution of linear systems, spectral calculations, and matrix approximations. Over the last 15 years, researchers have developed many new algorithms for NLA that exploit randomness to perform these computations more efficiently. See the surveys [Mah11, HMT11, Woo14] for an overview of this field. In this section, we apply our universality techniques to obtain new results on dimension reduction in randomized NLA. This discussion shows that a broad class of dimension reduction methods share the same quantitative behavior. Therefore, within some limits, we can choose the random linear map that is most computationally appealing when we design numerical algorithms based on dimension reduction. As an added bonus, the arguments here lead to a new proof of the Bai–Yin limit for the minimum singular value of a random matrix drawn from Model 2.4. 7.1. Subspace Embeddings. In randomized NLA, one of the key primitives is a subspace embedding. A subspace embedding is nothing more than a randomized linear map that does not annihilate any point in a fixed subspace. Definition 7.1 (Subspace Embedding). Fix a natural number k, and let L be an arbitrary k-dimensional subspace. We say that a randomized linear map Π : RD → Rd is an oblivious subspace embedding of order k if ¡ ¢ 0 ∉ Π L ∩ SD−1 with high probability. The term “oblivious” indicates that the linear map Π is chosen without knowledge of the subspace L. UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 27 In the definition of a subspace embedding, some authors include quantitative bounds on the stability of the embedding. These estimates are useful for analyzing certain algorithms, but we have left them out because they are not essential. A standard normal matrix provides an important theoretical and practical example of a subspace embedding. Example 7.2 (Gaussian Subspace Embedding). For any natural number k, a standard normal matrix Γ ∈ Rd ×D is a subspace embedding with probability one when the embedding dimension d ≥ k. In practice, it is preferable to select the embedding dimension d ≥ k +10 to ensure that the restricted singular value σmin (Γ; L ∩ SD−1 ) is sufficiently positive, which makes the embedding more stable. See [HMT11] for more details. A Gaussian subspace embedding has superb dimension reduction properties. On the other hand, standard normal matrices are expensive to generate, to store, and to perform arithmetic with. Therefore, in most randomized NLA algorithms, it is better to use subspace embeddings that are discrete or sparse. Our universality results demonstrate that, in a certain range of parameters, every matrix that follows Model 2.4 enjoys the same subspace embedding properties as a Gaussian matrix. Proposition 7.3 (Universality for Subspace Embedding). Suppose that • The ambient dimension D is sufficiently large. • The embedding dimension satisfies d ≤ D 6/5 . • The random linear map Π : RD → Rd follows Model 2.4 with parameters p and ν. Then, for each k-dimensional subspace L of RD , p p p σmin (Π; L ∩ SD−1 ) ≥ d − k − o( D) with probability 1 − o(1). In particular, Π is a subspace embedding of order k whenever d ≥ k + o(D). In these expressions, the little-o suppresses constants that depend only on p and ν. Proof. Proposition 7.3 is a consequence of Theorem II(a) and (4.3) because p p p p p p Ed (L ∩ SD−1 ) ≥ d − δ(L ∩ SD−1 ) = d − δ(L) = d − k. The last identity¡holds p ¢ because the k-dimensional subspace L has statistical dimension k. We introduce the error term o D to make sure that the stated result is only valid when the hypotheses of Theorem II are in force.  Note that Proposition 7.3 applies to a sparse Rademacher linear map with a fixed, but arbitrarily small, proportion of nonzero entries. This particular example has received extensive attention in recent years [CW13, NN13, KN14, BDN15], although these works typically focus on the regime where the subspace dimension k is small and the sparsity level of the random linear map is a vanishing proportion of the embedding dimension d . Remark 7.4 (Prior Work). For the simple problem considered in Proposition 7.3, much sharper results are available in the random matrix literature. See the paper [KY14] for a recent analysis, as well as additional references. Remark 7.5 (The Bai–Yin Limit for the Minimum Singular Value). One of the most important problems in random matrix theory is to obtain bounds for the extreme singular values of a random matrix. The Bai–Yin law [BY93] gives a near-optimal result in case the entries of the random matrix are independent and standardized. We can reproduce a slightly weaker version of the Bai–Yin law for the minimum singular value by modifying the proof of Proposition 7.3. Fix an aspect ratio % ∈ (0, 1). For each natural number d , define k := k(d ) := b%d c. Draw a d × k random matrix Φ(d ) from Model 2.4 with fixed parameters p and ν. For each ε > 0, we can apply Theorem II(a) with E = Sk−1 to see that n o ¡ ¢ p P d −1/2 σmin Φ(d ) ≥ 1 − % − ε → 1 as d → ∞. 28 S. OYMAK AND J. A. TROPP Here, σmin denotes the kth largest singular value of Φ(d ) . Under these assumptions, it is known [Yin86] that the empirical distribution of the singular values of p (d ) Φ converges in probability to the Marčenko–Pastur density, whose support is the interval 1 ± %. It follows that n o ¡ ¢ p P d −1/2 σmin Φ(d ) ≤ 1 − % + ε → 1 as d → ∞. Therefore, we may conclude that ¡ ¢ p d −1/2 σmin Φ(d ) → 1 − % in probability. In comparison, the Bai–Yin law [BY93, Thm. 2] gives the same conclusion almost surely when the entries of Φ(d ) have four finite moments. See the recent paper [Tik15] for an optimal result. 7.2. Sketching and Least Squares. In randomized NLA, one of the core applications of dimension reduction is to solve over-determined least-squares problems, perhaps with additional constraints. This idea is attributed to Sarlós [Sar06], and it has been studied intensively over the last decade; see the surveys [Mah11, Woo14] for more information. In this section, we develop sharp bounds for the simplest version of this approach. Suppose that A is a fixed D × n matrix with full column rank. Let y ∈ RD be a vector, and consider the over-determined least-squares problem kAx − yk2 . minimize n x∈R (7.1) This problem can be expensive to solve when D À n. One remedy is to apply dimension reduction. Draw a random linear map Π : RD → Rd from Model 2.4, and consider the compressed problem kΠ(Ax − y)k2 . minimize n x∈R (7.2) The question is how the quality of the solution of (7.2) depends on the embedding dimension d . The following result provides an optimal estimate. Proposition 7.6 (Randomized Least Squares: Error Bound). Instate the prevailing notation. Fix parameters λ ∈ (0, 1) and % ∈ (0, 1) and ι ∈ (0, 1). Assume that • The number D of constraints is sufficiently large as a function of the parameters. • The embedding dimension d is comparable with the number D of constraints: λD ≤ d ≤ D. • The embedding dimension d is somewhat larger than the number n of variables: d ≥ (1 + %)n. With high probability, the solution xb to the reduced least-squares problem (7.2) satisfies kA(xb − x ? )k2 2 kAx ? − yk ≤ n + ιd , d −n (7.3) where x ? is the solution to the original least-squares problem (7.1). In particular, kA xb − yk2 2 kAx ? − yk ≤ (1 + ι) d d −n In other words, the excess error kA(xb − x ? )k incurred in solving the compressed least-squares problem (7.2) is negligible as compared with the optimal value of the least-squares problem (7.1) if we choose the embedding dimension d sufficiently large. Proposition 7.6 improves substantially on the most recent work [PW15, Cor. 2(a)], both in terms of the error bound and in terms of the assumptions on the randomized linear map. Let us remark that there is nothing special about ordinary least squares. We can also solve least-squares problems with a convex constraint set by dimension reduction. For this class of problems, we can also obtain optimal bounds by adapting the argument below. For example, see the results in Section 8. UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 29 Proof. Let x ? ∈ Rn be the solution to the original least-squares problem (7.1). Define the optimal residual z ? := y − Ax ? ∈ RD , and recall that z ? is orthogonal to range(A). Moreover, minn kAx − yk2 = kAx ? − yk2 = kz ? k2 . x∈R Without loss of generality, we may scale the problem so that kz ? k2 = 1. Next, change variables. Define w := A(x − x ? ), and note that w is orthogonal to z ? . We can write the reduced least-squares problem (7.2) as minimize w ∈range(A) kΠ(w − z ? )k . (7.4) b to (7.4) to be close to zero. When dimension reduction is effective, we expect the solution w Since d ≥ (1 + %)n, we can use the fact (Proposition 7.3) that Π is a subspace embedding to obtain an a b k ≤ R ∞ that holds with high probability. The number R ∞ is a constant that depends on priori bound kw nothing but ε. We only need this observation to ensure that we are optimizing over a compact set with constant radius, so we omit the details. Next, we invoke Theorem II(b) to bound the optimal value of the reduced least-squares problem (7.4). Define the compact, convex set E := {w ∈ range(A) : kw k ≤ R ∞ }. Let ε > 0 be a parameter that will depend on the parameter ι. With high probability, min w ∈range(A) kΠ(w − z ? )k = min kΠ(w − z ? )k ≤ (1 + ε) Ed (E − z ? ). w ∈E By direct calculation, we can bound the excess width above. Let P be the orthogonal projector onto the range of A, and observe that ¢ ¡p Ed (E − z ? ) = E inf d kw − z ? k + g · (w − z ? ) w ∈E ¢ ¡p = E inf d (kw k2 + 1)1/2 + g · w w ∈E ¡p ¢ = E inf d (kw k2 + 1)1/2 − kP g k kw k w ∈E ¡p p ¢ d (α2 + 1)1/2 − nα ≤ inf 0≤α≤R ∞ p = d − n. The first line is Definition 4.2, of the excess width. Next, simplify via the orthogonality of w and z ? and the scaling kz ? k2 = 1. Use translation invariance of the infimum to remove z ? from the Gaussian term. p Apply Jensen’s inequality to draw the expectation inside the infimum, and note that E kP g k ≤ n because rank(P ) = n. Then make the change of variables α = kw k, and solve the scalar convex optimization problem. The infimum occurs at the value n α2opt := . d −n Since d ≥ (1 + %)n, we may be confident that αopt < R ∞ . We have shown that, with high probability, p min kΠ(w − z ? )k ≤ (1 + ε) d − n. (7.5) w ∈range(A) b k ≈ αopt . To prove the main result, we Furthermore, we have evidence that the norm of the minimizer kw p compute the value of the optimization problem (7.4) restricted to points with kw k ≥ αopt 1 + ι0 , where ι0 is a small positive number to be chosen later. Then we verify that the optimal value of the restricted problem is usually larger than the bound (7.5) for the optimal value of (7.2). This argument implies that p kw b k < αopt 1 + ι0 with high probability. p To that end, define R + := αopt 1 + ι0 , and introduce the compact set E + := {w ∈ range(A) : R + ≤ kw k ≤ R ∞ }. 30 S. OYMAK AND J. A. TROPP Theorem II(a) shows that, with high probability, min kΠ(w − z ? )k ≥ (1 − ε) Ed (E + − z ? ). w ∈E + (7.6) Calculating the excess width as before, ¢ ¡p d (α2 + 1)1/2 − kP g k α R + ≤α≤R ∞ ¡ ¡p p ¢ p ¢ ≥ inf d (α2 + 1)1/2 − nα − R ∞ E kP g k − n + R + ≤α≤R ∞ ¡p ¢ p 2 ≥ d (R + + 1)1/2 − nR + − R ∞ . Ed (E + − z ? ) = E inf (7.7) p p Add and subtract nα to reach the second line, and use the fact that E kP g k ≤ n. Then apply the Gaussian variance inequality, Fact A.1, to bound the expectation by one. The infimum occurs at R + because the objective is convex and R + exceeds the unconstrained minimizer αopt . Next, we simplify the expression involving R + . Setting ι0 := ιd /n, we find that p p 1 + ι0 n/d − n 1 + ι0 p d −n   s r ι(d /n − 1)  1+ι  d −n 1+ = d −n 1+ι r µ ¶ ι(d − n) 1 + ι/2 p 1+ι ≥ d −n − =p d − n. d −n 2(1 + ι) 1+ι p p d 2 + 1)1/2 − nR + = d (R + (7.8) The inequality follows from the linear upper bound for the square root at one. Combine (7.6), (7.7), and (7.8) to arrive at min kΠ(w − z ? )k ≥ w ∈E + (1 − ε)(1 + ι/2) p d − n. p 1+ι Comparing (7.5) with the last display, we discover that the choice ε := cι2 is sufficient to ensure that, with high probability, min kΠ(w − z ? )k > min kΠ(w − z ? )k . w ∈E + w ∈E It follows that the minimum of (7.4) usually occurs on the set E \ E + . We determine that kw b k2 ≤ (1 + ιd /n) α2opt . Reinterpret this inequality to obtain the stated result (7.3). b k by considering the set of vectors E − := {w ∈ range(A) : We can obtain a matching lower bound for kw p kw k ≤ R − } where R − := αopt 1 − ι0 . We omit the details.  Remark 7.7 (Prior Work). The idea of using random linear maps to accelerate the solution of least-squares problems appears in the work of Sarlós [Sar06]. This approach has been extended and refined in the literature on randomized NLA; see the surveys [Mah11, Woo14] for an overview. Most of this research is concerned with randomized linear maps that have favorable computational properties, but the results are much less precise than Proposition 7.6. Recently, Pilanci & Wainright [PW15] have offered a more refined analysis of randomized dimension reduction for constrained least-squares problems, but it still falls short of describing the actual behavior of these methods. Parts of the argument here is adapted from the work of Oymak, Thrampoulidis, and Hassibi [OTH13, TOH15]. UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 31 8. T HE P REDICTION E RROR FOR LASSO Universality results have always played an important role in statistics. The most fundamental example is the law of large numbers, which justifies the use of the sample average to estimate the mean of a general distribution. Similarly, the central limit theorem permits us to build a confidence interval for the mean of a distribution. High-dimensional statistics relies on more sophisticated methods, often based on optimization, to estimate population parameters. In particular, applied statisticians frequently employ the LASSO estimator [Tib96] to perform regression and variable selection in linear models. It is only recently that researchers have developed theory [KM11, BM12, OTH13, DJM13, JM14, TAH15] that can predict the precise behavior of the LASSO when the data are assumed to be Gaussian. It is a critical methodological challenge to develop universality results that expand the range of models in which we can make confident assertions about the performance of the LASSO. In this section, we prove the first general universality result for the prediction error using a LASSO model estimate. This theory offers a justification for using a LASSO model to make predictions when the data derives from a sparse model. We expect that further developments in this direction will play an important role in applied statistics. 8.1. The Sparse Linear Model and the LASSO. The LASSO is designed to perform simultaneous regression and variable selection in a linear model. Let us present a simple statistical model in which to study the behavior of the LASSO estimator. Suppose that the random variable Y takes the form Y = x · β? + σZ (8.1) where • • • • The deterministic vector β? ∈ Rp of model parameters has at most s nonzero entries. The random vector x ∈ Rp of predictor variables is drawn from Model 2.4. The noise variance σ2 > 0 is known. The statistical error Z is drawn from Model 2.4, independent of x. We interpret x = (X 1 , . . . , X p ) as a family of predictor variables that we want to use to predict the value of the response variable Y . Only the variables X j where (β? ) j 6= 0 are relevant to the prediction, while the others are confounding. The observed value Y of the response is contaminated with a statistical error σZ . These assumptions are idealized, but let us emphasize that our analysis holds even when the predictors and the noise are heavy-tailed. Suppose that we observe independent pairs (x 1 , Y1 ), . . . , (x n , Yn ) drawn from the model above, and let z ∈ Rn be the unknown vector of statistical errors. One of the goals of sparse regression is to use this b ∈ Rp of the model coefficients so that we can predict future responses. data to construct an estimate β That is, given a fresh random vector x 0 of predictor variables, we can predict the (unknown) response Y0 = x 0 · β? + σZ0 using the linear estimate b Yb0 := x 0 · β. We want to control the mean squared error in prediction, which is defined as £ ¤ MSEP := E |Yb0 − Y0 |2 | X , z . (8.2) Using the statistical model (8.1), it is easy to verify that £ ¤ b − β? ) + σZ0 |2 | X , z = kβ b − β? k2 + σ2 . MSEP = E |x 0 · (β (8.3) In other words, the prediction error is controlled by the squared error in estimating the model coefficients. b of the model coefficients. The estimator The LASSO uses convex optimization to produce an estimate β is chosen arbitrarily from the set of solutions to the problem minimize p β∈R kX β − yk2 subject to kβk`1 ≤ kβ? k`1 . (8.4) 32 S. OYMAK AND J. A. TROPP Mean Squared Error in Prediction (MSEP), LASSO Estimate, 16-Sparse Model in R 64 10 Asymptotic Theory Rademacher (empirical) 20% Nonzero Rademacher (empirical) Student t with 5 dof (empirical) Empirical MSEP / Variance 9 8 7 6 5 4 3 2 1 0 40 50 60 70 80 90 100 Number of Subjects (n) F IGURE 8.1: Universality of the LASSO Prediction Error. This plot shows the MSEP (8.2) obtained with the LASSO estimator (8.4), averaged over design matrices X and statistical errors z. In the linear model (8.1), the number of predictors p = 64; the number of active predictors s = 16; each nonzero coefficient (β? ) j in the model has unit magnitude; the statistical error Z is Gaussian; the variance σ2 = 1; and the number n of subjects varies. The dashed line marks the location of the phase transition for the number of subjects required to identify the model exactly when the noise variance is zero. The gray curve delineates the asymptotic upper bound n/(n − pψ`1 (s/p)) for the normalized MSEP from Proposition 8.1. The markers give an empirical estimate (over 100 trials) for the MSEP when the design matrix X has the specified distribution. In this formula, the rows of the n × p matrix X are the observed predictor vectors x i . The entries of the vector y ∈ Rn are the measured responses. For simplicity, we also assume that we have the exact side information kβ? k`1 . We can prove the following result on the squared error in the LASSO estimate of the sparse coefficient model. This is the first universal statement that offers a precise analysis for this class of statistical models. Proposition 8.1 (Universality of LASSO Prediction Error). Instate the prevailing notation. Choose parameters λ ∈ (0, 1) and % ∈ (0, 1) and ι ∈ (0, 1). Assume that • The number n of subjects is sufficiently large as a function of the parameters. • The number p of predictors satisfies λp ≤ n ≤ p 6/5 . • The number n of subjects satisfies n ≥ (1 + %) pψ`1 (s/p). With high probability over the observed data, the mean squared error in prediction (8.2) satisfies MSEP ≤ (1 + ι) σ2 n . n − pψ`1 (s/p) (8.5) The function ψ`1 is defined in (5.2). Furthermore, the bound (8.5) is sharp when n À pψ`1 (s/p) or when σ2 → 0. Proposition 8.1 gives an upper bound for the MSEP, which matches the low-noise limit (σ → 0) obtained in the Gaussian case [OTH13]. See Figure 8.1 for a numerical experiment that confirms our theoretical predictions. The proof of the result appears below in Section 8.2. The assumptions in Proposition 8.1 are somewhat restrictive, in that the number n of subjects must be roughly comparable with the number p of predictors. This condition can probably be relaxed, but the error bound in Theorem II does not allow for a stronger conclusion. The argument can also be extended to give even more precise formulas for the MSEP under the same assumptions. We also note that there is nothing special about the `1 constraint in (8.4); similar results are valid for many other convex constraints. UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 33 8.2. Proof of Proposition 8.1. Without loss of generality, we may assume that the statistical model is scaled so the noise level σ = 1. Define the sublevel set E of the `1 norm at the true parameter vector β? : © ª E := u ∈ Rp : kβ? + uk`1 ≤ kβ? k`1 . Note£that E¤ is a compact, convex set that contains the origin. Define the n × (p + 1) random matrix Φ := X z , and note that Φ also follows Model 2.4. Making the change of variables u := β − β? , we can rewrite the LASSO problem (8.4) in the form ° · ¸° ° u ° °. minimize ° Φ (8.6) ° ° −1 u∈E This expression depends on the assumption that σ = 1. Let ub be an optimal point of the problem (8.6). b 2 leads to a formula for the MSEP. Referring to (8.3), we see that a formula for kuk It will be helpful to introduce some additional sets. For a parameter α > 0, define the compact (but typically nonconvex) set © ª E α := u ∈ E : kuk = α . We also define the compact and convex set © ª E ≤α := u ∈ E : kuk ≤ α . Observe that E α ⊂ E ≤α . Furthermore, α ≤ α+ implies (1/α+ )E α+ ⊂ (1/α)E α . (8.7) The inclusion (8.7) holds because E is convex and contains the origin. Let R ∞ be a constant that depends only on the parameters % and ι. Suppose that 0 ≤ R ≤ R + ≤ R ∞ . To b < R + , it suffices to establish the inequality prove that kuk ° · ¸° ° · ¸° ° ° ° u ° ° < min °Φ u ° . min ° Φ (8.8) ° ° ° −1 −1 ° u∈E ≤R u∈E R+ Indeed, recall that ub is the minimizer of the objective over E , and let u 0 be the point in E ≤R where the left-hand minimum in (8.8) is attained. The objective is a convex function of u, so it does not decrease as b ≥ R + , this line segment muss pass through E R+ , which is u traverses the line segment from ub to u 0 . If kuk impossible because the ordering (8.8) forces the objective to decrease on the way from E R+ to u 0 . Fix the parameter R in the range 0 ≤ R ≤ R ∞ ; we will select a suitable value later. Theorem II(b) demonstrates that, with high probability, ° · ¸° ° ¡ ¢ ¡ ¢ p p u ° ° ≤ En E ≤R × {−1} + o( n) ≤ En E R × {−1} + o( n). min ° Φ ° ° −1 u∈E ≤R The second relation holds because the excess width decreases with respect to set inclusion. Observe that ¡ ¢ ¡p ¢ En E R × {−1} = E inf n(kt k2 + 1)1/2 + g · t t ∈E R p = n(R 2 + 1)1/2 − E sup g · t t ∈E R ¡ ¢ p = n(R 2 + 1)1/2 − R W (1/R)E R . The last identity holds when we factor out kt k and identify the Gaussian width (3.7). Fix the second parameter R + , such that R ≤ R + ≤ R ∞ . Theorem II(a) demonstrates that, with high probability, ° · ¸° ° ¡ ¢ p u ° ° ≥ En E R × {−1} − o( n). min ° Φ + ° ° −1 u∈E R+ Much as before, we calculate the excess width: ¡ ¢ p ¡ ¢ En E R+ × {−1} = n(R +2 + 1)1/2 − R + W (1/R + )E R+ ¡ ¢ p 2 ≥ n(R + + 1)1/2 − R + W (1/R)E R . 34 S. OYMAK AND J. A. TROPP The last inequality holds because of (8.7) and the fact that the Gaussian width is increasing with respect to set inclusion. Combine the last four displays to reach ° · ¸° ° ¡ ¢ p p u ° ° ≤ n(R 2 + 1)1/2 − R W (1/R)E R + o( n) min ° Φ ° ° −1 u∈E ≤R ° · ¸° ° ¡ ¢ p p u ° 2 °. ≤ n(R + + 1)1/2 − R + W (1/R)E R − o( n) ≤ min ° Φ ° −1 ° u∈E R+ It follows that we can establish (8.8) by finding parameters for which 0 ≤ R ≤ R + ≤ R ∞ and ¡ ¢¤ ¡ ¢¤ £p £p p 2 n(R + + 1)1/2 − R + W (1/R)E R − n(R 2 + 1)1/2 − R W (1/R)E R ≥ o( n). To that end, we replace the Gaussian width by a number that does not depend on the parameter R: ¡ ¢ ¡ ¢ ¡ ¢ W 2 (1/R)E R ≤ δ (1/R)E R ≤ δ cone(E ) ≤ pψ`1 (s/p) =: d . The first relation is (3.8); the second follows from Definition 3.4; the last is the estimate (5.4). Moreover, these bounds are sharp when R is sufficiently close to zero. Therefore, we just need to verify that hp p i hp p i p 2 n(R + + 1)1/2 − R + d − n(R 2 + 1)1/2 − R d ≥ o( n). (8.9) Once we choose R and R + appropriately, we can adapt the analysis in the proof of Proposition 7.6. For α ≥ 0, introduce the function p p f (α) := n(α2 + 1)1/2 − α d . As in the proof of Proposition 7.6, by direct calculation, f is minimized at the value R := d . n −d ¡ ¢ Note that R is very close to zero when n À d , in which case d is an accurate bound for W 2 (1/R)E R . Furthermore, p f (R) = n − d . (8.10) Now, make the selection d + ιn . (8.11) n −d Since n ≥ (1 + %) d , we see that R + is bounded by a constant R ∞ that depends only on ι and %. Repeating the calculation in (7.8), mutatis mutandis, we have 1 + ι/2 p f (R + ) ≥ p n − d. (8.12) 1+ι 2 R+ := (1 + ιn/d )R 2 = Combining (8.10) and (8.12), we determine that p p 1 + ι/2 − 1 + ι p n − d ≥ o( n). f (R + ) − f (R) ≥ p 1+ι The last inequality holds because ι is a fixed positive constant and we have assumed that n ≥ (1 + %)d . In conclusion, we have confirmed the claim (8.9) for R and the value R + designated in (8.11). It follows b ≤ R + with high probability. that (8.8) holds with high probability, and so the optimizer of (8.6) satisfies kuk Therefore, the formula (8.2) for the mean squared error yields the bound n 2 b 2 + 1 ≤ R+ MSEP = kuk + 1 = (1 + ι) . n −d Once again, we have used the assumption that σ = 1. By homogeneity, the MSEP must be proportional to σ2 , which leads to the stated result (8.5). Finally, if we allow σ → 0 with the other parameters fixed, the analysis here can be adapted to show that the error bound (8.5) is sharp. UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 35 Remark 8.2 (Prior Work). In the special case of a standard normal design X and a standard normal error z, the result of Proposition 8.1 appeared in the paper [OTH13]. Our extension to more general random models is new. Nevertheless, our proof has a lot in common with the analysis in [OTH13, TAH15]. 36 S. OYMAK AND J. A. TROPP Part III. Universality of the Restricted Minimum Singular Value: Proofs of Theorem II and Theorem I(a) In this part of the paper, we present a detailed proof of the universality law for the restricted singular value of a random matrix, Theorem II, and the first part of the universality law for the embedding dimension, Theorem I(a). Section 9 contains our main technical result, which establishes universality for the bounded random matrix model, Model 2.1. Section 10 extends the result for bounded random matrices to the heavy-tailed random matrix model, Model 2.4. In Section 10.2, we obtain Theorem II as an immediate consequence of the result for heavy-tailed matrices. Section 10.3 shows how to derive Theorem I(a) as an additional consequence. The remaining sections in this part lay out the calculations that undergird the result for bounded random matrices. 9. T HE R ESTRICTED S INGULAR VALUES OF A B OUNDED R ANDOM M ATRIX The key challenges in establishing universality for the restricted minimum singular value are already present in the case where the random matrix is drawn from the bounded model, Model 2.1. This section presents a universality law for bounded random matrices, and it gives an overview of the calculations that are required to establish this result. 9.1. Theorem 9.1: Main Result for the Bounded Random Matrix Model. The main technical result in this paper is a theorem on the behavior of the restricted minimum singular value of a bounded random matrix. Theorem 9.1 (RSV: Bounded Random Matrix Model). Place the following assumptions: • Let m and n be natural numbers with m ≤ n 6/5 . • Let T be a closed subset of the unit ball Bn in Rn . • Draw an m × n random matrix Φ from Model 2.1 with bound B . Then the squared restricted singular value σ2min (Φ; T ) has the following properties: p (1) The squared restricted singular value concentrates about its mean on a scale of B 2 m + n. For each ζ ≥ 0, © ª 2 P σ2min (Φ; T ) ≤ E σ2min (Φ; T ) − CB 2 ζ ≤ e−ζ /m , and p ª © 2 P σ2min (Φ; T ) ≥ E σ2min (Φ; T ) + CB 2 ζ ≤ Ce−ζ /(m+ζ n) . (2) The expectation of the squared restricted singular value is bounded below in terms of the excess width: ¡ ¢2 E σ2min (Φ; T ) ≥ Em (T ) + − CB 2 (m + n)0.92 . (3) If T is a convex set, the squared restricted singular value is bounded above in terms of the excess width: ¡ ¢2 E σ2min (Φ; T ) ≤ Em (T ) + + CB 4 (m + n)0.94 . Furthermore, the entries of Φ need not be symmetric for this result to hold. The proof of this result will occupy us for the rest of this part of the paper. This section summarizes the required calculations, with cross-references to the detailed arguments. 9.2. Proof of Theorem 9.1(1): Concentration. Theorem 9.1(1) states that the squared restricted singular value σ2min (Φ; T ) concentrates around its mean. We prove this claim in Proposition 11.1, which appears below. The argument depends on some concentration inequalities that are derived using the entropy method. This approach is more or less standard, so we move on to the more interesting part of the proof. UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 37 9.3. Setup for Proof of Theorem 9.1(2) and (3): Dissection of the Index Set. Let us continue with the proof of Theorem 9.1, conclusions (2) and (3). The overall approach is the same in both cases, but some of the details differ. The first step is to dissect the index set T into appropriate subsets. For each set J ⊂ {1, . . . , n}, we introduce a closed subset T J of T via the rule © ª T J := t ∈ T : |t j | ≤ (#J )−1/2 for all j ∈ J c , (9.1) where J c := {1, . . . , n} \ J . In other words, T J contains all the vectors in T where the coordinates listed in J c are sufficiently small. Note that convexity of the set T implies convexity of each subset T J . Fix a number k ∈ {1, . . . , n}. Since T is a subset of the unit ball Bn , every vector t ∈ T satisfies © ª # j : |t j | > k −1/2 ≤ k. Therefore, t belongs to some subset T J where the cardinality #J = k, and we have the decomposition [ T = #J =k T J . (9.2) It is clear that the number of subsets T J in this decomposition satisfies à ! ³ en ´k n #{T J : #J = k} = ≤ . k k (9.3) We must limit the cardinality k of the subsets, so we can control the number of subsets we need to examine. 9.4. Proof of Theorem 9.1(2): Lower Bound for the RSV. Let us proceed with the proof of Theorem 9.1(2), the lower bound for the RSV. For the time being, we fix the parameter k that designates the cardinality of the sets J . We require that k ≥ m 2/3 . First, we pass from the restricted singular value σmin (Φ; T ) over the whole set T to a bound that depends on σmin (Φ; T J ) for the subsets T J . Proposition 12.2 gives the comparison q E σ2min (Φ; T ) ≥ min E σ2min (Φ; T J ) − CB 2 km log(n/k). (9.4) #J =k We have used the decomposition (9.2) and the bound (9.3) on the number of subsets in the decomposition to invoke the proposition. The main ingredient in the proof of this estimate is the concentration inequality for restricted singular values, Proposition 11.1. Let us focus on a specific subset T J . To study the restricted singular value σmin (Φ; T J ), we want to replace the entries of the random matrix Φ with standard normal random variables. Proposition 13.1 allows us to make partial progress toward this goal. Let Γ be an m×n standard normal matrix, independent from Φ. Define an m × n random matrix Ψ := Ψ(J ) where Ψ J = Φ J and Ψ J c = Γ J c . Then E σ2min (Φ; T J ) ≥ E σ2min (Ψ; T J ) − CB 2 m 1/3 n log(mn) k 1/2 . (9.5) This bound requires the assumption that k ≥ m 2/3 . The argument is based on the Lindeberg exchange principle, but we have used this method in an unusual way. For a vector t ∈ T J , the definition (9.1) gives us control on the magnitude of the entries listed in J c , which we can exploit to replace the column submatrix Φ J c with Γ J c . The coordinates of t listed in J may be large, so we cannot replace the column submatrix Φ J without incurring a significant penalty. Instead, we just leave it in place. Next, we want to compare the expected RSV on the right-hand side of (9.5) with the excess width of the set T J . Proposition 14.1 provides the bound ³ p ´2 ³ p ´2 E σ2min (Ψ; T J ) ≥ Em (T J ) − CB 2 k ≥ Em (T ) − CB 2 k . (9.6) + + The second inequality is a consequence of the facts that T J ⊂ T and that the excess width is decreasing with respect to set inclusion. The calculation in Proposition 14.1 uses the Gaussian Minimax Theorem (see 38 S. OYMAK AND J. A. TROPP Fact A.3) to simplify the average with respect to the standard normal matrix Γ. We also invoke standard results from nonasymptotic random matrix theory to control the expectation over Φ J . We can obtain a simple lower bound on the last term in (9.6) by linearizing the convex function (·)2+ at the point Em (T ): ³ p p ¡ p ´2 ¡ ¡ ¢2 ¢2 ¢ (9.7) Em (T ) − CB 2 k ≥ Em (T ) + − CB 2 k Em (T ) + ≥ Em (T ) + − CB 2 km. + The last estimate follows from the observation that ¢ p ¡p ¢ ¡p Em (T ) = E inf m kt k + g · t ≤ E m kt0 k + g · t0 ≤ m. t ∈T (9.8) In this calculation, t 0 is an arbitrary point in T . Finally, we sequence the four displays (9.4), (9.5), (9.6), and (9.7) and combine error terms to obtain q ¡ ¢2 CB 2 m 1/3 n log(mn) 2 E σ2min (Φ; T ) ≥ Em (T ) + − − CB km log(n/k). k 1/2 Up to logarithms, an optimal choice of the cardinality parameter is k = dm −1/6 ne. Since m ≤ n 6/5 , this choice ensures that k ≥ m 2/3 . We conclude that ¡ ¢2 E σ2min (Φ; T ) ≥ Em (T ) + − CB 2 m 5/12 n 1/2 log(mn) ¡ ¢2 ≥ Em (T ) + − CB 2 (m + n)11/12 log(m + n). Combine the logarithm with the power, and adjust the constants to complete the proof of Theorem 9.1(2). 9.5. Proof of Theorem 9.1(3): Upper Bound for the RSV of a Convex Set. At a high level, the steps in the proof of Theorem 9.1(3) are similar with the argument in the last section. Many of the technical details, however, depend on convex duality arguments. As before, we fix the cardinality parameter k, with the requirement k ≥ m 2/3 . The first step is to pass from σmin (Φ; T ) to σmin (Φ; T J ). We have E σ2min (Φ; T ) ≤ min E σ2min (Φ; T J ). #J =k (9.9) This bound is a trivial consequence of the facts that T J ⊂ T for each subset J of {1, . . . , n} and that σmin (Φ; ·) is decreasing with respect to set inclusion. Select any subset T J . We invoke Proposition 13.1 to exchange most of the entries of the random matrix Φ for standard normal variables. Using the same random matrix Ψ from the last section, we have E σ2min (Φ; T J ) ≤ E σ2min (Ψ; T J ) + CB 2 m 1/3 n log(mn) . (9.10) k 1/2 The bound (9.10) requires the assumption k ≥ m 2/3 , and the proof is identical with the proof of the lower bound (9.5). Next, we compare the expected RSV on the right-hand side of (9.10) with the excess width. Proposition 14.1 delivers ³ p ´2 E σ2min (Ψ; T J ) ≤ Em (T J ) + CB 2 k . (9.11) + This argument is more complicated than the analogous lower bound (9.6), and it depends on the convexity of T J . We also apply the assumption that k ≥ m 2/3 here. Proposition 12.1 allows us to replace the excess width of T J in (9.11) with the excess width of T : q (9.12) Em (T J ) ≤ Em (T ) + C k log(n/k). We use the decomposition (9.2) and the bound (9.3) on the number of sets T J to invoke the proposition. This proof depends on the Gaussian concentration inequality. Sequence the bounds (9.9), (9.10), (9.11), and (9.12), and combine the error terms to arrive at q ³ ´2 CB 2 m 1/3 n log(mn) E σ2min (Φ; T ) ≤ Em (T ) + CB 2 k log(n/k) + . + k 1/2 UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 39 Expand the square using (9.8) to reach E σ2min (Φ; T ) ≤ Em (T ) ¡ ¢2 + + CB 2 µ m 1/3 n log(mn) k 1/2 ¶ q 2 + km log(n/k) + B k log(n/k) . Select k = dn 4/5 e to arrive at ¡ ¢2 E σ2min (Φ; T ) ≤ Em (T ) + + CB 2 (m 1/3 n 3/5 + n 2/5 m 1/2 ) log(n) + CB 4 n 4/5 log(mn) ¡ ¢2 ≤ Em (T ) + + CB 4 (m + n)14/15 log(m + n). Combine the power with the logarithm, and adjust constants to finish the proof of Theorem 9.1(3). 10. T HE R ESTRICTED S INGULAR VALUES OF A H EAVY-TAILED R ANDOM M ATRIX In this section, we present an extension of Theorem 9.1 to the heavy-tailed matrix model, Model 2.4. In Section 10.2, we explain how the universality result for the restricted singular value, Theorem II, is an immediate consequence. In Section 10.3, we show how to derive the first half of the universality result for the embedding dimension, Theorem I(a). 10.1. Corollary 10.1: Main Result for the p-Moment Random Matrix Model. We can extend Theorem 9.1 to the heavy-tailed random matrix model, Model 2.4 using a truncation argument. The following corollary contains a detailed statement of the result. Corollary 10.1 (RSV: p-Moment Random Matrix Model). Fix parameters p > 4 and ν ≥ 1. Place the following assumptions: • Let m and n be natural numbers with m ≤ n 6/5 . • Let T be a closed subset of the unit ball Bn in Rn . • Draw an m × n random matrix Φ that satisfies Model 2.4 with given p and ν. Then the restricted singular value σmin (Φ; T ) has the following properties: (1) With high probability, the restricted singular value is bounded below by the excess width: © ¡ ¢ ª P σmin (Φ; T ) ≤ Em (T ) + − Cp ν(m + n)1/2−κ(p) ≤ Cp (m + n)1−p/4 . (10.1) (2) If T is a convex set, with high probability, the restricted singular value is bounded above by the excess width: © ¡ ¢ ª P σmin (Φ; T ) ≥ Em (T ) + + Cp ν2 (m + n)1/2−κ(p) ≤ Cp (m + n)1−p/4 . (10.2) The function κ(p) is strictly positive for p > 4, and the constant Cp depends only on p. The proof of Corollary 10.1 appears below in Section 15. The main idea is to truncate each entry of the heavy-tailed random matrix Φ individually. We can treat the bounded part of the random matrix using Theorem 9.1. We show that the tails are negligible by means of a relatively simple norm bound for random matrices, Fact B.2. 10.2. Proof of Theorem II from Corollary 10.1. Theorem II is an easy consequence of Corollary 10.1. Recall the assumptions of the theorem: • • • • The embedding dimension satisfies λD ≤ d ≤ D 6/5 . E is a closed subset of the unit ball in RD . p The d -excess width of E satisfies Ed (E ) ≥ % d . The d × D random linear map Π follows Model 2.4 with parameters p > 4 and ν ≥ 1. Therefore, we may apply Corollary 10.1 with Φ = Π and T = E to see that © ¡ ¢ ª P σmin (Π; E ) ≤ Ed (E ) + − Cp ν(d + D)1/2−κ(p) ≤ Cp D 1−p/4 , and © ¡ ¢ ª P σmin (Π; E ) ≥ Ed (E ) + + Cp ν2 (d + D)1/2−κ(p) ≤ Cp D 1−p/4 if E is convex. 40 S. OYMAK AND J. A. TROPP For simplicity, we have dropped the embedding dimension d from the right-hand side of the bounds in the last display. To prove Theorem II, it suffices to check that we can make the error term Cp ν2 (d + D)1/2−κ(p) smaller than εEd (E ) if we select the ambient dimension D large enough. Indeed, the conditions D ≤ λ−1 d and d 1/2 ≤ %−1 Ed (E ) ensure that (d + D)1/2−κ(p) ≤ (1 + λ−1 )1/2 d 1/2−κ(p) ≤ (1 + λ−1 )1/2 %−1 Ed (E )d −κ(p) (1 + λ−1 )1/2 %−1 λ−κ(p) Ed (E ) D κ(p) Since κ(p) is positive, there is a number N := N (p, ν, λ, %, ε) for which D ≥ N implies ≤ Cp ν2 (d + D)1/2−κ(p) ≤ εEd (E ). This is what we needed to show. 10.3. Proof of Theorem I(a) from Corollary 10.1. Theorem I(a) is also an easy consequence of Corollary 10.1. Recall the assumptions of the theorem: • E is a compact subset of RD that does not contain the origin. • The statistical dimension of E satisfies δ(E ) ≥ %D. • The d × D random linear map Π follows Model 2.4 with parameters p > 4 and ν ≥ 1. In this section, we consider the regime where the embedding dimension d ≥ (1 + ε) δ(E ). We need to demonstrate that P {0 ∉ Π(E )} = P {E ∩ null(Π) = ;} ≥ 1 − Cp D 1−p/4 . (10.3) We begin with a reduction to a specific choice of the embedding dimension d . Let Πm be the m × D matrix formed from the first m rows of the random linear map Π. The function m 7→ P {E ∩ null(Πm ) = ;} is weakly increasing because m 7→ null(Πm ) is a decreasing sequence of sets. Therefore, it suffices to verify (10.3) in the case where d = d(1 + ε) δ(E )e. Note that d ≤ 2D + 1 because the statistical dimension δ(E ) ≤ D and ε < 1. Introduce the spherical retraction Ω := θ(E ). Proposition 3.8 and (3.2) demonstrate that σmin (Π; Ω) > 0 implies 0 ∉ Π(Ω) implies 0 ∉ Π(E ). Therefore, to check (10.3), it suffices to produce a high-probability lower bound on the restricted singular value σmin (Π; Ω). With the choices Φ = Π and T = Ω, Corollary 10.1 yields © ¡ ¢ ª P σmin (Π; Ω) ≥ Ed (Ω) + − Cp ν(d + D)1/2−κ(p) ≥ 1 − Cp D 1−p/4 . To complete the proof, we need to verify that our hypotheses imply Ed (Ω) > Cp ν(d + D)1/2−κ(p) . This point follows from two relatively short calculations. Since Ω is a subset of the unit sphere, we quickly compute ite excess width: p ¡p ¢ p Ed (Ω) = E inf d kxk + g · x ≥ d − δ(Ω) x∈Ω p p ¡p ¢p = d − δ(E ) ≥ 1 + ε − 1 δ(E ). (10.4) (10.5) The second identity holds because Ω is a subset of the unit sphere, and we have used the relation (4.3). Recall that the statistical dimension of a general set E is defined as δ(E ) = δ(θ(E )), and then introduce the value d = d(1 + ε) δ(E )e of the embedding dimension. Meanwhile, we can bound the dimensional term in (10.4) above: p (d + D)1/2−κ(p) ≤ CD 1/2−κ(p) ≤ C%−1/2 D −κ(p) δ(E ). UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 41 The first inequality holds because d ≤ 2D + 1, and the second inequality uses the assumption D ≤ %−1 δ(E ). Since κ(p) is positive, we can find a number N := N (p, ν, %, ε) for which D ≥ N implies that ¢p ¡p Cp ν(d + D)1/2−κ(p) < 1 + ε − 1 δ(E ). Combine the last display with (10.5) to determine that the claim (10.4) is valid. 11. T HEOREM 9.1: C ONCENTRATION FOR R ESTRICTED S INGULAR VALUES In this section, we demonstrate that the restricted minimum singular value of a bounded random matrix concentrates about its mean value. This result yields Theorem 9.1(1). Proposition 11.1 (Theorem 9.1: Concentration). Let S be a closed subset of Bn . Let Φ be an m × n random matrix drawn from Model 2.1 with uniform bound B . For all ζ ≥ 0, © ª 2 P σ2min (Φ; S) ≤ E σ2min (Φ; S) − CB 2 ζ ≤ e−ζ /m (11.1) p © 2 ª 2 P σmin (Φ; S) ≥ E σ2min (Φ; S) + CB 2 ζ ≤ e−ζ /(m+ζ n) . (11.2) The proof relies on some modern concentration inequalities that are derived using the entropy method. We establish the bound (11.1) on the lower tail in Section 11.1; the bound (11.2) on the upper tail appears in Section 11.2. In several other parts of the paper, we rely on variants of Proposition 11.1 that follow from essentially the same arguments. We omit the details of these proofs to avoid repetition. 11.1. Proposition 11.1: The Lower Tail of the RSV. First, we establish that the restricted singular value is unlikely to be much smaller than its mean. The proof depends on an exponential moment inequality derived using Massart’s modified logarithmic Sobolev inequality [Mas00]. For instance, see [BLM13, Thm. 6.27] or [Mau12, Thm. 19]. Fact 11.2 (Self-Bounded Random Variable: Lower Tail). Let (X 1 , . . . , X p ) be an independent sequence of real random variables. For a nonnegative function f : Rp → R+ , define Y := supi Y := f (X 1 , . . . , X i −1 , X i , X i +1 , . . . , X p ), sup α∈supp(X i ) and f (X 1 , . . . , X i −1 , α, X i +1 , . . . , X p ) for i = 1, . . . , p. Suppose that ∆− := Then, for ζ ≥ 0, Xp ¡ i =1 supi Y − Y ¢2 ≤ aY + b where a, b ≥ 0. ¶ −ζ2 /2 . a EY +b The function supp(·) returns the support of a random variable. P {Y ≤ E Y − ζ} ≤ exp µ With this fact at hand, we may derive the lower tail bound. Proof of Proposition 11.1, Eqn. (11.1). Introduce the random variable ´2 Xm ³Xn Y := σ2min (Φ; S) = min kΦsk2 = min i =1 ϕ s . j =1 i j j s∈S s∈S (i j ) For each index pair (i , j ) and real number α, define a random matrix Φα by replacing the (i , j ) entry ϕi j of Φ with the number α. Now, the random variable ¡ (i j ) ¢ (i j ) supi j Y = max σ2min Φα ; S = max min kΦα sk2 . |α|≤B |α|≤B s∈S We must evaluate the lower variance proxy Xm Xn ¡ ¢2 ∆− := i =1 j =1 supi j Y − Y . 42 S. OYMAK AND J. A. TROPP To that end, select a point t ∈ arg mins∈S kΦsk2 . For each index pair (i , j ), (i j ) (i j ) supi j Y − Y = max min kΦα sk2 − min kΦsk2 ≤ max kΦα t k2 − kΦt k2 . |α|≤B s∈S s∈S |α|≤B (i j ) The matrix Φα differs from Φ only in the i th row. Therefore, when we expand the squared norms into components, all of the components cancel except for the i th one. We discover that ³¡ Xn ¢2 ¡ Xn ¢2 ´ supi j Y − Y ≤ max (α − ϕi j )t j + `=1 ϕi ` t ` − ϕi ` t ` `=1 |α|≤B ³ ´ Xn = max (α − ϕi j )2 t 2j + 2(α − ϕi j )t j `=1 ϕi ` t ` |α|≤B (11.3) ³ ¯Xn ¯´ ≤ max (α − ϕi j )2 t 2j + 2 |α − ϕi j | |t j | ¯ `=1 ϕi ` t ` ¯ |α|≤B ¯Xn ¯ ≤ 4B 2 t 2j + 4B |t j | ¯ `=1 ϕi ` t ` ¯ . The last inequality holds because |α| ≤ B and |ϕi j | ≤ B . As a consequence, ¯Xn ¯ ´2 ¢2 ³ ¢2 ¡ ¡Xn supi j Y − Y ≤ 4B 2 t 2j + 4B |t j | ¯ `=1 ϕi ` t ` ¯ ≤ 32B 4 t 4j + 32B 2 t 2j ϕ t . `=1 i ` ` Sum over pairs (i , j ) to arrive at Xm Xn ¡ ¢2 Xm Xn ³ ¡Xn ¢2 ´ 4 4 2 2 sup Y − Y ≤ 32B t + 32B t ϕ t ij j j i =1 j =1 i =1 j =1 `=1 i ` ` X X ¡ ¢2 m n ≤ 32B 4 m + 32B 2 i =1 ϕ t `=1 i ` ` = 32B 4 m + 32B 2 kΦt k2 = 32B 4 m + 32B 2 min kΦsk2 . s∈S To reach the second line, we used the fact that kt k`4 ≤ kt k ≤ 1. The last line depends on the definition of t . In summary, we have demonstrated that ∆− ≤ 32B 2 Y + 32B 4 m. To apply Fact 11.2, we need a bound for the expectation of Y . Designate a point s 0 ∈ S, and calculate that E Y ≤ E kΦs 0 k2 = m ks 0 k2 ≤ m. The identity holds because Φ has independent, standardized entries. Fact 11.2 ensures that ¶ µ ¶ µ −ζ2 /2 −ζ2 P {Y ≤ E Y − ζ} ≤ exp ≤ exp . 32B 2 E Y + 32B 4 m 128B 4 m  Rewrite this formula to complete the proof of (11.1). 11.2. Proposition 11.1: The Upper Tail of the RSV. Next, we establish that the restricted singular value of a bounded random matrix is unlikely to be much larger than its mean. The proof depends on another tail inequality for self-bounded random variables. This result also follows from Massart’s modified log-Sobolev inequality [Mas00]; the argument is similar to the proofs of [Mau12, Thms. 18, 19] Fact 11.3 (Self-Bounded Random Variable: Upper Tail). Let (X 1 , . . . , X p ) be an independent sequence of real random variables. For a function f : Rp → R, define Y := supi Y := f (X 1 , . . . , X i −1 , X i , X i +1 , . . . , X p ), sup α∈supp(X i ) and f (X 1 , . . . , X i −1 , α, X i +1 , . . . , X p ) for i = 1, . . . , p. Suppose that supi Y − Y ≤ L uniformly for a fixed value L and that Xp ¡ ¢2 ∆− := i =1 supi Y − Y ≤ aY + b where a, b ≥ 0. UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 43 Then, for ζ ≥ 0, ¶ −ζ2 /2 . (a E Y + b) + (a + L)ζ The function supp(·) returns the support of a random variable. P {Y ≥ E Y + ζ} ≤ exp µ Proof of Proposition 11.1, Eqn. (11.2). We proceed as in the proof of (11.1). It just remains to verify the uniform bound on supi j Y − Y . Starting from (11.3), we calculate that ¯Xn ¯ supi j Y − Y ≤ 4B 2 t 2j + 4B |t j | ¯ `=1 ϕi l t ` ¯ ¡Xn ¢1/2 ≤ 4B 2 + 4B ϕ2 `=1 i ` p ≤ 4B 2 + 4B 2 n p ≤ 8B 2 n. This calculation relies on the fact that kt k ≤ 1 and the entries of Φ have magnitude bounded by B . Apply Fact 11.3 to complete the argument.  12. T HEOREM 9.1: P ROBABILITY B OUNDS FOR D ISSECTIONS In this section, we establish some results that compare the expectation of a minimum of random variables indexed by a set with the expectations of the minima indexed by subsets. These facts are easy consequences of concentration phenomena. 12.1. Dissection of the Excess Width. First, we show that the excess width of a set can be related to the excess width of a collection of subsets. Proposition 12.1 (Theorem 9.1: Dissection of Excess Width). Consider a closed subset T of the unit ball Bn that has been decomposed into a finite number of closed subsets T J : [ T = J ∈J T J . For each m ≥ 0, it holds that q ³ ¢´ ¡p ¢ ¡p ≥ min E min m kt k + g · t − C log(#J ). E min m kt k + g · t t ∈T + J ∈J t ∈T J In other words, q ¡ ¢ ¡ ¢ min Em (T J ) + ≤ Em (T ) + + C log(#J ). J ∈J Proof. Since T = S J ∈J T J , we can stratify the minimum over T : ¡p ¢ ¡p ¢ min m kt k + g · t = min min m kt k + g · t . J ∈J t ∈T J t ∈T We will obtain a lower tail bound for the minimum over T by combining lower tail bounds for each minimum over T J . Then we integrate the tail probability to obtain the required expectation bound. Each subset T J is contained in Bn , so the map ¡p ¢ g 7→ min m kt k + g · t t ∈T J is 1-Lipschitz. The Gaussian concentration inequality, Fact A.2, provides a tail bound. For each J ∈ J and for each λ ≥ 0, ½ ¾ ¡p ¢ ¡p ¢ 2 P min m kt k + g · t ≤ E min m kt k + g · t − λ ≤ e−λ /2 . t ∈T J t ∈T J Apply the union bound over J ∈ J to see that, for all ζ ≥ 0, ½ ¾ ¢ ¡p ¢ q ¡p P min m kt k + g · t ≤ min E min m kt k + g · t − 2 log(#J ) − ζ t ∈T J ∈J t ∈T J 44 S. OYMAK AND J. A. TROPP ≤ (#J )e−( p 2 log(#J )+ζ)2 /2 ≤ e−ζ 2 /2 . Using the latter estimate, we quickly compute the excess width of T . Abbreviate ¡p ¢ ¢ q ¡p Y := min m kt k + g · t and α := min E min m kt k + g · t − 2 log(#J ). J ∈J t ∈T t ∈T J If α ≤ 0, the stated result is trivial, so we may assume that α > 0. The integration by parts representation of the expectation yields Z α Z α Z α Z α p 2 (E Y )+ ≥ P {Y > ζ} dζ = P {Y > α − ζ} dζ = α − P {Y ≤ α − ζ} dζ ≥ α − e−ζ /2 dζ > α − π/2. 0 0 0 0 Reintroduce the values of Y and α, and combine constants to complete the argument.  12.2. Dissection of the Restricted Singular Value. Next, we show that the minimum singular value of a random matrix, restricted to a set, is controlled by the minimum singular value, restricted to subsets. Proposition 12.2 (Theorem 9.1: Dissection of RSV). Consider a closed subset T of the unit ball Bn , and assume that it has been decomposed into a finite number of closed subsets T J : [ T = J ∈J T J . Let Φ be an m × n random matrix that satisfies Model 2.1 with uniform bound B . Then q min E σ2min (Φ; T J ) ≤ E σ2min (Φ; T ) + CB 2 m log(#J ). J ∈J Proof. The argument is similar with the proof of Proposition 12.1. Since T = S J ∈J TJ , σ2min (Φ; T ) = min kΦt k2 = min min kΦt k2 = min σ2min (Φ; T J ). J ∈J t ∈T J t ∈T J ∈J The lower tail bound (11.1) for restricted singular values implies that, for all λ ≥ 0, © ª 2 4 P σ2min (Φ; T J ) ≤ E σ2min (Φ; T J ) − λ ≤ e−λ /(CB m) . Next, we take a union bound. For all ζ ≥ 0, ½ ¾ q 2 2 4 P σmin (Φ; T ) ≤ min E σmin (Φ; T J ) − CB m log(#J ) − ζ J ∈J p 4 2 4 2 4 ≤ (#J )e−( CB m log(#J )+ζ) /(CB m) ≤ e−ζ /(CB m) . Define a random variable Y and a constant α: Y := σ2min (Φ; T ) and α := min E σ2min (Φ; T J ) − J ∈J q CB 4 m log(#J ). If α ≤ 0, the stated result is trivial, so we may assume that α > 0. Calculating as in Proposition 12.1, EY ≥ α Z 0 P {Y > ζ} dζ = α Z 0 P {Y > α − ζ} dζ Z = α− Simplify this bound to complete the proof. α 0 P {Y ≤ α − ζ} dζ ≥ α − Z 0 α e−ζ 2 /(CB 4 m) p dζ ≥ α − CB 2 m.  UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 45 13. T HEOREM 9.1: R EPLACING M OST E NTRIES OF THE R ANDOM M ATRIX In this section, we show that it is possible to replace most of the entries of a random matrix Φ with standard normal random variables without changing the restricted singular value σmin (Φ; T J ) very much. Proposition 13.1 (Theorem 9.1: Partial Replacement). Let Φ be an m × n random matrix that satisfies Model 2.1 with magnitude bound B . Let J be a subset of {1, . . . , n} with cardinality k, and let T J be a closed subset of Bn for which t ∈ T J implies |t j | ≤ k −1/2 for each index j ∈ J c . (13.1) Define an m × n random matrix Ψ where ΨJ = ΦJ Assuming that k ≥ m 2/3 and Ψ J c = Γ J c . , we have ¯ ¯ ¯ ¯ ¯E min kΦt k2 − E min kΨt k2 ¯ ¯ ¯ t ∈T J t ∈T J ≤ (13.2) CB 2 m 1/3 n log(mn) k 1/2 . (13.3) Equivalently, ¯ 2 ¯ ¯E σ (Φ; T J ) − E σ2 (Ψ; T J )¯ min min ≤ CB 2 m 1/3 n log(mn) k 1/2 . As usual, Γ is an m × n standard normal matrix. The hypothesis (13.1) is an essential ingredient in the proof of Proposition 13.1. Indeed, we can only exchange the elements of the random matrix Φ in the columns indexed by J c because we depend on the uniform bound k −1/2 to control the replacement errors. 13.1. Proof of Proposition 13.1. The proof of Proposition 13.1 involves several steps, so it is helpful to give an overview before we begin in earnest. Throughout this discussion, the index set J is fixed. Let ε ∈ (0, 1) be a discretization parameter. The first step in the argument is to replace the index set T J by a finite subset T Jε with cardinality log(#T Jε ) ≤ n log(3/ε). We obtain the bounds ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ 2 2¯ 2 2¯ (13.4) ¯E min kΦt k − E minε kΦt k ¯ ≤ 2mnε and ¯E min kΨt k − E minε kΨt k ¯ ≤ 2mnε. ¯ t ∈T J ¯ ¯ t ∈T J ¯ t ∈T J t ∈T J See Lemma 13.2 for details, which are quite standard. Next, we introduce a smoothing parameter β > 0, and we define the soft-min function: X 2 1 F : Rm×n → R where F (A) := − log t ∈T ε e−βkAt k . J β (13.5) It is advantageous to work with the soft-min because it is differentiable. Lemma 13.3 demonstrates that we pay only a small cost for passing to the soft-min: ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ 2 −1 ε 2 (13.6) ¯E minε kΦt k − E F (Φ)¯ ≤ β log(#T J ) and ¯E minε kΨt k − E F (Ψ)¯ ≤ β−1 log(#T Jε ). ¯ t ∈T J ¯ ¯ t ∈T J ¯ This argument is also standard. Finally, we compare the expectation of the soft-min, evaluated at each of the random matrices: |E F (Φ) − E F (Ψ)| ≤ C(βB 4 + β2 B 6 )mn . (13.7) k 3/2 Lemma 13.4 encapsulates the this argument, which is based on the Lindeberg principle (Fact 13.6, below). The idea is to replace one entry of Φ J c at a time with the corresponding entry of Ψ J c , which is a Gaussian random variable. We lose very little with each exchange because the function F is smooth and the vectors in T Jε are bounded on the coordinates in J c . 46 S. OYMAK AND J. A. TROPP Combine the relations (13.4), (13.6), and (13.7) to obtain an estimate for the total error: ¯ ¯ 4 2 6 ¯ ¯ ¯E min kΦt k2 − E min kΨt k2 ¯ ≤ Cmnε + Cβ−1 n log(1/ε) + C(βB + β B )mn . ¯ t ∈T ¯ t ∈T k 3/2 J J We used the fact that log #(T Jε ) ≤ n log(3/ε) in the smoothing term. It remains to identify appropriate values for the parameters. Select ε = (mn)−1 so the discretization error is negligible. We choose the smoothing parameter so that β3 = k 3/2 /(B 6 m). In summary, ¯ ¯ 2 2/3 2 1/3 ¯ ¯ ¯E min kΦt k2 − E min kΨt k2 ¯ ≤ C + CB m n + CB m n log(mn) . ¯ t ∈T ¯ t ∈T J k k 1/2 J Since B ≥ 1 and m 2/3 ≤ k ≤ n, the third term dominates. This is the bound stated in (13.3). 13.2. Proposition 13.1: Discretizing the Index Set. The first step in the proof of Proposition 13.1 is to replace the set T J with a finite subset T Jε without changing the restricted singular values of Φ and Ψ substantially. Lemma 13.2 (Proposition 13.1: Discretization). Adopt the notation and hypotheses of Proposition 13.1. Fix a parameter ε ∈ (0, 1]. We can construct a subset T Jε of T J with cardinality log(#T Jε ) ≤ n log(3/ε) that has the property ¯ ¯ ¯ ¯ ¯ 2 2¯ (13.8) ¯E min kΦt k − E minε kΦt k ¯ ≤ 2mnε. ¯ ¯ t ∈T J t ∈T J Furthermore, the bound (13.8) holds if we replace Φ by Ψ. Proof. We choose the discretization T Jε to be an ε-covering of T J with minimal cardinality. That is, T Jε ⊂ T J and max minε kt ε − t k ≤ ε. t ∈T J t ε ∈T J Since Vol(T J ) ≤ Vol(Bn ), we can use a classic volumetric argument to ensure that the covering satisfies #T Jε ≤ (3/ε)n . For example, see [Ver12, Lem. 5.2]. When we replace the set T J with the covering T Jε , we incur a discretization error. We establish the error bound for Φ; the argument for Ψ is identical. Since T Jε ⊂ T J , it is immediate that E min kΦt k2 ≤ E minε kΦt k2 . t ∈T J t ∈T J We claim that ¡ ¢ E minε kΦt k2 ≤ E min kΦt k2 + 2ε E kΦk2 . t ∈T J Since Φ has standardized entries, t ∈T J (13.9) E kΦk2 ≤ E kΦk2F = mn, where k·kF denotes the Frobenius norm. Combine the last three displays to verify (13.8). It is quite easy to establish the claim (13.9). For all s, t ∈ T J , we have ¡ ¢ ¡ ¢ kΦsk2 − kΦt k2 = kΦsk + kΦt k · kΦsk − kΦt k ¡ ¢ ≤ kΦk ksk + kt k · kΦ(s − t )k ≤ 2 kΦk2 ks − t k . We have used standard norm inequalities and the fact that T J is a subset of the unit ball. Now, let t ? ∈ arg mint ∈T J kΦt k2 , and let t ε be a point in T Jε for which kt ε − t ? k ≤ ε. Then ¡ ¢ min kΦt k2 = kΦt ? k2 = kΦt ε k2 − kΦt ε k2 − kΦt ? k2 t ∈T ≥ minε kΦt k2 − 2 kΦk2 kt ε − t ? k t ∈T J ≥ minε kΦt k2 − 2ε kΦk2 . t ∈T J UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 47  Taking expectations, we arrive at (13.9). 13.3. Proposition 13.1: Smoothing the Minimum. The second step in the proof of Proposition 13.1 is to pass from the restricted minimum singular value over the discrete set T Jε to a smooth function. We rely on an exponential smoothing technique that is common in the mathematical literature on statistical physics. Lemma 13.3 (Proposition 13.1: Smoothing the Minimum). Adopt the notation and hypotheses of Proposition 13.1, and let T Jε be the set introduced in Lemma 13.2. Fix a parameter β > 0, and define the soft-min function F via (13.5) Then ¯ ¯ ¯ ¯ 1 ¯ ¯ (13.10) ¯E minε kΦt k2 − E F (Φ)¯ ≤ log(#T Jε ). ¯ t ∈T J ¯ β The bound (13.10) also holds if we replace Φ by Ψ. Proof. This result follows from trivial bounds on the sum in the definition (13.5) of the soft-min function F . The summands are nonnegative, so the sum exceeds its maximum term. Thus, X 2 2 log t ∈T ε e−βkAt k ≥ log maxε e−βkAt k = −β minε kAt k2 . J t ∈T J t ∈T J Similarly, the sum does not exceed the number of summands times the maximum term, so ³ ´ X 2 2 log t ∈T ε e−βkAt k ≤ log (#T Jε ) maxε e−βkAt k = log(#T Jε ) − β minε kAt k2 . J t ∈T J t ∈T J Combine the last two displays and multiply through by the negative number −1/β to reach X 2 1 1 minε kAt k2 − log(#T Jε ) ≤ − log t ∈T ε e−βkAt k ≤ minε kAt k2 . J t ∈T J t ∈T J β β Replace A by the random matrix Φ and take the expectation to reach (13.10). Similarly, we can take A = Ψ to obtain the result for Ψ.  13.4. Proposition 13.1: Exchanging the Entries of the Random Matrix. The last step in the proof of Proposition 13.1 is the hardest. We must demonstrate that the expectation E F (Φ) of the soft-min function does not change very much when we replace the submatrix Φ J c with the submatrix Ψ J c . Lemma 13.4 (Proposition 13.1: Exchanging Entries). Adopt the notation and hypotheses of Proposition 13.1; let T Jε be the set described in Lemma 13.2; and let F be the soft-min function (13.5) with parameter β > 0. Then C(βB 4 + β2 B 6 )mn |E F (Φ) − E F (Ψ)| ≤ . (13.11) k 3/2 The random matrix Ψ is defined in (13.2). Proof. We establish the lemma by replacing the rows of the random matrix Φ by the rows of the random matrix Ψ one at a time. For each i = 1, 2, . . . , m + 1, let Ξ(i ) be the random matrix whose first i − 1 rows are drawn from Ψ and whose remaining rows are drawn from Φ. By construction, Ξ(1) = Φ and Ξ(m + 1) = Ψ. It follows that Xm ¯ ¡ ¢ ¡ ¢¯ |E F (Φ) − E F (Ψ)| ≤ i =1 ¯E F Ξ(i ) − E F Ξ(i + 1) ¯ . We will demonstrate that 4 2 6 ¯ ¡ ¢ ¡ ¢¯ ¯E F Ξ(i ) − E F Ξ(i + 1) ¯ ≤ C(βB + β B )n for i = 1, . . . , m. (13.12) k 3/2 Combining the last two displays, we arrive at the bound (13.11). Fix an index i . By construction, the random matrices Ξ(i ) and Ξ(i + 1) are identical, except in the i th row. To perform the estimate (13.12), it will be convenient to suppress the dependence of the function F on the remaining rows. To that end, define the functions X 2 1 f i : Rn → R via f i (a) := − log t ∈T ε e−β(a·t ) +qi (t ) J β 48 S. OYMAK AND J. A. TROPP where q i : Rn → R via q i (t ) := −β hX j <i (ψ j · t )2 + X j >i i (ϕ j · t )2 . We have written ϕ j and ψ j for the j th rows of Φ and Ψ. With these definitions, ¡ ¢ ¡ ¢ ¡ ¢ ¡ ¢ F Ξ(i ) = f i ϕi and F Ξ(i + 1) = f i ψi . Therefore, the inequality (13.12) is equivalent with ¯ ¡ ¢ ¡ ¢¯¯ C(βB 4 + β2 B 6 )n ¯ ¯E f i ϕi − E f i ψi ¯ ≤ k 3/2 for i = 1, . . . , m. (13.13) Since the matrix Φ is drawn from Model 2.1, the random vector ϕi contains independent, standardized entries whose magnitudes are bounded by B . Meanwhile, the form (13.2) of the matrix Ψ shows that the random vector ψi coincides with ϕi on the components indexed by J , while the entries of ψi indexed by J c are independent standard normal variables. Sublemma 13.5, below, contains the proof of the inequality (13.13).  13.4.1. Lemma 13.4: Comparison Principle for One Row. To complete the argument in Lemma 13.4, we need to control how much a certain function changes when we replace some of the entries of its argument with standard normal variables. The following result contains the required calculation. Sublemma 13.5 (Lemma 13.4: Comparison for One Row). Adopt the notation and hypotheses of Proposition 13.1, and let T Jε be the set defined in Lemma 13.3. Introduce the function f : Rn → R given by f (a) := − X 2 1 log t ∈T ε e−β(a·t ) +q(t ) , J β where q : T Jε → R is an arbitrary function. Suppose that ϕ ∈ Rn is a random vector with independent, standardized entries that are bounded in magnitude by B . Suppose that ψ ∈ Rn is a random vector with ψJ = ϕJ and ψ J c = γ J c , n where γ ∈ R is a standard normal vector. Then 4 2 6 ¯ ¯ ¯E f (ϕ) − E f (ψ)¯ ≤ C(βB + β B )n . k 3/2 (13.14) The proof of Sublemma 13.5 is based on a modern interpretation [MOO10, Cha06, KM11] of the Lindeberg exchange principle [Lin22, Tro59, Rot73]. It is similar in spirit with examples from the paper [KM11]. We apply the following version of the Lindeberg principle, which is adapted from these works. Fact 13.6 (Lindeberg Exchange Principle). Let r : R → R be a function with three continuous derivatives. Let ϕ and ψ be standardized random variables, not necessarily independent, with three finite moments. Then · ¸ ¯ ¯ ¯ ¯ ¯ ¯ ¯E r (ϕ) − E r (ψ)¯ ≤ 1 E |ϕ|3 max ¯r 000 (α)¯ + |ψ|3 max ¯r 000 (α)¯ . |α|≤|ϕ| |α|≤|ψ| 6 The proof of Fact 13.6 involves nothing more than a third-order Taylor expansion of r around the origin. The first- and second-order terms cancel because the random variables ϕ and ψ have mean zero and variance one. With this inequality at hand, we may proceed with the proof of the sublemma. Proof of Sublemma 13.5. Without loss of generality, assume that the index set J = {1, . . . , k}. Indeed, the entries of the random matrix Φ are independent, standardized, and uniformly bounded so it does not matter which set J of columns we distinguish. This choice allows more intuitive indexing. For each fixed index j ∈ {k + 1, . . . , n}, define the interpolating vector ξ j : R → Rn where ξ j (α) := (ϕ1 , . . . , ϕ j −1 , α, ψ j +1 , . . . , ψn ). Introduce the function ¡ ¢ r j : R → R where r j (α) := f ξ j (α) . UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 49 Observe that ¯ ¯ ¯X ¯ ¯ ¡ ¢ ¡ ¢¯¯ Xn ¯E f (ϕ) − E f (ψ)¯ = ¯¯ n E f ξ (ϕ ) − E f ξ (ψ ) ¯ ≤ j =k+1 ¯E r j (ϕ j ) − E r j (ψ j )¯ . j j j j j =k+1 The first identity holds because the sum telescopes. Fact 13.6 shows that · ¯ ¯ ¯ ¯¸ ¯ ¯ ¯E r j (ϕ j ) − E r j (ψ j )¯ ≤ 1 E |ϕ j |3 max ¯¯r 000 (α)¯¯ + |ψ j |3 max ¯¯r 000 (α)¯¯ . |α|≤|ϕ j | j |α|≤|ψ j | j 6 We claim that, for each index j ∈ {k + 1, . . . , n}, · ¯ ¯¸ ¯ 000 ¯ 3 E |ϕ j | max ¯r j (α)¯ ≤ C(βB 4 + β2 B 6 )k −3/2 , |α|≤|ϕ j | · ¯ ¯¸ ¯ 000 ¯ 3 E |ψ j | max ¯r j (α)¯ ≤ C(βB 4 + β2 B 6 )k −3/2 . and (13.15) |α|≤|ψ j | Once we establish the bound (13.15), we can combine the last three displays to reach ¯ ¯ ¯E f (ϕ) − E f (ψ)¯ ≤ C(βB 4 + β2 B 6 )k −3/2 (n − k). The main result (13.14) follows. To establish (13.15), fix an index j ∈ {k + 1, . . . , n}. The forthcoming Sublemma 13.7 will demonstrate that à ! ¯ ¯ ¯ 0 ¯3 ³ ¯ ¯ ¯ ¯3 ´ ¯ 000 ¯ ¯ ¯ β Ev ¯ξ j (α) · v ¯ + β2 Ev ¯ξ j (α) · v ¯ (13.16) ¯r j (α)¯ ≤ C maxε ξ (α) · t t ∈T J ∈ T Jε In this expression, v immaterial. Note that is a random vector that is independent from ξ j ; the precise distribution of v is ¯ ¯3 maxε ¯ξ0 (α) · t ¯ = maxε |t j |3 ≤ k −3/2 . t ∈T J (13.17) t ∈T J Indeed, the derivative ξ0j (α) = e j , where e j is the j th standard basis vector. The last inequality holds because the conditions T Jε ⊂ T J and j ∈ J c allow us to invoke the assumption (13.1). We arrive at the following bound on the quantity of interest from (13.15): · µ · ¸ · ¸¶ ¯ ¯¸ ¯ ¯ ¯ ¯3 ¯ 000 ¯ 3 −3/2 3 2 3 ¯ ¯ ¯ ¯ E |ϕ j | max ¯r j (α)¯ ≤ Ck β E |ϕ j | max ξ j (α) · v + β E |ϕ j | max ξ j (α) · v . (13.18) |α|≤|ϕ j | |α|≤|ϕ j | |α|≤|ϕ j | ¯ ¯ We have merged the bounds (13.16) and (13.17) to control ¯r j (α)¯. Next, we invoked Jensen’s inequality to draw the expectation over v out of the maximum over α. Last, we combined the expectations to reach (13.18). It remains to bound the expectations on the right-hand side. Let us begin with the term in (13.18) that is linear in β. In view of the identity ξ j (α) = αe j + ξ j (0), · ¸ · ¸ ¯ ¯ ¯ ¯¢ ¡ E |ϕ j |3 max ¯ξ j (α) · v ¯ ≤ E |ϕ j |3 max |αv j | + ¯ξ j (0) · v ¯ |α|≤|ϕ j | |α|≤|ϕ j | ¯¢ £ ¤ ¡ ¢¡ ¯ = E |ϕ j |4 |v j | + E |ϕ j |3 E ¯ξ j (0) · v ¯ (13.19) ≤ B 4 k −1/2 + B 3 . We used the assumption that ϕ j is independent from ξ j (0) to factor the expectation in the second term in the second line. The bounds in the third line exploit the fact that |ϕ j | ≤ B and, via the hypothesis (13.1), the fact that v ∈ T J . We also relied on the estimate ¯X ¯ X ¯ ¯ ¯ ¯ E ¯ξ j (0) · v ¯ = E ¯ i < j ϕi v i + i > j ψi v i ¯ ≤ kv k ≤ 1 Indeed, Jensen’s inequality allows us to replace the expectation with the second moment, which simplifies to kv k because {ϕ1 , . . . , ϕ j −1 , ψ j +1 , . . . , ψn } is an independent family of standardized random variables. Since v ∈ T J , the norm kv k does not exceed one. 50 S. OYMAK AND J. A. TROPP Continuing to the term in (13.18) that is quadratic in β2 , we pursue the same approach to see that · ¸ · ¸ ³ ¯ ¯ ¯3 ¯3 ´ 3 3 ¯ 3 ¯ ¯ ¯ E |ϕ j | max ξ j (α) · v ≤ C E |ϕ j | max |αv j | + ξ j (0) · v |α|≤|ϕ j | |α|≤|ϕ j | (13.20) ¡ 6 −3/2 ¢ 6 ≤C B k +B . This bound relies on the Khintchine-type inequality ³ ¯ ¯3 ´1/3 E ¯ξ j (0) · v ¯ ≤ CB kv k ≤ CB. For example, see [Ver12, Cor. 5.12]. We remark that this estimate could be improved if we had additional information about the distribution of the entries of Φ. Substituting the bounds (13.19) and (13.20) into (13.18), we obtain · ¯ ¯¸ £ ¡ ¢ ¡ ¢¤ ¯ 000 ¯ 3 E |ϕ j | max ¯r j (α)¯ ≤ Ck −3/2 β B 4 k −1/2 + B 3 + β2 B 6 k −3/2 + B 6 |α|≤|ϕ j | ≤ C(βB 4 + β2 B 6 )k −3/2 . This establishes the first branch of the claim (13.15). The second branch follows from a similar argument, where we use explicit values for the moments of a standard normal variable instead of the uniform upper bound B .  13.4.2. Sublemma 13.5: Derivative Calculations. The final obstacle in the proof of Proposition 13.1 is to bound the derivatives that are required in Sublemma 13.5. This argument uses some standard methods from statistical physics, and it is similar with the approach in the paper [KM11]. Sublemma 13.7 (Sublemma 13.5: Derivatives). Adopt the notation and hypotheses of Proposition 13.1 and Sublemma 13.5. Let ξ : R → Rn be a linear function, so its derivative ξ0 ∈ Rn is a constant vector. Define the function X ¡ ¢ 2 1 r (α) := f ξ(α) = − log t ∈T ε e−β(ξ(α)·t ) +q(t ) J β where q : T Jε → R is arbitrary. The third derivative of this function satisfies à ! ¯ 000 ¯ ¯ ¯ ¡ ¢ ¯r (α)¯ ≤ 48 max ¯ξ0 · t ¯3 β Ev |ξ(α) · v | + β2 Ev |ξ(α) · v |3 . t ∈T Jε In this expression, v ∈ T Jε is a random vector that is independent from ξ(α). Proof. Introduce a (parameterized) probability measure µα on the set T Jε : µα (t ) := 1 −β(ξ(α)·t )2 +q(t ) e Zα where Zα := X t ∈T Jε e−β(ξ(α)·t ) 2 +q(t ) . We treat the normalizing factor Zα as a function of α, and we write its derivatives as Zα0 , Zα00 , Zα000 . It is convenient to use the statistical mechanics notation for expectation with respect to this measure. For any function h : T Jε → R, X 〈h(t )〉 := t ∈T ε h(t )µα (t ). J For brevity, we always suppress the dependence of 〈·〉 on the parameter α. We often suppress the dependence of ξ on α as well. The function r is proportional to the logarithm of the normalizing factor Zα : 1 r (α) = − log Zα . β Thus, it is straightforward to express the third derivative of r in terms of the derivatives of Zα : à µ ¶00 µ ¶0 µ 0 ¶3 ! Zα0 Zα00 Z 1 Zα0 1 Zα00 (Zα0 )2 1 Zα000 000 r (α) = − =− − =− −3 +2 α . 2 β Zα β Zα β Z Z Z Zα Zα α α α UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 51 By direct calculation, the derivative Zα0 satisfies Zα0 1 X 0 −β(ξ(α)·t )2 +q(t ) ε (−2β)(ξ · t )(ξ(α) · t )e Zα Zα t ∈T J ­ ® = −2β (ξ0 · t )(ξ · t ) . = The second derivative is Zα00 £ ¤ 1 X 0 2 2 0 2 2 −β(ξ(α)·t )2 +q(t ) e ε (−2β)(ξ · t ) + (2β) (ξ · t ) (ξ(α) · t ) t ∈T J Zα Zα ­ ® ­ ® = −2β (ξ0 · t )2 + 4β2 (ξ0 · t )2 (ξ · t )2 . = The third derivative is Zα000 Zα £ ¤ 1 X 2 0 3 3 0 3 3 −β(ξ(α)·t )2 +q(t ) e ε 12β (ξ · t ) (ξ(α) · t ) − 8β (ξ · t ) (ξ(α) · t ) t ∈T J Zα ­ ® ­ ® = 12β2 (ξ0 · t )3 (ξ · t ) − 8β3 (ξ0 · t )3 (ξ · t )3 = We ascertain that £ ­ ® ­ ®­ ®¤ r 000 (α) = β − 12 (ξ0 · t )3 (ξ · t ) + 12 (ξ0 · t )2 (ξ0 · t )(ξ · t ) ®­ ®3 ¤ £ ­ ® ­ ® ­ + β2 8 (ξ0 · t )3 (ξ · t )3 − 24 (ξ0 · t )(ξ · t ) (ξ0 · t )2 (ξ · t )2 + 16 (ξ0 · t )(ξ · t ) . (13.21) This completes the calculation of the exact form of the third derivative of r . Next, we simplify the formula (13.21) using basic probability inequalities for the expectation 〈·〉. First, consider the terms that are linear in β. Observe that E ³ ¯­ 0 3 ¯ ¯ ¯ ´ ®¯ D¯ ¯ (ξ · t ) (ξ · t ) ¯ ≤ ¯ξ0 · t ¯3 |ξ · t | ≤ max ¯ξ0 · t ¯3 〈|ξ · t |〉 . ε t ∈T J Indeed, Jensen’s inequality allows us to draw the absolute value inside the average, and we can invoke Hölder’s inequality to pull out the maximum of the first term. Similarly, since 〈1〉 = 1, ¯­ 0 2 ® ­ 0 ¯ ¯3 ´ ®¯ ³ ¯ (ξ · t ) (ξ · t )(ξ · t ) ¯ ≤ maxε ¯ξ0 · t ¯ 〈|ξ · t |〉 t ∈T J Next, consider the terms that are quadratic in β. The simplest is ¯­ 0 3 ¯ ¯ ´­ ®¯ ³ ® ¯ (ξ · t ) (ξ · t )3 ¯ ≤ max ¯ξ0 · t ¯3 |ξ · t |3 . ε t ∈T J Using Jensen’s inequality, we find that ¯­ ³ ¯ ¯3 ´ ¯ ¯3 ´ ­ ®3 ¯¯ ³ ® ¯ 0 |ξ · t |3 . ¯ (ξ · t )(ξ · t ) ¯ ≤ maxε ¯ξ0 · t ¯ 〈|ξ · t |〉3 ≤ maxε ¯ξ0 · t ¯ t ∈T J t ∈T J Last, using Lyapunov’s inequality twice, ¯­ 0 ¯ ¯ ´ ¯ ¯ ´­ ®­ ®¯ ³ ­ ® ³ ® ¯ (ξ · t )(ξ · t ) (ξ0 · t )2 (ξ · t )2 ¯ ≤ max ¯ξ0 · t ¯3 〈|ξ · t |〉 |ξ · t |2 ≤ max ¯ξ0 · t ¯3 |ξ · t |3 . ε ε t ∈T J t ∈T J Introduce the last five displays into (13.21) to arrive at the bound ¯ ¯ ´¡ ¯ 000 ¯ ³ ­ ®¢ ¯r (α)¯ ≤ max ¯ξ0 · t ¯3 24β 〈|ξ · t |〉 + 48β2 |ξ · t |3 . ε t ∈T J (13.22) Last, we want to replace the averages with respect to µα by averages with respect to a simpler probability measure that does not depend on ξ(α). This argument relies on a correlation inequality. Define another probability measure µ∗ on the set T Jε : µ∗ (t ) := 1 q(t ) e Z∗ where Z∗ := X t ∈T Jε eq(t ) . 52 S. OYMAK AND J. A. TROPP Write 〈·〉∗ for averages with respect to this new measure. First, consider the average 1 X −β(ξ·t )2 +q(t ) ε |ξ · t | e Zα t ∈T J Z∗ 1 X −β(ξ·t )2 q(t ) = e ε |ξ · t | e Zα Z∗ t ∈T J E 2 Z∗ D |ξ · t | e−β(ξ·t ) . = ∗ Zα 〈|ξ · t |〉 = Let X := |ξ · t | be the random variable obtained by pushing forward the measure µ∗ from T Jε to the nonnegative real line. Since x 7→ x is increasing and x 7→ exp(−βx 2 ) is decreasing, Chebyshev’s association inequality [BLM13, Thm. 2.14] provides that D E D E 2 2 Zα 1 X −β(ξ·t )2 +q(t ) |ξ · t | e−β(ξ·t ) = 〈|ξ · t |〉∗ . ≤ 〈|ξ · t |〉∗ e−β(ξ·t ) = 〈|ξ · t |〉∗ εe ∗ ∗ Z∗ t ∈T J Z∗ In summary, 〈|ξ · t |〉 ≤ 〈|ξ · t |〉∗ . (13.23) ­ ® ­ ® |ξ · t |3 ≤ |ξ · t |3 ∗ . (13.24) The same argument shows that Introduce (13.23) and (13.24) into the bound (13.22) to reach the inequality ³ ¯ ¯3 ´ ¡ ­ ® ¢ r 000 (α) ≤ 48 maxε ¯ξ0 · t ¯ β 〈|ξ · t |〉∗ + β2 |ξ · t |3 ∗ . t ∈T J The statement of the result follows when we reinterpret the averages with respect to µ∗ as expectations with respect to a random vector v ∈ T Jε with distribution Z∗−1 e−q(t ) .  14. T HEOREM 9.1: B OUNDING THE R ESTRICTED S INGULAR VALUE BY THE E XCESS W IDTH In Section 13, we showed that the restricted singular value σmin (Φ; T J ) of the random matrix Φ does not change very much if we replace Φ with a hybrid matrix Ψ, defined in (13.2), that contains many standard normal random variables. Our next goal is to relate the restricted singular value σmin (Ψ; T J ) of the hybrid matrix to the excess width of the set T J . Proposition 14.1 (Theorem 9.1: Excess Width Bound). Let Φ be an m × n random matrix from Model 2.1 with magnitude bound B , and let Γ be an m ×n random matrix with independent, standard normal entries. Let J be a subset of {1, . . . , n} with cardinality k, and let T J be a closed subset of Bn . Introduce the m × n random matrix Ψ := Ψ(J ) from (13.2). Then p ´2 ° °2 ³ E σ2min (Ψ; T J ) = E min °Φ J t J + Γ J c t J c ° ≥ Em (T J ) − CB 2 k . (14.1) t ∈T J + Furthermore, if T J is convex and k ≥ m 1/2 , p ´2 ° °2 ³ E σ2min (Ψ; T J ) = E min °Φ J t J + Γ J c t J c ° ≤ Em (T J ) + CB 2 k . t ∈T J + (14.2) To obtain this result, we will invoke the Gaussian Minimax Theorem [Gor85, Gor88] to reduce the random matrix bounds to simpler bounds involving random vectors. This approach has been used to study the ordinary singular values of a Gaussian matrix [DS01, Sec. 2.3]. It also plays a role in the analysis of restricted singular values of Gaussian matrices [Sto13, OTH13, TOH15]. The application here is complicated significantly by the presence of the non-Gaussian matrix Φ J . UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 53 14.1. Proof of Proposition 14.1. The proof of Proposition 14.1 involves several steps, so it is helpful once again to summarize the calculations that are required. First, let us explain the process by which we obtain the lower bound for a general closed subset T J of the Euclidean unit ball Bm . We will argue that µ ¶ ° °2 ° ° 2 ° ° ° ° E min Φ J t J + Γ J c t J c ≥ E min Φ J t J + Γ J c t J c (Jensen) t ∈T J t ∈T J + µ ¶2 ° ¡° ¢ ° ° ≥ E min Φ J t J + h kt J c k + g J c · t J c − 2 t ∈T J (Lemma 14.5) + µ ¶ p 2 ¢ ¡p 2 c c ≥ E min m kt k + g J · t J − CB k t ∈T J (Lemma 14.7) + µ ¶ p 2 ¡p ¢ ≥ E min m kt k + g · t − CB 2 k t ∈T J ³ p ´2 = Em (T J ) − CB 2 k . (Lemma 14.8) + (Definition 4.2) + In the first line, we pass from the expected square to the square of the expectation, which reduces the technical complexity of the rest of the argument. Next, we replace the m × n Gaussian matrix Γ with an expectation over two independent standard normal vectors h ∈ Rm and g ∈ Rn . Third, we remove the remaining piece Φ J of the original random matrix to arrive at a formula involving only the random vector g . Finally, we replace the missing coordinates in the random vector g to obtain a bound in terms of the excess width Em (T J ). We arrive at the inequality (14.1). The upper bound follows from a similar calculation. Assuming that T J is convex, we may calculate that µ ¶2 ° °2 ° ° 1/4 ° ° ° ° E min Φ J t J + Γ J c t J c ≤ E min Φ J t J + Γ J c t J c + CB m (Lemma 14.2) t ∈T J t ∈T J + µ ¶2 ° ¡° ¢ 1/4 ° ° ≤ E min Φ J t J + h kt J c k + g J c · t J c + CB m t ∈T J (Lemma 14.6) + ¶ µ p 2 ¡p ¢ 2 ≤ E min m kt k + g J c · t J c + CB k t ∈T J (Lemma 14.7) + µ ¶ p 2 ¡p ¢ 2 ≤ E min m kt k + g · t + CB k t ∈T J ³ p ´2 = Em (T J ) + CB 2 k . (Lemma 14.9) + + (Definition 4.2) The first step is a type of Poincaré inequality, which requires some specialized concentration results for the restricted singular value of the hybrid matrix. The second step of this chain involves a convex duality argument that is not present in the proof of the lower bound (14.1). We have used the assumption that k ≥ m 1/2 to simplify the error term when we pass from the second line to the third. Altogether, this yields the bound (14.2). 14.2. Proposition 14.1: Moment Comparison Inequality for the Hybrid RSV. We require a moment comparison inequality to pass from the expected square of the restricted singular value of the hybrid matrix to the expectation of the restricted singular value itself. Lemma 14.2 (Proposition 14.1: Moment Comparison). Adopt the notation and hypotheses of Proposition 14.1. Then µ ¶2 ° °2 ° ° 1/4 ° ° ° ° E min Φ J t J + Γ J c t J c ≤ E min Φ J t J + Γ J c t J c + CB m . t ∈T J t ∈T J Proof. Define the random variable ° ° X := min °Φ J t J + Γ J c t J c ° . t ∈T J 54 S. OYMAK AND J. A. TROPP We need a bound for E X 2 . We obtain this result by applying a moment comparison inequality for Φ, conditional on Γ, and then we apply a moment comparison inequality for Γ. Sublemma 14.3, applied conditionally, with the choice A = Γ, gives h¡ £ £ ¤¤ ¢2 i E X 2 = E E X 2 | Γ ≤ E E[X | Γ] + CB m 1/4 . The function Γ 7→ E[X | Γ] + CB m 1/4 is 1-Lipschitz, so the Gaussian variance inequality, Fact A.1, implies that h¡ ¢2 i ¡ ¢2 E E[X | Γ] + CB m 1/4 ≤ E X + CB m 1/4 + 1.  Combine the last two displays, and adjust the constant to complete the proof. The proof of Lemma 14.2 requires a separate moment comparison result for a random variable that depends only on the original matrix Φ J . Sublemma 14.3 (Lemma 14.2: Moment Comparison for Original Matrix). Adopt the notation and hypotheses of Lemma 14.2. For a fixed m × n matrix A, µ ¶2 ° °2 ° ° 1/4 ° ° ° ° c c c c E min Φ J t J + A J t J ≤ E min Φ J t J + A J t J + CB m . (14.3) t ∈T J t ∈T J Proof. Define the random variable ° ° X := min °Φ J t J + A J c t J c ° . t ∈T J First, observe that ¡ ¢ ¡ ¢ ¡ ¢ (E X 2 )1/2 − E X = (E X 2 )1/2 − E X + = E X − (E X 2 )1/2 − ≤ E X − (E X 2 )1/2 − . (14.4) The last inequality is Jensen’s. We can use concentration to bound this quantity. Mutatis mutandis, repeat the proof of equation (11.1) from Proposition 11.1 to see that, for all ζ ≥ 0, © ª 2 P X 2 ≤ E X 2 − CB 2 ζ ≤ e−ζ /m . Invoke the subadditivity of the square root and change variables: © ª 4 P X ≤ (E X 2 )1/2 − CB ζ ≤ e−ζ /m . Jensen’s inequality and integration by parts deliver Z ∞ Z © ª ¡ ¢ 2 1/2 2 1/2 E X − (E X ) P X − (E X ) ≤ −ζ dζ ≤ −= 0 ∞ 0 e−ζ (14.5) 4 /(CB 4 m) dζ ≤ CB m 1/4 . The third inequality follows from (14.5). Introduce the last display into (14.4) to reach (E X 2 )1/2 − E X ≤ CB m 1/4 . Rearrange this relation to complete to proof of (14.3).  14.3. Proposition 14.1: The Role of the Gaussian Minimax Theorem. To prove Proposition 14.1, we must replace the Gaussian matrix in the quantity of interest with a pair of Gaussian vectors. The key to this argument is the following technical result. Lemma 14.4 (Proposition 14.1: Application of Gaussian Minimax Theorem). Adopt the notation and hypotheses of Proposition 14.1. Let A be a fixed m × n matrix, and let g ∈ Rn and h ∈ Rm be independent standard normal random vectors. Then, for all ζ ∈ R, ½ ¾ ½ ¾ ° ° ° ¡° ¢ P min ° A J t J + Γ J c t J c ° ≤ ζ ≤ 2 P min ° A J t J + h kt J c k° + g J c · t J c ≤ ζ . (14.6) t ∈T J t ∈T J Furthermore, if T J is convex and ζ ≥ 0, ½ ¾ ½ ¾ ° ° ° ¡° ¢ ° ° ° ° P min A J t J + Γ J c t J c ≥ ζ ≤ 2 P min A J t J + h kt J c k + g J c · t J c ≥ ζ . t ∈T J If ζ ≤ 0, the left-hand side is trivially equal to one. t ∈T J (14.7) UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 55 This result depends on the Gaussian Minimax Theorem [Gor85]; see Fact A.3 for a statement. Lemma 14.4 is similar with early results of Gordon [Gor88, Cor. 1.2]. The detailed argument here is adapted from [TOH15, Thm. 2.1]; see also Stojnic [Sto13]. Proof. The basic idea is to express the quantity of interest as the value of a saddle-point problem: ° ° ¡ ¢ c tJc . min ° A J t J + Γ J c t J c ° = min max u · A t + Γ J J J m t ∈T J t ∈T J u∈B Then we apply the Gaussian Minimax Theorem to obtain probabilistic lower bounds. When T J is convex, we can also invoke convex duality to interchange the minimum and maximum, which leads to complementary bounds. To proceed with this approach, however, it is convenient to work with a slightly different minimax problem. Define the deterministic function λ(t , u) = u · (A J t J ) for t ∈ T J and u ∈ Bm . Let γ be a standard normal random variable, independent from everything else. Introduce two centered Gaussian processes: X (t , u) := u · (Γ J c t J c ) + kuk kt J c k γ and Y (t , u) := (u · h) kt J c k + kuk (g · t J c ) indexed by t ∈ T J and u ∈ Bm . Let us verify that these processes satisfy the conditions required by the Gaussian Minimax Theorem, Fact A.3. First, for all parameters t ∈ T J and u ∈ Bm , E X (t , u)2 = 2 kuk2 kt J c k2 = E Y (t , u)2 . (14.8) Second, for all parameters t , t 0 ∈ T J and u, u 0 ∈ Bm , ¢ £ ¤ £ ¤ ¡ ¢¡ E X (t , u)X (t 0 , u 0 ) − E Y (t , u)Y (t 0 , u 0 ) = kuk ku 0 k − u · u 0 kt J c k kt J0 c k − t J c · t J0 c . By the Cauchy–Schwarz inequality, £ ¤ £ ¤ E X (t , u)X (t , u 0 ) = E Y (t , u)Y (t , u 0 ) ; £ ¤ £ ¤ E X (t , u)X (t 0 , u) = E Y (t , u)Y (t 0 , u) ; £ ¤ £ ¤ E X (t , u)X (t 0 , u 0 ) ≥ E Y (t , u)Y (t 0 , u 0 ) . (14.9) (14.10) (14.11) The formulas (14.8), (14.9), and (14.11) verify the conditions of the Gaussian Minimax Theorem. Fact A.3 delivers the bound ¾ ½ ¾ ½ ¡ ¢ ¡ ¢ P min max λ(t , u) + X (t , u) > ζ ≥ P min max λ(t , u) + Y (t , u) > ζ . (14.12) m m t ∈T J u∈B t ∈T J u∈B This estimate does involve a small technicality. We can only apply the Gaussian Minimax Theorem to a finite subset of T J × Bm , so we must make an approximation argument to pass to the entire set. We omit the details. Now, let us determine the values of the saddle-point problems in (14.12). First, ¡ ¢ ¡ ¢ min max λ(t , u) + X (t , u) = min max u · (A J t J + Γ J c t J c ) + kuk kt J c k γ m m t ∈T J u∈B t ∈T J u∈B ° ¡° ¢ (14.13) = min ° A J t J + Γ J c t J c ° + kt J c k γ + . t ∈T J Similarly, ° ¡ ¢ ¡° ¢ min max λ(t , u) + Y (t , u) ≥ min ° A J t J + h kt J c k° + g J c · t J c . m t ∈T J u∈B t ∈T J 56 S. OYMAK AND J. A. TROPP Next, we remove the term involving γ from the right-hand side of (14.13). To do so, we condition on γ > 0 and γ ≤ 0 and calculate that ½ ¾ ½ ¾ ° ¡ ¢ ¡° ¢ ° A J t J + Γ J c t J c ° + kt J c k γ > ζ P min max λ(t , u) + X (t , u) > ζ = P min max + t ∈T J u∈Bm t ∈T J u∈Bm ½ ¾ ¯ ° ¡° ¢ 1 1 ¯ ° ° c c c kt k ≤ + P min A J t J + Γ J t J + J γ + > ζ ¯ γ ≤ 0 t ∈T J 2 2 ½ ¾ °¢ ¡° 1 1 ° ° ≤ + P min A J t J + Γ J c t J c + > ζ t ∈T J 2 2 ½ ¾ ° ° 1 1 ° ° = + P min A J t J + Γ J c t J c > ζ . t ∈T J 2 2 On the other hand, ½ ¾ ½ ¾ ° ¡ ¢ ¡° ¢ ° ° P min max λ(t , u) + Y (t , u) > ζ ≥ P min A J t J + h kt J c k + g J c · t J c > ζ . m t ∈T J u∈B t ∈T J Introduce the last two displays into (14.12) to reach ½ ¾ ½ ¾ ° ° ° ¡° ¢ 1 1 ° ° ° ° + P min A J t J + Γ J c t J c > ζ ≥ P min A J t J + h kt J c k + g J c · t J c > ζ . t ∈T J t ∈T J 2 2 Take the complements of both probabilities and rearrange to conclude that (14.6) is correct. The second result (14.7) requires an additional duality argument. If we replace the function λ and the random processes X and Y with their negations, all of the variance calculations above remain valid. In particular, the relations (14.8), (14.10), and (14.11) permit us to apply Fact A.3 with the roles of T J and Bm reversed. This step yields ½ ¾ ½ ¾ ¡ ¢ ¡ ¢ P minm max − λ(t , u) − X (t , u) > −ζ ≥ P minm max − λ(t , u) − Y (t , u) > −ζ . u∈B t ∈T J u∈B t ∈T J Let us examine the saddle-point problems. Since −λ − X is bilinear and the sets Bm and T J are compact and convex, the Sion Minimax Theorem [Sio58] allows us to interchange the minimum and maximum. Thus ¡ ¢ ¡ ¢ minm max − λ(t , u) − X (t , u) = max minm − λ(t , u) − X (t , u) t ∈T J u∈B u∈B t ∈T J ¡ ¢ = − min max λ(t , u) + X (t , u) m t ∈T J u∈B ° ¡° ¢ = − min ° A J t J + Γ J c t J c ° + kt J c k γ + . t ∈T J Similarly, ° ¡ ¢ ¡° ¢ minm max − λ(t , u) − Y (t , u) = − min ° A J t J + h kt J c k° + g J c · t J c + . u∈B t ∈T J t ∈T J Combining the last three displays, we reach ½ ¾ ½ ¾ ° ° ¡° ¢ ¡° ¢ ° ° ° ° P min A J t J + Γ J c t J c + kt J c k γ + < ζ ≥ P min A J t J + h kt J c k + g J c · t J c + < ζ . t ∈T J t ∈T J Proceeding as before, conditioning on the sign of γ, we may remove the dependence on γ from the left-hand side to obtain ½ ¾ ½ ¾ ° ° ° ¡° ¢ ° ° ° ° c c c c c P min A J t J + Γ J t J ≥ ζ ≥ 2P min A J t J + h kt J k + g J · t J + ≥ ζ . t ∈T J t ∈T J Clearly, this inequality is useful only for ζ ≥ 0 in which case the right hand side is equal to ½ ¾ ° ° ° ° c c c 2P min A J t J + h kt J k + g J · t J ≥ ζ . t ∈T J We confirm that (14.7) is true.  UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 57 14.4. Proposition 14.1: Reducing the Gaussian Matrix to Some Gaussian Vectors. Our next goal is to convert the probability bounds from Lemma 14.4 into expectation bounds. Lemma 14.5 gives a lower bound that is valid for every subset T J of the unit ball, and Lemma 14.6 gives an upper bound that is valid when T J is also convex. Lemma 14.5 (Proposition 14.1: Reducing the Gaussian Matrix—Lower Bound). Adopt the notation and hypotheses of Proposition 14.1. Let A be a fixed m × n matrix, and let g ∈ Rn and h ∈ Rm be independent standard normal vectors. Then ° ° ° ¡° ¢ E min ° A J t J + Γ J c t J c ° ≥ E min ° A J t J + h kt J c k° + g J c · t J c − 2. (14.14) t ∈T J t ∈T J In particular, ° ° ° ¡° ¢ E min °Φ J t J + Γ J c t J c ° ≥ E min °Φ J t J + h kt J c k° + g J c · t J c − 2. t ∈T J t ∈T J Proof. We make the abbreviations ° ° X := min ° A J t J + Γ J c t J c ° t ∈T J ° ¡° ¢ and Y := min ° A J t J + h kt J c k° + g J c · t J c . t ∈T J First, note that E Y − E X ≤ (E Y − E X )+ = (E X − E Y )− ≤ E(X − E Y )− . The last inequality is Jensen’s. To bound the right-hand side, we use integration by parts and formula (14.6) from Lemma 14.4: Z ∞ Z ∞ E(X − E Y )− = P {X − E Y ≤ −ζ} dζ ≤ 2 P {Y − E Y ≤ −ζ} dζ = 2 E(Y − E Y )− . 0 0 Finally, we make the estimates E[(Y − E Y )− ] ≤ Var[Y ]1/2 ≤ 1. The last inequality follows from the Gaussian variance inequality, Fact A.1. Indeed, the function (g , h) 7→ Y (g , h) is 1-Lipschitz because the set T J is contained in the unit ball. In summary, E Y − E X ≤ E(X − E Y )− ≤ 2 E(Y − E Y )− ≤ 2.  We arrive the advertised bound (14.14). Lemma 14.6 (Proposition 14.1: Reducing the Gaussian Matrix—Upper Bound). Adopt the notation and hypotheses of Proposition 14.1. Let A be a fixed m × n matrix, and let g ∈ Rn and h ∈ Rm be independent standard normal vectors. Then ° ° ° ¡° ¢ E min ° A J t J + Γ J c t J c ° ≤ E min ° A J t J + h kt J c k° + g J c · t J c + 2. t ∈T J t ∈T J In particular, ° ° ° ¡° ¢ E min °Φ J t J + Γ J c t J c ° ≤ E min °Φ J t J + h kt J c k° + g J c · t J c + 2. t ∈T J t ∈T J Proof. We follow the same pattern as in Lemma 14.5. Using the same notation, we calculate that E X − E Y ≤ (E X − E Y )+ ≤ E(X − E Y )+ ≤ 2 E(Y − E Y )+ ≤ 2. In this case, we invoke (14.7) from Lemma 14.4 to obtain the penultimate inequality.  58 S. OYMAK AND J. A. TROPP 14.5. Proposition 14.1: Removing the Remaining Part of the Original Random Matrix. The next step in the proof of Proposition 14.1 is to remove the remaining section of the random matrix Φ from the bounds in Lemmas 14.5 and 14.6. Lemma 14.7 (Proposition 14.1: Removing the Original Matrix). Adopt the notation and hypotheses of Proposition 14.1. Let X be an m × n random matrix with independent, standardized entries that satisfy Assumption B.1. Then ¯ ¯ p ¯ ° ¢¯ ¡° ¢ ¡p ¯E min ° X J t J + h kt J c k° + g J c · t J c − E min m kt k + g J c · t J c ¯ ≤ CB 2 k. ¯ ¯ t ∈T J t ∈T J In particular, this conclusion is valid when X = Φ. £ ¤ Proof. Abbreviate Ψ := X J h . Observe that ¸ · tJ X J t J + h kt J c k = Ψ kt J c k and °· ¸° ° tJ ° ° ° ° kt J c k ° = kt k . Therefore, we have the deterministic bounds ° ° σmin (Ψ) kt k ≤ ° X J t J + h kt J c k° ≤ σmax (Ψ) kt k . (14.15) The m × (k + 1) random matrix Ψ has independent, standardized entries that satisfy (B.1). For all ζ ≥ 0, Fact B.1 shows that its extreme singular values satisfy the probability bounds n o p p 2 4 P σmax (Ψ) ≥ m + C0 B 2 k + ζ ≤ e−c0 ζ /B , and o n (14.16) p p 2 4 P σmin (Ψ) ≤ m − C0 B 2 k − ζ ≤ e−c0 ζ /B . p These inequalities allow us to treat the singular values of Ψ as if they were equal to m. We may now perform the following estimates: ° ¡° ¢ ¡ ¢ E min ° X J t J + h kt J c k° + g J c · t J c ≤ E min σmax (Ψ) kt k + g J c · t J c t ∈T J t ∈T J ¸ · ¢ ¡ ¡p p ¢ ≤ E min m kt k + g J c · t J c + σmax (Ψ) − m + max kt k t ∈T J t ∈T J ¡p ¢ ¡ p ¢ ≤ E min m kt k + g J c · t J c + E σmax (Ψ) − m + . t ∈T J p The first inequality is (14.15). Then we add and subtract m from the maximum singular value. Last, we p 2 recall that T J is a subset of the unit ball. Set α := C0 B k, and calculate that Z ∞ ¡ © ª p ¢ p E σmax (Ψ) − m + = P σmax (Ψ) − m ≥ ζ dζ Z0 α Z ∞ © ª p (14.17) ≤ dζ + P σmax (Ψ) − m ≥ α + ζ dζ 0 Z ∞ 0 2 4 ≤ α+ e−c0 ζ /B dζ = α + CB 2 . 0 We split the integral at α, and we change variables in the second integral. For the first integral, we use the trivial bound of one on the probability. Then we invoke the probability inequality (14.16). Combining the last two displays and collecting constants, we arrive at p ° ¡° ¢ ¡p ¢ E min ° X J t J + h kt J c k° + g J c · t J c ≤ E min m kt k + g J c · t J c + CB 2 k. t ∈T J t ∈T J An entirely similar argument delivers a matching lower bound. Together, these estimates complete the proof.  UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 59 14.6. Proposition 14.1: Replacing the Coordinates Missing from the Excess Width. The last step in the proof of Proposition 14.1 is to examine the excess-width-like functional from Lemma 14.7 that involves the term g J c · t J c . We must show that this term does not change very much if we reintroduce the coordinates listed in J . Lemma 14.8 gives the easy proof of the lower bound. Lemma 14.9 contains the upper bound. Lemma 14.8 (Proposition 14.1: Missing Coordinates—Lower Bound). Adopt the notation and hypotheses of Proposition 14.1. Then ¢ ¢ ¡p ¡p E min m kt k + g J c · t J c ≥ E min m kt k + g · t . t ∈T J t ∈T J Proof. This result is an immediate consequence of Jensen’s inequality: ¡p ¢ ¢ ¡p E min m kt k + g J c · t J c = E min m kt k + g J c · t J c + Eg J (g J · t J ) t ∈T J t ∈T J ¡p ¢ ≥ E min m kt k + g J c · t J c + g J · t J t ∈T J ¢ ¡p = E min m kt k + g · t t ∈T J We rely on the fact that g J and g J c are independent standard normal vectors.  Lemma 14.9 (Proposition 14.1: Missing Coordinates—Upper Bound). Adopt the notation and hypotheses of Proposition 14.1. Then ¡p ¢ p ¢ ¡p E min m kt k + g J c · t J c ≤ E min m kt k + g · t + k. t ∈T J t ∈T J Proof. This calculation is also easy: ¡p ¢ ¢ ¡p E min m kt k + g J c · t J c = E min m kt k + g · t − g J · t J t ∈T J t ∈T J ≤ E min ¡p ¢ m kt k + g · t + E kg J k ≤ E min ¡p ¢ p m kt k + g · t + k. t ∈T J t ∈T J In the last step, we have used the fact that #J = k.  15. P ROOF OF C OROLLARY 10.1 FROM T HEOREM 9.1 BY T RUNCATION In this section, we show how to establish Corollary 10.1 as a consequence of Theorem 9.1. The proof depends on a truncation argument. 15.1. Proof of Corollary 10.1. Fix parameters p > 4 and ν ≥ 1. Assume that Φ is an m × n matrix that follows Model 2.4 with parameters p and ν. Let T be a compact subset of the unit ball Bn . We will prove the lower bound for the minimum singular value of Φ restricted to T . When T is convex, an entirely similar approach yields the corresponding upper bound. Fix a truncation parameter R that satisfies R p/2−1 ≥ 2νp/2 . Decompose the random matrix Φ as Φ = Φtrunc + Φtail by applying the truncation described below in Lemma 15.1 separately to each entry of Φ. This procedure ensures that Φtrunc contains independent, symmetric, standardized entries, each bounded by 2R. In other words, Φtrunc follows Model 2.1 with B = 2R. The tail Φtail contains independent, centered entries, each with variance bounded by Cνp R 2−p and whose pth moment is bounded by (2ν)p . We can control the restricted singular values of Φ using the triangle inequality: σmin (Φ; T ) = min kΦt k ≥ min kΦtrunc t k − kΦtail k = σmin (Φtrunc ; T ) − kΦtail k . t ∈T t ∈T (15.1) We bound the restricted singular value of the bounded matrix Φtrunc using Theorem 9.1. To bound kΦtail k, we apply a simple norm estimate, Fact B.2, based on the matrix Rosenthal inequality [Tro15c, Thm. I]. 60 S. OYMAK AND J. A. TROPP Since Φtrunc follows Model 2.1 with B = 2R, Theorem 9.1(1) and (2) give the probability bound o n ¡ ¢2 2 P σ2min (Φtrunc ; T ) ≤ Em (T ) + − CR 2 (m + n)0.92 − CR 2 ζ ≤ e−ζ /(m+n) . Select ζ = (m + n)0.92 to make the tail probability negligible: n o ¡ ¢2 0.84 P σ2min (Φtrunc ; T ) ≤ Em (T ) + − CR 2 (m + n)0.92 ≤ e−(m+n) . Taking square roots inside the event, we reach © ¡ ¢ ª 0.84 P σmin (Φtrunc ; T ) ≤ Em (T ) + − CR(m + n)0.46 ≤ e−(m+n) . (15.2) This step depends on the subadditivity of the square root. Meanwhile, the entries of Φtail are centered, have variances at most Cνp R 2−p , and have pth moments bounded by (2ν)p . Therefore, we can apply the norm bound for heavy-tailed random matrices, Fact B.2, to see that ½ ¾ q ¡ ¢ 2/p p 2−p P kΦtail k ≥ C ν R (m + n) log(m + n) + Cν(m + n) log(m + n) ζ ≤ ζ−p . Define the positive quantity ε via the relation 4(1 + ε) := p. Select ζ = (m + n)ε/p to obtain q n o P kΦtail k ≥ Cνp/2 R 1−p/2 (m + n) log(m + n) + Cν(m + n)(2+ε)/p log(m + n) ≤ (m + n)−ε . (15.3) p The key point here is that we can arrange for kΦtail k to have order o( m + n) with high probability. Combine (15.1), (15.2), and (15.3) to reach n ¡ ¢ P σmin (Φ; T ) ≤ Em (T ) + − CR(m + n)0.46 q o − Cνp/2 R 1−p/2 (m + n) log(m + n) − Cν(m + n)(2+ε)/p log(m + n) 0.84 ≤ e−(m+n) + (m + n)−ε . Set the truncation parameter R = ν(m + n)0.02/(1+ε) to equate the exponents on m + n in the two terms that depend on R. Then simplify using p = 4(1 + ε) to obtain © ¡ ¢ ¡ ¢ ª P σmin (Ψ; T ) ≤ Em (T ) + − Cν (m + n)0.5−0.02(1+2ε)/(1+ε) + (m + n)0.5−(ε/4)/(1+ε) log(m + n) ≤ e−(m+n) 0.84 + (m + n)−ε . Note that both powers in the event are bounded away from 1/2, so we can absorb the logarithm by increasing the power slightly. Furthermore, we can introduce a function κ(p) that is strictly positive for p > 4 to reach the inequality © ¡ ¢ ª 0.84 P σmin (Ψ; T ) ≤ Em (T ) + − Cp ν(m + n)0.5−κ(p) ≤ e−(m+n) + (m + n)1−p/4 . The constant Cp depends only on the parameter p. The exponential vanishes faster than any polynomial, so we can combine the terms on the right-hand side to complete the proof of (10.1). For the upper bound, we use Theorem 9.1(3) to control the expectation of the restricted singular value. In this case, the error term in the expectation bound becomes R 4 (m + n)0.94 . This change presents no new difficulties, and we arrive at the result (10.2) by a slight modification of the argument. 15.2. Corollary 10.1: Truncation of Individual Random Variables. In this section, we describe a truncation procedure for scalar random variables. The arguments here are entirely standard, but we include details for completeness. UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 61 Lemma 15.1 (Corollary 10.1: Truncation). Let ϕ be a random variable that satisfies the properties listed in Model 2.4. Let R be a parameter that satisfies R p/2−1 ≥ 2νp/2 . Then we have the decomposition ϕ = ϕtrunc + ϕtail (15.4) where E ϕtrunc = 0, E ϕ2trunc = 1, and E ϕtail = 0, E ϕ2tail ≤ 6νp , R p−2 and and |ϕtrunc | ≤ 2R E |ϕtail |p ≤ (2ν)p . Proof. Define the random variable £ ¤ ϕ1{|ϕ| ≤ R} where α2 := E ϕ2 1{|ϕ| ≤ R} . α Since ϕ is standardized and symmetric, ϕtrunc is also standardized and symmetric. To ensure that the decomposition (15.4) holds, we must set ϕtrunc := 1−α ϕ1{|ϕ| ≤ R}. (15.5) α The random variable ϕtail is also centered because of the symmetry of ϕ. To establish the other properties of ϕtrunc and ϕtail , we need to calculate some expectations. First, using integration by parts and Markov’s inequality, Z R Z ∞ £ 2 ¤ E ϕ 1{|ϕ| > R} = 2ζP {|ϕ| > R} dζ + 2ζP {|ϕ| > ζ} dζ 0 R (15.6) Z R Z ∞ E |ϕ|p E |ϕ|p 2νp 2ζ p dζ ≤ p−2 . ≤ 2ζ p dζ + R ζ R 0 R ϕtail := ϕ1{|ϕ| > R} − In the last step, we used the assumption that p ≥ 4. A similar calculation shows that Z R £ ¤ α2 = E ϕ2 1{|ϕ| ≤ R} = 2ζP {|ϕ| > ζ} dζ 0 Z ∞ Z ∞ 2ζP {|ϕ| > ζ} dζ 2ζP {|ϕ| > ζ} dζ − = R 0 £ ¤ ≥ E ϕ2 − 2νp νp ≥ 1 − . (p − 2)R p−2 R p−2 The last relation holds because ϕ is standardized. It follows that α ≥ 1− νp/2 R p/2−1 1 ≥ . 2 (15.7) The last estimate holds because p ≥ 4 and of the assumption R p/2−1 ≥ 2νp/2 . We are now prepared to verify the uniform bound on ϕtrunc : ¯ ¯ ¯ ϕ1{|ϕ| ≤ R} ¯ R ¯ ¯ ≤ ≤ 2R. |ϕtrunc | = ¯ ¯ α α The last inequality follows from (15.7). Next, we need to bound the variance of ϕtail . We have µ ¶ µ p/2 p/2−1 ¶2 £ ¤ £ ¤ ¤ 2νp £ ¤ 6νp 1−α 2 £ 2 ν /R E ϕ2tail = E ϕ2 1{|ϕ| > R} + E ψ2 ≤ p−2 . E ϕ 1{|ϕ| ≤ R} ≤ p−2 + α R 1/2 R The first identity holds because the two indicators are orthogonal random variables. The second relation uses the expectation calculation (15.6) and the estimate (15.7); we have dropped the indicator in the second expectation. The last estimate holds because ϕ is standardized. 62 S. OYMAK AND J. A. TROPP Last, we need to check the moment inequality for ϕtail . This estimate follows by applying the triangle inequality to the definition (15.5): ¡ ¢1/p ¡ ¢1/p 1 − α ¡ ¢1/p 1 ¡ ¢1/p E |ϕtail |p ≤ E |ϕ|p + E |ϕ|p = E |ϕ|p ≤ 2ν. α α We have dropped the indicators after invoking the triangle inequality. Finally, we introduced the estimate (15.7).  UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 63 Part IV. Universality of the Embedding Dimension: Proof of Theorem I(b) This part of the paper develops a condition under which the random projection of a set fails with high probability. This argument establishes the second part of the universality law for the embedding dimension, Theorem I(b). Section 16 contains the main technical result, a condition under which a bounded random matrix maps a point in a set to the origin. Section 17 extends this argument to the heavy-tailed random matrix model, Model 2.4. In Section 17.2, we use the latter result to derive Theorem I(b). The remaining parts of the section lay out the supporting argument. 16. W HEN E MBEDDING FAILS FOR A B OUNDED R ANDOM M ATRIX In this section, we introduce a functional whose value determines whether a linear transformation maps a point in a set to the origin. Then we present the main technical result, which gives an estimate for this functional evaluated on a random linear map from Model 2.1. The rest of the section outlines the main steps in the proof of the result. 16.1. The RAP Functional: Dual Condition for Failure. To study when a linear map maps a point a set to the origin, we use an approach based on polarity. Let us make the following definition. Definition 16.1 (Range Avoids Polar (RAP)). Let K ⊂ Rm be a closed, convex cone. Let A be an m × n matrix. Define the quantity τmin (A; K ) := min min◦ ks − At k . kt k=1 s∈K Note that the range of the inner minimum involves the polar K ◦ of the cone. We refer to τmin as the RAP functional. To see why the RAP functional is important, consider a closed, spherically convex subset Ω of Sm−1 for which cone(Ω) is not a subspace. The second conclusion of Proposition 3.8 states that τmin (A; cone(Ω)) > 0 implies 0 ∈ A(Ω). The third conclusion of Proposition 3.8 gives a similar result in the case of a subspace. Therefore, we can obtain a sufficient condition that A maps a point in Ω to zero by providing a lower bound for the RAP functional. 16.2. Theorem 16.2: Main Result for the Bounded Random Matrix Model. The main technical result in this part of the paper is a theorem on the behavior of the RAP functional of a bounded random matrix. Theorem 16.2 (RAP: Bounded Random Matrix Model). Place the following assumptions: • Let m and n be natural numbers with m + n ≤ min{m, n}9/8 . • Let K be a closed, convex cone in Rm , and define Ω := K ∩ Sm−1 . • Draw an m × n random matrix Φ from Model 2.1 with bound B . Then the squared RAP functional τ2min (Φ; K ) has the following properties. p (1) The squared RAP functional deviates below its mean on a scale of B 2 m + n: © ª 2 P τ2min (Φ; K ) ≤ E τ2min (Φ; K ) − CB 2 ζ ≤ e−ζ /m (2) The expected square of the RAP functional is bounded below: ¡ ¢2 En (Ω) − 2 E τmin (Φ; K ) ≥ − CB 3 (m + n)0.95 . CB 2 log(m + n) This result does use the symmetry assumption in Model 2.1. The proof of Theorem 16.2 is long, even though we can borrow a lot from the proof of Theorem 9.1. This section contains an overview of the calculations that are required with forward references to the detailed arguments. 64 S. OYMAK AND J. A. TROPP 16.3. Proof of Theorem 16.2: Lower Tail Bound. Theorem 16.2(1) states that the quantity τ2min (Φ; K ) does not deviate substantially below its mean. The proof is similar to the proof of the bound (11.1) in Proposition 11.1, which shows that the squared restricted singular value σ2min (Φ; K ) does not deviate substantially below its mean. We omit the repetitive details. 16.4. Proof of Theorem 16.2: Truncation and Dissection. Let us proceed with the proof of Theorem 16.2(2). Define the sets S := K ◦ ∩ R Bm and T := Sn−1 p where the radius R := Crad B 2 m + n for some universal constant Crad . Next, we construct a family of closed, convex subsets of S and T . For each I ⊂ {1, . . . , m} and each J ⊂ {1, . . . , n}, define © ª S I := s ∈ S : |s i | ≤ R(#I )−1/2 for all i ∈ I c ; © ª T J := t ∈ T : |t j | ≤ (#J )−1/2 for all j ∈ J c . Fix the cardinality parameter k ∈ {1, . . . , min{m, n}}. As in the proof of Theorem 9.1, we have the decompositions [ [ S = #I =k S I and T = #J =k T J . Furthermore, ¶ e(m + n) k #{S I : #I = k} × #{T J : #J = k} ≤ . (16.1) k We maintain the heuristic that the cardinality k is much smaller than either ambient dimension m or n. µ 16.5. Proof of Theorem 16.2: Lower Bound for RAP Functional. To bound the quantity τmin (Φ; K ), we must combine estimates from several technical results. We give an outline of the calculation here, with the details postponed to a series of propositions. First, we must account for the error we incur when we truncate the cone K ◦ to the wedge S. Proposition 18.1 demonstrates that E τ2min (Φ; K ) = E min min◦ ks − Φt k2 ≥ E min min ks − Φt k2 − CB 4 . kt k=1 s∈K t ∈T s∈S (16.2) This inequality is based on an estimate for the norm of the point s ∈ K ◦ where the inner minimum is achieved, as well as a probability bound for the norm of the random matrix Φ. Next, we pass from the minimum over the full sets S and T to minima over their subsets S I and T J : q E min min ks − Φt k2 ≥ min E min min ks − Φt k2 − CB 2 km log((m + n)/k). (16.3) t ∈T s∈S #I =#J =k t ∈T J s∈S I The proof of this inequality hews to the argument in Proposition 12.2. We just need to invoke the concentration inequality from Theorem 16.2(1) in lieu of the concentration inequality from Proposition 11.1, and we take into account the bound (16.1) on the number of subsets in the decomposition. Further details are omitted. We are now prepared to perform the exchange argument to pass from the matrix Φ to a matrix Ψ that contains many standard normal entries. Fix subsets I ⊂ {1, . . . , m} and J ⊂ {1, . . . , n}, each with cardinality k. Introduce the random matrix · ¸ ΦI J ΦI J c Ψ := Ψ(I , J ) := ΦI c J ΓI c J c where Γ is an m × n standard normal matrix. Proposition 19.1 gives the bound E min min ks − Φt k2 ≥ E min min ks − Ψ(I , J )t k2 − s∈S I t ∈T J t ∈T J s∈S I CB 3 (m + n)11/6 log(mn) k (16.4) CB 3 (m + n)11/6 log(mn) ≥ E min min◦ ks − Ψ(I , J )t k − kt k=1 s∈K k The proof is similar with the proof of Proposition 13.1. We discretize both sets; we smooth the minima using the soft-min function; and then we apply the Lindeberg principle. The main distinction is that we 2 UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 65 can replace even less of the matrix Φ than before. The second line in (16.4) is an immediate consequence of the facts S I ⊂ S ⊂ K ◦ and T J ⊂ T = Sn−1 . To continue, we must identify a geometric functional that is hiding within the expression (16.4). Write Ω := K ∩ Sm−1 . Proposition 20.1 demonstrates that à ¡ !2 ¢ q E (Ω) n − (16.5) E min min◦ ks − Ψ(I , J )t k2 ≥ − CB 2 k log m . p kt k=1 s∈K CB log m + As in Proposition 14.1, the main tool is the Gaussian Minimax Theorem, Fact A.3, which allows us to break down the standard normal matrix Γ into simpler quantities. The proof requires some convex duality arguments, as well as some delicate considerations that did not arise before. Last, we linearize the function (·)2+ in (16.5): à ¡ !2 ¡ ¢2 ¢ q p En (Ω) − En (Ω) − 2 − CB k log m ≥ − CB km. (16.6) p 2 CB log m CB log m + We have employed the observation that ¡ ¢ p En (Ω) − ≤ E max g · s ≤ E kg k ≤ m. s∈Ω m Here, g ∈ R is a standard normal vector. Now, sequence the estimates (16.2), (16.3), (16.4), (16.5), and (16.6) to arrive at ¡ ¢2 µ ¶ 11/6 En (Ω) − log(mn) q 2 3 (m + n) E τmin (Φ; K ) ≥ − CB + km log((m + n)/k) . CB 2 log m k We select k = b(m + n)8/9 c, which results in the bound ¡ ¢2 En (Ω) − 2 − CB 3 (m + n)17/18 log(m + n). E τmin (Φ; K ) ≥ CB 2 log(m + n) Note that k ≤ min{m, n}, as required, because we have assumed that m + n ≤ min{m, n}9/8 . We obtain the result quoted in Theorem 16.2(2). 17. W HEN E MBEDDING FAILS FOR A H EAVY-TAILED R ANDOM M ATRIX In this section, we extend Theorem 16.2 to the heavy-tailed matrix model, Model 2.4. In Section 10.3, we show how to derive the second half of the universality result for the embedding dimension, Theorem I(a), as a consequence. 17.1. Corollary 17.1: Main Result for the p-Moment Random Matrix Model. The following corollary extends Theorem 16.2 to include random matrices drawn from Model 2.4. Corollary 17.1 (RAP: p-Moment Random Matrix Model). Fix parameters p > 4 and ν ≥ 1. Place the following assumptions: • Let m and n be natural numbers with m + n ≤ min{m, n}9/8 . • Let K be a closed, convex cone in Rm , and define Ω := K ∩ Sm−1 . • Draw an m × n random matrix Φ that satisfies Model 2.4 with given p and ν. Then the RAP functional satisfies the probability bound ( ) ¡ ¢ En (Ω) − P τmin (Φ; K ) ≤ − Cp ν3/2 (m + n)1/2−κ(p) ≤ Cp (m + n)1−p/4 . Cp ν(m + n)(1−cp )κ(p) The function κ(p) is strictly positive for p > 4. The strictly positive constants cp and Cp depend only on p. The proof of Corollary 17.1 follows from Theorem 16.2 and the same kind of truncation argument that appears in Section 15. We omit further details. 66 S. OYMAK AND J. A. TROPP 17.2. Proof of Theorem I(b) from Corollary 17.1. Theorem I(b) is an easy consequence of Corollary 17.1. Let us restate the assumptions of the theorem: • E is a compact subset of RD that does not contain the origin. • The statistical dimension of E satisfies δ(E ) ≥ %D. • The d × D random linear map Π follows Model 2.4 with parameters p > 4 and ν ≥ 1. We must now consider the regime where the embedding dimension d ≤ (1 − ε) δ(E ). We need to demonstrate that P {0 ∈ Π(E )} = P {E ∩ null(Π) 6= ;} ≥ 1 − Cp D 1−p/4 . (17.1) As in Section 10.3, the probability is a decreasing function of the embedding dimension, so we may as well consider the case where d = b(1 − ε) δ(E )c. It is easy to see that d ≤ D ≤ %−1 d because δ(E ) ≤ d . In particular, d + D ≤ min{d , D}9/8 . Introduce the spherical retraction Ω := θ(E ). If cone(Ω) is a subspace, we replace Ω by a subset Ω0 with the property that cone(Ω0 ) is a subspace of one dimension fewer than cone(Ω). Then we proceed with the argument. Proposition 3.8 and relation (3.2) show that τmin (Π∗ ; cone(Ω)) > 0 implies 0 ∈ Π(Ω) implies 0 ∈ Π(E ). Therefore, to verify (17.1), it is enough to produce a high-probability lower bound on the RAP functional τmin (Π∗ ; cone(Ω)). With the choices Φ = Π∗ and K = cone(Ω), Corollary 17.1 yields ( ) ¡ ¢ Ed (Ω) − ∗ 3/2 1/2−κ(p) P τmin (Π ; cone(Ω)) ≥ − Cp ν (d + D) ≥ 1 − Cp D 1−p/4 . Cp ν(d + D)(1−cp )κ(p) We need to check that the lower bound on the RAP functional is positive. That is, ¡ ¢ Ed (Ω) − > Cp ν5/2 (d + D)1/2−cp κ(p) . (17.2) Once again, this point follows from two relatively short calculations. Since Ω is a subset of the unit sphere, we quickly compute the excess width using (4.3): p p p p p ¡ ¢ ¡ ¢p Ed (Ω) − ≥ δ(Ω) − 1 − d = δ(E ) − 1 − d ≥ 1 − 1 − ε δ(E ) − 1. (17.3) The justifications are the same as in Section 10.3. We can easily bound the dimensional term in (17.2): (d + D)1/2−cp κ(p) ≤ CD 1/2−cp κ(p) ≤ C%−1/2 D −cp κ(p) p p δ(E ) ≤ C%−1/2 D −cp κ(p) δ(E ) − 1 The first inequality holds because d ≤ D, and the last two relations both rely on the assumption 1 ¿ D ≤ %−1 δ(E ). Since cp κ(p) is positive, we can find a number N := N (p, ν, %, ε) for which D ≥ N implies that ¡p ¢p Cp ν5/2 (d + D)1/2−cp κ(p) < 1 + ε − 1 δ(E ) − 1. Combine the last result with (17.3) to see that the claim (17.2) holds true. 17.3. Proof of Proposition 6.1: Application of RAP functional to decoding with structured errors. This section establishes the success condition in Proposition 6.1. More precisely, we show that s/n < ψ−1 `1 (1 − m/n) − o(1) implies Ω ∩ range(Φ) = ; with probability 1 − o(1). The set Ω is derived from the descent cone of the `1 norm, and the calculation (6.3) shows that δ(Ω◦ ) = n(1 − ψ`1 (s/n) − o(1)). To begin, we assume that there are parameters %, ε > 0 for which • The statistical dimension δ(Ω◦ ) ≥ %n. • The message length m ≤ (1 − ε) δ(Ω◦ ). (17.4) UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 67 As in Section 17.2, these conditions imply that Ω◦ ∩ null(Φ∗ ) 6= ; with probability at least 1 − o(1). Indeed, this statement corresponds to (17.1) under the change of variables d = m and D = n and E = Ω◦ and Π = Φ∗ . By polarity, the conclusion of (17.4) holds. It remains to show that the parameter choice in (17.4) implies the two assumptions we have made. As in the proof of Proposition 6.1, the condition s ≤ (1 − ξ)n ensures that δ(Ω◦ ) ≥ %n for some % > 0. Similarly, the condition m ≤ (1 − ε)δ(Ω◦ ) holds when m ≤ (1 − ε) · n(1 − ψ`1 (s/n) − o(1)). Equivalently, s/n ≤ ψ−1 `1 (1 − m/((1 − ε)n) − o(1)). Since we can choose ε to be an arbitrarily small constant as m → ∞, it suffices that s/n ≤ ψ−1 `1 (1 − m/n − o(1)). This observation completes the argument. 18. T HEOREM 16.2: T RUNCATION OF THE C ONE In this section, we argue that functional τmin (Φ; K ) does not change very much if we truncate the cone K . Replacing the unbounded set with a compact set allows us to develop discretization arguments. Proposition 18.1 (RAP: Truncation p of Cone). Adopt the notation and hypotheses of Theorem 16.2. Let S := K ◦ ∩ R Bm , where R := Crad B 2 m + n. Then E min min◦ ks − Φt k2 ≥ E min min ks − Φt k2 − CB 4 . kt k=1 s∈K kt k=1 s∈S Proof. Since 0 ∈ K ◦ , it is easy to see that min◦ ks − Φt k ≤ kΦt k ≤ kΦk s∈K when kt k = 1. Meanwhile, the triangle inequality gives the bound ks − Φt k ≥ ksk − kΦt k ≥ ksk − kΦk when kt k = 1. It follows that s ? ∈ arg min ks − Φt k s∈K ◦ implies ks ? k ≤ 2 kΦk when kt k = 1. (18.1) Since the norm of the random matrix Φ concentrates, the bound (18.1) shows that the norm of the minimizer s ? is unlikely to be large. For any positive parameter R, the observation (18.1) allows us to calculate that E τ2min (Φ; K ) = E min min◦ ks − Φt k2 kt k=1 s∈K · ¸ 2 ≥ E min min◦ ks − Φt k 1{kΦk ≤ R/2} kt k=1 s∈K ¸ · 2 ks k = E min min − Φt 1 {kΦk ≤ R/2} kt k=1 s∈K ◦ ∩RBm · 2 ks k = E min min − Φt − E max max ◦ m ◦ kt k=1 s∈K ∩RB kt k=1 s∈K ∩RB (18.2) ¸ 2 ks k − Φt 1 {kΦk > R/2} . m To reach the last line, we write the indicator function in terms of its the complement. 68 S. OYMAK AND J. A. TROPP To bound the second term on the right-hand side of (18.2), crude estimates suffice. ¸ · £ ¤ 2 ks − Φt k 1{kΦk > R/2} ≤ E (R + kΦk)2 1{kΦk > R/2} E max max ◦ m kt k=1 s∈K ∩RB ¤ £ ≤ 9 E kΦk2 1{kΦk > R/2} ¢1/2 ¡ ¢1/2 ¡ . ≤ 9 E kΦk4 P {kΦk > R/2} The last inequality is Cauchy–Schwarz. Since Φ satisfies the condition (B.1), Fact B.1 implies that p © ª 2 P kΦk > C0 B 2 m + n + C0 B 2 ζ ≤ e−ζ . In particular, using integration by parts, p ¡ ¢1/4 E kΦk4 ≤ CB 2 m + n. Furthermore, there is a constant Crad for which p ª © P kΦk > 12 Crad B 2 m + n ≤ (m + n)−2 . p If we set R := Crad B 2 m + n, then · ¸ 2 ks − Φt k 1{kΦk > R/2} ≤ CB 4 . E max max ◦ m (18.3) kt k=1 s∈K ∩RB  Introduce the estimate (18.3) into (18.2) to complete the argument. 19. T HEOREM 16.2: R EPLACING M OST E NTRIES OF THE R ANDOM M ATRIX In this section, we show that we can replace most of the entries of a random matrix Φ with standard normal variables without changing the value of the functional E τ2min (Φ; K ) substantially Proposition 19.1 (RAP: Partial Replacement). Let Φ be an m p× n random matrix that satisfies Model 2.1 with magnitude bound B . Fix the parameter R := Crad B 2 m + n. Let I be a subset of {1, . . . , m} with cardinality k, and let S I be a closed subset of R Bm for which s ∈ SI implies for each index i ∈ I c . |s i | ≤ Rk −1/2 Let J be a subset of {1, . . . , n} with cardinality k, and let T J be a closed subset of Bn for which t ∈ TJ implies |t j | ≤ k −1/2 for each index j ∈ J c . Suppose that Ψ is an m × n matrix with block form Ψ := Ψ(I , J ) := Then ΦI J ΦI c J · ¸ ΦI J c . ΓI c J c (19.1) ¯ ¯ 3 11/6 ¯ ¯ log(mn) ¯E min min ks − Φt k2 − E min min ks − Ψt k2 ¯ ≤ CB (m + n) . ¯ ¯ t ∈T s∈S t ∈T J s∈S I k J I As usual, Γ is an m × n standard normal matrix. 19.1. Proof of Proposition 19.1. Fix the sets I and J . As in the proof of Proposition 13.1, the error has three components: ¯ ¯ ¯ ¯ ¯E min min ks − Φt k2 − E min min ks − Ψt k2 ¯ ≤ Cmnε (Lemma 19.2) ¯ ¯ t ∈T J s∈S I t ∈T J s∈S I + + Cβ−1 (m + n) log(1/ε) µ ¶ βR β2 R 3 CB 3 mn 2 + 3 . k k (Lemma 19.3) (Lemma 19.4) UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 69 The first error comes from discretizing the sets S and T at a level ε ∈ (0, 1]. The second error appears when we replace the minima with a soft-min function with parameter β > 0. The last error emerges from the Lindeberg exchange argument. To complete the proof, we set ε = (mn)−1 to make the discretization error negligible. Select the smoothing parameter so that β3 = k 3 (m + n)/(B 3 R 3 mn). We arrive at ¯ ¯ ¯ ¯ ¯E min min ks − Φt k2 − E min min ks − Ψt k2 ¯ ¯ ¯ t ∈T J s∈S I t ∈T J s∈S I ≤ CB 2 (m + n)1/3 (mn)2/3 CB R(m + n)2/3 (mn)1/3 log(mn) + . k2 k p p Since 2 mn ≤ m + n and R = Crad B 2 m + n, the second term dominates. We reach the stated result. 19.2. Proposition 19.1: Discretizing the Index Sets. The first step in the proof of Proposition 19.1 is to replace the index sets by finite subsets. Lemma 19.2 (Proposition 19.1: Discretization). Adopt the notation and hypotheses of Proposition 19.1. Fix a parameter ε ∈ (0, 1]. Then S I contains a finite subset S εI and T J contains a finite subset T Jε whose cardinalities satisfy log(#S εI ) + log(#T Jε ) ≤ (m + n) log(3/ε). Furthermore, these subsets have the property that ¯ ¯ ¯ ¯ ¯ ¯ ¯E min min ks − Φt k2 − E minε minε ks − Φt k2 ¯ ≤ Cmnε. ¯ t ∈T J s∈S I ¯ t ∈T J s∈S I (19.2) The bound (19.2) also holds if we replace Φ by Ψ. Proof. We choose S εI to be an (Rε)-covering of S I , and T Jε to be an ε-covering of T J . Since S I is a subset of R Bm and T J is a subset of Bn , we can be sure that the coverings have cardinality #S εI ≤ (3/ε)m and #T Jε ≤ (3/ε)n . See [Ver12, Lem. 5.2]. The rest of the proof is essentially the same as that of Lemma 13.2, so we omit the details.  19.3. Proposition 19.1: Smoothing the Minimum. The next step in the proof of Proposition 19.1 is to pass from the minimum to the soft-min function. Lemma 19.3 (Proposition 19.1: Smoothing). Adopt the notation and hypotheses of Proposition 19.1, and let S εI and T Jε be the sets introduced in Lemma 19.2. Fix a parameter β > 0, and introduce the function F : Rm×n → R where F (A) := − Then X X 2 1 log s∈S ε t ∈T ε e−βks−At k . I J β ¯ ¯ ¯ ¯ 1¡ ¢ ¯ ¯ log(#S εI ) + log(#T Jε ) . ¯E minε minε ks − Φt k2 − E F (Φ)¯ ≤ ¯ t ∈T J s∈S I ¯ β (19.3) The estimate (19.3) also holds if we replace Φ by Ψ. Proof. The proof is almost identical with that of Lemma 13.3.  19.4. Proposition 19.1: Exchanging the Entries of the Random Matrix. The main challenge in the proof of Proposition 19.1 is to exchange most of the entries of the random matrix Φ for the entries of Ψ. Lemma 19.4 (Proposition 19.1: Exchange). Adopt the notation and hypotheses of Proposition 19.1, and let F be the function defined in Lemma 19.3. Then µ ¶ βR β2 R 3 |E F (Φ) − E F (Ψ)| ≤ CB 3 mn 2 + 3 . k k 70 S. OYMAK AND J. A. TROPP The proof is similar with Lemma 13.4. This time, we replace only the rows of Φ listed in I c . We incur the same error for each of these m − k rows, so it suffices to control the error in exchanging a single row. The following sublemma achieves this goal. Sublemma 19.5 (Lemma 19.4: Comparison for One Row). Adopt the notation and hypotheses of Proposition 19.1, and let S εI and T Jε be the sets defined in Lemma 19.3. For i ∈ I c , introduce the function f : Rn → R given by f (a) := − X X 2 1 log s∈S ε t ∈T ε e−β(si −a·t ) +q(s,t ) , I J β where q : S εI × T Jε → R is an arbitrary function. Suppose that ϕ ∈ Rn is a random vector with independent, standardized entries that are bounded in magnitude by B . Suppose that ψ ∈ Rn is a random vector with ψJ = ϕJ and ψ J c = γ J c , where γ ∈ Rn is a standard normal vector. Then µ 2 3¶ ¯ ¯ ¯E f (ϕ) − E f (ψ)¯ ≤ CB 3 n βR + β R . k2 k3 The proof of this result is much the same as the proof of Sublemma 13.5. There are only two points that require care. First, we use a slightly different result to compute the derivatives. Sublemma 19.6 (Lemma 19.4: Derivatives). Adopt the notation and hypotheses of Proposition 19.1 and Sublemma 19.5. Let ξ : R → Rn be a linear function, so its derivative ξ0 ∈ Rn is a constant vector. For i ∈ I c , define the function X X ¡ ¢ 2 1 r (α) := f ξ(α) = − log s∈S ε t ∈T ε e−β(si −ξ(α)·t ) +q(s,t ) J I β where q : S εI × T Jε → R is arbitrary. The third derivative of this function satisfies à ! ¯ 000 ¯ ¯ 0 ¯3 ¡ ¢ ¯r (α)¯ ≤ 48 max ¯ξ · t ¯ β Ev |s i − ξ(α) · v | + β2 Ev |s i − ξ(α) · v |3 , t ∈T Jε where v ∈ T Jε is a random vector that does not depend on ξ(α). ¯ ¯ Second, when making further bounds on ¯r 000 (α)¯, we need to exploit our control on the magnitude of s on the coordinates in I c . Note that |s i − ξ(α) · v | ≤ |s i | + |ξ(α) · v | ≤ Rk −1/2 + |ξ(α) · v | The second inequality holds because |s i | ≤ Rk −1/2 for each i ∈ I c . Similarly, |s i − ξ(α) · v |3 ≤ C |s i |3 + C |ξ(α) · v |3 ≤ CRk −3/2 + C |ξ(α) · v |3 . Repeating the arguments from Sublemma 13.5, we obtain bounds of the form · ¯ ¯¸ βB 3 R Cβ2 B 3 R 3 CβB 4 + Cβ2 B 6 ¯ 000 ¯ 3 + + . E |ϕ j | max ¯r j (α)¯ ≤ |α|≤|ϕ j | k2 k3 k 3/2 p The first two terms dominate the third because our choice R = Crad B 2 m + n implies that R ≥ Bk 1/2 . We arrive at the statement of Sublemma 19.5. 20. T HEOREM 16.2: B OUNDING THE RAP F UNCTIONAL BY THE E XCESS W IDTH The most difficult part of proving Theorem 16.2 is to identify the excess width En (Ω) after we replace the original matrix Φ by the hybrid matrix Ψ defined in (19.1). The following result does the job. UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 71 Proposition 20.1 (Theorem 16.2: Excess Width Bound). Adopt the notation and hypotheses of Proposition 19.1. Let Ω := K ∩ Sm−1 . Then à ¡ !2 ¢ q En (Ω) − 2 2 E min min◦ ks − Ψ(I , J )t k ≥ − CB k log m . p kt k=1 s∈K CB log m + The random matrix Ψ is defined in (19.1). The proof of Proposition 20.1 occupies the rest of this section. At the highest level, the proof is similar with the argument underlying Proposition 14.1. We write the quantity of interest as a minimax, and then we apply the Gaussian Minimax Theorem to replace the Gaussian matrix with a pair of Gaussian vectors. Afterward, we analyze the resulting expression to identify the Gaussian width; the new challenges appear in this step. 20.1. Proof of Proposition 20.1. Here is an overview of the calculations that we will perform; the detailed justifications appear in the upcoming subsections. Let us abbreviate U := K ∩ Bm . We have the chain of inequalities E min min◦ ks − Ψt k kt k=1 s∈K ≥ E min max u · Ψt kt k=1 u∈U · ¸ · ¸· ¸ uI ΦI J ΦI J c tJ = E min max · ΦI c J ΓI c J c t J c kt k=1 u∈U u I c µ · ¸ ¶ ΦI J ΦI J c ≥ E min max u · t + (u I c · g I c ) kt J c k + ku I c k (h J c · t J c ) − 2 ΦI c J 0 kt k=1 u∈U ¡ p ¢ q W (U ) − n + ≥ − CB 2 k log m p CB log m (Lemma 20.2) (Lemma 20.3) (Lemma 20.4). Lemma 20.2 is a standard convex duality argument, and the next line follows when we write out the quantity of interest more explicitly. To reach the fourth line, we apply the Gaussian Minimax Theorem in the usual way to replace the random matrix Γ with two standard normal vectors g ∈ Rm and h ∈ Rn . In a rough sense, the remaining part of the random matrix Φ is negligible. The term (u I c · g I c ) generates the p Gaussian width W (U ), defined in (3.7), while the term (h J c · t J c ) contributes a dimensional factor − n. Apply the increasing convex function (·)2+ to the inequality in the last display, and invoke Jensen’s inequality to draw out the expectation. Notice that W (U ) = E max m u · g ≥ E maxm−1 u · g = W (Ω). u∈K ∩B u∈K ∩S p ¢ Finally, En (Ω) − = W (Ω) − n + because of (4.2). This point completes the proof. ¡ ¢ ¡ 20.2. Proposition 20.1: Duality for the RAP Functional. The first step in the argument is to apply the minimax inequality to pass to a saddle-point formulation that is amenable to analysis with the Gaussian Minimax Theorem. Lemma 20.2 (Proposition 20.1: Duality). Adopt the notation and hypotheses of Proposition 20.1. For any point t ∈ Rn , min◦ ks − Ψt k ≥ max u · Ψt s∈K u∈U where U := K ∩ Bm . Proof. Write the norm as maximum: min◦ ks − Ψt k = min◦ max u · (Ψt − s). m s∈K s∈K u∈B 72 S. OYMAK AND J. A. TROPP The minimax inequality allows us to interchange the maximum and minimum: ³ ´ min◦ ks − Ψt k ≥ max min u · (Ψt − s) = max u · Ψt − max u · s ◦ ◦ m m s∈K u∈B s∈K u∈B s∈K ◦ ◦ The value of maxs∈K ◦ u · s equals zero when u ∈ (K ) = K ; otherwise, it takes the value +∞. This step uses the assumption that K is closed and convex. We conclude that min◦ ks − Ψt k ≥ max m u · Ψt . s∈K u∈K ∩B This is the stated result.  20.3. Proposition 20.1: Reducing the Gaussian Matrix to Some Gaussian Vectors. By an argument similar with the proof of Lemma 14.5, we can replace the Gaussian block of Ψ with two Gaussian vectors. Lemma 20.3 (Proposition 20.1: Reducing the Gaussian Matrix). Adopt the notation and hypotheses of Proposition 20.1. Then · ¸ µ · ¸ ¶ ΦI J ΦI J c ΦI J ΦI J c E min max u · t ≥ E min max u · t + (u I c · g I c ) kt J c k + ku I c k (h J c · t J c ) − 2, ΦI c J ΓI c J c ΦI c J 0 kt k=1 u∈U kt k=1 u∈U where g ∈ Rm and h ∈ Rn be independent standard normal vectors. Proof. There are no new ideas in this bound, so we refer the reader to Lemmas 14.4 and 14.5 for the pattern of argument.  20.4. Proposition 20.1: Finding the Gaussian Width. To prove Proposition 20.1, most of the difficulty arises when we seek a good lower bound for the minimax problem that appears in Lemma 20.3. We have the following result. Lemma 20.4 (Proposition 20.1: Finding the Gaussian Width). Adopt the notation and hypotheses of Proposition 20.1. Define the set U := K ∩ Bm . Then p µ · ¸ ¶ q W (U ) − n ΦI J ΦI J c E min max u · t + (u I c · g I c ) kt J c k + ku I c k (h J c · t J c ) ≥ − CB 2 k log m. p ΦI c J 0 kt k=1 u∈U CB log m Proof. The proof of this bound is lengthy, so we break the argument into several steps. The overall result follows when we sequence the inequalities in Sublemmas 20.5, 20.6, 20.7, and 20.8 and consolidate the error terms.  20.4.1. Lemma 20.4: Simplifying the Minimax I. The first step in the proof of Lemma 20.4 is to simplify the minimax so we can identify the key terms. Sublemma 20.5 (Lemma 20.4: Simplifying the Minimax I). Adopt the notation and hypotheses of Lemma 20.4. Then µ · ¸ ¶ ΦI J ΦI J c E min max u · t + (u I c · g I c ) kt J c k + ku I c k (h J c · t J c ) ΦI c J 0 kt k=1 u∈U µ · ¸ ¶ p £ ¤ tj p ≥ E min max u · Φ J g − n kt J c k − CB 2 k. kt J c k kt k=1 u∈U + Proof. Let us introduce notation for the quantity of interest: µ · ¸ ¶ ΦI J ΦI J c Q 1 := E min max u · t + (u I c · g I c ) kt J c k + ku I c k (h J c · t J c ) . ΦI c J 0 kt k=1 u∈U + (20.1) We can introduce the positive-part operator because the fact that 0 ∈ U ensures that the minimax is nonnegative. UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 73 The first step in the argument is to reintroduce the missing piece of the random vector g . Adding and subtracting the quantity (u I · g I ) kt J c k inside the positive-part operator in (20.1), we obtain the bound ¸ ¶ µ · ΦI J ΦI J c t + (u · g ) kt J c k + ku I c k (h J c · t J c ) − E max u I · g I Q 1 ≥ E min max u · ΦI c J 0 kt k=1 u∈U u∈U + (20.2) µ · ¸ ¶ p ΦI J ΦI J c ≥ E min max u · t + (u · g ) kt J c k + ku I c k (h J c · t J c ) − k. ΦI c J 0 kt k=1 u∈U + The second inequality holds because #I = k and U is a subset of the unit ball. This step is similar with the proof of Lemma 14.8. Next, we combine the terms in (20.2) involving ΦI J c and the row vector h J c . Since kuk ≤ 1, · ¸ · ¸ uI ΦI J c u I · ΦI J c t J c + ku I c k (h J c · t J c ) = · tJc ku I c k hJc °· ¸° ° ΦI J c ° ° ≥ −° (20.3) ° h J c ° kt J c k µ°· ¶ ¸° ° ΦI J c ° p p ° ° − n . ≥ − n kt J c k − ° hJc ° + The (k + 1) × (n − k) random matrix on the right-hand side has independent, standardized entries that satisfy the subgaussian estimate (B.1) with bound B . Repeating the calculations in (14.17), we see that ¶ µ°· ¸° p ° ΦI J c ° p ° ° E ° − n ≤ CB 2 k. (20.4) hJc ° + Apply the estimate (20.3) inside the minimax in (20.2) and then use (20.4) to arrive at the lower bound µ · ¸ ¶ µ°· ¶ ¸° ° ΦI J c ° p p ΦI J ° ° t + (u · g ) kt J c k − n kt J c k − E ° Q 1 ≥ E min max u · − n ΦI c J J hJc ° kt k=1 u∈U + + µ · ¸ ¶ p £ ¤ tJ p − n kt J c k − CB 2 k. ≥ E min max u · Φ J g kt J c k kt k=1 u∈U +  In the second line, we have simply consolidated terms. 20.4.2. Lemma 20.4: Simplifying the Minimax II. The next step in the proof of Lemma 20.4 is to reduce the minimax problem in Sublemma 20.5 to a scalar optimization problem. Sublemma 20.6 (Lemma 20.4: Simplifying the Minimax II). Adopt the notation and hypotheses of Lemma 20.4. Then µ · ¸ ¶ £ ¤ tj p c E min max u · Φ J g − n kt J k kt J c k kt k=1 u∈U n+ ¡ £ ¤ p ¢ p o p ≥ E min max 0, max u · g − n α, min max u · Φ J g s − nα − k. α∈[0,1] u∈U ksk=1 u∈U Proof. Introduce the notation µ £ Q 2 := max u · Φ J u∈U g ¤ ¶ ¸ p tJ − n kt J c k . kt J c k + · (20.5) We will develop two lower bounds on the maximum by coupling u to the random matrix in different ways. Afterward, we combine these results into a single bound. In the first place, we can choose the row vector u so that it depends only on the remaining Gaussian vector: u(g ) ∈ arg max u · g . u∈U 74 S. OYMAK AND J. A. TROPP Since kt k = 1, we obtain the bound ¸ µ · ¶ £ ¤ tJ ¡ p p ¢ − n kt J c k ≥ u(g ) · g − n kt J c k + u(g ) · Φ J t J max u · Φ J g c kt J k u∈U ° ° ¡ p ¢ ≥ max u · g − n kt J c k − °u(g )Φ J ° . (20.6) u∈U The second term on the right-hand side of (20.6) satisfies ° ° ³ ° °2 ´1/2 p E °u(g )Φ J ° ≤ E °u(g )Φ J ° ≤ k. (20.7) Indeed, u(g ) is a random vector with ku(g )k ≤ 1 that is stochastically independent from Φ J , and the m × k random matrix Φ J has independent, standardized entries. The second bound is even simpler. Since kt k = 1, µ · ¸ ¶ £ ¤ £ ¤ tJ p p (20.8) max u · Φ J g − n kt J c k ≥ min max u · Φ J g s − n kt J c k . c kt k ksk=1 u∈U u∈U J In this expression, the variable s ∈ Rk+1 . Introducing (20.6) and (20.8) into (20.5), we arrive at n ¡ o ° ° £ ¤ p ¢ p Q 2 ≥ E min max 0, max u · g − n kt J c k − °u(g )Φ J ° , min max u · Φ J g s − n kt J c k kt k=1 ksk=1 u∈U u∈U n ¡ £ ¤ p ¢ p o p ≥ E min max 0, max u · g − n α, min max u · Φ J g s − nα − k. α∈[0,1] u∈U (20.9) ksk=1 u∈U The zero branch in the maximum accounts for the positive-part operator in (20.5). The second line follows from (20.7). We have also introduced a new parameter α to stand in for kt J c k.  20.4.3. Lemma 20.4: Probabilistic Bounds. The last major step in Lemma 20.4 is to develop probabilistic bounds for the terms that arise in Sublemma 20.6. Sublemma 20.7 (Lemma 20.4: Probabilistic Bounds). Adopt the notation and hypotheses of Lemma 20.4. Then n ¡ £ ¤ p ¢ p o E min max 0, max u · g − n α, min max u · Φ J g s − nα ksk=1 u∈U u∈U α∈[0,1] ( ) q p W (U ) − 2 p 1 ≥ min max (W (U ) − n − 2)α, p − nα − CB 2 k log m. 2 α∈[0,1] 2B log m Proof. Introduce the notation n ¡ £ p ¢ Q 3 := E min max 0, max u · g − n α, min max u · Φ J α∈[0,1] u∈U ksk=1 u∈U ¤ p o g s − nα . p We assume that W (U ) ≥ 2 + n, which is permitted because the final result would otherwise become vacuous. The next stage in the argument is to introduce probabilistic bounds for the branches of the maximum and use these to control the expectation. It is convenient to abbreviate £ ¤ p X := max u · g − n and Y := min max u · Φ J g s. u∈U ksk=1 u∈U p Note that E X = W (U )− n. Since g → 7 X (g ) is 1-Lipschitz, the Gaussian concentration inequality, Fact A.2, implies that © ª p P X ≥ W (U ) − n − 2 ≥ 3/4. On the other hand, Sublemma 20.10 will demonstrate that ( ) q W (U ) P Y ≥ − CB k log m ≥ 3/4. p CB log m UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION Therefore, taking complements and a union bound, ( p P X > W (U ) − n − 2 and Y > W (U ) CB p log m 75 ) q − CB k log m ≥ 1/2. (20.10) For each nonnegative random variable Z and each number L > 0, it holds that E Z ≥ L P {Z > L}. Using the estimate (20.9) and the probability bound (20.10), we find that ( à ! ) q p p p 1 W (U ) − CB k log m − nα − k Q 3 ≥ min max 0, (W (U ) − n − 2)α, p 2 α∈[0,1] CB log m ) ( q p W (U ) − 2 p 1 ≥ min max (W (U ) − n − 2)α, − nα − CB 2 k log m. p 2 α∈[0,1] CB log m Once again, we have used shift-invariance of the maximum to combine the error terms. For convenience, we have also dropped the zero branch of the maximum and introduced the number two into the numerator in the second branch.  20.4.4. Lemma 20.4: Solving the Scalar Minimax Problem. The final step in the proof of Lemma 20.4 is to solve the scalar minimax problem that emerges in Sublemma 20.7. Sublemma 20.8 (Lemma 20.4: Solving the Minimax Problem). Adopt the notation and hypotheses of Lemma 20.4. Then ( ) p p W (U ) − 2 p W (U ) − n − 2 − nα ≥ . min max (W (U ) − n − 2)α, p p α∈[0,1] CB log m CB log m Proof. The first branch of the maximum is increasing in α while the second branch is decreasing in α, so the minimum occurs when the two branches are equal, provided that this situation occurs when α ∈ [0, 1]. Setting the branches equal, we identify the point α? where the saddle value is achieved. α? := b a +c p W (U ) − 2 where a := W (U ) − n − 2 and b := p CB log m and c := p n. We quickly verify that α? ∈ [0, 1], so the minimax takes the value p p W (U ) − n − 2 W (U ) − 2 W (U ) − n − 2 ab = × = . p p a +c W (U ) − 2 2B log m CB log m  This is the required estimate. 20.4.5. Sublemma 20.7: Probabilistic Lower Bound for Bilinear Minimax. In this section, we explain how to obtain a lower bound for the minimax problem in (20.8) in terms of the Gaussian width of the set U . Sublemma 20.9 (Sublemma 20.7: Probability Bound for Bilinear Minimax). Assume that k < m, and let X be an m × k random matrix that satisfies Model 2.1 with bound B . Let g ∈ Rm be standard normal. Let U be a subset of the unit ball in Rm . Then ( ) q £ ¤ W (U ) P min max u · X g s > − CB k log m ≥ 3/4. p ksk=1 u∈U CB log m Proof. Fix ε = m −1 . Let N be an ε-net for the unit sphere in Rk+1 . The cardinality of the net satisfies log(N ) ≤ (k + 1) log(3m) by the standard volumetric argument [Ver12, Lem. 5.2] We can estimate the quantity of interest below by discretizing the parameter s. Since N and U are subsets of the unit ball, we have the bound °£ £ ¤ £ ¤ ¤° min max u · X g s ≥ min max u · X g s − ° X g ° ε (20.11) ksk=1 u∈U s∈N u∈U We will establish a probabilistic lower bound for the right-hand side of (20.11). 76 S. OYMAK AND J. A. TROPP First, we develop a probability bound for the second term on the right-hand side of (20.11). A simple spectral norm estimate suffices. The m × k random matrix X has standardized entries and g ∈ Rm is standard normal, so p °£ °£ ¤° ¤° E ° X g ° ≤ E ° X g °F ≤ (k + 1)m. As usual, k·kF denotes the Frobenius norm. Markov’s inequality now implies that o n°£ p ¤° P ° X g ° ≥ 6 (k + 1)m ≥ 5/6. It follows that ©°£ P ° X ¤° ª g ° ε ≥ 6 ≥ 5/6. (20.12) We have used the facts that ε = m −1 and k < m. Let us turn to the second quantity on the right-hand side of (20.11). We develop a strong probability bound for each fixed point s ∈ N , and we extend it to the entire net using the union bound. For technical reasons, it is easier to treat the random matrix£ X and the g separately. ¤ random vector k Fix a point s ∈ N , and decompose it as s = s 1 s k+1 where s 1 ∈ R . Construct a random vector u ∈ U that satisfies u(X ) ∈ arg max u · X s 1 . u∈U We may calculate that £ max u · X u∈U ¤ £ g s ≥ u(X ) · X g ¤ · s1 ¸ s k+1 = u(X ) · X s 1 + (u(X ) · g )s k+1 ¯ ¯ ≥ max u · X s 1 − ¯u(X ) · g ¯ . (20.13) u∈S The last estimate relies on the fact that |s k+1 | ≤ 1 because ksk = 1. The second term on the right-hand side of (20.13) is easy to handle using the Gaussian concentration inequality, Fact A.2: ¯ ©¯ ª 2 P ¯u(X ) · g ¯ ≥ ζ ≤ 2e−ζ /2 (20.14) Indeed, g 7→ u(X ) · g is a 1-Lipschitz function with mean zero because the random vector u(X ) is stochastically independent from g and has norm bounded by one. We can interpret the first term on the right-hand side of (20.13) as an “empirical width.” It takes some work to compare this quantity with the Gaussian width. Sublemma 20.10 contains a bound for the expectation, and Sublemma 20.11 contains a tail bound. Together, they deliver the probability inequality ( ) 2 2 W (U ) P max u · X s 1 ≤ − ζ ≤ e−ζ /(8B ) for each s ∈ N . (20.15) p u∈U CB log m In other words, the empirical width of U is comparable with the Gaussian width, modulo a logarithmic factor. Introduce the two probability bounds (20.14) and (20.15) into the deterministic estimate (20.13). We arrive at ( ) £ ¤ 2 2 W (U ) P max u · X g s ≤ − 2ζ ≤ 3e−ζ /(8B ) for each s ∈ N . p u∈U CB log m Finally, we take a union bound over s ∈ N to pobtain an estimate that is uniform over the net. Recall that log(#N ) ≤ (k + 1) log(3m) and select ζ = 4B (k + 1) log(3m) to reach ( ) q W (U ) P min max u · X s 1 ≤ − CB (k + 1) log(3m) p s∈N u∈U CB log m ≤ 3(#N )e−ζ The numerical estimate holds because 1 ≤ k < m. 2 /(8B 2 ) ≤ 3e−(k+1) log(3m) = 3(3m)−(k+1) ≤ 1/18. (20.16) UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 77 The two probability bounds (20.12) and (20.16) hold simultaneously with probability at least 3/4. Therefore, we can substitute these results into (20.11) and adjust constants to obtain the stated bound.  20.4.6. Sublemma 20.7: Lower Estimate for the Empirical Width. The next sublemma demonstrates that the Gaussian width of a set is not more than a logarithmic factor larger than the empirical width of the set as computed with bounded random variables. This is the only step in the argument for bounded random matrices that requires the symmetry assumption. Sublemma 20.10 (Sublemma 20.7: Empirical Width Bound). Adopt the notation and hypotheses of Sublemma 20.9, and let s be a fixed unit-norm vector. Then E max u · X s ≥ u∈U W (U ) CB . p log m Proof of Sublemma 20.10. Define the random vector v := (V1 , . . . ,Vn ) := X s. Our goal is to compare the empirical width of the set U computed using the vector v with the Gaussian width of the set. First, we develop a lower bound on the first moment of the entries of v . Fix an index i . Since the entries of X are independent and symmetric ¯X ¯ ¯X ¯ ¯ k ¯ ¯ k ¯ E |Vi | = E ¯ j =1 X i j s j ¯ = E ¯ j =1 η j X i j s j ¯ where {η j } is an independent family of Rademacher random variables, independent from X . The Khintchine inequality [LO94] allows us to compare the first moment with the second moment: µ ¯ ¯2 ¶1/2 ´1/2 1 1 ³Xk ¯ ¯Xk 2 2 | | |s |X . E |Vi | ≥ p E X Eη ¯ j =1 η j X i j s j ¯ =p E j i j j =1 2 2 Since s has unit norm, we can regard the sum as a weighted average, and we can invoke Jensen’s inequality to draw the average out of the square root: ¢ 1 Xk ¡ E |Vi | ≥ p E |X i j | |s j |2 . j =1 2 Last, note that 1 = E |X i j |2 ≤ B E |X i j | because the entries of X are standardized and bounded by B . Thus, 1 Xk 1 1 |s |2 = p . E |Vi | ≥ p j =1 B j 2 B 2 Let us bound the width-like functional below. Since v has independent, symmetric coordinates, Xn Xn E max u · X s = E max u · v = E max i =1 Vi u i = E max i =1 η i |Vi | u i u∈U u∈U u∈U u∈U where, again, {η i } is an independent family of Rademacher random variables, independent from u. Using a corollary of the contraction principle [LT11, Lem. 4.5], E max u · X s ≥ mini (E |Vi |) Eη max u∈U u∈U Xn i =1 ηi ui ≥ Xn 1 p E max i =1 η i u i . B 2 u∈U Applying the contraction principle again [LT11, Eqn. (4.9)], we can randomize the sum with independent Gaussian variables: Xn 1 E max u · X s ≥ E max i =1 g i u i p u∈U 2B log n u∈U Here, g := (g 1 , . . . , g n ) is a standard normal vector. Identify the Gaussian width to complete the proof.  78 S. OYMAK AND J. A. TROPP 20.4.7. Sublemma 20.7: Lower Tail of the Empirical Width. Last, we present a concentration inequality for the empirical width. Sublemma 20.11 (Sublemma 20.7: Lower Tail of Empirical Width). Adopt the notation and hypotheses of Sublemma 20.9. Let s be a fixed unit-norm vector. Then ½ ¾ 2 2 P max u · X s ≤ E max u · X s − ζ ≤ e−ζ /8B . u∈U u∈U The most direct proof of this result relies on a version of Talagrand’s inequality [BLM13, Thm. 8.6] obtained from the transportation cost method. Fact 20.12 (Talagrand’s Inequality). Let X be a metric space. Suppose that f : X p → R fulfills the one-sided Lipschitz bound Xp f (a) − f (z) ≤ i =1 c i (a)1ai 6=zi for all a, z ∈ X p , where c i : Rp → R are auxiliary functions that satisfy Xp 2 c (a) ≤ v for all a ∈ X p . i =1 i Let (X 1 , . . . , X p ) be an independent sequence of random variables taking values in X , and define Y := f (X 1 , . . . , X p ). Then, for all ζ ≥ 0, P {Y − E Y ≥ ζ} ≤ e−ζ P {Y − E Y ≤ −ζ} ≤ e 2 /(2v) −ζ2 /(2v) , and . Proof of Sublemma 20.11. Let X be the interval [−B, B ] equipped with the Euclidean distance. For a matrix A ∈ X m×k , introduce the function f (A) := max u · As. u∈U Select a point t ∈ arg maxu∈U u · As. Then f (A) − f (Z ) ≤ t · As − t · Z s Xm Xk = i =1 j =1 t i s j (a i j − z i j ) Xm Xk ¯ ¯ ≤ i =1 j =1 2B ¯t i s j ¯ 1ai j 6=zi j . We¯used¯ the fact that the entries of A and Z are bounded in magnitude by B . With the choice c i j (A) = 2B ¯t i s j ¯, we see that Xm Xk X ¯ ¯2 c 2 (A) ≤ 4B 2 i , j ¯t i s j ¯ ≤ 4B 2 i =1 j =1 i j because t , s both belong to the Euclidean unit ball. Invoke Fact 20.12 to complete the argument.  UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 79 Part V. Back Matter Two appendices contain statements of some results that we use throughout the paper. Appendix A presents some facts about Gaussian analysis, while Appendix B describes some spectral bounds for random matrices with independent entries. We conclude with acknowledgments and a list of works cited. A PPENDIX A. T OOLS FROM G AUSSIAN A NALYSIS We make extensive use of methods from Gaussian analysis to provide precise information about the behavior of functions of Gaussian random variables. These results come up in many places in the paper, so we have collected them here. A.1. Concentration for Gaussian Lipschitz Functions. We begin with two concentration results that apply to a Lipschitz function of independent Gaussian variables. Recall that a function f : Rn → R has Lipschitz constant L when ¯ ¯ ¯ f (a) − f (b)¯ ≤ L ka − bk for all a, b ∈ Rn . We also say, more briefly, that f is L-Lipschitz. The first result [Bog98, Thm. 1.6.4] gives a bound on the variance of a Lipschitz function. The second result [Bog98, Thm. 1.7.6] provides a normal concentration inequality for Lipschitz functions. Fact A.1 (Gaussian Variance Inequality). Suppose that f : Rn → R has Lipschitz constant L. Let γ ∈ Rn be a standard normal random vector. Then Var[ f (γ)] ≤ L. Equivalently, ¡ ¢2 E f (γ)2 ≤ E f (γ) + L. Fact A.2 (Gaussian Concentration Inequality). Suppose that f : Rn → R has Lipschitz constant L. Let γ ∈ Rn be a standard normal random vector. Then, for all ζ ≥ 0, © ª 2 P f (γ) ≥ E f (γ) + ζ ≤ e−ζ /2 , and © ª 2 P f (γ) ≤ E f (γ) − ζ ≤ e−ζ /2 . A.2. The Gaussian Minimax Theorem. To compute the expectations of certain functions of Gaussian random variables, we depend on a comparison principle due to Gordon [Gor85, Thm. 1.1]. Let S be an abstract set. A family {Z s : s ∈ S} of real random variables is called a centered Gaussian process when each element Z s has mean zero and each finite subcollection {Z s1 , . . . , Z sn } has a jointly Gaussian distribution. Fact A.3 (Gaussian Minimax Theorem). Let T and U be finite sets. Consider two centered Gaussian processes {X t u } and {Y t u }, indexed over T ×U . For all choices of indices, suppose that  2 2  E X t u = E Y t u E X t u X t u0 ≤ E Yt u Yt u0   E X t u X t 0 u 0 ≥ E Y t u Y t 0 u 0 when t 6= t 0 . Then, for all real numbers λt u and ζ, ¾ ½ ¾ ½ ¡ ¢ ¡ ¢ P min max λt u + X t u ≥ ζ ≥ P min max λt u + Y t u ≥ ζ . t ∈T u∈U t ∈T u∈U Fact A.3 extends to infinite index sets T,U by approximation. 80 S. OYMAK AND J. A. TROPP A PPENDIX B. S PECTRAL B OUNDS FOR R ANDOM M ATRICES Our argument also depends heavily on some non-asymptotic bounds for the spectrum of a random matrix with independent entries. These results only give rough estimates, but they are adequate for our purposes. The first result gives tail bounds for the extreme singular values of a rectangular matrix with independent, subgaussian entries. Fact B.1 (Subgaussian Matrix: Tail Bounds). Let X be an d 1 × d 2 random matrix with independent, standardized entries that are uniformly subgaussian: ¢1/p 1 ¡ ≤ B. sup p E |X i j |p p p≥1 (B.1) Then the largest singular value σmax (X ) and the d 2 -th largest singular value σmin (X ) satisfy the bounds n o p p 2 P σmax (X ) > d 1 + CB 2 d 2 + CB 2 ζ ≤ e−ζ n o p p 2 P σmin (X ) < d 1 − CB 2 d 2 − CB 2 ζ ≤ e−ζ . This result follows from [Ver12, Thm. 5.39] when we track the role of the subgaussian constant through the proof. The second result gives a tail bound for the norm of a matrix with independent entries that may only have two moments; it is based on the matrix Rosenthal inequality [Tro15c, Thm. 1.1] and a standard concentration inequality [BLM13, Thm. 15.5]. Fact B.2 (Heavy-Tailed Matrix: Norm Bound). Fix a parameter p ∈ [2, log(d 1 + d 2 )]. Let X be a d 1 × d 2 random matrix with independent entries that have the following properties. • The entries are centered: E X i j = 0. • The variances of the entries are uniformly bounded: Var(X i j ) ≤ α. • The entries have uniformly bounded pth moments: E |X i j |p ≤ νp . Then q n ¢ o ¡ P kX k ≥ C α(d 1 + d 2 ) log(d 1 + d 2 ) + Cν(d 1 + d 2 )2/p log(d 1 + d 2 ) ζ ≤ ζ−p . Proof Sketch. Write the random matrix as a sum of independent random matrices: Xd1 Xd2 X = i =1 X E , j =1 i j i j where Ei j is the d 1 × d 2 matrix with a one in the (i , j ) position and zeros elsewhere. A straightforward application of the matrix Rosenthal inequality [Tro15c, Thm. I] yields q ¡ ¢1/p E kX k ≤ C α(d 1 + d 2 ) log(d 1 + d 2 ) + C E maxi j |X i j |p log(d 1 + d 2 ) q ≤ C α(d 1 + d 2 ) log(d 1 + d 2 ) + Cν(d 1 d 2 )1/p log(d 1 + d 2 ) q ≤ C α(d 1 + d 2 ) log(d 1 + d 2 ) + Cν(d 1 + d 2 )2/p log(d 1 + d 2 ). The second line follows when we replace the maximum by a sum and exploit the uniform moment estimate. The third line is just the inequality between the geometric and arithmetic means. A standard concentration inequality for moments [BLM13, Thm. 15.5] gives £ p ¡ p ¤1/p p/2 ¢1/p E(kX k − E kX k)+ ≤ C p E V+ In this expression, the variance parameter X £¡ ¢2 ¤ V+ := i j E kX k − kX (i j ) k + | X . UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION 81 The (i , j ) entry of X (i j ) is an independent copy of the corresponding entry of X ; the remaining entries of the two matrices are the same. Applying the usual method [BLM13, Ex. 3.14], we see that £¡ ¢2 ¤ V+ ≤ C maxi j E X i j − X i0 j | X . Applying the same considerations as in the last paragraph, we obtain ¡ p/2 ¢1/p ≤ Cν(d 1 + d 2 )2/p . E V+ Combine these results and apply Markov’s inequality to obtain the tail bound © ª p P kX k ≥ E kX k + Cν p(d 1 + d 2 )2/p ζ ≤ ζ−p . Introduce the estimate for the expected norm to complete the argument.  A CKNOWLEDGMENTS The authors would like to thank David Donoho, Surya Ganguli, Babak Hassibi, Michael McCoy, Andreas Maurer, Andrea Montanari, Ivan Nourdin, Giovanni Peccati, Adrian Röllin, Jared Tanner, Christos Thrampoulidis, and Madeleine Udell for helpful conversations. We also thank the anonymous reviewers and the editors for their careful reading and suggestions. SO was generously supported by the Simons Institute for the Theory of Computing and NSF award CCF-1217058. JAT gratefully acknowledges support from ONR award N00014-11-1002 and the Gordon & Betty Moore Foundation. R EFERENCES [ALMT14] D. Amelunxen, M. Lotz, M. B. McCoy, and J. A. Tropp. Living on the edge: phase transitions in convex programs with random data. Inf. Inference, 3(3):224–294, 2014. [BDN15] J. Bourgain, S. Dirksen, and J. Nelson. Toward a unified theory of sparse dimensionality reduction in Euclidean space. Geom. Funct. Anal., 25(4):1009–1088, 2015. [BGVV14] S. Brazitikos, A. Giannopoulos, P. Valettas, and B.-H. Vritsiou. Geometry of isotropic convex bodies, volume 196 of Mathematical Surveys and Monographs. American Mathematical Society, Providence, RI, 2014. [BLM13] S. Boucheron, G. Lugosi, and P. Massart. Concentration inequalities. Oxford University Press, Oxford, 2013. A nonasymptotic theory of independence, With a foreword by Michel Ledoux. [BLM15] M. Bayati, M. Lelarge, and A. Montanari. Universality in polytope phase transitions and message passing algorithms. Ann. Appl. Probab., 25(2):753–822, 2015. [BM12] M. Bayati and A. Montanari. The LASSO risk for Gaussian matrices. IEEE Trans. Inform. Theory, 58(4):1997–2017, 2012. [Bog98] V. I. Bogachev. Gaussian measures, volume 62 of Mathematical Surveys and Monographs. American Mathematical Society, Providence, RI, 1998. [BS10] Z. Bai and J. W. Silverstein. Spectral analysis of large dimensional random matrices. Springer Series in Statistics. Springer, New York, second edition, 2010. [BY93] Z. D. Bai and Y. Q. Yin. Limit of the smallest eigenvalue of a large-dimensional sample covariance matrix. Ann. Probab., 21(3):1275–1294, 1993. [CDS98] S. S. Chen, D. L. Donoho, and M. A. Saunders. Atomic decomposition by basis pursuit. SIAM J. Sci. Comput., 20(1):33– 61, 1998. [Cha06] S. Chatterjee. A generalization of the Lindeberg principle. Ann. Probab., 34(6):2061–2076, 2006. [CRPW12] V. Chandrasekaran, B. Recht, P. A. Parrilo, and A. S. Willsky. The convex geometry of linear inverse problems. Found. Comput. Math., 12(6):805–849, 2012. [CRT06] E. J. Candès, J. Romberg, and T. Tao. Robust uncertainty principles: exact signal reconstruction from highly incomplete frequency information. IEEE Trans. Inform. Theory, 52(2):489–509, 2006. [CRTV05] E. Candès, M. Rudelson, T. Tao, and R. Vershynin. Error correction via linear programming. In Foundations of Computer Science, 2005. FOCS 2005. 46th Annual IEEE Symposium on, pages 668–681, Oct 2005. [CSPW11] V. Chandrasekaran, S. Sanghavi, P. A. Parrilo, and A. S. Willsky. Rank-sparsity incoherence for matrix decomposition. SIAM J. Optim., 21(2):572–596, 2011. [CW13] K. L. Clarkson and D. P. Woodruff. Low rank approximation and regression in input sparsity time. In STOC’13— Proceedings of the 2013 ACM Symposium on Theory of Computing, pages 81–90. ACM, New York, 2013. [DDW+ 07] M. A. Davenport, M. F. Duarte, M. B. Wakin, J. N. Laska, D. Takhar, K. F. Kelly, and R. G. Baraniuk. The smashed filter for compressive classification and target recognition. In Proc. SPIE, volume 6498, pages 64980H–64980H–12, 2007. 82 [DGM13] [DH01] [DJM13] [Don06a] [Don06b] [Don06c] [DS01] [DT06] [DT09a] [DT09b] [DT10] [EK12] [Faz02] [FM14] [FR13] [GG15] [GNP14] [Gor85] [Gor88] [Gru07] [HMT11] [JM14] [Kle55] [KM11] [KN14] [KY14] [Lin22] [LO94] [LT11] [Mah11] [Mas00] [Mau12] S. OYMAK AND J. A. TROPP D. L. Donoho, M. Gavish, and A. Montanari. The phase transition of matrix recovery from Gaussian measurements matches the minimax MSE of matrix denoising. Proc. Natl. Acad. Sci. USA, 110(21):8405–8410, 2013. D. L. Donoho and X. Huo. Uncertainty principles and ideal atomic decomposition. IEEE Trans. Inform. Theory, 47(7):2845–2862, 2001. D. L. Donoho, I. Johnstone, and A. Montanari. Accurate prediction of phase transitions in compressed sensing via a connection to minimax denoising. IEEE Trans. Inform. Theory, 59(6):3396–3433, 2013. D. L. Donoho. Compressed sensing. IEEE Trans. Inform. Theory, 52(4):1289–1306, 2006. D. L. Donoho. For most large underdetermined systems of linear equations the minimal l 1 -norm solution is also the sparsest solution. Comm. Pure Appl. Math., 59(6):797–829, 2006. D. L. Donoho. High-dimensional centrally symmetric polytopes with neighborliness proportional to dimension. Discrete Comput. Geom., 35(4):617–652, 2006. K. R. Davidson and S. J. Szarek. Local operator theory, random matrices and Banach spaces. In Handbook of the geometry of Banach spaces, Vol. I, pages 317–366. North-Holland, Amsterdam, 2001. D. Donoho and J. Tanner. Thresholds for the recovery of sparse solutions via l1 minimization. In Information Sciences and Systems, 2006 40th Annual Conference on, pages 202–206, March 2006. D. Donoho and J. Tanner. Observed universality of phase transitions in high-dimensional geometry, with implications for modern data analysis and signal processing. Philos. Trans. R. Soc. Lond. Ser. A Math. Phys. Eng. Sci., 367(1906):4273– 4293, 2009. With electronic supplementary materials available online. D. L. Donoho and J. Tanner. Counting faces of randomly projected polytopes when the projection radically lowers dimension. J. Amer. Math. Soc., 22(1):1–53, 2009. D. L. Donoho and J. Tanner. Counting the faces of randomly-projected hypercubes and orthants, with applications. Discrete Comput. Geom., 43(3):522–541, 2010. Y. C. Eldar and G. Kutyniok, editors. Compressed sensing. Cambridge University Press, Cambridge, 2012. Theory and applications. M. Fazel. Matrix rank minimization with applications. PhD thesis, Stanford, 2002. R. Foygel and L. Mackey. Corrupted sensing: novel guarantees for separating structured signals. IEEE Trans. Inform. Theory, 60(2):1223–1247, 2014. S. Foucart and H. Rauhut. A mathematical introduction to compressive sensing. Applied and Numerical Harmonic Analysis. Birkhäuser/Springer, New York, 2013. P. Gao and S. Ganguli. On simplicity and complexity in the brave new world of large-scale neuroscience. Curr. Opinion Neurobiology, 32:148–155, 2015. L. Goldstein, I. Nourdin, and G. Peccati. Gaussian phase transitions and conic intrinsic volumes: Steining the Steiner formula. Available at http://arXiv.org/abs/1411.6265, Nov. 2014. Y. Gordon. Some inequalities for Gaussian processes and applications. Israel J. Math., 50(4):265–289, 1985. Y. Gordon. On Milman’s inequality and random subspaces which escape through a mesh in Rn . In Geometric aspects of functional analysis (1986/87), volume 1317 of Lecture Notes in Math., pages 84–106. Springer, Berlin, 1988. P. M. Gruber. Convex and discrete geometry, volume 336 of Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences]. Springer, Berlin, 2007. N. Halko, P. G. Martinsson, and J. A. Tropp. Finding structure with randomness: probabilistic algorithms for constructing approximate matrix decompositions. SIAM Rev., 53(2):217–288, 2011. A. Javanmard and A. Montanari. Hypothesis testing in high-dimensional regression under the Gaussian random design model: asymptotic theory. IEEE Trans. Inform. Theory, 60(10):6522–6554, 2014. V. L. Klee, Jr. Separation properties of convex cones. Proc. Amer. Math. Soc., 6:313–318, 1955. S. B. Korada and A. Montanari. Applications of the Lindeberg principle in communications and statistical learning. IEEE Trans. Inform. Theory, 57(4):2440–2450, 2011. D. M. Kane and J. Nelson. Sparser Johnson-Lindenstrauss transforms. J. ACM, 61(1):Art. 4, 23, 2014. A. Knowles and J. Yin. Anisotropic local laws for random matrices. Available at http://arXiv.org/abs/1410.3516, Nov. 2014. J. W. Lindeberg. Eine neue Herleitung des Exponentialgesetzes in der Wahrscheinlichkeitsrechnung. Math. Z., 15(1):211–225, 1922. R. Latała and K. Oleszkiewicz. On the best constant in the Khinchin-Kahane inequality. Studia Math., 109(1):101–104, 1994. M. Ledoux and M. Talagrand. Probability in Banach spaces. Classics in Mathematics. Springer-Verlag, Berlin, 2011. Isoperimetry and processes, Reprint of the 1991 edition. M. W. Mahoney. Randomized algorithms for matrices and data. Foundations and Trends® in Machine Learning, 3(2):123–224, 2011. P. Massart. About the constants in Talagrand’s concentration inequalities for empirical processes. Ann. Probab., 28(2):863–884, 2000. A. Maurer. Thermodynamics and concentration. Bernoulli, 18(2):434–454, 2012. UNIVERSALITY OF RANDOMIZED DIMENSION REDUCTION [Men10] [Men14] [MOO10] [MPTJ07] [MT13] [MT14a] [MT14b] [NN13] [OH10] [OH13] [OTH13] [PW15] [Rot73] [RV08] [San52] [San76] [Sar06] [Sch50] [Sio58] [Sto09] [Sto13] [SW08] [TAH15] [Tao12] [TH15] [Tib96] [Tik15] [TOH15] [Tro59] [Tro06] 83 S. Mendelson. Empirical processes with a bounded ψ1 diameter. Geom. Funct. Anal., 20(4):988–1027, 2010. S. Mendelson. A remark on the diameter of random sections of convex bodies. In B. Klartag and E. Milman, editors, Geometric Aspects of Functional Analysis, volume 2116 of LNM, pages 395–404. Springer, 2014. E. Mossel, R. O’Donnell, and K. Oleszkiewicz. Noise stability of functions with low influences: invariance and optimality. Ann. of Math. (2), 171(1):295–341, 2010. S. Mendelson, A. Pajor, and N. Tomczak-Jaegermann. Reconstruction and subgaussian operators in asymptotic geometric analysis. Geom. Funct. Anal., 17(4):1248–1282, 2007. M. B. McCoy and J. A. Tropp. The achievable performance of convex demixing. Available at http://arXiv.org/ abs/arXiv:1309.7478, Sep. 2013. M. B. McCoy and J. A. Tropp. From Steiner formulas for cones to concentration of intrinsic volumes. Discrete Comput. Geom., 51(4):926–963, 2014. M. B. McCoy and J. A. Tropp. Sharp recovery bounds for convex demixing, with applications. Found. Comput. Math., 14(3):503–567, 2014. J. Nelson and H. L. Nguyen. OSNAP: faster numerical linear algebra algorithms via sparser subspace embeddings. In 2013 IEEE 54th Annual Symposium on Foundations of Computer Science—FOCS 2013, pages 117–126. IEEE Computer Soc., Los Alamitos, CA, 2013. S. Oymak and B. Hassibi. New null space results and recovery thresholds for matrix rank minimization. Available at http://arXiv.org/abs/1011.6326, Nov. 2010. S. Oymak and B. Hassibi. Asymptotically exact denoising in relation to compressed sensing. Available at http: //arXiv.org/abs/1305.2714, May 2013. S. Oymak, C. Thrampoulidis, and B. Hassibi. The squared-error of generalized lasso: A precise analysis. In Communication, Control, and Computing (Allerton), 2013 51st Annual Allerton Conference on, pages 1002–1009, Oct 2013. Available at http://arXiv.org/abs/1311.0830. M. Pilanci and M. Wainwright. Randomized sketches of convex programs with sharp guarantees. Information Theory, IEEE Transactions on, 61(9):5096–5115, Sept 2015. V. I. Rotar’. Certain limit theorems for polynomials of degree two. Teor. Verojatnost. i Primenen., 18:527–534, 1973. M. Rudelson and R. Vershynin. On sparse reconstruction from Fourier and Gaussian measurements. Comm. Pure Appl. Math., 61(8):1025–1045, 2008. L. A. Santaló. Integral geometry in spaces of constant curvature. Repub. Argentina. Publ. Comision Nac. Energia Atomica. Ser. Mat., 1(1):68, 1952. L. A. Santaló. Integral geometry and geometric probability. Addison-Wesley Publishing Co., Reading, Mass.-LondonAmsterdam, 1976. With a foreword by Mark Kac, Encyclopedia of Mathematics and its Applications, Vol. 1. T. Sarlos. Improved approximation algorithms for large matrices via random projections. In Foundations of Computer Science, 2006. FOCS ’06. 47th Annual IEEE Symposium on, pages 143–152, Oct 2006. L. Schläfli. Gesammelte mathematische Abhandlungen. Band I. Verlag Birkhäuser, Basel, 1950. M. Sion. On general minimax theorems. Pacific J. Math., 8:171–176, 1958. M. Stojnic. Various thresholds for `1 -optimization in compressed sensing. Available at http://arXiv.org/abs/ 0907.3666, July 2009. M. Stojnic. Regularly random duality. Available at http://arXiv.org/abs/1303.7295, Mar. 2013. R. Schneider and W. Weil. Stochastic and integral geometry. Probability and its Applications (New York). SpringerVerlag, Berlin, 2008. C. Thrampoulidis, E. Abbasi, and B. Hassibi. High-dimensional error anlaysis of regularized m-estimators. Forthcoming, Nov. 2015. T. Tao. Topics in random matrix theory, volume 132 of Graduate Studies in Mathematics. American Mathematical Society, Providence, RI, 2012. C. Thrampoulidis and B. Hassibi. Isotropically random orthogonal matrices: Performance of lasso and minimum conic singular values. In Information Theory (ISIT), 2015 IEEE International Symposium on, pages 556–560, June 2015. Available at http://arXiv.org/abs/1503.07236. R. Tibshirani. Regression shrinkage and selection via the lasso. J. Roy. Statist. Soc. Ser. B, 58(1):267–288, 1996. K. Tikhomirov. The limit of the smallest singular value of random matrices with i.i.d. entries. Adv. Math., 284:1–20, 2015. C. Thrampoulidis, S. Oymak, and B. Hassibi. The Gaussian min–max theorem in the presence of convexity. In Proceedings of The 28th Conference on Learning Theory (COLT), Jul. 2015. Available at http://arXiv.org/abs/ 1408.4837. H. F. Trotter. An elementary proof of the central limit theorem. Arch. Math., 10:226–234, 1959. J. A. Tropp. Just relax: convex programming methods for identifying sparse signals in noise. IEEE Trans. Inform. Theory, 52(3):1030–1051, 2006. 84 [Tro15a] [Tro15b] [Tro15c] [TV15] [Ver12] [Ver15] [Wen62] [Woo14] [Yin86] S. OYMAK AND J. A. TROPP J. A. Tropp. Code for reproducing figures from Oymak & Tropp, Universality Laws for Randomized Dimension Reduction, with Applications, 2015.ropp, Universality Laws for Randomized Dimension Reduction, with Applications, 2015. Available at http://users.cms.caltech.edu/~jtropp, Nov. 2015. J. A. Tropp. Convex recovery of a structured signal from independent random measurements. In G. Pfander, editor, Sampling Theory: A Rennaissance. Birkhäuser Verlag, 2015. Available at http://arXiv.org/abs/1405.1102. J. A. Tropp. The expected norm of a sum of independent random matrices: An elementary approach. In HighDimensional Probability VII, Cargèse, June 2015. To appear. Available at http://arXiv.org/abs/1506.04711. T. Tao and V. Vu. Random matrices: universality of local spectral statistics of non-Hermitian matrices. Ann. Probab., 43(2):782–874, 2015. R. Vershynin. Introduction to the non-asymptotic analysis of random matrices. In Compressed sensing, pages 210–268. Cambridge Univ. Press, Cambridge, 2012. R. Vershynin. Estimation in high dimensions: A geometric perspective. In G. Pfander, editor, Sampling Theory: A Rennaissance. Birkhäuser Verlag, 2015. J. G. Wendel. A problem in geometric probability. Math. Scand., 11:109–111, 1962. D. P. Woodruff. Sketching as a tool for numerical linear algebra. Foundations and Trends® in Theoretical Computer Science, 10(1–2):1–157, 2014. Y. Q. Yin. Limiting spectral distribution for a class of random matrices. J. Multivariate Anal., 20(1):50–68, 1986.
8cs.DS
Salient Object Detection by Lossless Feature Reflection arXiv:1802.06527v1 [cs.CV] 19 Feb 2018 Pingping Zhang1,3 , Wei Liu2,3 , Huchuan Lu1 , Chunhua Shen3 1 Dalian University of Technology, Dalian, 116024, P.R. China 2 Shanghai Jiao Tong University, Shanghai, 200240, P.R. China 3 University of Adelaide, Adelaide, SA 5005, Australia [email protected]; [email protected]; [email protected]; [email protected] Abstract Salient object detection, which aims to identify and locate the most salient pixels or regions in images, has been attracting more and more interest due to its various real-world applications. However, this vision task is quite challenging, especially under complex image scenes. Inspired by the intrinsic reflection of natural images, in this paper we propose a novel feature learning framework for large-scale salient object detection. Specifically, we design a symmetrical fully convolutional network (SFCN) to learn complementary saliency features under the guidance of lossless feature reflection. The location information, together with contextual and semantic information, of salient objects are jointly utilized to supervise the proposed network for more accurate saliency predictions. In addition, to overcome the blurry boundary problem, we propose a new structural loss function to learn clear object boundaries and spatially consistent saliency. The coarse prediction results are effectively refined by these structural information for performance improvements. Extensive experiments on seven saliency detection datasets demonstrate that our approach achieves consistently superior performance and outperforms the very recent state-of-the-art methods. 1 Introduction As a fundamental yet challenging task in computer vision, salient object detection (SOD) aims to identify and locate distinctive objects or regions which attract human attention in natural images. In general, SOD is regarded as a prerequisite step to narrow down subsequent object-related vision tasks. For example, it can be used in image retrieval, sematic segmentation, visual tracking and person re-identification, etc. In the past two decades, a large number of SOD methods have been proposed. Most of them have been well summarized in [Borji et al., 2015]. According to that work, conventional SOD methods focus on extracting discriminative local and global handcrafted features from pixels or regions to represent their visual properties. With several heuristic priors, these methods predict salient scores according to the extracted features for saliency detection. Although great suc- Left Sibling Branch Right Sibling Branch O-Input 384x384x3 R-Input 64 128 256 512 512 512 512 128 256 64 384x384x3 512 512 Fusing Branch 256 Conv <3x3,1> Conv <3x3,1> with AdaBN and ReLU 128 64 2 Concat and Merge Structural Loss 384x384x1 384x384x1 MaxPooling <2x2,2> Copy DeConv <2x2,2> Figure 1: The semantic overview of our proposed SFCN. cess has been made, there still exist many important problems which need to be solved. For example, the low-level handcrafted features suffer from limited representation capability, and are difficult to capture the semantic and structural information of objects in images, which is very important for more accurate SOD. What’s more, to further extract powerful and robust visual features manually is a tough mission for performance improvement, especially in complex image scenes, such as cluttered backgrounds and low-contrast imaging patterns. With the recent prevalence of deep architectures, many remarkable progresses have been achieved in a wide range of computer vision tasks, e.g., image classification [Simonyan and Zisserman, 2014], object detection [Girshick et al., 2014], and semantic segmentation [Long et al., 2015]. Thus, many researchers start to make their efforts to utilize deep convolutional neural networks (CNNs) for SOD and have achieved favourable performance, since CNNs have strong ability to automatically extract high-level feature representations, successfully avoiding the drawbacks of handcrafted features. However, most of state-of-the-art SOD methods still require large-scale pre-trained CNNs, which usually employ the strided convolution and pooling operations. These downsampling methods increase the receptive field of CNNs, helping to extract high-level semantic features, nevertheless they inevitably drop the location information and fine details of objects, leading to unclear boundary predictions. Furthermore, the lack of structural supervision also makes SOD an extremely challenging problem in complex image scenes. In order to utilize the semantic and structural information derived from deep pre-trained CNNs, we propose to solve both tasks of complementary feature extraction and saliency region classification with an unified framework which is learned in the end-to-end manner. Specifically, we design a symmetrical fully convolutional network (SFCN) architecture which consists of two sibling branches and one fusing branch, as illustrated in Fig. 1. The two sibling branches take reciprocal image pairs as inputs and share weights for learning complementary visual features under the guidance of lossless feature reflection. The fusing branch integrates the multi-level complementary features in a hierarchical manner for SOD. More importantly, to effectively train our network, we propose a novel loss function which incorporates structural information and supervises the three branches during the training process. In this manner, our proposed model sufficiently captures the boundaries and spatial contexts of salient objects, hence significantly boosts the performance of SOD. In summary, our contributions are three folds: • We present a novel network architecture, i.e., SFCN, which is symmetrically designed to learn complementary visual features and predict accurate saliency maps under the guidance of lossless feature reflection. • We propose a new structural loss function to learn clear object boundaries and spatially consistent saliency. This loss function is able to utilize the location, contextual and semantic information of salient objects to supervise the proposed SFCN for performance improvements. • Extensive experiments on seven large-scale saliency benchmarks demonstrate that the proposed approach achieves superior performance and outperforms the very recent state-of-the-art methods by a large margin. 2 Related Work Salient Object Detection. Recent years, deep learning based methods have achieved solid performance improvements in SOD. For example, [Wang et al., 2015] integrate both local pixel estimation and global proposal search for SOD by training two deep neural networks. [Zhao et al., 2015] propose a multi-context deep CNN framework to benefit from the local context and global context of salient objects. [Li and Yu, 2015] employ multiple deep CNNs to extract multi-scale features for saliency prediction. Then they propose a deep contrast network to combine a pixel-level stream and segmentwise stream for saliency estimation [Li and Yu, 2016]. Inspired by the great success of FCNs, [Wang et al., 2016] develop a recurrent FCN to incorporate saliency priors for more accurate saliency map inference. [Liu and Han, 2016] also design a deep hierarchical network to learn a coarse global estimation and then refine the saliency map hierarchically and progressively. Then, [Hou et al., 2017] introduce dense short connections to the skip-layers within the holistically-nested edge detection (HED) architecture [Xie and Tu, 2015] to get rich multi-scale features for SOD. [Zhang et al., 2017a] propose a bidirectional learning framework to aggregate multilevel convolutional features for SOD. And they also develop a novel dropout to learn the deep uncertain convolutional features to enhance the robustness and accuracy of saliency detection [Zhang et al., 2017b]. [Wang et al., 2017b] provide a stage-wise refinement framework to gradually get accurate saliency detection results. Despite these approaches employ powerful CNNs and make remarkable success in SOD, there still exist some obvious problems. For example, the strategies of multiple-stage training reduce the efficiency. And the explicit pixel-wise loss functions used by these methods for model training cannot well reflect the structural information of salient objects. Hence, there is still a large space for performance improvements. Image Intrinsic Reflection. Image intrinsic reflection is a classical topic in computer vision field. It aims to separate a color image into two intrinsic reflection images: an image of just the highlights, and the original image with the highlights removed. It can be used to segment and analyze surfaces with image color variations. Most of existing methods are based on the Retinex model [Land and McCann, 1971], which captures image information for Mondrian images: images of a planar canvas that is covered by samll patches of constant reflectance and illuminated by multiple light sources. Recent years, researchers have augmented the basic Retinex model with non-local texture cues [Zhao et al., 2012] and sparsity priors [Shen and Yeo, 2011]. Sophisticated techniques that recover reflectance and shading along with a shape estimate have also been proposed [Barron and Malik, 2012]. Inspired by these works, we construct a reciprocal image pair based on the input image (see Section 3.1). However, there are three obvious differences between our method and previous intrinsic reflection methods: 1) the objective is different. The aim of previous methods is explaining an input RGB image by estimating albedo and shading fields. Our aim is to learn complementary visual features for SOD. 2) the resulting image pair is different. Image intrinsic reflection methods usually factory an input image into a reflectance image and a shading image, while our method builds a reciprocal image pair for each image as the input of deep networks. 3) the source of reflection is different. The source of previous intrinsic reflection methods is the albedo of depicted surfaces, while our reflection is originated from deep features in CNNs. Therefore, our reflection is feature-level not image-level. 3 The Proposed Method Fig. 1 illustrates the semantic overview of our method. We first convert an input RGB image into a reciprocal image pair, including the origin image (O-Input) and the reflection image (R-Input), by utilizing the ImageNet mean [Deng et al., 2009] and a pixel-wise negation operator. Then the image pair is fed into the sibling branches of our proposed SFCN, extracting multi-level deep features. Afterwards, the fusing branch hierarchically integrates the complementary features into the same resolution of input images. Finally, the saliency map is predicted by exploiting integrated features and the structural loss. In the following subsections, we elaborate the proposed SFCN architecture and the weighted structural loss. 3.1 Symmetrical FCN The proposed SFCN is an end-to-end fully convolutional network. It consists of three main branches with a paired reciprocal image input to achieve lossless feature reflection learning. We describe each of them as follows. Reciprocal Image Input. To capture complementary image information, we first convert the given RGB image X ∈ RW ×H×3 to a reciprocal image pair by the following reflection function, Rec(X, k) = (X − M, k(M − X))), = (X − M, −k(X − M )) k = (XO , XR ). (1) (2) (3) where k is a hyperparameter to control the reflection scale and M ∈ RW ×H×3 is the mean of an image or image dataset. From above equations, one can see that the converted image k pair, i.e., XO and XR , is reciprocal with a reflection plane. In detail, the reflection scheme is a pixel-wise negation operator, allowing the given images to be reflected in both positive and negative directions while maintaining the same content of images. In the proposed reflection, we use the multiplicative operator to measure the reflection scale, but it is not the only feasible method. For example, this reflection can be combined with other non-linear operators, such as quadratic form, to add more diversity. For reducing the computation, in this paper we use k = 1 and the mean of the ImageNet dataset. Sibling Branches with AdaBN. Based on the reciprocal image pair, we propose two sibling branches to extract complementary reflection features. More specifically, we build each sibling branch, following the VGG-16 model [Simonyan and Zisserman, 2014]. Each sibling branch has 13 convolutional layers (kernel size = 3 × 3, stride size = 1) and 4 max pooling layers (pooling size = 2 × 2, stride = 2). To achieve the lossless reflection features, the two sibling branches are designed to share weights in convolutional layers, but with adaptive batch normalization (AdaBN). In other words, we keep the weights of corresponding convolutional layers of the two sibling branches the same, while use different learnable BN between the convolution and ReLU operators [Zhang et al., 2017a]. The main reason of this design is that after the reflection transform, the reciprocal images have different image domains. Domain related knowledge heavily affects the statistics of BN layers. In order to learn domain invariant features, it’s beneficial for each domain to keep its own BN statistics in each layers. Hierarchical Feature Fusion. After extracting multi-level reflection features, we adhere an additional fusing branch to integrate them for the saliency prediction. In order to preserve the spatial structure and enhance the contextual information, we integrate the multi-level reflection features in a hierarchical manner. Formally, the fusing function is defined by ( k h([gl (XO ), fl+1 (X), gl∗ (XR )]), l < L fl (X) = (4) ∗ k h([gl (XO ), gl (XR )]), l = L where h denotes the integration operator, which is a 1 × 1 convolutional layer followed by a deconvolutional layer to ensure the same resolution. [·] is the concatenation operator in channel-wise. gl and gl∗ are the reflection features of the l-th convolutional layer in the two sibling branches, respectively. In the end, we add a convolutional layer with two filters for the saliency map prediction. The numbers in Fig. 1 illustrate the detailed filter setting in each convolutional layer. 3.2 Weighted Structural Loss Given the SOD training dataset S = {(Xn , Yn )}N n=1 with N training pairs, where Xn = {xni , i = 1, ..., T } and Yn = {yin , i = 1, ..., T } are the input image and the binary groundtruth image with T pixels, respectively. yin = 1 denotes the foreground pixel and yin = 0 denotes the background pixel. For notional simplicity, we subsequently drop the subscript n and consider each image independently. In most of existing SOD methods, the loss function used to train the network is the standard pixel-wise binary cross-entropy (BCE) loss: X log Pr(yi = 1|X; θ) Lbce = − i∈Y+ − X (5) log Pr(yi = 0|X; θ). i∈Y− where θ is the parameter of the network. Pr(yi = 1|X; θ) ∈ [0, 1] is the confidence score of the network prediction that measures how likely the pixel belong to the foreground. However, for a typical natural image, the class distribution of salient/non-salient pixels is heavily imbalanced: most of the pixels in the ground truth are non-salient. To automatically balance the loss between positive/negative classes, we introduce a class-balancing weight β on a per-pixel term basis, following [Xie and Tu, 2015]. Specifically, we define the following weighted cross-entropy loss function, X Lwbce = −β log Pr(yi = 1|X; θ) i∈Y+ −(1 − β) X (6) log Pr(yi = 0|X; θ). i∈Y− The loss weight β = |Y+ |/|Y |, and |Y+ | and |Y− | denote the foreground and background pixel number, respectively. For saliency detection, it is also crucial to preserve the overall spatial structure and semantic content. Thus, rather than only encouraging the pixels of the output prediction to match with the ground-truth using the above pixel-wise loss, we also minimize the differences between their multi-level features by a deep convolutional network. The main intuition behind this operator is that minimizing the difference between multi-level features, which encode low-level fine details and high-level coarse semantics, helps to retain the spatial structure and semantic content of predictions. Formally, let φl denotes the output of the l-th convolutional layer in a CNN, our semantic content (SC) loss is defined as Lsc = L X λl ||φl (Y ; w) − φl (Ŷ ; w)||2 , (7) l=1 where Ŷ is the overall prediction, w is the parameter of a pretrained CNN and λl is the trade-off parameter, controlling the influence of the loss in the l-th layer. In our case, we use the light CNN-9 model [Wu et al., 2015] to calculate the above loss between the ground-truth and the prediction. To overcome the blurry boundary problem [Li et al., 2016], we also introduce the smooth L1 loss which encourages to keep the details of boundaries of salient objects. Specifically, the smooth L1 loss function is defined as  0.5||D||22 , ||D||1 < 0.5 Ls1 = (8) ||D||1 − 0.5, otherwise where D = Y − Ŷ . This training loss also helps to minimize pixel-level differences between the overall prediction and the ground-truth. By taking all above loss functions together, we define our final loss function as L = arg min Lwbce + µLsc + γLs1 , al., 2015] and recently proposed S-measure [Fan et al., 2017]. The PR curve of a specific dataset exhibits the mean precision and recall of saliency maps at different thresholds. The Fmeasure is a weighted mean of average precision and average recall, calculated by Fη = (1 + η 2 ) × P recision × Recall . η 2 × P recision × Recall (10) We set η 2 to be 0.3 to weigh precision more than recall as suggested in [Borji et al., 2015]. For fair comparison on non-salient regions, we also calculate the mean absolute error (MAE) by M AE = (9) W X H X 1 |S(x, y) − G(x, y)|, W × H x=1 y=1 (11) where µ and γ are hyperparameters to balance the specific terms. All the above losses are continuously differentiable, so we can use the standard stochastic gradient descent (SGD) method to obtain the optimal parameters. In addition, we use λl = 1, µ = 0.01 and γ = 20 to optimize the final loss function for our experiments without further tuning. where W and H are the width and height of the input image. S(x, y) and G(x, y) are the pixel values of the saliency map and the binary ground truth at (x, y), respectively. To evaluate the spatial structure similarities of saliency maps, we also calculate the S-measure, defined as 4 where λ ∈ [0, 1] is the balance parameter. So and Sr are the object-aware and region-aware structural similarity, respectively. We set λ = 0.5 as suggested in [Fan et al., 2017]. 4.1 Experimental Results Datasets and Evaluation Metrics To train our model, we adopt the MSRA10K [Borji et al., 2015] dataset, which has 10,000 training images with high quality pixel-wise saliency annotations. Most of images in this dataset have a single salient object. To combat overfitting, we augment this dataset by random cropping and mirror reflection, producing 120,000 training images totally. For the performance evaluation, we adopt seven public saliency detection datasets as follows: DUT-OMRON [Yang et al., 2013] dataset has 5,168 high quality natural images. Each image in this dataset has one or more objects with relatively complex image background. DUTS-TE dataset is the test set of currently largest saliency detection benchmark (DUTS) [Wang et al., 2017a]. It contains 5,019 images with high quality pixel-wise annotations. ECSSD [Shi et al., 2016] dataset contains 1,000 natural images, in which many semantically meaningful and complex structures are included. HKU-IS-TE [Li and Yu, 2015] dataset has 1,447 images with pixel-wise annotations. Images of this dataset are well chosen to include multiple disconnected objects or objects touching the image boundary. PASCAL-S [Li et al., 2014] dataset is generated from the PASCAL VOC [Everingham et al., 2010] dataset and contains 850 natural images with segmentation-based masks. SED [Borji, 2015] dataset has two non-overlapped subsets, i.e., SED1 and SED2. SED1 has 100 images each containing only one salient object, while SED2 has 100 images each containing two salient objects. SOD [Jiang et al., 2013] dataset has 300 images, in which many images contain multiple objects either with low contrast or touching the image boundary. To evaluate the performance of varied SOD algorithms, we adopt four metrics, including the widely used precision-recall (PR) curves, F-measure, mean absolute error (MAE) [Borji et Sλ = λ ∗ So + (1 − λ) ∗ Sr , 4.2 (12) Implementation Details We implement our proposed model based on the Caffe toolbox [Jia et al., 2014] with the MATLAB 2016 platform. We train and test our method in a quad-core PC machine with an NVIDIA Titan 1070 GPU (with 8G memory) and an i5-6600 CPU. We perform training with the augmented training images from the MSRA10K dataset. Following [Zhang et al., 2017a; Zhang et al., 2017b], we do not use validation set and train the model until its training loss converges. The input image is uniformly resized into 384 × 384 × 3 pixels and subtracted the ImageNet mean [Deng et al., 2009]. The weights of sibling branches are initialized from the VGG-16 model. For the fusing branch, we initialize the weights by the “msra” method. During the training, we use standard SGD method with batch size 12, momentum 0.9 and weight decay 0.0005. We set the base learning rate to 1e-8 and decrease the learning rate by 10% when training loss reaches a flat. The training process converges after 150k iterations. When testing, our proposed SOD algorithm runs at about 12 fps. The source code will be made publicly available upon the acceptance of the work. 4.3 Comparison with the State-of-the-arts To fully evaluate the detection performance, we compare our proposed method with other 14 state-of-the-art ones, including 10 deep learning based algorithms (Amulet [Zhang et al., 2017a], DCL [Li and Yu, 2016], DHS [Liu and Han, 2016], DS [Li et al., 2016], ELD [Lee et al., 2016], LEGS [Wang et al., 2015], MCDL [Zhao et al., 2015], MDF [Li and Yu, 2015], RFCN [Wang et al., 2016], UCF [Zhang et al., 2017b]) and 4 conventional algorithms (BL [Tong et al., 2015], BSCA [Qin et al., 2015], DRFI [Jiang et al., 2013], DSR [Li et al., 2013]). For fair comparison, we use either the implementations with recommended parameter settings or the saliency maps provided by the authors. Quantitative Evaluation. As illustrated in Tab. 1, Tab. 2 and Fig. 3, our method outperforms other competing ones across all datasets in terms of near all evaluation metrics. From these results, we have other notable observations: (1) deep learning based methods consistently outperform traditional methods with a large margin, which further proves the superiority of deep features for SOD. (2) our method achieves higher Smeasure than other methods, especially on complex structure datasets, e.g., the DUT-OMRON, SED and SOD datasets. We attribute this result to our structural loss. (3) without segmentation pre-training, our method only fine-tuned from the image classification model still achieves better results than the DCL and RFCN, especially on the HKU-IS and SED datasets. (4) compared to the DHS and Amulet, our method is inferior on the DUTS-TE and PASCAL-S datasets. However, our method ranks in the second place and is still very comparable. Qualitative Evaluation. Fig. 2 provides several visual examples in various challenging cases, where our method outperforms other compared methods. For example, the images in the first two rows are of very low contrast, where most of the compared methods fail to capture the salient objects, while our method successfully highlights them with sharper edges preserved. The images in the 3-4 rows are challenging with complex structures or salient objects near the image boundary, and most of the compared methods can not predict the whole objects, while our method captures the whole salient regions with preserved structures. 4.4 Ablation Analysis We also evaluate the main components in our model. Tab.3 shows the experimental results with different model settings. All models are trained on the augmented MSRA10K dataset and share the same hyper-parameters described in subsection 4.2. Due to the limitation of space, we only show the results on the ECSSD dataset. Other datasets have the similar performance trend. From the results, we can see that the SFCN only using the channel concatenation operator without hierarchical fusion (model (a)) has achieved comparable performance to most deep learning methods. This confirms the effectiveness of reflection features. With the hierarchical fusion, the resulting SFCN (model (b)) improves the performance by a large margin. The main reason is that the fusion method introduces more contextual information from high layers to low layers, which helps to locate the salient objects. In addition, it’s no wonder that training with the Lwbce loss achieves better results than Lbce . With other two losses Lsc and Ls1 , the model achieves better performance in terms of MAE and S-measure. These results demonstrate that individual components in our model complement each other. When taking them together, the model achieves best results in all evaluation metrics. 5 Conclusion In this work, we propose a novel end-to-end feature learning framework for SOD. Our method uses a symmetrical FCN to learn complementary visual features under the guidance of lossless feature reflection. For training, we also propose a new weighted structural loss that integrates the location, semantic and contextual information of salient objects to boost the detection performance. Extensive experiments on seven large-scale saliency datasets demonstrate that the proposed method achieves significant improvement over the baseline and performs better than other state-of-the-art methods. References [Barron and Malik, 2012] Jonathan T Barron and Jitendra Malik. Color constancy, intrinsic images, and shape estimation. In ECCV, pages 57–70, 2012. [Borji et al., 2015] Ali Borji, Ming-Ming Cheng, Huaizu Jiang, and Jia Li. Salient object detection: A benchmark. IEEE TIP, 24(12):5706–5722, 2015. [Borji, 2015] Ali Borji. What is a salient object? a dataset and a baseline model for salient object detection. IEEE TIP, 24(2):742– 756, 2015. [Deng et al., 2009] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, pages 248–255, 2009. [Everingham et al., 2010] Mark Everingham, Luc Van Gool, Christopher K. I. Williams, John M. Winn, and Andrew Zisserman. The pascal visual object classes (voc) challenge. IJCV, 88:303–338, 2010. [Fan et al., 2017] Deng-Ping Fan, Ming-Ming Cheng, Yun Liu, Tao Li, and Ali Borji. Structure-measure: A new way to evaluate foreground maps. In ICCV, pages 4548–4557, 2017. [Girshick et al., 2014] Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In CVPR, pages 580–587, 2014. [Hou et al., 2017] Qibin Hou, Ming-Ming Cheng, Xiaowei Hu, Ali Borji, Zhuowen Tu, and Philip Torr. Deeply supervised salient object detection with short connections. In CVPR, pages 5300– 5309, 2017. [Jia et al., 2014] Yangqing Jia, Evan Shelhamer, Jeff Donahue, Sergey Karayev, Jonathan Long, Ross Girshick, Sergio Guadarrama, and Trevor Darrell. Caffe: Convolutional architecture for fast feature embedding. In ACM Multimedia, pages 675–678, 2014. [Jiang et al., 2013] Huaizu Jiang, Jingdong Wang, Zejian Yuan, Yang Wu, Nanning Zheng, and Shipeng Li. Salient object detection: A discriminative regional feature integration approach. In CVPR, pages 2083–2090, 2013. [Land and McCann, 1971] Edwin H Land and John J McCann. Lightness and retinex theory. JOSA, 61(1):1–11, 1971. [Lee et al., 2016] Gayoung Lee, Yu-Wing Tai, and Junmo Kim. Deep saliency with encoded low level distance map and high level features. In CVPR, pages 660–668, 2016. [Li and Yu, 2015] Guanbin Li and Yizhou Yu. Visual saliency based on multiscale deep features. In CVPR, pages 5455–5463, 2015. Methods Ours Amulet [Zhang et al., 2017a] DCL [Li and Yu, 2016] DHS [Liu and Han, 2016] DS [Li et al., 2016] ELD [Lee et al., 2016] LEGS [Wang et al., 2015] MCDL [Zhao et al., 2015] MDF [Li and Yu, 2015] RFCN [Wang et al., 2016] UCF [Zhang et al., 2017b] BL [Tong et al., 2015] BSCA [Qin et al., 2015] DRFI [Jiang et al., 2013] DSR [Li et al., 2013] DUT-OMRON Fη M AE Sλ 0.696 0.086 0.774 0.647 0.098 0.771 0.684 0.157 0.743 – – – 0.603 0.120 0.741 0.611 0.092 0.743 0.592 0.133 0.701 0.625 0.089 0.739 0.644 0.092 0.703 0.627 0.111 0.752 0.621 0.120 0.748 0.499 0.239 0.625 0.509 0.190 0.652 0.550 0.138 0.688 0.524 0.139 0.660 DUTS-TE Fη M AE Sλ 0.716 0.083 0.799 0.682 0.085 0.796 0.714 0.150 0.785 0.724 0.066 0.809 0.632 0.091 0.790 0.628 0.098 0.749 0.585 0.138 0.687 0.594 0.105 0.706 0.673 0.100 0.723 0.712 0.090 0.784 0.635 0.112 0.777 0.490 0.238 0.615 0.500 0.196 0.633 0.541 0.175 0.662 0.518 0.145 0.646 Fη 0.880 0.868 0.829 0.872 0.826 0.810 0.785 0.796 0.807 0.834 0.844 0.684 0.705 0.733 0.662 ECSSD M AE 0.052 0.059 0.149 0.060 0.122 0.080 0.118 0.101 0.105 0.107 0.069 0.216 0.182 0.164 0.178 Sλ 0.897 0.894 0.863 0.884 0.821 0.839 0.787 0.803 0.776 0.852 0.884 0.714 0.725 0.752 0.731 HKU-IS-TE Fη M AE Sλ 0.875 0.040 0.905 0.843 0.050 0.886 0.853 0.136 0.859 0.854 0.053 0.869 0.787 0.077 0.854 0.776 0.072 0.823 0.732 0.118 0.745 0.760 0.091 0.786 0.802 0.095 0.779 0.838 0.088 0.860 0.823 0.061 0.874 0.666 0.207 0.702 0.658 0.175 0.705 0.726 0.145 0.743 0.682 0.142 0.701 Table 1: Quantitative comparison with 15 methods on 4 large-scale datasets. The best three results are shown in red, green and blue, respectively. “–” means corresponding methods are trained on that dataset. Our method ranks first or second on these datasets. Methods Ours Amulet [Zhang et al., 2017a] DCL [Li and Yu, 2016] DHS [Liu and Han, 2016] DS [Li et al., 2016] ELD [Lee et al., 2016] LEGS [Wang et al., 2015] MCDL [Zhao et al., 2015] MDF [Li and Yu, 2015] RFCN [Wang et al., 2016] UCF [Zhang et al., 2017b] BL [Tong et al., 2015] BSCA [Qin et al., 2015] DRFI [Jiang et al., 2013] DSR [Li et al., 2013] PASCAL-S Fη M AE Sλ 0.772 0.104 0.809 0.768 0.098 0.820 0.714 0.181 0.791 0.777 0.095 0.807 0.659 0.176 0.739 0.718 0.123 0.757 – – – 0.691 0.145 0.719 0.709 0.146 0.692 0.751 0.132 0.799 0.735 0.115 0.806 0.574 0.249 0.647 0.601 0.223 0.652 0.618 0.207 0.670 0.558 0.215 0.594 Fη 0.913 0.892 0.855 0.888 0.845 0.872 0.854 0.878 0.842 0.850 0.865 0.780 0.805 0.807 0.791 SED1 M AE 0.048 0.060 0.151 0.055 0.093 0.067 0.103 0.077 0.099 0.117 0.063 0.185 0.153 0.148 0.158 Sλ 0.905 0.893 0.845 0.894 0.859 0.864 0.828 0.855 0.833 0.832 0.896 0.783 0.785 0.797 0.736 Fη 0.871 0.830 0.795 0.822 0.754 0.759 0.736 0.757 0.800 0.767 0.810 0.713 0.706 0.745 0.712 SED2 M AE 0.048 0.062 0.157 0.080 0.123 0.103 0.124 0.116 0.101 0.113 0.068 0.186 0.158 0.133 0.141 Sλ 0.870 0.852 0.760 0.796 0.776 0.769 0.716 0.742 0.772 0.784 0.846 0.705 0.714 0.750 0.715 Fη 0.789 0.745 0.741 0.775 0.698 0.712 0.683 0.677 0.721 0.743 0.738 0.580 0.584 0.634 0.596 SOD M AE 0.123 0.144 0.194 0.129 0.189 0.155 0.196 0.181 0.165 0.170 0.148 0.267 0.252 0.224 0.234 Sλ 0.772 0.753 0.748 0.750 0.712 0.705 0.657 0.650 0.674 0.730 0.762 0.625 0.621 0.624 0.596 Table 2: Quantitative comparison with 15 methods on 4 complex structure image datasets. The best three results are shown in red, green and blue, respectively. “–” means corresponding methods are trained on that dataset. Our method ranks first or second on these datasets. (a) (b) (c) (d) (e) (f) (g) (h) (i) (j) (k) Figure 2: Comparison of typical saliency maps. (a) Input images; (b) Ground truth; (c) Ours; (d) Amulet; (e) DCL; (f) DHS; (g) ELD; (h) MCDL; (i) MDF; (j) RFCN; (k) UCF. Due to the limitation of space, we don’t show the results of DS, LEGS, BL, BSCA, DRFI and DSR. We will release the saliency maps of all compared methods upon the acceptance. 1 1 1 1 0.9 0.9 0.9 0.9 0.8 0.5 0.4 0.3 0.2 0.1 0 0 0.2 0.6 0.5 0.4 0.3 0.2 0.1 0.4 0.6 0.8 0 1 0 0.2 0.6 0.5 0.4 0.2 0.1 0.6 0.8 0 1 0 0.2 0.5 0.4 0.2 0.1 0.6 0.8 0 1 (b) DUTS-TE (c) ECSSD 1 1 0.9 0.9 0.3 0.2 0.1 0 0.2 0.5 0.4 0.3 0.2 0.1 0.4 0.6 0.8 1 0 0 0.2 (e) PASCAL-S 0.5 0.4 0.2 0.1 0.6 0.8 Recall Recall 0.6 0.3 0.4 (f) SED1 1 0 0.7 Amulet BL BSCA DCL DHS DRFI DS DSR ELD LEGS MCDL MDF Ours RFCN UCF 0 0.2 Precision 0.4 0.6 0.6 0.8 1 0.8 1 0.8 0.7 Amulet BL BSCA DCL DHS DRFI DS DSR ELD LEGS MCDL MDF Ours RFCN UCF Precision 0.5 Precision 0.6 0 0.8 0.8 0.7 0.4 (d) HKU-IS-TE 1 0.9 Amulet BL BSCA DCL DHS DRFI DS DSR ELD LEGS MCDL MDF Ours RFCN UCF 0.2 Recall 1 0.7 0 Recall 0.9 0.8 Amulet BL BSCA DCL DHS DRFI DS DSR ELD LEGS MCDL MDF Ours RFCN UCF 0.6 0.3 0.4 Recall (a) DUT-OMRON 0.7 Amulet BL BSCA DCL DHS DRFI DS DSR ELD LEGS MCDL MDF Ours RFCN UCF 0.3 0.4 Recall Precision 0.7 Amulet BL BSCA DCL DHS DRFI DS DSR ELD LEGS MCDL MDF Ours RFCN UCF Precision 0.6 0.8 0.8 0.7 Amulet BL BSCA DCL DHS DRFI DS DSR ELD LEGS MCDL MDF Ours RFCN UCF Precision Precision 0.7 Precision 0.8 Amulet BL BSCA DCL DHS DRFI DS DSR ELD LEGS MCDL MDF Ours RFCN UCF 0.6 0.5 0.4 0.3 0.2 0.1 0.4 0.6 0.8 1 0 0 0.2 Recall (g) SED2 0.4 0.6 Recall (h) SOD Figure 3: The PR curves of the proposed algorithm and other state-of-the-art methods. Models (a) SFCN-hf+Lbce (b) SFCN+Lbce (c) SFCN+Lwbce (d) SFCN+Lwbce +Lsc (e) SFCN+Lwbce +Ls1 The overall Fη 0.824 0.848 0.865 0.873 0.867 0.880 M AE 0.102 0.083 0.072 0.061 0.049 0.052 Sλ 0.833 0.859 0.864 0.880 0.882 0.897 Table 3: Results with different model settings on the ECSSD dataset. The best three results are shown in red, green and blue, respectively. [Li and Yu, 2016] Guanbin Li and Yizhou Yu. Deep contrast learn[Tong et al., 2015] Na Tong, Huchuan Lu, Xiang Ruan, and Minging for salient object detection. In CVPR, pages 478–487, 2016. Hsuan Yang. Salient object detection via bootstrap learning. In CVPR, pages 1884–1892, 2015. [Li et al., 2013] Xiaohui Li, Huchuan Lu, Lihe Zhang, Xiang Ruan, [Wang et al., 2015] Lijun Wang, Huchuan Lu, Xiang Ruan, and and Ming-Hsuan Yang. Saliency detection via dense and sparse reconstruction. In ICCV, pages 2976–2983, 2013. Ming-Hsuan Yang. Deep networks for saliency detection via local estimation and global search. In CVPR, pages 3183–3192, [Li et al., 2014] Yin Li, Xiaodi Hou, Christof Koch, James Rehg, 2015. and Alan Yuille. The secrets of salient object segmentation. In CVPR, pages 280–287, 2014. [Li et al., 2016] Xi Li, Liming Zhao, Lina Wei, Ming-Hsuan Yang, Fei Wu, Yueting Zhuang, Haibin Ling, and Jingdong Wang. Deepsaliency: Multi-task deep neural network model for salient object detection. IEEE TIP, 25(8):3919–3930, 2016. [Liu and Han, 2016] Nian Liu and Junwei Han. Dhsnet: Deep hierarchical saliency network for salient object detection. In CVPR, pages 678–686, 2016. [Long et al., 2015] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In CVPR, pages 3431–3440, 2015. [Qin et al., 2015] Yao Qin, Huchuan Lu, Yiqun Xu, and He Wang. Saliency detection via cellular automata. In CVPR, pages 110– 119, 2015. [Shen and Yeo, 2011] Li Shen and Chuohao Yeo. Intrinsic images decomposition using a local and global sparse representation of reflectance. In CVPR, pages 697–704, 2011. [Shi et al., 2016] Jianping Shi, Qiong Yan, Li Xu, and Jiaya Jia. Hierarchical image saliency detection on extended cssd. IEEE TPAMI, 38(4):717–729, 2016. [Simonyan and Zisserman, 2014] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv:1409.1556, 2014. [Wang et al., 2016] Linzhao Wang, Lijun Wang, Huchuan Lu, Pingping Zhang, and Xiang Ruan. Saliency detection with recurrent fully convolutional networks. In ECCV, pages 825–841, 2016. [Wang et al., 2017a] Lijun Wang, Huchuan Lu, Yifan Wang, Mengyang Feng, Dong Wang, Baocai Yin, and Xiang Ruan. Learning to detect salient objects with image-level supervision. In CVPR, pages 136–145, 2017. [Wang et al., 2017b] Tiantian Wang, Ali Borji, Lihe Zhang, Pingping Zhang, and Huchuan Lu. A stagewise refinement model for detecting salient objects in images. In ICCV, pages 4019–4028, 2017. [Wu et al., 2015] Xiang Wu, Ran He, and Zhenan Sun. A lightened cnn for deep face representation. arXiv:1511.02683, 2015. [Xie and Tu, 2015] Saining Xie and Zhuowen Tu. Holisticallynested edge detection. In ICCV, pages 1395–1403, 2015. [Yang et al., 2013] Chuan Yang, Lihe Zhang, Ruan Xiang Lu, Huchuan, and Ming-Hsuan Yang. Saliency detection via graphbased manifold ranking. In CVPR, pages 3166–3173, 2013. [Zhang et al., 2017a] Pingping Zhang, Dong Wang, Huchuan Lu, Hongyu Wang, and Xiang Ruan. Amulet: Aggregating multilevel convolutional features for salient object detection. In ICCV, pages 202–211, 2017. [Zhang et al., 2017b] Pingping Zhang, Dong Wang, Huchuan Lu, Hongyu Wang, and Baocai Yin. Learning uncertain convolutional features for accurate saliency detection. In ICCV, pages 212–221, 2017. [Zhao et al., 2012] Qi Zhao, Ping Tan, Qiang Dai, Li Shen, Enhua Wu, and Stephen Lin. A closed-form solution to retinex with nonlocal texture constraints. IEEE TPAMI, 34(7):1437–1444, 2012. [Zhao et al., 2015] Rui Zhao, Wanli Ouyang, Hongsheng Li, and Xiaogang Wang. Saliency detection by multi-context deep learning. In CVPR, pages 1265–1274, 2015.
1cs.CV
TESTING DEGREE CORRECTIONS IN STOCHASTIC BLOCK MODELS∗ By Rajarshi Mukherjee and Subhabrata Sen arXiv:1705.07527v1 [math.ST] 22 May 2017 Stanford University We study sharp detection thresholds for degree corrections in Stochastic Block Models in the context of a goodness of fit problem. When degree corrections are relatively dense, a simple test based on the total number of edges is asymptotically optimal. For sparse degree corrections in non-dense graphs, simple degree based Higher Criticism Test (Mukherjee, Mukherjee and Sen, 2016) is optimal with sharp constants. In contrast, for dense graphs, the optimal procedure runs in two stages. It involves running a suitable community recovery algorithm in stage 1, followed by a Higher Criticism Test based on a linear combination of within and across (estimated) community degrees in stage 2. The necessity of the two step procedure is demonstrated by the failure of the ordinary Maximum Degree Test in achieving sharp constants. As necessary tools we also derive asymptotic distribution of the Maximum Degree in Stochastic Block Models along with moderate deviation and local central limit type asymptotics of positive linear combinations of independent Binomial random variables. 1. Introduction. The analysis of network data has received considerable attention in diverse areas of research such as social sciences, biology, statistics and computer science. At a high level, the central task in this area is to study underlying structural characteristics, given the network data. A statistically principled approach formalizes any such question as an inference problem, given a suitable, simple, probabilistic generative model for the observed data. Thus statistical research in this direction has focussed on a few principal themes. The first theme concerns the design of suitable models which reflect some of the features observed in real networks (Barabási and Albert, 1999; Watts and Strogatz, 1998), while the second theme concentrates on developing statistical methodology for inference on data from these generative models. A third, perhaps equally important, but often less emphasized, aspect of this endeavor is to determine the effectiveness of the proposed models. This is intimately related to the classical goodness of fit testing paradigm in statistical inference. In this paper, we concentrate on a concrete example of this general problem, and study it using the lens of asymptotic minimax testing procedures. It has been empirically observed that real networks often have small groups of vertices which are more homogeneous compared to the remaining vertices. For example, in a social network setup, such a group might represent vertices which share the same profession. Such a group is loosely referred to as a “community”, and the task of finding such set of vertices from the data, referred to as the “community detection problem”, has emerged as a central challenge in network analysis. The stochastic block model (henceforth referred to as SBM), introduced by Holland, Laskey and Leinhardt (1983), has emerged as the canonical setup to study this problem. In the simplest case, we observe a labeled undirected graph G = (V, E), with vertex set V = [n] (where for any n ∈ N, we let [n] = {1, . . . , n}) and adjacency matrix Y = (Yij ). The edge-set E of the graph is generated by first choosing a partition of the vertices V = C ∪ C c with |C| = n2 (assuming n is even throughout), ∗ RM is a Stein Fellow at Department of Statistics, Stanford University. AMS 2000 subject classifications: Primary 62G10, 62G20, 62C20 Keywords and phrases: Detection Boundary, Stochastic Block Model, Sparse Signals 1 2 and then adding edges independently with ( P[{i, j} ∈ E] = a n b n if {i, j} ⊂ C or {i, j} ⊂ C c . ow, (1.1) for 0 < a, b ≤ n. One usually sets a ≥ b, so that vertices in the same community have a higher probability of forming an edge. The “community detection” problem is formally phrased as the estimation of the true memberships C from the observed graph G. The model (1.1) can be easily extended to capture more general community structures, such as multiple communities, communities with unequal size, etc. A sharp analysis of the limits of statistical inference under this model has received considerable attention recently. We do not attempt to survey the extensive literature in this area, and instead refer the reader to the two excellent surveys Abbe (2017), Moore (2017), and the references therein, for an extensive overview of the recent progress on this problem and related open questions. Practitioners often fit these models to real networks to form preliminary ideas about community structure, and for exploratory data analysis (Snijders and Nowicki (1997)). However, while a theoretical understanding of the model has attained considerable maturity, it has also been widely reported that the model is often inappropriate for real data. The model favors graphs where the vertex degrees concentrate around a fixed value, and fails to model networks with a non-trivial degree distribution, in addition to a community structure. If this issue is ignored, and algorithms for community detection developed in the context of the SBM used on these examples, the algorithm often splits the vertices into high and low degree groups, and fails completely to uncover the true community memberships. A notable example, which exhibits this phenomenon is the political blog data of Adamic and Glance (2005). To address this issue, Karrer and Newman (2011) have introduced the “degree corrected Stochastic Block model” (henceforth abbreviated as DCSBM), which incorporates a separate “degree” parameter for each vertex. Under the DCSBM, we again observe a graph G = (V, E), with vertex set V = [n]. To generate the graph, we consider a fixed partition [n] = C ∪C c with |C| = n/2, and a vector Θ = (θ1 , · · · , θn ) of positive reals. The Θ parameters represent the activity or the attractiveness of individual vertices. Given the parameter Θ, we add edges independently with ( θi θj na if {i, j} ⊂ C or {i, j} ⊂ C c . (C) PΘ,a,b [{i, j} ∈ E] = (1.2) θi θj nb ow. In (1.2) we have implicitly assumed that θi θj na ≤ 1 for all i, j, as will be the case throughout the rest of the paper. Note that upon setting θi = 1 for all i ∈ [n], the model (1.2) reduces to (C) (1.1). The expectation and variance operators under model (1.2) will be denoted by EΘ,a,b and (C) VarΘ,a,b respectively. In the sequel, whenever C is clear from the context, we drop the notational dependence of the above quantities on C. Finally, we note that in the model above, 0 < b < a < n are sequences dependent on n. We assume throughout that 0 < lim inf ab ≤ lim sup ab < 1 and define τa : = limn→∞ na and τb : = limn→∞ nb . Karrer and Newman (2011) show empirically that model fits are often considerably improved under this more general model (1.2). Motivated by the success of the DCSBM in modeling real networks, numerous authors have, in turn, developed powerful machinery for community detection under this model (Zhao, Levina and Zhu (2012), Jin (2015), Gao et al. (2016), Lei (2016)). Given a dataset, these results do not provide a principled method to choose between the SBM or the DCSBM. This question assumes greater importance in light of the contrast in the inferred memberships under the two setups. While the DCSBM is more flexible, it adds an extra parameter 3 DEGREE CORRECTIONS FOR SBM for each vertex, and thus the fitting process is often complicated. Further, from a statistical viewpoint, introducing so many extra parameters might lead to loss in power to detect the presence of an underlying community structure. A natural instinct at this point is to use a likelihood ratio test (LRT) for goodness of fit. However, we note that classical asymptotics for LRTs for goodness of fit are no longer immediately valid in this case, due to the divergence in the number of parameters. This concern had been raised classically by Fienberg and Wasserman (1981), who emphasize the need for proper model selection criteria in the context of the p1 model, which exhibits similar features. In our context, this issue was partially addressed by Yan et al. (2014), who use techniques motivated by statistical physics to approximate the likelihood, and derive valid sampling distributions for the test statistic. Following the work of Yan et al. (2014), some other model selection approaches have also been introduced (see e.g. Peixoto (2015), Yan (2016)). In this paper, we study this question rigorously under the asymptotic minimax setup. In the context of model (1.2), we will formulate our problem as a goodness-of-fit type global null hypothesis testing problem against a structured hypothesis. To this end, we define the parameter space  Ξ(s, A): = Θ ∈ Rn+ : |S(Θ)| = s, θi ≥ 1 + A, i ∈ S(Θ) , (1.3) where S(Θ): = {1 ≤ i ≤ n: θi 6= 1} and R+ = [0, ∞). The vertices i ∈ S(Θ) can be interpreted as the “popular” vertices. Karrer and Newman (2011) emphasized that in many real networks, these “popular” vertices are comparatively rare, and ensuring their correct classification is often more challenging. Since we expect such vertices to be sparse, mathematically we consider the following sequence of hypothesis testing problems H0 : Θ = 1 vs. H1 : Θ ∈ Ξ(sn , An ) ⊂ Rn+ \ {0} (1.4) for any pair of sequences sn , An . Throughout we shall refer to Θ as the signals and parametrize signal sparsity sn = n1−α with α ∈ (0, 1). A statistical test for H0 versus H1 is a measurable {0, 1} valued function of the data Y, with 1 denoting the rejection of the null hypothesis H0 and 0 denoting the failure to reject H0 . The worst case risk of a test Tn (Y) is defined as Riskn (Tn , Ξ(sn , An )): = max C⊂[n]:|C|= n 2 (C) P1,a,b (Tn = 1) + sup max n Θ∈Ξ(sn ,An ) C⊂[n]:|C|= 2 (C) PΘ,a,b (Tn = 0) . (1.5) A sequence of tests Tn corresponding to a sequence of model-problem pairs (1.2)-(1.4), is said to be asymptotically powerful (respectively asymptotically powerless) against Ξ(sn , An ) if lim sup Riskn (Tn , Ξ(sn , An )) = 0 (respectively lim inf Riskn (Tn , Ξ(sn , An )) = 1). n→∞ n→∞ The results in this paper derive the smallest deviations necessary to detect the “inhomogeneity” in the behavior of the vertex degrees. We also provide matching procedures for detection, which work as soon as one has enough signal. Our results exhibit an interesting interplay among signal sparsity, graph sparsity, and signal strength. To our knowledge, this is the first instance where sharp detection thresholds have been achieved in the presence of a high dimensional nuisance parameter, without any additional assumptions. We discuss more on the implications of our main results in Section 4. Notation. P For any n P∈ N, we let [n] = {1, . . . , n}. For any i ∈ [n] we denote the degree of vertex i by di : = nj=1 Yij = j6=i Yij . We will denote the null mean and standard deviation of a degree q (C) (C) by µn0 =: E1,a,b (di ) and σn0 : = Var1,a,b (di ). Note that these do not depend on C. Throughout 4 Bin(n, p) will stand for a generic binomial random variable with n ∈ N trials and success probability p ∈ [0, 1]. The results in this paper are mostly asymptotic in nature and thus requires some standard asymptotic notations. If an and bn are two sequences of real numbers then an  bn (and an  bn ) implies that an /bn → ∞ (respectively an /bn → 0) as n → ∞. Similarly an & bn (and an . bn ) implies that lim inf an /bn = C for some C ∈ (0, ∞] (and lim sup an /bn = C for some C ∈ [0, ∞)). Alternatively, an = o(bn ) will also imply an  bn and an = O(bn ) will imply that lim sup an /bn = C for some C ∈ [0, ∞)). We write an ∼ bn if lim abnn = 1. We need the following function to define our detection thresholds. For β1 , β2 > 0 let ρ(β1 , β2 ) = h (β 2 τ (1 − τ ) + β 2 τ (1 − τ ))(τ (1 − τ ) + τ (1 − τ )) i a a a b b b 1 a 2 b , (β1 τa + β2 τb )2 where τa , τb are defined earlier. Further, we shall always assume b < a ≤ n2 for concreteness, although the particular choice of n/2 can be easily replaced by cn for any fixed c ∈ (0, 1). Also, throughout we drop the subscript n whenever it is understood that s, A are allowed to vary with n. 2. Tests. In this section we formally describe the testing procedures to be used. In order to construct these tests we begin with a few definitions. Fix any C ⊂ [n] with |C| = n/2 and for any i ∈ [n], let C(i) = C P if i ∈ C and C(i) = C c otherwise. Define the within-group-degree of a vertexPi to be di (1, C) = j∈C(i) Yij . Similarly set the across-group-degree of a vertex i to be di (2, C) = j∈C(i)c Yij . Define h i n  a h i n (C) (C) µ0n1 (C): = E1,a,b di (1, C) = − 1 · , µ0n2 (C): = E1,a,b di (2, C) = 2 n 2 n  a  a n b  (C) (C) Var1,a,b (di (1, C)) = −1 · · 1− , Var1,a,b (di (2, C)) = · · 1 − 2 n n 2 n b . n b , n · and note that under H0 the above quantities do not depend on C. Hence, in the sequel, whenever C is clear from the context, we drop the notational dependence of the above quantities on C. Finally, for any fixed positive constants β1 and β2 define Di (C, β1 , β2 ): = β1 (di (1, C) − µ0n1 (C)) + β2 (di (2, C) − µ0n2 (C)) , σn0 (C, β1 , β2 ) i = 1, . . . , n, where q (C) (C) σn0 (C, β1 , β2 ): = β12 Var1,a,b (di (1, C)) + β22 Var1,a,b (di (2, C)). Once again, note that under H0 the above quantity do not depend on C. Hence, in the sequel, whenever C is clear from the context, we drop the notational dependence of the above quantities on C. We are now ready to define our testing procedures. P Total Degree Test : This test is based on the total degree in the observed graph i.e. ni=1 di . The test rejects when the observed total P degree is large. The calibration of this test can be achieved by looking at the behavior of ni=1 di under the null hypothesis in (1.4). PnMore precisely, by the Total Degree Test we mean a testing procedure which rejects when i=1 di is large (See proof of Theorem 3.1i.). DEGREE CORRECTIONS FOR SBM 5 The Higher Criticism Tests : For any β1 , β2 > 0, C ⊂ [n] with |C| = n/2, and t > 0 let n   X (C) HC(C, β1 , β2 ; t): = I (Di (C, β1 , β2 ) > t) − P1,a,b (Di (C, β1 , β2 ) > t) . i=1 We then construct a version of the higher criticism test as follows. Define ) ( , GHC(C, β1 , β2 ; t): = √ HC(C,β1 ,β2 ;t) Var1,a,b (HC(C,β1 ,β2 ;t)) . HC(C, β1 , β2 ): = sup √ t ∈ { 2r log n: r ∈ (0, 5)} ∩ N By the Higher Criticism Test based on HC(C, β1 , β2 ) we then mean a testing procedure that rejects when the observed value of HC(C, β1 , β2 ) defined above is √ large. In particular, we let THC (C, β1 , β2 ) be the test that rejects when HC(C, β1 , β2 ) > log n. Note that for any C, C 0 ⊂ [n] with |C| = |C 0 | = n/2, HC(C, 1, 1) = HC(C 0 , 1, 1) and hence any such test is referred to as the test based on HC(1, 1). It is easy to see the test based on HC(1, 1) is the degree based Higher Criticism Test introduced in Mukherjee, Mukherjee and Sen (2016) and will be also referred to as the vanilla Higher Criticism Test. The Maximum Degree Tests : For any β1 , β2 > 0 and C ⊂ [n] with |C| = n/2, by the Maximum Degree Test based on dmax (C, β1 , β2 ) we mean the procedure that rejects for large values of maxi∈[n] Di (C, β1 , β2 ). In particular, for any δ > 0, we let Tdmax (C, β1 , β2 , δ) be the test that p rejects when maxi∈[n] Di (C, β1 , β2 ) > 2(1 + δ) log n. Note that for any C, C 0 ⊂ [n] with |C| = |C 0 | = n/2, maxi∈[n] Di (C, 1, 1) = maxi∈[n] Di (C 0 , 1, 1)and hence any such test is referred to as the test based on dmax (1, 1). It is easy to see the test based on dmax (1, 1) is simply the test that rejects for large values of of the maximum degree dmax : = max{d1 , . . . , dn } and will be also referred to as the vanilla Maximum Degree Test. 3. Main Results. In this section we present the main results of the paper along with their implications. Owing to the differential behavior of the detection problem, we divide our presentation into two main subsections based on the signal sparsity α. 3.1. Dense Signal Regime α ≤ 21 . The behavior of the detection problem in the dense signal α ≤ 12 regime is particularly simple. Intuitively, since there are many vertices in the graph which have a higher connection probability than under the null hypothesis, under the dense signal regime a natural test statistic to look at is the Total Degree Test introduced in Section 2. This intuition indeed turns out to be correct in the sense that no other test works when the Total Degree Test fails. The next theorem makes this precise. Theorem 3.1. Fix 0 < α < 1 2 and set Cdense (α) = 1 2 − α. i. The Total Degree Test is asymptotically powerful if n−r A ≥ √ , r < Cdense (α). a ii. All tests are asymptotically powerless if n−r A ≤ √ , r > Cdense (α). a One feature of Theorem 3.1 above is that the detection thresholds given by Cdense do not change based on the nature of τa and τb . We will see later that this behavior is in stark contrast to that of the detection thresholds in the sparse regime α > 12 . 6 3.2. Sparse Signal Regime α > 12 . The behavior of detection problem in the sparse signal regime is subtle. Intuitively, since we are testing for degree heterogeneity which are sparse in occurrence, one should in principle be able to produce tests similar to those in Mukherjee, Mukherjee and Sen (2016) by looking at abnormal behavior of extreme degrees. Indeed this intuition is captured by the degree based Higher Criticism Test and the Maximum Degree Test studied in Mukherjee, Mukherjee and Sen (2016). Success of similar tests naturally fits into the narrative that the behavior of the detection problem for degree heterogeneity does not depend on the knowledge of community assignment. Although the heart of this narrative is correct, the implications should be taken with a grain of salt. In particular, as we argue in this section, this intuition of constructing tests surprisingly fails for dense graphs i.e. when 0 < τb < τa . More precisely, for dense graphs, the optimal procedures require the knowledge of the community assignments. Although this is problematic at first glance, the experienced reader will immediately realize that when 0 < τb < τa , it is very easy to recover the communities consistently, at least when the degree heterogeneity parameter θ1 , . . . , θn are not too rough (Gao et al., 2016). To elaborate on this peculiar behavior of the detection problem it is instructive to start with the information theoretic lower bound. Theorem 3.2. (3.1) Let log n  b < a ≤ n2 , α > 12 and consider the signal strength s C log n A= . 2 σn0 Then all tests are asymptotically powerless if C < Csparse (α), where     τa (1−τa )+τb (1−τb ) 1  α − for 12 < α < 34 . 2 τ  τa b 2 + 1−τ 1−τa b   2 Csparse (α) = √ a )+τb (1−τb )  2 τa (1−τ 1 − 1 − α for α ≥ 34 . τ τa + b 1−τa 1−τb In particular, when τa = τb = 0, the correct constant Csparse (α) is obtained by taking the limit as τa , τb → 0, so that    2 α − 1 for 12 < α < 34 . 2  2 Csparse (α) = 2 1 − √1 − α for α > 43 . We derive Theorem 3.2 using an information theoretic lower bound for a simpler problem, where the true community assignments are known in advance. The proof is based on the truncated second moment argument with the main challenge being the choice of the truncation event. Unlike Mukherjee, Mukherjee and Sen (2016), a non-signal-edge-deleted degree based truncation is not enough to yield the desired sharp thresholds. Instead one needs to take into account the knowledge of community assignments as well (at least when τa , τb are positive). Finally we note that this simpler problem with known community assignments always furnishes a lower bound for problem (1.4). If we can produce valid statistical procedures which work up to this threshold, this furnishes strong evidence that the true community assignments are ancilliary for this problem. To this end, the next results establish performance bounds on Higher Criticism based tests. Theorem 3.3. Let log n  b < a ≤ n2 , α > 12 and consider the signal strength s C log n A= . 2 σn0 7 DEGREE CORRECTIONS FOR SBM i. If C > CHC (β1 , β2 , α) where    2ρ(β1 , β2 , ) α − 1 for 12 < α < 34 . 2 2  CHC (β1 , β2 , α) = 2ρ(β1 , β2 , ) 1 − √1 − α for α ≥ 43 , then (C) max P1,a,b (THC (C, β1 , β2 ) = 1) + C⊂[n]: |C|= n 2 sup Θ∈Ξ(sn ,An ) (C) max PΘ,a,b (THC (C, β1 , β2 ) = 0) = 0. C⊂[n]: |C|= n 2 (3.2) ii. If C > Cmax (β1 , β2 , α) with 2  √ Cmax (α) = 2ρ(β1 , β2 ) 1 − 1 − α 3 for α ≥ , 4 then there exists δ > 0 such that (C) max P1,a,b (Tdmax (C, β1 , β2 , δ) = 1) + C⊂[n]: |C|= n 2 sup Θ∈Ξ(sn ,An ) (C) max PΘ,a,b (Tdmax (C, β1 , β2 , δ) = 0) = 0. C⊂[n]: |C|= n 2 (3.3) Note that THC (C, β1 , β2 ) and Tdmax (C, β1 , β2 , δ) are not statistically valid tests for all β1 , β2 , since they assume the true community assignment C known (as is the case for (3.2) and (3.3)). However, for β1 = β2 = 1, HC(1, 1) = HC(C, 1, 1) and dmax = dmax (C, 1, 1), and thus Theorem 3.3 derives performance guarantees for tests based on HC(1, 1) or dmax (1, 1). This is summarized in Parts (i) and (ii) of the following theorem. Theorem 3.4. Let log n  b < a ≤ n2 , α > 12 and consider the signal strength s C log n A= . 2 σn0 i. The test based on HC(1, 1) is powerful if C > CHC (α) where    2ρ(1, 1) α − 1 for 12 < α < 34 . 2  2 CHC (α) = 2ρ(1, 1) 1 − √1 − α for α ≥ 34 . ii. The test based on dmax (1, 1) is powerful if C > Cmax (α) with  2 √ 3 Cmax (α) = 2ρ(1, 1) 1 − 1 − α for α ≥ . 4 iii. The test based on dmax (1, 1) is powerless if C < Cmax (α). To develop further intuition, it is instructive to compare these results to analogous ones derived in the context of the sparse signal detection problem for sequence models. In particular, motivated by the long series of results on sparse signal detection problems (Arias-Castro, Candès and Plan, 2011; Arias-Castro and Wang, 2015; Donoho and Jin, 2004; Ingster and Suslina, 2003; Mukherjee, Pillai and Lin, 2015) and recent work on heterogeneity detection over sparse Erdős-Rényi random 8 graphs under the β-model (Mukherjee, Mukherjee and Sen, 2016), we expect that the Maximum Degree Test and the Higher Criticism should both perform optimally with sharp constants for very sparse signals (α ≥ 34 ). Moreover, the Higher Criticism Test should be provably better than the Maximum Degree Test for denser signals with α ∈ (1/2, 3/4). The observation that ρ(1, 1) = 1 for τa = τb = 0, in conjunction with Theorem 3.2 establishes the expected intuitive picture for all a, b sequences with τa = τb = 0. Before going into further statistical implications of Theorem 3.4 we first comment on the analysis in the proof of Theorem 3.4iii.. As mentioned earlier, the lower bound statement on the Maximum Degree Test in Theorem 3.4iii. is indeed necessary to demonstrate the competition between the HC and max-degree based procedures. Analysis of the lower bounds for the vanilla Maximum Degree Test requires good control over the null distribution of the test statistic. Although the null distribution of the maximum degree of an Erdős-Rényi graph is standard in literature (Bollobás, 0 2001, Theorem 3.3 ), we could not find the corresponding results for Stochastic Block Models. To this end, our next result derives the asymptotic sampling distribution of the maximum degree under the null hypothesis, after appropriate centering and scaling. Dropping notational dependence on the true underlying community assignment C recall that µn0 = E1,a,b [d1 ], σn0 = Var1,a,b [d1 ], we have the the following result. Theorem 3.5. Let b  (log n)3 . In this case, we have, as n → ∞, h max d − µ i  h p log log n + log(4π) y i i i n0 P1,a,b + → exp − e−y . ≤ 2 log n 1 − σn0 4 log n 2 log n Remark 1. We note that after appropriate centering and scaling, the null distribution of the maximum converges to a Gumbel distribution. It is specifically interesting to compare this result to the asymptotic distribution of the maximum degree in an Erdős-Rényi random graph. A direct proof 0 in that case proceeds using the method of moments (Bollobás, 2001, Theorem 3.3 ). In the case of the SBM, the individual degrees are no longer binomial, but rather a sum of two independent Binomial random variables. As a result, many direct computations involving the degrees become considerably more involved. In our proof, we circumvent this difficulty, and establish this result using a softer argument, based on a version of Stein’s method for Poisson approximation (Barbour, Holst and Janson, 1992). We now return to a discussion on statistical implications of Theorem 3.4. Consider the regime τa > τb > 0. Recall that the tests based on HC(1, 1) and dmax (1, 1) are respectively the vanilla Higher Criticism Test and Maximum Degree Tests   based on the degrees (d1 , . . . , dn ). We note that τa (1−τa )+τb (1−τb ) τa > τb > 0 implies ρ(1, 1) > and thus there is a gap between the thresholds τ τa + b 1−τa 1−τb derived in Theorem 3.4 and Theorem 3.2. Although we do not have a similar performance lower bound for the vanilla Higher Criticism Test, we strongly believe that at least in the extreme signal sparsity regime (α ≥ 43 ), the Maximum Degree Test and the Higher Criticism Test are essentially similar. Consequently, we are left with two possible scenarios. Either the information theoretic lower bound of Theorem 3.2 stands to be made better, or there is the possibility of constructing optimal tests different from our usual Higher Criticism and Maximum Degree Test. Our main result verifies the latter possibility, thereby demonstrating differential behavior of the detection problem on dense graphs. This directly implies the rather surprising result that on dense graphs (τa ≥ τb > 0), for very sparse alternatives, the maximum degree test is not, in fact, optimal in terms of detection thresholds. This is in sharp contrast to the usual results expected for Gaussian sequence models, or for random graph models with “exchangeable” degrees. We illustrate the differences between the two thresholds in Fig 1. 9 DEGREE CORRECTIONS FOR SBM τa = 0.25, τb = 0.1 τa = 0.6, τb = 0.1 τa = 0.9, τb = 0.1 0.4 0.4 0.4 0.2 C 0.6 C 0.6 C 0.6 0.2 0.0 0.2 0.0 0.5 0.6 0.7 α 0.8 0.9 1.0 0.0 0.5 0.6 0.7 α 0.8 0.9 1.0 0.5 0.6 0.7 α 0.8 0.9 1.0 Fig 1. The naive threshold ρ(1, 1) (in BLUE) and the correct information theoretic threshold ρ(β1∗ , β2∗ ) (in RED) are shown for different values of τa , τb . Note the vanishing difference between these thresholds as τa and τb becomes smaller. To state the optimal procedure we need to define notation for community recovery algorithms. For any two C1 , C2 ⊂ [n] define the distance between C1 , C2 to be dist(C1 , C2 ) = min {|C1 ∆C2 |, |C1c ∆C2 |} . For any measurable Cˆ ⊂ [n] define the risk the corresponding risk of community recovery to be   (C) ˆ ˆ Riskn (C, Ξ(s, A)): = sup max n EΘ,a,b dist(C, C) . Θ∈Ξ(s,A) C⊂[n]:|C|= 2 Theorem 3.6. let 0 < τb < τa ≤ 21 , α > 12 , and consider the signal strength s C log n A= . 2 σn0 ˆ Ξ(s, A)) → 0 and let Let Cˆ ⊂ [n] be measurable such that Riskn (C, β1∗ = 1 q 1 − τa 1 τa 1−τa + τb 1−τb , β2∗ = 1 q 1 − τb 1 τa 1−τa + τb 1−τb . ˆ β ∗ , β ∗ ) is powerful if C > C opt (α) where i. The test based on HC(C, 1 2 HC    2ρ(β1∗ , β2∗ ) α − 1 for 21 < α < 34 . 2 opt  2 CHC (α) = 2ρ(β ∗ , β ∗ ) 1 − √1 − α for α ≥ 34 . 1 2 opt ˆ β ∗ , β ∗ ) is powerful if C > Cmax ii. The test based on dmax (C, (α) with 1 2 2  √ 3 opt Cmax (α) = 2ρ(β1∗ , β2∗ ) 1 − 1 − α for α ≥ . 4 10 Since ρ(β1∗ , β2∗ ) matches the optimal threshold from Theorem 3.2  τa (1−τa )+τb (1−τb ) τb τa + 1−τ 1−τ a  , Theorem b 3.6 implies that the following two-stage procedure is sharp optimal whenever τa > τb > 0. (i) Run a community detection√algorithm to construct Cˆ (e.g. Algorithm 1 of Gao et al. (2016)). (ii) Reject if THC (Ĉ, β1∗ , β2∗ ) > log n or the test based on dmax (1, 1) rejects. The proof of the validity of the above two-stage procedure is easy. In particular, in the regime of ˆ Ξ(s, A)) dense graphs (at least when τa > τb > 0), strongly consistent community detection (Riskn (C, α → 0) is indeed possible whenever kΘk∞ = o(n ) (Gao et al., 2016). As a consequence for any bounded Θ, Theorem 3.6 justifies the optimality of the test based on THC (Ĉ, β1∗ , β2∗ ). Finally, for kΘk∞  1, the problem is trivial by using a vanilla Maximum Degree Test based on dmax (1, 1) (this can be derived along the lines of the proof of Theorem 3.4ii. and is hence omitted). Combining these two cases by union bound yields the desired sharp optimality of the two-stage procedure. This two-stage procedure is enough to complete the story of sharp detection thresholds. But, it additionally reveals the peculiar behavior of the detection problem mentioned earlier. That is, although all our natural intuition (along with results on sharp optimality of the vanilla Higher Criticism and Maximum Degree Test in the sparse graph regime) suggests that the behavior of the detection problem for degree heterogeneity does not depend on the knowledge of community assignment, our optimal procedure for the dense regime intimately relies on correct community assignment recovery. Although we were not able to prove nonexistence of procedures which are sharp optimal and do not depend on recovery of the true community assignment, our lower bound on the vanilla Maximum Degree Test performance in Theorem 3.4iii. provides moral validity of this intuition. Finally, in view of this, it is extremely interesting to formalize and prove the idea of failure of “all tests without the knowledge of true community assignments” – in the case of dense degree corrected SBMs. Finally, note that Theorem 3.2, Theorem 3.3, Theorem 3.4, and Theorem 3.6 are enough to describe detection thresholds for a, b  log n. The behavior of the thresholds for a, b . log n is subtle. In particular, the following result is not very difficult to prove. Theorem 3.7. Suppose a, b  log n and α > 12 . Then for any sequence of tests Tn , lim lim inf Risk(Tn , Ξ(s, A)) = 1. A→∞ n→∞ Theorem 3.7 demonstrates a different behavior of the detection problem compared to a, b  log n where a vanishing A is detectable even in the sparse signal regime. It is therefore of interest to investigate the problem further for a, b . log n when α > 21 to figure out the information theoretic rate of detection of A → ∞. We leave such endeavors to future projects. 4. Discussion. In this section we collect some concluding remarks about the main results in this paper. One of the main motivations of this paper is to explore the mutual confounding of degree corrections and community assignments in the formulation of block models. In particular, Jin (2015) notes, and we paraphrase: “as far as community detection concerns, the heterogeneity parameters {θi }ni=1 are largely ancillary.” In this paper we explore the other side of the story i.e. “as far as the degree heterogeneity parameters {θi }ni=1 are concerned, are the community assignments ancillary?” The answer seems to be more complicated and as our results suggest: “it depends!” In particular, when the inference targets global testing for sparse Θ, community assignments indeed seem ancillary when the graph is not dense. However, for dense graphs, our results hint on the contrary. Here the information theoretic boundary for known community assignment is strictly below the detection thresholds attained for vanilla degree based Higher Criticism and Maximum DEGREE CORRECTIONS FOR SBM 11 Degree tests (see Figure 1). The lower bound on the performance of the vanilla Maximum Degree Test further hints at the failure of procedures which do not take into account the knowledge of community assignments. In particular, we believe that it is extremely interesting to formalize and show that procedures similar to the vanilla Higher Criticism and Maximum Degree tests, which are simply based on the degree vector, will fail to achieve the information theoretic thresholds in the dense graph regime (at least when τa > τb > 0). 5. Properties of linear combination of Binomial random variables. Our analyses depend very heavily on a detailed understanding of deviation properties of linear combinations of binomial random variables. These arise very naturally in our context— for example, each vertex degree under the null is a sum of two independent Binomial random variables and the optimal tests in Theorem 3.6 depend on linear combination of two independent Binomial random variables. We establish some relevant results in this section, which are invaluable in the proofs of the main results stated Section 3. 5.1. Moderate Deviation properties. Moderate deviation and local CLT type properties of linear combinations of independent Binomial random variables form a cornerstone of our analysis. We note that while these results are conceptually straight-forward, the proofs are often involved due to the discrete structure of the random variables involved.     0 0 n a0 To this end, let X ∼ Bin 2 , n ⊥ Y ∼ Bin n2 , bn with a0 ≥ b0  log n and 0 < c < lim inf ab 0 ≤ 0 lim sup ab 0 ≤ 1 for a constant c. Let µn1 : = E(X) = 2 σn1 : = Var(X) = n b0 n a0 · , µn2 : = E(Y ) = · . 2 n 2 n n a0  a0  n b0  b0  2 · · 1− , σn2 : = Var(Y ) = · · 1 − . 2 n n 2 n n Hereafter for any fixed positive constants β1 and β2 define q 2 + β 2σ2 , σn (β1 , β2 ): = β12 σn1 2 n2 µn (β1 , β2 ): = β1 µn1 + β2 µn2 , Also for s1 , s2 ≤ n1−α d(β1 , β2 ): = β1 X + β2 Y − µn (β1 , β2 ).     00 00 with 1 > α > 21 , and X 0 ∼ Bin s1 , an ⊥ Y 0 ∼ Bin s2 , bn with a00 /a0 → 1, b00 /b0 → 1, let d0 (β1 , β2 ): = β1 (X + X 0 ) + β2 (Y + Y 0 ) − µn (β1 , β2 ). 5.1.1. Log Scale Asymptotics. In this section we study moderate deviations of linear combinations of binomial random variables on the logarithmic scale. Along the way, we shall also study bounds on the probability of such linear combinations belonging to specific subintervals corresponding to moderate deviation regimes. Lemma 5.1. Let h = hn be such that c < lim inf σ (β ,βh )√log n ≤ lim sup σ (β ,βh )√log n < c0 for n 1 2 n 1 2 constants 0 < c < c0 < ∞ and Cn → C > 0 be a positive sequence. 12 1. Fix any sequence {ξn } such that |ξn |  log n. Then the following hold for any ε > 0 and n sufficiently large (depending on c, c0 , ε, β1 , β2 ) (a)   h2 1 exp − (1 − ε) . sup P (d(β1 , β2 ) = h + t) ≤ σn (β1 , β2 ) 2σn (β1 , β2 )2 |t|≤ξn (b) 0  sup P d (β1 , β2 ) = h + t ≤ |t|≤ξn   1 h2 (1 − ε) . exp − σn (β1 , β2 ) 2σn (β1 , β2 )2 2. The following moderate deviation asymptotics hold. (a)  √ log P d(β1 , β2 ) > Cn σn (β1 , β2 ) log n C2 lim =− . n→∞ log n 2 (b)  √ log P d0 (β1 , β2 ) > Cn σn (β1 , β2 ) log n C2 lim =− . n→∞ log n 2 5.1.2. Exponential Scale Asymptotics. In this section, we first characterize the upper tail of the sum of two independent binomial random variables in the moderate deviation regime on the exponential scale, which requires much more subtle analysis than usual log-scale asymptotics. This result is used in establishing the lower bound for the maximum degree test. Specifically, we will establish the following result. Recall the definition of d(β1 , β2 ) = β1 X + β2 Y − µn (β1 , β2 ), µn (β1 , β2 ) = E(β1 X + β2 Y ) and σn (β1 , β2 )2 = Var(β1 X + β2 Y ). √ Let b0  (log n)3 and xn = 2 log n(1 + o(1)). In this case, we have, as n → ∞, p P[X + Y − E(X + Y ) > Var(X + Y )xn ] P[d(1, 1) > σn (1, 1)xn ] = lim → 1, lim n→∞ n→∞ 1 − Φ(xn ) 1 − Φ(xn ) Lemma 5.2. where Φ(·) is the cdf of the standard normal distribution. 5.2. A Change of Measure Lemma. The next lemma is a simple change of measure argument which is necessary for truncated second moment arguments involved in proving information theoretic lower bounds. Lemma 5.3. Let X ∼ Bin(n1 , p1 ) and Y ∼ Bin(n2 , p2 ) be independent. Then for any positive scalars α1 , α2 , β1 , β2 and Borel set B of R  E α1X α2Y 1 (β1 X + β2 Y ∈ B) = (1 − p1 + α1 p1 )n1 (1 − p2 + α2 p2 )n2 P(β1 X 0 + β2 Y 0 ∈ B), where X 0 ∼ Bin(n1 , p01 ) is independent of Y 0 ∼ Bin(n2 , p02 ) with p01 = α1 p1 , 1 − p1 + α1 p1 We establish Lemma 5.3 in Section 8. 6. Proofs of main results. p02 = α2 p2 . 1 − p2 + α2 p2 13 DEGREE CORRECTIONS FOR SBM 6.1. Proof of Theorem 3.1. We prove each part of the theorem in separate subsections below. Proof of Theorem 3.1 i. In this theorem, since all computations are under the true underlying C and the Total Degree Test does not depend on it, we drop the notational dependence on C from (C) (C) (C) PΘ,a,b , EΘ,a,b , and VarΘ,a,b . We will establish the stronger result that the total degree test is powerful whenever there exists p a sequence tn → ∞ such that sA na  tn . To this end, we need the following elementary lemma bounding the variance of the total degree. hP i Lemma 6.1. For any Θ ∈ Ξ(sn , An ) with kΘk∞ ≤ 1, VarΘ,a,b i di ≤ 8an. Proof. The proof proceeds using the elementary observations VarΘ,a,b (Yij ) ≤ EΘ,a,b [Yij ] ≤ and covΘ,a,b (di , dj ) = VarΘ,a,b [Yij ] ≤ 4a n. 4a n We are now ready to prove Theorem 3.1 i.. We first compute the expectation of the total degree under the null.   n hX i X n/2 a n2 b + : = µn . E1,a,b di = E[Yij ] = 2 4 n 2 n i=1 i6=j P We consider a total degree test which rejects the null for i di > µn + Kn for some sequence Kn to be chosen suitably during the proof. By Chebychev’s inequality, we have, hP i hX i VarΘ,a,b i di 8an P1,a,b di > µn + Kn ≤ ≤ 2, 2 Kn Kn i where the last inequality follows using Lemma 6.1. Thus the type I error is controlled as soon as Kn2  an. We next turn to the type II error, and note that by monotonicity, it suffices to restrict ourselves to alternatives Θ = (1 + A)1S + 1S c for some A ≤ 1. We set S1 = C ∩ S(Θ) and S2 = C c ∩ S(Θ). Further, for notational simplicity, we denote s1 = |S1 | and s2 = |S2 |. In this case, we have, hX i hs  s i  n i a h n b 1 2 2a EΘ,a,b di = (1 + A) + + (1 + A) s1 − s1 + s2 − s2 + s1 s2 (1 + A)2 n 2 2 n 2 2 n i  n i n h h    i    a b n n n n b 2 − s1 + 2 − s2 + + (1 + A) s1 − s2 + s2 − s1 + − s1 − s2 . n 2 2 n 2 2 2 2 n Therefore, we have, hX i a b di − µn ≥ A [s1 (s1 − 1) + s2 (s2 − 1)] + 2As1 s2 n n i h    i h    i a n n b n n + A s1 − s1 + s2 − s2 + A s1 − s2 + s2 − s1 n 2 2 n 2 2 b 1 ≥ A (n − 1)s ≥ Abs. n 2 Therefore, we have, hX i hX hX i  hX i i PΘ,a,b di − µn < Kn = PΘ,a,b di − EΘ,a,b di < Kn − EΘ,a,b di − µn . EΘ,a,b i i ≤ PΘ,a,b hX i i hX i i 1 di − EΘ,a,b di < Kn − Abs . 2 i i 14 Thus if Kn < 21 Abs, using Chebychev inequality, we have, hX i 8an PΘ,a,b (6.1) di − µn < Kn ≤  2 . i Kn − 12 Abs The type II error is controlled as soon as the RHS in (6.1) goes to zero as n → ∞. Finally, it remains to choose Kn . We set Kn = 14 Abs and note that under the theses of this theorem, both type I and type II errors are controlled asymptotically under this choice. The proof is complete. Proof of Theorem 3.1. ii. The proof proceeds by the usual argument of analyzing the second moment of the marginal likelihood. To this end, we fix a prior π which sets the community assignment C = {1, · · · , n2 }. The prior π selects s/2 locations at random from C and s/2 locations (assuming s is even w.l.o.g.) independently from C c to form the set S(Θ). Given S(Θ), we set θi = 1 + A for i ∈ S(Θ). Also, in this theorem, since all computations are under this chosen C we drop the notational dependence (C) (C) (C) on C from PΘ,a,b , EΘ,a,b , and VarΘ,a,b . Now, given Θ, the likelihood ratio LS = = dPΘ,a,b dP1,a,b Y (θi θj )Yij i<j,C(i)=C(j)  1 − θ θ a (1−Yij ) i jn 1 − na Y (θi θj )Yij  1 − θ θ b (1−Yij ) i jn 1− i<j,C(i)6=C(j) b n . We define the marginal likelihood Lπ = ES [LS ], where ES [·] denotes the expectation with respect to S ∼ π. It suffices to establish that under the thesis of Theorem ii., Lπ = 1 + o(1). To this end, we note that E1,a,b [Lπ ] = ES [E1,a,b [LS ]] = 1 by Fubini’s theorem. The result follows once we establish that E1,a,b [L2π ] = 1 + o(1) under the assumptions of Theorem ii.. This will be established in the rest of the proof. We note that E1,a,b [(Lπ )2 ] = ES1 ,S2 [E1,a,b [LS1 LS2 ]], where S1 , S2 are iid draws from the measure π. Setting Θ: = Θ(S1 ) = (θ1 , · · · , θn ) and Θ: = Θ(S2 ) = (θ1 , · · · , θn ) to denote the true parameter vectors corresponding to S1 , S2 obtained under iid sampling from π, we have, Y LS1 LS2 = (θi θj θi θj )Yij i<j:C(i)=C(j) Y (θi θj θi θj )Yij i<j:C(i)6=C(j) := Y h 1 − θ θ a  1 − θ θ a i(1−Yij ) i jn i jn × 1 − na 1 − na h 1 − θ θ b  1 − θ θ b i(1−Yij ) i jn i jn 1− b n 1− b n Tij . i<j Further, we define LS1 LS2 = T1 T2 T3 , where Y T1 : = Tij , T2 : = i<j:C(i)=C(j)=C Y i<j:C(i)=C(j)=C c Tij , T3 : = Y Tij . i<j:C(i)6=C(j) Note that under the null hypothesis H0 , T1 , T2 , T3 are independent and thus to analyze E1,a,b [LS1 LS2 ], it suffices to study E1,a,b [Tj ] separately for j = 1, 2, 3. We first analyze T1 . To this end. we define Z1 = |S1 ∩ S2 ∩ C| and Z2 = |S1 ∩ S2 ∩ C c |. Using independence of edges, we have, Y E1,a,b [T1 ] = E1,a,b [Tij ]. i<j:C(i)=C(j)=C We will encounter the following cases. 15 DEGREE CORRECTIONS FOR SBM 1. i, j ∈ S1 ∩ S2 ∩ C. In this case, E1,a,b [Tij ] = (1 + A)4 a 2 a  a  1 − (1 + A)2 na 2 nA . = 1 + (2 + A)2 . + 1− n n 1 − na 1 − na  There are Z21 such terms. 2. i, j ∈ S1 ∩ S2c ∩ C or i, j ∈ S1c ∩ S2 ∩ C or i ∈ S1 ∩ S2 ∩ C while j ∈ C ∩ S1c ∩ S2c or i ∈ S1 ∩ S2c ∩ C, j ∈ S1c ∩ S2 ∩ C. In this case, E1,a,b [Tij ] = (1 + A)2 a 2 a  a  1 − (1 + A) na 2 nA = 1 + + 1− . n n 1 − na 1 − na   2   s s n 1 many (i, j) pairs which have this contribution. There are 2 2 −Z −s+Z + −Z +Z 1 1 1 2 2 2 c 3. i ∈ S1 ∩ S2 ∩ C, j ∈ S1 ∩ S2 ∩ C or i ∈ S1 ∩ S2 ∩ C, j ∈ S1c ∩ S2 ∩ C. We have, E1,a,b [Tij ] = (1 + A) 3a  1 − (1 + A)2 a  1 − (1 + A) a  n A) na n a 2 a nA 1− (2 + A). =1+ n 1 − na + n 1 − (1 + 1 − na   There are 2Z1 2s − Z1 many terms with this contribution. 4. For all other (i, j) pairs, it is easy to check that E1,a,b [Tij ] = 1. We note that under the thesis of the Theorem, A → 0 as n → ∞. Thus we have the upper bound a 2 U  1 A E1,a,b [T1 ] ≤ 1 + C n a , 1− n    s n  s  s 2 − Z1 Z1 2 + Z1 − s + Z1 + 2Z1 − Z1 + − Z1 , U1 = +2 2 2 2 2 2 for some absolute constant C > 0. Upon simplification, we obtain the bound (6.2)  E1,a,b [T1 ] ≤ 1 + C a 2 nA 1 − na  n Z1 + 9 s2 2 8 . A similar calculation yields an analogous bound for T2 . We thus obtain, setting Z2 = |S1 ∩ S2 ∩ C c |, (6.3)  E1,a,b [T2 ] ≤ 1 + C a 2 nA 1 − na  n Z2 + 9 s2 2 8 . Finally, it remains to bound T3 . To this end, our analysis proceeds similar to that of T1 described above, and will thus be sketched briefly. Using independence of edges under H0 , we have E1,a,b [T3 ] = Q i<j:C(i)6=C(j) E1,a,b [Tij ]. We encounter the following cases: 1. i ∈ S1 ∩ S2 ∩ C and j ∈ S1 ∩ S2 ∩ C c . In this case, we have, E1,a,b [Tij ] = (1 + A)4 b 2 b  1 − (1 + A)2 nb 2  b nA + 1 − = 1 + (2 + A)2 . b b n n 1− n 1− n There are Z1 Z2 terms with this contribution. 16 2. i ∈ S1 ∩ S2 ∩ C, j ∈ S1 ∩ S2c ∩ C c or i ∈ S1 ∩ S2 ∩ C, j ∈ S1c ∩ S2 ∩ C c and the related pairs i ∈ S1 ∩ S2c ∩ C, j ∈ S1 ∩ S2 ∩ C c and i ∈ S1c ∩ S2 ∩ C, j ∈ S1 ∩ S2 ∩ C c . Each pair contributes b 2 b b  1 − (1 + A)2 nb  1 − (1 + A) nb  nA (2 + A). 1 − + = 1 + n n 1 − (1 + A) nb 1 − nb 1 − nb     There are 2Z1 2s − Z2 + 2Z2 2s − Z1 many terms with this contribution. 3. i ∈ S1 ∩S2 ∩C, j ∈ S1c ∩S2c ∩C c , or i ∈ S1c ∩S2c ∩C, j ∈ S1 ∩S2 ∩C c or i ∈ S1 ∩S2c ∩C, j ∈ S1c ∩S2 ∩C c or i ∈ S1c ∩ S2 ∩ C, j ∈ S1 ∩ S2c ∩ C c . Each term contributes E1,a,b [Tij ] = (1 + A)3 b 2 b  1 − (1 + A) nb 2 b  nA + 1− . = 1 + n n 1 − nb 1 − nb        There are Z1 n2 − s + Z2 + Z2 n2 − s + Z1 + 2 2s − Z1 2s − Z2 many terms with this contribution. 4. Every other pair has E1,a,b [Tij ] = 1. E1,a,b [Tij ] = (1 + A)2 Similar considerations as for T1 above lead to the upper bound  E1,a,b [T3 ] ≤ 1 + C b 2 V 1 nA , b 1− n  s  n  s − Z2 + 2Z2 − Z1 + Z1 − s + Z2 V1 = Z1 Z2 + 2Z1 2 2  s  s2  n − s + Z1 + 2 − Z1 − Z2 , + Z2 2 2 2 for some absolute constant C > 0. We note that Z1 , Z2 ≤ this yields the following upper bound on T3 .  E1,a,b [T3 ] ≤ 1 + C (6.4) b 2 nA 1 − nb s 2 and thus V1 ≤  7s2 + n (Z1 +Z2 ) 4 2 7s2 4 + n2 (Z1 +Z2 ). Finally, . Combining (6.2), (6.3) and (6.4), we obtain, b 2  7s2 + n (Z +Z ) a 2  n (Z +Z )+ 9 s2  1 2 1 2 2 4 4 2 nA nA · 1 + C . a 1− n 1 − nb a b b i h Cn  a i 2 n n n n + · exp (Z + Z )A + . 1 2 − na 2 1 − na 1 − nb 1 − nb  E1,a,b [LS1 LS2 ] ≤ 1 + C ≤ exp h 9C 4 s2 A2  1 We note that under π, Z1 , Z2 are independent Hypergeometric( n2 , 2s , 2s ) random variables. Theres fore, they are stochastically bounded by a Bin( 2s , n−s ) random variable and finally, we have,   s Z1 + Z2 . Bin s, n−s . This implies that (6.5) b h h Cn  a ii n n ES1 ,S2 exp (Z1 + Z2 )A2 + 2 1 − na 1 − nb b  h Cn  a i s s s 2 n n ≤ 1 − + exp A2 + b n n 2 1 − na 1− n h s2  A2 n a/n i b/n C ( + ) ≤ exp e 2 1−a/n 1−b/n − 1 . 2n 17 DEGREE CORRECTIONS FOR SBM 1 2 Finally, we note that under the assumptions of this theorem, α ≤ n → ∞. Thus using the bound obtained in (6.5), we obtain, E1,a,b [L2π ] ≤ exp h 9C 4 s 2 A2 h  ≤ exp C0 s2 A2 (6.6) a n  a n 1− a n 1− + + a n b n i 1− b n b n 1− i b n · exp h s2  2n 2 e implies that A2 a → 0 as a/n b/n C A2 n ( 1−a/n + 1−b/n ) −1 i = 1 + o(1), where C0 > 0 is some absolute constant, sufficiently large, and the final result follows using the assumptions of this theorem. This completes the proof. 6.2. Proof of Theorem 3.2. This section will also have a common proof for both cases τa = τb = 0 and τa > τb > 0. The proof proceeds by an analysis of the truncated likelihood ratio under the least favorable prior. To this end, consider the prior π which fixes the partition C = {1, · · · , n/2}. For any i ∈ {1, · · · , n}, let C(i) = C if i ∈ C and C(i) = C c otherwise. Further, the prior chooses s/2 elements (assuming s is even w.l.o.g.) randomly from C and C c respectively to form the set S(Θ). Given S(Θ), we set θi = 1 + A for i ∈ S(Θ) and θi = 1 otherwise. In the rest of the proof, we denote the set S(Θ) as S. Also, in this theorem, since all computations are under this chosen C we (C) (C) (C) drop the notational dependence on C from PΘ,a,b , EΘ,a,b , and VarΘ,a,b . Now, for any such given Θ, the likelihood ratio LS = = dPΘ,a,b dP1,a,b Y (θi θj )Yij i<j,C(i)=C(j)  1 − θ θ a (1−Yij ) i jn 1 − na Y (θi θj )Yij  1 − θ θ b (1−Yij ) i jn 1− i<j,C(i)6=C(j) b n . For i ∈PS, with slight abuse of notation, we define the out-degree to vertices in S c ∩ C(i) as d 1 (i) = j∈C(i)∩S c Yij while the out-degree to vertices in the opposite block corresponds to d2 (i) = P c j∈C(i) ∩S c Yij . Under H0 , we have, h i n−s h i n−s a · , E1,a,b di (2) = E1,a,b di (1) = 2 n 2 n−s a  a  n−s b  Var1,a,b [di (1)] = · · 1− , Var1,a,b [di (2)] = · · 1− 2 n n 2 n b . n b . n · Further, we define the constants β1∗ = 1 q 1 − τa 1 τa 1−τa + τb 1−τb , β2∗ = 1 q 1 − τb 1 τa 1−τa + τb 1−τb For i ∈ S, consider the “good” event ΓS,i = n β ∗ (d (1) − E o ∗ p 1,a,b [di (1)]) + β2 (di (2) − E1,a,b [di (2)]) 1 i p ∗ ≤ 2 log n . (β1 )2 Var1,a,b [di (1)] + (β2∗ )2 Var1,a,b [di (2)] e π = ES [LS 1Γ ], where ES [·] denotes the expectation with We set ΓS = ∩i∈S ΓS,i . We define L S respect to S ∼ π. Then it suffices to establish that if A is of the form (3.1) with C < Csparse (α), e π ] = E1,a,b [(L e π )2 ] = 1 + o(1). This will complete the proof of the required lower bound. E1,a,b [L 18 e π ] = ES [E1,a,b [LS 1Γ ]]. Further, we have, To this end, we note that by Fubini’s theorem, E1,a,b [L S c E1,a,b [LS 1ΓS ] = 1 − E1,a,b [LS 1ΓS ] and that E1,a,b [LS 1ΓcS ] ≤ X E1,a,b [LS 1ΓcS,i ] = i∈S a n−s b i ∗ X h p β1∗ (X − n−s 2 n ) + β2 (Y − 2 n ) > P r 2 log n ,     n−s a n−s b a b ∗ ∗ 2 2 i∈S (β1 ) 2 n 1 − n + (β2 ) 2 n 1 − n a n−s b using Lemma 5.3, with X ∼ Bin( n−s 2 , n (1 + A)), Y ∼ Bin( 2 , n (1 + A)). We note that a n−s b i h ∗ p β1∗ (X − n−s 2 n ) + β2 (Y − 2 n ) > 2 log n P r     a a ∗ )2 n−s b 1 − b (β1∗ )2 n−s 1 − + (β 2 2 n n 2 n n s τb τa h β ∗ (X − E[X]) + β ∗ (Y − E[Y ]) p i p 1−τa + 1−τb 1 2 p > =P 2 log n − C log n . τa (1 − τa ) + τb (1 − τb ) Var(β1∗ X + β2∗ Y ) s τb τa n  2 o C 1−τa + 1−τb (1 + o(1)) ≤ exp − log n 1 − 2 τa (1 − τa ) + τb (1 − τb ) 2  s τ τa + b =n − 1− 1−τa 1−τb C 2 τa (1−τa )+τb (1−τb ) (1+o(1)) , using Lemma 5.1 Part 2a. Thus we finally have, s  E1,a,b [LS 1ΓcS ] ≤ n 1−α− 1− τb τa 1−τa + 1−τb C 2 τa (1−τa )+τb (1−τb ) 2 +o(1) = o(1) if C < Csparse (α). This completes the first part of the proof. e π )2 ] = E1,a,b [ES ,S [LS LS 1Γ ∩Γ ]], To study the truncated second moment, we note that E1,a,b [(L 1 2 1 2 S1 S2 where S1 , S2 are iid draws from the measure π. Now, we note that on the event ΓS1 ∩ ΓS2 , for i ∈ S1 ∩ S2 , we have,     X X β1∗ Yij + β2∗ Yij ≤ j∈S1c ∩S2c ∩C(i) β1∗ j∈S1c ∩S2c ∩C(i)c n − s b  a b p 1− + β2∗ 1− + 2 log n n n 2 n n n − s a  2 r n − s ∗ 2 a  a b b  (β1 ) 1− + (β2∗ )2 1 − . 2 n n n n For i ∈ S1 ∩ S2 , we denote the above event as CS1 ,S2 ,i . Finally, we set CS1 ,S2 = ∩i∈S1 ∩S2 CS1 ,S2 ,i . The above discussion implies that ΓS1 ∩ ΓS2 ⊆ CS1 ,S2 and therefore E1,a,b [LS1 LS2 1ΓS1 ∩ΓS2 ] ≤ E1,a,b [LS1 LS2 1CS1 ,S2 ]. Setting Θ: = Θ(S1 ) = (θ1 , · · · , θn ) and Θ: = Θ(S2 ) = (θ1 , · · · , θn ) to denote the true parameter vectors corresponding to S1 , S2 obtained under iid sampling from π, we have, LS1 LS2 = Y (θi θj θi θj )Yij i<j:C(i)=C(j) Y (θi θj θi θj ) i<j:C(i)6=C(j) : = γ0 Y i∈S1 ∩S2 Tei , Yij h 1 − θ θ a  1 − θ θ a i(1−Yij ) i jn i jn × a 1− n 1 − na h 1 − θ θ b  1 − θ θ b i(1−Yij ) i jn i jn 1− b n 1− b n . 19 DEGREE CORRECTIONS FOR SBM where Tei = Y (1 + A)2Yij h 1 − (1 + A) a i2(1−Yij ) n a n 1− j∈S1c ∩S2c ∩C(i) Y (1 + A)2Yij h 1 − (1 + A) b i2(1−Yij ) j∈S1c ∩S2c ∩C(i)c Further, it is easy to see that under H0 , γ0 and Q i∈S1 ∩S2 E1,a,b [LS1 LS2 1CS1 ,S2 ] = E1,a,b [γ0 ]E1,a,b n 1− b n . Tei are independent and therefore h Y  i Tei 1CS1 ,S2 . i∈S1 ∩S2 We will use the following lemma. The proof is similar to the case for α ≤ 1/2 and will thus be deferred to the end of the section. Lemma 6.2. As n → ∞, E1,a,b [γ0 ] = 1 + o(1), uniformly over all S1 , S2 ⊂ {1, · · · , n}, with |Si | = s = n1−α , i = 1.2, such that |Si ∩ C| = 2s , i = 1, 2. We will complete the lower bound proof assuming Lemma 6.2. Using Lemma 5.3, we have, setting Z1 = |S1 ∩ S2 ∩ C| and Z2 = |S1 ∩ S2 ∩ C c |,  E1,a,b [Tei CS1 ,S2 ,i ] = 1 + a 2 nA 1 − na  n −s+Z1  2 1+ b 2  n −s+Z 2 2 nA × b 1− n r h  p n − s ∗ a n − s ∗ 2 a  a b b i ∗ 0 ∗ 0 ∗b ∗ 2 P β1 X + β2 Y ≤ β1 + β2 + 2 log n (β1 ) 1− + (β2 ) 1− , 2 n n 2 n n n n     a b (1+A)2 (1+A)2 where X 0 ∼ Bin n2 − s + Z1 , n a A2 and Y 0 ∼ Bin n2 − s + Z2 , n b A2 . Upon using Taylor n 1+ 1− a 1+ n b 1− n n approximation, we have, r h  p n − s ∗ a n − s ∗ 2 a  a b b i ∗ 0 ∗ 0 ∗b P β1 X + β2 Y ≤ β1 + β2 + 2 log n (β1 ) 1− + (β2∗ )2 1 − 2 n n 2 n n n n h β ∗ (X 0 − E[X 0 ]) + β ∗ (Y 0 − E[Y 0 ]) p   2 p =P 1 < 2 log n 1 − 2C(τa , τb )(1 + o(1)) ]. ∗ 0 Var(β1 X + β2∗ Y 0 ) where we set s C(τa , τb ) = τb τa C 1−τa + 1−τb . 2 τa (1 − τa ) + τb (1 − τb ) We next run into two cases. Consider first the case when 2C(τa , τb ) < 1. In this case, we bound the above probability by 1. Therefore, we have, E1,a,b [LS1 LS2 1CS1 ,S2 ] ≤ ≤ ≤ a 2  n −s+Z  b 2  n −s+Z iZ +Z 1 2 1 2 2 2 nA nA 1 + a b 1− n 1− n b hn  a i n n exp (Z1 + Z2 )A2 + 2 1 − na 1 − nb τb τa h   i 1−τa + 1−τb exp (Z1 + Z2 ) C log n . τa (1 − τa ) + τb (1 − τb ) h 1+ 20 Now, Z1 + Z2 can be dominated stochastically by U ∼ Bin(s, ns ). Therefore, e 2π ] ≤ ES ,S [E1,a,b [LS LS 1C ]]. E1,a,b [L 2 1 1 2 S ,S h 1 s2 s √ is √ ≤ E[n 2C(τa ,τb )U ] = 1 − + n 2C(τa ,τb ) n n h s2 √ i √ ≤ exp n 2C(τa ,τb ) = exp [n1−2α− 2C(τa ,τb ) ] = 1 + o(1) n    a )+τb (1−τb ) 1 if C < 2 τa (1−τ α − τb τa 2 . This concludes the proof in this case. + 1−τa 1−τb Next, we deal with the case 2C(τa , τb ) > 1. It is easy to see that for C < Csparse (α), this is possible only for α > 3/4. In this case, using Lemma 5.1 Part 1a, h β ∗ (X 0 − E[X 0 ]) + β ∗ (Y 0 − E[Y 0 ]) p  i 2 p < P 1 2 log n 1 − 2C(τ , τ ) a b Var(β1∗ X 0 + β2∗ Y 0 ) i h  2 2 ≤ exp − log n 1 − 2C(τa , τb ) (1 + o(1)) = n−(1−2C(τa ,τb )) (1+o(1)) In this case, upon repeating the calculation above, we obtain, h i e 2π ] ≤ EU exp {U log nf (τa , τb )} ≤ exp {n1−2α+f (τa ,τb ) }, E1,a,b [L f (τa , τb ) = 2C(τa , τb )2 − (1 − 2C(τa , τb ))2 . It is easy to see by direct computation that 1 − 2α − f (τa , τb ) < 0 when C < Csparse (α). The proof will thus be complete, once we establish Lemma 6.2. Proof of Lemma 6.2:. The proof borrows heavily from that of Q Theorem 3.1ii.. Upon using the same notation as in the proof of Theorem 3.1ii., we have, γ0 = {i,j}∈A Tij , where A = {{i, j}: i ∈ S1 ∩ S2 , j ∈ S1c ∩ S2c }c . As in the proof of Theorem 3.1ii., we decompose γ0 = T1 T2 T3 , with Tl = where we set Q {i,j}∈Al Tij , l = 1, 2, 3, A1 = {{i, j} ∈ A : i, j ∈ C }, A2 = {{i, j} ∈ A : i, j ∈ C c }, A3 = {{i, j} ∈ A : i ∈ C , j ∈ C c }. We note that under P1,a,b [·], T1 , T2 , and T3 are independent— we will bound each expectation in turn. Further, using independence of the edges, we have, Y E1,a,b [T1 ] = E1,a,b [Tij ]. {i,j}∈A1 We will encounter the following cases. 1. i, j ∈ S1 ∩ S2 ∩ C. In this case, E1,a,b [Tij ] = (1 + A)4 There are Z1 2  such terms. a 2 a  a  1 − (1 + A)2 na 2 nA + 1− . = 1 + (2 + A)2 . n n 1 − na 1 − na DEGREE CORRECTIONS FOR SBM 21 2. i, j ∈ S1 ∩ S2c ∩ C or i, j ∈ S1c ∩ S2 ∩ C or i ∈ S1 ∩ S2c ∩ C, j ∈ S1c ∩ S2 ∩ C. In this case, E1,a,b [Tij ] = (1 + A)2 a 2 A a  1 − (1 + A) na 2 a  =1+ n a. + 1− a n n 1− n 1− n 2  s s 1 There are 2 2 −Z many (i, j) pairs which have this contribution. − Z + 1 2 2 3. i ∈ S1 ∩ S2 ∩ C, j ∈ S1 ∩ S2c ∩ C or i ∈ S1 ∩ S2 ∩ C, j ∈ S1c ∩ S2 ∩ C. We have, a 2 a  1 − (1 + A)2 na  1 − (1 + A) na  a nA + 1 − = 1 + (2 + A). n 1 − (1 + A) na 1 − na n 1 − na   There are 2Z1 2s − Z1 many terms with this contribution. 4. For all other (i, j) pairs, it is easy to check that E1,a,b [Tij ] = 1. E1,a,b [Tij ] = (1 + A)3 We note that under the thesis of the Theorem, A → 0 as n → ∞. Thus we have the upper bound a 2 U  1 A E1,a,b [T1 ] ≤ 1 + C n a , 1− n   s   s 2 s Z1 − Z1 2 − Z1 + − Z1 , U1 = +2 + 2Z1 2 2 2 2 for some absolute constant C > 0. Upon simplification, we obtain the bound  E1,a,b [T1 ] ≤ 1 + C a 2  3 s2 4 nA . 1 − na A similar calculation yields an analogous bound for T2 . We thus obtain, setting Z2 = |S1 ∩ S2 ∩ C c |,  E1,a,b [T2 ] ≤ 1 + C a 2  3 s2 4 nA . a 1− n Finally, it remains to bound T3 . We follow the same argument, and encounter the following cases. 1. i ∈ S1 ∩ S2 ∩ C and j ∈ S1 ∩ S2 ∩ C c . In this case, we have, E1,a,b [Tij ] = (1 + A)4 b 2 b  1 − (1 + A)2 nb 2  b nA + 1 − = 1 + (2 + A)2 . b b n n 1− n 1− n There are Z1 Z2 terms with this contribution. 2. i ∈ S1 ∩ S2 ∩ C, j ∈ S1 ∩ S2c ∩ C c or i ∈ S1 ∩ S2 ∩ C, j ∈ S1c ∩ S2 ∩ C c and the related pairs i ∈ S1 ∩ S2c ∩ C, j ∈ S1 ∩ S2 ∩ C c and i ∈ S1c ∩ S2 ∩ C, j ∈ S1 ∩ S2 ∩ C c . Each pair contributes b 2 b  1 − (1 + A)2 nb  1 − (1 + A) nb  b nA + 1 − = 1 + (2 + A). n n 1 − (1 + A) nb 1 − nb 1 − nb     There are 2Z1 2s − Z2 + 2Z2 2s − Z1 many terms with this contribution. 3. i ∈ S1 ∩ S2c ∩ C, j ∈ S1c ∩ S2 ∩ C c or i ∈ S1c ∩ S2 ∩ C, j ∈ S1 ∩ S2c ∩ C c . Each term contributes E1,a,b [Tij ] = (1 + A)3 E1,a,b [Tij ] = (1 + A)2 b 2 b  b  1 − (1 + A) nb 2 nA + 1− = 1 + . n n 1 − nb 1 − nb    There are 2 2s − Z1 2s − Z2 many terms with this contribution. 22 4. Every other pair has E1,a,b [Tij ] = 1. Similar considerations as for T1 above lead to the upper bound  E1,a,b [T3 ] ≤ 1 + C V1 = Z1 Z2 + 2Z1 b 2 V 1 nA , b 1− n s  s  s  s  − Z2 + 2Z2 − Z1 + 2 − Z1 − Z2 , 2 2 2 2 for some absolute constant C > 0. We note that Z1 , Z2 ≤ the following upper bound on T3 .  E1,a,b [T3 ] ≤ 1 + s 2 b 2 A C n b 1− n and thus V1 ≤  7s2 4 7s2 4 . Finally, this yields . The rest of the proof can be completed following the same argument as in that of Theorem 3.1ii. 6.3. Proof of Theorem 3.3. We prove each part of the theorem in separate subsections below. Proof of Theorem 3.3 i. Throughout C denotes the underlying community assignment and all results are uniform in this C. By virtue of centering and scaling of individual HC(C, β1 , β2 ; t) under the null, we have by union bound and Chebyshev’s Inequality,   p (C) P1,a,b HC(C, β1 , β2 ) ≥ log n  √10 log n X (C)  p → 0 as n → ∞. ≤ P1,a,b GHC(C, β1 , β2 ; t) > log n ≤ log n t This controls the Type I error of this test. It remains to control the Type II error. We will establish as usual that the non-centrality parameter under the alternative beats the null and the alternative variances of the statistic. We consider alternatives as follows. Let PΘ,a,b be such that θi = 1 + A for q i ∈ S and θi = 1 otherwise, where A = C ∗ log n 2 σn0 with 2ρ(β1 , β2 ) ≥ C ∗ > CHC (β1 , β2 , α), |S| = s = n1−α , α ∈ (1/2, 1). The case of higher signals can be handled by standard monotonicity arguments and are therefore omitted. Also, let S1 = C ∩S, S1c = C ∩S c , s1 = |S1 | and S2 = C c ∩S, S2c = C c ∩S c , s2 = |S2 |. Also let ρ(β1 , β2 ): = 1/ρ(β1 , β2 ). The following Lemma studies the behavior of this statistic under this class of alternatives. √ Lemma 6.3. Let t = 2r log n with r = min {1, 2C ∗ ρ(β1 , β2 )}. Then √ (C) (a) EΘ,a,b (GHC(C, β1 , β2 ; t))  log n.  2 (C) (b) EΘ,a,b (GHC(C, β1 , β2 ; t))  Varθ,a,b (GHC(C, β1 , β2 ; t)) . The Type II error of the HC statistic may be controlled immediately using Lemma 6.3. This is straightforward— however, we include a proof for the sake of completeness. For any alternative considered above, we have, using Chebychev’s inequality and Lemma 6.3, p p (C) (C) PΘ,a,b [HC(C, β1 , β2 ) > log n] ≥ PΘ,a,b [GHC(C, β1 , β2 ; t) ≥ log n] 23 DEGREE CORRECTIONS FOR SBM (C) Varθ,a,b (GHC(C, β1 , β2 ; t)) ≥ 1 − (C) →1 √ (EΘ,a,b (GHC(C, β1 , β2 ; t)) − log n)2 as n → ∞. This completes the proof, modulo that of Lemma 6.3. Proof of Lemma 6.3. The proof requires a detailed understanding of the mean and variance of the HC(C, β1 , β2 ; t) statistics. Due to centering, HC(C, β1 , β2 ; t) has mean 0 under the null hypothesis. Our next proposition estimates the variances of the HC(C, β1 , β2 ; t) statistics under the null and the class of alternatives introduced above. We also lower bound the expectation of the HC(C, β1 , β2 ; t) statistics under the alternative. √ ∗ Proposition 6.4. For t = 2r log n with r > C ρ(β21 ,β2 ) , we have, (C) lim log VarΘ=1,a,b (HC(C, β1 , β2 ; t)) log n n→∞ = 1 − r, (6.7) (C) 2 p 1 √ 2r − C ∗ ρ(β1 , β2 ) , (6.8) n→∞ log n 2   (C) 2 p log VarΘ,a,b (HC(C, β1 , β2 ; t)) 1 √ ∗ lim = max 1 − α − 2r − C ρ(β1 , β2 ) , 1 − r n→∞ log n 2 . (6.9) lim log EΘ,a,b (HC(C, β1 , β2 ; t)) ≥1−α− We defer the proof of Proposition 6.4 to Section 8. The rest of the proof follows along the lines of the proof of Lemma 6.4 in Mukherjee, Mukherjee and Sen (2016) by noting that C ∗ /8(1 − θ) in Proposition 6.4 of Mukherjee, Mukherjee and Sen (2016) can be mapped to the constant C ∗ ρ(β1 , β2 ) in Lemma 6.3 and Proposition 6.4. Proof of Theorem 3.3 ii. Throughout C denotes the underlying community assignment and all results are uniform in this C. We set µn0 (C, β1 , β2 ) = β1 µ0n1 + β2 µ0n2 and recall the definition of σn0 (C, β1 , β2 ) from Section 2. First, we control the Type I error of φ(β1 , β2 , δ) for any δ > 0. Indeed, we have, using Lemma 5.1 Part 2a and an union bound, (C) E1,a,b [Tdmax (C, β1 , β2 , δ)] ≤ n · n−(1+δ) 2 +o(1) → 0. Usingqstochastic monotonicity of the test statistic in A, it suffices to analyze the Type II error for n A = Cσlog with 2 n0 Cmax (β1 , β2 , α) < C ≤ 2 (β12 τa (1 − τa ) + β22 τb (1 − τb ))(τa (1 − τa ) + τb (1 − τb )) . (β1 τa + β2 τb )2 Now, we note that h i h i p p (C) (C) PΘ,a,b max Di (C, β1 , β2 ) > 2(1 + δ) log n ≥ PΘ,a,b max Di (C, β1 , β2 ) > 2(1 + δ) log n . i∈[n] i∈S(Θ) P Further, for i ∈ S(Θ), we set d0i (1) = j∈C(i)∩S(Θ)c Yij and d0i (2) = j∈C(i)c ∩S(Θ)c Yij . We observe that di (1) ≥ d0i (1) and di (2) ≥ d0i (2), and thus h i p (C) PΘ,a,b max Di (C, β1 , β2 ) > 2(1 + δ) log n i∈S(Θ) h i p (C) (6.10) ≥ PΘ,a,b max (β1 d0i (1) + β2 d0i (2)) > µn0 (C, β1 , β2 ) + σn0 (C, β1 , β2 ) 2(1 + δ) log n . P i∈S(Θ) 24 (C) (C) Finally, we note that for j ∈ C(i), E1,a,b [Yij ] = na , and for j ∈ C(i) ∩ S(Θ)c , EΘ,a,b [Yij ] ≥ (1 + A) na . (C) (C) Similarly, for j ∈ C(i)c , E1,a,b [Yij ] = nb , while for j ∈ C(i)c ∩ S(Θ)c , EΘ,a,b [Yij ] ≥ (1 + A) nb . Plugging these into (6.10) and simplifying, we get i h p (C) PΘ,a,b max (β1 d0i (1) + β2 d0i (2)) > µn0 (C, β1 , β2 ) + σn0 (C, β1 , β2 ) 2(1 + δ) log n ≥ i∈S(Θ) (C) (C) PΘ,a,b h i p β1 d0i (1) + β2 d0i (2) − EΘ,a,b [β1 d0i (1) + β2 d0i (2)] 0 p > C log n , max i∈S(Θ) VarΘ,a,b [β1 d0i (1) + β2 d0i (2)] where C 0 is given as p √ β1 τa + β2 τb C 0 = 2(1 + δ) − p 2 C. 2 (β1 τa (1 − τa ) + β2 τb (1 − τb ))(τa (1 − τa ) + τb (1 − τb )) We note that under the assumptions introduced above, C 0 > 0. We note that {β1 d0i (1) + β2 d0i (2): i ∈ S(Θ)} and for any fixed i ∈ S(Θ), d0i (1) is stochastically larger than a X ∼    are independent Bin n 2 − s, na , while d0i (2) stochastically dominates Y ∼ Bin n 2 − s, nb . Thus we have, (C) i p β1 d0i (1) + β2 d0i (2) − EΘ,a,b [β1 d0i (1) + β2 d0i (2)] 0 p max ≤ C log n i∈S(Θ) VarΘ,a,b [β1 d0i (1) + β2 d0i (2)] is  h β X + β Y − E[β X + β Y ] p 1 1 2 p 2 ≤ C 0 log n ≤ P Var(β1 X + β2 Y )  h β X + β Y − E[β X + β Y ] is p 1 1 2 p 2 = 1−P > C 0 log n Var(β1 X + β2 Y ) ii h h β X + β Y − E[β X + β Y ] p 1 1 2 p 2 > C 0 log n ≤ exp − sP Var(β1 X + β2 Y ) h i 0 2 (C ) = exp − n1−α− 2 +o(1) → 0 (C) PΘ,a,b h as n → ∞, by the choice of C 0 . This controls the Type II error and completes the proof. 6.4. Proof of Theorem 3.4. The proof of Theorem 3.4i. and ii. follows from Theorem 3.3i. and ii.. Hence here we only prove Theorem 3.4 iii.. Proof of Theorem 3.4 iii. In this theorem, since all computations are under the true underlying C and the test based dmax (1, 1) does not depend on it, we drop the notational dependence on C (C) (C) (C) from PΘ,a,b , EΘ,a,b , and VarΘ,a,b . Consider any alternative Θ ∈ Ξ(s, A) with A as in , such that θi = 1 + A for i ∈ S(Θ) and θi = 1 2 = Var otherwise. Recall that we have set µn0 = E1,a,b [d1 ] and σn0 1,a,b [d1 ]. If possible, suppose there exists a consistent sequence of tests based on the max degree with asymptotically zero risk again the alternative sequence under consideration. In this case, there exists a sequence of cut-offs {kn } such that P1,a,b [max di < kn ] → 1, PΘ,a,b [max di > kn ] → 1, i i as n → ∞. Without loss of generality, we set  p log log n + log(4π) yn  + . kn = µn0 + σn0 2 log n 1 − 4 log n 2 log n 25 DEGREE CORRECTIONS FOR SBM We first observe that for any such sequence {kn }, P1,a,b [maxi di < kn ] → 1 as n → ∞ implies that yn → ∞ as n → ∞. To this note, suppose yn ≤ M along any subsequence. Thus along this subsequence, using Theorem 3.5, we have P1,a,b [maxi di < kn ] ≤ exp[e−M ] < 1. Thus yn → ∞ as n → ∞. The rest of the proof establishes that the Type II error does not converge to 0 as n → ∞ for any such sequence of cutoffs kn , and alternatives Θ outlined above. To this end, note that h i h i h i PΘ,a,b max di > kn = PΘ,a,b max di > kn + PΘ,a,b max di > kn i i∈S(Θ) i∈S(Θ)c i h h i ≤ n1−α PΘ,a,b di0 > kn + PΘ,a,b max di > kn , i∈S(Θ)c for some i0 ∈ S(Θ). We will establish that each of these terms converge to zero as n → ∞. To this end, first, we note that yn → ∞ implies that yn ≥ 0 eventually. Thus we have,  h p log log n + log(4π) i PΘ,a,b [di0 > kn ] ≤ PΘ,a,b di0 > µn0 + σn0 2 log n 1 − 4 log n h i p = PΘ,a,b di0 > µn0 + σn0 2 log n(1 + o(1)) . We note that under PΘ,a,b [·],  di0 ∼ U + V, with U, V independent random variables   andU ∼ a b n n n Bin 2 , (1 + A) n and V ∼ Bin 2 , (1 + A) n respectively. Thus EΘ,a,b [di0 ] = 2 (1 + A) na + nb and     VarΘ,a,b [di0 ] = n2 (1 + A) na (1 − (1 + A) na ) + nb (1 − (1 + A) nb ) . Thus EΘ,a,b [di0 ] − µn0 = n2 A na + nb . Further, we observe that A → 0 as n → ∞ to conclude that VarΘ,a,b [di0 ]/ Var1,a,b [di0 ] → 1 as n → ∞. Thus we have, h i p PΘ,a,b di0 > µn0 + σn0 2 log n(1 + o(1))   n a b i hd − E + p p 2 n n i Θ,a,b [di0 ] . = PΘ,a,b p0 > 2 log n(1 + o(1)) − C log n 2 σn VarΘ,a,b [di0 ] r  hd − E i  p τa + τb C i0 Θ,a,b [di0 ] = PΘ,a,b p (1 + o(1)) > 2 log n 1 − τa (1 − τa ) + τb (1 − τb ) 2 VarΘ,a,b [di0 ]  q 2 =n τa +τb a (1−τa )+τb (1−τb ) − 1− τ C 2 +o(1) , using Lemma 5.1 Part 2. As a result, we have, n1−α PΘ,a,b [di0 > kn ] = o(1), q 2  +τb C as 1 − α − 1 − τa (1−ττaa)+τ < 0, in this case. This controls the first term. 2 b (1−τb ) The control of the second term is similar to the control of the Type I error. However, we have to carefully control the contribution due to the contamination P edges with the non-null P vertices. To this end, note that for i ∈ S(Θ)c , di = Z1i + Z2i , where Z1i = j6=i,j∈S(Θ)c Yij , Z2i = j6=i,j∈S(Θ) Yij . Thus we have, i h i h PΘ,a,b max di > kn ≤ PΘ,a,b max Z1i + max Z2i > kn i∈S(Θ)c i∈S(Θ)c i∈S(Θ)c h i h i ≤ PΘ,a,b max Z1i > kn − kn0 + PΘ,a,b max Z2i > kn0 , i∈S(Θ)c i∈S(Θ)c 26 for some sequence kn0 to be For each i ∈ S(Θ)c , we note that Z2i is stochasti chosen appropriately.  0 ζn , for some sequence cally dominated by a Bin s, na (1 + A) random variable. We choose kn0 = √σ2nlog n ζn0 → ∞ to be chosen appropriately. We note that α ∈ ( 12 , 1) implies that kn0  s na (1 + A) and thus, by Bernstein’s inequality, for i ∈ S(Θ)c , 2 i h i kn0 − s na (1 + A)    i ≤ exp − Ckn0 PΘ,a,b [Z2i > kn0 ] ≤ exp − h 2 s na (1 + A) 1 − na (1 + A) + 31 kn0 − s na (1 + A)  h for some C > 0. Further, a, b  (log n)3 implies that kn0  log n and thus h i PΘ,a,b max Z2i > kn0 ≤ n exp[−Ckn0 ] = o(1). i∈S(Θ)c Finally, we have, for i ∈ S(Θ)c , Z1i is stochastically  dominated byM1 +  M2 , where M1 , M2 are  n a n b independent random variables with M1 ∼ Bin 2 , n and M2 ∼ Bin 2 , n . This implies h PΘ,a,b i h i max Z1i > kn − kn0 ≤ P1,a,b max di > kn − kn0 i∈S(Θ)c i h = P1,a,b max di > µn0 + σn0 i p  2 log n 1 − log log n + log(4π) yn − ζn0 i + . 4 log n 2 log n We note that for any sequence yn → ∞, we can choose a sequence ζn0 → ∞ sufficiently slow such h i 0 0 0 that yn − ζn → ∞. Under such a choice of ζn , PΘ,a,b maxi∈S(Θ)c Z1i > kn − kn = o(1) as n → ∞. This establishes that no such test can control the Type I and Type II errors simultaneously, and thus completes the proof. 6.5. Proof of Theorem 3.5. In this theorem, since all computations are under the true underlying C and the test based dmax (1, 1) does not depend on it, we drop the notational dependence on C (C) (C) (C) from PΘ,a,b , EΘ,a,b , and VarΘ,a,b . For y ∈ R, we define x: = x(n, y) as the solution of the equation √12π nx exp[−x2 /2] = exp[−y]. We will establish that h max d − µ i i i n0 (6.11) P1,a,b ≤ x → exp[e−y ] σn0 2 = Var as n → ∞, where as usual we set µn0 = E1,a,b [d1 ] and σn0 1,a,b [d1 ]. Upon direct computation, we obtain  p log log n + log(4π) y  x(n, y) = 2 log n 1 − + + o(1) 4 log n 2 log n as n → ∞, thus immediately implying the desired result. Thus it remains to establish (6.11). To this P end, we define Z = i 1(di > µn0 + xσn0 ). We claim that as n → ∞, Z converges in distribution to a Poisson(exp[−y]) random variable. This immediately implies P1,a,b h max d − µ i i i n0 ≤ x = P1,a,b [Z = 0] → exp[e−y ] σn0 as n → ∞. This yields (6.11). 27 DEGREE CORRECTIONS FOR SBM Finally, it remains to establish the Poisson approximation for Z as n → ∞. To this end, we use the following version of Stein’s method for Poisson approximation (Barbour, Holst and Janson, 1992, Theorem 2.C and Corollary 2.C.4). We define a sequence of Bernoulli random variables (i) {Xi : i ∈ I} to be positively related if for every i ∈ I, we can construct {Yj : j 6= i}, coupled with (i) (i) {Xi : i ∈ I}Psuch that {Yj : j 6= i} is distributed Pas {Xj : j 6= i}|Xi = 1 and ∀j 6= i, Yj ≥ Xj . We set W = i Xi , with Xi ∼ Ber(pi ), and λ = i pi . The following theorem (Barbour, Holst and Janson, 1992, Corollary 2.C.4) bounds the TV distance between W and a Poisson random variable with mean λ. Theorem. (Barbour, Holst and Janson, 1992, Corollary 2.C.4) n 1 o X  dTV (W, Poi(λ)) ≤ min 1, Var(W ) − λ + 2 p2i . λ i The desired Poisson approximation result follows immediately from the lemma below. Lemma 6.5. The Bernoulli variables {1(di > µn0 + xσn0 ): 1 ≤ i ≤ n} are positively related. We set λ = λn : = nP1,a,b [d1 > µn0 + xσn0 ]. Then we have, if b  (log n)3 , as n → ∞, λ → exp[−y] and Var(Z) → exp[−y] An application of the Poisson approximation theorem above concludes the proof modulo the proof of Lemma 6.5. Proof of Lemma 6.5. First, we establish that Xi = 1(di > µn0 + xσn0 ) are positively related. We note that the Xi are increasing functions of independent random variables Y and thus the {Xi : 1 ≤ i ≤ n} are positively related (Barbour, Holst and Janson, 1992, Theorem 2.G). Next, we check that λ → exp[−y]. We have, λ = nP1,a,b [d1 > µn0 + xσn0 ] = n(1 − Φ(x))(1 + o(1)), where the last equality follows from Lemma 5.2. Combining Mills ratio with the definition of x immediately gives us the desired result. Finally, we check the variance condition.   n Var(Z) = nP1,a,b [d1 > µn0 + xσn0 ](1 − P1,a,b [d1 > µn + xσn ]) + cov(X1 , X2 ). 2 By computations similar to those involved in control of term T4 of Lemma 8.1 proved in Section 8, n −1(1+o(1)) for any fixed y ∈ R. This completes the proof. 2 cov(X1 , X2 ) = n 6.6. Proof of Theorem 3.6. We claim that the claim of the theorem follows from Theorem 3.3 ˆ Ξ(s, A)) → 0. To see this note that Riskn (C, ˆ Ξ(s, A)) → 0 implies P(C) (d(C, ˆ C) ≥ since Riskn (C, Θ,a,b ˆ C) is a N-valued random 1) → 0 uniformly over all C ⊂ [n] with |C| = n/2 and Ξ(s, A). Since d(C, (C) ˆ C) = 0) → 1 uniformly over all C ⊂ [n] with |C| = n/2 variable, we immediately have P (d(C, Θ,a,b ˆ C) = 0. and Ξ(s, A). The proof therefore follows from Theorem 3.3 by working on the event d(C, 6.7. Proof of Theorem 3.7. We proceed exactly along the lines of the proof of Theorem 3.1ii.. Indeed,we consider the same prior on the parameter space and as earlier, denote the marginal 28 likelihood as Lπ . We recall that E1,a,b [Lπ ] = 1. It remains to study the second moments. Again, we follow the arguments in the proof of Theorem 3.1ii. and consider the upper bound (6.6) E1,a,b [L2π ] ≤ exp h 9C 4 s 2 A2 i  a/n h s2  A2 n a/n b/n b/n i ( + ) C + exp e 2 1−a/n 1−b/n − 1 , 1 − a/n 1 − b/n n for some universal constant C > 0. First, we note that for α > 21 , and a  (log n),  a/n b/n  a/n log n   →0 + ≤ 2s2 ≤2 s 1 − a/n 1 − b/n 1 − a/n n2α−1 1 − na 2 as n → ∞. Finally, we note that for a  log n,  s2 0 a/n b/n s2  C A22 n ( 1−a/n + 1−b/n ) e − 1 ≤ eC a n n for some universal constant C 0 > 0. We note that α > 1 2 and a  log n implies that s2 C 0 a e ≤ n1−2α+c n for any constant c > 0. This concludes the proof, upon choosing c > 0 sufficiently small, so that 2α > 1 + c. This concludes the proof. 7. Proofs of Binomial Deviation Bounds. Throughout we let τa0 = lim a0 /n and τb0 = lim b0 /n and let M = supn≥1 max{|τa0 − a0 /n|, |τb0 − b0 /n|, |Cn − C|}. 7.1. Proof of Lemma 5.1. We prove each part of the lemma separately below. Proof of Lemma 5.1 Part 1a: Let 2 ) h(β1 σn1 , h∗ = σn (β1 , β2 )2 and A: = {x: µn1 + x/β1 ∈ N ∩ [0, n/2]}. Then we have for any C ∗ > 0 sup P (d(β1 , β2 ) = h + t) |t|≤ξn X = sup P(X = µn1 + h1 /β1 )P(Y = µn2 + (h − h1 + t)/β2 ) |t|≤ξn h ∈A 1 X = sup |t|≤ξn X + sup |t|≤ξn P(X = µn1 + h1 /β1 )P(Y = µn2 + (h − h1 + t)/β2 ) h1 ∈ A∩I(C ∗ ,h∗ )c P(X = µn1 + h1 /β1 )P(Y = µn2 + (h − h1 + t)/β2 ), h1 ∈ A∩I(C ∗ ,h∗ ) √ √ where I(C ∗ , h∗ ): = [h∗ − C ∗ σn1 log n, h∗ + C ∗ σn1 log n] and I(C ∗ , h∗ )c denotes its complement. Now X sup P(X = µn1 + h1 /β1 )P(Y = µn2 + (h − h1 + t)/β2 ) |t|≤ξn h1 ∈ A∩I(C ∗ ,h∗ )c DEGREE CORRECTIONS FOR SBM 29   p ≤ sup P Y > µn2 + (h − h∗ + C ∗ σn1 log n + t)/β2 |t|≤ξn   p + sup P X > µn1 + (h∗ + C ∗ σn1 log n)/β1 . |t|≤ξn Now by Lemma 6.2 of Mukherjee, Mukherjee and Sen (2016) Part (a, ii)   ∗ p κ2 1 (C ) sup P X > µn1 + (h∗ + C ∗ σn1 log n)/β1 ≤ n− 2 +o(1) , |t|≤ξn C ∗ +cβ12 (C ∗ ) r τa0 (1−τa0 ) 2 τ (1−τ )+β 2 τ (1−τ ) β1 2 b0 a0 a0 b0 where κ1 = since c < lim inf σ (β ,βh )√log n . Again by Lemma 6.2 β1 n 1 2 of Mukherjee, Mukherjee and Sen (2016) Part (a, ii) we have for |t| ≤ ξn  log n   ∗ p κ2 2 (C ) sup P Y > µn2 + (h − h∗ + C ∗ σn1 log n + t)/β2 ≤ n− 2 +o(1) , |t|≤ξn where κ2 (C ∗ ) C∗ r = τa0 (1−τa0 ) +cβ22 τb0 (1−τb0 ) r τb0 (1−τb0 ) 2 τ (1−τ )+β 2 τ (1−τ ) β1 2 b0 b0 a0 a0 β2 . Now by Theorem 1.2 of Bollobás (2001), whenever |t| ≤ ξn  log n, one has for any fixed ε ∈ (0, 1) and n large enough (depending on ε, β1 , β2 , C ∗ , c, c0 , M ) X sup P(X = µn1 + h1 /β1 )P(Y = µn2 + (h − h1 + t)/β2 ) |t|≤ξn h1 ∈ A∩I(C ∗ ,h∗ ) 1 X ≤ h1 ∈ A∩I(C ∗ ,h∗ ) p 2 2πσn1  exp −    1 h21 (h − h1 )2 (1 − ε) × p (1 − ε) . exp − 2 2(β1 σn1 )2 2(β2 σn2 )2 2πσn2 h2 2 (h−h1 ) ∗ Since the function f (h1 ) = 2(β1 σ1n1 )2 + 2(β 2 is minimized at h1 = h , we have 2 σn2 ) X sup P(X = µn1 + h1 /β1 )P(Y = µn2 + (h − h1 + t)/β2 ) |t|≤ξn h1 ∈ A∩I(C ∗ ,h∗ ) ≤ |A ∩ I(C ∗ , h∗ )| 1 2πσn1 σn2  exp −  h2 (1 − ε) 2σn (β1 , β2 )2 (7.1) Therefore for any given sequence {ξn } such that |ξn |  log n sup P (d(β1 , β2 ) = h + t) |t|ξn  κ2 (C ∗ ) κ2 (C ∗ ) h2 − 1 2 +o(1) − 2 2 +o(1) ≤ |A ∩ I(C , h )| (1 − ε) + n + n .(7.2) 2πσn1 σn2 2σn (β1 , β2 )2 √ Now note that |A∩I(C ∗ , h∗ )| ≤ const·σn1 log n for a constant const. (depending on C ∗ , c, c0 , β1 , β2 , M ) and κ21 (C ∗ ), κ22 (C ∗ ) are increasing function of C ∗ . The proof is therefore complete by choosing C ∗ large enough constant (depending on c, c0 , β1 , β2 , M ). ∗ ∗ 1  exp − √ Proof of Lemma 5.1 Part 1b: For any sequence {δn } let tn (δn ) = δn σn (β1 , β2 ) log n. We make use of the following lemma, the proof of which being simple is omitted. 30 There exists a positive sequence δn∗ → 0 such that the following hold. √ √ (i) t√n (δn∗ ) ∧ δn∗ (β1 ∧ β2 ) × a0 ∧ b0 × log n  log n. n (s1 ∨s2√)×(a00 ∨b00 ) (ii) log → 0. 0 0 δ∗ Lemma 7.1. n a ∧b n Fix a sequence δn∗ satisfying (i) and (ii) of Lemma 7.1. Then  sup P d0 (β1 , β2 ) = h + t |t|≤ξn P (β1 X 0 + β2 Y 0 > tn (δn∗ )) sup P (d(β1 , β2 ) = h + t − r) ( ≤ sup + |t|≤ξn = P β1 X 0 ∗ )] r∈[0,tn (δn  0 + β2 Y > tn (δn∗ ) + sup ) P (d(β1 , β2 ) = h + t − r) . |t|≤ξn , ∗ )] r∈[0,tn (δn For the first term we have  P β1 X 0 + β2 Y 0 > tn (δn∗ )  = P β1 (X 0 − s1 a00 /n) + β2 (Y 0 − s2 b00 /n) > tn (δn∗ ) − (β1 s1 a00 /n + β2 s2 b00 /n) . Now by Lemma 7.1 tn (δn∗ ) − (β1 s1 a00 /n + β2 s2 b00 /n) p √ δ∗ 2 ≥ n (β1 ∧ β2 ) × a0 ∧ b0 × log n − (β1 ∨ β2 ) × (s1 ∨ s2 ) × (a00 ∨ b00 ) 2   n √ p √ δn∗ log n (s1 ∨ s2 ) × (a00 ∨ b00 ) 0 0 √ = (β1 ∧ β2 ) × a ∧ b × log n 1 − 2 2 δn∗ n a0 ∧ b0  log n. Therefore by Bernstein’s Inequality for θ > 0 one has for n large enough (depending on θ, β1 , β2 )  P β1 X 0 + β2 Y 0 > tn (δn∗ ) ≤ n−θ . Finally by Lemma 7.1 and (7.2) sup P (d(β1 , β2 ) = h + t − r) |t|≤ξn , ∗ )] r∈[0,tn (δn ∗ 1 ∗ ≤ |A ∩ I(C , h )| 2πσn1 σn2  exp −  κ2 (C ∗ ) κ2 (C ∗ ) h2 − 1 2 +o(1) − 2 2 +o(1) + n , (1 − ε) + n 2σn (β1 , β2 )2 for any C ∗ > 0 and ε ∈ (0, 1), whenever |t| ≤ ξn  log n Therefore for any given sequence {ξn } such that |ξn |  log n, any C ∗ , θ > 0, and ε ∈ (0, 1) we have for n large enough (depending on ε, c, c0 , β1 , β2 , C ∗ , θ, M )  sup P d0 (β1 , β2 ) = h + t |t|ξn ≤n −θ ∗ ∗ + |A ∩ I(C , h )| 1 2πσn1 σn2  exp −  κ2 (C ∗ ) κ2 (C ∗ ) h2 − 1 2 +o(1) − 2 2 +o(1) (1 − ε) + n + n . 2σn (β1 , β2 )2 (7.3) DEGREE CORRECTIONS FOR SBM 31 √ Now note that |A∩I(C ∗ , h∗ )| ≤ const·σn1 log n for a constant const. (depending on C ∗ , c, c0 , β1 , β2 , M ) and κ21 (C ∗ ), κ22 (C ∗ ) are increasing function of C ∗ . The proof is therefore complete by choosing C ∗ and θ large enough constant (depending on c, c0 , β1 , β2 , M ). Proof of Lemma 5.1 Part 2a: The proof proceeds by producing upper and lower bounds on the desired moderate deviation probability. √ Upper Bound. For h = Cn σn (β1 , β2 ) log n, any ε > 0, and ∆n > 0 one has M n −1 X p P (d(β1 , β2 ) > Cn σn (β1 , β2 ) log n) = P(d(β1 , β2 ) ∈ (h + k∆n , h + (k + 1)∆n )), k=0 where Mn =  n(β1 +β2 ) 2 √  − µn (β1 , β2 ) − h /∆n . Fix B > lim sup Cn to be chosen later and let mn = Bσn (β1 , β2 ) log n/∆n . Then mX n −1 P(d(β1 , β2 ) ∈ (h + k∆n , h + (k + 1)∆n )) k=0 mX n −1 ≤ |H ∩ (h + k∆n , h + (k + 1)∆n )| sup P(d(β1 , β2 ) = h + k∆n + t) t∈[0,∆n ] k=0 where H = {x: µn (β1 , β2 ) + x ∈ β1 N + β2 N}. Now it is easy to see that |H ∩ (h + k∆n , h + (k + 1)∆n )| ≤ β1 β2 ∆2n . Also by the choice of mn , for any ε > 0   1 (h + k∆n )2 1/2 sup P(d(β1 , β2 ) = h + k∆n + t) ≤ √ exp − (1 − ε) . 2σn (β1 , β2 )2 2πσn (β1 , β2 ) t∈[0,∆n ] Therefore as long as ∆n is bounded we have by arguments similar to the proof of part (a, i) mX n −1 P(d(β1 , β2 ) ∈ (h + k∆n , h + (k + 1)∆n )) k=0 mX n −1 ≤ |H ∩ (h + k∆n , h + (k + 1)∆n )| sup P(d(β1 , β2 ) = h + k∆n + t) t∈[0,∆n ] k=0 mX n −1   1 (h + k∆n )2 1/2 ≤ exp − (1 − ε) 2σn (β1 , β2 )2 2πσn (β1 , β2 ) k=0   Z mn 1 (h + x∆n )2 2 1/2 √ ≤ β1 β2 ∆n exp − (1 − ε) dx 2σn (β1 , β2 )2 2πσn (β1 , β2 ) 0 ! !! 1/2 1/2 h(1 − ε) (h + m ∆ )(1 − ε) n n = β1 β2 ∆2n Φ̄ − Φ̄ σn (β1 , β2 ) σn (β1 , β2 ) ! !! √ 1/2 1/2 h(1 − ε) (h + Bσ (β , β ) log n)(1 − ε) n 1 2 = β1 β2 ∆2n Φ̄ − Φ̄ . σn (β1 , β2 ) σn (β1 , β2 ) β1 β2 ∆2n √ Therefore if ∆n is bounded P (d(β1 , β2 ) > Cn σn (β1 , β2 ) p log n) 32 = + mX n −1 k=0 Mn X P(d(β1 , β2 ) ∈ (h + k∆n , h + (k + 1)∆n )) P(d(β1 , β2 ) ∈ (h + k∆n , h + (k + 1)∆n )) k=mn ≤ β1 β2 ∆2n Φ̄ h(1 − ε)1/2 σn (β1 , β2 ) ! − Φ̄ !! √ (h + Bσn (β1 , β2 ) log n)(1 − ε)1/2 σn (β1 , β2 ) p + P (d(β1 , β2 ) > h + Bσn (β1 , β2 ) log n). √ It remains to control P (d(β1 , β2 ) > h+Bσn (β1 , β2 ) log n) which we will do using a naive Bernstein bound. In particular we have by Bernstein’s Inequality p P (d(β1 , β2 ) > h + Bσn (β1 , β2 ) log n) ! √ 1 (h + Bσn (β1 , β2 ) log n)2 √ ≤ exp − . 2 σn (β1 , β2 )2 + 31 (β1 ∨ β2 )(h + Bσn (β1 , β2 ) log n) √ Now note that σn (β1 , β2 )2  h + Bσn (β1 , β2 ) log n. Therefore for sufficiently large n p 1 σn (β1 , β2 )2 + (β1 ∨ β2 )(h + Bσn (β1 , β2 ) log n) ≤ 2σn (β1 , β2 )2 . 3 As a consequence for sufficiently large n   p 1 2 P (d(β1 , β2 ) > h + Bσn (β1 , β2 ) log n) ≤ exp − (Cn + B) log n . 4 The desired control of the upper bound is thereafter complete by choosing B large enough depending on ε > 0. √ Lower Bound. We first claim that for any Cn σn (β1 , β2 ) log n ≤ h  b0   1 h2 1/2 P(d(β1 , β2 ) ∈ (h, h + 3β2 )) ≥ √ exp − (1 + ε) . 2σn (β1 , β2 )2 2πσn (β1 , β2 ) (7.4) Deferring the proof √ of (7.4), we first finish the proof of the lower bound. In view of the claim, for t = Cn σn (β1 , β2 ) log n and any Mn  b0 one has for any ε p P (d(β1 , β2 ) > Cn σn (β1 , β2 ) log n) ≥ Mn X k=0 Mn X P(d(β1 , β2 ) ∈ (t + 3kβ2 , t + 3(k + 1)β2 ))   1 (t + 3kβ2 )2 1/2 ≥ exp − (1 + ε) 2σn (β1 , β2 )2 2πσn (β1 , β2 ) k=0   Z Mn (t + 3xβ2 )2 1 1/2 √ exp − ≥ (1 + ε) dx 2σn (β1 , β2 )2 2πσn (β1 , β2 ) 0 ! ! t(1 + ε)1/2 (t + 3Mn β2 )(1 + ε)1/2 = Φ̄ − Φ̄ . σn (β1 , β2 ) σn (β1 , β2 ) √ 33 DEGREE CORRECTIONS FOR SBM √ Using Mill’s ratio the proof of the lower bound is therefore complete by choosing Cn σn (β1 , β2 ) log n  Mn  b0 . We now complete the proof of the claim in (7.4). The main idea of the proof is simple and relies on finding O(σn (β1 , β2 )) distinct pairs  (h1 , h22 ) such  1 that β1 h1 +β2 h2 −µn (β1 , β2 ) ∈ (h, h+3β2 ) and P (X = h1 )P (Y = h2 ) ≥ 2πσn1 σn2 exp − 2σn (βh1 ,β2 )2 (1 + ε) . The proof can thereby be completed by adding over these contributing O(σn (β1 , β2 )) distinct pairs (h1 , h2 ). √ For a fixed h̄ > Cn σn (β1 , β2 ) log n (to be decided on later), consider any Cn σn (β1 , β2 ) h∗ = p log n ≤ h ≤ h̄, and let for any h1 > 0 h∗1 (h1 ) h(β1 σn1 )2 , σn (β1 , β2 )2   h∗ + h1 = µn1 + , β1 and     h + β1 (µn1 − h∗1 (h1 )) h + β1 (µn1 − h∗1 (h1 )) t (h1 ) = β2 µn2 + − µn2 + . β2 β2 ∗ (7.5)  We will need the fact that µn2 + h+β1 (µn1 −h∗1 (h1 )) β2  ≥ 0 which is guaranteed by the next easy to show lemma whose proof is omitted. Lemma 7.2. For n sufficiently large (depending on β1 , β2 ) µn2 + h+β1 (µn1 −h∗1 (h1 )) β2 ≥ 0. l m ∗ 1 We can now proceed as follows. Note that with δn (h1 ) = µn1 + h β+h − µn1 + 1   ∗ β δ (h ) 1 e 1 + h1 ∗n+h11 one has by Theorem 1.5 of Bollobás (2001) h(h1 ) = h β+h 1 P (X = h∗1 (h1 ))   h∗ + h1 = P X = µn1 + + δn β1   = P X = µn1 + e h(h1 )    e h(h1 )p1 2q1 e h(h1 )2 q1 2 e 1 + + + 2 2 1 h(h1 )   q1 n1 3p1 n1  e h(h1 )  ≥√ exp − , n1 p1 q1 1 1 2p1 q1 n1 2πp1 q1 n1 + h∗ (h1 ) + n1 −h∗ (h1 ) e 2 1 1 6h(h1 ) where n1 = n/2, p1 = a0 /n and q1 = 1 − a0 /n. Now it is easy to see that ! ! ! e e e h(h1 )p1 h(h1 )2 h(h1 )a0 2q1e h(h1 )2 q1 1 =O , =O , =O , e e q1 n 1 n2 (a0 )2 3p21 n21 h(h1 ) h(h1 ) !   a0 1 1 n 1 p 1 q1 + =O , h∗1 (h1 ) n1 − h∗1 (h1 ) 6e h(h1 )2 h∗1 (h1 )e h(h1 )2 h∗ +h1 β1 and 34 where the O-notations involve universal constants free from β1 , β2 , Cn . If h̄, h1 is such that, √ σn1 σn2 h̄  a0 , h1 ≤ β1 2π , (7.6) σn (β1 , β2 ) then since b0  log n, we have for any ε > 0, sufficiently large n (depending on M and ε > 0)   (h∗ )2 1 1/2 ∗ p . (7.7) exp − (1 + ε) P (X = h1 (h1 )) ≥ 2 2(β1 σn1 )2 2πσn1 Similarly for n2 = n/2, p2 = b0 /n and q2 = 1 − b0 /n and any m ∈ N one has   h + t∗ (h1 ) + β2 m + β1 (µn1 − h∗1 (h1 )) P Y = µn2 + β2     ∗ h − (h + h1 ) − β1 δn (h1 ) = Y = µn2 + +m β2   = P Y = µn2 + e h(m) ,   β1 l m 0 (h ) δ (h )−β2 m−β2 δn 1 h−(h∗ +h1 ) h−(h∗ +h1 )−β1 δn (h1 ) β2 n 1 0 (h ) = µ e where h(m) = with δ + − 1 − ∗ 1 n2 n β2 β2 h−(h +h1 )   ∗ 1 δn (h1 ) . Therefore, once again by Theorem 1.5 of Bollobás (2001) µn2 + h−(h +h1β)−β 2   P Y = µn2 + e h(m)   e 2 2 e 1 + h(m)p 1 h(m) q2 n2 +   ≥√ exp − 1 2p2 q2 n2 2πp2 q2 n2 + + e µn2 +h(m) 2q2 e h(m)2 + e q2 3p22 n22 h(m) n2 p2 q2 1 n1 −µn2 −e h(m) 6e h(m)2   Now it is easy to see that ! ! e 2q2e q2 1 h(m)2 h(m)2 , , , =O =O e e (b0 )2 3p22 n22 h(m) h(m) ! ! 1 b0 1 n 2 p 2 q2 + =O , µn2 + e h(m) n2 − µn2 − e h(m) 6e h(m)2 (µn2 + e h(m))e h(m)2 e h(m)p2 =O q2 n 2 e h(m)b0 n2 ! where the O-notations involve universal constants free from β1 , β2 , Cn . If h̄, h1 , m is such that, √ σn1 σn2 , m ≤ σn2 , h̄  a0 , h1 ≤ β1 2π σn (β1 , β2 ) (7.8) then since b0  log n, we have for any ε > 0, sufficiently large n (depending on M and ε > 0)     1 (h − h∗ )2 1/2 P Y = µn2 + e h(m) ≥ p exp − (1 + ε) . (7.9) 2 2(β2 σn2 )2 2πσn2 Combining (7.7) and (7.9), we have that under the common conditions (7.6), (7.8)     1 h2 ∗ 1/2 e P (X = h1 (h1 )) P Y = µn2 + h(m) ≥ exp − (1 + ε) . 2πσn1 σn2 2σn (β1 , β2 )2 DEGREE CORRECTIONS FOR SBM 35 h i √ σn2 ∗ Now for each h1 ⊆ 0, β1 2π σσnn1 (β1 ,β2 ) ∩ β1 N the number of h1 (h1 ) is distinct and β1 h∗1 (h1 ) + β2 µn2 + e h(m) − µn (β1 , β2 ) ∈ (h, h + 3mβ2 ). Therefore we can choose m = 1 to complete the proof of claim (7.4). Proof of Lemma 5.1 Part 2b: Recall the proof of Part (a, ii) and Fix a sequence δn∗ satisfying (i) and (ii) of Lemma 7.1. Then   p P d0 (β1 , β2 ) > Cn σn (β1 , β2 ) log n p ≤ P(β1 X 0 + β2 Y 0 > tn (δn∗ )) + P(d(β1 , β2 ) > Cn σn (β1 , β2 ) log n − tn (δn∗ )) √ √ ∗ ∗ ∗ where tn (δn∗ ) = δn∗ σn (β√ 1 , β2 ) log n . Now by our choice of δn we have Cn σn (β1 , β2 ) log n−tn (δn ) = Cn (1+o(1))σn (β1 , β2 ) log n. Moreover, similar to the proof of Part (a,ii) , by Bernstein’s Inequality for θ > 0 one has for n large enough (depending on θ, β1 , β2 , τa , τb )  P β1 X 0 + β2 Y 0 > tn (δn∗ ) ≤ n−θ . Therefore by Part (b, ii) we have by choosing θ > 2C   p C2 P d0 (β1 , β2 ) > Cn σn (β1 , β2 ) log n ≤ n− 2 +o(1) . The lower bound is trivial from Part (b, ii) since d0 (β1 , β2 ) ≥ d(β1 , β2 ). 2 = Var(X), 7.2. Proof of Lemma 5.2. Recall the definitions µn1 = E[X], µn2 = E[Y ], σn1 2 = Var(Y ) and µ (β , β ) = E(β X + β Y ) and σ (β , β ) = Var(β X + β Y ). For brevity, we σn2 n 1 2 1 2 n 1 2 1 2 let µn = µn (1, 1) and σn = σn (1, 1). Let H = {h > 0: µn + h ∈ N}. Thus P[X + Y > µn + σn xn ] = 2 P σn1 ∗ h∈H :h>σn xn P[X + Y = µn + h]. Let H1 = {h: µn1 + h ∈ N} and set h1 = inf{h ∈ H1 : h > σn xn }. Thus we have, for h ∈ H , X P[X + Y = µn + h] = P[X = µn1 + h1 ]P[Y = µn2 + (h − h1 )] h1 ∈H1 h∗1 +m∗ (7.10) ≥ X P[X = µn1 + h1 ]P[Y = µn2 + (h − h1 )], h1 =h∗1 for some m∗ to be chosen appropriately. Using (Bollobás, 2001, Theorem 1.5), we have, P[X = µn1 + h1 ] ≥ √ h i h2 1 exp − 12 − ξ1n , 2σn1 2πσn1 for an explicit on h1 . Upon using the fact that a0 , b0  (log n)3 , √ sequence ξ1n (h1∗), depending h1 = O(σn 2 log n), for any m  h∗1 , it is immediate that ξ1n (h1 ) = o(1), uniformly over h∗1 < h1 < h∗1 + m∗ . Thus we have, P[X = µn1 + h1 ] ≥ (1 + o(1)) √ h 1 h2 i exp − 12 . 2σn1 2πσn1 36 Similar arguments immediately imply that for h∗1 < h1 < h∗1 + m1 , P[Y = µn2 + (h − h1 )] ≥ (1 + o(1)) √ h (h − h )2 i 1 1 . exp − 2 2σ 2πσn2 n2 √ Using these bounds in (7.10), for h = O(σn 2 log n), we obtain the lower bound h h2 i m∗ exp − 2 2πσn1 σn2 2σn h 2 1 h i = (1 + o(1)) √ exp − 2 , 2σn 2πσn P[X + Y = µn + h] ≥ (1 + o(1)) √ √ where we choose m∗ = 2πσn1 σn2 /σn  h∗1 . Finally, we have, setting Mn = σn C log n for some constant C sufficiently large, X P[X + Y > µn + σn xn ] ≥ P[X + Y = µn + h] h∈H :σn xn <h<Mn ≥ (1 + o(1)) √ 1 2πσn X h∈H :σn xn <h<Mn h h2 i exp − 2 ≥ (1 + o(1))(1 − Φ(xn )), 2σn if C is chosen sufficiently large. This establishes the required lower bound. Next, we turn to the upper bound. We have, X P[X + Y > µn + σn xn ] = P[X + Y = µn + h] h∈H :h>σn xn (7.11) X = √ h∈H :σn xn <h<σn C log n P[X + Y = µn + h] + X √ h∈H :h>σn C log n P[X + Y = µn + h], for some constant C > 0 sufficiently large, to be chosen later. We have, using Lemma 5.1 Part 2, we have, X C2 (7.12) P[X + Y = µn + h] ≤ n− 2 (1+o(1)) . √ h∈H :h>σn C log n Finally, we will use the following “local limit” lemma.   0  0 Lemma 7.3. Let X ∼ Bin n, an and Y ∼ Bin n, bn be independent random variables with 0 3 2 a0 ≥ b0 , lim inf b0 /a0 > 0. Assume √ b  (log n) and √ set µn = E[X + Y ], σn = Var(X + Y ). Then for any constant C > 2 and σn 2 log n < h < σn C log n, we have, for h ∈ H, h 1 h2 i P[X + Y = µn + h] ≤ (1 + o(1)) √ exp − 2 . 2σn 2πσn We defer the proof of Lemma 7.3 and complete upper bound proof. Lemma 7.3 immediately yields h X X 1 h2 i √ P[X + Y = µn + h] ≤ (1 + o(1)) exp − 2 . 2σn √ √ 2πσn h∈H :σn xn <h<σn C log n √ C log n h∈H :σn xn <h<σn C log n Z ≤ (1 + o(1)) φ(x)dx, xn 37 DEGREE CORRECTIONS FOR SBM √ where φ(·) is the density of the standard Gaussian distribution. We know that (1 − Φ( C log n)) ≤ √ C2 log n)−Φ(xn ) → 1 as n → ∞. For any such choice of C, we n− 2 . Thus for C sufficiently large, Φ( C1−Φ(x n) immediately have, using (7.11) and (7.12), P[X + Y > µn + σn xn ] ≤ (1 + o(1))(1 − Φ(xn )) + n− C2 (1+o(1)) 2 = (1 + o(1))(1 − Φ(xn )). This completes the proof modulo proof of Lemma 7.3. √ σ σ 2 /σ 2 , and m∗ = n2 Proof of Lemma 7.3. We have, for h ∈ H , setting h∗1 = hσn1 2π n1 n 2σn , X P[X = µn1 + h1 , Y = µn2 + h − h1 ] = T1 + T2 + T3 , P[X + Y = µn + h] = h1 ∈H1 X T1 = P[X = µn1 + h1 , Y = µn2 + h − h1 ], h1 ∈H1 :h1 <h∗1 −m∗ X T2 = P[X = µn1 + h1 , Y = µn2 + h − h1 ], h1 ∈H1 :h∗1 −m∗ <h1 <h∗1 +m∗ X T3 = P[X = µn1 + h1 , Y = µn2 + h − h1 ], h1 ∈H1 :h1 >h∗1 +m∗ √ First, we analyze the term T2 . (Bollobás, 2001, Theorem 1.2) implies that for h1 = O(σn1 log n), h i 1 h2 P[X = µn1 + h1 ] < √ exp − 12 + ξn (1) , 2σn1 2πσn1 √ for an explicit sequence ξn (1). Using a0 ≥ b0  (log n)3 , and h = O(σn log n) it immediately follows that ξ1 (n) = o(1). Using similar arguments for P[Y = µ2n + h − h1 ] , we obtain that h X 1 h2 (h − h1 )2 i T2 ≤ (1 + o(1)) exp − 12 − 2 2πσn1 σn2 2σn1 2σn2 ∗ ∗ ∗ ∗ h1 ∈H1 :h1 −m <h1 <h1 +m ≤ (1 + o(1)) √ h 1 h2 i exp − 2 =: (1 + o(1))zn , 2σn 2πσn using the definition of h∗1 . We will be done once we establish T1 , T3 = o(zn ). We will sketch this proof for T3 — the argument for T1 is analogous and will be omitted. We note that X T3 = P[X = µ1 + h1 , Y = µ2 + h − h1 ] h∈H1 :h∗1 +m∗ <h1 <xn σn1 (1+τn ) (7.13) + X P[X = µn1 + h1 , Y = µn2 + (h − h1 )], h∈H1 :h1 >xn σn1 (1+τn ) for some sequence τn > 0 to be chosen appropriately. We will establish that each of these terms is o(T2 ). To this end, we note that X P[X = µn1 + h1 , Y = µn2 + (h − h1 )] ≤ P[X > µn1 + σn1 xn (1 + τn )] sup P[Y = x]. x h∈H1 :h1 >xn σn1 (1+τn ) By direct computation, it is easy to see that supx P[Y = x] = O( √1 0 ). Using the results in (Mukherb jee, Mukherjee and Sen, 2016, Lemma 6.2), we have, 2 (1+o(1)) P[X > µn1 + σn1 xn (1 + τn )] ≤ n−(1+τn ) . 38 Thus for any sequence τn > 0 such that lim inf τn > 0, the second term in (7.13) √ is o(zn ). Next, we study the first term  in the RHS of (7.13). We note that σn ≥ σn1 , h< σn C log n implies  √ √ σ √ n1 log nσ C − 2 h−xn σn1 (1+τn ) ≥ xn σn 1− σσn1 (1+τ ) and h−x σ (1+τ ) ≤ (1+τ ) . n n n1 n n n σn n √ This implies that h − xn σn1 (1 + τn ) = O( log nσn ) for some sequence τn sufficiently small. We will fix any such sequence in the rest of the proof. For any such h∗1 + m∗ < h1 < xn σn (1 + τn ), (Bollobás, 2001, Theorem 1.2) implies that h i 1 h2 P[X = µn1 + h1 ] ≤ √ exp − 12 + ξn (1, h1 ) , 2σn1 2πσn1 for some explicit sequence ξn (1, h1 ), depending on h1 . Further, a0 , b0  (log n)3 and h∗1 + m∗ < h1 < xn σn1 (1 + τn ) implies that h 1 h2 i P[X = µn1 + h1 ] ≤ (1 + o(1)) √ exp − 12 . 2σn1 2πσn1 where o(1) is a term uniformly controlled for all h∗1 + m∗ < h1 < xn σn (1 + τn ). Exactly analogous considerations imply that h (h − h )2 i 1 1 P[Y = µn2 + h − h1 ] ≤ (1 + o(1)) √ exp − . 2 2σ 2πσn2 n2 Thus we have, X P[X = µ1 + h1 , Y = µ2 + h − h1 ] h∈H1 :h∗1 +m∗ <h1 <xn σn1 (1+τn ) h∈H1 :h∗1 +m∗ <h1 <xn σn1 (1+τn ) h 1 ≤ (1 + o(1)) √ exp − 2πσn h 1 exp − ≤ (1 + o(1)) √ 2πσn where we set σ02 = 2 σ2 σn1 n2 . 2 σn h h2 (h − h1 )2 i exp − 12 − . 2 2σn1 2σn2 1 X ≤ (1 + o(1)) 2 i h2 σn1 2σn2 h2 σ 2 i n1 2σn2 Z 2πσn1 σn2 xn σn1 (1+τn ) h∗1 +m∗ hσ 2 h (x − σ2 0 )2 i 1 n2 √ exp − dx 2σ02 2πσ0 = o(zn ), This completes the proof. 8. Proof of Technical Lemmas. 8.1. Proof of Lemma 5.3. Let A = {(t1 , t2 ) ∈ N2 : 0 ≤ t1 ≤ n1 , 0 ≤ t2 ≤ n2 , β1 t1 + β2 t2 ∈ B}.  E α1X α2Y 1 (β1 X + β2 Y ∈ B) X n1 n2  = α1t1 α2t2 pt11 pt22 (1 − p1 )n1 −t1 (1 − p2 )n2 −t2 t1 t2 (t1 ,t2 )∈A X n1 n2  = (α1 p1 )t1 (α2 p2 )t2 (1 − p1 )n1 −t1 (1 − p2 )n2 −t2 t1 t2 (t1 ,t2 )∈A      α1 p1 t1  α2 p2 t2 n1 n2  X  t2 t1 1−p1 +α1 p1 1−p2 +α2 p2 n1 n2     = (1 − p1 + α1 p1 ) (1 − p2 + α2 p2 ) n1 −t1 n2 −t2 p2 α1 p 1  × 1−  1 − 1−pα22+α (t1 ,t2 )∈A 1−p1 +α1 p1 p 2 2 = (1 − p1 + α1 p1 )n1 (1 − p2 + α2 p2 )n2 P(β1 X 0 + β2 Y 0 ∈ B). 39 DEGREE CORRECTIONS FOR SBM 8.2. Proof of Proposition 6.4. We analyze each term in turn. In the analysis, since µ0n1 (C), µ0n2 (C), and σn0 (C, β1 , β2 ) do not depend on C we simply refer to them as µ0n1 , µ0n2 , and σn0 (β1 , β2 ). (C) Analysis of EΘ,a,b (HC(C, β1 , β2 ; t)) We have, for i1 ∈ S1 , i2 ∈ S2 , j1 ∈ S1c , and j2 ∈ S2c , (C) EΘ,a,b (HC(C, β1 , β2 ; t)) (C) (C) = s1 PΘ,a,b (Di1 (C, β1 , β2 ) > t) + s2 PΘ,a,b (Di2 (C, β1 , β2 ) > t) (C) (C) (C) + (n/2 − s1 )PΘ,a,b (Dj1 (C, β1 , β2 ) > t) + (n/2 − s2 )PΘ,a,b (Dj2 (C, β1 , β2 ) > t) − nP1,a,b (D1 > t)   (C) (C) ≥ s1 PΘ,a,b (Di1 (C, β1 , β2 ) > t) − P1,a,b (D1 (C, β1 , β2 ) > t)   (C) (C) + s2 PΘ,a,b (Di1 (C, β1 , β2 ) > t) − P1,a,b (D1 (C, β1 , β2 ) > t) . Now note that (C) PΘ,a,b (Di1 (C, β1 , β2 ) > t)   p (C) = PΘ,a,b β1 di1 (1) + β2 di1 (2) − β1 µ0n1 − β2 µ0n2 > 2r log nσn0 (β1 , β2 )   p ≥ P β1 X + β2 Y − β1 µ0n1 − β2 µ0n2 > 2r log nσn0 (β1 , β2 ) √   β1 X + β2 Y − µn (β1 , β2 ) 2r log nσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 − µn (β1 , β2 ) =P > σn (β1 , β2 ) σn (β1 , β2 )   where X ∼ Bin n/2 − s1 , (1 + A) na ⊥ Y ∼ Bin n/2 − s2 , (1 + A) nb , µn (β1 , β2 ) = E (β1 X + β2 Y ) and σn (β1 , β2 ) = Var (β1 X + β2 Y ). Since √ p p √ 2r log nσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 − µn (β1 , β2 ) ∼ ( 2r − C ∗ ρ(β1 , β2 )) log n, σn (β1 , β2 ) and r > C ∗ ρ(β1 ,β2 ) , 2 we have by an application of Lemma 5.1 Part (b, i) 2 √ √ 2r− C ∗ ρ(β1 ,β2 ) /2+o(1) (C) PΘ,a,b (Di1 (C, β1 , β2 ) > t) = n By exactly similar arguments the following also hold √ (C) PΘ,a,b (Di2 (C, β1 , β2 ) > t) = n 2r− √ 2 C ∗ ρ(β1 ,β2 ) /2+o(1) , (C) P1,a,b (D1 (C, β1 , β2 ) > t) = n−r+o(1) . Therefore (C) EΘ,a,b (HC(C, β1 , β2 ; t))  √ √  2 − 2r− C ∗ ρ(β1 ,β2 ) /2+o(1) −r+o(1) ≥ max{s1 , s2 } n −n ≥n √ 2 √ 1−α− 2r− C ∗ ρ(β1 ,β2 ) /2+o(1) . This completes the proof of (6.8). (C) Analysis of VarΘ,a,b (HC(C, β1 , β2 ; t)) We begin by the following basic decomposition of the variance between diagonal and off-diagonal terms. (C) VarΘ,a,b (HC(C, β1 , β2 ; t)) : = 5 X i=1 Ti , (8.1) 40 T1 = (s1 − 1)a(s1 ) (t)(1 − a(s1 ) (t)) + (s2 − 1)a(s2 ) (t)(1 − a(s2 ) (t)), T2 = (n/2 − s1 )a(n/2−s1 ) (t)(1 − a(n/2−s1 ) (t)) + (n/2 − s2 )a(n/2−s2 ) (t)(1 − a(n/2−s2 ) (t)), T3 = s1 (s1 − 1)(b(s1 ) (t) − (a(s1 ) (t))2 ) + s2 (s2 − 1)(b(s2 ) (t) − (a(s2 ) (t))2 ) + s1 s2 (b(s1 ,s2 ) (t) − a(s1 ) (t)a(s2 ) (t)), T4 = (n/2 − s1 )(n/2 − s1 − 1)(b(n/2−s1 ) (t) − (a(n/2−s1 ) (t))2 ) + (n/2 − s2 )(n/2 − s2 − 1)(b(n/2−s2 ) (t) − (a(n/2−s2 ) (t))2 ) + (n/2 − s1 )(n/2 − s2 )(b(n/2−s1 ,n/2−s2 ) (t) − a(n/2−s1 ) (t)a(n/2−s2 ) (t)), T5 = s1 (n/2 − s1 )(b(s1 ,n/2−s1 ) (t) − a(s1 ) (t)a(n/2−s1 ) (t)) + s2 (n/2 − s2 )(b(s2 ,n/2−s2 ) (t) − a(s2 ) (t)a(n/2−s2 ) (t)) + s1 (n/2 − s2 )(b(s1 ,n/2−s2 ) (t) − a(s1 ) (t)a(n/2−s2 ) (t)) + s2 (n/2 − s1 )(b(s2 ,n/2−s1 ) (t) − a(s2 ) (t)a(n/2−s1 ) (t)), where for l, l1 6= l2 ∈ {1, 2}, (C) i ∈ Sl , (C) i ∈ Slc , a(sl ) (t) = PΘ,a,b (Di (C, β1 , β2 ) > t) , a(n/2−sl ) (t) = PΘ,a,b (Di (C, β1 , β2 ) > t) , (C) b(sl ) (t) = PΘ,a,b (Di (C, β1 , β2 ) > t, Dj (C, β1 , β2 ) > t), b(n/2−sl ) (t) = (C) PΘ,a,b (Di (C, β1 , β2 ) (C) PΘ,a,b (Di (C, β1 , β2 ) (i, j) ∈ Sl × Sl , > t, Dj (C, β1 , β2 ) > t), (i, j) ∈ Slc × Slc , > t, Dj (C, β1 , β2 ) > t), (i, j) ∈ Sl1 × Sl2 , b(sl1 ,n/2−sl2 ) (t) = PΘ,a,b (Di (C, β1 , β2 ) > t, Dj (C, β1 , β2 ) > t), (C) (i, j) ∈ Sl1 × Slc2 , (C) (i, j) ∈ Slc1 × Slc2 . b(sl1 ,sl2 ) (t) = b(n/2−sl1 ,n/2−sl2 ) (t) = PΘ,a,b (Di (C, β1 , β2 ) > t, Dj (C, β1 , β2 ) > t), the control of the various terms above is achieved by the following lemma. Lemma 8.1. Let τa = τb = 0 For t = √ 2r log n with r > C ∗ ρ(β1 ,β2 ) , 2 we have for any  > 0 2 p 1 √ log T1 log T2 =1−α− 2r − C ∗ ρ(β1 , β2 ) , = 1 − r, lim n→∞ n→∞ log n 2 log n 2 √ p log T3 log T4 lim 2r − C ∗ ρ(β1 , β2 ) (1 − ε), lim ≤ 1 − 2α − ≤ 1 − 2r(1 − ε), n→∞ log n n→∞ log n    2 p log T5 1 √ lim ≤1−α− 2r − C ∗ ρ(β1 , β2 ) + r (1 − ε). n→∞ log n 2 lim We note that Lemma 8.1 indeed verifies (6.9) by taking  > 0 small enough. Also this verifies (6.7) by taking C ∗ = 0 in Lemma 8.1. Proof of Lemma 8.1. We will constantly use the following simple identity. Lemma 8.2. For real numbers p, x1 , x2 , y1 , y2 px1 x2 + (1 − p)y1 y2 − (px1 + (1 − p)y1 )(px2 + (1 − p)y2 ) = p(1 − p)(x1 − y1 )(x2 − y2 ). DEGREE CORRECTIONS FOR SBM Control of T1 . 41 Note that for l ∈ {1, 2} and i ∈ Sl  (C) a(sl ) (t) = PΘ,a,b β1 di (1) + β2 di (2) > tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 , where β1 di (1)+β2 di (2) ∼ β1 (Z11 +Z12 )+β2 (Z21 +Z22 ) with the following independent components  a Z11 ∼ Bin sl − 1, (1 + A)2 , n  a Z12 ∼ Bin n/2 − sl , (1 + A) , n   b , Z21 ∼ Bin n/2 − sl0 , (1 + A) n   2b Z22 ∼ Bin sl0 , (1 + A) , n for l0 6= l ∈ {1, 2}. To operationalize Lemma 5.1, note that tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 − (n/2 − sl )(1 + A) na − (n/2 − sl0 )(1 + A) nb q   (n/2 − sl )(1 + A) na 1 − (1 + A) na + (n/2 − sl0 )(1 + A) nb 1 − (1 + A) nb √  p p = 2r − C ∗ ρ(β1 , β2 ) (1 + o(1)) log n. Therefore, applying Lemma 5.1 Part (b, ii), 2 p log T1 1 √ 2r − C ∗ ρ(β1 , β2 ) . =1−α− n→∞ log n 2 lim Control of T2 . Note that for l ∈ {1, 2} and i ∈ Slc  (C) a(n/2−sl ) (t) = PΘ,a,b β1 di (1) + β2 di (2) > tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 , where β1 di (1)+β2 di (2) ∼ β1 (Z11 +Z12 )+β2 (Z21 +Z22 ) with the following independent components  a Z11 ∼ Bin sl , (1 + A) , n  a Z12 ∼ Bin n/2 − sl − 1, , n  b Z21 ∼ Bin n/2 − sl0 , , n   b Z22 ∼ Bin sl0 , (1 + A) , n for l0 6= l ∈ {1, 2}. To operationalize Lemma 5.1, note that tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 − (n/2 − sl − 1) na − (n/2 − sl0 ) nb q   (n/2 − sl − 1) na 1 − na + (n/2 − sl0 ) nb 1 − nb p √ = 2r(1 + o(1)) log n. Therefore, applying Lemma 5.1 Part (b, ii), lim n→∞ log T2 = 1 − r. log n 42 Control of T3 . Similar to Mukherjee, Mukherjee and Sen (2016), we begin by noting the following simple identities followed by local central limit theorem type estimates. However, in order to deal with arbitrary linear combinations, one need more detailed computations and uniform control of local central limit type estimates. Fix (i, j) ∈ Sl × Sl for l ∈ {1, 2}. Then we have   a a 0 00 b(sl ) (t) = (1 + A)2 (a(sl ) (t))2 + 1 − (1 + A)2 (a(sl ) (t))2 , n n   a a 0 00 a(sl ) (t) = (1 + A)2 (a(sl ) (t)) + 1 − (1 + A)2 (a(sl ) (t)), n n where  0 (C) a(sl ) (t) = PΘ,a,b β1 d0i (1) + β2 di (2) > tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 − β1 ,  00 (C) a(sl ) (t) = PΘ,a,b β1 d0i (1) + β2 di (2) > tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 , P where d0i (1) = Yit Therefore using Lemma 8.2 for l ∈ {1, 2} we have (8.2) t∈C(i): t6=j sl (sl − 1)(b(sl ) (t) − (a(sl ) (t))2 ) = sl (sl − 1)(1 + A)2  2 a   (sl )0 a 00 1 − (1 + A)2 a (t) − a(sl ) (t) . n n (8.3) Now note that for l ∈ {1, 2}   0 00 (C) a(sl ) (t) − a(sl ) (t) = PΘ,a,b β1 d0i (1) + β2 di (2) > tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 − β1  (C) − PΘ,a,b β1 d0i (1) + β2 di (2) > tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2  (C) ≤ const · sup PΘ,a,b β1 d0i (1) + β2 di (2) = tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 + ξ , |ξ|≤β1 (8.4) where const depends only on β1 , β2 . Now β1 d0i (1) + β2 di (2) ∼ 4 P Zk with independent components k=1  a , Z1 ∼ Bin sl − 2, (1 + A)2 n  a Z2 ∼ Bin n/2 − sl , (1 + A) , n  b Z3 ∼ Bin n/2 − sl0 , (1 + A) , n   b Z4 ∼ Bin sl0 , (1 + A)2 , n (8.5) for l0 6= l ∈ {1, 2}. Further note that tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 − (n/2 − sl )(1 + A) na − (n/2 − sl0 )(1 + A) nb q   (n/2 − sl )(1 + A) na 1 − (1 + A) na + (n/2 − sl0 )(1 + A) nb 1 − (1 + A) nb √  p p = 2r − C ∗ ρ(β1 , β2 ) (1 + o(1)) log n. (8.6) 43 DEGREE CORRECTIONS FOR SBM Similarly for (i, j) ∈ Sl1 × Sl2 for l1 6= l2 ∈ {1, 2} (sl1 ,sl2 ) b   b b 00 00 2 (sl1 ,sl2 )0 (sl2 ,sl1 )0 2 (t)a (t)) + 1 − (1 + A) (a(sl1 ,sl2 ) (t)a(sl2 ,sl1 ) (t)), (t) = (1 + A) (a n n where  0 (C) a(sl1 ,sl2 ) (t) = PΘ,a,b β1 di (1) + β2 d0i (2) > tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 − β2 ,  00 (C) a(sl1 ,sl2 ) (t) = PΘ,a,b β1 di (1) + β2 d0i (2) > tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 ,  0 (C) a(sl2 ,sl1 ) (t) = PΘ,a,b β1 dj (1) + β2 d0j (2) > tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 − β2 ,  00 (C) a(sl2 ,sl1 ) (t) = PΘ,a,b β1 dj (1) + β2 d0j (2) > tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 , P P where we define d0i (2) = Yit and d0j (2) = Yjt Therefore using Lemma 8.2 t∈C c (i): t6=j (8.7) t∈C c (j): t6=i s1 s2 (b(s1 ,s2 ) (t) − a(s1 ) (t)a(s2 ) (t))     0 00 0 00 2b 2b = s1 s2 (1 + A) 1 − (1 + A) a(s1 ,s2 ) (t) − a(s1 ,s2 ) (t) a(s2 ,s1 ) (t) − a(s2 ,s1 ) (t) . n n (8.8) Similar to before    0 00 (C) a(s1 ,s2 ) (t) − a(s1 ,s2 ) (t) ≤ const · sup PΘ,a,b β1 di (1) + β2 d0i (2) = tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 + ξ , |ξ|≤β1  )0 )00   (C) a(s2 ,s1 (t) − a(s2 ,s1 (t) ≤ const · sup PΘ,a,b β1 dj (1) + β2 d0j (2) = tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 + ξ . |ξ|≤β1 (8.9) where const depends only on β1 , β2 . 4 P Now β1 di (1) + β2 d0i (2) ∼ Zk with independent components k=1  a , Z1 ∼ Bin s1 − 1, (1 + A)2 n  a , Z2 ∼ Bin n/2 − s1 , (1 + A) n  b Z3 ∼ Bin n/2 − s2 , (1 + A) , n   2b Z4 ∼ Bin s2 , (1 + A) , n (8.10) and note that tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 − (n/2 − s1 )(1 + A) na − (n/2 − s2 )(1 + A) nb q   (n/2 − s1 )(1 + A) na 1 − (1 + A) na + (n/2 − s2 )(1 + A) nb 1 − (1 + A) nb √  p p = 2r − C ∗ ρ(β1 , β2 ) (1 + o(1)) log n. (8.11) 44 Similarly β1 dj (1) + β2 d0j (2) ∼ 4 P Zk with independent components k=1  a Z1 ∼ Bin s2 − 1, (1 + A)2 , n  a Z2 ∼ Bin n/2 − s2 , (1 + A) , n  b , Z3 ∼ Bin n/2 − s1 , (1 + A) n   2b Z4 ∼ Bin s1 , (1 + A) , n (8.12) and note that tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 − (n/2 − s2 )(1 + A) na − (n/2 − s1 )(1 + A) nb q   (n/2 − s2 )(1 + A) na 1 − (1 + A) na + (n/2 − s1 )(1 + A) nb 1 − (1 + A) nb √  p p = 2r − C ∗ ρ(β1 , β2 ) (1 + o(1)) log n. (8.13) Therefore, applying Lemma 5.1 Part (a, ii) along with (8.3), (8.4), (8.5), (8.6), (8.8), (8.9), (8.10), (8.11), (8.12), (8.13), we have for any fixed ε > 0 √ 2 p log T3 ≤ 1 − 2α − 2r − C ∗ ρ(β1 , β2 ) (1 − ε). lim n→∞ log n Control of T4 . The analysis of T4 is similar in philosophy to that of T3 and goes through a reduction to supremum of local central limit theorem type probability estimates for linear combination of independent Binomial random variables. However, since we need to control a similar term in the proof of Theorem 3.5, we present the control of T4 below. Fix (i, j) ∈ Slc × Slc for l ∈ {1, 2}. Then we have  a (n/2−sl )0 a  (n/2−sl )00 (n/2−sl ) 2 b (t) = (a (t)) + 1 − (a (t))2 , n n  a (n/2−sl )0 a  (n/2−sl )00 (n/2−sl ) a (t) = (a (t)) + 1 − (a (t)), n n where for (i, j) ∈ Slc × Slc  0 (C) a(n/2−sl ) (t) = PΘ,a,b β1 d0i (1) + β2 di (2) > tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 − β1 ,  00 (C) a(n/2−sl ) (t) = PΘ,a,b β1 d0i (1) + β2 di (2) > tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 . (8.14) Therefore using Lemma 8.2 for l ∈ {1, 2} we have (n/2 − sl )(n/2 − sl − 1)(b(n/2−sl ) (t) − (a(n/2−sl ) (t))2 ) 2 a   (n/2−sl )0 a 00 1− a (t) − a(n/2−sl ) (t) . = (n/2 − sl )(n/2 − sl − 1) n n (8.15) Now note that for l ∈ {1, 2} and (i, j) ∈ Slc × Slc    0 00 (C) a(n/2−sl ) (t) − a(n/2−sl ) (t) = PΘ,a,b β1 d0i (1) + β2 di (2) > tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 − β1 45 DEGREE CORRECTIONS FOR SBM (C) − PΘ,a,b β1 d0i (1) + β2 di (2) > tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2   (C) ≤ const · sup PΘ,a,b β1 d0i (1) + β2 di (2) = tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 + ξ , |ξ|≤β1 (8.16) where const depends only on β1 , β2 . Now β1 d0i (1) + β2 di (2) ∼ 4 P Zk with independent components k=1 a Z1 ∼ Bin sl , (1 + A) , n  a Z2 ∼ Bin n/2 − sl − 2, , n   b , Z3 ∼ Bin n/2 − sl0 , n   b Z4 ∼ Bin sl0 , (1 + A) , n  (8.17) for l0 6= l ∈ {1, 2}. Further note that tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 − (n/2 − sl − 2) na − (n/2 − sl0 ) nb q   (n/2 − sl − 2) na 1 − na + (n/2 − sl0 ) nb 1 − nb p √ = 2r(1 + o(1)) log n. (8.18) Similarly for (i, j) ∈ Slc1 × Slc2 for l1 6= l2 ∈ {1, 2} b (n/2−sl ,n/2−sl )0 (n/2−sl2 ,n/2−sl1 )0 2 (t)a 1 (a (t)) n   b 00 00 + 1− (a(n/2−sl1 ,n/2−sl2 ) (t)a(n/2−sl2 ,n/2−sl1 ) (t)). n b(n/2−sl1 ,n/2−sl2 ) (t) = where  0 (C) a(n/2−sl1 ,n/2−sl2 ) (t) = PΘ,a,b β1 di (1) + β2 d0i (2) > tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 − β2 ,  00 (C) a(n/2−sl1 ,n/2−sl2 ) (t) = PΘ,a,b β1 di (1) + β2 d0i (2) > tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 ,  0 (C) a(n/2−sl2 ,n/2−sl1 ) (t) = PΘ,a,b β1 dj (1) + β2 d0j (2) > tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 − β2 ,  00 (C) a(n/2−sl2 ,n/2−sl1 ) (t) = PΘ,a,b β1 dj (1) + β2 d0j (2) > tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 , (8.19) P P where we define d0i (2) = Yit and d0j (2) = Yjt Therefore using Lemma 8.2 for l1 6= l2 ∈ t∈C c (i): t6=j t∈C c (j): t6=i {1, 2} we have s1 s2 (b(s1 ,s2 ) (t) − a(s1 ) (t)a(s2 ) (t))       (n/2−sl1 ,n/2−sl2 )0 (n/2−sl1 ,n/2−sl2 )00  a (t) − a (t) 2b 2b   = s1 s2 (1 + A) 1 − (1 + A) . n n  × a(n/2−sl2 ,n/2−sl1 )0 (t) − a(n/2−sl2 ,n/2−sl1 )00 (t)  (8.20) 46 Similar to before   00 0 a(n/2−s1 ,n/2−s2 ) (t) − a(n/2−s1 ,n/2−s2 ) (t)  (C) ≤ const · sup PΘ,a,b β1 di (1) + β2 d0i (2) = tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 + ξ , |ξ|≤β1  0 00 a(n/2−s2 ,n/2−s1 ) (t) − a(n/2−s2 ,n/2−s1 ) (t)   (C) ≤ const · sup PΘ,a,b β1 dj (1) + β2 d0j (2) = tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 + ξ . |ξ|≤β1 (8.21) where const depends only on β1 , β2 . 4 P Zk with independent components Now β1 di (1) + β2 d0i (2) ∼ k=1  a Z1 ∼ Bin s1 , (1 + A) , n  a , Z2 ∼ Bin n/2 − s1 − 1, n   b Z3 ∼ Bin n/2 − s2 , , n   b , Z4 ∼ Bin s2 , (1 + A) n (8.22) and note that tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 − (n/2 − s1 − 1) na − (n/2 − s2 ) nb q   (n/2 − s1 − 1) na 1 − na + (n/2 − s2 ) nb 1 − nb p √ = 2r(1 + o(1)) log n. Similarly β1 dj (1) + β2 d0j (2) ∼ 4 P (8.23) Zk with independent components k=1  a Z1 ∼ Bin s2 , (1 + A) , n  a Z2 ∼ Bin n/2 − s2 − 1, , n  b Z3 ∼ Bin n/2 − s1 , , n   b Z4 ∼ Bin s1 , (1 + A) , n (8.24) and note that tσn0 (β1 , β2 ) + β1 µ0n1 + β2 µ0n2 − (n/2 − s2 − 1) na − (n/2 − s1 ) nb q   (n/2 − s2 − 1) na 1 − na + (n/2 − s1 ) nb 1 − nb p √ = 2r(1 + o(1)) log n. (8.25) DEGREE CORRECTIONS FOR SBM 47 Therefore, applying Lemma 5.1 Part (a, ii) along with (8.15), (8.16), (8.17), (8.18), (8.20), (8.21), (8.22), (8.23), (8.24), (8.25), we have for any fixed ε > 0 log T4 ≤ 1 − 2r(1 − ε). n→∞ log n lim Control of T5 . The analysis of T5 is similar in philosophy to those of T3 and T4 , and goes through a reduction to supremum of local central limit theorem type probability estimates for linear combination of independent Binomial random variables. We therefore omit the details. References. Abbe, E. (2017). Community detection and stochastic block models: recent developments. ArXiv:1703.10146. Adamic, L. and Glance, N. (2005). The political blogosphere and the 2004 US election: divided they blog. In Proceedings of the 3rd international workshop on Link discovery. ACM. Arias-Castro, E., Candès, E. J. and Plan, Y. (2011). Global testing under sparse alternatives: ANOVA, multiple comparisons and the higher criticism. The Annals of Statistics 39 2533–2556. Arias-Castro, E. and Wang, M. (2015). The sparse Poisson means model. Electronic Journal of Statistics 9 2170– 2201. Barabási, A.-L. and Albert, R. (1999). Emergence of scaling in random networks. science 286 509–512. Barbour, A. D., Holst, L. and Janson, S. (1992). Poisson approximation. Clarendon Press Oxford. Bollobás, B. (2001). Random graphs 73. Cambridge university press. Donoho, D. L. and Jin, J. (2004). Higher criticism for detecting sparse heterogeneous mixtures. The Annals of Statistics 32 962–994. Fienberg, S. and Wasserman, S. (1981). An exponential family of probability distributions for directed graphs: Comment. Journal of the American Statistical Association 76 54-57. Gao, C., Ma, Z., Zhang, A. Y. and Zhou, H. H. (2016). Community Detection in Degree-Corrected Block Models. arXiv preprint arXiv:1607.06993. Holland, P., Laskey, K. and Leinhardt, S. (1983). Stochastic blockmodels: First steps. Social Networks 5 109137. Ingster, Y. I. and Suslina, I. A. (2003). Nonparametric goodness-of-fit testing under Gaussian models 169. Springer. Jin, J. (2015). Fast Community Detection by SCORE. The Annals of Statistics 43 57-89. Karrer, B. and Newman, M. E. (2011). Stochastic blockmodels and community structure in networks. Physical Review E 83 016107. Lei, J. (2016). A goodness-of-fit test for stochastic block models. The Annals of Statistics 44 401-424. Moore, C. (2017). The computer science and physics of community detection: landscapes, phase transitions, and hardness. arXiv:1702.00467. Mukherjee, R., Mukherjee, S. and Sen, S. (2016). Detection Thresholds for the β-Model on Sparse Graphs. The Annals of Statistics (to appear). Mukherjee, R., Pillai, N. S. and Lin, X. (2015). Hypothesis testing for sparse binary regression. The Annals of Statistics 43 352. Peixoto, T. P. (2015). Model selection and hypothesis testing for large-scale network models with overlapping groups. Physical Review X 5.1. Snijders, T. and Nowicki, K. (1997). Estimation and prediction for stochastic blockmodels for graphs with latent block structure. Journal of classification 14 75-100. Watts, D. J. and Strogatz, S. H. (1998). Collective dynamics of ‘small-world’networks. nature 393 440–442. Yan, X. (2016). Bayesian model selection of stochastic block models. In Advances in Social Networks Analysis and Mining (ASONAM). IEEE. Yan, X., Shalizi, C., Jensen, J. E., Krzakala, F., Moore, C., Zdeborová, L., Zhang, P. and Zhu, Y. (2014). Model selection for degree-corrected block models. Journal of Statistical Mechanics: Theory and Experiment 2014 P05007. Zhao, Y., Levina, E. and Zhu, J. (2012). Consistency of community detection in networks under degree-corrected stochastic block models. The Annals of Statistics 40 2266-2292. Department of Statistics Sequoia Hall 390 Serra Mall, Stanford, CA- 94305. E-mail: [email protected] [email protected]
10math.ST
Faster gaze prediction with dense networks and Fisher pruning Iryna Korshunova Alykhan Tejani Ferenc Huszár Twitter {ltheis,ikorshunova,atejani,fshuzar}@twitter.com arXiv:1801.05787v1 [cs.CV] 17 Jan 2018 Lucas Theis Abstract knowledge distillation [10] and pruning, we show that stateof-the-art performance can be achieved with a much faster architecture, achieving a 10x speedup for the same AUC performance. Secondly, we provide a principled derivation for the pruning method of Molchanov et al. [24], extend it, and show that our extension works well when applied to gaze prediction. Predicting human fixations from images has recently seen large improvements by leveraging deep representations which were pretrained for object recognition. However, as we show in this paper, these networks are highly overparameterized for the task of fixation prediction. We first present a simple yet principled greedy pruning method which we call Fisher pruning. Through a combination of knowledge distillation and Fisher pruning, we obtain much more runtime-efficient architectures for saliency prediction, achieving a 10x speedup for the same AUC performance as a state of the art network on the CAT2000 dataset. Speeding up single-image gaze prediction is important for many real-world applications, but it is also a crucial step in the development of video saliency models, where the amount of data to be processed is substantially larger. 2. Fast gaze prediction models Our models build on the recent state-of-the-art model DeepGaze II [20], which we first review before discussing our approach to speeding it up. The backbone of DeepGaze II is formed by VGG-19 [28], a deep neural network pre-trained for object recognition. Feature maps are extracted from several of the top layers, upsampled, and concatenated. A readout network with 1 × 1 convolutions and ReLU nonlinearities [25] takes in these feature maps and produces a single output channel, implementing a point-wise nonlinearity. This output is then blurred with a Gaussian filter, Gσ , followed by the addition of a center bias to take into account the tendencies of observers to fixate on pixels near the image center. This center bias is computed as the marginal log-probability of a fixation landing on a given pixel, log Q(x, y), and is dataset dependent. Finally, a softmax operation is applied to produce a normalized probability distribution over fixation locations, or saliency map: 1. Introduction The ability to predict the gaze of humans has many applications in computer vision and related fields. It has been used for image cropping [1], improving video compression [6], and as a tool to optimize user interfaces [31], for instance. In psychology, gaze prediction models are used to shed light on how the brain might process sensory information [17]. Recently, due to advances in deep learning, human gaze prediction has received large performance gains. In particular, reusing image representations trained for the task of object recognition have proven to be very useful [19, 20]. However, these networks are relatively slow to evaluate while many real-world applications require highly efficient predictions. For example, popular websites often deal with large amounts of images which need to be processed in a short amount of time using only CPUs. Similarly, improving video encoding with gaze prediction maps requires the processing of large volumes of data in near realtime. In this paper we explore the trade-off between computational complexity and gaze prediction performance. Our contributions are two-fold: First, using a combination of Q(x, y | I) ∝ exp (R(U (F (I))) ∗ Gσ + log Q(x, y)) (1) Here, I is the input image, F extracts feature maps, U bilinearly upsamples the feature maps and R is the readout network. To improve efficiency, we made some minor modifications in our reimplementation of DeepGaze II. We first applied the readout network and then bilinearly upsampled the one-dimensional output of the readout network, instead of upsampling the high-dimensional feature maps. We also used separable filters for the Gaussian blur. To make sure the size of the saliency map matches the size of the input image, we upsample and crop the output before applying the softmax operation. 1 We use two basic alternative architectures providing different trade-offs between computational efficiency and performance. First, instead of VGG-19, we use the faster VGG-11 architecture [28]. As we will see, the performance lost by using a smaller network can for the most part be compensated by fine-tuning the feature map representations instead of using fixed pre-trained representations. Second, we try DenseNet-121 [11] as a feature extractor. DenseNets have been shown to be more efficient, both computationally and in terms of parameter efficiency, when compared to state-of-the-art networks in the object recognition task [11]. Even when starting from these more parameter efficient pre-trained models, the resulting gaze prediction networks remain highly over-parametrized for the task at hand. To further decrease the number of parameters we turn to pruning: greedy removal of redundant parameters or feature maps. In the following section we derive a simple, yet principled, method for greedy network pruning which we call Fisher pruning. the approximation " Hkk ≈ EP ∆k = (2) where I are inputs, z are outputs, and the expectation is taken with respect to some data distribution P . We first consider pruning single parameters θk . For any change in parameters d, we can approximate the corresponding change in loss with a 2nd order approximation around the current parameter value θ: H = ∇2 L(θ), 1 L(θ + d) − L(θ) ≈ g> d + d> Hd 2 N 1 2X 2 θk g , 2N n=1 nk ãnkij = mk ankij . (6) (7) (8) The gradient of the loss for the nth datapoint with respect to mk is X ∂ gnk = − ankij log Q(zn | In ) (9) ∂ankij ij (3) P 2 1 and the pruning signal is therefore ∆k = 2N n gnk , since m2k = 1 before pruning. The gradient with respect to the activations is available during the backward pass of computing the network’s gradient and the pruning signal can therefore be computed at little extra computational cost. We note that this pruning signal is very similar to the one used by Molchanov et al. [24] – which uses absolute gradients instead of squared gradients and a certain normalization of the pruning signal – but our derivation provides a more principled motivation. An alternative derivation which does not require P and Q to be close is provided in Supplementary Section 2. (4) Following this approximation, dropping the kth parameter (setting θk = 0) would lead to the following increase in loss: 1 L(θ − θk ek ) − L(θ) ≈ −gk θk + Hkk θk2 , 2 , where gn is the gradient of the parameters with respect to the nth data point. In what follows, we are going to use this as a pruning signal to greedily remove parameters one-byone where this estimated increase in loss is smallest. For convolutional architectures, it makes sense to prune entire feature maps rather than pruning individual parameters. Let ankij be the activation of the kth feature map at spatial location i, j for the nth datapoint. Let us also introduce a binary mask m ∈ {0, 1}K into the network which modifies the activations ankij of each feature map k as follows: Our goal is to remove feature maps or parameters which contribute little to the overall performance of the model. In this section, we consider the general case of a network with parameters θ trained to minimize a cross-entropy loss, g = ∇L(θ), 2 # which assumes that Qθ (z | I) is close to P (z | I) (see Supplementary Section 1 for a derivation). Eqn. (6) can be viewed as an empirical estimate of the Fisher information of θk , where an expectation over the model is replaced with real data samples. If Q and P are in fact equal and the model is twice differentiable with respect to parameters θ, the Hessian reduces to the Fisher information matrix and the approximation becomes exact. If we use N data points to estimate the Fisher information, our approximation of the increase in loss becomes 2.1. Fisher pruning L(θ) = EP [− log Qθ (z | I)] , ∂ log Qθ (z | I) ∂θk (5) where ek is the unit vector which is zero everywhere except at its kth entry, where it is 1. Following related methods which also start from a 2nd order approximation [21, 8], we assume that the current set of parameters is at a local optimum and that the 1st term vanishes as we average over a dataset of input images. In practice, we found that including the first term actually reduced the performance of the pruning method. For the diagonal of the Hessian, we use 2.2. Regularizing computational complexity In the previous section, we have discussed how to reduce the number of parameters or feature maps of a neural network. However, we are often more interested in reducing a 2 network’s computational complexity. That is, we are trying to solve an optimization problem of the form minimize L(θ) subject to C(θ) < K θ The ensemble of DeepGaze II models was used to generate an average saliency map for each image in the SALICON dataset. These saliency maps were then used for knowledge distillation [10]. This additional data allows us to not only train the readout network of our own models, but also fine-tune the underlying feature representation. We used a weighted combination of the cross-entropy for MIT1003 and the cross-entropy with respect to the DeepGaze II saliency maps, using weights of 0.1 and 0.9, respectively. After training our models to convergence, we start pruning the network. We accumulated pruning signals (Equation 7) for 10 training steps while continuing to update the parameters before pruning a single feature map. The feature map was selected to maximize the reduction in the combined cost (Equation 13). We tried using the combined cost (Equation 12) for early stopping to automatically determine an appropriate number of feature maps to prune, however, we found that early stopping terminated too early and we therefore opted to treat the number of pruned features as a hyperparameter which we optimized via random search. During the pruning phase we used SGD with a fixed learning rate of 0.0025 and momentum of 0.9, as we found that this led to slightly better results than using Adam. This may be explained by a regularizing effect of SGD [32]. (10) where θ here may contain the weights of a neural network but may also contain a binary mask describing its architecture. C measures the computational complexity of the network. During optimization, we quantify the computational complexity in terms of floating point operations. For example, the number of floating point operations of a convolution with a bias term, K × K filters, Cin input channels, Cout output channels, and producing a feature map with spatial extent H × W is given by H · W · Cout · (2 · Cin · K 2 + 1). (11) Since H and W represent the size of the output, this formula automatically takes into account any padding as well as the stride of a convolution. The total cost of a network is the sum of the cost of each of its layers. To solve the above optimization problem, we try to minimize the Lagrangian L(θ) + β · C(θ), (12) where β controls the trade-off between computational complexity and a model’s performance. We compute the cost of removing a parameter or feature map as 2.4. Related work Many recent papers have used pretrained neural networks as feature extractors for the prediction of fixations [19, 18, 20, 29, 23]. Most closely related to our work is the DeepGaze approach [19, 20]. In contrast to DeepGaze, here we also optimize the feature representations, which despite the limited amount of available fixation training data is possible because we use a combination of knowledge distillation and pruning to regularize our networks. Kruthiventi et al. [18] also tried to finetune a pretrained network by using a smaller learning rate for pretrained parameters than for other parameters. Vig et al. [30] trained a smaller network end-to-end but did not start from a pretrained representation and therefore did not achieve the performance of current state-of-the-art architectures. Similarly, Pan et al. [26] trained networks end-to-end while initializing only a few layers with parameters obtained from pretrained networks but have since been outperformed by DeepGaze II and other recent approaches. To our knowledge, none of this prior work has addressed the question of how much computation is actually needed to achieve good performance. Many heuristics have been developed for pruning [22, 7, 24]. More closely related to ours are methods which try to directly estimate the effect on the loss. Optimal brain damage [21], for example, starts from a 2nd order approximation of a squared error loss and computes second L(θ − θk ei ) − L(θ) + β · (C(θ − θk ei ) − C(θ)) , (13) where the reduction in loss is estimated as in the previous section. During training, we periodically estimate the cost of all feature maps and greedily prune feature maps which minimize the combined cost. By pruning a feature map, we expect the loss to go up but the computational cost to go down. For different β, different architectures will become optimal solutions of the optimization problem. 2.3. Training Our models were trained in several steps. First, we trained a DeepGaze II model using Adam [16] with a batch size of 8 and a learning rate of 0.001 which was slowly decreased over the course of training. As in [20], the model was first pre-trained using the SALICON dataset [13] while using the MIT1003 dataset [15] for validation. The validation data was evaluated every 100 steps and training was stopped when the cross-entropy on the validation data did not decrease 20 times in a row. The parameters with the best validation score observed until then were saved. Afterwards, the MIT1003 dataset was split into 10 training and validation sets and used to train 10 DeepGaze II models again with early stopping. 3 0.880 13.44 0.875 0.870 13.48 AUC Log-likelihood [nat] 13.40 13.52 13.56 13.60 0.860 DenseGaze121 DenseGaze121 (regularized) FastGaze11 FastGaze11 (regularized) DeepGaze II 62 125 250 500 Milliseconds 0.865 0.855 1000 2000 0.850 4000 DenseGaze121 DenseGaze121 (regularized) FastGaze11 FastGaze11 (regularized) DeepGaze II 62 125 250 500 Milliseconds 1000 2000 4000 Figure 1. Speed and performance of various models trained on MIT1003 and evaluated on the CAT2000 training set. Each point corresponds to a different architecture with a different number of pruned features and a different β. Solid lines mark Pareto optimal models. Regularized models were explicitly optimized to reduce the amount of floating point operations instead of optimizing the number of feature maps (β > 0). The x-axis shows speed measured on a CPU for a single image as input. Except for the log-likelihood of DenseGaze, explicitly regularizing computational performance made a big difference in terms of speed. We also find that pruned DenseGaze models generalize better to CAT2000 than DeepGaze II. 3. Experiments derivatives analytically by performing an additional backward pass. Optimal brain surgeon [8] extends this method and automatically tries to correct parameters after pruning by computing the full Hessian. In contrast, our pruning signal only requires gradient information which is already computed during the backward pass. This makes the proposed Fisher pruning not only more efficient but also easier to implement. We explored two basic architectures. First, we tried using the smaller VGG-11 variant of Simonyan et al. [28] for feature extraction. In contrast to the readout network of Kümmerer et al. [20], which took as input feature maps from 5 different layers, we only used the output of the last convolutional layer (“conv5 2”) as input. Extracting information from multiple layers is less important in our case, since we are also optimizing the parameters of the feature extraction network. As an alternative to VGG, we tried DenseNet-121 as a feature extractor [11], using the output of “dense block 3” as input to the readout network. In both cases, the readout network consisted of convolutions with parametric rectified linear units [9] and 32, 16, and 2 feature maps in the hidden layers. In the following, we will call the first network FastGaze and the second network DenseGaze. To find the optimal pruning parameters, we ran multiple experiments with a randomly sampled number of pruned features and a randomly chosen trade-off parameter β. The total number of feature maps is 2803 for FastGaze and 7219 for DenseGaze. β was chosen between 3e-5 and 3e-2. We evaluated each model in terms of log-likelihood and the commonly used metric of area under the curve (AUC). We used the publicly available CAT2000 [2] dataset for evaluation, which was not used during training of any of the models. While there are many ways to measure computational cost, we here were mostly interested in single-image performance on CPUs. We used a single core of an Intel Xeon E5-2620 (2.4GHz) and averaged the speed over 6 images of 384 x 512 pixels. Our implementation was written in PyTorch [27]. Figure 1 shows the performance of various models. In Most closely related to our pruning method is the approach of Molchanov et al. [24]. By applying heuristics to a 1st order approximation, they arrive at a very similar estimate of the change in loss due to pruning (we found that in practice, both estimates performed similarly). The main contribution in Section 2.1 is a new derivation which provides a more principled motivation for the pruning signal. Unlike most papers on pruning, Molchanov et al. [24] also explicitly regularized the computational complexity of the network. However, their approach used a fixed weight while pruning a different number of feature maps. In contrast, here we treat each setting of β as creating a separate optimization problem with its own optimal architecture. In practice, we find that the speed and architecture of a network is heavily influenced by the choice of β even when pruning the same number of feature maps, suggesting that using different weights is important. Molchanov et al. [24] further only estimated the computational cost of each feature map once before starting to prune. This leads to suboptimal pruning, as the computational cost of a feature map changes when neighboring layers are pruned. 4 Figure 2. The top graph visualizes the feature maps of the unpruned FastGaze model, while the remaining graphs visualize models pruned to different degrees. Labels indicate the number of feature maps. From top to bottom, the measured runtime for these models was 1.39s, 356ms, 258ms, and 91ms. For strongly regularized models, we observed a tendency to alternate between convolutions with many feature maps and convolutions with very few feature maps. The top left corner shows an example input image and ground truth fixations, while the right column shows saliency models generated by the different models. Despite a 15x difference in speed, the saliency maps are visually very similar. 5 Model Center Bias eDN [30] SalNet [26] DeepGaze I [19] SAM-ResNet [5] DSCLRCN DeepFix [18] SALICON [12] DeepGaze II [20] FastGaze DenseGaze terms of log-likelihood, we find that both FastGaze and DenseGaze generalize better to CAT2000 than our reimplementation of DeepGaze II, despite the fact that both models were regularized to imitate DeepGaze II. In terms of AUC, DeepGaze II performs slightly better than FastGaze but is outperformed by DenseGaze. Pruning only seems to have a small effect on performance, as even heavily pruned models still perform well. For the same AUC, we achieve a speedup of roughly 10x with DenseGaze, while in terms of loglikelihood even our most heavily pruned model yielded better performance (which corresponds to a speedup of more than 75x). Comparing DenseGaze and FastGaze, we find that while DenseGaze achieves better AUC performance, FastGaze is able to achieve faster runtimes due to its less complex architecture. We find that explicitly regularizing computational complexity is important. For the same AUC and depending on the amount of pruning, we observe speedups of over 2x for FastGaze when comparing regularized and non-regularized models. In Figure 2 we visualize some of the pruned FastGaze models. We find that at lower computational complexity, optimal architectures have a tendency to alternate between convolutions with large and small numbers of feature maps. This makes sense when only considering the computational cost of a convolutional layer (Equation 11), but it is interesting to see that such an architecture can still perform well in terms of fixation prediction, which requires the detection of various types of objects. Qualitative results are provided in Figure 3. Even at large reductions in computational complexity, the fixation predictions appear very similar. At a speedup of 39x compared to DeepGaze II, the saliency maps start to become a bit blurrier, but generally detect the same structures. In particular, the model still responds to faces, people, objects, signs, and text. To verify that our models indeed perform close to the state of the art, we submitted saliency maps to the MIT Saliency Benchmark [3, 14, 4]. We computed saliency maps for the MIT300 test set, which contains 300 more images of the same type as MIT1003. We evaluated a FastGaze model which took 356ms to evaluate in PyTorch, (2250 pruned features, β = 0.0001) and a DenseGaze model which took 577ms (2701 pruned features, β = 3 · 10−5 ). We find that both models perform only slightly below the state of the art when evaluated on MIT300 (Table 1). AUC 78% 82% 83% 84% 87% 87% 87% 87% 88% 85% 86% Table 1. Comparison of deep models evaluated on the MIT300 benchmark dataset. For reference, we also include the performance of a Gaussian center bias. Results of competing methods were obtained from the benchmark’s website [3]. trade-off between performance and computational complexity. With this we were able to show that the computational complexity of state-of-the-art saliency models can be drastically reduced while maintaining a similar level of performance. Together with a knowledge distillation approach, the reduced complexity allowed us to train the models endto-end and achieve good generalization performance. Less resource intensive models are of particular importance in applications where a lot of data is processed, as well as in applications running on resource constrained devices such as mobile phones. Faster gaze prediction models also have the potential to speed up the development of video models. The larger number of images to be processed in videos impacts training times, making it more difficult to iterate models. Another issue is that the amount of fixation training data in existence is fairly limited for videos. Smaller models will allow for faster training times and a more efficient use of the available training data. References [1] E. Ardizzone, A. Bruno, and G. Mazzola. Saliency Based Image Cropping, pages 773–782. Springer Berlin Heidelberg, 2013. 1 [2] A. Borji and L. Itti. CAT2000: A Large Scale Fixation Dataset for Boosting Saliency Research. CVPR 2015 workshop on ”Future of Datasets”, 2015. arXiv preprint arXiv:1505.03581. 4 [3] Z. Bylinskii, T. Judd, A. Borji, L. Itti, F. Durand, A. Oliva, and A. Torralba. MIT Saliency Benchmark. 6 [4] Z. Bylinskii, T. Judd, A. Oliva, A. Torralba, and F. Durand. What do different evaluation metrics tell us about saliency models? CoRR, abs/1604.03605, 2016. 6 [5] M. Cornia, L. Baraldi, G. Serra, and R. Cucchiara. Predicting human eye fixations via an lstm-based saliency attentive model. CoRR, abs/1611.09571, 2016. 6 4. Conclusion We have described a principled pruning method which only requires gradients as input, and which is efficient and easy to implement. Unlike most pruning methods, we explicitly penalized computational complexity and tried to find the architecture which optimally optimizes a given 6 Data DeepGaze II (3.59s) DenseGaze (577ms) FastGaze (356ms) FastGaze (91ms) Figure 3. Example saliency maps generated for images of the CAT2000 dataset. (The original images contained gray borders which were cropped in this visualization.) Intensities correspond to gamma-corrected fixation probabilities, where black and white correspond to the 1% and 99% percentile of saliency values for a given image, respectively. Saliency maps in the second column were generated by an ensemble of DeepGaze II models, but we report the time for a single model. Columns 3 and 4 show saliency maps of only slightly pruned DenseGaze and FastGaze models, while the last column shows saliency maps of a heavily pruned model. We find all models produce similar saliency maps. In particular, even the heavily pruned model (39x speedup compared to DeepGaze II) still responds to faces, people, other objects, and text. [6] Y. Feng, G. Cheung, W.-T. Tan, and Y. Ji. Gaze-driven video streaming with saliency-based dual-stream switching. In IEEE Visual Communications and Image Processing (VCIP), 2012. 1 [7] S. Han, J. Pool, J. Tran, and W. J. Dally. Learning both weights and connections for efficient neural networks. In Advances in Neural Information Processing Systems, 2015. 3 [8] B. Hassibi and D. G. Stork. Second order derivatives for network pruning: Optimal brain surgeon. In Advances in Neural Information Processing Systems, pages 164–171, 1993. 2, 4 [9] K. He, X. Zhang, S. Ren, , and J. Sun. Delving Deep into Rectifiers: Surpassing Human-Level Performance on Ima- [10] [11] [12] [13] 7 geNet Classification. In IEEE International Conference on Computer Vision (ICCV), 2015. 4 G. Hinton, O. Vinyals, and J. Dean. Distilling the Knowledge in a Neural Network. ArXiv e-prints, 2015. 1, 3 G. Huang, Z. Liu, L. van der Maaten, and K. Q. Weinberger. Densely connected convolutional networks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 2, 4 X. Huang, C. Shen, X. Boix, and Q. Zhao. SALICON: Reducing the semantic gap in saliency prediction by adapting deep neural networks. In The IEEE International Conference on Computer Vision (ICCV), 2015. 6 M. Jiang, S. Huang, J. Duan, and Q. Zhao. SALICON: [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] P. Xu, Y. Sugano, and A. Bulling. Spatio-temporal modeling and prediction of visual attention in graphical user interfaces. In Proceedings of the 2016 CHI Conference on Human Factors in Computing Systems, 2016. 1 [32] C. Zhang, S. Bengio, M. Hardt, B. Recht, and O. Vinyals. Understanding deep learning requires rethinking generalization. In International Conference on Learning Representations (ICLR), 2017. 3 Saliency in Context. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2015. 3 T. Judd, F. Durand, and A. Torralba. A benchmark of computational models of saliency to predict human fixations. Technical report, MIT technical report, 2012. 6 T. Judd, K. Ehinger, F. Durand, and A. Torralba. Learning to predict where humans look. In IEEE International Conference on Computer Vision (ICCV), 2009. 3 D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. In Proceedings of the 3rd International Conference on Learning Representations (ICLR), 2015. 3 C. Koch and S. Ullman. Shifts in selective visual attention: towards the underlying neural circuitry. Human Neurobiology, 4:219–227, 1985. 1 S. S. S. Kruthiventi, K. Ayush, and R. V. Babu. DeepFix: A Fully Convolutional Neural Network for Predicting Human Eye Fixations. In IEEE Transactions on Image Processing, volume 26, 2017. 3, 6 M. Kümmerer, L. Theis, and M. Bethge. Deep Gaze I: Boosting Saliency Prediction with Feature Maps Trained on ImageNet. In ICLR Workshop, May 2015. 1, 3, 6 M. Kümmerer, T. S. A. Wallis, and M. Bethge. DeepGaze II: Reading fixations from deep features trained on object recognition. ArXiv e-prints, Oct. 2016. 1, 3, 4, 6 Y. LeCun, J. S. Denker, and S. A. Solla. Optimal Brain Damage. In D. S. Touretzky, editor, Advances in Neural Information Processing Systems 2, pages 598–605. MorganKaufmann, 1990. 2, 3 H. Li, A. Kadav, I. Durdanovic, H. Samet, and H. P. Graf. Pruning filters for efficient convnets. In International Conference on Learning Representations (ICLR), 2017. 3 N. Liu and J. Han. A deep spatial contextual long-term recurrent convolutional network for saliency detection. CoRR, abs/1610.01708, 2016. 3 P. Molchanov, S. Tyree, T. Karras, T. Aila, and J. Kautz. Pruning convolutional neural networks for resource efficient inference. In International Conference on Learning Representations (ICLR), 2017. 1, 2, 3, 4 V. Nair and G. Hinton. Rectified linear units improve restricted boltzmann machines. In Proceedings of the 27th International Conference on Machine Learning, 2010. 1 J. Pan, E. Sayrol, X. Giro-i Nieto, K. McGuinness, and N. E. O’Connor. Shallow and deep convolutional networks for saliency prediction. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. 3, 6 PyTorch. https://github.com/pytorch. 4 K. Simonyan and A. Zisserman. Very Deep Convolutional Networks for Large-Scale Image Recognition. ArXiv eprints, Sept. 2014. 1, 2, 4 H. R. Tavakoli, A. Borji, J. Laaksonen, and E. Rahtu. Exploiting inter-image similarity and ensemble of extreme learners for fixation prediction using deep features. Neurocomputing, 244(Supplement C):10 – 18, 2017. 3 E. Vig, M. Dorr, and D. Cox. Large-Scale Optimization of Hierarchical Features for Saliency Prediction in Natural Images. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2014. 3, 6 8 S1 Details of Fisher pruning Under mild regularity conditions, the diagonal of the Hessian of the cross-entropy loss is given by ∂2 EP [− log Qθ (z | I)] ∂θk2   ∂ 1 ∂ = EP − Qθ (z | I) ∂θk Qθ (z | I) ∂θk   2 " 2 # ∂ Q (z | I) 2 θ ∂ ∂θ , log Qθ (z | I) − EP  k = EP ∂θk Qθ (z | I) Hkk = (14) (15) (16) where the last step follows from the quotient rule. For the second term we have " EP ∂2 ∂ 2 θk Qθ (z | I) Qθ (z | I) # P (I) P (z | I) ∂ 2 Qθ (z | I) d(I, z) Qθ (z | I) ∂θk2 (17) P (I) ∂2 Qθ (z | I) d(I, z) ∂θk2 (18) P (I)Qθ (z | I) d(I, z) (19) Z = Z ≈ = ∂2 ∂θk2 Z =0 (20) where we have assumed that Qθ (z | I) has been trained to convergence and is close to P (z | I). S2 Alternative derivation of Fisher pruning Let Qθ be our original model and Q̃θ,m be the pruned model, where we multiply the activations ankij by binary mask parameters mk ∈ {0, 1} as in Eqn. 8 of the main text. Pruning is achieved by setting mk = 0 for pruned features, and mk = 1 for features we wish to keep. We can define the cost of pruning as the extent to which it changes the model’s output, which can be measured by the KL divergence L(m) = N 1 X KL[Qθ (z | In ) || Q̃θ,m (z | In )]. N n=1 (21) This KL divergence can be approximated locally by a quadratic distance (the Fisher-Rao distance) as we will show below. First, note that when m = 1, Q̃θ,m ≡ Qθ , so the value of the KL divergence is 0, and its gradients with respect to both θ and m are exactly 0 as well. Thus, we can approximate L by its second-order Taylor-approximation around the unpruned model m = 1 as follows: L(m) ≈ 1 (m − 1)> H(m − 1), 2 (22) where H = ∇2 L(1) is the Hessian of L at m = 1. Pruning a single feature k amounts to setting mk = 1 − ek , where ek is the unit vector which is zero everywhere except at its ith entry, where it is 1. The cost of pruning a single feature k is then approximated as: `k = L(1 − ek ) ≈ 1 Hkk 2 (23) Under some mild conditions, the Hessian of L at m = 1 is the Fisher information matrix, which can be approximated by 9 the empirical Fisher information. In particular for the diagonal terms Hkk we have that: N h i ∂2 1 X 1 Hkk = − E log Q̃ (z | I ) Q θ,1 n θ,1 2 ∂m2k 2N n=1 " 2 # N 1 X ∂ = E log Q̃θ,1 (z | In ) 2N n=1 Q̃θ,1 ∂mk " 2 # N 1 X ∂ = EQ log Q̃θ,1 (z | In ) an,i,j,k 2N n=1 θ ∂ãn,i,j,k " 2 # N 1 X 2 ∂ a EQ log Qθ (z | In ) = 2N n=1 n,i,j,k θ ∂an,i,j,k  2 N 1 X 2 ∂ ≈ a log Qθ (zn | In ) 2N n=1 n,i,j,k ∂an,i,j,k = N 1 X 2 g , 2N n=1 nk (24) (25) (26) (27) (28) (29) where gnk is defined as in Eqn. 9 of the main text. 10
1cs.CV
arXiv:1710.06160v1 [cs.CV] 17 Oct 2017 Combining LiDAR Space Clustering and Convolutional Neural Networks for Pedestrian Detection Damien Matti1 , Hazım Kemal Ekenel1,2 , Jean-Philippe Thiran1 1 LTS5, EPFL, Lausanne, Switzerland 2 SiMiT Lab, ITU, Istanbul, Turkey [email protected], [email protected], [email protected] Abstract sensors are usually exploited on vehicles to cope with this task: cameras and LiDAR (Light Detection And Ranging). The purpose of the latter is to measure an accurate distance between the sensor and a target. In the case of autonomous vehicles, it provides the distance information of the surrounding obstacles according to the vehicle position. The latest LiDAR sensors can generate a dense 3-D point cloud. Using these sensors, two methods arise from the literature to solve the problem of pedestrian detection. The first one uses a LiDAR sensor and focuses on creating a map of agents in motion around the vehicle by cumulating temporal information [19]. The second approach consists of applying computer vision algorithms on the captured images. With the recent development of deep neural networks for image classification, current state-of-the-art performance is achieved by CNNs. There are also a few studies on multimodal detection [2, 13, 15], in which the camera image is combined with additional information such as a disparity map of a stereo-camera or a dense depth map inferred from depth measurements. Pedestrian detection is an important component for safety of autonomous vehicles, as well as for traffic and street surveillance. There are extensive benchmarks on this topic and it has been shown to be a challenging problem when applied on real use-case scenarios. In purely image-based pedestrian detection approaches, the state-of-the-art results have been achieved with convolutional neural networks (CNN) and surprisingly few detection frameworks have been built upon multi-cue approaches. In this work, we develop a new pedestrian detector for autonomous vehicles that exploits LiDAR data, in addition to visual information. In the proposed approach, LiDAR data is utilized to generate region proposals by processing the three dimensional point cloud that it provides. These candidate regions are then further processed by a state-of-the-art CNN classifier that we have fine-tuned for pedestrian detection. We have extensively evaluated the proposed detection process on the KITTI dataset. The experimental results show that the proposed LiDAR space clustering approach provides a very efficient way of generating region proposals leading to higher recall rates and fewer misses for pedestrian detection. This indicates that LiDAR data can provide auxiliary information for CNN-based approaches. 1 In this paper, we also present a multimodal approach that consists of utilizing depth measurements to create image region proposals and a state-of-the-art CNN, called ResNet, for visual object detection [11]. The main objective of this study is to show the usability and usefulness of LiDAR data as an additional source of information. We developed a novel framework to generate proposals from depth measurements. Our hypothesis is that using depth data and prior information about the size of the objects, we can reduce the search space in the images by providing candidates and, therefore, speeding up detection algorithms. In addition, we hypothesize that this prior definition of the location and size of the candidate bounding box will also decrease the number of false detections. The algo- Introduction One major criterion for a wide diffusion of the autonomous vehicle technology is the ability to significantly reduce the number of road accidents, a task that highly depends on the detection of surrounding agents around the vehicle. Two types of 1 LiDAR Region proposal Downsampling Ground extraction Clustering Cluster validation Image projection and visual aspect Classification Camera Score Figure 1: Detection framework by computing the posterior probability based on temporal data. This Bayesian temporal filtering emphasizes the surrounding objects in motion [19]. The occupancy grid map allows to identify static objects from moving objects. It has been intensively used for detecting the surroundings of a vehicle in order to monitor and predict the movement of other road users. Another approach is to use a four-layer laser to detect pedestrians by filtering the signal of each laser plane separately and performing a fusion of the different detections [9]. Among LiDAR-camera fusion schemes, other researchers are using a depth map along with color channels to perform the detection. The depth map is a “dense” representation of LiDAR measurements. Premebida et al. [15] proposed to use “sparse” laser data to generate a dense depth map of the size of the image using bilateral filtering. The same idea can be applied in a visual approach by using a stereo camera to generate a disparity map that replaces the depth map [2, 13]. rithm is built upon the idea of clustering the 3-D point cloud of the LiDAR. It starts with raw measurements downsampling, followed by the removal of points belonging to the floor plane. Then, a density-based clustering algorithm generates the candidates that are projected on the image space to provide a region of interest. An overview of our method is shown in Figure 1. The proposed approach is evaluated on the KITTI dataset. We have observed that exploiting LiDAR data results in higher recall rates and less misses for pedestrian detection. The rest of the paper is organized as follows. In section 2, a summary of previous work on related topics is given. Section 3 describes the methodology used in this work. Section 4 presents relevant metrics to quantify the efficiency of our approach and the experimental results. Finally, conclusions and future work are summarized in section 5. 2 Related work Our method shares similar ideas as in [2, 5, 7, 12, 14]: using the depth information to reduce the search space in the image. In [5], the authors describe a car detection and tracking algorithm based on a single layer LiDAR. They first cluster the LiDAR data before reconstructing the original shape of each object based on temporal information. Spinello et al. [18] propose a comparable approach: a one-layer laser range is used to cluster and classify the objects. In parallel, the clusters are also classified in the image space. Then both scores are merged together to produce the final decision. In [14], an algorithm using a late fusion of dense LiDAR-based and image-based detections is presented. The authors apply region extraction and unary classification for each source separately. The fusion of the image and LiDAR detections is made by finding associations between the object candidates and fusing their bounding boxes. Instead of using two independent classifiers for LiDAR In the next subsections, we will briefly present LiDAR-based detection and visual pedestrian detection methods. A comprehensive overview of previous pedestrian detection approaches can be found in [1]. 2.1 LiDAR-based Detection LiDAR sensors have been popular since the birth of autonomous vehicles. Different approaches exploit these sensors. The most common is the creation of an occupancy grid map. This map represents the laser measurement density and is generated by computing a two dimensional histogram of the point cloud that has been projected on the x-y plane. A probability estimate of the existence of an obstacle is then evaluated 2 3 Methodology and image, we generate candidate regions employing solely LiDAR and classify them based on the visual information. The algorithms described in [5, 18] are different from our approach as they only use a one-layer laser, hence reducing the complexity of the point cloud at the cost of reducing the precision of the bounding boxes. In our framework, the laser scanner has 64 layers, which is important to produce high quality proposals. Indeed, the measurements cover the entirety of the objects and they provide precisely the geometry of each cluster. The advantage of our method lies within the different processing steps of the point cloud, which significantly improves the quality of the clusters. 2.2 The LiDAR sensor renders a dense and accurate threedimensional point cloud as depicted in Figure 2a. Generating candidates for classification is performed by clustering this point cloud. The number of clusters is then reduced in the validation process. Afterward, clusters are projected on the image space and gone through visual aspect correction to produce the final candidates. The quality of region proposals generated by the depth measurements is sensitive to the calibration and to the processing of the three-dimensional point cloud. As the density of the points can be high and have a negative impact on the quality of clustering and computation time, we decided to apply downsampling and to remove the points corresponding to the ground. Visual Pedestrian Detection 3.1 A CNN is an artificial neural network that contains many convolutional layers. Those layers learn multiple filters, usually of small size, to convolve the input. The flexibility of CNNs allows them to be constantly improved with novel architecture design. These novelties can modify the training time (residual network [11]), classification speed (region proposal network [10, 16]), or performance (deeper or more complex network). Due to its state-of-the-art performance, in this paper, we use a residual network (ResNet) [11] for the detection. The key contribution of the ResNet is to add an identity operation in the convolutional layers to connect the input and output of each residual block and propagate only the difference between the current block input and output. This difference is used in the following layers, allowing it to learn complex structures faster. An important factor contributing to the use of neural networks in computer vision is called transfer learning: this technique consists of using a CNN that has already been trained on another database to considerably reduce the training time [20]. This technique is employed in this work to fine-tune the ResNet. In order to evaluate the region proposal approach presented in section 3, we compare it to a region proposal network (RPN) used in Faster-RCNN [16]. RPNs are intended to reduce the search space on an image by extracting regions of interest using a neural network. A region proposal network infers the bounding boxes from the image itself prior to the classification task. It should be noted that, in this study, we only focus on showing the benefits of using a laser scanner to generate region proposals and not on the whole detection framework. Production of image proposals Data reduction Reducing the density of the LiDAR point cloud improves the speed of the clustering without compromising efficiency. The density is a function of the distance from sensor and follows a square rule: density ∝ distance2 therefore the distribution of the points is not deterministic, that is, it depends on the scene geometry. Downsampling is applied as follows: a density reference is chosen and the distance axis is then discretized. For all the points in one discretization step, the data is reduced according to the density reference, if the density is higher than the reference value. The resulting density difference is illustrated in Figure 2b. Ground extraction The motivation behind extracting floor points is to facilitate the clustering process. To perform ground extraction, we assume that the lower points in the z-axis belong to the floor. We extract them by discretizing the floor (x and y-axis) with a step given as parameter, and for each square the lowest (z-axis) point is kept. Then, the other points in a reasonably small distance from this lower reference are also counted as floor points. The plane is found by computing polynomial least-square fitting of degree two. This approach has been chosen for its speed and simplicity and the outcome of this process is visible in Figure 2c. The random sample consensus (RANSAC) algorithm was also considered [6]. The latter is iterative, hence the computation time is non-deterministic. Additionally, the nature of the LiDAR sensor generates irregular 3 (a) Raw LiDAR point cloud (b) Downsampled point cloud (c) Floor identification Figure 2: LiDAR data pre-processing density measurements: objects have a higher point density than valid if the width (∆x) of the cluster is greater than 0.1[m], the the ground and, therefore, it can alter RANSAC performance. height (∆y) greater than 0.4[m] or the depth (∆z) lower than 1.2[m]. Clustering We require a simple and fast clustering algoThe shape of the candidates are then changed in two ways: rithm that does not need any initialization. According to these the lower bound of the bounding box is adapted to match the criteria, we choose the “Density Based Spatial Clustering of ground floor and the aspect ratio of candidates is adjusted to Applications with Noise” (DBSCAN) algorithm [3]. It is a a fixed value. This operation is useful to have a constant indensity-based algorithm designed on the concepts of density- put size for classification and to avoid stretching effects when reachability and density-connection: resizing. To select the best parameters for aspect ratio correc1. density-reachable: a point p is density reachable from a tion, we focus on the best precision possible for each parameter point q if there is a chain of points p1 , ..., pn , p1 = p, pn = value. Results after this step are shown in Figure 3b. q such that pi+1 is directly density-reachable from pi . A point p is directly density-reachable if the point p is included in the area defined by a circle centered on q of radius EPS. 3.2 2. density-connected: a point p is density connected to a point q if there is a point o such that both, p and q are density-reachable from o. Classification The classification of the candidates is performed by a convolutional neural network. In this paper, we use the popular, high performing Residual Network (ResNet) [11]. The particularity of this network lies in the new architecture composed of residual blocks: they provide the advantage of a more stable training and a faster convergence [11]. The network has been pre-trained on the ImageNet [17] dataset. We have fine-tuned it for pedestrian detection on a reduced version of the KITTI training set that contains 3740 frames. During fine-tuning, we apply data augmentation by flipping the input images, hence doubling the amount of positive input samples. Optimization is performed by stochastic gradient descent with a learning rate value of 1e−4 . The training took 2500 iterations with a batch size of 64. The algorithm visits all points once and for each p aggregates all density-reachable points according to the parameters EPS and MinPts. MinPts defines the minimum number of points that a cluster should contain, otherwise the group is considered as noise. EPS is a parameter that defines the maximum allowed distance between two density-reachable points. By projecting the clusters into the image space, we generate the candidates for detection (see Figure 3a). Validation, ratio and size adjustment In order to generate more accurate candidate proposals, we make assumptions on the visual aspect of a pedestrian. A candidate is considered not 4 challenge [4, 8]. IoU = With Bp the detection bounding box and Bgt the ground truth bounding box. Multiple detections of the same object are counted as false positives (F P ). (a) Cluster proposal 4.2 Experimental results The comparison of different region proposal schemes in terms of their effects on misses and recall rates are given in Table 1. In the table, Clustering refers to our proposed method based on LiDAR data. Sliding window refers to analyzing the image in a sliding window scheme. Faster R-CNN [16] uses its own RPN based on visual information. As can be observed the proposed approach provides fewer misses and higher recall rates. Especially, compared to a region proposal framework based on visual information, i.e. the one utilized at Faster RCNN, the decrease of miss detection rate is significant. This indicates that LiDAR data can be utilized, in addition to visual information, to improve the performance of CNN-based pedestrian detection systems by reducing the miss detections and increasing the recall. Please note that, generally, the recall rate is very sensitive to the aspect ratio of the proposals. For performance comparison, we fixed the aspect ratio at the value which minimizes the number of missed labels. Additionally, the parameters of the different approaches can impact significantly the recall value. For example, sliding window can fail to overlap adequately two labels that are close to each other. Our approach covers two close objects more efficiently when they are clustered separately. Although the Faster R-CNN is a generic object detection framework, we carefully adapted the aspect ratio of the resulting proposal output to have a representative comparison. Figure 4 plots the recall rates with respect to different IoU values. Similar to the findings in Table 1, LiDAR clustering achieves higher recall rates also at different IoU values. Moreover, compared to the sliding window scheme, it reduces the number of regions from 4009 down to 307 as presented in Table 2. The computational overhead of determining candidate regions is negligible as can be seen in the last column of Table 2. Thus, the proposed approach reduces the amount of computation significantly with respect to the sliding window scheme. Compared to the visual information based region extraction as (b) Size and ratio corrections Figure 3: Visualization of the region proposal 4 Experiments In this section, we will first present the dataset and the evaluation metrics. Then the experimental results will be conveyed and discussed. 4.1 area(Bp ∩ Bgt ) area(Bp ∪ Bgt ) Dataset and evaluation We have used the KITTI dataset [8] for the experiments. The particularities of this dataset regarding pedestrian detection are that some labels are highly occluded and the number of objects of small size is high. The y-axis size varies from 13 to 294 pixels for pedestrians. Moreover, the centering and alignment of the labels are not coherent through the images, and consequently introduce difficulties for the classifier to learn how to localize the candidates precisely. The training set is composed of 7481 images and labels of the test set are not available. As a consequence, all the results reported in this work are computed on the validation set. Similar to [15], the provided training set is split into two subsets that are used as training set and validation set for our experiment: 3740 frames are used for training, and 3741 for validation. The label matching criterion is an intersection over union (IoU) of 50%, IoU > 0.5, described in the PASCAL VOC 5 in Faster R-CNN, employing LiDAR data requires more processing time. However, considering the detection times, listed in the second column of Table 2, this difference is also negligible. The detection time refers to the inference time when the regions are fed one by one to the classification network. precision by decreasing the number of false positives. We observe an absolute increase of around 20% on medium difficulty average precision. The recall is impacted as well by the decrease of the number of false negatives. Please again note that the purpose of the study is to show the benefits of employing LiDAR data to improve region proposals. Therefore, we Region extraction Missed labels (FN) Max recall combined the proposed approach with a generic state-of-theClustering 180 0.92 art object classification framework, namely, ResNet. Building Sliding window 219 0.90 an elaborate and optimized CNN-based pedestrian detection Faster R-CNN [16] 601 0.73 system is beyond the scope of the paper. However, the presented ideas, i.e. exploiting LiDAR information for improved Table 1: Number of labels that are missed (FN) and maximum region proposals, can also be incorporated to the state-of-therecall possible on the validation set with an IoU of 0.5 art vision-only pedestrian detection approaches. Detection ResNet, sliding window ResNet, clustering 1.0 Recall 0.8 0.6 0.0 0.0 AP medium 34.3 % 54.5 % AP hard 31.2 % 50.4 % Table 3: Average precision (AP) for the different detection schemes 0.4 0.2 AP easy 35.8 % 56.4 % Faster-RCNN LIDAR Clustering Sliding Window 0.2 0.4 IoU 0.6 0.8 1.0 5 Conclusion Figure 4: Comparison of recall rates with respect to different IoU values In this paper, we presented a novel region proposal framework based on depth measurements from the LiDAR. The experimental results showed the range of performance gain using our Region extraction Number Detection ROI time region proposal approach. It provides reduction in the image of regions time search space, the amount of miss detections and increase in reClustering 307 21 [s] 0.5 [s] call. An advantage of our region proposal resides in the fact Sliding window 4009 219 [s] - [s] that it can be applied prior to any detection framework. This reFaster R-CNN [16] 300 21 [s] 0.3 [s] search can therefore be continued by extending the results with more efficient and deeper networks trained for pedestrian deTable 2: Comparison of different region extraction methods tection. In summary, LiDAR data can provide complementary The final performance of pedestrian detection in real use- information to the visual information and can be utilized to imcase scenario strongly depends on the tuning of parame- prove the CNN-based pedestrian detection approaches further. ters, bounding box adaptations, and non-maximum suppression function. Indeed, the max recall is bounded by the region proposal approach as shown in the previous experiment, and Acknowledgments the precision highly depends on the non-maximum suppression employed after detection. This material is based upon work supported by the international Table 3 shows a clear difference when using cluster candi- chair DriveForAll 1 . dates compared to using sliding window. As expected, the act 1 http://driveforall.com/, accessed July 2017 of reducing the number of candidates to classify impacts the 6 References [1] R. Benenson, M. Omran, J. Hosang, and B. Schiele. Ten years of pedestrian detection, what have we learned? In European Conference on Computer Vision, pages 613–627. Springer, 2014. 2 [2] X. Chen, K. Kundu, Y. Zhu, A. G. Berneshawi, H. Ma, S. Fidler, and R. Urtasun. 3D object proposals for accurate object class detection. In C. Cortes, N. D. Lawrence, D. D. Lee, M. Sugiyama, and R. Garnett, editors, Advances in Neural Information Processing Systems 28, pages 424–432. Curran Associates, Inc., 2015. 1, 2 [3] M. Ester, H.-P. Kriegel, J. Sander, X. Xu, and others. A density-based algorithm for discovering clusters in large spatial databases with noise. In Kdd, volume 96, pages 226–231, 1996. 4 [4] M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The PASCAL Visual Object Classes Challenge 2011 (VOC2011) Results. http://www.pascalnetwork.org/challenges/VOC/voc2011/workshop/index.html. 5 [5] F. Fayad and V. Cherfaoui. Tracking objects using a laser scanner in driving situation based on modeling target shape. In 2007 IEEE Intelligent Vehicles Symposium, pages 44–49. 2, 3 [6] M. A. Fischler and R. C. Bolles. Random Sample Consensus: A Paradigm for Model Fitting with Applications to Image Analysis and Automated Cartography. Commun. ACM, 24(6):381–395, June 1981. 3 [7] G. Gate, A. Breheret, and F. Nashashibi. Fast pedestrian detection in dense environment with a laser scanner and a camera. In VTC Spring 2009 - IEEE 69th Vehicular Technology Conference, pages 1–6. 2 [8] A. Geiger, P. Lenz, and R. Urtasun. Are we ready for autonomous driving? the KITTI vision benchmark suite. In 2012 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3354–3361, 2012. 5 [9] S. Gidel, P. Checchin, C. Blanc, T. Chateau, and L. Trassoudaine. Pedestrian detection and tracking in an urban environment using a multilayer laser scanner. IEEE Transactions on Intelligent Transportation Systems, 11(3):579–588, 2010. 2 [10] R. Girshick, J. Donahue, T. Darrell, and J. Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 580–587, 2014. 3 [11] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 770–778, 2016. 1, 3, 4 [12] T. Kim and J. Ghosh. Robust detection of non-motorized road users using deep learning on optical and LIDAR data. In 2016 [13] [14] [15] [16] [17] [18] [19] [20] 7 IEEE 19th International Conference on Intelligent Transportation Systems (ITSC), pages 271–276, 2016. 2 S. Nedevschi, S. Bota, and C. Tomiuc. Stereo-based pedestrian detection for collision-avoidance applications. IEEE Transactions on Intelligent Transportation Systems, 10(3):380–391, 2009. 1, 2 S.-I. Oh and H.-B. Kang. Object Detection and Classification by Decision-Level Fusion for Intelligent Vehicle Systems. Sensors, 17(1):207, Jan. 2017. 2 C. Premebida, J. Carreira, J. Batista, and U. Nunes. Pedestrian detection combining RGB and dense LIDAR data. In 2014 IEEE/RSJ International Conference on Intelligent Robots and Systems, pages 4112–4117, 2014. 1, 2, 5 S. Ren, K. He, R. Girshick, and J. Sun. Faster R-CNN: Towards real-time object detection with region proposal networks. In C. Cortes, N. D. Lawrence, D. D. Lee, M. Sugiyama, and R. Garnett, editors, Advances in Neural Information Processing Systems 28, pages 91–99. Curran Associates, Inc., 2015. 3, 5, 6 O. Russakovsky, J. Deng, H. Su, J. Krause, S. Satheesh, S. Ma, Z. Huang, A. Karpathy, A. Khosla, M. Bernstein, and others. ImageNet large scale visual recognition challenge. International Journal of Computer Vision, 115(3):211–252, 2015. 4 L. Spinello, R. Triebel, and R. Siegwart. Multimodal people detection and tracking in crowded scenes. In AAAI, pages 1409– 1414. 2, 3 N. Suganuma and T. Matsui. Robust environment perception based on occupancy grid maps for autonomous vehicle. In Proceedings of SICE Annual Conference 2010, pages 2354–2357, 2010. 1, 2 J. Yosinski, J. Clune, Y. Bengio, and H. Lipson. How transferable are features in deep neural networks? In Advances in neural information processing systems, pages 3320–3328, 2014. 3
1cs.CV
Non-parametric adaptive estimation of order 1 Sobol indices in stochastic models, with an application to Epidemiology Gwenaëlle Castellan∗, Anthony Cousien†, Viet Chi Tran‡ arXiv:1611.07230v1 [math.ST] 22 Nov 2016 January 26, 2018 Abstract The global sensitivity analysis is a set of methods aiming at quantifying the contribution of an uncertain input parameter of the model (or combination of parameters) on the variability of the response. We consider here the estimation of the Sobol indices of order 1 which are commonly-used indicators based on a decomposition of the output’s variance. In a deterministic framework, when the same inputs always give the same outputs, these indices are usually estimated by replicated simulations of the model. In a stochastic framework, when the response given a set of input parameters is not unique due to randomness in the model, metamodels are often used to approximate the mean and dispersion of the response by deterministic functions. We propose a new non-parametric estimator without the need of defining a metamodel to estimate the Sobol indices of order 1. The estimator is based on warped wavelets and is adaptive in the regularity of the model. The convergence of the mean square error to zero, when the number of simulations of the model tend to infinity, is computed and an elbow effect is shown, depending on the regularity of the model. Keywords: Sensitivity analysis in a stochastic framework; Sobol indices of order 1; adaptive non-parametric inference; warped wavelets; Nadaraya-Watson estimator; model selection; applications to epidemiology; SIR model; spread of the Hepatitis Virus C among drug users. MSC2010: 49Q12; 62G08; 62P10. 1 Sobol indices In a mathematical model where the output y ∈ R depends on a set of p ∈ N input parameters x = (x1 , ...xp ) ∈ Rp through the relation y = f (x), there are various ways to measure the influence of the input x` , for ` ∈ {1, . . . , p}, on y. In this article, we are interested in Sobol indices [25], which are based on an ANOVA decomposition (see [24, 13, 14] for a review). These indices have been proposed to take into account the uncertainty on the input parameters that are here considered as a realisation of a set of independent random variables X = (X1 , ...Xp ), with a known distribution. Denoting by Y = f (X) the random response, the first order Sobol indices can be defined for ` ∈ {1, . . . , p} by  Var E[Y | X` ] S` = . (1.1) Var(Y ) ∗ Laboratoire Paul Painlevé, UMR CNRS 8524, UFR de Mathématiques, Université de Lille, Cité Scientifique, 59655 Villeneuve d’Ascq Cedex, France. † INSERM, IAME, UMR 1137, Université Paris Diderot, Sorbonne Paris Cité, 75018 Paris, France ‡ Laboratoire Paul Painlevé, UMR CNRS 8524, UFR de Mathématiques, Université de Lille, Cité Scientifique, 59655 Villeneuve d’Ascq Cedex, France. Authors are listed in alphabetical order. 1 This first order index S` correspond to the sensitivity of the model to X` alone. Higher order indices can also be defined using ANOVA decomposition: considering (`, `0 ) ∈ {1, . . . , p}, we can define the second order sensitivity, corresponding to the sensitivity of the model to the interaction between X` and X`0 index by  Var E[Y | X` , X`0 ] S``0 = − S` − S`0 (1.2) Var(Y ) We can also define the total sensitivity indices by X ST` = SL . (1.3) L⊂{1,...,p} | `∈L As the estimation of the Sobol indices can be computer time consuming, a usual practice consists in estimating the first order and total indices, to assess 1) the sensitivity of the model to each parameter taking alone and 2) the possible interactions, which are quantified by the difference between the total order and the first order index for each parameter. Several numerical procedures to estimate the Sobol indices have been proposed, in particular by Jansen [16] (see also [23, 24]). These estimators, that we recall in the sequel, are based on Monte-Carlo simulations of (Y, X1 . . . Xp ). The literature focuses on deterministic relations between the input and output parameters. In a stochastic framework where the model response Y is not unique for given input parameters, few works have been done, randomness being usually limited to input variables. Assume that: Y = f (X, ε), (1.4) where X = (X1 , . . . Xp ) still denotes the random variables modelling the uncertainty of the input parameters and where ε is a noise variable. When noise is added in the model, the classical estimators do not always work: Y can be chaotic regarding the value of ε. Moreover, this variable is not always controllable by the user. When the function f is linear, we can refer to [9]. In the literature, meta-models are used, i.e. a deterministic function approximating the mean and the dispersion of the response by deterministic functions allows to come back in the classical deterministic framework (e.g. Janon et al. [15], Marrel et al. [20]). We study here another point of view, which is based on the non-parametric statistical estimation of the term Var E[Y | X` ] appearing in the numerator of (1.1). Approaches based on the Nadaraya-Watson kernel estimator have been proposed by Da Veiga and Gamboa [7] or Solı́s [26]. We propose here a new approach based on warped wavelet decompositions. An advantage of these non-parametric estimators is that their computation requires less simulations of the model. For Jansen estimators, the number of calls of f required to compute the sensitivity indices is n(p+1), where n is the number of independent random vectors (Y i , X1i , . . . Xpi ) (i ∈ {1, . . . n}) that are sampled for the Monte-Carlo, making the estimation of the sensitivity indices time-consuming for sophisticated models with many parameters. In addition, for the non-parametric estimators, the convergence of the mean square error to zero may be faster than for Monte-Carlo estimators, depending on the regularity of the model. In Section 2, we present the non-parametric estimators of the Sobol indices of order 1 in the case of the stochastic model (1.4) and study  their convergence rates. The speed obtained is builds on the approximation of Var E[Y | X` ] . When the conditional expectation is estimated by a Nadaraya-Watson kernel estimator, these results have been obtained by Solı́s [26] and Da Veiga and Gamboa [7]. The use of wavelets for estimating the conditional expectation in Sobol indices is new to our knowledge. We derive the convergence rate for the estimator based on warped 2 wavelets, using ideas due Laurent and Massart [18] who considered estimation of quadratic functionals in a Gaussian setting. Because we are not necessarily in a Gaussian setting here, we rely on empirical processes and use sophisticated technology developed by Castellan [3]. Contrarily to the kernel estimators for which convergence rates rely on assumptions on the joint distribution of Y and of X1 , . . . Xp , we have an upper-bound for the convergence rates that depend on the regularity of the output Y with respect to the inputs X1 , . . . Xp . Moreover, our estimator is adaptive and the exact regularity does not need to be known to calibrate our non-parametric wavelet estimator. Since we estimate covariance terms, we obtain elbow effects allowing to recover convergence rates in 1/n when we have a lot of regularities. Further discussion is carried in the body of the article. These estimators are then computed and compared for toy examples introduced by Ishigami [12]. In Section 3, we then address models from Epidemiology for which non-parametric Sobol estimators have never been used to our knowledge. First, the stochastic continuous-time SIR model is considered, in which the population of size N is divided into three compartments: the susceptibles, infectious and removed individuals (see e.g. [1] for an introduction). Infections and removals occur at random times whose laws depend on the composition of the population and on the infection and removal parameters λ and µ as input variables. The output variable Y can be the prevalence or the incidence at a given time T for instance. Y naturally depends on λ, µ and on the randomness underlying the occurrence of random times. Second, we consider a stochastic multi-level epidemic model for the transmission of Hepatitis C virus (HCV) among people who inject drugs (PWID) that has been introduced by Cousien et al. [5, 6]. This model describes an individual-based population of PWID that is structured by compartments showing the state of individuals in the heath-care system and by a contact-graph indicating who inject with whom. Additionally the advance of HCV in each patient is also taken into account. The input variables are the different parameters of the model. Ouputs depend on these inputs, on the randomness of event occurrences and on the randomness of the social graph. We compare the sensitivity analysis performed by estimating the Sobol indices of order 1 with the naive sensitivity analysis performed in [5, 6] by letting the parameters vary in an a priori chosen windows. In the sequel, C denotes a constant that can vary from line to line. 2 A non-parametric estimator of the Sobol indices of order 1  Denoting by V` = E E2 (Y | X` ) , we have: S` = V` − E(Y )2 , Var(Y ) (2.1) which can be approximated by Vb` − Ȳ 2 Sb` = σ bY2 where Ȳ = (2.2) n n j=1 j=1 1X 1X Yj and σ bY2 = (Yj − Ȳ )2 n n are the empirical mean and variance of Y . In this article, we propose 2 approximations Vb` of V` , based on Nadaraya-Watson and on warped wavelet estimators. At an advanced stage of this work, we learned that the Nadaraya-Watson-based estimator of Sobol indices of order 1 had also been proposed and studied in the PhD of Solı́s [26]. Using a result on estimation of covariances by Loubes et al. [19], they obtain an elbow effect. However their estimation is not adaptative. 3 For the warped wavelet estimator, we propose a model selection procedure based on a work by Laurent and Massart [18] to make the estimator adaptative. 2.1 Definitions Assume that we have n independent couples (Y i , X1i , . . . Xpi ) in R × Rp , for i ∈ {1, . . . , n}, generated by (1.4). Let us start with the kernel-based estimator: R Definition 2.1. Let K : R 7→ R be a kernel such that R K(u)du = 1 and ..... Let h > 0 be a window and let us denote Kh (x) = K(x/h)/h. An estimator of S` for ` ∈ {1, . . . p} is: (N W ) Sb` 1 n Pn  Pnj=1 Yj Kh (X`j −X`i ) 2 i=1 Pn j=1 = Kh (X`j −X`i ) σ bY2 − Ȳ 2 . (2.3) This estimator is based on the Nadaraya-Watson estimator of E(Y | X` = x) given by (e.g. [29]) Pn j j=1 Yj Kh (X` − x) . Pn j j=1 Kh (X` − x) (N W ) Replacing this expression in (2.2) provides Sb` . At an advanced stage of this work, we became informed that Solı́s [26] had established rates of convergence for this estimator. We refer to his work for proofs and focus on our second estimator. Our second estimator is based on a warped wavelet decomposition of E(Y | X` = x). For introduction to such decomposition, refer to [4, 17]. Let us denote by G` the cumulative distribution function of X` . 2 R Let (ψjk )j≥−1,k∈Z be a 2Hilbert wavelet basis of L . In 2the sequel, we denote by hf, gi = R f (u)g(u)du, for f, g ∈ L , the usual scalar product of L . The wavelet ψ−10 is the father wavelet, and for k ∈ Z, ψ−1k (x) = ψ−10 (x − k). The wavelet ψ00 is the mother wavelet, and for j ≥ 0, k ∈ Z, ψjk (x) = 2j/2 ψ00 (2j x − k). Definition 2.2. Let us define for j ≥ −1, k ∈ Z, n 1X ` = βbjk Yi ψjk (G` (X`i )). n (2.4) i=1 √  Then, we define the (block thresholding) estimator of Sb` , for Jn := log2 θb` − Ȳ 2 (W W ) , Sb` = σ bY2 Jn h X i X  ` 2 b b where θ` = βjk − w(j) 1lP k∈Z j=−1 with w(j) = K 0 k∈Z  2j + n  log(n) , as: (2.5) ` βbjk 2 ≥w(j)  2Jmax X log 2  xJ  so that pen(J ) = + w(j) = K n n n (2.6) (2.7) j∈J where K and K 0 are positive constants, where Jmax := max J and where xJ = Jmax log(2). 4 (2.8) Notice for the proofs that for xJ as in (2.8), lim sup n→+∞ 1 n X e−xJ 22Jmax < +∞. (2.9) J ⊂{−1,...,Jn } Indeed, for a given Jmax ≤ Jn there are 2Jmax +1 subsets J ⊂ {−1, . . . Jn } such that max J = Jmax . Thus: X e −xJ 2Jmax 2 =C +C Jn X 0 2Jmax 2−Jmax 22Jmax = C22Jn = C Jmax =0 J ⊂{−1,...,Jn } n , log2 (n) where C in the first equality corresponds to the case J = {−1}. An expression of the constant K appears in the proofs of Section 5 (where the mean square error is studied). However this constant is hard to compute in practice and depends on inequalities that are maybe not optimal. Indeed, the proof is concentrated on the orders in n and in the dimension of the model corresponding to J , not on obtaining the best constants. For applications, the constant K appearing in the penalty pen(J ) can be chosen by a slope heuristic approach (see e.g. [2]) explained at the end of the section. Let us present the idea explaining the estimator proposed in Definition 2.2. Let us introduce centered random variables η` such that Y = f (X, ε) = E(Y | X` ) + η` . (2.10) Let g` (x) = E(Y | X` = x) and h` (u) = g` ◦ G−1 ` (u). h` is a function from [0, 1] 7→ R that belong 2 2 to L since Y ∈ L . Then Z 1 Z X X ` ` h` (u)ψjk (u)du = g` (x)ψjk (G` (x))G` (dx). h` (u) = βjk ψjk (u), with βjk = 0 j≥−1 k∈Z R (2.11) Notice that the sum in k is finite because the function h` has compact support in [0, 1]. It is then natural to estimate h` (u) by X X ` b ψjk (u), (2.12) h` = βbjk j≥−1 k∈Z and we then have: 2  V` = E E (Y | X` ) = Z G` (dx) R = X X  X X ` βjk ψjk ` βjk = Z = 0 j≥−1 k∈Z 2 G` (x)  2 kh` k22 . 1 X X 2 ` βjk ψjk (u) du j≥−1 k∈Z (2.13) j≥−1 k∈Z Adaptive estimation of kh` k22 has been studied in [18], which provides the block thresholding  ` 2 , for j ≥ 0, by blocks estimator θb` in the Definition 2.2. The idea is: 1) to sum the terms βjk {(j, k), k ∈ Z} for j ∈ {−1, . . . , Jn } with a penalty w(j) for each block to avoid choosing too large js, 2) to cut the blocks that do not sufficiently contribute to the sum, in order to obtain statistical adaptation. 5 Notice that θb` = sup XhX J ⊂{−1,0,...,Jn } j∈J ` βbjk 2 i − w(j) = sup XX J ⊂{−1,0,...,Jn } j∈J k∈N k∈N ` βbjk 2 − pen(J ). (2.14) In view of this identity, θb` can be seen as an estimator of V` resulting from a model selection on the choice of thePblocks {(j, k), k ∈ Z}, j ∈ {−1, . . . , Jn } that are kept, with the penalty function pen(J ) = j∈J w(j), for J ⊂ {−1, . . . , Jn }. For a given K appearing in the definition of the penalty function pen (2.7), let us denote by JK the subset of indices j of {−1, . . . Jn } achieving the supremum in the r.h.s. of (2.14). Plotting Card(JK ) as a function of K, the slope heuristic tells us to choose K as value where the curve has a sudden decrease. 2.2 Statistical properties In this Section, we are  interested in the rate of convergence to zero of the mean square error 2 b (MSE) E (S` − S` ) . Let us consider the generic estimator Sb` defined in (2.2), where Vb` is an estimator of V` = E(E2 (Y | X` )). We first start with a Lemma stating that the MSE can be obtained from the rate of convergence of Vb` to V` . Then, we recall the result of Solı́s [26], where an elbow effect for the MSE is shown when the regularity of the density of (X` , Y ) varies. The case of the warped wavelet estimator is studied at the end of the section and the rate of convergence is stated in Corollary 2.8. Lemma 2.3. Consider the generic estimator Sb` defined in (2.2). Then there is a constant C such that: h  C  i 4 b` − V` 2 . E (S` − Sb` )2 ≤ + E V (2.15) n Var(Y )2 Proof. From (2.1) and (2.2), h V − E(Y )2 Vb − Ȳ 2 2 i  ` ` E (S` − Sb` )2 =E − Var(Y ) σ bY2 h V h E(Y )2 Ȳ 2 2 i Vb` 2 i ` ≤2E − 2 + 2E − 2 . Var(Y ) σ Var(Y ) σ bY bY (2.16) The first term in the right hand side (r.h.s.) is in C/n. For the second term in the right hand side of (2.16): h E h h  1  i V` Vb` 2 i 1 2 i 2 b` − V` 2 . − 2 ≤2E Vb`2 − 2 + E V Var(Y ) σ Var(Y ) σ Var(Y )2 bY bY The first term in the r.h.s. is also in C/n, which concludes the proof. 2.2.1 (2.17)  MSE for the Nadaraya-Watson estimator Using the preceding Lemma, Loubes Marteau and Solı́s prove an elbow effect for the estimator (N W ) Sb` . Let us introduce H(α, L), for α, L > 0, the set of functions φ of class [α], whose derivative ([α]) φ is α − [α] Hölder continuous with constant L. Proposition 2.4 (Loubes Marteau and Solı́s [26, 19]). Assume that E(X`4 ) < +∞, that the joint density φ(x, y) of (X` , Y ) belongs to H(α, L), for α, L > 0 and that the marginal density 6 of X` , φ` belongs to H(α0 , L0 ) for α0 > α and L0 > 0. Then: If α ≥ 2, there exists a constant C > 0 such that  C E (S` − Sb` )2 ≤ . n If α < 2, there exists a constant C > 0 such that 2α  log2 n  α+2 . E (S` − Sb` )2 ≤ C n For smooth functions (α ≥ 2), Loubes et al. recover a parametric rate, while they h still have 2 i a nonparametric one when α < 2. Their result is based on (2.15) and a bound for E Vb` − V` given by [19, Th. 1], whose proof is technical. Since their result is not adaptive, they require the knowledge of the window h for numerical implementation. Our purpose is to provide a similar result for the warped wavelet adaptive estimator, with a shorter proof. 2.2.2 MSE for the warped wavelet estimator Let us introduce first some additional notation. We define, for J ⊂ {−1, . . . , Jn }, the projection hJ ,` of h on the subspace spanned by {ψjk , with j ∈ J , k ∈ Z} and its estimator b hJ ,` : XX ` ψjk (u) (2.18) hJ ,` (u) = βjk j∈J k∈Z b hJ ,` (u) = XX ` ψjk (u). βbjk (2.19) j∈J k∈Z We also introduce the estimator of V` for a fixed subset of resolutions J : XX 2 θbJ ,` = kb hJ ,` k2 = βb` . 2 jk (2.20) j∈J k∈Z Note that θbJ ,` is one possible estimator Vb` in Lemma 2.3. The estimators βbjk and θbJ ,` have natural expressions in term of the empirical process γn (dx) defined as follows: Definition 2.5. The empirical measure associated with our problem is: n γn (dx) = 1X Yi δG` (X i ) (dx) ` n (2.21) i=1 where δa (dx) denotes the Dirac mass in P a.  For a measurable function f , γn (f ) = n1 ni=1 Yi f G` (X`i ) . We also define the centered integral of f with respect to γn (dx) as:  γ̄n (f ) =γn (f ) − E γn (f ) (2.22) n   X    1 = Yi f G` (X`i ) − E Yi f G` (X`i ) . (2.23) n i=1 Using the empirical measure γn (dx), we have:   ` ` βbjk = γn ψjk = βjk + γ̄n ψjk . 7 Let us introduce the correction term  ζn =2γ̄n h` n h1 X   i =2 Yi h` G` (X`i ) − E Y1 h` G` (X`1 ) n (2.24) i=1 n n h1 X i 2X   =2 h2` G` (X`i ) − kh` k22 + η`i h` G` (X`i ) . n n i=1 (2.25) i=1 Theorem 2.6. Let us assume that the random variables Y are bounded by a constant M , and let us choose a father and a mother wavelets ψ−10 and ψ00 that are continuous with compact support (and thus bounded). The estimator θb` defined in (2.6) is almost surely finite, and: h 2 i E θb` − V` − ζn ≤C  inf J ⊂{−1,...,Jn } kh` − hJ ,` k42 + C0 2Jmax  + , n2 n log2 (n) (2.26) for constants C and C 0 > 0. We deduce the following corollary from estimate obtained above. Let us consider the P the P Besov space B(α, 2, ∞) of functions h = j≥−1 k∈Z βjk ψjk of L2 such that s |h|α,2,∞ := X jα 1−v |h(u + v) − h(u)|2 du < +∞. sup 2 j≥0 Z 0<v≤2−j 0 For a h ∈ B(α, 2, ∞) and hJ its projection on Vect{ψjk , j ∈ J = {−1, . . . Jmax }, k ∈ Z}, we have the following approximation result from [11, Th. 9.4]. Proposition 2.7 (Härdle Kerkyacharian Picard and Tsybakov). Assume that the wavelet function ψ−10 has compact support and is of class C N for an integer N > 0. Then, if h ∈ B(α, 2, ∞) with α < N + 1, sup 2αJmax kh − hJ k2 = sup 2αJmax  X X J ⊂N∪{−1} J ⊂N∪{−1} 2 βjk 1/2 < +∞. (2.27) j≥Jmax k∈Z Notice that Theorem 9.4 of [11] requires assumptions that are fulfilled when ψ−10 has compact support and is smooth enough (see comment after the Corol. 8.2 of [11]). Corollary 2.8. If ψ−10 has compact support and is of class C N for an integer N > 0 and if h` belongs to a ball of radius R > 0 of B(α, 2, ∞) for 0 < α < N + 1, then h  2 i 8α 1 ≤C n− 4α+1 + E θb` − V` . n h∈B(α,2,∞) sup As a consequence, we obtain the following elbow effect: If α ≥ 41 , there exists a constant C > 0 such that  C E (S` − Sb` )2 ≤ . n If α < 14 , there exists a constant C > 0 such that  8α E (S` − Sb` )2 ≤ Cn− 4α+1 . 8 (2.28) The proof of Theorem 2.6 is postponed to Section 5. Let us remark that in comparison with the result of Loubes et al. [19], the regularity assumption is on the function h` rather than on the joint density φ(x, y) of (X` , Y ). The adaptivity of our estimator is then welcomed since the function h` is a priori unknown. Remark that in application, the joint density φ(x, y) also has to be estimated and hence has an unknown regularity. When α < 1/4 and α → 1/4, the exponent 8α/(4α + 1) → 1. In the case when α > 1/4, we can show from the estimate of Th. 2.6 that: h 2 i lim nE θb` − V` − ζn = 0, (2.29) n→+∞  √ √ which yields that n θb` − V`− ζn converges to 0 in L2 . Since nζn converges in distribution  to N 0, 4Var Y1 h` (G` (X`1 )) by the central limit theorem, we obtain that: lim n→+∞ √    n θb` − V` = N 0, 4Var Y1 h` (G` (X`1 )) , (2.30) in distribution. The result of Corollary 2.8 is stated for functions h` belonging to B(α, 2, ∞), but the generalization to other Besov space might be possible. 2.3 Numerical tests on toy models We start with considering toy models based on the Ishigami function, namely: Y = f (X1 , X2 , X3 ) = sin(X1 ) + 7 sin(X2 )2 + 0.1 X34 sin(X1 ) (2.31) where Xi are independent uniform random variables in [−π, π] (see e.g. [12, 23]). Case 1 : first, we consider this model with (X1 , X2 , X3 ) as input parameters and compute the associated Sobol indices. For the Ishigami function, all the Sobol sensitivity indices are known. S1 = 0.3139, S2 = 0.4424, S3 = 0. Case 2 : following Marrel et al. [20], we consider the case where (X1 , X2 ) are the input parameters and X3 a nuisance random parameter. The Sobol indices relative to X1 and X2 have the same values as in the first case. Case 3 : we also compared the estimators considering a function with a more oscillatory behavior: for this purpose, we used a modified version g of the Ishigami function, defined as g(X1 , X2 , X3 ) = f (11 X1 , X2 , X3 ). As for Case 2, we consider X3 again as a nuisance parameter. The Sobol indices for X1 and X2 are the same as in Case 1. In the three cases, we compare the estimators of the Sobol indices of order 1 based on the Nadaraya-Watson and the wavelet regressions with the Jansen estimator that is one of the classical estimator found in the literature (see [16, 22] for Jansen and other estimatros). The (1),i (1),i Jansen estimator is based on the mixing of two samples (X1 , ..., Xp , i ∈ {1, . . . n}) and (2),i (2),i (X1 , ..., Xp , i ∈ {1, . . . n}) of i.i.d. p-uplets distributed as (X1 , . . . Xp ): for the first order Sobol indices, ∀` ∈ 1, ..., p: Sb` = 1 − n 2 1 X (2),i (1),i (1),i (2),i (1),i f (X1 , ..., Xp(2),i ) − f (X1 , ..., X`−1 , X` , X`+1 , . . . , Xp(1),i ) . (2.32) 2 2n σ bY i=1 9 Notice that the estimations using Jansen estimators require (p + 1)n calls to f , which is in many real cases the most expensive numerically We compute the non-parametric estimators of the S` ’s from samples of size n and (p + 1)n to compare with the Jansen estimators obtained from the same number of simulations of the model. We used n = 10, 000 and to obtain Monte-Carlo approximations of the estimators’ distributions, we performed 1,000 replications from which we estimate the bias and MSE for each estimator. For the Nadaraya-Watson estimator, we choose a window of h = 0.1. For the wavelet estimator, we use the Daubechies 4 wavelet basis when implementing the wavelet estimator. Table 1: Estimates of the bias and MSE for the parameters X1 , X2 and X3 in the Ishigmami function, for 1,000 replications and n = 10, 000 Method Jansen, n(p + 1) Nadaraya-Watson, n Nadaraya-Watson, n(p + 1) Wavelets, n Wavelets, n(p + 1) E[Sˆ1 − S1 ] 9.9e-4 2.2e-3 1.4e-4 9.7e-4 -5.4e-3 E[(Sˆ1 − S1 )2 ] 1.8e-4 5.0e-5 1.1e-5 2.1e-4 7.4e-5 E[Sˆ2 − S2 ] 3.2e-5 -1.7e-3 -3.0e-3 3.5e-3 9.6e-4 E[(Sˆ2 − S2 )2 1.0e-4 6.4e-5 2.4e-5 2.6e-4 5.9e-5 E[Sˆ3 − S3 ] 8.6e-4 3.9e-3 9.6e-4 3.1e-3 2.1e-4 E[(Sˆ3 − S3 )2 ] 5.6e-4 1.7e-5 1.2e-6 4.1e-5 5.0e-6 Table 2: Estimates of the bias and MSE for the parameters X1 and X2 in the Ishigmami function, when X3 is considered as a pertubation parameter, for 1,000 replications and n = 10, 000 Method Jansen, n(p + 1) Nadaraya-Watson, n Nadaraya-Watson, n(p + 1) Wavelets, n Wavelets, n(p + 1) E[Sˆ1 − S1 ] -5.6e-4 1.4e-3 2.0e-4 9.1e-5 -4.7e-3 E[(Sˆ1 − S1 )2 ] 2.0e-4 4.6e-5 1.4e-5 2.0e-4 8.3e-5 E[Sˆ2 − S2 ] -7.8e-4 -1.4e-3 -2.7e-3 3.4e-3 9.9e-4 E[(Sˆ2 − S2 )2 1.8e-4 6.4e-5 2.9e-5 2.6e-4 7.3e-5 Table 3: Estimates of the bias and MSE for the parameters X1 and X2 in the modified Ishigmami function g, when X3 is considered as a pertubation parameter, for 1,000 replications and n = 10, 000 Method Jansen, n(p + 1) Nadaraya-Watson, n Nadaraya-Watson, n(p + 1) Wavelets, n Wavelets, n(p + 1) E[Sˆ1 − S1 ] -3.0e-4 -6.4e-2 -6.5e-2 -1.5e-3 2.7e-3 E[(Sˆ1 − S1 )2 ] 2.2e-4 4.1e-3 4.3e-3 3.6e-4 6.6e-5 E[Sˆ2 − S2 ] -3.0e-4 -1.0e-3 -2.7e-3 1.8e-3 1.6e-3 E[(Sˆ2 − S2 )2 1.8e-4 6.1e-5 2.8e-5 2.5e-4 8.5e-5 Let us now discuss the results of the simulations. In the deterministic framework (i.e. Case 1, see Table 1), we can see that in term of bias, the results were variable. For X1, with the same number of simulations (i.e. n(p + 1)), the lowest bias was obtained with the Nadaraya-Watson estimator (1.4e-4), the Jansen estimator for X2 (3.2e-5) and the wavelet estimator for X3 (2.1e4). However, at constant number of simulations n(p + 1), the Nadaraya-Watson and the wavelet estimators showed lower MSE than Jansen. Particularly, the lowest MSE are obtained for X1, X2 and X3 with the Nadaraya-Watson regression estimator (1.1e-5, 2.4e-5 and 1.2e-6 respectively). Compared with Jansen, the MSE still lower for Nadaraya-Watson even with times p + 1 less simulations of the model available. The results are similar in the stochastic framework (i.e. Case 2, see Table 2). When we add higher frequencies (Case 3, see Table 3), the performances of the estimator for X1 10 based on Nadaraya-Watson are reduced, leading to the biases of order 1e-2 and MSE of order 1e-3. In the same time, the wavelet estimator remains relatively stable and gives the lowest MSE 6.6e-5. Figure 1: Example of regression obtained using Nadaraya-Watson and wavelets with n(p + 1) = 40, 000 simulations for the Ishigami function (left) and the modified Ishigami function (right). Figure shows how the non-parametric regressions (Nadaraya-Watson and wavelets) estimate conditional expectation appearing in the expressions of the Sobol indices. We can see that 11 wavelet regression shows boundary effects as well as more noisy curves, but that it is more stable to treating higher frequencies. These results suggest that the two proposed non-parametric estimators constitute an interesting alternative to the Jansen estimator, showing less variability and potentially requiring a lower number of simulations of the model, even in the deterministic setting of Case 1. In addition, the estimator based on Nadaraya-Watson leads to the lowest MSE for the Ishigami function, meanwhile the wavelet estimator seems to be more appropriate for functions showing higher frequencies. 3 Sobol indices for epidemiological problems We now consider two stochastic individual-based models of epidemiology in continuous time. In both cases, the population is of size N and divided into compartments. Input parameters are the rates describing the times that individuals stay in each compartment. These rates are usually estimated from epidemiological studies or clinical trials, but there can be uncertainty on their values due to various reasons. The restricted size of the sample in these studies brings uncertainty on the estimates, which are given with uncertainty intervals (classically, a 95% confidence interval). Different studies can provide different estimates for the same parameters. The study populations can be subject to selection biases. In the case of clinical trials where the efficacy of a treatment is estimated, the estimates can be optimistic compared with what will be the effectiveness in real-life, due to the protocol of the trials. It is important to quantify how theses uncertainties on the input parameters can impact the results and the conclusion of an epidemiological modelling study. 3.1 SIR model and ODE metamodels In the first model, we consider the usual SIR model, with three compartments: susceptibles, infectious and removed (e.g. [1, 8]). We denote by StN , ItN and RtN the respective sizes of the corresponding sub-populations at time t ≥ 0, with StN + ItN + RtN = N . At the population level, infections occur at the rate Nλ StN ItN and removals at the rate µItN . The idea is that to each pair of susceptible-infectious individuals a random independent clock with parameter λ/N is attached and to each infectious individual an independent clock with parameter µ is attached. The input parameters are the rates λ and µ. The outpout parameter is the final size of the epidemic, i.e. at a time T > 0 where ITN = 0, Y = (ITN + RTN )/N . It is possible to describe the evolution of (StN /N, ItN /N, RtN /N )t≥0 by a stochastic differential equation (SDE) driven by Poisson point measures (see e.g. [28]) and it is known that when N → +∞, this stochastic process converges in D(R+ , R3 ) to the unique solution (st , it , rt )t≥0 of the following system of ordinary differential equations (e.g. [1, 8, 28]):  ds  dt = −λst it di (3.1) = λst it − µit  dt dr = µi . t dt The fluctuations associated with this convergence have also been established. The limiting equations provide a natural deterministic approximating meta-model (recall [20]) for which sensitivity indices can be computed. For the numerical experiment, we consider a close population of 1200 individuals, starting with S01200 = 1190, I01200 = 10 and R01200 = 0. The parameters distributions are uniformly dis12 tributed with λ/N ∈ [1/15000, 3/15000] and µ ∈ [1/15, 3/15]. Here the randomness associated with the Poisson point measures is treated as the nuisance random factor in (1.4). We compute the Jansen estimators of Sλ and Sµ for the deterministic meta-model (3.1), with n = 30, 000 simulations. For the estimators of Sλ and Sµ in the SDE, we compute the Jansen estimators with n = 10, 000 (i.e. n(p + 1) = 30, 000 calls to the function f ), and the estimators based on Nadaraya-Watson and on wavelet regressions with n = 30, 000 simulations. (a) (b) Figure 2: Estimations of the first order Sobol indices, using Jansen estimators on the meta-model with n = 10, 000 and the non-parametric estimations based on Nadaraya-Watson and wavelet regressions. (a): the distributions of the estimators of Sλ and Sµ is approximated by Monte-carlo simulations. (b): the distributions of E(Y | λ) and E(Y | µ) are approximated by Monte-Carlo simulations. Let us comment on the results. First, the comparison of the different estimation methods is presented in Fig. 2. Since the variances in the meta-model and in the stochastic model differ, we start with comparing the distributions of E(Y | λ) and E(Y | µ) that are centered around the same value, independently of whether the meta-model or the stochastic model is used. These distributions are obtained from 1,000 Monte-carlo simulations. In Fig. 2(b), taking the metamodel as a benchmark, we see that the wavelet estimator performs well for both λ and µ while Nadaraya-Watson regression estimator performs well only for µ and exhibit biases for λ. Jansen estimator on the stochastic model exhibit biases for both λ and µ. In a second time, we focus on the estimation of the Sobol indices for the stochastic model. The smoothed distributions of the estimators of Sλ and Sµ , for 1,000 Monte-Carlo replications, are presented in Fig. 2 (a); the means and standard deviations of these distributions are given in Table 4. Although there is no theoretical values for Sλ and Sµ , we can see (Table 4) that the estimators of the Sobol indices with non-parametric regressions all give similar estimates in expectation for µ. For λ, the estimators are relatively different, with the Nadaraya-Watson showing the lower estimate. This is linked with the bias seen on Fig. 2 (b) and discussed below. In term of variance, the Nadaraya-Watson estimator gives the tightest distribution, while the wavelet estimator gives the highest variance. 13 Jansen 0.39 (9.2e-3) 0.44 (9.0e-3) Sbλ s.d. Sbµ s.d. Nadaraya-Watson 0.38 (4.3e-3) 0.42 (4.4e-3) Wavelet 0.40 (1.4e-2) 0.42 (1.2e-2) Table 4: Estimators of the Sobol indices for λ and µ and their standard deviations using n =10,000 Monte-Carlo replications of the stochastic SIR model. 0.8 lence Preva 0.6 (%) 0.4 Mu 0.2 a/N d mb La Figure 3: Prevalence (Y ) simulated from the n(p + 1) = 30, 000 simulations of λ and µ, for the SIR model. The advantage of using the estimators with wavelets lies in their robustness to the inclusion of high frequencies and in the fact that they can overcome some smoothing biases that the Nadaraya-Watson regressions exhibit (Fig. 2 (b)). This can be understood when looking at Fig. 3: the simulations can give very noisy Y ’s. For example, extinctions of the epidemics can be seen in very short time in simulations, due to the initial randomness of the trajectories. This produces distributions for Y ’s that are not unimodal or with peaks at 0, which makes the estimation of E(Y | λ) or E(Y | µ) more difficult. The variance of the estimator with wavelets is however the widest and in practice, finding the thresholding constants for the wavelet coefficients can be somewhat tricky when the number of input parameters is large, as in the next section. 3.2 Application to the spread of HVC among drug users Chronic hepatitis C is a major cause of liver failure in the world, responsible of approximately 500,000 deaths annually [30]. Hepatitis C is a bloodborne disease, and the transmission remains high in people who inject drugs (PWID) due to injecting equipment sharing [27]. Until recently, the main approaches to decrease HCV transmission among PWID in high income countries relied on injection prevention and on risk reduction measures (access to sterile equipment, opioid substitution therapies, etc.). The arrival of highly effective antiviral treatments offers the opportunity to use the treatment as a mean to prevent HCV transmission, by treating infected PWID before they have transmitted the infection [10]. 14 In this context, a stochastic, individual-based dynamic model was used to assessed the impact of the treatment on HCV transmission in PWID in Paris area [5]. This model included HCV transmission on a random graph modelling PWID social network, the cascade of care of chronic hepatitis C and the progression of the liver disease. A brief description of the model for HCV infection and cascade of care is available in 4, for a detailed description and the values and uncertainty intervals of the parameters, the reader can refer to [5]. These parameters are the input of our model and we assume for them uniform distributions on their uncertainty intervals. Here, Y is the prevalence after 10 years of simulation. We used n = 10, 000 simulations of the model. Figure 4: Diagram flow of infection and cascade of care modelling for HCV infection among PWID. Greek letters refer to rates, pr and pSV R to probabilities and Ta and Tt to (deterministic) time before leaving the compartment. β depends on the status of the PWID with respect to the risk reduction measures (access to sterile injecting equipment, access to substitution therapies). ni denotes the number of infected injecting partners of the PWID. δ depends on the status of the PWID with respect to injection: active or inactive injector (i.e. before or after the cessation of injection). The liver disease progression is quantified by a score (score Metavir for the fibrosis progression) between F0 and F4 (cirrhosis). “Complications” refers to the two cirrhosis complications: decompensated cirrhosis and hepatocellular carcinoma The parameter values used in this analysis were mainly provided by epidemiological studies and were subject to uncertainty. This kind of model requires high computing time, and thus the sensitivity analysis using Monte-Carlo estimators of Sobol indices is difficult, due to the number of simulations needed. Following the conclusions of the previous section, we estimate Sobol indices using the Nadaraya-Watson non-parametric estimator. For comparison, we also represented the sensitivity using a Tornado diagram, classically used in epidemiology. To build the Tornado diagram, we first fix all the parameters but one to their values used in the analysis and we let the free parameter vary between the extremal values of its uncertainty interval. For each set of parameters thus obtained, the output Y is computed. Then, the parameters are sorted by decreasing variations of Y , and the deviation from the main analysis results is represented in a bar plot. Results are presented Figure 5. With the Sobol indices, we obtained consistent results. Since the Sobol indices can be interpreted as the contribution of each parameter to the variance of 15 Figure 5: Tornado diagram (above), and Sobol indices (below). The bars on the Tornado diagram are the variation intervals of Y when varying each parameter separately. Sobol indices have been estimated using the Nadaraya-Watson estimator. Parameters have been sorted by decreasing values of their Sobol indices. LTFU=loss to follow-up, HCC=Hepatocellular carcinoma, M=Male, F=Female. “Cessation” refers to the cessation of the injections. “F0/F1 > F2/F3” refers to the transition rate from a fibrosis score F0 or F1 to a fibrosis score F2 or F3 (and similarly for other rates). 16 Y , we can thus see that a large part of the variance of Y is explained by the infection rate per infected partner alone, with a Sobol index of 0.59, and by the transition rate from a fibrosis score of F0/F1 to a score of F2/F3, with a Sobol index of 0.31. Other parameters contribute only marginally, and particularly linkage to care/loss to follow-up rate, which represent only 4% of the whole variance, according to these results. With the Tornado diagram (obtained in [5]), the most sensitive parameters are the infection rate per infected injecting partner, the transition rate from a fibrosis score of F0/F1 to a score of F2/F3 and the combination of the linkage to care/loss to follow-up rate (which were varied together to estimate the impact of the uncertainty about the linkage to care of PWID). The Sobol indices and Tornado diagram indicate the same two first factors (infection rate per partner and transition rate from F0/F1 to F2/F3) that can impact Y . The Tornado diagram, which explores a much smaller region of the parameter space by the way it is constructed, detects more noisy contributions for the other factors. The latter appear in the Tornado in groups that corresponds to similar Sobol indices (linkage to care/LTFU rates, average time to diagnosis and cessation, relative risk of infection, mortality, F2/F3>F4). The order of these groups is by decreasing values of the Sobol indices. 4 Conclusions Sensitivity analysis is a key step in modelling studies, in particular in epidemiology. Models often have a high number of parameters, which are often seen as degrees of freedom to test scenarii and take into account several interplaying phenomena and factors... The computation of Sobol indices can indicate, among a long list of input parameters, which ones can have an important impact on the outputs. The classical estimators, like the Jansen estimator, require a large amount of requests to the function f that generates the output from the inputs. The reason is that the Sobol indices are approximated, in these cases, by quantities involving imbricated sums where parameters vary one by one. The literature on sensitivity analysis focuses on outputs that depend deterministically on the inputs. When there is randomness, it is natural to propose new approximations based on nonparametric estimations that require a lower number of calls to f since information brought by simulations with close input parameters can also be used. No meta-model is requested. Numerical study on toy models show that these estimators can also be used in deterministic settings too. The two estimators that we study are based on two non-parametric regression models: NadarayaWatson regression and wavelet decomposition. For both of them, we demonstrated that the MSE shows an elbow effect. On numerical toy examples, we obtained a better MSE with these estimators than with the Jansen estimator of same complexity. While the estimator using Nadaraya-Watson seems easier to calibrate, the wavelet regressions are justified as soon as there is a high frequency phenomenon in play. Moreover, when well-calibrated they can overcome some smoothing biases that can appear when the output is very noisy, which is the case in epidemic scenarii where there can be either large outbreaks or quick extinction due to stochasticity, for example. 5 5.1 Proofs Proof of Theorem 2.6 We follow the scheme of the proof of Theorem 1 in [18]. The main difficulty here is that we are not in a Gaussian framework and that we use the empirical process γ̄n , which introduces much 17 technical difficulties. In the sequel, C denotes a constant that can vary from line to line.  Using Lemma 2.3, we concentrate on the MSE E (θb` − V` )2 . First, we will prove that: h 2 i E θb` − V` − ζn ≤ inf J ⊂{−1,...,Jn } h 2 i E − θbJ ,` + V` + ζn + + C , n log2 (n) (5.1) where θbJ ,` has been defined in (2.20). Then, considering the first term in the r.h.s. of (5.1), we prove: h 2 i  log2 (n) + 2Jmax  E − θbJ ,` + V` + ζn ≤ C kh` − hJ ,` k42 + n2 + (5.2) Step 1: From (2.14), and letting AJ = θbJ ,` − V` − ζn , we have: θb` − V` − ζn = sup AJ . J ⊂{−1,...,Jn } Since h   i sup AJ ≤ max sup AJ + , inf AJ − , J we have that   E sup A2J ≤ J J X  2  E AJ + + J ⊂{−1,...,Jn } X ≤  2  E AJ + + J ⊂{−1,...,Jn } J inf  2  E AJ − inf  2  E V` − θbJ ,` + ζn + . J ⊂{−1,...,Jn } J ⊂{−1,...,Jn } (5.3) The second term correspond to what appears in (5.1) and will be treated in Step 4. Let us consider the first term of the r.h.s. We start by rewriting AJ =θbJ ,` − V` − ζn =kb hJ ,` k2 − pen(J ) − kh` k2 − ζn 2 2  = kb hJ ,` − hJ ,` k22 + khJ ,` k22 + 2hb hJ ,` − hJ ,` , hJ ,` i  − kh` − hJ ,` k22 + khJ ,` k22 + 2hh` − hJ ,` , hJ ,` i − ζn − pen(J ) =kb hJ ,` − hJ ,` k2 + 2hb hJ ,` − hJ ,` , hJ ,` i − kh` − hJ ,` k2 − ζn − pen(J ), 2 2 (5.4) since hh` − hJ ,` , hJ ,` i = 0 by definition of hJ ,` as projection of h` on the subspace generated by {ψjk , j ∈ J , k ∈ Z}. Thus:   2  2  E AJ + ≤ 2E kb hJ ,` − hJ ,` k22 − pen1 (J )  2  + 2E 2hb hJ ,` − hJ ,` , hJ ,` i − kh` − hJ ,` k22 − ζn − pen2 (J ) . (5.5) where pen1 (J ) = 4M 2 kϕJ k2∞ x2J 4M 2 xJ K2Jmax , and pen2 (J ) = + . n n n2 18 (5.6) Step 2: Upper bound of the first term in the r.h.s. of (5.5) Reformulation of kb hJ ,` − hJ ,` k22 The first term in the r.h.s. of (5.4) is the approximation error of hJ by b hJ ,` and equals XX 2 X X 2 kb hJ ,` − hJ ,` k22 = βbjk − βjk = γ̄n ψjk . j∈J k∈Z j∈J k∈Z To Pcontrol P it, let us introduce, for coefficients a = (ajk , −1 ≤ j ≤ Jn , k ∈ Z), the set F1,J = { j∈J k∈Z ajk ψjk , ajk ∈ Q, kak2 ≤ 1}, which is countable and dense in the unit ball of L2 ([0, 1]): XX γ̄n ψjk 2 1/2 XX = sup ajk γ̄n ψjk  kak2 ≤1 j∈J k∈Z j∈J k∈Z = sup γ̄n kak2 ≤1 = sup XX ajk ψjk  j∈J k∈Z γ̄n (f ) := χn (J ). (5.7) f ∈F1,J Let us introduce, for ρ > 0, X  ΩJ (ρ) = ∀j ∈ J , γ̄n (ψjk ) ≤ ρ2−j/2 . (5.8) k∈Z Then, to upper bound the first term in (5.5), we can write:  2  E kb hJ ,` − hJ ,` k22 − pen1 (J ) ≤ 2A1 (J ) + 2A2 (J ) (5.9) where  2  A1 (J ) = E χ2n (J )1lΩJ (ρ) − pen1 (J ) , and   A2 (J ) = E χ4n (J )1lΩcJ (ρ) . (5.10) The upper bounds of A1 (J ) and A2 (J ) make the object of the remainder of Step 2. We use ideas developed in [3]. To upper bound A1 (J ), we use the identity Z +∞  A1 (J ) = t P χ2n (J )1lΩJ (ρ) − pen1 (J ) > t dt, (5.11) 0 and look for deviation inequalities of χ2n (J )1lΩ(J )(ρ) . Then, estimates of the probability of ΩcJ (ρ) are studied to control A2 (J ). Deviation inequality for supa∈ΛJ γ̄n (f ) The supremum in (5.7) is obtained for ājk = γ̄n (ψjk ) . χn (J ) (5.12) On the set ΩJ (ρ) ∩ {χn (J > z}, for a constant z > 0 that shall be fixed in the sequel, we have for all j ∈ J , P X γ̄n (ψjk ) ρ2−j/2 ājk = k∈Z ≤ . χn (J ) z k∈Z 19 As a consequence, on the set ΩJ (ρ) ∩ {χn (J ) > z}, we can restrict the research of the optima to the set X  ρ2−j/2 ΛJ = a = (ajk )j≥−1,k∈Z ∈ Q{−1,... }×Z , ajk = 0 if j ∈ / J, ajk ≤ if j ∈ J , z k∈Z which is countable. We can then use Talagrand inequality (see [21, p.170]) to obtain that for all η > 0 and x > 0,    √ 1 1 + bn x ≤ e−x , (5.13) P sup γ̄n (f ) ≥ (1 + η)E sup γ̄n (f ) + 2νn x + 3 η a∈ΛJ a∈ΛJ  where E supa∈ΛJ γ̄n (f ) and where νn and bn can be chosen respectively as νn = M 2 /n and bn = 2M kψk∞ ρCard(J )/nz. Indeed, νn is an upper bound of:  XX XX 2  M 2 1 M2 sup Var Y1 ajk ψjk G` (X`1 ) ≤ sup , (5.14) ajk ψjk ≤ n a∈ΛJ n a∈ΛJ n 2 j∈J k∈Z j∈J k∈Z from the definition of ΛJ . As for the term bn , it can be obtained from:  XX XX  1 y ajk ψjk (u) − E Y1 ajk ψjk G` (X`1 ) sup sup n a∈ΛJ (u,y)∈[0,1]×R j∈J k∈Z j∈J k∈Z 2M X X 2M kψk∞ X ρ2−j/2 j/2 2M kψk∞ ρ Card(J ) ≤ |ajk |2j/2 kψk∞ ≤ 2 = . n n z nz j∈J k∈Z (5.15) j∈J For the expectation in the r.h.s. in the probability, we have: sX X    q  E γ̄n2 (ψjk ) E sup γ̄n (f ) ≤ E χn (J ) ≤ E χ2n (J ) = a∈ΛJ j∈J k∈Z s = XX 1  Var Y1 ψjk (G` (X`1 )) ≤ M n j∈J k∈Z r 2Jmax n (5.16) by using the Cauchy-Schwarz inequality and the fact that kψjk k22 = 1. Because supa∈AJ γ̄n (f ) ≥ χn (J )1lΩJ (ρ)∩{χn (J >z} , Equations (5.13)-(5.16) become: r r  2Jmax 2M 2 x 1 1  2M kψk∞ ρ Card(J )  P χn (J )1lΩJ (ρ)∩{χn (J )>z} ≥ (1+η)M + + + x ≤ e−x . n n 3 η nz q  1 1 Choosing z = 2x n 3 + η kψk∞ , we obtain:  P χn (J )1lΩJ (ρ)∩{χn (J )>z} ≥ (1 + η)M r r  2Jmax 2x + (1 + ρ)M Card(J ) ≤ e−x . n n  Choosing ρ = 13 + η1 kψk∞ , we can get rid of the constraint {χn (J ) > z} to evaluate the above probability and choosing x = xJ + ξ:  1h P χ2n (J )1lΩJ (ρ) − (1 + η)2 M 2 2Jmax + 2(1 + ρ)2 Card2 (J )xJ n  Jmax +1 √ i + 2(1 + ρ)(1 + η)M 2 2 2 Card(J ) xJ ≥ hJ (ξ) ≤ e−xJ e−ξ , 20 where i Jmax +1 p 2(1 + ρ)M 2 Card(J ) h ξ . (5.17) (1 + ρ)Card(J )ξ + (1 + η)2 2 n The square bracket in the l.h.s. inside the probability can be upper bounded by npen1 (J ) = K2Jmax , for a certain constant K that depends on xJ , since Card(J ) ≤ Jmax and since x2 ≤ 2x for all integers x ≥ 1. Then:    P χ2n (J )1lΩJ (ρ) − pen1 J ≥ hJ (ξ) ≤ e−xJ e−ξ . (5.18) hJ (ξ) = From this and (5.11), Z +∞ A1 (J ) ≤ −1 te−x e−hJ (t) dt. 0 To upper bound the r.h.s., we have to lower bound h−1 J (t) and hence upper bound hJ (t). The square bracket in (5.17) can be upper bounded by   2 J √ √ J  2 max  2 2(1 + η)2 max 2 ξ if ξ ≤ 2 1+η 2 1+ρ Card  2 J J max  2  2(1 + ρ)CardJ ξ if ξ > 2 1+η . 1+ρ Card2 J Then, for t ≥ 0: h−1 J (t) ≥    n2 t2 2 32(1+ρ)2 M 2 Card J (1+η)2 2Jmax nt 2 4(1+ρ)2 M 2 Card J if t≤ if t> 8M 2 (1+η)2 2Jmax n 8M 2 (1+η)2 2Jmax . n As a consequence, 8M 2 (1+η)2 2Jmax n  n2 t2 dt 32(1 + ρ)2 M 2 Card2 J (1 + η)2 2Jmax 0 Z +∞   nt −xJ dt + te exp − 8M 2 (1+η)2 2Jmax 4(1 + ρ)2 M 2 Card2 J n  2M 2 (1 + η)2 2Jmax i 32(1 + ρ)2 M 2 Card2 J (1 + η)2 2Jmax h ≤e−xJ 1 − exp − 2n2 (1 + ρ)2 Card2 J    16(1 + ρ)2 M 4 Card2 J 2(1 + η)2 2Jmax + (1 + ρ)2 Card2 J 2(1 + η)2 2Jmax  +e−xJ exp − n2 (1 + ρ)2 Card2 J C22Jmax −xJ ≤ e . (5.19) n2 Z A1 (J ) ≤  te−xJ exp − The latter upper bound determines the choice of Jmax . From the choice of xJ (2.8), we deduce that X C22Jn C A1 (J ) ≤ = . (5.20) 2 n n log2 (n) J ⊂{−1,...,J } n Upper bound of A2 (J ) For the term A2 (J ) of (5.9), noting that: j/2 |γ̄n (ψjk )| ≤M 2 −j/2 Z kψk∞ + M 2 ψ(u)du, R 21 we have for a constant C that depends only on the choice of ψ−10 and ψ00 : Z   2 i2 h X j/2 −j/2 × P ΩcJ (η) . ψ(u)du A2 (J ) ≤ C M 2 kψk∞ + M 2 (5.21) R j∈J Since: n h Y ψ G (X i ) − E Y ψ (G (X 1 )) 2 i Var Y ψ (G (X 1 )) X M2 i jk 1 jk 1 jk ` ` ` ` ` ` E = ≤ , n n n i=1   Yi ψjk G` (X`i ) − E Y1 ψjk (G` (X`1 )) 2M 2j/2 kψk∞ ≤ a.s. n n then we have by Bernstein’s inequality (e.g. [21]): P γ̄n (ψjk ) ≥ ρ2 As a consequence, X  X A2 (J ) ≤ J ⊂{−1,...Jn } −j/2  nρ2 2−j  ≤ 2 exp − . 2 M 2 + 2M kψk∞ ρ    22Jmax P ∃(j, k) ∈ J × Z, γ̄n (ψjk ) ≥ ρ2−j/2 J ⊂{−1,...Jn } X ≤C  23Jmax exp − J ⊂{−1,...Jn }  nρ2 2−Jmax  . 2 M 2 + 2M kψk∞ ρ (5.22) √ which is smaller than C/n2 for sufficiently large n, as Jmax ≤ Jn = log2 ( n). Step 3: Upper bound of the second term in the r.h.s. of (5.5) For the terms 2 to 4 of (5.4), 2hb hJ ,` − hJ ,` , hJ ,` i − kh` − hJ ,` k22 − ζn − pen2 (J ) XX  `  =2 γ̄n ψjk βjk − kh` − hJ ,` k22 − 2γ̄n h` − pen2 (J ) j∈J k∈Z =2γ̄n XX   ` ψjk − kh` − hJ ,` k22 − 2γ̄n h` − pen2 (J ) βjk j∈J k∈Z  =2γ̄n hJ ,` − h` − kh` − hJ ,` k22 − pen2 (J )  γ̄ h − h  2  h −h  n J ,` ` J ,` ` ≤ − pen2 (J ) = γ̄n2 − pen2 (J ), kh` − hJ ,` k2 kh` − hJ ,` k2 h (5.23) (5.24) −h ,` ` by using the identity 2ab − b2 ≤ a2 . Setting ϕJ = kh`J−h and using Bernstein’s formula (see J ,` k2 [21, p.25]), we have for all x > 0: r   2M 2 2M kϕJ k∞  P γ̄n ϕJ ≥ x+ x ≤ e−x . (5.25) n n Setting xJ + ξ as x in the above inequality and using that (a + b)2 ≤ 2a2 + 2b2 , this implies that    P γ̄n2 ϕJ − pen2 (J ) ≥ rn (ξ) ≤ e−xJ e−ξ , (5.26) 22 where pen2 (J ) has been defined in (5.6) and rn (x, ξ) = 4M 2 kϕJ k2∞ ξ 2 4M 2 ξ + . n2 n Then,  2  E 2hb hJ ,` − hJ ,` , hJ ,` i − kh` − hJ ,` k22 − ζn − pen2 (J ) + h i2   ≤E γ̄n2 ϕJ − pen2 (J ) Z +∞   t P γ̄n2 ϕJ − pen2 (J ) > t dt ≤C 0 r Z +∞   n tkϕJ k2∞ Ce−xJ ≤Ce−xJ t exp − 1 + − 1 dt ≤ . 2kϕJ k2∞ M n2 0 (5.27) The last inequality stems from the behaviour of the integrand when t is close to 0. Gathering the results of Steps 1 to 3, we have by (5.9) and (5.5) that the first term in the r.h.s. of (5.3) is smaller than C/(n log2 (n)). This proves (5.1). Step 4: h 2 i Let us now consider the term E − θbJ ,` + V` + ζn in (5.1). From (5.4) and (5.23): + h 2 i E − θbJ ,` + V` + ζn +   2  =E kh` − hJ ,` k22 − kb hJ ,` − hJ ,` k22 + 2γ̄n h` − hJ ,` + pen(J ) + h i2      hJ ,` − hJ ,` k22 − pen1 (J ) ≤4 kh` − hJ ,` k42 + 4E γ̄n2 h` − hJ ,` + E kb + pen22 (J ) , + (5.28) where DJ has been defined in (5.2). For the second term in the r.h.s. of (5.28), we have:     E γ̄n2 h` − hJ ,` =Var γ̄n h` − hJ ,` 2  M 2 kh` − hJ ,` k22 1  ≤ ≤ E Y12 h` (G` (X`1 )) − hJ ,` (G` (X`1 )) n n  1 ≤C 2 + kh` − hJ ,` k42 n (5.29) by using that 2ab ≤ a2 + b2 for the last inequality. The third term in the r.h.s. of (5.28) has been treated in (5.9) precedingly. We established an upper bound in 2Jmax /n2 . The fourth term, pen22 (J ) is in x2J /n2 ≤ C log2 (n)/n2 from (5.6). Gathering these results, we obtain (5.2) and then (2.26). 5.2 Proof of Corollary 2.8 Plugging (5.2) in (5.1), and using that   2M 2 kh` k22  2 , E ζn2 = Var Y1 h` G` (X`1 ) ≤ n n 23 (5.30) we obtain: h h 2 i E θb` − V` ≤C  inf J ⊂{−1,...,Jn } kh` − hJ ,` k42 + 2Jmax  1 + kh` k22 i + . n2 n (5.31) If h` ∈ B(α, 2, ∞), then from Proposition 2.7, we have for J = {−1, . . . , Jmax } that kh` − hJ ,` k42 ≤ 2−4α Jmax . Thus, for subsets J of the form considered, the infimum is attained when 2 choosing Jmax = 4α+1 log2 (n), which yield an upper bound in n8α/(4α+1) . For h` in a ball of radius R, kh` k22 ≤ R2 , and we can find an upper bound that does not depend on h. Because the last term in (5.31) is in 1/n, the elbow effect is obtained by comparing the order of the first term in the r.h.s. (n8α/(4α+1) ) with 1/n when α varies. 2 A Properties of βbjk Lemma A.1. lim n→+∞ √    ` ` = N 0, Var Y ψjk G` (X` ) n βbjk − βjk (A.1) where    2 (G` (X` )) . Var Y ψjk G` (X` ) = Var g` (X` )ψjk G` (X` ) + E η`2 ψjk Proof. Recall that Y i = g` (X`i ) + η`i . Then: 1 ` βbjk = n n X n g` (X`i )ψjk G` (X`i ) i=1   1X i + η` ψjk G` (X`i ) n i=1 n n   1 X  1 X ` i i =βjk + g` (X` )ψjk G` (X` ) − E g` (X` )ψjk (G` (X` )) + η`i ψjk G` (X`i ) . n n i=1 i=1 ` , defined as an The second term in the r.h.s. is a biais term due to the approximation of βjk integral, by a mean. The third term is due to the noise between Y i and g` (X`i ). The third term is centered as E(η` | X` ) = 0. Since the observations are i.i.d., we have by the central limit theorem that    n  1 X g` (X`i )ψjk G` (X`i ) − E g` (X` )ψjk (G` (X` )) lim √ = N (0, Σ) (A.2) 1 Pn i i n→+∞ n i=1 η` ψjk G` (X` ) n i=1 with  Σ=   Var g` (X` )ψjk G` (X` ) 0  . 0 Var η` ψjk G` (X` ) We have Var g` (X` )ψjk G` (X` )   2 2 =E g`2 (X` )ψjk G` (X` ) − βjk Z 1 X 2 2 2 = βjk ψjk (u) ψjk (u)du − βjk , 0 jk and as E(η` | X` ) = 0, we have   2 Var η` ψjk (G` (X` )) =E η`2 ψjk (G` (X` )) = Z  2 −j E η`2 | X` = G−1 ` (2 (v + k)) ψ (v)dv. R Using the Slutsky lemma concludes the proof.  24 B Sobol indices The Sobol indices are based on the following decomposition for f (see Sobol [25]). We recall the formulas here, with the notation Xp+1 for the random variable ε: Y = f (X1 , . . . , Xp , ε) = f0 + p+1 X X f` (X` ) + f`1 `2 (X`1 , X`2 ) + · · · + f1,...,p+1 (X1 , . . . , Xp , ε) 1≤`1 <`2 ≤p+1 `=1 (B.1) where f0 = E[Y ], f` (X` ) = E[Y |X` ] − E[Y ], f`1 `2 (X`1 , X`2 ) = E[Y |X`1 , X`2 ] − E[Y |X`1 ] − E[Y |X`2 ] − E[Y ], ... Then, the variance of Y can be written as: Var(Y ) = p+1 X X V` + `=1 V`1 `2 + · · · + V1...p+1 (B.2) 1≤`1 <`2 ≤p+1 where V` = Var(E[Y |X` ]), V1...p+1 = Var(Y ) − V`1 `2 = Var(E[Y |X`1 , X`2 ]) − V`1 − V`2 , . . . p+1 X `=1 X V` − 1≤`1 <`2 ≤p+1 X V`1 `2 − · · · − V`1 ...`p (B.3) 1≤`1 <···<`p ≤p+1 The first order indices are then defined as: S` = V` /Var(Y ) = Var(E[Y |X` ])/Var(Y ) (B.4) S` corresponds to the part of the variance that can be explained by the variance of Y due to the variable X` alone. In the same manner, we define the second order indices, third order indices, etc. by dividing the variance terms by Var(Y ). Acknowledgements: This study was funded by the French Agence Nationale de Recherche sur le Sida et les Hépatites virales (ANRS, http://www.anrs.fr), grant number 95146 and by Labex CEMPI (ANR-11-LABX-0007-01). V.C.T. also acknowledge support from the Chaire ”Modélisation Mathématique et Biodiversité” of Veolia Environnement-Ecole PolytechniqueMuseum National d’Histoire Naturelle-Fondation X. The authors would like to thank the working group previously involved in the development of the model for HCV transmission among PWID: Sylvie Deuffic-Burban, Jean-Stéphane Dhersin, Marie Jauffret-Roustide and Yazdan Yazdanpanah. Numerical results presented in this paper were carried out using the regional computational cluster supported by Université Lille 1, CPER Nord-Pas-de-Calais/FEDER, France Grille, CNRS. We would like to thank the technical staff of the CRI-Lille 1 center. References [1] H. Anderson and T. Britton. Stochastic Epidemic models and Their Statiatical Analysis, volume 151 of Lecture Notes in Statistics. Springer, New York, 2000. [2] S. Arlot and P. Massart. Data-driven calibration of penalties for least-squares regression. Journal of Machine Learning Research, 10:245–279, 2009. [3] G. Castellan. Sélection d’histogrammes ou de modèles exponentiels de polynômes par morceaux à l’aide d’un critère de type Akaike. PhD thesis, Université d’Orsay, 2000. 25 [4] G. Chagny. Penalization versus Goldenshluger-lepski strategies in warped bases regression. ESAIM: P&S, 17:328–358, 2013. [5] A. Cousien, V.C. Tran, S. Deuffic-Burban, M. Jauffret-Roustide, J.S. Dhersin, and Y. Yazdanpanah. Hepatitis C treatment as prevention of viral transmission and level-related morbidity in persons who inject drugs. Hepatology, 63(4):1090–101, 2016. [6] A. Cousien, V.C. Tran, S. Deuffic-Burban, M. Jauffret-Roustide, G. Mabileau, J.S. Dhersin, and Y. Yazdanpanah. Cost-effectiveness of risk reduction measures and improvements in the cascade of care of chronic hepatitis C in people who inject drugs. submitted, 2016. [7] S. Da Veiga and F. Gamboa. Efficient estimation of sensitivity indices. Journal of Nonparametric Statistics, 25(3):573–595, 2013. [8] O. Diekmann, J.A.P. Heesterbeek and T. Britton. Mathematical tools for understanding infectious disease dynamics. Princeton University Press, 2013. [9] J.-C. Fort, T. Klein, A. Lagnoux, and B. Laurent. Estimation of the Sobol indices in a linear functional multidimensional model. Journal of Statistical Planning and Inference, 143(9):1590–1605, 2013. [10] J. Grebely, G. V. Matthews, A. R. Lloyd, and G. J. Dore. Elimination of hepatitis c virus infection among people who inject drugs through treatment as prevention: feasibility and future requirements. Clinical infectious diseases, 57(7):1014–1020, 2013. [11] W. Härdle, G. Kerkyacharian, D. Picard, and A. Tsybakov. Wavelets, Approximation, and Statistical Applications, volume 129 of Lecture Notes in Statistics. Springer, New York, 1987. [12] T. Ishigami and T. Homma. An importance quantification technique in uncertainty analysis for computer models. In Proceedings of the ISUMA’90, First International Symposium on Uncertainty Modelling and Analysis, University of Maryland, USA, pages 398–403, December 3-5 1990. [13] J. Jacques. Contributions à l’analyse de sensibilité et à ’analyse discriminante généralisée. Phd thesis, Université Joseph Fourier, Grenoble, France, 2005. [14] J. Jacques. Pratique de l’analyse de sensibilité : comment évaluer l’impact des entrées aléatoires sur la sortie d’un modèle mathématique. Pub. IRMA Lille, 71(III), 2011. [15] A. Janon, M. Nodet, and C. Prieur. Uncertainties assessment in global sensitivity indices estimation from metamodels. International Journal for Uncertainty Quantification, 4(1):21– 36, 2014. [16] M.J.W. Jansen. Analysis of variance designs for model output. Computer Physics Communications, 117:35–43, 1999. [17] G. Kerkyacharian and D. Picard. Regression in random design and warped wavelets. Bernoulli, 10(6):1053–1105, 2004. [18] B. Laurent and P. Massart. Adaptive estimation of a quadratic functional by model selection. The Annals of Statistics, 28(5):1302–1338, 2000. [19] J.-M. Loubes, C. Marteau, and M. Solı́s. Rates of convergence in conditional covariance matrix estimation. 2014. arXiv:1310.8244. 26 [20] A. Marrel, B. Iooss, S. Da Veiga, and M. Ribatet. Global sensitivity analysis of stochastic computer models with joint metamodels. Statistics and Computing, 22(3):833–847, 2012. [21] P. Massart. Concentration Inequalities and Model Selection, volume 1896 of Lecture Notes in Mathematics. Jean Picard, Berlin Heidelberg, springer edition, 2007. Ecole d’Eté de Probabilités de Saint-Flour XXXIII-2003. [22] A. Saltelli, P. Annoni, I. Azzini, F. Campolongo, M. Ratto and S. Tarantola. Variance based sensitivity analysis of model output. Design and estimator for the total sensitivity index. Computer Physics Communications, 181:259–270, 2010. [23] A. Saltelli, K. Chan, and E.M. Scott. Sensitivity analysis. Wiley Series in Probability and Statistics. John Wiley & Sons, Chichester, 2000. [24] A. Saltelli, M. Ratto, T. Andres, F. Campolongo, J. Cariboni, D. Gatelli, M. Saisana, and S. Tarantola. Global sensitivity analysis. John Wiley & Sons, Chichester, 2008. [25] I.M. Sobol. Sensitivity estimates for nonlinear mathematical models. Math. Modeling Comput. Experiment, 1(4):407–414, 1993. [26] M. Solı́s. Conditional covariance estimation for dimension reduction and sensivity analysis. Phd thesis, Université de Toulouse, Université Toulouse III-Paul Sabatier, Toulouse, France, 2014. [27] Lorna E Thorpe, Lawrence J Ouellet, Ronald Hershow, Susan L Bailey, Ian T Williams, John Williamson, Edgar R Monterroso, and Richard S Garfein. Risk of hepatitis c virus infection among young adult injection drug users who share injection equipment. American journal of epidemiology, 155(7):645–653, 2002. [28] V.C. Tran. Une ballade en forêts aléatoires. Théorèmes limites pour des populations structurées et leurs généalogies, étude probabiliste et statistique de modèles SIR en épidémiologie, contributions à la géométrie aléatoire. Habilitation à diriger des recherches, Université de Lille 1, 11 2014. http://tel.archives-ouvertes.fr/tel-01087229. [29] A.B. Tsybakov. Introduction à l’estimation non-paramétrique, volume 41 of Mathématiques & Applications. Springer, 2004. [30] WHO. Hepatitis C Fact Sheet 164, 2014. 27
10math.ST
k-Nearest Neighbors on Road Networks: A Journey in Experimentation and In-Memory Implementation Technical Report Tenindra Abeywickrama, Muhammad Aamir Cheema, David Taniar Faculty of Information Technology, Monash University, Australia arXiv:1601.01549v2 [cs.DS] 10 Aug 2016 {tenindra.abeywickrama,aamir.cheema,david.taniar}@monash.edu ABSTRACT ignore the objects that cannot be kNNs but also the road network vertices that are not associated with objects. Recently, there has been a large body of work to answer kNN queries on road networks. Some of the most notable algorithms include Incremental Network Expansion (INE) [23], Incremental Euclidean Restriction (IER) [23], Distance Browsing [25], Route Overlay and Association Directory (ROAD) [20, 21], and G-tree [30, 31]. In this paper, we conduct a thorough experimental evaluation of these algorithms. This is the extended technical report of a conference paper [6]. A k nearest neighbor (kNN) query on road networks retrieves the k closest points of interest (POIs) by their network distances from a given location. Today, in the era of ubiquitous mobile computing, this is a highly pertinent query. While Euclidean distance has been used as a heuristic to search for the closest POIs by their road network distance, its efficacy has not been thoroughly investigated. The most recent methods have shown significant improvement in query performance. Earlier studies, which proposed disk-based indexes, were compared to the current state-of-the-art in main memory. However, recent studies have shown that main memory comparisons can be challenging and require careful adaptation. This paper presents an extensive experimental investigation in main memory to settle these and several other issues. We use efficient and fair memory-resident implementations of each method to reproduce past experiments and conduct additional comparisons for several overlooked evaluations. Notably we revisit a previously discarded technique (IER) showing that, through a simple improvement, it is often the best performing technique. 1. 1.1 Motivation 1. Neglected Competitor. IER [23] was among the first kNN algorithms on road networks. It has often been the worst performing method and as a result is no longer included in comparisons. The basic idea of IER is to compute shortest path distances using Dijkstra’s algorithm to the closest objects in terms of Euclidean distance. Although many significantly faster shortest path algorithms have been proposed in recent years, surprisingly, IER has never been compared against other kNN methods using any algorithm other than Dijkstra. To ascertain the true performance of IER it must be integrated with state-of-the-art shortest path algorithms. 2. Discrepancies in Existing Results. We note several discrepancies in the experimental results reported in some of the most notable papers on this topic. ROAD is seen to perform significantly worse than Distance Browsing and INE in [30]. But according to [20], ROAD is experimentally superior to both Distance Browsing and INE. The results in both [20] and [30] show Distance Browsing has worse performance than INE. In contrast, Distance Browsing is shown to be more efficient than INE in [25]. These contradictions identify the need for reproducibility. 3. Implementation Does Matter. Similar to a recent study [28], we observe that simple implementation choices can significantly affect algorithm performance. For example, G-tree utilizes distance matrices that can be implemented using either hash-tables or arrays and, on the surface, both seem reasonable choices. However the array implementation in fact performs more than an order of magnitude faster than the hash-table implementation. We show that this is due to data locality in G-tree’s index and its impact on cache performance. In short, seemingly innocuous choices can drastically change experimental outcomes. We also believe discrepancies reported above may well be due to different choices made by the implementers. Thus it is critical to provide a fair comparison of existing kNN algorithms using careful in-memory implementations. 4. Overlooked Evaluation Measures/Settings. All methods studied in this paper decouple the road network index from that of the set of objects, i.e. one index is created for the road network and another to store the set of objects. Although existing studies evaluate the road network indexes, no study evaluates the behaviour of each INTRODUCTION Cisco reports that more than half a billion mobile devices were activated in 2013 alone, and 77% of those devices were smartphones. Due to the surge in adoption of smartphones and other GPS-enabled devices, and cheap wireless network bandwidth, mapbased services have become ubiquitous. For instance, the GlobalWebIndex reported that Google Maps was the most used smartphone app in 2013 with 54% of smartphone users having used it [1]. Finding nearby facilities (e.g., restaurants, ATMs) are among the most popular queries issued on maps. Due to their popularity and importance, k nearest neighbor (kNN) queries, which find the k closest points of interest (objects) to a given query location, have been extensively studied in the past. While related to the shortest path problem in many ways, the kNN problem on road networks introduces new challenges. Since the total number of objects is usually much larger than k it is not efficient to compute the shortest paths (or network distances) to all objects to determine which are kNNs. The challenge is to not only 1 object vertices O, a kNN query retrieves the k closest objects in O based on their network distances from q. individual object index. The construction time and storage cost for these object indexes may be critical information for developers when choosing methods, especially for object sets that change regularly. Additionally kNN queries have not been investigated for travel time graphs (only travel distance), which is also a common scenario in practice. Finally the more recent techniques (G-tree and ROAD) did not include comparisons for real-world POIs. 1.2 2.2 Contributions Below we summarize the contributions we make in this paper. 1. Revived IER: We investigate IER with several efficient shortest path techniques for the first time (see Section 5). We show that the performance of IER is significantly improved when better shortest path algorithms are used. This occurs to the point that IER is the best performing method in most settings, including travel time road networks where Euclidean distance is a less effective lower bound. 2. Highly Optimised Algorithms Open-Sourced: We present efficient implementations of five of the most notable methods (IER, INE, Distance Browsing, ROAD and G-tree). Firstly we have carefully implemented each method for efficient performance in main memory as described in Section 6. Secondly we thoroughly checked each algorithm and made various improvements that are applicable in any setting, as documented in Appendix A. The source code and scripts to run experiments have been released as open-source [2], making our best effort to ensure it is modular and re-usable. 3. Reproducibility Study: With efficient implementations of each algorithm, we repeat many experiments from past studies on many of the same datasets in Section 7. Our results provide a deeper understanding of the state-of-the-art with new insights into the weaknesses and strengths of each technique. We also show that there is room to improve kNN search heuristics by demonstrating that G-tree can be made more efficient by using Euclidean distances. 4. Extended Experiments and Analysis: Our comprehensive experimental study in Section 7 extends beyond past studies by: 1) comparing object indexes for the first time; 2) revealing new trends by comparing G-tree with another advanced method (ROAD) on larger datasets for the first time; 3) evaluating all methods (including ROAD and G-tree) on real-world POIs; and 4) evaluating applicable methods on travel time road networks. 5. Guidance on Main-Memory Implementations: In Section 6 we also demonstrate how simple choices can severely impact algorithm performance. We share an in-depth case study to give insights into the relationship between algorithms and in-memory performance with respect to data locality and cache efficiency. Additionally we highlight the main choices involved and illustrate them through examples and experimental results, to provide hints to future implementers. Significantly, these insights are potentially applicable to any problem, not just those we study here. 2. 2.1 Scope We separate existing kNN techniques into two broad categories based on the indexing they use: 1) blended indexing; and 2) decoupled indexing. Techniques that use blended indexing [11, 15, 19] create a single index to store the objects as well the road network. For example, VN3 [19] is a notable technique that uses a network Voronoi diagram based on the set of objects to partition the network. In contrast, decoupled indexing techniques [20, 23, 25, 30] use two separate indexes for the object set and road network, which is more practical and has several advantages as explained below. Firstly, a real-world kNN query may be applied to one of many object sets, e.g., return the k closest restaurants or locate the nearest parking space. Blended indexing must repeatedly index the road network for each type of object, entailing huge space and preprocessing time overheads. But decoupled indexing requires only one road network index regardless of the number of object sets, resulting in lower storage and pre-processing cost. Secondly, if there is any change in an object set, blended indexing must update the whole index and reprocess the entire road network, whereas decoupled techniques need only update the object index. For example, the network-based Voronoi diagram must be updated resulting in expensive re-computations [19]. Conversely, in decoupled indexing, the object indexes (e.g., R-tree) are typically much cheaper to update. The problem is more serious for object sets that change often, e.g., if the objects are the nearest available parking spaces. Due to these advantages, all recent kNN techniques use decoupled indexing. In this paper, we focus on the most notable kNN algorithms that employ decoupled indexing. These algorithms either employ an expansion-based method or a heuristic best-first search (BFS). The expansion-based methods encounter kNNs in network distance order. Heuristic BFS methods instead employ heuristics to evaluate the most promising kNN candidates, not necessarily in network distance order, potentially terminating sooner. We study the five most notable methods which include two expansion-based methods, INE [23] and ROAD [20], and three heuristic BFS methods, IER [23], Distance Browsing (DisBrw) [25] and G-tree [30]. Given the rapid growth in smartphones and the corresponding widespread use of map-based services, applications must employ fast in-memory query processing to meet the high query workload. In-memory processing has become viable due to the increases in main-memory capacities and its affordability. Thus, we limit our study to in-memory query processing. However, we remark that disk-based settings are also important but are beyond the scope of this paper mainly due to the space limitation. 3. METHODS We now describe the main ideas behind each method evaluated by our study. Some methods propose a road network index and a kNN query algorithm to use it. In some cases, such as G-tree, we refer to both the index and kNN algorithm by the same name. BACKGROUND Problem Definition We represent a road network as a connected undirected graph G = (V, E) where V is the set of vertices and E is the set of edges. For two adjacent vertices u, v ∈ V , we define the edge between them as e(u, v), with weight w(u, v) representing any positive measure such as distance or travel time. We define the shortest path distance, hereafter network distance, between any two vertices u, v ∈ V as d(u, v), the minimum sum of weights connecting u and v. For conceptual simplicity, similar to the existing studies [25, 30], we assume that each object (i.e., POI) and query is located on some vertex in V . Given a query vertex q and a set of 3.1 Incremental Network Expansion Incremental Network Expansion (INE) [23] is a method derived from Dijkstra’s algorithm. As in Dijkstra, INE maintains a priority queue of the vertices seen so far (initialised with the query vertex q). The search is expanded to the nearest of these vertices v. If v ∈ O then it is added to the result set as one of the kNNs and if v is the kth object then the search is terminated. Otherwise the edges of v are used to relax the distances to its neighbors and the expansion continues. As in Dijkstra’s algorithm, relaxation involves 2 v1 v10 v6 v2 v8 v3 v4 v5 v7 v9 v2 v12 v1 R1a R1 v10 R1b v3 v4 v6 v7 v8 R2a v5 v11 v9 R2b v12 v11 R2 Figure 2: ROAD Figure 1: SILC: Coloring Scheme and Quadtree for v6 of v. For example, in Figure 1, the first vertex on the shortest path from v6 to v12 is v8 because v12 has the same color as v8 . The color of v12 is found by locating the quadtree block containing v12 . The shortest path can be computed in O(m log |V |) where m is the number of edges on the shortest path [25]. kNN Algorithm. To enable kNN search, DisBrw stores additional information in each quadtree. For each vertex v contained in a quadtree block b, it computes the ratio of the Euclidean and network distances between the quadtree owner s and v. It then stores the minimum and maximum ratios, λ− and λ+ respectively, with b. Now, given any vertex t, DisBrw computes a distance interval [δ − , δ + ] by multiplying the Euclidean distance from s to t by the λ− and λ+ values of the block containing t. This interval defines a lower and upper bound on the network distance from s to t and can be used to prune objects that cannot be kNNs. The interval is refined by obtaining the next vertex u in the shortest path from s to t (as described earlier), computing an interval for u to t, and then adding the known distance from s to u to the new interval. By refining the interval, it eventually converges to the network distance. DisBrw used an Object Hierarchy in [25] to avoid computing distance intervals for all objects. The basic idea was to compute distance intervals for regions containing objects, then visit the most promising regions (and recursively sub-regions) first. We found this method did not use the SILC index to its full potential. Instead we retrieve Euclidean NNs as candidate objects for which intervals are then computed. Otherwise, the DisBrw kNN algorithm proceeds exactly as in [25]. We refer the readers to Appendix A.1.1 for full details and experimental comparisons with the original method. updating the minimum network distances to the neighbors of v using the network distance through v. The disadvantage of INE is that it visits all nodes closer to q than the kth object, which may be considerable if this object is far from q. 3.2 Incremental Euclidean Restriction Incremental Euclidean Restriction (IER) [23] uses Euclidean distance as a heuristic to retrieve candidates from O, as it is a lower bound on network distance for road networks with travel distance edges. Firstly, IER retrieves the Euclidean kNNs, e.g., using an Rtree [24]. It then computes the network distance to each of these k objects and sorts them in this order. This set becomes the candidate kNNs and the network distance to the furthest candidate (denoted as Dk ) is an upper bound on the distance to the true kth nearest neighbor. Now, IER retrieves the next nearest Euclidean neighbor p. If the Euclidean distance to p is dE (q, p) and dE (q, p) ≥ Dk , then p cannot be a better candidate by network distance than any current candidate. Moreover, since it is the nearest Euclidean neighbor, the search can be terminated. However, if dE (q, p) < Dk then p may be a better candidate. In this case, IER computes the network distance d(q, p). If d(q, p) < DK , p is inserted into the candidate set (removing the furthest candidate and updating Dk ). This continues until the search is terminated or there are no more Euclidean NNs. 3.3 Distance Browsing Distance Browsing (DisBrw) [25] uses the Spatially Induced Linkage Cognizance (SILC) index proposed in [26] to answer kNN queries. [26] proposed an incremental kNN algorithm, which DisBrw improves upon by making fewer priority queue insertions. SILC Index. We first introduce the SILC index used by DisBrw. For a vertex s ∈ V , SILC pre-computes the shortest paths from s to all other vertices. SILC assigns each adjacent vertex of s a unique color. Then, each vertex u ∈ V is assigned the same color as the adjacent vertex v that is passed through in the shortest path from s to u. Figure 1 shows the coloring of the vertices for the vertex s=v6 where each adjacent vertex of v6 is assigned a unique color and the other vertices are colored accordingly. For example, the vertices v9 to v12 have the same color as v8 (blue vertical stripes) because the shortest path from v6 to each of these vertices passes through v8 (for this example assume unit edge weights). Observe that the vertices close to each other have the same color resulting in several contiguous regions of the same color. These regions are indexed by a region quadtree [24] to reduce the storage space. The color of a vertex can be determined by locating the region in the quadtree that contains it. SILC applies the coloring scheme and creates a quadtree for each vertex of the road network. This requires O(|V |1.5 ) space in total and, due to the all-pairs shortest path computation, O(|V |2 log |V |) pre-processing time. To compute the shortest path from s to t, SILC uses the quadtree of s to identify the color of t. The color of t determines the first vertex v on the shortest path from s to t. To determine the next vertex on the shortest path, this procedure is repeated on the quadtree 3.4 Route Overlay & Association Directory The search space of INE can be considerably large depending on the distance to the kth object. Route Overlay and Association Directory (ROAD) [20, 21] attempts to remedy this by bypassing regions that do not contain objects by using search space pruning. An Rnet is a partition of the road network G=(V, E), with every edge in E belonging to at least one Rnet. Thus, an Rnet R represents a set of edges ER ⊆ E. VR is the set of vertices that are associated with edges in ER . To create Rnets, ROAD partitions the road network G into f ≥ 2 Rnets, recursively partitioning resulting Rnets until a hierarchy of l > 1 levels is formed (with G being the root at level 0). Figure 2 shows Rnets (for l=2) for the graph in our running example. The enclosing boxes and ovals represent the set VR of each Rnet. Specifically, R1 ={v1 , · · · , v7 } and R2 ={v6 , · · · , v12 } are the child Rnets of the root G. Each of R1 and R2 are further divided into Rnets, e.g., R1 is divided into R1a ={v1 , v2 , v3 , v4 } and R1b ={v4 , v5 , v6 , v7 }. For an Rnet R, a vertex b ∈ VR with an adjacent edge e(b, v) ∈ / ER is defined as a border of R. For instance, v4 is a border of R1b but v5 is not. These borders form the set BR ⊆ VR , e.g., the border set of R1b consists of v4 , v6 and v7 . ROAD computes the network distance between every pair of borders bi , bj ∈ BR in each Rnet and stores each as the shortcut S(bi , bj ). Now any shortest path between two vertices s, t ∈ / VR involving a vertex u ∈ VR must enter R through a border b ∈ BR and leave through a border b0 ∈ BR . 3 G0 v2 v8 G1A v1 v3 G1 v4 G1B v6 v5 v7 G2 G2A v9 Name DE VT ME CO NW CA E W C US v10 G2B v12 v11 Figure 3: G-tree So if a search reaches a border b ∈ BR the shortcuts associated with b, S(b, b0 ) ∀ b0 ∈ BR , can be traversed to bypass the Rnet R while preserving network distances. For example, in Figure 2, the borders of R1b are v4 , v6 and v7 (the colored vertices) and ROAD precomputes the shortcuts between all these borders. Suppose the query vertex is v1 and the search has reached the vertex v4 . If it is known that R1b does not contain any object, the algorithm can bypass R1b by quickly expanding the search to other borders of R1b without the need to access any non-border vertex of R1b . E.g., using the shortcut between v4 and v7 , the algorithm can compute the distance between v1 to v7 without exploring any vertex in R1b . Since child Rnets are contained by their parent Rnet, a border b of an Rnet must be a border of some child Rnet at each lower level. For example, v6 in Figure 2 is a border for R1b and its parent R1 . This allows the shortcuts to be computed in a bottom-up manner, where shortcuts at level i are computed using those of level i+1, greatly reducing pre-computation cost. Only leaf Rnets require a Dijkstra’s search on the original graph G. ROAD uses a Route Overlay index and an Association Directory to efficiently compute kNNs. Recall that a vertex v may be a border of more than one Rnet. The Route Overlay index stores, for each vertex v, the Rnets for which it is a border along with the shortcut trees of v. The Association Directory provides a means to check whether a given Rnet or vertex contains an object or not. The kNN algorithm proceeds incrementally from the query vertex q in a similar fashion to INE. However, when ROAD expands to a new vertex v, instead of inspecting its neighbors, it consults the Route Overlay and Association Directory to find the highest level Rnet associated with it that does not contain any object. ROAD then relaxes all the shortcuts in this Rnet in a similar way to edges in INE, to bypass it. Of course when v is not a border of any Rnet or if all Rnets associated with v contain an object, it relaxes the edges of v exactly as in INE. The search terminates when k objects have been found or there are no further vertices to expand. 3.5 Region Delaware Vermont Maine Colorado North-West US California & Nevada Eastern US Western US Central US United States # Vertices 48,812 95,672 187,315 435,666 1,089,933 1,890,815 3,598,623 6,262,104 14,081,816 23,947,347 # Edges 119,004 209,288 412,352 1,042,400 2,545,844 4,630,444 8,708,058 15,119,284 33,866,826 57,708,624 Table 1: Road Network Datasets ders. For leaf nodes, it stores the network distance between each of its borders and the vertices contained in it. Similar to the bottom-up computation of shortcuts in ROAD, the distance matrix of nodes at tree level i can be efficiently computed by reducing the graph to only consist of borders at level i+1 using the distance matrices of that level. Only leaf nodes require a Dijkstra’s search on the original graph. Given a planar graph and optimal partitioning method, G-tree is a height-balanced tree with a space complexity of O(|V | log |V |). The similarities with ROAD are clear. One major difference is that G-tree uses its border-toborder distance matrices to “assemble” shortest path distances by the path through the G-tree hierarchy. We refer the reader to the original paper [30] for the details of the assembly method. Another key difference is the kNN algorithm. To support efficient kNN queries, G-tree introduces the Occurrence List. Given an object set O, the Occurrence List of a G-tree node Gi lists its children that contain objects, allowing empty nodes to be pruned. The kNN algorithm begins from the leaf node that contains q, using an Dijkstra-like search to retrieve leaf objects. However, we found this leaf search could be further optimised and detail our improved leaf search algorithm in Appendix A.2.1. The algorithm then incrementally traverses the G-tree hierarchy from the source leaf. Elements (nodes or objects) are inserted into a priority queue using their network distances from q. The network distance to a G-tree node is computed using the assembly method by finding its nearest border to q. Queue elements are dequeued in a loop. If the dequeued element is a node, its Occurrence List is used to insert its children (nodes or object vertices) back into the priority queue. If the dequeued element is a vertex, it is guaranteed to be the next nearest object. The search terminates when k objects are dequeued. A useful property of assembling distances is that, given a path through the G-tree hierarchy, distances can be materialized for already visited G-tree nodes. For example, given a query vertex q and two kNN objects in the same leaf node, after locating one of them, the distances to the borders of this leaf need not be recomputed. G-tree G-tree [30, 31] also employs graph partitioning to create a tree index that can be used to efficiently compute network distances through a hierarchy of subgraphs. The partitioning occurs in a similar way to that of ROAD where the input graph G is partitioned into f ≥ 2 subgraphs. Each subgraph is recursively partitioned until it contains no more than τ ≥ 1 vertices. For any subgraph Gi , Vi ⊆ V is defined as the set of road network vertices contained within it. Any vertex b ∈ Vi with an edge e(b, v) where v ∈ / Vi is defined as a border of Gi and all such vertices form the set of borders Bi . Figure 3 shows an example where the colored vertices v5 and v6 are borders for the subgraph G1 ={v1 , · · · , v6 }. The partitioned subgraphs naturally form a tree hierarchy with each node in the G-tree associated with one subgraph. Note that we use node to refer to the G-tree node while vertex refers to road network vertices. Notably a non-leaf node Gi does not need to store subgraph vertices, but only the set of borders Bi and a distance matrix. For non-leaf nodes, the distance matrix stores the network distance from each child node border to all other child node bor- 4. DATASETS Here we describe the datasets used to supply the road network G=(V, E) and set of object vertices O ⊆ V for kNN querying. 4.1 Real Road Networks We study kNN queries on 10 real-world road network graphs as listed in Table 1. These were created for the 9th DIMACS Challenge [3] from data publicly released by the US Census Bureau. Each network covers all types of roads, including local roads, and contains real edge weights for travel distances and travel times (both are used in our experiments). We also conduct in-depth studies for the United States (US) and North-West US (NW) road networks. The US dataset, covering the entire continental United 4 North-West US Size Density 4,441 0.004 5,098 0.005 1,328 0.001 1,403 0.001 258 0.0002 460 0.0004 95 0.00009 49 0.00005 106 105 10 10 4 103 102 10 1 100 Dijk MGtree 1 5 10 PHL TNR 25 CH 50 k 5 Dijk MGtree PHL TNR CH 104 10 3 102 10 1 0.0001 0.001 0.01 0.1 1 Density (a) Varying k (b) Varying Density Figure 4: IER Variants (NW, d=0.001, k=10, uniform objects) Table 2: Real-World Object Sets max distance from vc to each object in Ri is at least 2D m−i+1 . For exam, ple for m=5, the set R1 contains objects within the range ( Dmax 32 Dmax ]. Thus we investigate the effect of increasing minimum object distance by comparing query time on Ri with increasing i. States, is the largest with 24 million vertices. The NW road network (with 1 million vertices), covering Oregon and Washington, represents queries limited to a smaller region or country. Notably this is the first time DisBrw has been evaluated on a network with more than 500, 000 vertices, previously not possible due to its high pre-processing cost (in terms of both space and time). 4.2 106 Query Time (µs) Schools Parks Fast Food Post Offices Hospitals Hotels Universities Courthouses United States Size Density 160,525 0.007 69,338 0.003 25,069 0.001 21,319 0.0009 11,417 0.0005 8,742 0.0004 3,954 0.0002 2,161 0.00009 Query Time (µs) Object Set 5. IER REVISITED Network distance computation is a critical part of IER. However, to the best of our knowledge, all existing studies [20, 21, 23, 25] employ Dijkstra’s algorithm to compute network distances. Dijkstra’s algorithm is not only slow but it must also revisit the same vertices for subsequent network distance computations. Even if Dijkstra’s algorithm is suspended and resumed for subsequent Euclidean NNs, this is necessarily no better than INE, which uses Dijkstra-like expansion until kNNs are found. To understand the true potential of IER, we combined it with several fast techniques. Pruned Highway Labelling [7] is amongst the fastest techniques. It boasts fast construction times despite being a labelling method, but has similarly large index sizes. The G-tree assembly-based method mentioned earlier can also compute network distances. Notably, in a similar manner to G-tree’s kNN search, the “materialization” property can be used to optimise repeated network distance queries from the same source (as in IER). The Dijkstra-like leaf-search can also be suspended and resumed. This is doubly advantageous for IER, as it becomes more robust to “false hits” (Euclidean NNs that are not real kNNs), especially if they are in the vicinity of a real kNN. We refer to this version of G-tree as MGtree. Finally we combined IER with Contraction Hierarchies (CH) [13] and Transit Node Routing (TNR) [8] using implementations made available by a recent experimental paper [29]. We use a grid size of 128 for TNR as in [29]. We compare the performance of IER using each method in Figure 4. PHL is the consistent winner, being 4 orders of magnitude faster than Dijkstra and an order of magnitude better than the next fastest method at its peak. G-tree, assisted by materialization, is the next best method. All methods converge with increasing density, as the search space becomes smaller. Note that CH is the technique used to answer local queries in TNR, which explains why TNR and CH are so similar for high densities as the distances are too small to use transit nodes. At lower densities, transit nodes are used more often, leading to a larger speed up. Given these results, in our main experiments, we include the two fastest versions of IER, i.e., PHL and MGtree. Note that the superiority of PHL and MGtree is also observed for other road networks and object sets. Real and Synthetic Object Sets We create object sets based on both real-world points of interest (POIs) and synthetic methods as described below. Real-World POI Sets. We created 8 real-world object sets (listed in Table 2) using data extracted from OpenStreetMap (OSM) [4] for locations of real-world POIs in the United States. Each object set is associated with a particular type of POI, e.g., all fast food outlets. POIs were mapped to road network vertices on both the US and NW road networks using their coordinates. While real POIs can be obtained freely from OSM, it is not a propriety system. As a result the data quality can vary, e.g., the largest object sets in OSM may not be representative of the true largest object sets and the completeness of POI data may vary between regions. So, in addition to real-world object sets, we generate synthetic sets to make generalizable and repeatable observations for all road networks. Uniform Object Sets. A uniform object set is generated by selecting uniformly random vertices from the road network. As these objects are randomly selected road network vertices, they are likely to simulate real POIs, e.g., areas with more vertices have more POIs (e.g., cities) while those with fewer roads have less (e.g., rural areas). The density of objects sets d is varied from 0.0001 to 1, where d is the ratio of the number of objects |O| to the number of vertices |V | in the road network. High densities can simulate larger object sets which are common occurrences, e.g., ATM machines, parking spaces. Low densities correspond to the sparsely located POIs, e.g., post offices or restaurants in a particular chain. By decreasing the density we can simulate more difficult queries, as fewer objects imply longer distances and therefore larger search spaces. Uniform objects were used to evaluate G-tree in [30, 31]. Clustered Object Sets. While some POIs may be uniformly distributed other types, such as fast food outlets, occur in clusters. To create such clustered object sets, given a number of clusters |C|, we select |C| central vertices uniformly at random (as above). For each central vertex, we select several vertices (up to a maximum cluster size Cmax ) in its vicinity, by expanding outwards from it. This distribution was used to evaluate ROAD in [20]. Minimum Object Distance Sets. The worst-case kNN query occurs when the query location is remote. To simulate this we create minimum distance object sets as follows. We choose an approximate centre vertex vc by using the nearest vertex to the Euclidean centre of the road network. We find the furthest vertex vf from vc and set Dmax as the network distance from vc to vf . For an object set Ri , i ∈ [1, m], we choose |O| objects such that the network 6. IMPLEMENTATION IN MAIN MEMORY Given the affordability of memory, the capacities available and the demand for high performance map-based services, memoryresident query processing is a realistic and often necessary requirement. However, we have seen in-memory implementation efficiency can affect performance to the point that algorithmic efficiency becomes irrelevant [28]. Firstly, this identifies the need to 5 G1 v5 v6 v7 v8 v2 v3 G1 G1A v2 v3 v4 v5 v6 v6 G2 G1B v4 v5 G2 Query Time (µs) G1B v5 103 102 Chained Hashing Quad. Probing Array 1 1 5 10 25 50 k 10 Chained Hashing Quad. Probing Array 3 102 10 1 0.0001 0.001 0.01 0.1 1 Density (a) Varying k (b) Varying Density Figure 6: Distance Matrix Variants (NW, d=0.001, k=10) v7 v8 to leaf border distances). Now we compute the distance to each border of G1 from v1 , by finding the minimum distance through one of G1A ’s borders. To do this, for each of G1A ’s borders, we iterate over G1 ’s borders, retrieving distance matrix values for each pair (updating the minimum when a smaller distance is found). This is shown by the shaded cells in Figure 5(a). Similarly G1 and its sibling G2 are the next nodes in the tree path, and we again retrieve distance matrix values by iterating over two lists of borders. These values are retrieved from the matrix of the LCA node, G0 , and the values accessed are shaded in Figure 5(b). As we are iterating over lists (i.e., arrays) of borders, the distance matrix does not need to be accessed in an arbitrary order, as we observed in the G-tree authors’ implementation. This is made possible by grouping the borders of child nodes as shown in Figure 5 and storing the starting index for each child’s borders. Additionally we create an offset array indicating the position of the nodes’ own borders in its distance matrix. For example, the offset array for G1 indicates its borders (v5 and v6 ) are at the 3rd and 4th index of each row in its distance matrix shown in Figure 5(a). While Figure 5 shows the distance matrix as a 2D array, it is best implemented as a 1D array. This and the previously described accessed method, allow all shaded values to be accessed from sequential memory locations, thus displaying excellent spatial locality. This is shown in Figure 5 as the shaded cells are either contiguous or very close to being so. Spatial locality makes the code cache-friendly, allowing the CPU to easily predict and pre-fetch data into cache that will be read next. Otherwise the data would need to be retrieved from memory, which is 20−200× slower than CPU cache (depending on the level). This effect is amplified in real road networks as they contain significantly larger numbers of borders per node. We compare three implementations of distance matrices, including the 1D array described above and two types of hash-tables: chained hashing [12] (STL unordered map); and quadratic probing [12] (Google dense hash map). In Figure 6, chained hashing is a staggering 30 times slower than the array. While quadratic probing is an improvement, it is still an order of magnitude slower. Had we used either of the hash-table types, we would have unfairly concluded that G-tree was the worst performing algorithm. (a) G1 (b) G0 Figure 5: Distance Matrices understand how this can happen so that guidelines for efficient implementation may be developed. Secondly, it implies that some algorithms may possess intrinsic qualities that make them superior in-memory. The utility of the latter cannot be ignored. We first illustrate both aforementioned points using a case study and then outline typical choices and our approach to settle them. 6.1 104 10 v6 104 Query Time (µs) 105 G1A Case Study: G-tree Distance Matrices G-tree’s distance matrices store certain pre-computed graph distances (between borders of sub-graphs), allowing “assembly” of longer distances in a piece-wise manner. We firstly describe the Gtree assembly method below, then show how the implementation of distance matrices can significantly impact its performance. Every G-tree node has a set of borders. From our running example in Figure 3, v5 and v6 are borders of G1 . Each non-leaf node also has a set of children, for example G1A and G1B are the children of G1 . These in turn have their own borders, which we refer to as “child borders” of G1 . A distance matrix stores the distances from every child border to every other child border. For example for G1 , its child borders are v2 , v3 , v4 , v5 , v6 , and its distance matrix is shown in Figure 5(a). But recall that a border of a G-tree node must necessarily be a border of a child node, e.g., the borders of G1 , v5 and v6 , are also borders of G1B . This means the distance matrix of G1 repeatedly stores some border-to-border distances already in the distance matrix of G1B , a redundancy that can become quite large for bigger graphs. To avoid this repetition and utilise, in general, O(1) random retrievals, a practitioner may choose to implement the distance matrix as a hash-table. This has the added benefit of being able to retrieve distances for any two arbitrary borders. Given a source vertex s and target t, G-tree’s assembly method firstly determines the tree path through the G-tree hierarchy. This is a sequence of G-tree nodes starting from the leaf node containing s through its immediate parent and each successive parent node up to the least-common ancestor (LCA) node. From the LCA, the path traces through successive child nodes until reaching the leaf node containing t. The assembly method then computes the distances from all borders from the ith node in the path, Gi , to all borders in i+1th node, Gi+1 . These two nodes are necessarily either both children of the LCA or have a parent-child relationship. In either case the parent node’s distance matrix contains values for all border-to-border distances. Assuming we have computed all distances from s to the borders of Gi , we compute the distances to the borders of Gi+1 by iterating over each border of Gi and computing the minimum distance through them to each border of Gi+1 . From our running example in Figure 3, let v1 be the source and v12 be the target. In this case the beginning of the tree path will contain the child node G1A and then its parent node G1 . Assume we have computed the distances to the borders of G1A (easily done by using the distance matrix of leaf node G1A , which stores leaf vertex Distance Matrix INS Chained Hashing Quadratic Probing Array 953 B 1482 B 151 B Cache Misses (Data) L1 L2 L3 28.8 B 20.5 B 13 B 11.2 B 7.5 B 5.3 B 1.5 B 0.4 B 0.3 B Table 3: Hardware Profiling: 250,000 Queries on NW Dataset We investigate the cache efficiency of each implementation in CPU cache misses at each level in billions in Table 3 (also showing INS, no. of instructions in billions) using perf hardware profiling of 250,000 varied queries on NW. Chained hashing uses indirection to access data, resulting in poor locality and the highest number of cache misses. Quadratic probing improves locality at the expense 6 10 105 Query Time (µs) Query Time (µs) 105 4 103 102 10 1 Settled Graph 1st Cut PQueue 1 5 10 25 k 50 10 4 Parameter Road Networks k Density (d) Synthetic POIs Real POIs Settled Graph 1st Cut PQueue 103 10 2 101 10 0 0.0001 0.001 0.01 0.1 1 Table 4: Parameters (Defaults in Bold) Density (a) Varying k (b) Varying Density Figure 7: INE Improvement (NW, d=0.001, k=10) consecutively in this order. The vertices array stores the starting index of each vertex’s adjacency list in edges, also in order. Now for any vertex u we can find the beginning of its adjacency list in edges using vertices[u] and its end using vertices[u+1]. This contiguity increases the likelihood of a cache hit during expansion. We similarly store ROAD’s shortcuts in a global shortcut array, with each shortcut tree node storing an offset to this array. The principle demonstrated here is that recommended data structures in past studies cannot be used verbatim. It is necessary to replace IO-oriented data structures e.g., we replaced the B+ -trees, recommended in the originally disk-based DisBrw and ROAD, with sorted arrays. 4. Language. C++ presently allows more low-level tuning, such as specifying the layout of data in memory for cache benefits, making it preferable in high performance applications. Implementers may consider other languages such as Java for its portability and design features. But when we implemented INE with all aforementioned improvements in Java (Oracle JDK 7), we found it was at least 2× slower than the equivalent C++ implementation. One possible reason is that Java does not guarantee contiguity in memory for collections of objects. Also, the same objects take up more space in Java. Both factors lead to lower cache utilisation, which may penalise methods that are better able to exploit it. of more costly collision resolution, hence it uses more instructions than chained hashing. However, it cannot achieve better locality than storing data in an array sorted in the order it will be accessed. This ordering means the next value we retrieve from the array is far more likely to be in some level of cache. Unsurprisingly, it suffers from the fewest cache misses. This is a unique strength of G-tree’s distance matrices and shows, while in-memory implementation is challenging, it is still possible to design algorithms that work well. 6.2 Values DE, VT, ME, CO, NW, CA, E, W, C, US 1, 5, 10, 25, 50 1, 0.1, 0.01, 0.001, 0.0001 uniform, clustered, min. obj. distance Refer to Table 2 Guidelines for Implementation Choices In-memory implementation requires careful consideration, or experimental outcomes can be drastically affected as seen with Gtree’s distance matrices and in [28]. Many choices are actually quite simple, but their simplicity can lead to them being overlooked. Here we outline several choices and options to deal with them to assist future implementers. To illustrate the impact of these choices we progressively improve a first-cut in-memory implementation of INE. Each plot line in Figure 7 shows the effect of one improved choice. Each roughly halves the query time, with the final implementation of INE being 6−7× faster. 1. Priority Queues. All methods in our study employ priority queues. In particular, INE and ROAD involve many queue operations and thus rely on their efficient implementation. Binary heaps are most commonly used, but we must choose whether to allow duplicate vertices in the queue or not. Without duplicates, the queue is smaller and queue operations involve less work. But this means the heap index of each vertex must be looked up to update keys e.g., through a hash-table. On degree-bounded graphs, such as road networks, the number of duplicates is small, and removing them is simply not worth the lost locality and increased processing time incurred with hash-tables. As a result, we see a 2× improvement when INE is implemented without decreasing keys (see PQueue in Figure 7). Note that we use this binary heap for all methods. 2. Settled Vertex Container. Recall INE and ROAD must track vertices that have been dequeued from their priority queues (i.e., settled). The scalable choice is to store vertices in a hash-table as they are settled. However we observe an almost 2× improvement, as shown by Settled in Figure 7 by using a bit-array instead. This is despite the need to allocate memory for |V | vertices for each query. The bit-array has the added benefit of occupying 32× less space than an integer array, thus fitting more data in cache lines. This does add a constant pre-allocation overhead for each query, which is proportionally higher for small search spaces (i.e, for high density). But the trade-off is worth it due to the significant benefit on larger search spaces (i.e., low density). 3. Graph Representation. A disk-optimised graph data structure was proposed for INE in [23]. In main memory, we may choose to replace it with an array of node objects, with each object containing an adjacency list array. However by combining all adjacency lists into a single array we are able to obtain another 2× speed-up (refer to Graph in Figure 7). Firstly, we assign numbers to vertices from 0 to |V |−1. An edges array stores the adjacency list of each vertex 7. 7.1 EXPERIMENTS Experimental Setting Environment. We conducted experiments on a 3.2GHz Intel Core i5-4570 CPU and 32GB RAM running 64-bit Linux (kernel 4.2). Our program was compiled with g++ 5.2 using the O3 flag, and all query algorithms use a single thread. To ensure fairness, we used the same subroutines for common tasks between the algorithms whenever possible. We implemented INE, IER, G-tree and ROAD from scratch. We obtained the authors code for G-tree, which we used to further improve our implementation, e.g., by selecting the better option when our choices disagreed with the authors’ choice of data structures. For Distance Browsing, we partly based our SILC index on open-source code from [29], but being a shortest path study this implementation did not support kNN queries. As a result, we implemented the kNN algorithms ourselves from scratch, modifying the index to support them, taking the opportunity to make significant improvements (as discussed in Section 6 and Appendix A). We used a highly efficient opensource implementation of PHL made available by its authors [7]. All source code and scripts to generate datasets, run experiments, and draw figures have been released as open-source [2] for readers to reproduce our results or re-use in future studies. Index Parameters. The performance of the G-tree and ROAD indexes are highly dependent on the choice of leaf capacity τ (Gtree), hierarchy levels l (ROAD) and fanout f (both) [20, 21, 30]. We experimentally confirmed trends observed in those studies and computed parameters for new datasets. As such, we use fanout f =4 for both methods. For G-tree we set τ to 64 (DE), 128 (VT, ME, CO), 256 (NW, CA, E), and 512 (W, C, US). For ROAD, we set l to 7 (DE), 8 (VT, ME), 9 (CO, NW), 10 (CA, E) and 11 (W, C, 7 102 10 1 100 105 106 Number of Vertices 107 10 3 10 2 101 10 0 10-1 Gtree ROAD 105 PHL DisBrw 103 102 101 10 106 107 Number of Vertices 106 INE ROAD Gtree 0 105 IER-Gt IER-PHL DisBrw 106 Number of Vertices 107 G-tree Path Cost IER-Gt Path Cost ROAD Vert. Bypassed 105 Vertices Bypassed 3 104 104 Path Cost 10 105 PHL DisBrw Query Time (µs) 104 INE Gtree ROAD Construction Time (s) Index Size (MB) 105 105 104 105 106 107 Number of Vertices 104 (a) Index Size (b) Construction Time Figure 8: Effect of Road Network Size |V | (a) Query Time (b) G-tree & ROAD Stats Figure 9: Effect of Road Network Size |V | (d=0.001, k=10) US). We chose values of l for ROAD in accordance with the results reported in [21] that show query performance of ROAD improves for larger l. Specifically, for each dataset, we increased l until either the query performance did not improve or further partitioning was not possible due to too few vertices in the leaf levels. Query Variables. Table 4 shows the range of each variable used in our experiments (defaults in bold). Similar to past studies [30], we vary k from 1 to 50 with a default of 10. We used 8 real-world object sets as discussed Section 4. We vary uniform object set density d from 0.0001 to 1 where d=|O|/|V | with a default value of 0.001. We choose this default density as it closely matches the typical density for real-world object sets as shown in Table 2. Furthermore this density creates a large enough search space to reveal interesting performance trends for methods. We vary over 10 real road networks (listed in Table 1) with median-sized NW and largest US road networks as defaults. We use distance edge weights in Sections 7.2 and 7.3 for comparison with past studies, and because IER and DisBrw were developed for such graphs. But we repeat experiments on travel times later in Section 7.5. Query and Object Sets. All query times are averaged over 10,000 queries. For real-world object sets, we tested each set with 10,000 random query vertices. For uniform and clustered object sets, we generate 50 different sets for each density and number of clusters (resp.) combined with 200 random query vertices. For minimum distance object sets (described in Section 4.2), we generated 50 sets for each distance set Ri with i ∈ [1, m]. We also chose 200 random query vertices with distances from the centre vertex in range [0, D2max m ) (i.e., vertices closer than R1 ) for use with all sets. We use m=6 for NW and m=8 for US to ensure there were enough objects in each set to satisfy the default density 0.001. as its index (SILC [26]) requires an all-pairs shortest path computation. However, the computation of each SILC quadtree is independent and can be easily parallelized. We observed a speed-up factor of very close to 4× with our quad-core CPU using OpenMP. Note that other methods cannot be so easily parallelized. Despite this DisBrw still required 9 hours on NW, while parallelization is useful it does not change the asymptotic behaviour. PHL takes longer than G-tree and ROAD but surprisingly not significantly so, thanks to pruned labelling [7]. IER’s index performance depends on the network distance method it employs (i.e., G-tree or PHL). Recall that both ROAD and G-tree must partition the road network. Since the network partitioning problem is known to be NPcomplete, ROAD and G-tree both employ heuristic algorithms. As both methods require the same type of partitioning we use the same algorithm, the multilevel graph partitioning algorithm [18] used in G-tree. This method uses a much faster variant of the KernighanLin algorithm recommended in ROAD [20]. Consequently, we are able to evaluate ROAD for much larger datasets for the first time, with ROAD being constructed in less than one hour for even the largest dataset (US) containing 24 million vertices. The construction time of ROAD is comparable to G-tree, because both use the same partitioning method, and employ bottom-up methods to compute shortcuts and distance matrices, respectively. We remark that, while most existing studies have focused on improving query processing time, there is a need to develop algorithms and indexes providing comparable efficiency with a focus on reducing memory usage and construction time. 7.2 7.3 Query Performance We investigated kNN query performance over several variables: road network size, k, density, object distance, clusters, and realworld POIs. Implementations have been optimized according to Section 6. We have applied numerous improvements to each algorithm, as detailed in Appendix A. IER network distances are computed using both PHL [7] (when its index fits in memory) and Gtree with materialization (shown as IER-PHL and IER-Gt, resp.). Road Network Index Pre-Processing Cost Here we measure the construction time and size of the index used by each technique for all road networks in Table 1. Index Size. Figure 8(a) shows the index size for each algorithm. INE only uses the original graph data structure, so its size can be seen as the lower bound on space. DisBrw could only be built for the first 5 road networks before exceeding our memory capacity. This is not surprising given the O(|V |1.5 ) storage complexity. However, in our implementation, we were able to build DisBrw for an index with 1 million vertices (NW) consuming 17GB. PHL also exhibits large indexes, however it can still be built for all but the 2 largest datasets. We note that PHL experiences larger indexes on travel distance graphs because they do not exhibit prominent hierarchies needed for effective pruning (on travel time graphs we were able to build PHL for all indexes). G-tree consumed less space than ROAD. E.g., for the US dataset G-tree used 2.9GB compared to ROAD’s 4.4GB. As explained in past studies [30], ROAD’s Route Overlay contains significant redundancy as multiple shortcut trees repeatedly store a subset of the Rnet hierarchy. Construction Time. Figure 8(b) compares the construction time of each index for increasing network sizes. DisBrw again stands out 7.3.1 Varying Network Size Figure 9(a) shows query times with increasing numbers of road network vertices |V | for all 10 road networks in Table 1 on uniform objects. We observe the consistent superiority of IER-based methods. Figure 9(a) clearly shows the reduced applicability of DisBrw. Even though its performance is close to ROAD, its large index size makes it applicable on only the first 5 datasets. Surprisingly G-tree’s advantage over ROAD decreases with increasing network size |V |. Recall that ROAD can be seen as an optimisation on INE, where the expansion can bypass object-less regions (i.e., Rnets). Thus ROAD’s relative improvement over INE depends on the time saved bypassing Rnets versus additional time spent descending shortcut trees. In general, given the same density, we can expect a similar sized region to contain the same number of objects irrespective of the network size |V |. This explains why 8 102 101 100 IER-Gt IER-PHL DisBrw INE ROAD Gtree 1 5 10 25 k 50 103 102 101 Gtree IER-Gt INE ROAD 1 5 10 25 103 102 101 100 50 104 IER-Gt IER-PHL DisBrw INE ROAD Gtree Query Time (µs) 103 104 Query Time (µs) 104 Query Time (µs) Query Time (µs) 104 0.0001 0.001 k 0.01 0.1 103 102 101 1 Gtree IER-Gt INE ROAD 0.0001 0.001 Density 0.01 0.1 1 Density (a) NW Dataset (b) US Dataset Figure 10: Effect of k (d=0.001) (a) NW Dataset (b) US Dataset Figure 11: Effect of Density (k=10) INE remains relatively unaffected by |V |. It also means that regions without objects are similarly sized. Although Rnets may grow, the size of the Rnets we do bypass also grow, so ROAD bypasses similar numbers of vertices. So the time saved bypassing regions does not increase greatly. Thus ROAD’s query time with increasing |V | mainly depends on the depth of shortcut trees. But the depth is bounded by l, which we know does not increase greatly, and as a result ROAD scales extremely well with increasing |V |. G-tree’s non-materialized distance computation cost is a function of the number of borders of G-tree nodes (i.e., subgraphs) involved in the tree path to another node or object. With increasing network size, a G-tree node at the same depth has more borders and the path cost is consequently higher. Thus, we see G-tree “catchup” to ROAD on the US dataset. These trends are demonstrated in 9(b). G-tree’s path cost (in border-to-border computations) increases while the number of vertices ROAD bypasses remains stable with increasing |V | (note these are not directly comparable). Figure 11. With increasing density the average distance between objects decreases and in general query times are lower. The rate of improvement for heuristic-based methods (DisBrw, G-tree, IER) is slower because they are less able to distinguish better candidates. For IER this means more false hits, explaining why IER-PHL’s query times increase (slightly) as it has no means to re-use previous computations like IER-Gt does. The rate of improvement is higher for expansion-based methods as their search spaces become smaller. ROAD falls behind INE beyond density 0.01 indicating the tipping point at which the time spent traversing shortcut trees exceeds the time saved bypassing Rnets (if any). The query times plateau at high densities on the US dataset for ROAD and INE because it is dominated by the bit-array initialization cost (refer to Section 6.2). G-tree performs well at high densities as more kNNs are found in the source leaf node. In this case it reverts to a Dijkstralike search (which we improved as in Appendix A.2.1) providing comparable performance to INE and ROAD on NW. G-tree exceeds them on the US as a bit-array is not required due to G-tree’s leaf search being limited to at most τ vertices. Varying k Figures 10(a) and 10(b) show the results for varying k for the NW and US datasets, respectively, on uniform objects. Significantly, IER-PHL is 5× faster than any other method on NW. While PHL could not be constructed for the US dataset for travel distances, IER-Gt takes its place as the fastest method, being twice as fast as G-tree. Interestingly, this is despite both using the same index, also materializing intermediate results, and IER-Gt having the additional overhead of retrieving Euclidean NNs. So this is really an examination of heuristics used by G-tree. Essentially Gtree visits the closest subgraph (i.e., by one of its borders) while IER-Gt visits the subgraph with the next Euclidean NN. IER-Gt can perform better because its heuristic incorporates an estimate on distances to objects within subgraphs while G-tree does not. Each time G-tree visits a subgraph not containing a kNN it pays a penalty in the cost of non-materialized distance computations. We have seen this cost increases with network size, which explains why the improvement of IER-Gt is greater on the US than on NW. This is verified in Figure 9(b), which shows IER-Gt involves fewer computations than G-tree and the gap increases with network size. We observe that G-tree outperforms ROAD, DisBrw and INE on NW, with a trend similar to previous studies [30]. INE is the slowest as it visits many vertices. For k = 1 the ROAD, DisBrw and G-tree methods are indistinguishable as a small area is likely to contain the NN. ROAD and DisBrw scale very similarly with k. G-tree scales better than both, at its peak nearly an order of magnitude better than ROAD and DisBrw. As more objects are located, more paths in the G-tree hierarchy are traversed, allowing greater numbers of subsequent traversals to be materialized. As explained in Section 7.3.1, we again see G-tree’s relative improvement over ROAD decrease in Figure 10(b) for the larger US dataset. 7.3.3 7.3.4 Varying Clusters Query Time (µs) In this section we evaluate performance on clustered object sets proposed in Section 4.2. Figure 12 shows the query time with increasing numbers of clusters and varying k. In both cases cluster size is at most 5. Figure 12(b) uses an object density of 0.001. As the number of clusters increases the average distance between objects decreases leading to faster queries. This is analogous to increasing density, thus showing the same trend as for uniform objects. IER-PHL’s superiority is again apparent. One difference to uniform objects is IER-based methods find it more difficult to differentiate between candidates as the number of clusters increases, and query times increase (but not significantly). Similarly in Figure 12(b), as k increases, IER-PHL visits more clusters, causing its performance lead to be slightly smaller than for uniform objects. IER-Gt on the other hand is more robust to this, as it is able to materialize most results. G-tree again performs better than DisBrw and ROAD. Due to clustering, objects in the same cluster will likely be located in the same G-tree leaf node. After finding the first object, G-tree can quickly retrieve other objects without recomputing distances to the leaf node, thus remaining relatively constant. INE ROAD Gtree 105 IER-Gt IER-PHL DisBrw 104 103 102 10 104 Query Time (µs) 7.3.2 1 1 10 100 Num. of Clusters 1000 103 102 101 10 IER-Gt IER-PHL DisBrw INE ROAD Gtree 0 1 5 10 25 50 k (a) Varying No. of Clusters (b) Varying k Figure 12: Effect of Clustered Objects (NW, |C|=0.001, k=10) Varying Density We evaluate performance for varying uniform object densities in 9 Fast Food Park 102 School Court University Hotel Hospital Post 392 275 341 184 Park 258 2555 2941 701 803 389 746 898 409 815 1025 431 1255 1299 529 3340 5529 14500 15167 1720 1569 772 Query Time (µs) Fast Food 23 27 81 74 85 83 186 169 349 166 154 428 Post 104 103 INE ROAD Gtree IER-Gt 923 385 532 Hotel 21 18 23 97 111 115 116 307 330 332 269 1680 1808 3173 414 392 112 104 Hospital 105 Gtree IER-Gt IER-PHL 529 769 322 University 17 15 Court INE DisBrw ROAD 135 141 104 93 22 102 101 490 556 1056 716 103 4691 12371 19816 874 1120 104 146 142 Query Time (µs) 105 School (a) NW Road Network (b) US Road Network Figure 13: Varying Real-World Object Sets (Defaults: k=10) 107 IER-Gt IER-PHL DisBrw 103 102 101 R1 R2 R3 R4 Query Set R5 106 10 104 103 102 101 Q1 R6 Varying k. Figure 15 shows the behaviour of two typically searched POIs, fast food outlets and hospitals, on the NW dataset. Hospitals display a trend similar to that of uniform objects for increasing k, as they tend to be sparse. IER-PHL is again significantly faster than G-tree. Although still fastest, IER-PHL has slightly lower performance for fast food outlets as these tend to appear in clusters where Euclidean distance is less able to distinguish better candidates, similar to synthetic clusters in Figure 12(b). Thus trends observed for equivalent synthetic object sets in previous experiments are also observed for real-world POIs. Gtree IER-Gt INE ROAD 5 Q2 Q3 Q4 Q5 Q6 Query Set Q7 Q8 (a) NW Dataset (b) US Dataset Figure 14: Varying Min. Obj. Distance (d=0.001, k=10) 7.3.5 7.3.7 Varying Minimum Object Distance Each set Ri in Figure 14 represents an exponentially increasing network distance to the closest object with increasing i, as described in Section 4.2. For the smallest sets, objects still tend to be found further away, as there are fewer closer vertices. However as distance increases further, we see the effect of “remoteness”. INE scales badly due to the increasing search space. IER-based methods scale poorly as the Euclidean lower bounds becomes less accurate with increasing network distance. This is particularly noticeable in Figure 14(b) as G-tree eventually overtakes IER-Gt on the US. But IER-PHL still outperforms all methods on NW. DisBrw performs poorly for a similar reason, making many interval refinements. Gtree scales extremely well in both cases, as more paths are visited through the G-tree hierarchy, more computations can be materialized for subsequent traversals. 103 Query Time (µs) 7.3.6 Real-World Object Sets Varying Object Sets. In Figure 13, we show query times of each technique on typical real-world object sets from Table 2. These are ordered by decreasing size, which is analogous to decreasing density, showing the same trend as in Figure 11. Schools represent the largest object set and all methods are extremely fast as seen for high density. A more typical POI, like hospitals, are less numerous and show the differences between methods more clearly. Regardless, IER-PHL on NW and IER-Gt on US consistently and significantly outperform other methods on most real-world object sets. Also note query times for G-tree are higher on US than NW for the same sets, confirming our observations in Section 7.3.1. 103 102 101 IER-Gt IER-PHL DisBrw INE ROAD Gtree 100 1 5 10 25 k 50 10 1 5 10 25 101 IER-Gt IER-PHL DisBrw INE ROAD Gtree 0 1 5 10 25 (a) Varying k 7.4 50 INE ROAD Gtree IER-Gt IER-PHL DisBrw 102 101 105 106 Number of Vertices 107 (b) Varying |V | Object Set Index Pre-Processing Cost The original ROAD paper [20] included pre-processing of a fixed object set in its road network index statistics. But there may be many object sets (e.g., one for each type of restaurant) or objects may need frequent updating (e.g., hotels with vacancies). So we are interested in the performance of individual object indexes over varying size (i.e., density). We evaluate 3 object indexes on the US dataset, namely: R-trees used by IER, Association Directories used by ROAD and Occurrence Lists used by G-tree. Note that in our study DisBrw also uses R-trees (see Appendix A.1.1). Index Size. In practice object indexes for all object sets would be constructed offline, loaded into memory and the appropriate one injected at query time. We investigate the index sizes (in KB) in Figure 18(a) to gauge what effect each density has on the total size. The size of the input object set used by INE is the lower bound storage cost. ROAD’s object index is smaller than G-tree’s because it IER-Gt IER-PHL DisBrw INE ROAD Gtree 2 Figure 16: kNN Queries (CO, d=0.01, k=10) 102 0 103 k 103 101 10 10 104 104 Query Time (µs) Query Time (µs) 105 Original Settings A recent experimental comparison [30] used a higher default density of d=0.01. While we choose a more typical default density, we reproduce results using d=0.01 in Figure 16 for varying k and network size. Note that we use the smaller Colorado dataset in Figure 16(a) for direct comparison with [30]. Firstly, all methods compared in [30] now answer queries in less than 1ms. While our CPU is faster, it cannot account for such a large difference. This suggests our implementations are indeed efficient. Secondly, most methods are difficult to differentiate, as such a high density implies a very small search space (i.e., queries are “easy” for all methods). Query Time (µs) 10 INE ROAD Gtree 4 Query Time (µs) Query Time (µs) 105 50 k (a) Hospitals (b) Fast Food Figure 15: Varying k for Real-World Objects (NW, k=10) 10 102 101 IER-Gt IER-PHL INE ROAD Gtree 1 5 10 25 104 103 102 101 50 104 IER-Gt IER-PHL 0.0001 0.001 k 0.01 0.1 1 107 103 102 101 100 INE ROAD Gtree 105 Density (a) Varying k Query Time (µs) 103 INE ROAD Gtree Query Time (µs) 105 Query Time (µs) Query Time (µs) 104 IER-Gt IER-PHL 106 Number of Vertices (c) Varying |V | (b) Varying Density d 106 105 104 103 102 101 R1 107 IER-Gt IER-PHL INE ROAD Gtree R2 R3 R4 R5 R6 Query Set R7 R8 (d) Varying Min. Obj. Distance Figure 17: Query Performance on Travel Time Graphs (US, k=10, d=0.001, uniform objects) 105 10 INE G-tree ROAD IER/DB Construction Time (µs) Index Size (KB) 106 4 103 102 101 10 0 0.0001 0.001 0.01 Density 0.1 1 Unlike travel distances, we were able to construct the PHL index for all datasets, with the largest requiring 16GB. This is due to “highway” properties exhibited in travel time graphs (e.g., an edge with a higher speed is more likely to be on a shortest path) leading to smaller label sizes. Figure 17 shows the query times for travel times with varying k, density, network size |V | and object distance on the US dataset. In general, IER experiences more false hits due to the looser lower bound on travel times, explaining why IER-Gt is now significantly outperformed by G-tree. But, surprisingly, IER-PHL still remains the fastest method in most situations. The penalty in false hits is partly offset by the reduced label sizes for PHL. The looser lower bound also aggravates cases where Euclidean distance was less effective on travel distances. For example, IER was already less able to distinguish better candidates with increasing density, and as result IER-PHL degrades faster on travel times in Figure 17(b). This is similarly observed for increasing network distance in Figure 17(d) for the same reason. Despite this, IER-PHL remains the fastest method in most cases. Other trends observed for travel distances are similarly observed for travel times (e.g., G-tree degrades with increasing |V | in Figure 17(c)). 108 107 10 6 105 104 G-tree ROAD IER/DB 103 10 2 0.0001 0.001 0.01 0.1 1 Density (a) Index Size vs. d (b) Build Time vs. Density d Figure 18: Object Indexes for US (uniform objects) need only store whether an Rnet contains an object or not, which is easily done in a low memory bit-array. G-tree’s object index must additionally store the child nodes containing objects. Both indexes must however store the actual objects, which gradually dominates the index size with increasing density. Note that we chose R-tree parameters (e.g., node capacity) for best performance. As a result R-trees fall behind after density 0.01, but this can be remedied by increasing the node capacity at the expense of Euclidean kNN performance. We note that object indexes are much smaller than road network indexes, as they are simpler data structures, and real-world object sets with high densities are less frequent. Construction Time. Figure 18(b) similarly shows the object index construction times. Again, they are all constructed much faster than road network indexes, due to being simpler data structures. The ROAD and G-tree object indexes incur the largest build time due to bottom-up propagation of the presence of objects through their respective hierarchies. However, the R-trees used by IER are significantly faster to build. As R-trees support updates, this suggests the possibility of use in real-time settings. 7.5 Criteria INE G-tree ROAD IER Query Performance Default Settings 5th 2nd =3rd 1st Small k 5th =3rd =3rd 1st Large k 5th 2nd 3rd 1st Low Density 5th 2nd =3rd 1st High Density 1st 3rd 2nd 4th Small Networks 5th 2nd =3rd 1st Large Networks 4th =3rd 2nd 1st Network and Object Index Pre-Processing Time (Network) 1st 3rd 2nd 4th Time (Objects) 1st 5th 4th =2nd Space (Network) 1st 2nd 3rd 4th Space (Objects) 1st 5th 2nd =3rd Travel Time Road Networks kNNs may just as commonly be required in terms of travel time. In this section we reproduce query results for the US road network with travel time edge weights. Results for other experiments are found in Appendix B, but we note any significant differences here. Extending IER. IER uses the Euclidean distance as a lower bound on the network distance between two points for travel distance edge weights. This can easily be extended for other edge weights. Let wi (resp. di ) represent the edge weight (resp. Euclidean length) of an edge ei . We compute S = max∀ei ∈E (di /wi ). E.g., if wi represents travel time, S corresponds to the maximum speed on any edge in the network. Let dE (p, q) be the Euclidean distance between two points p and q. It is easy to see that dE (p, q)/S is a lower bound on the network distance between p and q, e.g., the time it takes to travel the Euclidean distance at the maximum possible speed. Thus, we compute S for the network and use the new lower bound in IER. Landmarks are known to provide better lower bounds on travel time graphs [14]. However there is no equivalent data structure, such as an R-tree, to incrementally retrieve candidates by their lower bound, making them undesirable for use here. DisBrw =3rd 2nd 4th =3rd 5th =3rd N/A 5th =2nd 5th =3rd Table 5: Ranking of Algorithms Under Different Criteria 8. CONCLUSIONS We have presented an extensive experimental study for the kNN problem on road networks, settling unanswered questions by evaluating object indexes, travel time graphs and real-world POIs. We verify that G-tree generally outperforms INE, DisBrw and ROAD, but the relative improvement is much smaller and at times reversed, demonstrating the impact of implementation efficiency. Table 5 provides the ranking of the algorithms under different criteria. Our most significant conclusions are regarding IER, which we investigated with fast network distance techniques for the first time. IER-PHL significantly outperformed every competitor in all but a few cases, even on travel time graphs where Euclidean distance is less effective. IER provides a flexible framework that can be combined with the fastest shortest path technique allowed by the users’ 11 memory capacity and must be included in future comparisons. Additionally, on travel distances, we saw that IER-Gt often outperformed the original G-tree kNN algorithm despite using the same index. As this suggests Euclidean NN can be a better heuristic, it identifies room for improvement in kNN search heuristics. Perhaps more information can be incorporated into object indexes. Finally, we investigated the effect of implementation choices using G-trees distance matrices and data structures in INE. By investigating simple choices, we show that even small improvements in cache-friendliness can significantly improve algorithm performance. As such there is a need to pay careful attention when implementing and designing algorithms for main memory, and our insights are applicable to any technique not just those we study. [17] X. Huang, C. S. Jensen, and S. Šaltenis. The islands approach to nearest neighbor querying in spatial networks. In SSTD, pages 73–90, 2005. [18] G. Karypis and V. Kumar. A fast and high quality multilevel scheme for partitioning irregular graphs. SIAM J. Sci. Comput., 20(1):359–392, 1998. [19] M. Kolahdouzan and C. Shahabi. Voronoi-based k nearest neighbor search for spatial network databases. In VLDB, pages 840–851, 2004. [20] K. Lee, W.-C. Lee, B. Zheng, and Y. Tian. Road: A new spatial object search framework for road networks. TKDE, 24(3):547–560, 2012. [21] K. C. K. Lee, W.-C. Lee, and B. Zheng. Fast object search on road networks. In EDBT, pages 1018–1029, 2009. [22] K. Mouratidis, M. L. Yiu, D. Papadias, and N. Mamoulis. Continuous nearest neighbor monitoring in road networks. In VLDB, pages 43–54, 2006. [23] D. Papadias, J. Zhang, N. Mamoulis, and Y. Tao. Query processing in spatial network databases. In VLDB, pages 802–813, 2003. [24] H. Samet. Foundations of Multidimensional and Metric Data Structures. Morgan Kaufmann, 2005. [25] H. Samet, J. Sankaranarayanan, and H. Alborzi. Scalable network distance browsing in spatial databases. In SIGMOD, pages 43–54, 2008. [26] J. Sankaranarayanan, H. Alborzi, and H. Samet. Efficient query processing on spatial networks. In GIS, pages 200–209, 2005. [27] C. Shahabi, M. Kolahdouzan, and M. Sharifzadeh. A road network embedding technique for k-nearest neighbor search in moving object databases. GeoInformatica, 7(3):255–273, 2003. [28] D. Šidlauskas and C. S. Jensen. Spatial joins in main memory: Implementation matters! PVLDB, 8(1):97–100, 2014. [29] L. Wu, X. Xiao, D. Deng, G. Cong, A. D. Zhu, and S. Zhou. Shortest path and distance queries on road networks: An experimental evaluation. PVLDB, 5(5):406–417, Jan. 2012. [30] R. Zhong, G. Li, K. Tan, L. Zhou, and Z. Gong. G-tree: An efficient and scalable index for spatial search on road networks. TKDE, 27(8):2175–2189, Aug 2015. [31] R. Zhong, G. Li, K.-L. Tan, and L. Zhou. G-tree: An efficient index for knn search on road networks. In CIKM, pages 39–48, 2013. Acknowledgements. We sincerely thank the authors of G-tree [30], PHL [7] and the shortest path experimental paper [29] for providing source code of their algorithms, in particular Y. Kawata for valuable assistance in improving the code of PHL. We also thank the anonymous reviewers for their feedback through which we significantly improved our work. The research of Muhammad Aamir Cheema is supported by ARC DE130101002 and DP130103405. 9. REFERENCES [1] https://www.globalwebindex.net/blog/ top-global-smartphone-apps. [2] https://github.com/tenindra/RN-kNN-Exp. [3] http: //www.dis.uniroma1.it/%7Echallenge9/. [4] http://www.openstreetmap.org. [5] http://www.cs.utah.edu/%7Elifeifei/ SpatialDataset.htm. [6] T. Abeywickrama, M. A. Cheema, and D. Taniar. K-nearest neighbors on road networks: A journey in experimentation and in-memory implementation. PVLDB, 9(6):492–503, Jan. 2016. [7] T. Akiba, Y. Iwata, K.-i. Kawarabayashi, and Y. Kawata. Fast shortest-path distance queries on road networks by pruned highway labeling. In ALENEX, pages 147–154, 2014. [8] H. Bast, S. Funke, D. Matijevic, P. Sanders, and D. Schultes. In transit to constant time shortest-path queries in road networks. In WEA, pages 46–59, 2007. [9] R. Bauer, D. Delling, P. Sanders, D. Schieferdecker, D. Schultes, and D. Wagner. Combining hierarchical and goal-directed speed-up techniques for dijkstra’s algorithm. JEA, 15:2.3:2.1–2.3:2.31, Mar. 2010. [10] Z. Chen, H. T. Shen, X. Zhou, and J. X. Yu. Monitoring path nearest neighbor in road networks. In SIGMOD, pages 591–602, 2009. [11] H.-J. Cho and C.-W. Chung. An efficient and scalable approach to cnn queries in a road network. In VLDB, pages 865–876, 2005. [12] T. H. Cormen, C. Stein, R. L. Rivest, and C. E. Leiserson. Introduction to Algorithms. McGraw-Hill, 2nd edition, 2001. [13] R. Geisberger, P. Sanders, D. Schultes, and D. Delling. Contraction hierarchies: Faster and simpler hierarchical routing in road networks. In WEA, pages 319–333, 2008. [14] A. V. Goldberg and C. Harrelson. Computing the shortest path: A search meets graph theory. In SODA, 2005. [15] H. Hu, D. L. Lee, and V. C. S. Lee. Distance indexing on road networks. In VLDB, pages 894–905, 2006. [16] H. Hu, D. L. Lee, and J. Xu. Fast nearest neighbor search on road networks. In EDBT, pages 186–203, 2006. APPENDIX A. IMPROVED ALGORITHMS To ensure each method performs as efficiently as possible, we carefully inspected and applied numerous optimisations to each of them. In contrast to implementation issues discussed in Section 6, these algorithmic improvements are applicable in any setting (inmemory or otherwise). In this Appendix we describe all changes, including pseudocode, and experiments for major improvements. A.1 Distance Browsing We have made several major changes to the DisBrw algorithm proposed in [25]. Here we discuss several minor optimisations, corrections of edge cases, and, in Sections A.1.2 and A.1.1, two major improvements to DisBrw. The updated pseudocode from [25] is shown in Algorithm 1. Please refer to Section 3.3 and [25, 26] for a description of the algorithm and definition of subroutines. 12 One of the main improvements of DisBrw over the SILC kNN algorithm proposed in [26] was the pruning of inserts by computing an upper bound Dk for the kth object. However, for any encountered object, DisBrw would still compute a distance interval (necessarily involving an O(log V ) operation), before the insertion of that object could be pruned. Since DisBrw already uses Euclidean distance to compute intervals for Object Hierarchy nodes, we additionally compute the Euclidean distance as a cheaper O(1) initial lower bound for newly encountered objects (as in line 20). Thus we are able to prune insertion of many encountered objects, which cannot be better candidates, without computing distance intervals. Furthermore [25] omitted computation of distance interval upper bounds for Object Hierarchy nodes. However this is only a small additional expense when computing lower bounds. Instead, we compute upper bounds for nodes and use it to compute Dk sooner. Our Object Hierarchies also store the number of objects contained in each node (a simple additional pre-processing step in object index construction), which allows us to update Dk as shown in line 34. In this way, we also prune insertion of nodes, and avoid needless lower bound evaluations to prune object in regions that cannot contain objects. The DisBrw algorithm of [25] does not handle several minor but possible edge-case scenarios, which we have corrected in Algorithm 1, as follows: Algorithm 1: kNN DisBrw(vq , k, SILC, OH) [25] : vq : a query vertex, k: the number of NNs, SILC: the SILC quadtree for vq , OH: an Object Hierarchy for the object set Output : R: the set of kNNs for vq Local : Q: a min priority queue for vertices and object hierarchy nodes keyed by lower bound, L: a max priority queue for up to k candidate objects keyed by upper bound, Dk: upper bound on the kth neighbor L ← φ; Dk ← ∞; Enqueue(Q, ([OH.Root, 0, , ], 0)); // Note: Q elements also stores upper bound UB e and (for objects) vn the next intermediary vertex in the shortest path from vq and d the distance to vn from vq ; while Q 6= φ do ([e, UB e , vn , d], LB e ) ← Dequeue(Q); if UB e ≥ Dk then break; Input 1 2 3 4 5 6 7 8 9 10 11 12 • In the original DisBrw algorithm, the if condition at line 9 was UB e ≥ F ront(Q), i.e., test if the upper bound of the dequeued element (UB e ) is greater than or equal to the next smallest lower bound in Q (F ront(Q)). If true, DisBrw attempts to refine the bounds for e and re-insert it into Q. However if the interval for e is fully refined (i.e., LB e = UB e ) but we still have UB e = F ront(Q), then we re-insert e into Q only to dequeue it and again re-insert leading to an infinite loop. Therefore we change the condition at line 9 to UB e > F ront(Q). The second part of the condition ensures that objects with the same upper bound are refined further, otherwise elements may be out of order in L. 13 14 15 16 else if IsObject(e) then if UB e > F ront(Q) or (UB e = F ront(Q) and UB e 6= LB e ) then if UB e ≤ Dk and Contains(L, e) then Delete(L, e); (vn , d, LB e , UB e ) ← Ref ine(vn , d, LB e , UB e ); // Ref ine tightens bounds, and updates the next vertex and its distance (this only involves a single binary search on the Morton List for the current vn ); if UB e ≤ Dk then U pdateL(L, e, UB e , Dk ); if LB e ≤ Dk then Enqueue(Q, ([e, UB e , vn , d], LB e )); // Else e is implicitly dropped as it need not to be refined further; 17 18 19 20 • Let x be the object associated with Dk . Consider the scenario where x is at the front of Q (i.e., has the smallest lower bound) with LB x < UB x . Now when x is dequeued, if UB x > F ront(Q) it will be refined. If F ront(Q) is associated with another object p, then p may be a kNN (as LB p = F ront(Q) and before refinement UB x = Dk , so LB p < UB x ). But if x is refined such that we then have LB x = UB x = Dk (i.e., UB x did not change), then by the original algorithm, x will not be re-inserted into Q. This is because the if condition at line 15 was LB e < Dk . But when p is dequeued next, we may have UB p < F ront(Q) (as the next smallest lower bound is unknown). In this case p is dropped implicitly, potentially losing a correct kNN. This means when LB e = Dk it must still be inserted into Q, to ensure x is the last element dequeued before termination, and we change line 15 in the algorithm accordingly. 21 22 23 24 25 26 27 28 29 30 31 32 33 34 • At line 10 we ensure L contains the dequeued object before it is deleted from L. If there are objects with the same upper bound as Dk , then the dequeued object may not be in L. 35 36 else // e must be an Object Hierarchy node; if IsLeaf (e) then for each object vo ∈ e do LB o ← EuclideanDistance(vq , vo )k; if LB o < Dk then (vn , d, LB o , UB o ) ← Ref ine(vq , 0, LB o , inf); // Initial vn is vq with d=0; if LB o < Dk then Enqueue(Q, ([o, UB o , vq , 0], LB o )); if UB o < Dk then U pdateL(L, o, UB o , Dk ); else for each child node c ∈ e do if N umObjects(c) > 0 then (LB c , UB c ) ← ComputeInterval(LB e , UB e ); if LB c < Dk then Enqueue(Q, ([c, UB c , , ], LB c )); if N umObjects(c) >= k and UB c < Dk then Dk ← UB c ; P opulate(R, L) // Deqeue from L to populate R so they are in order like other algorithms; return R; 37 A.1.1 Distance Browsing via Euclidean NN 38 39 The Object Hierarchy is a key component of DisBrw. It is most easily represented by a quadtree containing all objects from a particular object set. DisBrw visits the most promising branches of this quadtree first, by computing distance intervals to child blocks (i.e., Object Hierarchy nodes). As described in [25], DisBrw retrieves all 40 41 42 43 13 Function U pdateL(L, o, UB o , Dk ) Enqueue(L, (o, UB o )); if |L| ≥ k then if |L| > k then Dequeue(L); Dk ← F ront(L); Query Time (µs) 104 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 23 : vq : a query vertex, k: the number of NNs, SILC: the SILC quadtree for vq , Rt: an R-tree for the object set Output : R: the set of kNNs for vq Local : Q: a min priority queue for vertices keyed by lower bound, L: a max priority queue for up to k candidate objects keyed by upper bound, Dk: upper bound on the kth neighbor, E: a min priority queue for R-tree NN search Dk ← ∞; K ← GetEuclideanKNN s(E, Rt, k); for each object vo ∈ K do P rocessCandidate(Q, L, e, 0, Dk )); // Dk will be set if k ≤ |O|; while Q 6= φ or E 6= φ do if F ront(E) < F ront(Q) then (e, LB e ) ← GetN extEuclideanNN (E); P rocessCandidate(Q, L, e, LB e , Dk )); 27 28 29 30 0.0001 0.001 0.01 0.1 1 Density A.1.2 Exploiting Vertices with Outdegree ≤ 2 Real road network graphs consist of large numbers of degree-2 vertices. Generally 30% of vertices have degree-2 for road networks in Table 1, e.g., on the US dataset 30.3% of vertices have degree-2 (another 19.9% have degree-1). These may exist to capture details such as varying speed limits or curvature. This degree distribution can have a significant impact on computing shortest paths, and we demonstrate the potential improvement on DisBrw. SILC uses the quadtrees and coloring scheme described in Section 3.3 to iteratively compute the vertices in a shortest path, at a cost of O(log |V |) for each vertex. We use chain to refer to a path consisting only of vertices with degree-2 or less, e.g., a section of motorway with no exits. Let v be the current vertex in the shortest path from s to t and u be the previous vertex in the shortest path. If v is on a chain, we do not need to consult the quadtree because the next vertex in the shortest path must be the neighbor of v that is not u. This saves O(log |V |) for each degree-2 vertex in the shortest path. In fact, if target t is not on the chain, we can directly “jump” to the last vertex in the chain saving several O(log |V |) lookups. This observation can be easily exploited by storing the two ends of the chain for each vertex with degree less than 2. else ([e, UB e , vn , d], LB e ) ← Dequeue(Q); if UB e ≥ Dk then break; else if UB e > F ront(Q) or (UB e = F ront(Q) and UB e 6= LB e ) then if UB e ≤ Dk and Contains(L, e) then Delete(L, e); (vn , d, LB e , UB e ) ← Ref ine(vn , d, LB e , UB e ); if UB e ≤ Dk then U pdateL(L, e, UB e , Dk ); if LB e ≤ Dk then Enqueue(Q, ([e, UB e , vn , d], LB e )); P opulate(R, L) // Deqeue from L to populate R so they are in order like other algorithms; return R; 105 Function P rocessCandidate(Q, L, o, LB o , Dk ) (vn , d, LB o , UB o ) ← Ref ine(vq , 0, LB o , inf); if LB o < Dk then Enqueue(Q, ([o, UB o , vn , d], LB o )); if UB o < Dk then U pdateL(L, o, UB o , Dk ); Query Time (µs) 26 50 the Euclidean kNN search). Now we compute distance intervals for each candidate and insert these candidates into queues Q and L, setting Dk as the largest upper bound. DisBrw proceeds as before, except before dequeuing an element from Q, we check if F ront(E) < F ront(Q). If true, there may be a closer Euclidean NN, so we retrieve the next Euclidean NN from E. This object is handled in the same way as an object in a leaf node of the Object Hierarchy (i.e., potentially inserted into Q and L). We compare DisBrw to DB-ENN in Figure 19. DB-ENN’s improvement increases with higher density and lower k as this is when the overhead from the Object Hierarchy is highest. The improvement peaks at 1 order of magnitude. Since this suggests that Object Hierarchies do not use the SILC index to its full potential, we instead use DBENN in our experiments. 24 25 25 DisBrw DB-ENN (a) Varying k (b) Varying Density d Figure 19: DisBrw vs. DB-ENN (NW, d=0.001, k=10) // Else e is implicitly dropped as it need not to be refined further; 22 1 5 10 102 101 10 104 4 Query Time (µs) 3 4 102 k Input 2 103 101 Algorithm 2: kNN DB-ENN(vq , k, SILC, Rt) 1 103 DisBrw DB-ENN Query Time (µs) leaf blocks from the SILC quadtree of the query vertex intersecting with that Object Hierarchy node. It uses these blocks to compute lower and upper bounds on the distance from the query vertex to any object in that node. But computing intersections is not a trivial expense. In the worst-case, all SILC quadtree leaf blocks must be retrieved. Furthermore many of the same intersections must be recomputed whilst traversing down the hierarchy. This implies a trade-off between the ability to prune regions using the hierarchy and the height of the hierarchy. A larger height improves performance on very high densities, but penalises lower densities. We observed that very shallow Object Hierarchies (with leaf capacities of 500 objects) provided the best overall performance. 103 10 2 10 1 100 DisBrw OptDisBrw 1 5 10 25 k 50 10 DisBrw OptDisBrw 3 102 101 0.0001 0.001 0.01 0.1 1 Density (a) Varying k (b) Varying Density Figure 20: Deg-2 Optimisation (NA-HWY, d=0.001, k=10) To overcome this we propose a variant of DisBrw that eliminates computing intersections called DB-ENN presented in Algorithm 2. Essentially we replace the Object Hierarchy with Euclidean NNs to generate candidates (recall that Euclidean distances are already used to compute distance ratios [25]). We first retrieve Euclidean kNNs using an R-tree as the initial candidates and then suspend the search (i.e., we keep the priority queue E used by This optimisation can significantly improve DisBrw query times. We refer to this version as OptDisBrw. For our default NW dataset this results in a 30% improvement as in Figure 21, coinciding with the number of degree-2 vertices quoted above. However some road 14 1 5 10 Query Time (µs) 25 k 50 1000 900 800 700 600 500 400 300 200 100 0 DisBrw OptDisBrw Algorithm 3: kNN Gtree(vq , k, Gt, OL) [30] 0.0001 0.001 0.01 0.1 1 1 2 Density 3 (a) Varying k (b) Varying Density Figure 21: Deg-2 Optimisation (NW, d=0.001, k=10) 4 5 6 networks have an even larger proportion of degree-2 vertices, such as the highway road network for North America used in past studies [20, 21, 25] with 175, 813 vertices [5], 95% of which are degree-2. In this case OptDisBrw is up to an order of magnitude faster than DisBrw as shown in Figure 20, as the average chain length is significantly higher resulting in longer jumps. Accordingly future work must keep degree-2 vertices in mind for potential optimisations. Given these results we use chain optimised refinement for DisBrw in our experiments. A.2 Tn ← Leaf (vq ) and set Tmin for Tn ; while |R| < k and (Q 6= φ or Tn 6= Gt.Root) do if Q = φ then U pdateT (Tn , Tmin , OL, Q; if Q 6= φ then (e, d) ← Dequeue(Q); if d > Tmin then U pdateT (Tn , Tmin , OL, Q); Enqueue(Q, (e, d)); 7 8 9 10 11 else if e is a vertex then R ← R ∪ e; 12 13 else if e is a node then for each node or vertex c ∈ OL(e) do Enqueue(Q, SP Dist(vq , c)); 14 15 16 G-tree 17 The G-tree kNN algorithm is largely unchanged from the more recent G-tree study [30], except for an improved leaf search algorithm we describe in Section A.2.1 below. Algorithm 3 includes an additional guard condition at line 7 as the U pdateT subroutine does not guarantee that Q will not be empty (i.e., when the new Tn ’s only child with an occurrence is the previous Tn , which we do not re-insert). Similar to how Association Directories are used by ROAD, we make a small modification to the algorithm to accept an Occurrence List OL rather than the set of objects O. The original algorithm implies that OL must be constructed for each query, which is not a trivial cost or how it would be used in practice (as seen in Section 7.4). Note that again node refers to G-tree nodes and vertex refers to road network vertices. Please refer to Section 3.5 and [30] for descriptions of the data structures and explanation of the main algorithm. A.2.1 : vq : a query vertex, k: the number of NNs, Gt: a G-tree, OL: an Occurrence List Output : R: the set of kNNs for vq Local : Q: a minimum priority queue for vertices and nodes if |OL(Leaf (vq ))| > 0 then GtreeLeaf Search(vq , k, OL, Q, R); Input return R; 18 19 20 21 22 Function U pdateT (Tn , Tmin , OL, Q) T n ← T n.f ather and update Tmin for Tn ; for each node c ∈ OL(Tn ) do // Note: We exclude the previous Tn ; Enqueue(Q, SP Dist(vq , c)); insert them into the priority queue Q used by the main G-tree algorithm. To ensure the distances take into account paths that leave Gq , whenever we settle a border vb we insert every other unsettled border vb0 of Gq into L. The distance to vb0 from vq can be computed with the distance matrix. In Figure 22 we see a significant speed-up for k = 10 and over an order of magnitude improvement for k = 1 on both datasets for the highest density. The improvement is even noticeable at lower densities for k = 1 on NW and both k on the US dataset as the leaf still contains far more objects than k. Note that this improvement is also applicable to other object distributions with the same density as leaf nodes will contain the same number of objects, on average. G-tree Leaf Search Improvement We note that G-tree’s query performance plateaus and sometimes increases for very high densities. Given a query vertex vq , let Gq be the leaf subgraph containing vq . Now the network distance to any object in Gq is the minimum of two possible shortest paths (a) one consisting of only vertices within Gq (b) one that leaves and re-enters Gq through some its borders. To ensure correctness, the original G-tree algorithm performs Dijkstra’s search limited to Gq until all objects are found, capturing network distances of type (a). For each object found it then computes network distances for type (b) paths by using the distance matrix to compare distances through borders. Recall that a leaf node contains at most τ vertices (e.g. τ =256 for NW and τ =512 for US datasets as in Table 1). For objects with density d there are on average d×τ objects in each leaf node. If d × τ > k, G-tree computes distances of each type for more objects than necessary. The penalty is worse with increasing τ and decreasing k. INE cannot be applied to Gq because the kNNs within it may not be the global kNN and some objects within Gq may be closer through paths that travel outside it. We modify Dijkstra’s search within Gq to capture paths of both types as shown in Algorithm 4. Let L be the priority queue used by this search. Our search continues until the first k leaf objects are settled (i.e. dequeued from L). Until the first border is settled, all settled objects are kNNs (like INE). This is correct as, without a closer border, no objects can have a shortest path that leaves Gq . But any subsequent object may not be a kNN, so we instead Query Time (µs) 103 10 104 k=10 (Bef) k=10 (Aft) k=1 (Bef) k=1 (Aft) Query Time (µs) Query Time (µs) 4000 DisBrw 3500 OptDisBrw 3000 2500 2000 1500 1000 500 0 2 101 100 0.0001 0.001 0.01 Density 0.1 1 103 k=1 (Bef) k=1 (Aft) k=10 (Bef) k=10 (Aft) 102 101 100 0.0001 0.001 0.01 0.1 1 Density (a) Varying Density (NW) (b) Varying Density (US) Figure 22: Improved G-tree Leaf Search A.3 ROAD The kNN search and supporting algorithms using the ROAD index are largely unchanged from [21]. We simplify these for the scenario where objects occur on vertices. In addition we made a minor improvement by preventing unnecessary priority queue inserts for Rnet borders that have already been visited (see line 9 of Algorithm 6). The original algorithm re-inserts all borders into the priority queue Q, but then discards each of them immediately after 15 Algorithm 4: GtreeLeafSearch(vq , k, OL, Q, R, Gq ) Algorithm 6: RelaxShortcuts(ve , d, Q, RO, AD) [21] 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 else Enqueue(Q, (ve , d)); 11 12 : ve : current vertex, d: distance to ve , Q: priority queue of unvisited vertices, RO: route overlay index, AD: association directory Local : S: stack T ← RO.GetShortcutT ree(ve )); P ush(S, T.Root); while S 6= φ do n ← P op(S); if ¬IsLeaf (n) then for each R ∈ Rnets(n) do if ¬HasObject(AD, R) then // Then this Rnet can be bypassed; for each shortcut S(ve , vb ) ∈ R do if ¬IsV isited(vb ) then Enqueue(Q, (vb , d + |S(ve , vb )|)); Input : vq : a query vertex, k: the number of NNs, OL: an Occurrence List, Q: the queued used by Algorithm 3, R: the set of kNNs for vq , Gq leaf node containing vq Local : L: a minimum priority queue for vertices Enqueue(L, (vq , 0)); targetsFound ← 0; borderFound ← false; while L 6= φ and |R| < k and targetsFound < k do (ve , d) ← Dequeue(L) if ¬IsV isited(ve ) then if ve ∈ OL(Gq ) then targetsFound++; if ¬ border found then R ← R ∪ ve ; Input else for each child tree node c of n do P ush(S, c); 11 borderFound ← RelaxLeaf V ertex(ve , d, L, Gq )); IsV isited(ve ) ← true; 13 14 15 12 13 return; 17 18 19 20 15 Function RelaxLeaf V ertex(ve , d, L, Gq ) for each vertex va ∈ AdjacencyList(ve ) do if ¬IsV isited(va ) and va ∈ Gq then Enqueue(L, (va , d + w(ve , va ))); 16 17 18 if ve ∈ Borders(Gq ) then for each border vb ∈ Borders(Gq ) do if ¬IsV isited(vb ) then Enqueue(L, (vb , d + Gq .DistM atrix(ve , vb ))); 21 22 23 24 19 return false; 26 B.1 dequeuing (as they are “visited”). This can be particularly expensive for larger Rnets (as they tend to have more borders). Please refer to Section 3.4 and [21] for descriptions of the data structures and explanation of the algorithms. : vq : a query vertex, k: the number of NNs, RO: a Route Overlay index, AD: an Association Directory Output : R: the set of kNNs for vq Local : Q: a minimum priority queue Enqueue(Q, (vq , 0)); R ← φ; while Q 6= φ and |R| < k do (ve , d) ← Dequeue(Q) if ¬IsV isited(ve ) then if IsObject(AD, ve ) then R ← R ∪ ve ; Input 3 4 5 6 7 RelaxShortcuts(Q, RO, AD, ve ); IsV isited(ve ) ← true; 8 9 10 return R; B. IER Variants on Travel Times As discussed in Section 7.5, IER can also be adapted for use on travel time road networks. The performance of shortest path techniques is known to vary between travel distance and travel time graphs. For example CH and TNR has been seen to perform 5−20× worse on travel distances [9]. This is because travel distances do not display hierarchies as prominently as travel times. For example, highways may not always provide the shortest travel distance, but generally provide faster travel time. Methods that rely on such properties, such as CH and TNR, are more effective when they are present (as in travel time graphs). In Figure 23 we again compare IER with different network distance techniques on NW but with travel time edge weights. All methods perform worse at high densities as IER encounters more false hits as the Euclidean lower bound becomes looser. Interestingly, CH and TNR query times actually do not change significantly from the travel distance case for lower densities while MGtree’s does. As mentioned before, despite the greater number of false hits, both these methods are faster on travel time graphs. As a result TNR actually performs better than MGtree on travel times for low densities. In fact all methods perform better on density 0.0001 than density 0.001 because there are fewer objects and therefore a smaller chance of having similar distances, leading to fewer false hits. MGtree’s performance degrades by the smallest amount on high densities, as its optimised repeated computations make it more robust to the increase in false hits. If TNR were to be combined with MGtree to answer local queries (rather than CH), it may be a better option on NW than just MGtree. Regardless of this, PHL performs significantly better than TNR across the board. Additionally we also compare IER methods for increasing network size |V | Algorithm 5: kNN ROAD(vq , k, RO, AD) [21] 2 return; that we do not test DisBrw on travel times, as the additional information (i.e., distance ratios) stored in the SILC index relies heavily on Euclidean distance, making it more complex to adapt than IER and likely to perform significantly slower than on travel distances. return true; 25 1 else R ← Rnets(n) // Leaves have only one Rnet; for each edge e(ve , va ) ∈ R do if ¬IsV isited(va ) then Enqueue(Q, (b, d + w(ve , va ))); 14 16 REPEATED EXPERIMENTS A kNN query returns the k closest objects to a query vertex by their network distance. However network distance may not necessarily be a physical distance. A common scenario in practice is travel times. We presented the experimental results for queries on the travel time graph for the US in Section 7.5. In this appendix we present results for other experiments on travel time graphs. Note 16 10 5 10 4 10 3 102 101 10 PHL TNR Dijk MGtree 0 1 5 10 CH 25 10 6 10 5 10 4 107 CH 103 102 10 50 PHL TNR Dijk MGtree 107 Query Time (µs) 10 6 Query Time (µs) Query Time (µs) 107 106 105 104 103 102 101 0.0001 0.001 0.01 k 0.1 105 1 PHL TNR Dijk MGtree 100 1 CH 106 Number of Vertices Density 107 (a) Varying k (b) Varying Density (c) Varying Density Figure 23: IER Variants on Travel Time Graphs (NW, d=0.001, k=10, uniform objects) 102 IER-Gt IER-PHL INE ROAD Gtree 101 1 5 10 25 103 102 101 100 50 106 IER-Gt IER-PHL INE ROAD Gtree 0.0001 0.001 k 0.01 0.1 1 106 IER-Gt IER-PHL INE ROAD Gtree 105 Query Time (µs) 3 10 4 Query Time (µs) 10 105 Query Time (µs) Query Time (µs) 104 104 103 102 101 R1 R2 Density R3 R4 Query Set R5 R6 105 INE ROAD Gtree IER-Gt IER-PHL 10 100 104 103 102 101 100 1 1000 Num. of Clusters (a) Varying k (b) Varying Density d (c) Varying Min. Obj. Distance (d) Varying No. of Clusters Figure 24: Query Performance on Travel Time Graphs (NW, d=0.001, k=10, uniform objects) B.3.1 in Figure 23(c). The most notable observation is that TNR deteriorates more rapidly than other methods because, for the same grid size, TNR is able to answer fewer queries using transit nodes with increasing |V |. With increasing |V |, grid cells contain more vertices, and as a result distances to more kNNs must be computed using the slower local method. Road Network Pre-Processing and Space 10 4 10 5 10 3 10 4 102 10 1 10 0 10-1 Gtree ROAD 105 PHL 106 107 Number of Vertices Index Size (MB) Construction Time (s) Figure 26 shows the index construction time and index size for the travel time edge weight versions of the road networks in Table 1. The key difference to travel distances is that PHL is constructed faster (in fact faster than the other methods) and uses significantly less memory allowing it to be constructed for all datasets up to and including the US dataset with 24 million vertices. Travel time graphs display better hierarchies allowing for more effective pruning, leading to smaller label sizes on average. Note we do not need to repeat object index comparisons for travel times as they will be the same as for travel distances. E.g., the same partitioning of the road network is used to construct a G-tree (resp. ROAD) index in either case, which means Occurrence Lists (resp. Association Directories) will be identical. INE Gtree B.3.2 Query Time (µs) 104 104 103 102 101 IER-Gt IER-PHL INE ROAD Gtree 100 1 5 10 103 102 25 50 IER-Gt IER-PHL INE ROAD Gtree 101 k 1 5 10 25 50 k (a) Hospitals (b) Fast Food Figure 27: Varying k for Real POIs (Travel-Time) (NW, k=10) ROAD PHL 103 102 We repeat the experiments for real-world object sets in Figures 25 and 27. All observations we have made so far are similarly observed here. For example we observe the same trends for increasing real-world object set size in Figure 25 as for increasing object density. We also observe that G-tree again performs worse on the US dataset than on NW. One big difference is that IER-PHL is included in comparisons for the US dataset in Figure 25(b) as its index can be constructed for all datasets. This offsets the degraded performance of IER-Gt. The sparse object set (Hospitals) and the clustered object set (Fast Food) again show similar trends, with IER having degraded performance on the clustered object set as it is less able to distinguish candidates. Again this effect is aggravated for travel times. 101 100 105 106 Number of Vertices 107 (a) Construction Time (b) Index Size Figure 26: Effect of Road Network Size |V | (Travel-Time) B.3 Real-World Object Sets 105 Query Time (µs) B.2 Varying Parameters Figure 24 shows the equivalent experimental results for the NW dataset for varying parameters on travel time graphs, namely k, uniform object density, minimum object distances and number of clusters. We verify that the observations made in Section 7.5 are also observed here. For example, IER-PHL is again generally the best performing method except in the case of densities greater than 0.01 in Figure 24(b). As before, high densities imply there are more objects at a closer distance. This generates greater numbers of false hits, which is only made worse by the looser lower bound provided by Euclidean distance on travel time graphs. Query Performance In addition to comparison of several varying query settings on the US dataset in Section 7.5, in this section we present results for other experiments on query performance. 17 University Hospital Hotel Fast Food Post Park Court University Hospital Post 149 866 373 536 1035 120 Fast Food Park 378 272 354 714 146 IER-Gt IER-PHL 2192 449 756 1251 INE ROAD Gtree 94 69 68 Hotel 2922 654 834 1494 3027 661 891 1503 4844 51 39 102 674 995 1449 1019 1258 1655 103 101 School 13508 14790 104 1444 1550 2351 Query Time (µs) 521 81 76 94 149 312 378 162 45 84 118 61 570 1580 501 315 602 30 93 108 25 Court 105 IER-Gt IER-PHL 12 10 101 224 365 319 445 1444 2600 4172 102 134 100 172 483 563 884 103 INE ROAD Gtree 10849 16930 104 141 242 Query Time (µs) 105 School (a) NW Road Network (b) US Road Network Figure 25: Varying Real-World Object Sets for Travel Time Graphs (Defaults: k=10) C. FURTHER RELATED WORK ever these methods assume a static object set, we may also want to find the CkNNs given moving objects [22]. Road Network Embedding (RNE) [27] was the first work to propose a solution to the kNN problem specifically for road networks. It proposes a better approximation of NNs in a road network than the Euclidean NNs by pre-computing certain shortest path distances and then computing kNNs in higher dimensional space. The Voronoi-based Network Nearest Neighbor (VN3 ) [19] computes the network equivalent of a Voronoi diagram for a given object set to partition all road network vertices based on its nearest neighbor. This partitioning produces borders, and VN3 computes and stores network distances between borders of the same region. It then answers kNN queries by observing that the next NN must be in some Voronoi region adjacent to the currently visited regions. But lower object set densities result in larger numbers of borders and significant pre-computation overhead. Other methods such as the Nearest Descendent [16], UNICONS [11] and Islands [17] involve pre-computation of the nearest neighbors for some or all vertices. UNICONS and Islands use a parameter to limit how many NNs are computed for each vertex, and UNICONS also limits pre-computation to only some vertices. The performance of both methods degrades when k exceeds the number of pre-computed NNs. While Nearest Descendent does not, it must still store the nearest object (using a different graph representation) for each road network vertex. A “full index” essentially stores, for each road network vertex v, all objects in order of the network distance from v. kNN can be answered by simply performing k look-ups. This involves computing the network distances from each v to each object resulting in significant space overhead. The Distance Index [15] provided a means to compress it. This is achieved by categorising network distance into a set of pre-defined ranges and storing only a bit-wise representation of each range. This results in a 1-order of magnitude space reduction over the full index. A common theme among these methods, in stark contrast to those we have evaluated, is that kNN queries are answered by first creating a single index combining the road network and an object set. This is highly disadvantageous as it will not scale with greater numbers of object sets. We must also reprocess the entire road network for changes to an object set, which may be quite frequent. Thus the current state-of-art has moved towards decoupling the object set from the road network. As a result these methods are unlikely to be useful in practice. These issues were discussed in detail in Section 2.2. The methods we have mentioned so far have been concerned with static data. While beyond the scope of this study, we briefly identify several continuous kNN (CkNN) problems for the interested reader. One variation is when the query vertex traverses some path P [11], and kNNs are computed for each vertex in P . A related variation is finding the path nearest neighbors [10], i.e. the single set of k objects that are nearest to the entire path P . How- 18
8cs.DS
Journal of Advanced Bioinformatics Applications and Research ISSN 0976-2604 Vol 3, Issue 1, 2012, pp 271-280 http://www.bipublication.com EVOLUTIONARY ALGORITHMS IN GENETIC REGULATORY NETWORKS MODEL Khalid Raza*, Rafat Parveen Department of Computer Science, Jamia Millia Islamia (Central University), New Delhi, India * Corresponding author: Email: [email protected] ABSTRACT: Genetic Regulatory Networks (GRNs) plays a vital role in the understanding of complex biological processes. Modeling GRNs is significantly important in order to reveal fundamental cellular processes, examine gene functions and understanding their complex relationships. Understanding the interactions between genes gives rise to develop better method for drug discovery and diagnosis of the disease since many diseases are characterized by abnormal behaviour of the genes. In this paper we have reviewed various evolutionary algorithms-based approach for modeling GRNs and discussed various opportunities and challenges. Keywords: Genetic regulatory network, reverse-engineering of genetic networks, network inference, evolutionary algorithms, genetic programming INTRODUCTION With the advancement in DNA microarray technologies, it has become possible to effectively and efficiently measure gene expression levels of up to tens of thousands of genes under various conditions simultaneously; which are playing successfully role in gene function prediction, drug development, disease diagnosis and patient survival analysis [4][5]. Systems biology has grown up as new discipline which combines the research efforts in biology, chemistry, physics, mathematics, computer science, and other disciplines to systematically study the surprisingly complex interactions in biological systems. In the last decade, many efforts have been applied in order to develop computational methods for inferring underlying genetic networks from time series gene expression data. Today inference of genetic networks (also called reverse-engineering of genetic networks) from time series gene expression data has become rather important in order to understand the complex biological interactions and behaviour. Many theoretical models have been proposed to model, analyze, reconstruct and infer complex regulatory interactions and provide hypothesis for experimental verification. These models are Boolean networks, differential equations, Bayesian networks, Petri nets, machine learning approaches, evolutionary computing etc. Most of the interactions and parameters of these networks are still not well-known or poorly known, so accurately inferring such networks remains a challenge for the researchers. The motivation behind the study of genetic network is that it describes how genes or groups of genes interact with each other and to identify the complex regulatory interaction between genes in a living organism. The genetic networks enable us to understand the intricate interactions of multiple genes under various stimuli or environmental conditions [1]. Inference of genetic network is important because it presents a synthetic network view of the current biological knowledge and allows structuring in such a way that reveals relevant properties that might remain hidden otherwise. Genetic network also allows prediction of dynamic behaviour of the network which is later EVOLUTIONARY ALGORITHMS IN GENETIC REGULATORY NETWORKS MODEL compared with experimental results and allows either confirmation of the model’s accuracy or recommend correction in the model. System Biology is a fast growing interdisciplinary research area which tries to decipher the complex interactions between cell products [2]. A large number of mathematical modeling techniques and inferential algorithm have been devised. Basic steps for modeling genetic regulatory networks (GRNs) consists of few main steps such as i) choosing an appropriate model ii) inferring parameters from the data iii) validating the model iv) conducting simulations of the GRN to predict its behaviour under various conditions [3]. For modeling GRN, genes are treated as variables which change their expression values with respect to time. The rest of the paper is organized as follows. Section II discusses some of the basic modeling techniques, such as Boolean networks, generalized Bayesian networks, linear and nonlinear differential equations, Petri net, fuzz logic, artificial neural networks etc. Section III gives a brief concept of about evolutionary algorithms. Section IV discusses the role of evolutionary algorithms (EA) and its hybridization in gene regulatory networks modeling. Finally Section V concludes the paper by comparing various EAbased approaches, their merits and flaws and highlighting some of the challenges and future trends. [II] MODELING TECHNIQUES There are several approaches for modeling and inferring GRNs from gene expression data including directed graphs model, Boolean networks [6]–[8], generalized Bayesian networks [9][10], linear and non-linear ordinary differential equations (ODEs) [11]–[15], Petri net [16][17], fuzzy logic, artificial neural networks etc. Directed graph is the most simple and straightforward way to model a GRN. Here Khalid Raza and Rafat Parveen vertices of the directed graph represent genes and edges denote interactions among the genes. A directed edge is defined as a tuple (i, j, s), where i denotes the head, j tail of the edge and s is equal to either + or – indicating whether i is activated or inhibited by j. The graph representation of GRNs allows a number of operations that can be carried out to make prediction about biological processes [12]. Figure 1 shows a directed graph representation of GRNs. Figure 1. Directed graph representing a GRN and its definition Boolean networks are based on Boolean logic where each gene is either fully expressed (represented as “1”) or not expressed at all (represented as “0”). The interactions between elements can be represented by Boolean functions which calculate the state of a gene from the activation of other genes. Hence, network can transition from one state to another state. The advantages of Boolean network models are its simplicity and finite state space but unfortunately these models are unable to capture the effect of genes at intermediate levels. It also unrealistically assumes that transitions between activation states of the genes are synchronous. In Boolean networks, if there are N genes in a GRN, the network can be in any of the 2N possible states. This exponential state space makes the classification of attractors a computationally and memory intensive task. Figure 2 shows a Boolean network of three entities a, b and c. The state transitions follow the regulation functions shown on the right, 272 EVOLUTIONARY ALGORITHMS IN GENETIC REGULATORY NETWORKS MODEL which describe the rules of the model. Thin arrows indicate the regulators of each node and time steps are represented by thick arrows [19]. Bayesian networks (BNs) models use directed acyclic graph G = (V, E) to represent the network where vertices (V) corresponds to genes and the edges (E) presenting the conditionally dependent interactions between genes. These models estimate the multivariate joint probability distributions through local probabilities [18]. The main advantages of these models are its capabilities to deal with the stochastic aspects of gene expression, handling noisy and incomplete data. However, these models are unable to deal with the dynamic aspects of gene regulations. To overcome this dynamicity problem Dynamic Bayesian networks (DBNs) were devised. Regulation Functions Figure 2. A Boolean network with regulation functions of three elements a, b and c [19] Khalid Raza and Rafat Parveen Ordinary differential equations (ODEs) have been most widely used techniques for modeling dynamic biochemical systems [18] especially genetic regulatory networks [12]. The ODEs allow more detailed descriptions of network dynamics, by explicitly modeling the concentration changes of molecules over time. The ODE formalism models the concentrations of RNAs, proteins, and other molecules by timedependent variables. Regulatory interactions take the form of functional and differential relations between the concentration variables. Although ODE approach provides detailed information about the network’s dynamics but it requires high-quality data on kinetic parameters and hence it is currently applicable to only a few systems. A detailed discussion and review about various differential equation-based models can be found in [12] and [19]. Petri net is a non-deterministic approach for modeling the dynamics of regulatory networks. Petri nets are an extension to graph models that represents a well-established technique for modeling regulatory systems. Following the analogy of biological systems, Petri nets have successfully been applied for simulating gene regulatory network, allowing simple quantitative representation of dynamic processes. The drawback of Petri nets model is that it does not support hierarchical structuring, which makes them difficult to use for large-scale models. Fuzzy logic is one of the constituents of soft computing technique which has been drawn from engineering and other applied sciences. Fuzzy logic is suitable for modeling GRN because i) fuzzy logic extracts trends not values so fuzzy logic is inherently tolerant to noisy data ii) it is computationally efficient and can be extended to large number of components and iii) it is implemented in a user-friendly language (e.g. if-then rules). Fuzzy logic has been successfully used for modeling gene regulatory networks due to its capability to represent nonlinear systems, its friendly language to 273 EVOLUTIONARY ALGORITHMS IN GENETIC REGULATORY NETWORKS MODEL incorporate and edit domain knowledge in the form of fuzzy rules [20]–[24]. However, computational time is a major obstacle in developing more complex fuzzy models. One solution to this problem can be preprocessing of data so that computation time can be reduced. Most widely used method of data pre-processing is data clustering. A wide range of clustering algorithms bas been proposed in the literature including hierarchical clustering, adaptive resonance theory (ART) [51], self-organizing maps (SOM), k-means, and fuzzy c-means. Artificial neural networks (ANNs) have been developed as generalization of mathematical models of biological nervous systems. The capabilities of ANNs to learn from the data-rich environment, approximate any multivariate nonlinear function and its robustness to noisy data make it a suitable choice for modeling GRNs from gene expression data. Neural network architecture has a number of nodes and wirings between them. Generally, the number of nodes is defined as the number of genes but it may also represent any other factors involved in the regulatory network. Let a N-dimensional vector u(t) be the expression state of a gene network containing N genes and element uj(t) is the expression state of gene j at time t. The wirings define regulatory interactions between genes, which are represented by a weight matrix w. A wiring from gene j to gene i means a nonzero weight wij. A positive weight implies a stimulating effect (positive feedback) while a negative weight implies repression (negative feedback). A zero weight wi; means no regulatory interaction. The control strength is the multiplication of weight wij and state value uj. The total regulatory input to gene i is the sum of regulatory strengths of all genes in the regulatory network [52], N ri (t )   wij u j (t )   i , i  1, 2 , ..., N j 1 where αi is a parameter to represent the influence of external inputs or reaction delay. A Khalid Raza and Rafat Parveen squashing function then transfers the regulatory input r(t) into a normalized transcriptional response. Various types of ANNs have been successfully applied for modeling gene regulatory interactions including perceptrons [25]–[27], self-organizing maps [28]–[29] and recurrent neural networks (RNNs) [30][31]. BASICS OF EVOLUTIONARY ALGORITHMS Evolutionary algorithms (EAs) are optimization algorithm based on Darwin’s theory of evolution. The field of evolutionary algorithms has been growing rapidly over the last few years. It is basically a search algorithm that is modeled on the mechanics of natural selection and natural genetics. It combines survival of the fittest among individuals with a structured yet randomized information exchange to form a search algorithm. In EAs optimization techniques searching from a population are done from a single point and for each iterations a competitive selection is done. The solutions with high “fitness” are recombined with other solutions. The solutions are then “mutated” by making a small change to a single element of the solution. The main purpose of recombination and mutation is to generate new solutions but it is biased towards regions of the space for which good solutions have already been identified. Generally, three evolutionary techniques are distinguished: genetic programming (GP), genetic algorithms (GA) and evolutionary programming (EP) (Goldberg, 1989, Michalewicz, 1996). Genetic programming focuses on programs evolution, genetic algorithms focuses on optimizing general combinatorial problems and evolutionary programming focuses on optimizing continuous functions without recombination. EAs belong to the class of probabilistic algorithms and they differ from random algorithms in that they combine elements of directed and stochastic search. Due to this reason EAs are more robust 274 EVOLUTIONARY ALGORITHMS IN GENETIC REGULATORY NETWORKS MODEL than directed search methods. Another merit of EAs is that they maintain a population of potential solutions while other search techniques process a single point of the search space. The limitation of GP and GA-based modeling techniques are that they do not take care of the noise effect which is quite common in microarray data. Figure 3 shows a general scheme of EAs and detailed discussion on EAs can be found in [32][33]. Various constituents of EAs have been successfully applied for modeling GRNs [34]–[51]. Figure 3. A general scheme of evolutionary algorithm ROLE OF EVOLUTIONARY ALGORITHMS IN GRN MODELING Several constituents of evolutionary algorithms such as genetic programming, genetic algorithm, evolutionary programming and their hybridization have been successfully applied for efficient modeling genetic regulatory networks. A combination of Genetic Programming (GP) and Least Mean Square (LMS) method, called LMS-GP, to identify a concise form of regulation between genes from time series data has been applied by Ando et.al. [35]. The LMS methods are applied to determine the coefficients of the GPs, which decreases the Mean Squared Error (MSE) between the observed and model time series without complicating the GPs. The proposed LMS-GP Khalid Raza and Rafat Parveen model has been tested on artificial as well as real-world data. The model has an average MSE of 4.21  10-3 over 10 runs, while standard GP averaged MSE is 6.704  10-3 over 10 runs. Genetic programming jointly with Kalman filtering approach to infer GRNs from time series data has been applied by Wang et.al. [36]. In this method, nonlinear differential equation model is adopted and an iterative algorithm has been proposed to identify the model. Here GP is employed to identify the structure of the model and Kalman filtering is deployed to estimate the parameters in each of the iterations. The proposed model has been tested using synthetic as well as time-series gene-expression data of yeast protein synthesis. Due to availability of noise in microarray data, the Kalman filtering may not be appropriate for estimating parameters. Decoupled S-system formalism for inferring effective kinetic parameters from time series data and Trigonometric Differential Evolution (TDE) as the optimization engine for capturing the dynamics of gene expression data has been applied by Noman et.al. [37]. Here fitness function used is a modified version of Kimaru et.al. [38] for minimizing the number of false positive predictions. Spare network structure has been identified with the help of hill-climbing local search (HCLS) method within the framework of proposed EA. Experiments on small scale artificial network in noise-free as well as noisy environment is done and found that proposed model successfully identify the network structure and its parameter values. Reallife data has also been used for reconstructing the SOS DNA repair network of E.coli. The proposed model correctly identified the regulations of gene lexA and some other known regulations. The doubled S-system model proposed by Chowdhury and Chetty [45] extended the work of Noman et.al. [37]. In this model, GA is used for scoring the networks’ several useful features for accurate inference of 275 EVOLUTIONARY ALGORITHMS IN GENETIC REGULATORY NETWORKS MODEL network, such as a Prediction Initialization (PI) algorithm to initialize the individuals, a Flip Operation (FO) for matching the values, and a restricted execution of HCLS over few individuals. It also proposes a refinement technique for optimizing sensitivity and specificity of inferred networks [45]. Maeshiro et.al. [34] proposed an EAs based approach to predict GRNs from gene expression time course data which consists of two stage loop each using following steps: i) generate M initial fictitious networks ii) simulate each network with ultra high speed simulator Starpack [47] (Signal Transduction Advanced Research Package) and find out the differences from biological experimental data iii) finish, if reaches maximum number of loops or the score of the top ranked network shows no improvement, iv) execute roulette selection, mutate and execute crossover to generate a new set of networks. Here simulation of the second stage has higher precision over first stage, serving as local optimization process. The proposed model was tested on five synthetic networks and results were compared with dynamic Bayesian network model and found that sensitivity is approximately 5% higher and precision was approximately equal. The prediction of four networks resulted in the sensitivity of 70–80%, and precision of 70%. Ho et.al. [40] proposed an intelligent two-stage evolutionary algorithm (iTEA) to infer the Ssystem models of N-gene genetic networks from time-series data of gene expression. The problem is initially decomposed into N optimization subproblems having 2(N+1) parameters each. In the first stage, each subproblem is solved using EA and intelligent crossover based on an orthogonal arrays and factor analysis. In the second stage, solutions of the N subproblems are combined and refined using an OED-based simulated annealing framework for handling noisy gene expression data. The efficiency of iTEA was evaluated Khalid Raza and Rafat Parveen using simulated expression patterns with and without noise. Huang et.al. [49] extended the method iTEA proposed by [40] by generating additional multiple data sets of gene expression profiles by perturbing the given data set and named it as iTEAP method. The iTEAP model copes up “multiplicity of solutions” by using noisy duplicates to obtain accurate and robust GRNs. Shu et.al. [46] has introduced an improved version of iTEA method named it as iTEA2 for establishing large-scale GRN by incorporating gene regulation domain knowledge in EA. The iTEA2 method uses hybridize encoding scheme that comprises of regulation strength, gene number regulated, and binary control parameters in a chromosome where value of the strength parameter is the kinetic order and control parameters indicate that the up- and down-regulated kinetic orders are active or not. If I be the maximal number of genes that directly regulated each gene then total number of parameters encoded in a chromosome for one gene is 5I+2, which is independent of N. Hence, the number of parameters needed for the construction of GRN reduced from O(N2) to O(N) [46]. Chan et.al. [41] extracted GRNs from timeseries gene expression data using a two-stage methodology that was implemented in the software tool “Gene Network Explorer (GNetXP)”. At the first stage, GA has been applied in selecting the initial cluster centers for subsequent Expectation Maximization (EM) partitioning. At the second stage, Kalman Filter was deployed to identify a set of first-order differential equations which describes the dynamics of the network and used these equations for determining important gene interactions and predicting gene expression values at future time points. The proposed methodology was tested on the human fibroblast response gene expression data. Tominaga and Horton [42] developed algorithm for inferring biological networks using only 276 EVOLUTIONARY ALGORITHMS IN GENETIC REGULATORY NETWORKS MODEL time-series data restricted to a scale-free networks. The S-System was adopted as network model and distributed GA to optimize the model. The inherent parallelism enhances the performance of the model [18]. Ram and Chetty [43] proposed a causal GA-based approach for learning GRNs which is guided by exploiting certain characteristics of diversity and heuristic in order to generate better networks. The proposed formalism is named as guided genetic algorithm (GGA) approach. describe their regulation type. In this hybridized approach, recurrent network, self-organizing structure and evolutionary training generate an optimum pool of regulatory relationships and fuzzy systems tolerate noise-related issues. One of the main objectives of understanding gene regulation is to reveal how combination of transcription factors (TFs) control sets of coexpressed genes under specific experimental conditions. Schroder et.al. [50] proposed multiobjective genetic algorithms (MOGAs) for Mitra et.al. [39] proposed multiobjective evolutionary biclustering and correlation-based approach to extract gene interaction networks from microarray data. Biclustering has been applied to find a subset of similarly expressed genes under some specific experimental condition. To add/remove relevant/irrelevant genes for fine tuning, local search strategy has been deployed. Preprocessing technique is applied to preserve strongly correlated gene interaction pairs. A multilayer evolutionary trained neuro-fuzzy recurrent network (ENFRN) approach was proposed by Maraziotis et.al. [48] which captures potential regulators of target genes and inferring transcriptional regulators for sets of coexpressed genes. In this work, three objective functions have been designed for stimulus response and can be used to integrate a priori knowledge into the detection of gene regulatory modules. The proposed method was tested and evaluated on whole genome microarray measurements of drug-response in human hepatocytes [50]. Adaptive Fuzzy Evolutionary GRN Reconstruction (AFEGRN) framework has been developed by Shoaib et.al. [44] for modeling GRNs. The AFEGRN framework is able to automatically determine model parameters, for example, number of clusters for fuzzy c-means using fuzzy-PBM index and estimation of Khalid Raza and Rafat Parveen 277 EVOLUTIONARY ALGORITHMS IN GENETIC REGULATORY NETWORKS MODEL Gaussian Distribution Algorithm. The proposed model was tested using breast cancer data to demonstrate effectiveness of AFEGRN to model any GRN. The proposed framework composed of six steps: i) data preprocessing ii) computation of number of clusters iii) clustering using fuzzy c-means iv) gene selection v) GRN construction and vi) GRNs comparison. Table 1 shows a comparative view of various hybridized form of GA-based approach and their results obtained. EA-based approaches are generally hybridized, with several other techniques such as clustering, least mean square, Kalman filtering, Trigonometric Differential Evolution, etc, for better results. CONCLUSIONS & CHALLENGES The models of gene regulatory networks are developed to capture the behavior of the system being modeled, and it is also able to produce predictions corresponding with experimental observations. Understanding GRNs is essential because a) it offers a large-scale, coarse-grained view of an organism at the mRNA level b) gives important indications for complex diseases c) assist in the development of target and personalized medicines d) helps in understanding evolution by comparing genetic networks of various genomes and e) explains how different phenotypes emanate and which groups of genes are responsible for them. Pure EAs are useful tool to analyze only small networks. However, it can be hybridized to enhance its efficiency for large networks. Although hybridized methods are computationally expensive and perform well with small-size networks but they become less efficient when analyzing the large-size networks. Scalability and parallelism can be achieved at several-level, from individual evaluation to iterative and breaking the entire problem into sub-problems. Various methods such as PSOs, RNNs, FLs, ANNs, ODEs etc. has been fused with EAs to get some good Khalid Raza and Rafat Parveen results. One of the important issues with the inference of GRN from microarray data is both limited and noisy nature of these data. It shows the compelling need to look for time-series data from various sources and some other types of biological data such as ChIP, knockout microarray experiments, protein-protein interactions and miRNA interference data. These types of data can be included in EAs in a multiobjective setting in order to speed up convergence. REFERENCES [1] Y. Sun, Gang Feng and Jinde Cao, “A New Approach to Dynamic Fuzzy Modeling of Genetic Regulatory Networks”, IEEE Transactions on Nanobioscience, vol. 9, no. 4, pp. 263-272, 2010. [2] H. Kitano, Systems biology: a brief overview, Science 2002; 295 (5560): 1662-1664. [3] Alina Sîrbu, Heather J Ruskin and Martin Crane, “Comparison of evolutionary algorithms in gene regulatory network model inference”, BMC Bioinformatics, 11:59, 2010. [4] R. Xu, X. Cai and D. Wunsch II, “Gene Expression Data for DLBCL Cancel Survival Prediction with a Combination of Machine Learning Technologies”, Proc. 27th Annual Int’l Conference, IEEE Eng. In Medicine and Biology Soc., pp. 894-897, 2005. [5] G. McLachlam, K. Do and C. Ambroise, Analyzing Microarray Gene Expression Data, John Wiley & Songs, 2004. [6] T. Akutsu, S. Miyano and S. Kuhara, Identification of genetic networks from a small number of gene expression patterns under the Boolean network model, Pac Symp Biocomput, 17-28, 1999. [7] S. Martin, Z. Shang, A. Martino and J-L. Faulon, Boolean Dynamics of Genetic Regulatory Networks Inferred from Microarray Time Series Data, Bioinformatics, vol. 23, pp. 866-874, 2007. [8] I. Shmulevich, E.R. Dougherty, S. Kim, and W. Zhang, Probabilistic Boolean Networks: A RuleBased Uncertainty Model for Gene Regulatory Networks, Bioinformatics, vol. 18, pp. 261-274, 2002. [9] N. Friedman, M. Linial, I. Nachman, and D. Pe’er, Using Bayesian Networks to Analyze Expression Data, J. Computational Biology, vol. 7, pp. 601-620, 2000. [10] D. Husmeier, Sensitivity and Specificity of Inferring Genetic Regulatory Interactions from Microarray Experiments with Dynamic Bayesian Networks, Bioinformatics, vol. 19, pp. 2271-2282, 2003. 278 EVOLUTIONARY ALGORITHMS IN GENETIC REGULATORY NETWORKS MODEL [11] E. Klipp, Systems Biology In Practice: Concepts, Implementation and Application, Wiley-VCH, Weinheim, 2005. [12] H. de Jong, Modeling and Simulation of Genetic Regulatory Systems: A Literature Review, J. Computational Biology, vol. 9, pp. 67-103, 2002. [13] H. de Jong and M. Page, Search for Steady States of Piecewise-Linear Differential Equation Models of Genetic Regulatory Networks, IEEE/ACM Trans. Computational Biology and Bioinformatics, vol. 5, no. 2, pp. 208-222, Apr.-June 2008. [14] T. Chen, H.L. He and G.M. Churck, Modeling gene expression with differential equations, Pac. Symp. Biocomput, pp. 29-40, 1999. [15] J.J. Tyson, A. Csikasz-Nagy and B. Novak, The dynamics of cell cycle regulation, Bioessays 2002, 24(12): 1095-1109. [16] I. Koch, M. Schueler and M. Heiner, STEPP – search tool for exploration of Petri net paths: a new tool for Petri net-based path analysis in biochemical networks, In Silico Biol. 5, 129-137, 2005. [17] Raed I. Hamed, Syed I. Ahson and Rafat Parveen, Designing Genetic Regulatory Networks Using Fuzzy Petri Nets Approach, International Journal of Automation and Computing, Vol. 7, No. 3, pp. 403412, 2010. [18] Sushmita Mitra, Ranajit Das and Yoichi Hayashi, Genetic Networks and Soft Computing, IEEE/ACM Transactions on Computation Biology and Bioinformatics, Vol. 8, No. 1, pp. 94-107, 2011. [19] Guy Karlebach and Ron Shamir, Modeling and analysis of gene regulatory networks, Nature Reviews Molecular Cell Biology, Vol. 9, pp. 770780, 2008. [20] P.J. Woolf and Y. Wang, A Fuzzy Logic Approach to Analyzing Gene Expression Data, Physiological Genomics, vol. 3, pp. 9-15, 2000. [21] H. Ressom, D. Wang, R.S. Varghese and R. Reynolds, Fuzzy Logic-Based Gene Regulatory Network, 12th IEEE International Conference on Fuzzy System, vol. 2, pp. 1210-1215, 2003. [22] Pan Du, et. al., Modeling Gene Expression Networks Using Fuzzy Logic, IEEE Transcation on Systems, Man and Cybernetic – Part B: Cybernetics, vol. 35, no. 6. pp. 1351-1359, 2005. [23] Yonghui Sun, Gang Feng and Jinde Cao, A New Approach to Dynamic Fuzzy Modeling of Genetic Regulatory Networks, IEEE Transactions on Nanobioscience, vol. 9, no. 4, pp. 263-272, 2010. [24] R. Ram, Madhu Chetty and Trevor I. Dix, “Fuzzy Model for Gene Regulatory Network,” Proc. of IEEE Congress on Evolutionary Computation, pp. 14501455, 2006. [25] S. Kim, et.al., Multivariate Measurement of Gene Expression Relationships, Genomics, vol. 67, pp. 201-209, 2000. Khalid Raza and Rafat Parveen [26] J. Huang, H. Shimizu, and S. Shioya, Clustering Gene Expression Pattern and Extracting Relationship in Gene Network Based on Artificial Neural Networks, J. Bioscience and Bioeng., vol. 96, pp. 421-428, 2003. [27] Xiaobo Zhou, et.al., A Bayesian connectivity-based approach to constructing probabilistic gene regulatory networks, Bioinformatics, 20 (17): 2918292, 2004. [28] J. Vohradsky, Neural Network Model of Gene Expression, FASEB J., vol. 15, pp. 846-854, 2001. [29] D.C. Weaver, C.T. Workman, and G.D. Stormo, Modeling Regulatory Networks with Weight Matrices, Proc. Pacific Symp. Biocomputing, pp. 112-123, 1999. [30] Xiao Hu, Ann Maglia and Donald C. Wunsch II, A General Recurrent Neural Network Approach to Model Genetic Regulatory Networks, Proc. of IEEE Engineering in Medicine and Biology Annual Conference, pp. 4735-4738, 2005. [31] Debasish Datta, et.al., A Recurrent Fuzzy Neural Model of a Gene Regulatory Network for Knowledge Extraction Using Differential Equation, Proc. of IEEE Congress on Evolutionary Computation, pp. 2900-2906, 2009. [32] J.R. Koza, Gene Programming, MIT Press: Cambridge, M.A., 1992. [33] T. Back, Evolutionary Algorithms in Theory and Practice, Oxford University Press, New York, 1996. [34] T. Maeshiro, et.al., An evolutionary system for prediction of gene regulatory networks in biological cells, SICE Annual Conference 2007, pp. 1577-1581, 2007. [35] S. Ando, E. Sakamoto and H. Iba, Modeling genetic network by hybrid GP, Proceedings of the 2002 Congress on Evolutionary Computation, 2002. CEC '02., vol.1, no., pp.291-296, 2002. [36] Haixin Wang, Lijun Qian and E. Dougherty, Inference of gene regulatory networks using genetic programming and Kalman filter, IEEE GENSIPS, pp. 27-28, 2006. [37] Nasimul Noman and Hitoshi Iba, Reverse engineering genetic networks using evolutionary computation, Genome Informatics 16(2): 205-214, 2005. [38] S. Kimura et.al., Inference of S-system models of genetic networks using cooperative coevolutionary algorithm, Bioinformatics, 21(7): 1154-1163, 2005. [39] S. Mitra, R. Das, H. Banka, and S. Mukhopadhyay, “Gene Interaction – An Evolutionary Biclustering Approach,” Information Fusion, Elsevier, vol. 10, pp. 242-249, 2009. [40] S.Y. Ho, et.al., An Intelligent Two-Stage Evolutionary Algorithm for Dynamic Pathway Identification from Gene Expression Profiles, 279 EVOLUTIONARY ALGORITHMS IN GENETIC REGULATORY NETWORKS MODEL IEEE/ACM Transaction on Comp. Bio. and Bioinformatics, vol. 4, no. 4, pp. 648-704, 2007. [41] Z.S.H. Chan, N. Kasabov, and L. Collins, “A TwoStage Methodology for Gene Regulatory Network Extraction from Time-Course Gene Expression Data,” Expert Systems with Applications, vol. 30, pp. 59-63, 2006. [42] D. Tominaga and P. Horton, “Inference of Scale-Free Networks from Gene Expression Time Series,” J. Bioinformatics and Computational Biology, vol. 4, pp. 503-514, 2006. [43] Ramesh Ram and Madhu Chetty, "A Guided Genetic Algorithm for Learning Gene Regulatory Networks," Proc. IEEE Congress on Evo. Comp., pp. 3862-3869, 2007. [44] Muhammad Shoaib, B. Sehgal, Iqbal Gondal, and Laurence Dooley, “AFEGRN: Adaptive Fuzzy Evolutionary Gene Regulatory Network Reconstruction Framework,” Proc. IEEE International Conference on Fuzzy Systems, pp. 1737-1741, 2006. [45] Ahsan Raja Chowdhury and Madhu Chetty, “An Improved Method to Infer Gene Regulatory Network using S-System,” IEEE Congress on Evolutionary Computation, pp. 1012-1019, 2011. [46] Li-Sun Shu, Hui-Ling Huang, Shinn-Jang Ho and Shinn-Ying Ho, “Establishing large-scale gene regulatory networks using a gene-knowledge embedded evolutionary computation method,” IEEE Int’l Conf. on Computer Science and Automation Engineering (CSAE), vol.4, no., pp.272-276, 2011. [47] H. Hemmi, T. Maeshiro and K. Shimohara, “New computing system architecture for scientific simulations – Non CPU-oriented methodologies”, Frontiers of Computational Science, pp. 177-180, Springer, 2007. [48] Ioannis A Maraziotis, Andrei Dragomir and Dimitris Thanos, Gene regulatory networks modeling using a dynamic evolutionary hybrid, BMC Bioinformatics, 11:140, 2010. [49] Hui-Ling Huang, Kuan-Wei Chen, Shinn-Jang Ho, and Shinn-Ying Ho, “Inferring S-system Models of Genetic Networks from a Time-series Real Data Set of Gene Expression Profiles”, IEEE Congress on Evolutionary Computation (CEC), pp. 2788 – 2793, 2008. [50] Adrian Schr¨oder et.al., “Inferring Transcriptional Regulators for Sets of Co-expressed Genes by MultiObjective Evolutionary Optimization”, IEEE Congress on Evolutionary Computation (CEC), pp. 2285–2292, 2011. [51] D. Wang, H. Ressom, M.T. Musavi, and C. Domnisoru. Double self-organizing maps to cluster gene expression data, Proc. of the European Symposium on Artificial Neural Networks (ESANN,), Bruees. Beleium. - I I pp.25-50,2002. Khalid Raza and Rafat Parveen [52] Tianhai Tian and Kevin Burrage. "Stochastic Neural Network Models for Gene Regulatory Networks", IEEE Congress on Evolutionary Computation - CEC , pp. 162-169, 2003. 280
5cs.CE
On Input Design for Regularized LTI System Identification: Power-constrained Input ⋆ Biqiang Mu a and Tianshi Chen b arXiv:1708.05539v1 [cs.SY] 18 Aug 2017 a Division of Automatic Control, Department of Electrical Engineering, Linköping University, Linköping, 58183, Sweden b School of Science and Engineering, The Chinese University of Hong Kong, Shenzhen, 518172, China Abstract Input design is an important issue for classical system identification methods but has not been investigated for the kernel-based regularization method (KRM) until very recently. In this paper, we consider in the time domain the input design problem of KRMs for LTI system identification. Different from the recent result, we adopt a Bayesian perspective and in particular make use of scalar measures (e.g., the A-optimality, D-optimality, and E-optimality) of the Bayesian mean square error matrix as the design criteria subject to power-constraint on the input. Instead to solve the optimization problem directly, we propose a two-step procedure. In the first step, by making suitable assumptions on the unknown input, we construct a quadratic map (transformation) of the input such that the transformed input design problems are convex, the number of optimization variables is independent of the number of input data, and their global minima can be found efficiently by applying well-developed convex optimization software packages. In the second step, we derive the expression of the optimal input based on the global minima found in the first step by solving the inverse image of the quadratic map. In addition, we derive analytic results for some special types of fixed kernels, which provide insights on the input design and also its dependence on the kernel structure. Key words: Input design, Bayesian mean square error, kernel-based regularization, LTI system identification, convex optimization. Over the past few years, the kerel-based regularization method (KRM), which was first introduced in Pillonetto & De Nicolao (2010) and then further developed in Chen et al. (2014, 2012); Pillonetto et al. (2011), has received increasing attention in the system identification community, see e.g., Chiuso (2016); Pillonetto et al. (2014) and the references therein. It has become a complement to the classical maximum likelihood/prediction error methods (ML/PEM),Ljung (1999); Söderström & Stoica (1989), which can be justified in a couple of aspects. First, the kernel, through which the regularization is defined, provides a carrier for prior knowledge on the dynamic system to be identified. Second, the model complexity is tuned in a continuous manner through the hyperparameter, which is the parameter vector used to parameterize the kernel, Mu et al. (2017); Pillonetto & Chiuso (2015). Third, extensive simulation results show that KRM can have better average accuracy and robustness than ML/PEM for the data that is short and/or has low signal-to-noise ratio, Chen et al. (2012); Pillonetto et al. (2014), and as a result, algorithms of KRM have been added to the System Identification Toolbox of MATLAB (Ljung et al., 2015). ⋆ This work is supported by the Thousand Youth Talents Plan funded by the central government of China, the Shenzhen Projects Ji-20170189 and Ji-20160207 funded by the Shenzhen Science and Technology Innovation Council, the President’s grant under contract No. PF. 01.000249 and the Start-up grant under contract No. 2014.0003.23 funded by the Chinese University of Hong Kong, Shenzhen, as well as by a research grant for junior researchers under contract No. 2014-5894, funded by Swedish Research Council. Email addresses: [email protected] (Biqiang Mu), [email protected] (Tianshi Chen). Most of the recent progress for KRM focus on the issues of kernel design and hyperparameter estimation. For the former issue, many kernels have been proposed and analyzed to embed various kinds of prior knowledge, Carli et al. (2017); Chen et al. (2016); Chen & Ljung (2017); Marconato et al. (2016); Pillonetto et al. (2016); Zorzi & Chiuso (2017). In particular, two systematic ways are introduced to design kernels in Chen & Ljung (2017): one is from a machine learning perspective which treats the impulse response as a function, and the other one is from a system theory perspective which asso- 1 Introduction Preprint submitted to Automatica 19 March 2018 estimated from a preliminary experiment), but our starting point is different and is the mean square error (MSE) matrix of the regularized finite impulse response (FIR) estimate Chen et al. (2012). Since the MSE matrix depends on the unknown true impulse response, we propose to make use of the Bayesian interpretation of the KRM and derive the so-called Bayesian MSE matrix, which only depends on the fixed kernel and the input. It is then possible to use scalar measures of the Bayesian MSE matrix as the design criteria to optimize the input, e.g., the A-optimality, D-optimality, and E-optimality measures. Interestingly, the design criterion in Fujimoto & Sugie (2016) is equivalent to the D-optimality of the Bayesian MSE matrix introduced here. Moreover, we also treat the unknown input in a way different from Fujimoto & Sugie (2016) and consider power-constrained input Goodwin & Payne (1977) accordingly. ciates the impulse response with a linear time-invariant (LTI) system. In Zorzi & Chiuso (2017), a harmonic analysis is first provided for existing kernels including the amplitude modulated locally stationary (AMLS) kernel introduced in Chen & Ljung (2017) and then is shown to be a useful tool to design more general kernels. In contrast, there are few results reported for the issue of hyperparameter estimation Mu et al. (2017); Pillonetto & Chiuso (2015). In particular, it was shown in Mu et al. (2017) that the Stein’s unbiased risk estimator (SURE) is asymptotically optimal but the widely used empirical Bayes estimator is not. There are some issues for KRM that have not been addressed adequately including the issue of input design. There are numerous results on this issue for ML/PEM, see e.g., the survey papers (Gevers, 2005; Hjalmarsson, 2005; Mehra, 1974) and the books (Goodwin & Payne, 1977; Ljung, 1999; Zarrop, 1979). The current stateof-the-art of input design for ML/PEM, see e.g., Hildebrand & Gevers (2003); Hjalmarsson (2009); Jansson & Hjalmarsson (2005), is to solve the problem in a two-step procedure. The first step is to pose the problem in the frequency domain as a convex optimization problem with a linear matrix inequality constraint and then derive the optimal input power spectrum with respect to certain design criteria, and the second step is to derive the realization of the input corresponding to the optimal power spectrum. The typical design criteria are scalar measures (e.g., the trace, the determinant or the largest eigenvalue) of the asymptotic covariance matrix of the parameter estimate or the information matrix of ML/PEM subject to various constrains on the inputs (e.g., energy or amplitude constraints). The typical realization of the input is the filtered white noise by spectral factorization of the desired input spectrum (Hjalmarsson, 2009; Jansson & Hjalmarsson, 2005) or a multisine signal (Hildebrand & Gevers, 2003). In contrast, there have been no results reported on this issue for KRM until very recently in Fujimoto & Sugie (2016), where for a fixed kernel (a kernel with fixed hyperparameter), the optimal input is derived by maximizing the mutual information between the output and the impulse response subject to energy-constraint on the input. The proposed method in Fujimoto & Sugie (2016) is very interesting but the number of the optimization variables induced by the input design problem is equal to the number of data and thus is expensive to solve when the number of data is large. Moreover, the induced optimization problem is nonconvex and the proposed gradient-based algorithm may be inefficient and subject to local minima issue. Nevertheless, their simulation result looks quite promising and motivates the interest of further investigation. Instead to solve the optimization problem induced by the input design in a direct way, we propose a two-step procedure. In the first step, under the assumption on the unknown input, we construct a quadratic map (transformation) of the input such that the transformed input design problems are convex, the number of optimization variables is equal to the order of the FIR model, and their global minima can be found efficiently by applying well-developed convex optimization software packages, such as CVX (Grant & Boyd, 2016). In the second step, we derive the expression of the optimal input based on the global minima found in the first step by solving the inverse image of the quadratic map. From an optimization point of view, a similar optimization problem to the underlying one of our method appeared before in Hildebrand & Gevers (2003); Jansson & Hjalmarsson (2005). However, our method is essentially different. First, our input design problem is posed and solved in the time domain. Second, our method is not based on asymptotic theory and works for any finite number of data. Third, the optimal input is derived by solving the inverse image of the quadratic map. In addition, we derive analytic results for some special types of fixed kernels, which provide insights on input design and also its dependence on the kernel structure. In particular, we show that the impulsive input is globally optimal and the white noise input is asymptotically globally optimal for all diagonal kernels, but they are often not optimal for kernels with correlation, e.g, the diagonal correlated (DC) kernel introduced in Chen et al. (2012). Finally, numerical simulation results are provided to illustrate the efficacy of our method. The remaining parts of this paper are organized as follows. In Section 2, we first review briefly KRM. In Section 3, we state the problem formulation of the input design problem. In Section 4, we introduce the two-step procedure to solve the input design problem. Then we show in Section 5 that for some fixed kernels, it is possible to derive the explicit solution of the optimal in- In this paper, we treat the input design problem for KRM from a perspective different from Fujimoto & Sugie (2016). Similar to Fujimoto & Sugie (2016), we also assume that the kernel is fixed (otherwise, it can be 2 There are different methods to estimate θ and the simplest one is perhaps the least squares (LS) method: put. The numerical simulation is given in Section 6 to demonstrate the proposed method. Finally, we conclude the paper in Section 7. All proofs of Theorems, Propositions, and Lemmas are postponed to the Appendix. LS θbN = arg min kY − Φθk2 = (ΦT Φ)−1 ΦT Y, (9) θ 2 Regularized FIR Model Estimation LS where k · k is the Euclidean norm. However, θbN may have large variance and thus large mean square error (MSE), as its variance increases approximately linearly with respect to n. One way to mitigate the possible large variance and reduce the MSE is by using the regularized least squares (RLS) method, see e.g., Chen et al. (2012): Consider a single-input single-output linear stable and causal discrete-time system y(t) = G0 (q −1 )u(t) + v(t). (1) R θbN = arg min kY − Φθk2 + σ 2 θT P −1 θ Here t ∈ N is the time index, q −1 is the backshift operator (q −1 u(t) = u(t − 1)), y(t), u(t) ∈ R are the output and input of the system at time t, respectively, v(t) ∈ R is a zero mean white noise with variance σ 2 > 0 and is independent of the input u(t), and the transfer function G0 (q −1 ) of the “true” system is G0 (q −1 ) = ∞ X gk0 q −k , θ∈Rn T =P Φ (ΦP ΦT + σ 2 IN )−1 Y, (2) Now we let θ0 = [g10 , · · · , gn0 ]T , where g10 , . . . , gn0 are deR fined in (2) and we then obtain the MSE matrix of θbN : where the coefficients gk0 ∈ R, k = 1, · · · , ∞ form the impulse response of the system. Further, we assume that the input u(t) is known (deterministic). The system identification problem is to estimate a model of G0 (q −1 ) as well as possible based on the data {u(t − 1), y(t)}N t=1 . R θbN − θ0 = −σ 2 Q−1 P −1 θ0 + Q−1 ΦT V, MN = E(θbR − θ0 )(θbR − θ0 )T N k=1 gk q −k , θ = [g1 , · · · , gn ]T ∈ Rn , (3) R The problem to achieve a good θbN boils down to the choice of a suitable kernel matrix P , which contains two issues: kernel design and hyperparameter estimation. 2.1 (5) (6) T (7) T (8) Φ = [φ(1) φ(2) · · · φ(N )] , V = [v(1) v(2) · · · v(N )] , Kernel Design The issue of kernel design is regarding how to embed in a kernel the prior knowledge of the underlying system to be identified by parameterizing the kernel with a parameter vector, say η, called hyperparameter. The essence of kernel design is analogous to the model structure design for ML/PEM, and the kernel determines the underlying model structure for the regularized FIR model (10b). So far, several kernels have been proposed, such as the stable spline (SS) kernel (Pillonetto & De Nicolao, 2010), the diagonal correlated (DC) kernel and the tunedcorrelated (TC) kernel (Chen et al., 2012), the latter two of which are defined as follows: and its matrix-vector form is Y = [y(1) y(2) · · · y(N )] , (13) where E(·) is the mathematical expectation. It has been shown in Mu et al. (2017, Prop. 2) that for a suitably R LS chosen kernel matrix P , Tr(MN (θbN )) ≤ Tr(MN (θbN )), where Tr(·) is the trace of a square matrix. y(t) = φT(t)θ+v(t), φ(t) = [u(t−1), · · · , u(t−n)]T , (4) T N Q = ΦT Φ + σ 2 P −1 , where n is the order of the FIR model and (·)T denotes the transpose of a matrix or vector. With the FIR model (3), system (1) is written as Y = Φθ + V, (11) = σ 4 Q−1 P −1 θ0 θ0T P −1 Q−1 +σ 2 Q−1 ΦT ΦQ−1 (12) The stability of G0 (q −1 ) implies that its impulse response decays to zero, and thus it is always possible to truncate the infinite impulse response by a high order finite impulse response (FIR) model: n X (10b) where P is positive semidefinite and is called the kernel matrix (σ 2 P −1 is often called the regularization matrix), and IN is the N -dimensional identity matrix. k=1 G(q −1 ) = (10a) where the unknown input u(t) with t = −1, . . . , −n + 1, can be handled in different ways: e.g., they can be not used (“non-windowed”) or they can be set to zero (“prewindowed”); see (Ljung, 1999, p. 320) for discussions. DC : Pkj (η) = cλ(k+j)/2 ρ|j−k| , 3 (12) is a natural measure to evaluate how good the regularized FIR model estimate (10b) is. Unfortunately, the first term of (12) depends on the true impulse response θ0 and thus it can not be used directly. η = [c, λ, ρ] ∈ Ω = {c ≥ 0, 0 ≤ λ ≤ 1, |ρ| ≤ 1}; (14) max(k,j) TC : Pkj (η) = cλ , η = [c, λ] ∈ Ω = {c ≥ 0, 0 ≤ λ ≤ 1}. (15) where the TC kernel (15) is a special case of the DC √ kernel with ρ = λ (Chen et al., 2012) and is also called the first order SS kernel (Pillonetto et al., 2014). 2.2 There are different ways to deal with this difficulty. We adopt a Bayesian perspective that is similar to the derivation of (18). More specifically, we assume that Hyperparameter Estimation θ0 ∼ N (0, P ). Then taking expectation on both side of (12) leads to Once a kernel is designed, the next step is to determine the hyperparameter based on the data. The essence of hyperparameter estimation is analogous to the model order selection for ML/PEM, and the hyperparameter determines the model complexity of the regularized FIR model (10b). Several estimation methods have been suggested in (Pillonetto et al., 2014, Section 14). The most widely used method is the empirical Bayes (also called marginal likelihood maximization) method. The idea is to adopt the Bayesian perspective and embed the regularization term σ 2 θT P −1 θ in a Bayesian framework. More specifically, we assume in (4) that v(t) and θ are independent and Gaussian distributed with v(t) ∼ N (0, σ 2 ) and θ ∼ N (0, P ). MN = σ 4 Q−1 P −1 Q−1 + σ 2 Q−1 ΦT ΦQ−1 = σ 2 Q−1 (σ 2 P −1 + ΦT Φ)Q−1 = σ 2 Q−1 , “Bayesian MSE”. We will tackle the input design problem by minimizing a scalar measure of the Bayesian MSE matrix (21) of the regularized FIR model estimate (10b). This idea is similar to that of the traditional input design problem by minimizing a scalar measure of the asymptotic covariance matrix of the parameter estimate (Ljung, 1999). The typical A-optimality, D-optimality, and Eoptimality scalar measures of the Bayesian MSE matrix (21) will be chosen as the design criteria for the input design problem and given below: (16) θ|Y ∼ N (θbR , Pb R ), θbR = P ΦT (ΦP ΦT + σ 2 IN )−1 Y, N PbNR = P − P ΦT (ΦP ΦT + σ 2 IN )−1 ΦP = σ 2 Q−1 . (17) Moreover, the output Y is also Gaussian with zero mean and covariance matrix ΦP (η)ΦT + σ 2 IN . Therefore, the hyperparameter η can be estimated by maximizing the marginal likelihood, or equivalently, −1 EB: ηb = arg min Y F (η) η∈Ω T Y + log det(F (η)), 2 F = Φ P Φ + σ IN , D − optimality : 3.1 △ det(MN ) = det(σ 2 Q−1 ), △ 2 A − optimality : Tr(MN ) = Tr(σ Q −1 ), △ E − optimality : λmax (MN ) = λmax (σ 2 Q−1 ), (18) (22) (23) (24) where λmax (·) is the largest eigenvalue of a matrix. (19) Remark 1 Another possible way to deal with the unknown θ0 in the MSE matrix (12) is to replace θ0 by an estimate obtained in advance, for example, the LS estimate (9). In this case, the MSE matrix (12) becomes where det(·) is the determinant of a matrix. The EB (18) has the advantage that it is robust Pillonetto & Chiuso (2015), but not asymptotical optimal in the sense of MSE (Mu et al., 2017). 3 (21) Since the Bayesian perspective is adopted, (21) is called the Bayesian MSE matrix of the regularized FIR model estimate (10b) under the assumption (20). Interestingly, the Bayesian MSE matrix (21) is equal to the posterior covariance of the regularized FIR model estimate (17) under the assumption (16). Then θ and Y are jointly Gaussian distributed and moreover, the posterior distribution of θ given Y is T (20) LS bLS T −1 −1 (θN ) P Q + σ 2 R−1 ΦT ΦQ−1 . (25) σ 4 Q−1 P −1 θbN Problem Formulation for Input Design Clearly, the input design would depend on the quality of the chosen estimate. Bayesian MSE Matrix and Design Criteria Remark 2 Interestingly, the D-optimality measure (22) is equivalent to the mutual information between the true impulse response and the output Y given in Fujimoto & Sugie (2016). The goal of input design is to determine, under suitable conditions, an input sequence such that the regularized FIR model (10b) is as good as possible. The MSE matrix 4 3.2 Φ has a good structure and becomes a circulant matrix: Problem Statement           Φ=         Now we are able to state the input design problem based on the design criteria (22)–(24). Assume that the kernel matrix P (η) and the variance σ 2 of the noise are known in advance (otherwise, they can be estimated with a preliminary experiment) and also note that the construction of the regression matrix Φ in (7) requires the inputs u−n+1 , · · · , uN −1 . Then the input design problem is to determine an input sequence u−n+1 , · · · , u−1 , u0 , u1 , · · · , uN −1 , (26) u0 uN −1 · · · uN −n+2 uN −n+1 u1 .. . u0 .. . un−2 un−3 un−1 un−2 un .. . un−1 .. . uN −1 uN −2  · · · uN −n+3 uN −n+2    .. .. ..  . . .   ··· u0 uN −1   . ··· u1 u0    ··· u2 u1    .. .. ..  . . .  · · · uN −n+1 uN −n Moreover, we consider the power constraint on the input sequence (26) used for the traditional ML/PEM input design problem, see e.g., (Goodwin & Payne, 1977, p. 129, eq. (6.3.12)), i.e., where, for simplicity, ut is used to denote u(t) hereafter, such that the input sequence (26) minimizes the design criteria (22)–(24) subject to certain constraints. N X u2t−i = E , i = 1, . . . , n, Under the assumption (29), the input design problem of minimizing the design criteria (22)–(24) subject to the constraint (30) can be equivalently written as follows: △ u∗D = arg min det(σ 2 Q−1 ), u∈U (27) △ u∗A = arg min Tr(σ 2 Q−1 ), u∈U △ u∗E = arg min λmax (σ 2 Q−1 ), and essentially minimizes the D-optimality measure (22) subject to an energy-constraint U = {u|uT u ≤ E , u ∈ RN }, u = [u0 , u1 , · · · , uN −1 ]T , u∈U (28) Here, we treat u−n+1 , · · · , u−1 in a different way. Our idea is not only to reduce the number of optimization variables of the input design problem, but also to bring it certain structure such that it becomes easier to solve, see Section 4 for details. In particular, we assume N ≥ n and set i = 1, · · · , n − 1. (31) (32) (33) where the constraint (30) under the assumption (29) becomes U = {u|uT u = E , u ∈ RN }, (34) u = [u0 , u1 , · · · , uN −1 ]T , It is worth to note that the optimal input is not unique in general. To check this, note that if an input sequence u∗ is optimal, then −u∗ is also optimal, where u∗ can be any of u∗D , u∗A and u∗E . Therefore, u∗D , u∗A , u∗E should be understood as the set of all optimal inputs minimizing (31), (32), (33), respectively. where E > 0 is a known constant and is the maximum available energy for the input. u−i = uN −i , (30) t=1 It should be noted that the inputs u−n+1 , · · · , u−1 are unknown for the identification problem but can be treated as design variables for the input design problem. In particular, Fujimoto & Sugie (2016) sets the inputs u−n+1 , · · · , u−1 to be zero, i.e., u−n+1 = · · · = u−1 = 0,  4 Main Results Similar to Fujimoto & Sugie (2016), we can also try to solve the input design problems (31)–(33) by using gradient-based algorithms. However, such algorithms may have the following problems: (29) 1) the input design problems (31)–(33) is expensive to solve for large N , because the number of optimization variables is N . The advantage of doing so is that the regression matrix 5 4.2 2) the gradient-based algorithms may be subject to the issue of local minima, because the input design problems (31)–(33) are non-convex. Interestingly, the quadratic map (37) makes the transformed input design problems of (31) to (33) convex. We propose to solve the input design problems (31)–(33) in a two-step procedure, and its idea is sketched below: To show this, note that the matrix Q in (13) can be written as 1) under the assumption (29), we construct a quadratic map (transformation) of u, say f (u), such that the transformed input design problems of (31)–(33) are convex and thus can be solved efficiently. 2) by exploiting the properties of f (·) and based on the globally minima of the transformed input design problems of (31)–(33), we derive the optimal inputs by solving the inverse of the map f (·). 4.1 Q(r) = r0 In + r1 Q1 + · · · + rn−1 Qr−1 + σ 2 P −1 , (41) where Qi ∈ Rn×n , i = 1, . . . , n − 1 is symmetric and zero everywhere except the (jl)-element which is one if |j − l| = i with j, l = 1, . . . , n. The map (37) transforms the input design problems (31)–(33) to the following optimization problems, respectively, A Quadratic Map r = [r0 , r1 , · · · , rn−1 ] , k=0 uk uk−j , j = 0, . . . , n − 1. (35) r0 r1   r0  r1  △ T  .. . .. R=Φ Φ= .   r  n−2 rn−3 rn−1 rn−2 ··· .. . .. . .. . rn−2 rn−1 (43) ∗ rE = arg min λmax (σ 2 Q(r)−1 ) (44) where log det(·) is used instead of det(·). Proposition 1 Consider the transformed input design problems (42) to (44). It follows that    rn−3 rn−2   ..  .. , . .    r0 r1   · · · r1 r0 • The problems (42) and (43) are strictly convex and ∗ ∗ thus rD and rA are unique in F . ∗ • The problem (44) is convex and rE exists but may be not unique in F . (36) Remark 3 From an optimization point of view, the optimization problems (42) to (44), modulo the constraint, appeared before, see e.g., Jansson & Hjalmarsson (2005). However, the contexts are different: the elements of r are the auto-correlation coefficients of the input power spectrum in Jansson & Hjalmarsson (2005) but they do not have such interpretation here unless we divide them by N and let N go to ∞. In addition, the positivity constraint of the input spectrum is transformed into a linear matrix inequality by applying the KalmanYakubovich-Popov lemma in Jansson & Hjalmarsson (2005), while the constraint here is the feasible set F , which is a convex polytope (See Remark 6 below). which is a positive semidefinite Toeplitz matrix. Actually, the definition (35) determines a quadratic vector-valued function r = f (u) = [f0 (u), · · · , fn−1 (u)]T . (37) The domain of f (·) is U which has been defined in (34) and is convex and compact, and the j-element of f (·) is fj (u) = uT Lj u, j = 0, . . . , n − 1, " " # # 0 Ij 1 1 0 IN −j + . Lj = 2 Ij 0 2 IN −j 0 (38) Remark 4 An optimal r∗ satisfies r0∗ = E , where r0∗ is ∗ ∗ ∗ the first element of r∗ , and r∗ could be rD rA , and rE . (39) Remark 5 For i = 1, . . . , n − 1, the elements of the gradient of (42) and (43) are respectively given by It follows that the corresponding value r0 is E for any input u ∈ U . Moreover, denote the image of f (·) under U by F = {f (u)|u ∈ U }, ∗ rA = arg min Tr(σ 2 Q(r)−1 ) r∈F Then we have  (42) r∈F T rj = ∗ rD = arg min log det(σ 2 Q(r)−1 ) r∈F Under the assumption (29), we define N −1 X Transformed Input Design Problem ∂ log det(σ 2 Q(r)−1 ) = −Tr(Q(r)−1 Qi ), ∂ri ∂Tr(σ 2 Q(r)−1 ) = −σ 2 Tr(Q(r)−2 Qi ). ∂ri (40) which is a convex polytope (See Theorem 2 below). 6 (45) (46) 4.3 for j = 0, 1, . . . . Then, one choice for the matrices W and S in Theorem 1 is Finding Optimal Inputs Now we assume that the global minima of the transformed input design problems (42) to (44) have been found and denoted by r∗ ∈ F , which could be any one ∗ ∗ ∗ of rD , rA , and rE . Then we consider the problem how to derive the optimal input u∗ from r∗ ∈ F by exploiting the properties of the quadratic map f (·) and the inverse map of f (·) for a given vector r ∈ F . 4.3.1 1) when N is even, # ξN ξ0 2 √ , ξ1 , · · · , ξ N −2 , √ , ζ N −2 , · · · , ζ1 (54) W= 2 2 2 2 i h T S = ξ0 , ξ1 , · · · , ξn−1 i h = ξ0 (1 : n), ξ1 (1 : n), · · · , ξ N (1 : n), · · · , ξ1 (1 : n) (55) r Properties of the Quadratic Map 2 N " 2 The map f (·) has the following properties, which ease the derivation of the optimal input as will be seen shortly. and rank(S) = min(N/2+1, n). Also, n o F = conv E ξ0 (1 : n), E ξ1 (1 : n), · · · , E ξ N (1 : n) (56) Theorem 1 Consider the map f (·) defined in (37). Then there exists a matrix S ∈ Rn×N and an orthogonal matrix W ∈ RN ×N such that the map f (·) can be written in a composite form as follows: f (u) = h1 (h2 (h3 (u))) with h1 (x) = Sx (47) (48) 2 T h2 (z) = [z02 , z12 , · · · , zN −1 ] (49) h3 (u) = W T u 2 where conv{· · · } is the convex hull of the corresponding vectors and ξj (1 : n) is the vector consisting of the first n elements of ξj . 2) when N is odd, r (50) T T where x = [x0 , x1 , · · · , xN −1 ] , z = [z0 , z1 , · · · , zN −1 ] , Moreover, the image of h3 (·) is Z = {h3 (u)|u ∈ U } = {z|z T z = E }, the image of h2 (·) 2 (59) Remark 6 The transformed input design problems (42), (43), (44) can be solved effectively by CVX (Grant & Boyd, 2016). The optimization criteria of (42), (43), (44) are standard in CVX and we only need to rewrite the feasible set F as a number of linear equalities and inequalities by the definition of convex hull (56) or (59): (53) is also a convex polytope. One choice for the matrices S and W in Theorem 1 is given in the following theorem. • when N is even, we have from (56) that Theorem 2 Let ̟ = 2π/N and define the vectors     ξj =      cos(j̟) cos(2j̟) .. . cos((N−1)j̟)            , ζj =          0 sin(j̟) sin(2j̟) .. . sin((N−1)j̟) (58) 2 is a convex polytope and the image of h1 (·) 1 (57) n o F = conv E ξ0 (1 : n), E ξ1 (1 : n), · · · , E ξ N−1 (1 : n) . i=0 F = {f (u)|u ∈ U } = {Sx|x ∈ X }  and rank(S) = min((N +1)/2, n). In addition, X = {h2 (z)|z ∈ Z } (51) ) ( N −1 X xi = E , xi ≥ 0, i = 0, 1, . . . , N −1 , (52) = x   ξ √0 , ξ1 , · · · , ξ N −1 , ζ N −1 , · · · , ζ1 W = 2 2 2 iT h S = ξ0 , ξ1 , · · · , ξn−1 h = ξ0 (1 : n), ξ1 (1 : n), · · · , ξ N −1 (1 : n), 2 i ξ N −1 (1 : n), · · · , ξ1 (1 : n) 2 N  E S(:, 1 : N/2+1)a = r          a = [a1 , a2 , · · · , aN/2+1 ]T , aj ≥ 0 (60) where r ∈ F , S(:, 1 : N/2+1) denotes the first N/2+ 1 columns of S, and the first equality constraint is PN/2+1 aj = 1 since the first element of r is E and all j=1 the elements of the first row of S are one. 7 • when N is even, a basis of K (S) is   {ζ1 , · · · , ζ N −2 } if n−1 ≥ N/2, 2  {ξn , · · · , ξ N , ζ1 , · · · , ζ N −2 } if n−1 < N/2. • when N is odd, we have from (59) that E S(:, 1 : (N +1)/2)a = r a = [a1 , a2 , · · · , a(N +1)/2 ]T , aj ≥ 0. (61) 2 Since the columns of S are symmetric (See (55) and (58)), F can be uniformly expressed by for even and odd N E Sa = r a = [a1 , a2 , · · · , aN ]T , aj ≥ 0. 4.3.2 • when N is odd, a basis of K (S) is   {ζ1 , · · · , ζ N −1 } if n−1 ≥ (N −1)/2, 2  {ξn , · · · , ξ N−1 , ζ1 , · · · , ζ N −2 } if n−1 < (N −1)/2. 2 (62) Given any r ∈ F , the inverse image f −1 (r) of f (·) can be derived in the following way based on (47)–(50): 1) we find the inverse image of h1 (·) for r ∈ F : △ = {K (S) ⊕ S † r} ∩ X 2 Remark 8 As can be seen from the algorithm given above for finding the optimal inputs u∗ from r∗ ∈ F , the key is to determine the set X (r∗ ) while steps 2) and 3) are straightforward. Actually, some elements belonging to X (r∗ ) can be derived from the global minima of the optimization problems (42)–(44). Assume that the global minima corresponding to the constraints (60) is {r∗ , a∗ }, respectively, where a∗ = [a∗1 , a∗2 , · · · , a∗N/2+1 ]T . Then all vectors h iT E a∗1 , α2 a∗2 , · · · , α N a∗N , a∗N +1 , (1−α N )a∗N , · · · , (1−α2 )a∗2 Derivation of the Optimal Input X (r) = {x|Sx = r, x ∈ X } 2 2 (63) 2 2 2 2 belong to X (r∗ ) for 0 ≤ αi ≤ 1, i = 2, · · · , N/2. Accordingly, for the constraint (61) with a∗ = [a∗1 , a∗2 , · · · , a∗N +1 ]T , 2 we have all vectors iT h E a∗1 , α2 a∗2 , · · · , α N +1 a∗N +1 , (1−α N +1 )a∗N +1 , · · · , (1−α2 )a∗2 where S † is the Moore-Penrose pseudoinverse of S and K (S) = {x|Sx = 0} is the null space of S, and ⊕ is the direct sum between two subspace. 2) we find the inverse image of h2 (·) for x ∈ X (r): 2 △ 2 2 2 belong to X (r∗ ) for 0 ≤ αi ≤ 1, i = 2, · · · , (N +1)/2. At last, for the constraint (62) with a∗ = [a∗1 , a∗2 , · · · , a∗N ]T , we have the vector E a∗ belongs to X (r∗ ). Z (r) = {z|h2 (z) ∈ X (r)}  √ √ = [± x0 , · · · , ± xN −1 ]T |x ∈ X (r) . (64) 3) we find the inverse image of h3 (·) for z ∈ Z (r): 5  U (r) = u|W T u ∈ Z (r) = {W z|z ∈ Z (r)} . (65) Optimal Input for Some Special Cases △ In general, there is no analytic solution to the input design problems. In this section, we study the optimal input for some special types of fixed kernels. The obtained analytic results provide insights on input design and also its dependence on the kernel structure. It is worth to note that X (r) is still a convex polytope. Proposition 2 The inverse image X (r) is a convex polytope and is determined by a group of halfspaces and hyperplanes: X (r) = {x|Sx = r, xi ≥ 0, i = 0, . . . , N −1} . 5.1 Diagonal Kernel Matrices We first consider the ridge kernel matrix and then more general diagonal kernel matrices. (66) 5.1.1 This means that the optimal inputs u∗ = U (r∗ ), where u∗ can be any of u∗D , u∗A and u∗E . Ridge Kernel Matrix When the kernel matrix is P = cIn , with c > 0, Remark 7 Noting that W is orthogonal and the row vectors of S are part of the column vectors of W subject to some scaling factors, a basis of K (S) can be derived as follows: (67) ∗ it is possible to obtain the explicit expression of rD and ∗ rA , which is given in the following proposition. 8 5.2 Proposition 3 Consider the ridge kernel matrix (67). Then we have △ ∗ ∗ rD = rA = [E , 0, · · · , 0 ]T = r† . | {z } n−1 zeros Theorem 3 motivates an interesting question that, for ∗ ∗ nondiagonal kernel matrices, whether rD and rA are still equal to r† or not. (68) 5.2.1 Proposition 3 shows that for ridge kernel matrix (67), any input such that ΦT Φ = E In is the global minimum of (31) and (32). The optimal input given in Proposition 3 is identical with the classic result of input design for FIR model estimation with ML/PEM given in Goodwin & Payne (1977). In fact, this result is not surprising since the ridge kernel assumes that the prior distribution of the true impulse response is independent and identically distributed Gaussian, which does not provide any information on the correlation and the decay rate of the true impulse response. The optimal solution (68) implies that the optimal inputs could be:  P −1     −e2 p2 −e3     . . .   . . . = . . .      −e p −e n−1 n−1 n  −en pn (71) Theorem 4 Consider a kernel matrix P which has tridiagonal inverse (71). Then we have ∗ ∗ rD 6= r† and rA 6= r† General Diagonal Kernel Matrices (72) for the following two cases: When the kernel matrix is 1) ej > 0 for j = 2, . . . , n with any N ; 2) ej < 0 for j = 2, . . . , n with even N . (69) One may wonder whether there exist kernel matrices such that its inverse is tridiagonal. The answer is positive. Actually, the DC kernel (14) has tridiagonal inverse Carli et al. (2017), and moreover, the simulation induced kernels with Markov property of order 1 also have tridiagonal inverse (Chen & Ljung, 2017, Section 4.5). In particular, the inverse of the DC kernel matrix is where λi > 0, i = 1, . . . , n, and diag(·) represents a ∗ ∗ diagonal matrix, the optimal rD and rA are same as the one in Proposition 3. Theorem 3 Consider the diagonal kernel matrix (69). Then we have ∗ ∗ rD = rA = r† .  p1 −e2 where pi > 0 for 1 ≤ i ≤ n. Then, we have the following result. Note that the impulsive input is globally optimal since it satisfies (68) exactly. In contrast, it was only shown in Fujimoto & Sugie (2016) that the impulsive input is locally optimal. In addition, as N → ∞, the white noise input is also globally optimal. Clearly, the white noise input is approximately globally optimal for large N . P = diag([λ1 , λ2 , · · · , λn ]) Kernel matrix with a tridiagonal inverse To answer this question, we first consider a class of kernel matrices P such that it is nonsingular and its inverse is tridiagonal, i.e., P −1 can be written as follows: √ 1) Impulsive inputs: [± E , 0, · · · , 0]T ; 2) White noise inputs as N → ∞. 5.1.2 Nondiagonal Kernel Matrices  (70) Note that the diagonal kernel matrix (69) contains the DI kernel matrix studied in Chen et al. (2012) as a special case, which takes the following form −1 PDC P = diag(c[λ, λ2 , · · · , λn ]), c, λ > 0. Theorem 3 shows that for general diagonal kernel matrices the information on the decay rate of the impulse response is not useful for the input design, if no information on the correlation of the true impulse response is provided. 1 λ    − ρ3  λ2  1  .. =  . c(1 − ρ2 )    0   0 − ρ 3 λ2 1+ρ2 λ2 .. 0 0 . ··· .. . .. . .. . ··· − 0 0 0 .. 0 .. . . 1+ρ2 λn−1 ρ λ 2n−1 2 −  ρ λ 2n−1 2 1 λn             (73) where c > 0, 0 < λ ≤ 1, and |ρ| < 1. Thus we have the ∗ ∗ following result on rD and rA for the DC kernel. 9 which has the eigenvalues 0.3526, 0.875, and 1.7724, and thus is positive definite, and yields Corollary 1 Consider the DC kernel (14). Then for ρ > ∗ 0 with any N , or for ρ < 0 with even N , we have rD 6= † ∗ † r and rA 6= r . In particular, for the TC kernel (15), ∗ ∗ rD 6= r† and rA 6= r† for any N . 5.2.2 Q(r† )−1 = More general nondiagonal kernel matrices P = p1 −e −e p2 # (74) 6 Then we consider nondiagonal kernel matrices with n ≥ 2 and n ∈ N. if at least one of the values {Tr(Q(r† )−1 Qi ), 1 ≤ i ≤ n−1} is nonzero and ∗ rA 6= r† 6.2 Corollary 2 Consider the DC kernel (14). Then we ∗ ∗ have rD 6= r† and rA 6= r† , if N ≥ 2n−2. Theorems 4 to 5 and Corollaries 1 to 2 show that there ∗ ∗ exist cases such that rD and rA are no longer r† , implying that the information on the correlation of the impulse response indeed has influence on the input design. Finally, one may wonder whether it is possible to claim ∗ ∗ that for all nondiagonal kernels, rD and rA are not equal † to r . Unfortunately, this claim is not true as can be seen from the following counter example. 6.3 Example 1 Let E = 1, σ = 1, and P −1 1 2 − 81 Preliminary Data-Bank Optimal Input For each test system and preliminary data record, we derive the optimal input as follows: 2  =  Test Systems For each test system, we generate a preliminary data record as follows, whose usage is to get a preliminary estimate of the kernel matrix P (η) and the noise variance σ 2 necessary for the input design. We simulate each test system with a white Gaussian noise input with N = 50 and E = 10, treat the unknown inputs according to (29), and get the noise-free output with N = 50. The noise-free output is then corrupted by an additive white Gaussian noise. The signal-to-noise ratio (SNR), i.e., the ratio between the variance of the noise-free output and the noise, is uniformly distributed over [1, 10]. In this way, we get 1000 preliminary data records. if at least one of the values {Tr(Q(r† )−2 Qi ), 1 ≤ i ≤ n−1} is nonzero. − 81  .  We first use the method in Chen et al. (2012); Pillonetto & Chiuso (2015) to generate 1000 30th order LTI systems. For each system, we truncate its impulse response at the order 50 and obtain a FIR model of order 50 accordingly, which is treated as the test system. In this way, we generate 1000 test systems. ∗ rD 6= r† 1 2 2 15 8 15 Numerical Simulation 6.1 Theorem 5 Suppose the kernel matrix P is positive definite. When N ≥ 2n−2, we have 1 17 30 2 15  We illustrate by Monte Carlo simulations that the optimal input derived from the proposed method can improve the quality of the regularized FIR model estimate (10b) in contrast with the white noise input. ∗ where p1 > 0, p2 > 0, and e 6= 0. Then we have rD 6= † ∗ † r and rA 6= r for any N .  2 − 15 0 Then it can be shown that Tr(Q(r† )−1 Q1 ) = 0 and Tr(Q(r† )−1 Q2 ) = 0, which implies that the gradient of ∗ log det(σ 2 Q(r)−1 ) at r = r† is zero and thus rD = r† for nondiagonal kernel matrix (75) and for any N ≥ 3. Proposition 4 Consider the kernel matrix " 8  15 − 2  15 0 Now we consider more general nondiagonal kernel matrices and we start from a simple case when n = 2. −1    1 − 21  , − 12 1 1) We consider FIR model with order n = 50 and estimate the noise variance σ 2 by LS method, as described in Chen et al. (2012); Goodwin et al. (1992) and the hyperparameter η of the TC kernel matrix P (η) given in (15) by the EB method (18). (75) 10 R where θbN represents the regularized FIR model estimate (10b) corresponding to each data record, the regression matrix Φ is constructed by the input according to (29), and the estimated noise variance and TC kernel matrix from the preliminary data record are used. 100 90 80 6.6 Findings 70 Fit In contrast with the white noise input, all optimal inputs including the one given in Fujimoto & Sugie (2016) and u∗D , u∗A , and u∗E given in this paper improve the average fit of the regularized FIR model estimate (10b) from 66 to 73 and are more robust. An intuitive explanation for this improvement is that the data records generated by the optimal inputs may have higher average SNRs than the preliminary data record generated by the white noise input. This guess is verified for the data records in this experiment. In addition, the fits of the estimates of the data records generated by all optimal inputs are quite close. 60 50 40 +20 30 +2 W FS +2 D +2 +1 A E Fig. 1. Boxplots of the 1000 fits of the RLS estimates based on the preliminary data-bank and test databank. Table 1 Average fits of the regularized FIR model estimate (10b) given in Fig. 1 based on 1000 Monte Carlo runs. 2) Then for the obtained kernel matrix and noise variance, we derive the optimal input u∗D , u∗A , and u∗E by solving the input design problems (31), (32), (33), respectively, with N = 50 and E = 10 and the proposed two-step procedure. For comparison, we also derive the optimal input in Fujimoto & Sugie (2016) with their gradient-based algorithm. It is worth to recall from (27) that the unknown inputs are set to zero in Fujimoto & Sugie (2016). 6.4 W FS D A E 66.24 73.56 73.44 73.87 73.46 7 Conclusions In this paper, the input design of kernel-based regularization method for LTI system identification has been investigated by minimizing the scalar measures of the Bayesian MSE matrix. Under suitable assumption on the unknown inputs and with the introduction of a quadratic map, the non-convex optimization problem associated with the input design problem is transformed into a convex optimization problem. Then based on the global minima of the convex optimization problem, the optimal input is derived by solving the inverse image of the quadratic map. For some special types of fixed kernels, some analytic results provide insights on the input design and also its dependence on the kernel structure. Test Data-Bank For each test system and each optimal input, we generate a test data record as follows, whose usage is to illustrate the efficacy of the input design. We simulate each test system with the optimal input, treat the unknown inputs according to (29), and get the noise-free output with N = 50. The noise-free output is then corrupted by an additive white Gaussian noise with the same variance as the additive white Gaussian noise in the preliminary data record. In this way, for each test system and each optimal input, we get 1000 test data records. Appendix A 6.5 Simulation Results Appendix A contains the proof of the results in the paper, for which the technical lemmas are placed in Appendix B. The proofs of Propositions 1 and 2 are straightforward and thus omitted. The simulation results are summarized in Table 1 and Fig. 1, where W, FS, D, A, E are used to denote the corresponding simulation results for different inputs, respectively, and W denotes the result corresponding to the white noise input in the preliminary data-bank. In particular, Table 1 shows the average model fits and Fig. 1 shows the boxplots of the 1000 model fits, where the model fit (Ljung, 2012) is defined as follows Fit = 100 × kθbR − θ0 k 1− N kθ0 − θ̃0 k ! A.1 First, we introduce the cyclic permutation matrix C ∈ RN defined by " # 0 IN −1 △ C= , (A.1) 1 0 50 , θ̃0 = Proof of Theorem 1 1 X 0 gk 50 k=1 11 which has the following properties and j = 0, . . . , N −1, the matrix S can be expressed in the form of (55). C i C j = C i+j , C N = IN , (C i )T = C N −i . (A.2) Now we denote by C the convex hull of the column vectors of S in (55) and we will show that F = C . On the one hand, note that Note that L0 = IN and Lj = (C j + (C j )T )/2 is real symmetric for j = 1, . . . , n − 1. Clearly, Li commutes with Lj by using the properties (A.2) for i, j = 1, . . . , n− 1 and i 6= j. It follows from Theorem B1 in Appendix B that there exists an orthogonal matrix W such that W T Lj W = Sj , j = 0, . . . , n − 1, Sdj = SdN −j = E ξj (1 : n), j = 0, . . . , N/2. This implies that the image of (A.6) under the linear transform h1 (x) = Sx is included in C and hence F ⊂ C . On the other hand, for each element r in C , there P exist aj ≥ 0, j = 0, . . . , N/2 with N/2 j=0 aj = 1 such that (A.3) where Sj = diag[sj0 , · · · , sj,N −1 ] is a real diagonal matrix. Therefore, we have N/2 T T fj (u) = u W Sj W u = N −1 X sji zi2 r= (A.4) s01 · · · s0,N −1  z02  A.3  2    s10   s11 · · · s1,N −1   z1   f (u) =  .   . (A.5)  .. .. ..  ...   .. . . .    2 sn−1,0 sn−1,1 · · · sn−1,N −1 zN −1 | {z } Since W T W = IN , the orthogonal linear mapping h3 (·) has the property that the image is Z = {z|z T z = E }. Then the image of h2 (·) under Z is the polytope X given in (52) by the definition of h2 (·). Finally, the conclusion that F is a polytope follows from that a linear transform of a polytope is still a polytope (Brøndsted, 1983, p. 18, 2.5). This completes the proof. j=0  aj dj ∈ F Proof of Proposition 3 −Tr(Q(r† )−1 Qi ) = 0, i = 1, . . . , n−1. Since the problem (42) is strictly convex, r† is the unique ∗ stationary point and rD = r† . Proof of Theorem 2 ∗ The proof for rA = r† can be derived in a similar way. We only prove the case for even N . The proof for odd N is similar and thus omitted. A.4 For convenince, we place the construction of the matrices W and S in Lemma B1. So we first consider the claim rank(S) = min(N/2 + 1, n), which follows from that the vectors ξ0 , ξ1 , · · · , ξ N are orthogonal to each other and 2 ξj = ξN −j for j = 0, . . . , N . Proof of Theorem 3 The proof of Theorem 3 is the same as that of Proposition 3 since Q(r† ) is still diagonal in this case. A.5 Then note that the polyhedron X in Theorem 1 can be written as a polytope X = conv {d0 , d1 , · · · , dN −1 } ,  N/2 X First, we show that r† ∈ F . This can be done by finding a point x0 ∈ X such that Sx0 = r† . We can choose x0 = E [1, · · · , 1]T /N ∈ X . Applying the property that ξ0 is orthogonal to the vectors {ξj , 1 ≤ j ≤ N/2} for even N or {ξj , 1 ≤ j ≤ (N −1)/2} for odd N yields Sx0 = r† . Then we check the gradient of log det(σ 2 Q(r)−1 ) with respective to the last n−1 variables of r is zero at r = r† . For ridge kernels, we have σ 2 P −1 = σ 2 In /c and accordingly Q(r† ) is (E + σ 2 /c)In . Thus we find that S A.2 aj E ξj (1 : n) = S where (A.7) is used. This concludes C ⊂ F . Therefore, we have F = C . This completes the proof. where z = [z0 , z1 , · · · , zN −1 ]T = W T u. We obtain s00 X j=0 i=0  (A.7) Proof of Theorem 4 First, we consider the case ej > 0 for j = 2, . . . , n. In this case, we have each element of Q(r† )−1 = (E In + σ 2 P −1 )−1 is positive by Theorem B3. This implies that each element of the gradient at r = r† is negative by (45) and the definition of Qi . It follows that (A.6) where for j = 0, . . . , N − 1, dj is the vector whose elements are zero except the j +1-element that is equal to E . Since cos(lj̟) = cos((N − l)j̟) for any integer l [∇ log det(σ 2 Q(r† )−1 )]T ξ0 (2 : n) < 0, 12 since all elements of ξ0 (2 : n) are equal to one. This violates Lemma B2 in Appendix B, which gives the neces∗ ∗ sary and sufficient condition for rD = r† . Thus rD 6= r† for this case. A.9 Then we consider the case where ej < 0 for j = 2, . . . , n and N is even. In this case, we have (Q(r† )−1 )ij > 0 when |i − j| is even and (Q(r† )−1 )ij < 0 when |i − j| is odd by Theorem B3. This yields that the sign 2 Q(r † )−1 ) of the i-th element ∂ log det(σ of the gradient ∂ri 2 † −1 ∇ log det(σ Q(r ) ) is positive for odd i and negative for even i. This shows that 1) When ρ > 0, (Q(r† )−1 )ij > 0 and (Q(r† )−2 )ij > 0. 2) When ρ < 0, (Q(r† )−1 )ij > 0 and (Q(r† )−2 )ij > 0 if |i − j| is even and (Q(r† )−1 )ij < 0 and (Q(r† )−2 )ij < 0 if |i − j| is odd. For the DC kernel (14), by Theorem B3 as used in the proof of Theorem 4 we have This implies that Tr(Q(r† )−1 Qi ) 6= 0 and Tr(Q(r† )−2 Qi ) 6= 0 for all indices i = 1, . . . , n − 1. As a result, the proposition is true by Theorem 5. [∇ log det(σ 2 Q(r† )−1 )]T ξN/2 (2 : n) < 0 Appendix B since the i-th element of ξN/2 (2 : n) is (−1)i . This vio∗ lates the necessary and sufficient condition for rD = r† , ∗ † and thus rD 6= r for this case. This appendix contains the technical lemmas used in the proof in Appendix A. Theorem B1 (Jiang & Li, 2016, Theorem 9) Real symmetric matrices {IN , A1 , · · · , Am } with Ai ∈ RN ×N and i = 1, . . . , m are simultaneously diagonalizable via an orthogonal congruent matrix if and only if Ai commutes with Aj for i, j = 1, 2, · · · , m and i 6= j. ∗ The proof of rA 6= r† is similar and thus omitted. A.6 Proof of Corollary 1 Theorem B2 (Gray (2006, Theorem 3.1);Tee (2007)) Denote the circulant matrix B generated by a row vector b = [b0 , b1 , · · · , bN −1 ] by The proof is trivial by noting (73) and Theorem 4. A.7 Proof of Proposition 4   . bN −2 bN −1   b0 b1   .  bN −1 b0 . . bN −3 bN −2     △  . . . . .  . . . . . B = circ(b) =  . . . . .  .     .  b2 b3 . . b0 b1    . b1 b2 . . bN −1 b0 It follows that 1 Q(r† )−1 = det(Q(r† )) " E +σ 2 p2 2 σ e σ2 e 2 E +σ p1 # . Then we have −Tr(Q(r† )−1 Q1 ) = −2σ 2 e/ det(Q(r† )). In this case, we have ξj (2 : n) = ξj (2 : 2) = cos(j̟). As a result, there always exists an index j such that e and cos(j̟) have the same sign for j = 0, . . . , N/2 when N is even and for j = 0, . . . , (N −1)/2 when N is odd. One obtains that −e cos(j̟) < 0 for this j, which violates ∗ ∗ (B.14). Therefore, rD 6= r† . The proof of rA 6= r† is similar and is omitted. A.8 Proof of Corollary 2 .. (B.8) Then B has unit eigenvectors T 1  v (m) = √ 1, exp(−ι̟m), · · · , exp(−ι̟(N −1)m) , N m = 0, · · · , N − 1, where ̟ = 2π/N and ι is the imaginary unit (ι2 = −1), and the corresponding eigenvalues Proof of Theorem 5 It follows from Lemma B3 in Appendix B that 0 is an interior point of F ′ = {r′ ∈ Rn−1 |[E , r′T ]T ∈ F } when N ≥ 2n − 2. Since P −1 is nondiagonal, we have Q(r† )−1 is also nondiagonal. The condition that at least one of the values Tr(Q(r† )−1 Qi ), i = 1, . . . , n − 1, is nonzero implies that r† is not a stationary point of the problem ∗ ∗ (42). This means that rD 6= r† . The proof for rA 6= r† is similar and thus omitted. τ (m) = N −1 X bk exp(−ιmk̟) k=0 = b[1, exp(−ιm̟), · · · , exp(−ιm(N − 1)̟)]T and can be expressed by B = A diag([τ (0) , · · · , τ (N −1) ])AH 13 the eigenvectors {v (m) , m = 0, · · · , N − 1} is an orthonormal basis for all matrices √ Lj , j = 0, · · · , n − √ 1. Moreover, we have v (0) = ξ0 / N and v (N/2) = ξ N / N 2 are real, and τ (m,j) = τ (N −m,j) , which implies that the eigenvectors v (m) and v (N −m) of Lj correspond to the same eigenvalue cos(mj̟). Thus√the linear combinations (v (m) + √ v (N −m) )/2 = ξm / N and ι(v (N −m) − v (m) )/2 = ζm / N of the eigenvectors v (m) and v (N −m) corresponding to the m-th and (N − m)-th eigenvalue cos(mj̟) of Lp j are real and orthogonal. Further we have |ξm | = |ζm | = N/2, and thus where A = [v (0) , · · · , v (N −1) ] is unitary and AH denotes the complex conjugate transpose of A. Theorem B3 Let A be a symmetric and positive definite tridiagonal matrix of dimension n,   a1 −b2     −b2 a2 −b3     .. .. ..  A= . . .      −bn−1 an−1 −bn    −bn an −1 (B.9) n −1 and denote the (i, j)-element of A by (A )ij . Then we have (A−1 )ij > 0 when bl > 0 for l = 2, . . . , n, while (A−1 )ij < 0 if |i − j| is odd and (A−1 )ij > 0 if |i − j| is even when bl < 0 for l = 2, . . . , n. 2 minimize ϕ(r) subject to r ∈ F (B.13) where ϕ(r) represents log det(σ 2 Q(r)−1 ) or Tr(σ 2 Q(r)−1 ), if and only if (B.10) [∇ϕ(r† )]T ξj (2 : n) ≥ 0 A vector h∗ is optimal for this problem if and only if h∗ ∈ B and where 2 Lemma B2 The vector r† ∈ F is the solution of the problem Theorem B4 (Boyd & Vandenberghe, 2004, Section 4.2.3, page 139) Let ϕ : Rm − → R be a differentiable convex function, and let B ⊂ Rm be a nonempty closed convex set. Consider the problem ∇ϕ(h∗ )T (y − h∗ ) ≥ 0 for all y ∈ B 2 is a group of real orthonormal eigenvectors of Lj and the corresponding eigenvalues are {1, cos(j̟), · · · , cos((N− 1)j̟)}, which are actually the elements of ξj . This completes the proof for the case for even N . The proof for odd N is similar and thus omitted. Proof. The result is obtained by applying Theorem 2.3 of Meurant (1992) when A is positive definite. minimize ϕ(h) subject to h ∈ B. √ √ o.√ √ √ ξ0 , 2ξ1 , · · · , 2ξ N −2 , ξ N , 2ζ N −2 , · · · , 2ζ1 N (B.14) with j = 0, . . . , N/2 for even N or j = 0, . . . , (N −1)/2 iT h † ∂ϕ(r † ) ) . , · · · , for odd N , where ∇ϕ(r† ) = ∂ϕ(r ∂r1 ∂rn−1 (B.11) is the gradient of ϕ(·) with respect to h = [h1 , · · · , hm ]T . Proof. Note that the first element of each member in F is E and hence the first element of the difference r − r† is zero for any r ∈ F . In addition, we have the last n − 1 elements of r† are zero. By applying Theorem B4, we see that r† is the solution of (B.13) if and only if Lemma B1 The matrices {Lj , j = 0, · · · , n − 1} can be diagonalized simultaneously by the matrix W , i.e., [∇ϕ(r† )]T (r̃ − 0) ≥ 0,  ∂ϕ(·) ∂ϕ(·) ,··· , ∇ϕ(·) = ∂h1 ∂hm △ T W T Lj W = Sj = diag(ξj ), j = 0, . . . , n − 1. (B.15) where r̃ is any convex linear combination of the points {ξj (2 : n), j = 0, · · · , N/2} when N is even, namely, PN/2 PN/2 r̃ = j=0 aj ξj (2 : n) with aj ≥ 0 and j=0 aj = 1. Clearly, the condition (B.15) is equivalent to (B.14) for j = 0, · · · , N/2. The case when N is odd can be proved in a similar way and thus omitted. (B.12) Proof. First, we consider the case where N is even. It follows that L0 = IN = circ([1, 0, · · · , 0]) and Lj = circ(lj /2), j = 1, · · · , n − 1, where lj is the N dimensional row vector whose elements are zero except that the j+1-th and N −j +1-th elements are one. Then by Theorem B2, the eigenvalues of Lj are Lemma B3 The zero vector 0 ∈ Rn−1 is an interior point of F ′ = {r′ ∈ Rn−1 |[E , r′T ]T ∈ F } if N ≥ 2n−2. Proof. This conclusion is proved by considering two cases, respectively: 1) for even N with N ≥ 2n−2; 2) for odd N with N ≥ 2n−1. Let us explore the first case. It is clear that the dimension of F ′ is equal to or less than τ (m,j) = lj [1, exp(−ιm̟), · · · , exp(−ιm(N − 1)̟)]T /2 = exp(−ιmj̟)/2 + exp(−ιm(N − j)̟)/2 = cos(mj̟), m = 0, · · · , N −1, 14 Fujimoto, Y., & Sugie, T. (2016). Informative input design for kernel-based system identification. In Proceedings of IEEE Conference on Decision and Control (pp. 4636–4639). IEEE. Gevers, M. (2005). Identification for control: From the early achievements to the revival of experiment design. European journal of control , 11 , 335–352. Goodwin, G. C., Gevers, M., & Ninness, B. (1992). Quantifying the error in estimated transfer functions with application to model order selection. IEEE Transactions on Automatic Control , 37 , 913–928. Goodwin, G. C., & Payne, R. L. (1977). Dynamic system identification: experiment design and data analysis. New York: Academic press. Grant, M. C., & Boyd, S. P. (2016). Cvx: Matlab software for disciplined convex programming, version 2.1. Available from http://cvxr.com/cvx/. Gray, R. M. (2006). Toeplitz and circulant matrices: A review . Now Publishers, Inc. Hildebrand, R., & Gevers, M. (2003). Identification for control: optimal input design with respect to a worstcase ν-gap cost function. SIAM Journal on Control and Optimization, 41 , 1586–1608. Hjalmarsson, H. (2005). From experiment design to closed-loop control. Automatica, 41 , 393–438. Hjalmarsson, H. (2009). System identification of complex and structured systems. European journal of control , 15 , 275–310. Jansson, H., & Hjalmarsson, H. (2005). Input design via lmis admitting frequency-wise model specifications in confidence regions. IEEE transactions on Automatic Control , 50 , 1534–1549. Jiang, R., & Li, D. (2016). Simultaneous diagonalization of matrices and its applications in quadratically constrained quadratic programming. SIAM Journal on Optimization, 26 , 1649–1668. Ljung, L. (1999). System identification: Theory for the user . Upper Saddle River, NJ: Prentice-Hall. Ljung, L. (2012). System Identification Toolbox for Use with MATLAB . (8th ed.). Natick, MA: The MathWorks, Inc. Ljung, L., Singh, R., & Chen, T. (2015). Regularization features in the system identification toolbox. In Proceedings of the IFAC Symposium on System Identification (pp. 745–750). Beijing, China. Marconato, A., Schoukens, M., & Schoukens, J. (2016). Filter-based regularisation for impulse response modelling. IET Control Theory & Applications, 11 , 194– 204. Mehra, R. (1974). Optimal input signals for parameter estimation in dynamic systems–survey and new results. IEEE Transactions on Automatic Control , 19 , 753–768. Meurant, G. (1992). A review on the inverse of symmetric tridiagonal and block tridiagonal matrices. SIAM Journal on Matrix Analysis and Applications, 13 , 707– 728. Mu, B., Chen, T., & Ljung, L. (2017). On asymptotic properties of hyperparameter estimators for n − 1. It follows from Theorem 2 that rank(S) = n. This means that the dimension of F ′ is n − 1 and F ′ consists of all convex combinations of affinely independent n vectors from {E ξj (2 : n), j = 0, . . . , N/2} (Brøndsted, 1983, p. 14, Corollary 2.4). Now we will prove the result by contradiction. Assume that 0 is not an interior point of F ′ . Thus 0 must be located on a facet of F ′ and the dimension of this facet is n − 2 since the dimension of F ′ is n − 1 and hence 0 is a convex combination of at most n − 1 affinely independent vectors from {E ξj (2 : n), j = 0, . . . , N/2} (Brøndsted, 1983, Corollary 2.4). In contrast, 0 can be expressed by a convex combination in the following way 0=  1 1 E ξ0 (2 : n) + E ξ N (2 : n) (E S(2 : n, :))ξ0 = 2 N N N 2 −1 2 X (E ξj (2 : n)) (B.16) + N j=1 due to the orthogonal vectors {ξj , j = 0, 1, · · · } and the expression (55) of S. Further, the expression (B.16) can be rewritten as a convex combination of affinely independent n vectors from {ξj (2 : n), j = 0, . . . , N/2} and all the weights are positive since the remaining N/2 + 1 − n vectors of {ξj (2 : n), j = 0, . . . , N/2} are convex combinations of these n affinely independent vectors. This contradiction means that the proposition is true. The proof for odd N with N ≥ 2n−1 is similar and thus omitted. References Boyd, S., & Vandenberghe, L. (2004). Convex optimization. Cambridge university press. Brøndsted, A. (1983). An introduction to convex polytopes. New York, Inc: Springer-Verlag. Carli, F. P., Chen, T., & Ljung, L. (2017). Maximum entropy kernels for system identification. IEEE Transactions on Automatic Control , 62 , 1471–1477. Chen, T., Andersen, M. S., Ljung, L., Chiuso, A., & Pillonetto, G. (2014). System identification via sparse multiple kernel-based regularization using sequential convex optimization techniques. IEEE Transactions on Automatic Control , 59 , 2933–2945. Chen, T., Ardeshiri, T., Carli, F. P., Chiuso, A., Ljung, L., & Pillonetto, G. (2016). Maximum entropy properties of discrete-time first-order stable spline kernel. Automatica, 66 , 34–38. Chen, T., & Ljung, L. (2017). On kernel design for regularized lti system identification. arXiv preprint arXiv:1612.03542, . Chen, T., Ohlsson, H., & Ljung, L. (2012). On the estimation of transfer functions, regularizations and gaussian processes—revisited. Automatica, 48 , 1525– 1535. Chiuso, A. (2016). Regularization and bayesian learning in dynamical systems: Past, present and future. Annual Reviews in Control , 41 , 24–38. 15 kernel-based regularization methods. arXiv preprint arXiv:1707.00407, . Pillonetto, G., Chen, T., Chiuso, A., De Nicolao, G., & Ljung, L. (2016). Regularized linear system identification using atomic, nuclear and kernel-based norms: The role of the stability constraint. Automatica, 69 , 137–149. Pillonetto, G., & Chiuso, A. (2015). Tuning complexity in regularized kernel-based regression and linear system identification: The robustness of the marginal likelihood estimator. Automatica, 58 , 106–117. Pillonetto, G., Chiuso, A., & De Nicolao, G. (2011). Prediction error identification of linear systems: a nonparametric gaussian regression approach. Automatica, 47 , 291–305. Pillonetto, G., & De Nicolao, G. (2010). A new kernelbased approach for linear system identification. Automatica, 46 , 81–93. Pillonetto, G., Dinuzzo, F., Chen, T., De Nicolao, G., & Ljung, L. (2014). Kernel methods in system identification, machine learning and function estimation: A survey. Automatica, 50 , 657–682. Söderström, T., & Stoica, P. (1989). System identification. Prentice Hall International. Tee, G. J. (2007). Eigenvectors of block circulant and alternating circulant matrices. New Zealand Journal of Mathematics, 36 , 195–211. Zarrop, M. B. (1979). Optimal experiment design for dynamic system identification. Berlin Heidelberg: Springer-Verlag. Zorzi, M., & Chiuso, A. (2017). The harmonic analysis of kernel functions. arXiv preprint arXiv:1703.05216, . 16
3cs.SY
The Need for Speed arXiv:1802.03707v1 [cs.AI] 11 Feb 2018 The Need for Speed of AI Applications Performance Comparison of Native vs. Browser-based Algorithm Implementations Bernd Malle1,2 Nicola Giuliani1 Peter Kieseberg1,2,3 Andreas Holzinger1 1 2 3 [email protected] [email protected] [email protected] [email protected] Holzinger Group HCI-KDD, Institute for Medical Informatics, Statistics & Documentation, Medical University Graz, Austria SBA Research, Vienna, Austria University of Applied Sciences St.Pölten, Austria Abstract AI applications pose increasing demands on performance, so it is not surprising that the era of client-side distributed software is becoming important. On top of many AI applications already using mobile hardware, and even browsers for computationally demanding AI applications, we are already witnessing the emergence of client-side (federated) machine learning algorithms, driven by the interests of large corporations and startups alike. Apart from mathematical and algorithmic concerns, this trend especially demands new levels of computational efficiency from client environments. Consequently, this paper deals with the question of state-of-the-art performance by presenting a comparison study between native code and different browser-based implementations: JavaScript, ASM.js as well as WebAssembly on a representative mix of algorithms. Our results show that current efforts in runtime optimization push the boundaries well towards (and even beyond) native binary performance. We analyze the results obtained and speculate on the reasons behind some surprises, rounding the paper off by outlining future possibilities as well as some of our own research efforts. Keywords — Federated machine learning, Client side computing, distributed computing, In-browser computing, JavaScript Virtual Machine (JSVM), VM execution cycle, VM optimizations, parallelization, SIMD, WebWorkers, ASM.js, Web Assembly, GPGPU 1. Introduction & Motivation For some years now, distributed & cloud computing as well as virtualized and containerbased software have been buzzwords in the software engineering community. However, although these trends have helped making software infrastructure generally and AI applications specifically more stable, fault-tolerant, easy to control, scale, monitor and bill - one characteristic has never changed: the computationally most demanding parts of our software’s logic, may it be recommenders, intelligent social network analysis or deep learning models, are still handled by enormous data-centers or GPU-clusters of incredible capacity (Armbrust et al., 2010). 1 Malle, Giuliani, Kieseberg, Holzinger On the other hand, exponential hardware evolution has given us small mobile devices more capable than many servers ten years ago, enabling to run successful AI applications (Jordan and Mitchell, 2015), which increasingly interact with the environment and with other smart devices (Moritz et al., 2017) demanding even more performance (Stoica et al., 2017). Following two questions arise: 1. Could it be possible to create a new internet, based not on proprietary data access and computation, but purely distributed computing models? 2. Just like data-centers have shifted from specialized supercomputers to grids of commodity hardware, could the logical next step be the involvement of every laptop, tablet, phone and smart device on the planet into our future business models? The economic incentive is obvious: because access to powerful, centralized hardware will often be out of reach of a small organization, outsourcing the computational costs of an application to a network of clients is reasonable and would furthermore contribute to vastly superior scalability of the system, as any centralized server infrastructure could be reduced to its absolute minimum duties: 1) distributing the client-side code, as well as 2) routing, and 3) storing a certain amount of (global) data. Most of all such approaches are of greatest importance for the health domain, where In order to achieve such grand goals, we need: • new algorithms that can collaborate without relying too much on global (centralized) data; • new communication protocols to make such collaboration efficient; • new mathematical / machine learning models which are statistically robust under distributed uncertainty – but most of all: • raw power on the client side, not only in hardware but especially in software & its underlying execution environments. Ironically, one of the most progressive software execution and distribution environments to implement such a future solution is a technology straight from the 90’s - the Web Browser. Code written for this universally available runtime carries several advantages: It is highly portable out-of-the-box, any update in the future is trivially easy to deploy, and the hurdle for entry is practically zero as Browsers come pre-installed on every consumer device and operating system. In addition, the browser’s sandbox model (code running within has no access to data on the rest of the filesystem) guarantees better privacy then mobile Apps or traditional, installed software; distributed algorithms at the same time force developers to design new models which can efficiently learn on limited data. All of this will make it easier to comply with the ever-increasing demands of data protection regulations on all levels, exemplified by the new European General Data Protection Regulation (GDPR), the right to be forgotten (Malle et al., 2016) and the need for trust (Holzinger et al., 2018). 2 The Need for Speed Finally – due to modern platforms including Apache Cordova – we are able to package web applications into practically any format, may it be iOS or Android Apps or desktop applications. Therefore, in this paper we concentrate on performance tests within the browser’s Virtual Machine. Traditionally this implied JavaScript as the language of the (only) choice; in recent years however alternatives gained attraction - in many cases promising whole new levels of performance and efficiency. 2. Selected Related Work Fortuna et al. (2010) were pointing out that JS would be suitable as a target language for future compute-intensive applications, given the contemporary rapid evolution of JS virtual machines during the browser wars of the late 2000s. As JS offers no native concurrency, they implemented parallelism on a ”task” level, where task is defined as at least one JS OpCode. They explored and contrasted loop-level parallelism to inter- and intra-function parallelism and measured speedups of 2.19 to 45 times (average), with significantly higher factors achieved on function parallelism. Another attempt on dynamic parallelization of JS Applications using a speculation mechanism was outlined in (Mehrara et al., 2011), where the authors used data flow analysis in addition to memory dependence analysis and memory access profiling. However, in real-world, web-based interaction-intensive applications, they were only able to measure a meek speedup of 2.19, in-line with the findings mentioned earlier. Another attempt at automatic parallelization of JS code was made by (Wook Kim and Han, 2016), who also point out the economic advantage of such an approach for startups and small development shops, as they are usually not well-equipped to write parallel code-bases themselves. Their implementation utilizing static compiler analysis detecting DOALL (looplevel) parallelism enabled multi-CPU execution by emitting JS LLVM IR (intermediate representation), resulting in a speedup of 3.02 on the Pixastic benchmarks as well as 1.92 times on real-world HTML5 benchmarks, requiring a compilation overhead of only 0.215%. Lower-level (non-thread) parallelism can be achieved via Single Instruction Multiple Data (SIMD), which is a technique to perform one CPU instruction on several pieces of data (streams) simultaneously. Jensen et al. (2015), who also describe the spiral of increasing performance of JS (the Web platform in general) leading to ever more use cases, which in turn lead to higher performance requirements, implemented SIMD.js, introducing CPU-native vector datatypes such as float32×4, float64×2, and int32×4 to the JavaScript language. They were able to achieve speedups between 2× and 8× with an average around 4× (unsurprisingly for 4-wide vectorization); however development on SIMD.js has since then been halted in favor of the upcoming WebAssembly’s native SIMD capabilities. Parallelizing JS applications can also be achieved by employing WebWorkers - lightweight execution units which can spread over multiple CPUs and do not share the same memory space, but communicate via message-passing. As modern browsers enable retrieving the number of logical cores but give no information about resource sharing / utilization, the authors of (Adhianto et al., 2010) suggested using a web worker pool to balance the amount of web workers dynamically depending on current resource utilization. In addition, thread-level speculation can extract parallel behavior from single-threaded JavaScript programs (akin to the methods already described). Their results show a predictable maximum 3 Malle, Giuliani, Kieseberg, Holzinger speedup at 4 parallel Workers on a 4-core (8 virtual core) machine in the range of a 3×-5× factor, with different browsers behaving within a ∼30% margin. A completely different approach and real breakthrough in speeding up web-based applications was achieved with the introduction of Emscripten (?), which actually uses LLVM as its input format and outputs a statically typed subset of JS called ASM.js, enabling the JSVM to optimize code to a much higher degree than dynamic JS. In addition, it uses a flat memory layout like compiled binaries do, simulating pointer arithmetic etc., which makes compilation from C-like languages possible in the first place. Although criticized for opening up additional security holes by introducing potential risks like buffer-overflows which were already ”fixed” by the JS object memory layout model, Emscripten has been extremely successful in speeding up JS to almost native speeds, while (in theory) enabling running any language in a browser by compiling its whole underlying runtime to ASM.js, as long as the runtime itself is written in a language compiling to LLVM. Borins (2014) used Emscripten to compile the Faust libraries C++ output to JS; Faust is a code generation engine which forms a functional approach to signal processing tasks; it is generally used to deploy a signal processor to various languages and platforms. In this work specifically it was employed to target the Web Audio API in order to create audio visualizations, add effects to audio etc. The whole pipeline encompassed code generation from Faust to C++ as well as compiling to ASM.js. Preliminary experimentation showed that the pipeline was functional, although exact time measurements were apparently not possible in 2014 since Emscripten was not able to translate C++ timing code to ASM properly (this is working as of 2018). The third general approach of speeding up browser-based code lies in transferring it to the GPU (mostly via WebGL which in its current form is a port of OpenGL ES 2.1), thus making use of modern graphic hardware’s great parallelization capabilities. This is usually done for image processing or video (games), but can also work in non-obvious cases - (Ingole and Nasreh, 2015) report on experiments on dynamic graph data-structures, which is a better indicator of how GPU-parallelization will behave on general code-bases. They used Parallel.js (and other libraries like Rivertrail (Barton et al., 2013) which are nowadays deprecated) to compute dynamic shortest paths on growing, shrinking and fully dynamic, directed, weighted graphs with positive edge weights. Their results show that for up to a few percent of edge addition / deletion, the dynamic version usually outperforms the static version, although the margins differ between graph structures and depend on the random choice of edges added / deleted. As a general reflection on VMs, Würthinger (2014) point out that generic bytecodeVMs are usually slower than ones focused on a specific guest language, for their parsingand optimization routines can be specifically tailored to the syntactic idiosyncrasies of one language (and patterns / idioms usually employed by its programmers). As a remedy they propose an architecture where guest language semantics are communicated to the host runtime via specific interpreters, then the host compiler optimizes the obtained intermediate code - only this host compiler as well as the garbage collector remain the same for all languages. They implemented this idea at Oracle Corporation in the form of Truffle as guest runtime framework on top of the Graal compiler running in the Hotspot VM; at the time of their publication, they supported C, Java, Python, Javascript, R, Ruby and Smalltalk; performance measures had not yet been published. 4 The Need for Speed Recently, the introduction of WebAssembly (WASM, (Haas et al., 2017)) as a new lowlevel, bytecode-like standard including static types, a structured control flow as well as compact representation opens up new opportunities, as it is simply an abstraction over modern hardware, making it language-, hardware-, and platform-independent. Moreover, it will be able to utilize CPU-based SIMD Vectorization as well as offer a thread-based model for concurrency on shared memory, which the JS-based WebWorker model was not able to deliver (it offered concurrency via message-passing only). As an entirely independent language, it can also be extended at any time without having to extend the underlying runtime, as is the case with ASM.js & JS. Nevertheless, it can be included in JS programs easily and even compiled from LLVMbased bytecode via Emscripten, making it a breeze to experiment with by simply using existing (C/C++) code. 3. Research goal We posit that recent developments have made it feasible for browser-based solutions of nontrivial computational complexity to be competitive against native implementations. In order to show this, we selected a mix of algorithms which we implemented (or took implementations from Rosetta Code) in C++ as well as JavaScript and injected additional code for run-time measurement (wall time). We then compiled the C++ version via Emscripten (Zakai, 2011) to ASM.js as well as WebAssembly (WASM) and tested the results on native Linux (GCC-compiled binary), NodeJS (native JS, ASM, WASM) as well as Chrome, Firefox and Edge (ASM, WASM). Our main interests in performing these experiments were: • to establish a baseline performance measure by executing binary (C++) code. • to compare the performance of binary code to JS as well as Emscripten-compiled ASM.js / WASM. • to establish an understanding of the different optimization possibilities for JS, ASM, WASM and develop insights as to which kind of computational tasks (numeric performance, memory-management, function-call efficiency, garbage-collection etc.) they would affect. • to test those hypotheses on the performance measures we empirically observed and describe as well as speculate on any inexplicable deviation. • to provide an outlook on future challenges and opportunities, predicated on our lessons learned. 4. Algorithms In order to gain relevant insights into the performance of our chosen execution environments, we gathered a mixture of algorithms from very simple toy examples to a real-world graph problem employed in modern computer vision. 5 Malle, Giuliani, Kieseberg, Holzinger 4.1 Base tests Our toy examples consist of three test cases designed to elicit algorithmic performance w.r.t. 3 specific use-cases: 1) Basic memory management: Fill an array of length 1 million with random integers, 2) Function calls: Recursive Fibonacci of n = 40 and 3) Numeric computations: Compare 10 million pairs of random integers. 4.2 Floyd-Warshall The Floyd-Warshall algorithm (Floyd, 1962) is an APSP (All-pair shorest-path) graph algorithm; given a graph G(V, E) with V being the set of vertices and E being the set of edges, it works by choosing a vertex k in the graph, then iterating over all possible pairs of vertices (i, j), at each point deciding if there exists a shorter route between (i, j) were they connected via k: Algorithm: Floyd-Warshall APSP 1 2 3 4 5 6 7 8 9 10 11 12 function FWDense ( graph ) { i , j , k <- graph . vertices . length for ( k = 0; k < V ; k ++) { for ( i = 0; i < V ; i ++) { for ( j = 0; j < V ; j ++) { if ( graph [ i ][ j ] > graph [ i ][ k ] + graph [ k ][ j ]) { graph [ i ][ j ] = graph [ i ][ k ] + graph [ k ][ j ]; } } } } } Figure 1: Floyd-Warshall APSP. We chose this algorithm due to it’s simple implementation which relies on pure iterative performance, thus testing data structure as well as numerical efficiency. 4.3 Huffman Coding Huffman coding/encoding is a particular form of entropy encoding that is often used for lossless data compression (Han et al., 2015). A prefix-free binary code with minimum expected codeword length is sought from a given set of symbols and their corresponding weights. The weights are usually proportional to probabilities. Let L(C) = n X wi ∗ length(ci ) i=1 be the weighted path length of code C. The goal consists of finding a code C such that L(C) ≤ L(T ) for all T (A, W ) where C is defined as: C(A, W ) = (c1 , c2 , c3 , ..., cn ), with the alphabet A = {a1 , a2 , a3 , ..., an } and the set of symbol weights W = {w1 , w2 , w3 , ..., wn } 6 The Need for Speed Algorithm: Huffman(C) 1 2 3 4 5 6 7 8 9 10 n := | C |; Q := C ; for i := 1 to n 1 do allocate a new node z z . lef t := x := Extract - Min ( Q ) ; z . right := y := Extract - Min ( Q ) ; z . freq := x . freq + y . freq ; Insert (Q , z ) ; end for return Extract - Min ( Q ) ; { return the root of the tree } Figure 2: Huffman(C) taken from (Goemans, 2015) As Huffman’s implementation is heavily dependent on its binary heap, whose operations depend on memory implementation but will be much faster than heavy copying / deletion of deep data structures, we suspected that JavaScript-based runtimes would fare relatively well in their own right. 4.4 Permutation The problem of permutation is simple to solve by dissecting a given input and combining its ”head” with the inner permutations of its ”rest”, which can be done in a recursive fashion. For instance, given the input abc, the Function getPermutations depicted below would first extract the letter a and then combine it with all the permutations of the remaining string bc. Algorithm: Permutation 1 2 3 4 5 6 7 8 9 10 11 function g e tP er mu t at io ns ( string text ) define results as string [] if text is a single character add the character to results return results foreach char c in text define i n n e r P e r m u t a t i o n s as string [] set i n n e r P e r m u t a t i o n s to g et P er mu ta t io ns ( text without c ) foreach string s in i n n e r P e r m u t a t i o n s add c + s to results return results Figure 3: String permutation Since there are n! possible permutations, this is also the expected runtime of the algorithm (without printing each permutation, which would result in O(n ∗ n!)). As far as different language runtimes are concerned, we would suspect that those with efficient memory operations will have a significant advantage over others, since subset copying and joining will be the central operation. 4.5 Fast Fourier Transform The Fast Fourier Transformation FFT Algorithm is a numerically very efficient algorithm to compute the Discrete Fourier Transformation (DFT) of a series of data samples (time series 7 Malle, Giuliani, Kieseberg, Holzinger data). It goes back to Gauss (1805) and was quasi re-invented by Cooley & Tukey (1965) (Cooley and Tukey, 1965). The huge advantage is that the calculation of the coefficients of the DFT can be carried out iteratively and this reduces computational time dramatically Cochran et al. (1967). A detailed description can be found in Puschel and Moura (2008) Here a rapid explanation of the basics: Let f : R → C a continuously function, where R represents the set of real numbers and C the complex numbers. The Fourier Transform of f is given by Z ∞ f (t)e−2πiνt dt, (1) H(ν) = −∞ where i is the imaginary unity and ν the frequency. In most of practical situations, the function f is given in discrete form as a finite values collection f (x0 ), f (x1 ), . . . , f (xN −1 ) with N ∈ N, where N is the set of natural numbers and {x0 , x1 , . . . , xN −1 } is one partition on an real interval [a, b] and xk = a + b−a N k, for 0 ≤ k ≤ N − 1. In problems that imply numerical calculation, instead the equation (1) we use the sum partial N −1 1 X H(k) = f (xj )e−2πikj/N , N (2) j=0 designated Discrete Fourier Transform (DFT) of f over the interval [a, b]. If f is a function defined on the interval [0, 2π] of real value with period 2π, the values H(k), by k = 0, . . . , N − 1, can be interpreted as the coefficients ck N −1 2πk 1 X ck = f (xj )e−i N j , N 0≤k ≤N −1 (3) j=0 of a exponential polynomial p(x) = N −1 X ck eikx , (4) k=0 where x ∈ R, ck ∈ C, y k = 0, 1, . . . , N −1, which interpolate f in the values f (x0 ), f (x1 ), . . . , f (xN −1 ). The Discrete Fourier Transform of f over the partition {x0 , x1 , . . . , xN −1 }, is defined as the operator DF T : CN −→ CN such that   [c0 , c1 , . . . , cN −1 ]T = DF T [f (x0 ), f (x1 ), . . . , f (xN −1 )]T Technically, this is a divide & conquer algorithm based on multi-branched recursion, i.e. it breaks down a problem into sub-problems until the problem becomes so simple that it can be solved directly. 8 The Need for Speed Algorithm: Fast Fourier Transform, recursive 1 2 3 4 5 6 7 8 9 10 11 12 function y = fft_rec ( x ) n = length ( x ) ; if n == 1 y = x; else m = n /2; y_top = fft_rec ( x (1:2:( n -1) ) ) ; y_bottom = fft_rec ( x (2:2: n ) ) ; d = exp ( -2 * pi * i / n ) .^ (0: m -1) ; z = d .* y_bottom ; y = [ y_top + z , y_top - z ]; end Figure 4: FFT, taken from (Wörner, 2008) Since FFT is mostly about numerical computations we suspected that JS runtimes would handle this scenario relatively well, even compared to compiled code. 4.6 Min Cut Max Flow In order to obtain meaningful, relevant results from our experiments, we choose to add a non-trivial problem encompassing enough interesting ’moving parts’ - memory management, computation intensity as well as a variety of (conditional) function call sequences - so that the resulting performance measures convey information applicable to real-world scenarios. We therefore decided on a theoretically simple graph problem (max-flow min-cut) which consists of only three computing stages, yet comprising enough internal complexity to make it interesting beyond toy samples. Theory Assuming a graph G = hV, Ei, where V is a set of nodes and E is the set of edges with positive edge weights connecting them, a cut is defined as the partition of the vertices of the graph G into two disjoint sets. If the graph G contains two distinct vertices s and t, an s − t − cut can be defined, which is a partition into two disjoint sets S and T where s is in S and t is in T . The cost of the s − t − cut C is the sum of weights of all edges that are connecting the two disjoint sets. X c(S, T ) = ce e{i,j} ∈E, |{i,j}∩S|=1 The minimum cut is then defined as the cut c(S, T ) amongst all possible cuts on G with minimum cost. If one considers a graph with two terminals s, t, one usually refers to these two as source and sink respectively. The max-flow problem asks how much flow can be transferred from the source to the sink. This can be envisioned as the edges of the graphs being pipes, with their cost representing throughput capacity. Ford and Fulkerson (1962) stated that a maximum flow from s to t would saturate a set of edges in the graph, dividing it into two disjoint parts corresponding to a minimum cut. Thus, these two problems are equivalent, and the cost of a min-cut is simultaneously the maximum flow. 9 Malle, Giuliani, Kieseberg, Holzinger Graph Cuts in Computer Vision In computer vision a lot of problems can be formulated in terms of Penergy minimization - a labeling f minimizing a given energy equation of the form E(f ) = {p,q}∈N Vp,q (fp , fq )+ P p∈P Dp (fp ) is sought. In the case of image segmentation the labels represent pixel intensities. α -Expansion Algorithm One algorithm for solving such energy equations is the α − Expansion algorithm by Boykov et al. (Boykov et al., 2001) An overview of the algorithm is given in figure 5. It is based on the computation of several minimum-cuts on specifically designed graphs Gα , where each graph Gα corresponds to a labeling f . The cost of the cut on Gα corresponds to the energy E(f ). The graph Gα changes for each label α. Its set of vertices consists of a source (α) and a sink (α) vertex, all image pixels p in P and all auxiliary vertices a{p,q} . Auxiliary vertices are added for each pair of neighboring pixels {p, q} ∈ N with fp 6= fq . Algorithm: Boykov α-expansion 1 2 3 4 5 6 7 8 set an arbitrary labeling f set success := 0 for each label α ∈ L \ text {} \ quad 3.1 Find fˆ = arg min E(fˆ) among fˆ within one α- expansion move of f \ text {} \ quad 3.2 If E(fˆ) < E(f ), set f = fˆ and success \ text { }:= 1 end for if success == true goto 2 return f Figure 5: α-expansion algorithm (Boykov et al., 2001) Minimum-cut Algorithm The core of the previously presented α -expansion algorithm consists of computing minimum-cuts. Boykov et al. presented a suitable algorithm for solving the minimum-cut problem in (Boykov and Kolmogorov, 2004). It is based on finding augmenting paths and is comprised of three consecutive stages: growth, augment and adoption. During the computation four sets of vertices are maintained: the search trees S and T , a set of active vertices A and a set of orphan vertices O. Additionally the parent / child relations are kept. Figure 6 shows the detail of the growth stage. T REE(p) denotes the tree of vertex p, P AREN T (q) means the parent of p. After an augmenting path was found during the growth stage, the path gets augmented as described in figure 7. In the adoption stage new parents are sought for the orphan nodes. Preprocessing We conducted our experiments on electron microscopy images from human skin. These images were first converted to gray-scale and thresholded to obtain a binary segmentation. Subsequently a graph was extracted from the binary image for label 255 as described above. Computing a minimum-cut on this graph would correspond to an α-move for label 255. This graph was then saved and used for the following experiments. 10 The Need for Speed Algorithm: Min-Cut growth stage 1 2 3 4 5 6 7 8 9 10 while A 6= ∅ pick an active node p ∈ A for every neighbor q such that tree cap(p → q) > 0 if T REE(q) = ∅ then add q to search tree as an active node T REE(q) := T REE(p), P AREN T (q) := p, A := A ∪ {q} if T REE(q) 6= ∅ and T REE(q) 6= T REE(p) return P = P AT Hs→t end for remove p from A end while return P = ∅ Figure 6: Growth stage of the Min-Cut/Max-Flow algorithm (Boykov and Kolmogorov, 2004) Algorithm: Min-Cut augmentation stage 1 2 3 4 5 6 find the bottleneck capacity ∆ on P update the residual graph by pushing flow ∆ through P for each edge (p, q) in P that becomes saturated if T REE(p) = T REE(q) = S then set P AREN T (q) := ∅ and O := P ∪ {q} if T REE(p) = T REE(q) = T then set P AREN T (p) := ∅ and O := P ∪ {p} end for Figure 7: Augmentation stage of the Min-Cut / Max-Flow algorithm in Boykov and Kolmogorov (2004) Algorithm: Min-Cut adoption stage 1 2 3 4 for all neighbors q of p such that T REE(q) = T REE(p): if tree cap(q → p) > 0 add q to the active set A if P AREN T (q) = p add q to the set of orphans O and set P AREN T (q) := ∅ T REE(p) := ∅, A := A − {p} Figure 8: Adoption stage of the Min-Cut / Max-Flow algorithm in Boykov and Kolmogorov (2004) 5. Experimental Setup 5.1 Testing equipment All tests were conducted on a 2017 Lenovo Carbon X1, 5th generation, with a Core i77500U, 16GB of LPDDR3 RAM and a PCIe-NVMe SSD. As C-compiler we utilized gcc (GCC) 7.2.1 with standard option flags ”-O3 -std=c++11”. For ASM.js / WASM we used Emscripten 1.37.32 with the same option flags ”-O3 –std=c++11” (plus ”-s WASM=1” for WASM). The string permutation sample had to be compiled with Emscripten option -s TOTAL MEMORY=268435456 -s ALLOW MEMORY GROWTH=1 in order to work at all, as simply using -s TOTAL MEMORY=XYZ (no matter how great the amount) showed no effect in our experiments. 11 Malle, Giuliani, Kieseberg, Holzinger The Node ASM / WASM runs were conducted directly on the respective .asm.js / .wasm.js output files, where as the browser tests were conducted on the respective asm.html / wasm.html files under a standard Apache 2.24 local document root. The underlying operating system was Antergos (Arch) Linux with a 4.14.15-1-ARCH kernel. For the Chrome runs, we used Chromium 64.0.3282.119 (Developer Build) (64-bit) as provided by the Antergos (Arch) Linux distribution, for the Firefox benchmarks we used the Linux version 58.0.1 (64-bit); finally, the Edge performance tests were conducted on the latest Edge Browser on Windows 10 Education, Build 1709, on the same hardware as described above. 5.2 Time measurement All timing was directly inserted into the code of our examples, to measure ”wall time” from certain points of execution to others. For procedures that take too little time to conduct accurate measurements, we executed the procedure n times - e.g. both the Fast Fourier Transformation as well as the Huffman Coding were done 100k times to arrive at a measurement. Each procedure was then repeated 10 times and the average taken to be the final measure as reported in Figure 9. 6. Results and discussion In order to understand the results better and give a starting point for their interpretation, we need to look at what happens when JS / ASM.js / WASM are executed ((Clark, 2017)) in the JSVM (binary execution does not need further explanation): 6.1 The interpretation / optimization / execution cycle: 1. Fetching means the downloading of the actual code representation. WASM has a slightly more compact form than JS, thus should load slightly faster. 2. Parsing / Validating means ”reading” and ”translating” the code to an executable format, in our case either JS (incl. ASM.js) or WASM bytecode. WASM offers some advantages here, since it is already presented in a format much closer to the actual hardware-determined assembly (the virtual assembly format). 3. Monitoring occurs during execution of JS/ASM.js (not WASM) in order to determine if an interpreted snippet of code (cold state) is run frequently, in which case it is compiled via the base compiler into assembly (warn state). For dynamically typed JS this state potentially produces a whole slew of different stumps (one for each combination of possible input value types) which then have to be chosen each time that snippet is called (depending on the ”current” input value types). In case the stump is called sufficiently often, it enters the hot phase. 4. Execution is the main phase where code is actually run and produces effects. WASM is supposed to be slightly faster in this phase, since it’s lower-level than (un-optimized) JS / ASM.js. 5. Optimization For hot snippets of code, the bytecode is further optimized making more or less aggressive assumptions (mostly about types again). This leads to less 12 The Need for Speed querying for each call (e.g. each iteration in a loop) but generates some overhead as optimizations need to be computed during runtime. 6. De-(Re)-optimizing / Bail-out. In case assumptions do not hold - which can only be checked when a snippet of code is executed and some error occurs - the VM falls back to a baseline compilation or pure interpretation. This phase never occurs for WASM. 7. Garbage-collection. Memory management; since WASM requires manual memory management, this phase is only necessary for JS/ASM.js. This phase can have a great effect on (absolute) runtime in case memory is heavily / carelessly freed. Especially the ”delete” operator in JS is notoriously slow, but recursive algorithms operating on substrings may also be... 6.2 Results Figure 9: Overview table of detailed experimental results (runtime in milliseconds). Unsurprisingly, C++ compiled to binary wins in 50% of experiments; the remaining 50% go to Firefox’s WASM implementation, which is comprehensible since the Mozilla foundation was first to introduce ASM.js / Emscripten and therefore has the most experience in runtime optimizations on the platform. It should be noted that WASM performance spread over different implementations was in no case dramatic (roughly within a factor of 2x), which is a testimony to the industry’s good cooperation & a positive sign for the future integrity of the platform. 13 Malle, Giuliani, Kieseberg, Holzinger 6.3 Discussion We first note that our results for Recursive Fibonacci (of n = 40), the Floyd-Warshall APSP Algorithm (on a graph of |vertices| = 1k) as well as 100k iterations of Huffman Coding (on a paragraph of lorem ipsum-based strings) yielded the expected results: Compiled C++ code came in fastest, with JS showing significantly worse performance (although easily within an order of magnitude). In all three cases, ASM.js performed significantly better than native JS, but worse than WASM which allows for higher optimization. We note that those algorithms are mostly computational and function-call oriented, meaning they do not heavily rely on memory management. In the only case where heap-operations are heavily involved (Huffman Coding) - we see that JS performance worsens comparatively - a sign that memory management in the VM is still slower than natively. The results for String Permutations followed the expected patterns, but dramatically showed the impact of standard JS garbage collection on an exponential amount of substrings created and released: the performance dropped to about 35x the time spent by the GCC compiled binary. ASM / WASM performed drastically better, the reason for which an be found in the flat-memory model of those implementations - chunks in the fixed-sized memory space are never really deallocated, but simply set inactive (undefined). The first perplexing results lie in the run-times of filling an integer array with a million random numbers (FillArrayRand 1e6) as well as comparing ten million random integers pairs with one another (IntCompare 1e7). Here native (GCC-produced CPP) code is predictably beating ASM - although only by a slight margin when using the most recent version of NodeJS in ASM mode (factor 1.2) - but blown away by WASM by up to a factor of 3. This was so surprising that our first suggestion was Emscripten/Binaryen might be optimizing the whole procedure away; however subsequently added randomized access to the arrays (including output) alleviated this suspicion. The same behavior, albeit to a lesser extent, can be observed in Fast Fourier Transformations (FFT 100k), where WASM manages to slightly beat the native binary. We note that all of those examples are heavily computation oriented, almost purely consisting of one giant number-crunching routine. Therefore a possible interpretation for the WASM speedup could be SIMD Vectorization happening within the Emscripten pipeline; capabilities for SIMD are being actively developed for Chrome and Firefox, and would therefore also find their way into NodeJS. On the other hand, according to current sources (Mozilla-Foundation, 2018) support for SIMD is not yet enabled in any standard build of any major JSVM. However, (Dehesa-Azuara and Chittenden) mention that their library Vectorize.js, which can enhance normal JavaScript by applying 4-wide vectorization on CPU-heavy loops, is actually being used by Emscripten. While this does not guarantee that current ASM.js/WASM output is using vectorization, it is a strong hint that optimizations along those lines have been an effort for years. We will need to further investigate into possible intra-JSVM / WASM optimizations that might catapult performance beyond the CPP / binary baseline. As far as our real-world scenario is concerned, we did not run the unoptimized JS version of this algorithm, since we found the sample code to be different enough between implementations as to make a fair comparison all but impossible. As for the GCC binary and (W)ASM, the two runs on a 50x50 / 150x150 pixel input image (graph) behaved as expected, although WASM on the latter was slightly outperformed by ASM. We can only assume that 14 The Need for Speed in this real-world code, optimization advantages regarding memory management (the graph was completely instantiated prior to the traversal) as well as static type assumptions did not play as great a role as expected. Furthermore, the task given most closely resembles the Floyd-Warshall (as in graph traversal) as well as RecFib40 (as in function-call centered) examples, in both of which ASM/WASM displayed similar behavior. All in all, we are satisfied to see results that 1) more or less matched our expectations and 2) behaved similarly to much smaller toy examples, since this indicates the technology is mature enough for realworld deployment. The only case remaining inexplicable to us is that of the MinCut 100x100, in which GCC was outperformed by both ASM/WASM by a factor of more than 3x. A possible, yet unlikely, explanation could lie in a stark input abnormality in such a way that the resulting graph would allow traversal in a much different fashion from the other 2 samples: By accidentally presenting us with a graph in which the number of vertex discovery operations (involving a heap or other data-structure) are greatly reduced versus sheer numeric computations, we might get a result akin to the IntCompare one; however, the relatively good ASM.js performance speaks clearly against that; moreover, one could not attribute that behavior to implicit vectorization. In future work, we will strive to design input data to more complex algorithms in such a way as to uncover the explanatory factors hidden to us for now. 7. Open problems & Future challenges Although the results presented are very interesting and clearly point to areas of algorithmic programming in which a decisive speedup can be achieved employing ASM.js / WASM via Emscripten, not only are our current insights incomplete with respect to why certain speedup factors can be achieved, nor have we exploited all possibilities to accelerate Browserbased software in general. Therefore, we will strive to improve and expand upon our research in four vital areas: • Better profiling. Deeper insights into the speedup of different parts of the execution pipeline for JS, ASM.js and WASM could help us target strengths as well as weaknesses of different platforms w.r.t. certain algorithmic requirements and programming styles a lot better; this would not only clear up the picture regarding explanatory factors but might also pave the way to deriving general rules as to what technology to utilize under certain conditions. • Future WASM features like native SIMD vectorization and shared-memory concurrency can not been exploited as-of-date, at least not in a stable implementation. We will be closely monitoring the progress in the field and design experiments to optimally utilize any relevant upcoming features (e.g. parallel graph algorithms would be of great interest for client-side social network computations). • GPGPU. Utilizing GPUs’ massive parallelization capabilities even on modest hardware like integrated or mobile graphics could easily speed up parallelizable / vectorizable code beyond the speed limits of natively compiled C/C++. However, direct compilation from already (non-GPU enabled) code-bases is highly unlikely (except 15 Malle, Giuliani, Kieseberg, Holzinger Figure 10: Overview plot of all results on one log scale including standard deviation. We note that overall performance deviation was most striking with FillArrayRand, IntCompare 1e7 as well as Permutations, but was less significant (although in no case negligible, as Figure 11 clearly shows) in the case of Floyd Warshall 1k, FastFourierTransform, as well as MinCuts 50 & 150 Emscripten’s capacity for compiling OpenGL ES 2.1 code into WebGL, where the latter is a port of the former); therefore the additional effort of completely designing new code-bases for WebGL need to be taken into account. As a side-note, there exist libraries (like Tensorfire) who promise execution of Tensorflow models via WebGL although this can not be regarded as ’speed-up’ of traditional code, it would offer great potential for client-side classifiers once deep models have been obtained on more powerful hardware. 16 The Need for Speed Figure 11: Performance of different runtime environments on the 10 chosen algorithms. These are the same results as in Figure 10, but grouped per algorithm with each group on its own linear scale, thus relative runtime advantages can be depicted more intuitively. 17 Malle, Giuliani, Kieseberg, Holzinger • Federated Learning. Since client-side / Browser-based computations are quickly entering the performance-range in which they are useful for even Machine Learning Tasks, their utilization in a ML-grid as proposed by Google’s Federated Learning initiative (Bonawitz et al., 2016) makes great sense even and especially for startups or mobile App developers, but also for decentralized health environments (Holzinger et al., 2017), (O’Sullivan et al., 2017). We are already working on a demonstration of this concept applied to distributed graphs and will gladly include our insights in a follow-up of this paper. Overall, we are greatly enthusiastic about the current & future possibilities of clientside algorithmic computations and are looking forward to seeing any combination of the technologies at our disposal implemented in future applications (see e.g. Malle et al. (2017)). 8. Conclusion In this paper we presented a comparison study between the performance of native binary code, JavaScript, ASM.js as well as WASM on a selected set of algorithms we deemed representative for current challenges in client-side, distributed computing. Following a justification of this selection as well as some hypotheses on how different algorithms should perform in different execution environments, we presented experimental results and compared them to our prior expectations. We can conclude that although some scenarios played out exactly as we suspected, we were greatly surprised by others - especially WASM’s capacity of (sometimes) outperforming native code by impressive margins will need further investigation into the internals of JSVM optimization. Above and beyond that, we point to the need of subsequent studies in parallelization as well as GPU computing to further expand on the work presented. References Laksono Adhianto, Sinchan Banerjee, Mike Fagan, Mark Krentel, Gabriel Marin, John MellorCrummey, and Nathan R. Tallent. Hpctoolkit: Tools for performance analysis of optimized parallel programs. Concurrency and Computation: Practice and Experience, 22(6):685–701, 2010. doi: 10.1002/cpe.1553. Michael Armbrust, Armando Fox, Rean Griffith, Anthony D. Joseph, Randy Katz, Andy Konwinski, Gunho Lee, David Patterson, Ariel Rabkin, and Ion Stoica. A view of cloud computing. Communications of the ACM, 53(4):50–58, 2010. doi: 10.1145/1721654. 1721672. Kyle Barton, Samuel Dodson, Danielle Fenske, Ben Whitehead, and Jens Mache. Learning Parallel JavaScript with a Visual Boids Simulation. pages 6–7, 2013. Keith Bonawitz, Vladimir Ivanov, Ben Kreuter, Antonio Marcedone, H Brendan McMahan, Sarvar Patel, Daniel Ramage, Aaron Segal, and Karn Seth. Practical secure aggregation for federated learning on user-held data. NIPS Workshop on Private Multi-Party Machine Learning, arXiv:1611.04482, 2016. 18 The Need for Speed Myles Borins. From Faust to Web Audio: Compiling Faust to JavaScript using Emscripten. Linux Audio Conference, 2014. URL http://lac.linuxaudio.org/2014/papers/27. pdf. Yuri Boykov and Vladimir Kolmogorov. An experimental comparison of min-cut/max-flow algorithms for energy minimization in vision. IEEE transactions on pattern analysis and machine intelligence, 26(9):1124–1137, 2004. Yuri Boykov, Olga Veksler, and Ramin Zabih. Fast approximate energy minimization via graph cuts. IEEE Transactions on pattern analysis and machine intelligence, 23(11): 1222–1239, 2001. Lin Clark. A cartoon intro to webassembly, 2017. URL https://hacks.mozilla.org/ 2017/02/a-cartoon-intro-to-webassembly/. William T. Cochran, James W. Cooley, David L. Favin, Howard D. Helms, Reginald A. Kaenel, William W. Lang, George C. Maling, David E. Nelson, Charles M. Rader, and Peter D. Welch. What is the fast fourier transform? Proceedings of the IEEE, 55(10): 1664–1674, 1967. doi: 10.1109/PROC.1967.5957. James W. Cooley and John W. Tukey. An algorithm for the machine calculation of complex fourier series. Mathematics of computation, 19(90):297–301, 1965. doi: 10.2307/2003354. Mario Dehesa-Azuara and Tom Chittenden. Automatic vectorization of JavaScript using SIMD. js. contrib.andrew.cmu.edu. Robert W. Floyd. Algorithm 97: Shortest path. Commununications of the ACM, 5(6):345, 1962. doi: 10.1145/367766.368168. Lester R. Ford and Delbert R. Fulkerson. Flows in Networks. Princeton University Press, New Jersey, 1962. Emily Fortuna, Owen Anderson, Luis Ceze, and Susan Eggers. A limit study of JavaScript parallelism. IEEE International Symposium on Workload Characterization, IISWC’10, 2010. doi: 10.1109/IISWC.2010.5649419. Michel Goemans. Huffman Codes, MIT 18.310A Lecture Notes Principles of Discrete Mathematics. 2015. URL http://math.mit.edu/~goemans/18310S15/18310.html. Andreas Haas, Andreas Rossberg, Derek L. Schuff, Ben L. Titzer, Michael Holman, Dan Gohman, Luke Wagner, Alon Zakai, and JF Bastien. Bringing the web up to speed with WebAssembly. Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation - PLDI 2017, pages 185–200, 2017. ISSN 03621340. doi: 10.1145/3062341.3062363. Song Han, Huizi Mao, and William J. Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv:1510.00149, 2015. 19 Malle, Giuliani, Kieseberg, Holzinger Andreas Holzinger, Bernd Malle, Peter Kieseberg, Peter M. Roth, Heimo Müller, Robert Reihs, and Kurt Zatloukal. Towards the augmented pathologist: Challenges of explainable-ai in digital pathology. arXiv:1712.06657, 2017. Katharina Holzinger, Klaus Mak, Peter Kieseberg, and Andreas Holzinger. Can we trust Machine Learning Results? Artificial Intelligence in Safety-Critical Decision Support. ERCIM News, 112(1):42–43, 2018. Anurag Ingole and Rupesh Nasreh. Dynamic Shortest Paths using JavaScript on GPUs. 2015. Peter Jensen, Ivan Jibaja, Ningxin Hu, Dan Gohman, and John McCutchan. SIMD in JavaScript via C++ and Emscripten. Proceedings of the 2015 Workshop on Programming Models for SIMD/Vector Processing, 2015. URL http://www.cs.utexas.edu/users/ ivan/pubs/simdjs.pdf. Michael I. Jordan and Tom M. Mitchell. Machine learning: Trends, perspectives, and prospects. Science, 349(6245):255–260, 2015. doi: 10.1126/science.aaa8415. Bernd Malle, Peter Kieseberg, Edgar Weippl, and Andreas Holzinger. The Right to be Forgotten: Towards Machine Learning on perturbed knowledge bases. In Springer Lecture Notes in Computer Science LNCS 9817, pages 251–256. Springer, Heidelberg, Berlin, New York, 2016. doi: 10.1007/978-3-319-45507-5 17. Bernd Malle, Nicola Giuliani, Peter Kieseberg, and Andreas Holzinger. The More the Merrier - Federated Learning from Local Sphere Recommendations. In Machine Learning and Knowledge Extraction, IFIP CD-MAKE, Lecture Notes in Computer Science LNCS 10410, pages 367–374. Springer, Cham, 2017. doi: 10.1007/978-3-319-66808-6 24. Mojtaba Mehrara, Po Chun Hsu, Mehrzad Samadi, and Scott Mahlke. Dynamic parallelization of JavaScript applications using an ultra-lightweight speculation mechanism. Proceedings - International Symposium on High-Performance Computer Architecture, pages 87–98, 2011. ISSN 15300897. doi: 10.1109/HPCA.2011.5749719. Philipp Moritz, Robert Nishihara, Stephanie Wang, Alexey Tumanov, Richard Liaw, Eric Liang, William Paul, Michael I. Jordan, and Ion Stoica. Ray: A distributed framework for emerging ai applications. arXiv:1712.05889, 2017. Mozilla-Foundation. SIMD technical reference, 2018. URL https://developer.mozilla. org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SIMD. Shane O’Sullivan, Andreas Holzinger, Kurt Zatloukal, Paulo Saldiva, Muhammad I. Sajid, and Wichmann Dominic. Machine learning enhanced virtual autopsy. Autopsy Case Report, 7(4):3–7, 2017. doi: 10.4322/acr.2017.037. Markus Puschel and Jose M.F. Moura. Algebraic signal processing theory: Cooleytukey type algorithms for dcts and dsts. IEEE Transactions on Signal Processing, 56(4):1502– 1521, 2008. doi: 10.1109/TSP.2007.907919. 20 The Need for Speed Ion Stoica, Dawn Song, Raluca Ada Popa, David Patterson, Michael W. Mahoney, Randy Katz, Anthony D. Joseph, Michael Jordan, Joseph M. Hellerstein, and Joseph E. Gonzalez. A berkeley view of systems challenges for ai. arXiv:1712.05855, 2017. Seon Wook Kim and Youngsun Han. JavaScript Parallelizing Compiler for Exploiting Parallelism from Data-Parallel HTML5 Applications. ACM Transactions on Architecture and Code Optimization (TACO), 12(4):1–25, 2016. ISSN 15443973. doi: 10.1145/2846098. URL http://dx.doi.org/10.1145/2846098. Stefan Wörner. Fast Fourier Transform. Numerical Analysis Seminar ETH Zürich, 2008. Thomas Würthinger. Graal and Truffle : Modularity and Separation of Concerns as Cornerstones for Building a Multipurpose Runtime. page 2584663, 2014. doi: 10.1145/2584469. 2584663. Alon Zakai. Emscripten: an llvm-to-javascript compiler. In Proceedings of the ACM international conference companion on Object oriented programming systems languages and applications companion (OOPSLA 2011), pages 301–312. ACM, 2011. doi: 10.1145/ 2048147.2048224. 21
2cs.AI
Modeling and simulation of non-linear and hysteresis behavior of magneto-rheological dampers in the example of quarter-car model Sulaymon Eshkabilov Dynamics & Control Lab Tashkent Automotive Road Institute Amir Temur Str. 20, Tashkent -100060, Uzbekistan Email: [email protected] Abstract. This paper presents reviews of several models and numerical simulation models of non-linear and hysteresis behaviors of magneto-rheological liquid dampers in MATLAB®/Simulink® in the example of quarter-car model of vehicle suspension simulation, such as, Bingham, Dahl, LuGre and Bouc-Wen models. In addition, it demonstrates numerical simulation models built in MATLAB®/Simulink® and discusses results from numerical simulation models for three different input excitations from terrain. Keywords: Bingham model, Dahl model, LuGre model, Bouc-Wen model, passive and semi-active suspension, magneto-rheological damper, quarter car model, numerical simulation, Simulink model. 1. Introduction In general, most of the natural phenomena, operational machine processes and dynamic system behaviors are of non-linear nature that is very often linearized for the sake of simplicity in formulations and analyses. In fact, nonlinear behaviors or phenomena of processes may create difficulties in studies and engineering design processes but considering some of those non-linear characteristics of processes or behaviors of dynamic systems carefully could be also very beneficial and of great importance for efficient and accurate control, and used for operational efficiency and energy preservation or dissipation depending on their application areas. For example, nonlinear parameters and characteristics of some materials and interactions of different parts made of different materials have a great potential to apply for dampers and shock absorbers [1]. One of the good examples for such processes is a hysteresis loop observed in magnetic or magnetized materials and magneto-rheological (MR) liquids. In studies [2, 3, 4, 5], the MR liquids are found to be one of the most suitable and promising in designing vibration dampers and shock absorbers, and there are some combinatorial designs [6] of MR fluid dampers. In studies [7], feasibility of MR liquid damper modeling by employing Bouc-Wen model in association with an intelligent self-tuning PID controller for semi-active suspension modeling is studied numerically via computer modeling in MATLAB/Simulink. Nevertheless, identification of the hysteresis loop parameters is rather complex and may require considerable laboratory and numerical studies in order to apply them and get a best use of MR damper properties. In this paper, we put some emphases on different mathematical models and formulations of the MR liquids, and their hysteresis loop parameters and numerical simulation models designed for a semi-actively controlled feedback damper for a vehicle suspension systems developed in MATLAB/Simulink. In addition, we shall try to analyze and compare efficiency and accuracy of these models in the example of the quarter-car model to design a semi-active suspension system. 2. Mathematical formulation of a quarter-car model To derive an equation of (vertical) motion of a vehicle while driving on uneven roads, we take quarter of a vehicle by assuming that terrain roughness is evenly distributed under all wheels of a vehicle and loading from the whole vehicle body is equally distributed across all of its axles. In addition, we consider that a tire has some damping effect. With these preconditions, we draw the next physical model (Figure 1) of the system for passively and semi-actively controlled systems of a quarter-car model. a) Paassive suspensio on design; b) Semi-acttive suspension design. Figure 1. Vehicle V suspensi on models. From the passive and semii-active suspension design show wn in Figure 1, we can derive equations of m motion of the two mass bodies whicch as un-sprung mass (half of axle a mass and one o wheel) aand sprung mass (quarter car body mass) . So, the equations off motion of the systems s are a) Fo or passive suspension system: 0 b) (1) Fo or semi-active su uspension system m: (2) Where , and are diisplacement, vellocity and accelleration of the sprung mass (qquarter car boddy mass), respecctively; , and are displacem ment, velocity an nd acceleration of o the un-sprung mass (half of axxle mass and onne wheel), respecctively; and daamping coefficieents of suspensio on and tire; an nd stiffness oof suspension annd tire; and are terrain rouughness (disturbancee) displacement and velocity with w respect to longitudinal l speeed of the vehiccle; is the fforce generated by the controller th hat takes into account terrain rou ughness , an nd vertical displ acement and velocity of the vehhicle. In the moddel, for - the control force exerrted by the contrroller, we apply y several differeent hysteresis efffect models, succh as, Bingham m, Dahl, LuGre and Bouc-Wen B modeels and design nu umerical simulattion models in M MATLAB/Simullink. 3. Matheematical formullations of the MR M dampers 3.1. Bingha am model To simulatee and identify paarameters of the MR liquids, Bin ngham plastic m model [8] was prooposed in 1985. It is formulatedd by the following: (3) Where is a piston’s relatiive displacementt and is its derrivative that is veelocity of a pistoon; is frictionnal force; is daamping is offset force (constant force value). The sig gnum function will takee care of the dirrection of the friictional constant; force dep pending on the relative r velocity of the hysteresis (internal) vvariable . Note that in our simuulation model, correspond to the displacem ment and veloccity of the spru ung mass. and The responsse of Bingham model m correspon nds to the follow wing graph show wn in Figure 3 annd it can be assuumed that the shhape of Bingham model m force will w be equal to Coulomb force plus friction forrce ( ). The dam mping coefficiennt (constant) will be equal to the linear relationsh hip between the force ∆ and thee velocity ∆ diffferences- Figuree 3. Figuree 2. Bingham meechanical model proposed by [6]]. ∆ ∆ Figure 3. The reesponse of Binghham model. Now we build a Simulink model m – Figure 4 using the form mulation from thee equation (3) annd link it with thhe model expresssed for the semi-acttively controlled d suspension mod del from the exp pression of (2) ass shown in Figurre 1.b. Figure 4. Bing gham model emb bedded in semi-aactive suspensionn control. Note that th he Coulomb frictional force ( ) is directly relatted to the yield stress. In Binghham model theree are two input ssignals, which are and make up u relative velocity in order to diirect the Coulom mb frictional forrce with the ssignum function, i.ee., . 3.2. Dahl model m This model considers quasi--static bonds in the t origin of fricction [9]. Dahl m model of the MR damper [8] is foormulated by: (4) | | is exerted forcee from the MR damper, d is thee control voltagee, Where, and are paarameters that co ontrol the hystereesis loop shape. (5) is the dynaamic hysteresis ccoefficient, , , Using the ex xpressions (4) and (5), we build d a simulation model m of Dahl moodel in Simulinkk as shown in Fiigure 5. In Dahll model (Figure 5), there t is one feed dback coming fro om the un-spring g mass that is veelocity annd there is one ouutput signal thatt is going to thee un-sprung masss and sprung maass. Fig gure 5. Dahl mod del implemented d for semi-active control of suspeension system. In Dahl model, there are on ne input signal and output sig gnal . The innput signal is cooming from the velocity of the sprung nction of fo force, and summ ming junction off dynamic hyssteresis mass that iss a car body vellocity and feeding summing jun coefficient. The output sign nal is the controll force feeding a summing juncction of input forrces for sprung mass with (-) siign and for un-sprun ng mass with (+)) sign. 3.3. LuGree model In modeling g the hysteresis loops, the LuGrre model is deveeloped within stuudies [10] and aapplied in workss [11] in modeliing and simulation of o dampers. This model [10] tak kes into accountt three types of frictions observved in dry frictioon and fluid flow ws, viz. Coulomb, sttick-slip and striibeck effects thatt are formulated by the followinng: (6) Where , , are stiffnesss, damping and viscous friction coefficients, resspectively; is the friction sttate (average defflection of the bristlees), is the velocity v of the frriction state, is the relative vvelocity of the spprung mass. | In the abovee expression, | (7) is defineed by [12 and 13] that has been eexpressed with thhe following (8) Where is the Coulomb friction force, is i the sticktion fo orce, and is thhe Stribeck veloccity. The simulattion model of th he LuGre modell, as shown in Figure F 6, is buillt in Simulink w with one input ssignal that is a rrelative velocity from m sprung mass and a one output signal s that is con ntrol force ffor the suspensioon system conneected with a sum mmation junction of the t sprung and un-sprung u massees with (-) and (+ +) signs respectiively alike Binghham and Dahl m models shown in Figure 4 and 5. Fiigure 6. Simulink k model of the L LuGre model. In the Simulink model, a fun nction block witth three input sig gnals, viz. , mployed to comppute a control forrce that , , is em f . The tw wo input signalss, which are and , aree internal variables computed from the expressions (7) is the MR force and (8). 3.4. Bouc-W Wen model The MR dam mper with Bouc-Wen model is composed c of stifffness (spring) ellement, passive damper and Bouuc-Wen hysteressis loop elements. Th he schematic rep presentation of Bouc-Wen B modeel of an MR dam mper is depicted bby the next scheematic view – Fiigure 7. The hysteresis loop has an internal i variablee that represen nts hysteretic behhavior and satisffies the next exppression (9). Thee model equation of Bouc-Wen mod del [8] is expressed by the follow wing. | | | | | | (9) Where is the evolutionary y variable that caan vary from a sinusoidal s to a quuasi-rectangularr function of the time dependingg on the parameters , and . Figure F 7. Schem matic representatiion of Bouc-Wen en model of an M MR damper. The force ex xerted by the MR R damper is the function of the relative displaceement the control voltage v , and iss given by and veloocity and the pparameter defiined by (10) In the modeel computing daamping force of the MR damperr, is the stiffn fness of the sprinng element of thhe MR damper aand the values of th he parameters (co oefficients) and hav ve a linearly relaationship with thhe control voltagge and determ mine the influence off the model on the final force . The force takes into accoount pre-yield sttress of the dam mper. The valuess of the parameters (coefficients) ( and arre determined from the followinng expressions: , (11) The best fitt parameter valu ues of these parrameters are deetermined by fitt tting to the expeerimentally meaasured response of the system. The simulattion model of the system from m Bouc-Wen mo odel shown in F Figure 8 is buillt in Simulink bby using the equuations expressed in n (9), (10) and (11). ( The simulation model hass two input sourrces, viz. diisplacement andd velocityy of the sprung masss ( ) of the system, and two output signals forr control force going to thee sprung mass ( ) with (-) minnus sign and to the un-sprung u ( ) mass with (+) plus p sign. Note th hat is equual to and is equal to in the equatiion (2). Note that in n the MR model, there are two input i signals and d one output siggnal. The input ssignals are and displacement and velocity y of the sprung mass m and the outp put signal is the control force generated by the MR damperr. Figure 8. Bouc-Wen mo del. In Bouc-Ween model alike Bingham, Dahl and LuGre mo odels, the controol force feeds thhe summing junnction of forces for the sprung masss with (-) sign an nd for the un-sprrung mass with (+) ( sign. Also, all off the four simulaation models aree summed up ass sub-systems (F Figure 9) to com mpare their perfformances againnst each olled system for four different ex xcitation signals from the terrainn. The system response is displacement other and a passively contro ody from the roaad excitations. in the car bo Semi_Active (Bouc--Wen) Fig gure 9. Passively controlled systeem model vs. fouur MR models aas sub-systems. 4. Simula ation results and discussions The above depicted d mathem matical formulattions as implemented in Simulinnk models are ssimulated to com mpare performannces of each model with respect to o its exerted dam mping force, and d vibration and shock dampingg efficiency as a semi-active viibration controller fo ormulated in thee system equatio ons (2) of motion n against passiveely controlled/daamped vibrationn damper formullated in (1) in the ex xample of quarteer car model sho own in Figure 1. In all of our sim mulations, the coontrol force in (22) is set to be equal to and vibration damp ping is evaluated in the sprung g mass. Displaceement values off the sprung maass with a semii-active controller off the MR dampeer models are com mpared with thee displacement vvalues of a passivvely controlled ssuspension systeem. The values of su uspension param meters (quarter car) c are taken fro om the data givven in Table 1 aand all numericaal values for hyssteresis model (Bing gham, Dahl, LuGre and Bouc-W Wen) parameterss are chosen froom the data giveen in Table 2, 3, 4 and 5. The rrational parameter values v of the hyssteresis models are found by traails and errors. F For numerical ssimulations threee different signaals, viz. random white noise, Heaviside step function and sine waves with 2.1 Hz and 20.8 Hz of oscillations, and also, a combinatorial excitation signal, a sum of sine waves and random (Gaussian white) noises, are taken. Road excitation signals are set to have maximum (absolute) magnitude of 0.075 m and oscillation frequencies of sine waves are taken by considering natural frequencies of the quarter car model. Table 1. Data for suspension system (quarter car model). Parameter name Parameter notation Parameter value Sprung Mass 2500 Un-sprung mass 320 Stiffness of suspension 80000 [ / ] Stiffness of un-spring mass (tire) 500000 [ / ] Damping coefficient of sprung mass 320 [ ∙ / ] Damping coefficient of un-sprung mass 15020 [ ∙ / ] Table 2. Data for Bingham model simulation. Parameter name Parameter notation Parameter value Damping coefficient in Bingham model 320 [ ∙ / ] Offset force 10 Frictional force 100 Parameter name Control voltage Hysteresis parameters Parameter name Coulomb friction force Sticktion force Stribeck velocity Stiffness coefficient Damping coefficient Viscous friction coefficient Table 3. Data for Dahl model simulation. Parameter notation Parameter value 5[ ] 350, 800, 250, 25 , , , Table 4. Data for the LuGre model simulation. Parameter notation Parameter value 10 [ ] 25 [ ] 0.04 [ / ] 500 [ / ] 10 [ ∙ / ] 0.6 [ ∙ / ] Table 5. Data for Bouc-Wen model simulation. Parameter name Parameter notation Parameter value Parameters of the Hysteresis shape 1, 0, 1.5, 2 , , ,n Stiffness of the spring element 300 [ / ] Input voltage 5[ ] Other parameters 4400, 442, 10872, 49616 , , , Pre-yield stress 0[ ] From the numerical simulations of hysteresis loop models with Bingham, Dahl, LuGre and Bouc-Wen models for the semi-active suspension system it is clear that all of the semi-active system models outperform passively controlled system model for four different excitation signals from road. Figure 10 and 11 demonstrate system responses (displacement of the car body) of the passively and semi-actively controlled models from random (Gaussian white) noise with the magnitude of 0.075 m (in the range of -0.0375 m … +0.0375 m) and from the simulation results it is clearly seen that all hysteresis models outperform passively damped system model in damping undersigned excitations from the terrain. Out of these four semi-active models, Bingham and Bouc-Wen models demonstrate much higher damping than the other two models, viz. Dahl and LuGre models. x 10 Passive vs. S emi-active hyste eresis models Input signall (road): Gussia an noise 8 Car body displacement, [m] -3 6 4 2 0 -2 -4 -6 -8 0 2 4 6 time, [sec] 8 10 Passive P B Bingham D Dahl L LuGre B Bouc-Wen 12 Figurre 10. Model ressponses on rando om (Gaussian whhite noise) excitaation from road.. Figurre 11. Model ressponses on rando om (Gaussian whhite noise) excitaation from road.. In another excitation e with Step S (Heaviside) function – Figu ure 12 and 13, thhe hysteresis moodels outperform m in damping undesired excitation in n the car body in n comparison with w passively co ontrolled model. In this case, L LuGre and Bouc--Wen models peerforms considerably y better than thee other two models and dissipaate the step exciitation with the magnitude of 00.075 m in less than 2 seconds. Wh hereas Bingham m model damps th he excitation in about a 8 seconds and Dahl modell in about 13 secconds. Passive vs. Semi-active S hysterresis models 0 0.14 Input signa al (road): Heavisid de Step function Car body displacement, [m] 0 0.12 0.1 0 0.08 0 0.06 Passive Bingham Dahl LuGre Bouc-Wen 0 0.04 0 0.02 0 0 2 4 6 time, [sec] 8 10 12 Fiigure 12. Passivee vs. semi-activee suspension moddels on Step inpput excitation. Fiigure 13. Passivee vs. semi-activee suspension moddels on Step inpput excitation. In sine wave excitations with 2.1 Hz of freq quency shown in n Figure 14 andd 15, semi-activeely controlled m models except forr BoucWen modell have demonstrrated slightly better in damping magnitude of eexcitation oscillaations in compaarison with a paassively controlled system s model an nd frequency of excitation from the road is presserved clearly aas a periodic signnal with all moddels. In this case, Bouc-Wen B modeel has outperformed all other models in term ms of damped oscillation maggnitudes. In sinee wave excitations with 20.8 Hz off frequency show wn in Figure 16 6 and 17, all hyysteresis models have dissipatedd magnitude of excited n car body moree than passively controlled model by preservingg periodic oscillaations with respect to road excittations. vibrations in Performances of all modelss after about tw wo seconds of sim mulation time hhave reached to very similar steeady state valuee in the range of 5 of displaccement in car bo ody. In this case, Bouc-Wen moodel has perform med slightly poorrer than the otheer three MR damperr models in terms of damped exccitation. Passive vs. Semi-active S hysteressis models 0.0 05 Input siignal (road): 0.75sin n(2π*f*t); f=2.1 Hz Car body displacement, [m] 0.0 04 0.0 03 0.0 02 0.0 01 0 -0.0 01 Passsive Bingham Dah hl LuG Gre Bou uc-Wen -0.0 02 -0.0 03 -0.0 04 -0.0 05 0 2 4 6 time, [sec] 8 10 12 Figure F 14. Passiv ve vs. semi-activ ve suspension on n sinusoidal wavve: 0.075 sin 2 , 2.1 excitation. Figure F 15. Passiv ve vs. semi-activ ve suspension on n sinusoidal wavve: 0.075 sin 2 , 2.1 excitation. Passive vs. Semi-active hysteresis models Passive Bingham Dahl LuGre Bouc-Wen Car body displacement, [m] 0.01 0.0 005 0 -0.0 005 Input signal (road): ( 0.75sin(2π*f*t); * f=20.8 Hz -0.01 0 2 4 6 time, [sec] 8 10 12 Figure F 16. Passiv ve vs. semi-activ ve suspension on n sinusoidal wavee: 0.075 sin 2 , 20.8 excitation Figure F 17. Passiv ve vs. semi-activ ve suspension on n sinusoidal wavee: 0.075 sin 2 , 20.8 excitation A fourth ex xcitation signal from f road used to t simulate the models m is sine w wave with 20.8 H Hz of frequencyy plus white noisse. The performancees of the semi-aactive models for this excitation n – Figure 18 annd 19 have been similar to the pprevious case wiith sine wave excitaation with 20.8 Hz H frequency fo or some extent and a in this case, the two MR moodels, viz. Binghham and Dahl m models, have not reaached to a stable steady-state vallue. Passive vs. Se emi-active hysterresis models Car body displacement, [m] 015 0.0 Input sig gnal (road): 0.75s sin(2π*f*t)+Gussia an noise 0.01 0.0 005 0 -0.0 005 -0 0.01 0 5. 2 4 6 time, [sec] 8 10 Passive P B Bingham D Dahl L LuGre B Bouc-Wen 12 Figure 18 8. The system responses of passiive and semi-acttive on sinusoidaal wave ( white noise excitationn. 20 0.8 ): 0.075 sin n 2 + Gausssian Figure 19 9. The system responses of passiive and semi-acttive on sinusoidaal wave ( white noise excitationn. 20 0.8 ): 0.075 sin n 2 + Gausssian Summ mary The develop ped simulation models m of the hy ysteresis or non--linear system bbehaviors of the MR liquids useed in dampers byy using mathematical formulations of o Bingham, Dahl, LuGre and Bouc-Wen B modells in MATLAB//Simulink in the example of quaarter car model havee showed adequaacy of these MR R dampers for designing d vibratiion and shock ddampers. The sim mulation resultss of the semi-activelly controlled dam mper models wiith Bingham, Daahl, LuGre and B Bouc-Wen modeels have demonsstrated superiority over passively co ontrolled damperr model in the ex xample of four different d excitatiion signals mimiicking terrain rouughness for the quarter car suspension system mod del. Amongst th hese semi-activeely controlled m models, Bouc-W Wen has outperfoormed other moodels in terms of thee damped vibrations and steady-sstate response tim me in three excittation signals, viiz. step, white nooise and low frequency sine wave. In case of high her (>20.8 Hz) frequency (puree periodic) excittation from roadd, Bingham, Daahl and LuGre m models perform better than Bouc-W Wen model. Further stud dies will be aimeed to develop maathematical (emp pirical) formulattions and experiimental validatioons to compute ooptimal parameters of MR hysteresis based damp pers with Dahl, LuGre and Boouc-Wen modelss with respect tto suspension aand tire with these MR daamper models. parameters. In addition, it iss planned to deveelop an adaptivee PID controller in association w dgements. This research study is supported by y the state grannt # A-3-54 from m the State Science and Techhnology Acknowled Committee of Uzbekistan. References 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. Mitu M A.M., Popeescu I., Siretean nu T., (2012) “Mathematical “ m modeling of sem mi-active controol with applicaation to bu uilding seismic protection”, p BSG G Proceedings, Vol. V 19, 2012, ppp. 88-99. Saapinski B., (2009 9) “Magneto-rheeological damperrs in vibrational control of mechhanical structurees”, Mechanics V Vol. 28, No 1. 18-25 pp. Brraz Cesar M., R. Carneiro dee Barros R., 20 012, “Propertiees and Numericcal Modeling oof MR damperss”, 15th in nternational confference on experimental mechanics, Porto, Portuugal. Zh hang H., et al. (2004), ( “Study on the design, test t and simulattion of a MR daamper with twoo-stage electromagnetic co oil”, www.paperr.edu.cn – viewed d on March 13, 2016. 2 Esshkabilov S., Grrimheden M., 2015, “Car seat daamper controller design with maggneto-rheologicaal fluids“, Int. C Conf., Nov., 2015, Navo oi, Uzbekistan. Leee T.Y., Kawash hima K., Chen P.C. P (2008) "Exp perimental and A Analytical Studyy on a Nonlinearr Isolated Bridgee under Seemiactive Contro ol", 14th World Conference on Earthquake E Engiineering, Octobeer 12-17, 2008, B Beijing, China. Mat M Hussin Ab Taalib, Intan Z. Maat Darus, 2013, "Self-tuning " PID D Controller withh MR damper A And Hydraulic Acctuator Fo or Suspension Sy ystem", Fifth Intternational Confference on Compputational Intelliigence, Modellinng and Simulatioon, IE EEE-Computer Society, S DOI 10..1109/CIMSim.2 2013.27, pp. 1199-124. Gugliemino, et al.. 2008, Semi-acttive Suspension Control, Springeer, pp. 192-196. Laampaert V., Al-B Bender F., 2003 3 “A generalized d Maxwell slip fr friction model apppropriate for coontrol purposes,”” IEEE – Physics Confereence, St. Petersburg, Russia, pp. 1170-1177. Canudas de Wit C, Olsson H.J.,, Astrom K.J., Lischinsky L P (11993), Dynamiccs friction modeels and control design. American A Controll Conference, Saan Francisco, US SA, pp. 1920-19226. Nguyen B. D., Aldo A. F., Olivierr A. B., 2007, Efficient Simulatiion of a Dynamiic System with L LuGre Friction, JJournal off Computational and Nonlinear Dynamics, D Vol. 2, pp. 281-289. B. Armstrong-H´eelouvry, Controll of Machines wiith Friction. Bosston, MA: Kluweer, 1991. Canudas de Wit C., Olsson H., Astrom A K. J., and a Lischinsky P P., 1995, “A neew model for coontrol of system ms with friction,” IEEE Trrans. Autom. Co ontr., vol. 40, no.. 3, pp. 419–425. Su ulaymon L. ES SHKABILOV. He got ME from m Tashkent Auttomotive Road IInstitute (TARI)) in n 1994, earned MSc M from Rocheester Institute of Technology in 22001 and PhD frrom Cyberneticss reesearch Institute of Academy Scciences of Uzbeekistan in 2005. He was a visiting professor inn 20 010-2011 at Mecchanical Engineeering departmennt of Ohio Univeersity, OH, USA A. He is currentlyy an n associate proffessor at TARI and holds a ppart-time professsor position at Tashkent-Turinn Po olytechnic Univ versity. His reseaarch areas are m mechanical vibraations and appliccations of modall an nalysis, system identification, co ontrol and modelling of dynamic systems.
3cs.SY
Analysis of Algorithms and Partial Algorithms arXiv:1601.03411v5 [cs.AI] 7 Aug 2017 Andrew MacFie Abstract. We present an alternative methodology for the analysis of algorithms, based on the concept of expected discounted reward. This methodology naturally handles algorithms that do not always terminate, so it can (theoretically) be used with partial algorithms for undecidable problems, such as those found in artificial general intelligence (AGI) and automated theorem proving. We mention an approach to self-improving AGI enabled by this methodology. 1 Introduction: Shortcomings of Traditional Analysis of Algorithms Currently, the (running time) analysis of algorithms takes the following form. Given two algorithms A, B that solve the same problem, we find which is more efficient by asymptotically comparing the running time sequences (an ), (bn ) [4,15]. This could be using worst-case or average-case running times or even smoothed analysis [16]. We refer to this general method as traditional analysis of algorithms. As with any model, traditional analysis of algorithms is not perfect. Authors have noted [1,9] that comparing sequence tails avoids the arbitrariness of any 100 particular range of input is superior to n lengths but leads us to say an = n bn = 1 + exp(−1010 ) which is false for practical purposes. A further issue with traditional analysis is illustrated by this situation: Say we have a function F : {0, 1}∗ → {0, 1} and an algorithm A that computes F such that for n ≥ 0, A takes (n!)! steps on the input 0n and n steps on any other input of length n. The algorithm A then has worst-case running time (n!)! and average-case running time slightly greater than 2−n (n!)!, which are both terrible. However, if the inputs are generated according to a uniform distribution, the probability of taking more than n steps is 2−n which is quickly negligible. We see that A should be considered an excellent algorithm but traditional analysis does not tell us that, unless we add “with high probability”. The same issue arises if A simply does not halt on 0n , in which case the worst-case and average-case running times are infinite. Indeed, this is not an esoteric phenomenon. For any problem with Turing degree 0′ we cannot have an algorithm that halts on every input, but we develop partial solutions that work on a subset of inputs. Such problems include string compression (Kolmogorov complexity), the halting problem in program analysis [2], algebraic simplification [17], program optimization, automated theorem proving, and Solomonoff induction (central to artificial general intelligence [13]). E.g. in the case of automated theorem proving, Buss, describing the main open problems in proof theory [3], states, “Computerized proof search ... is widely used, but almost no mathematical theory is known about the effectiveness or optimality of present-day algorithms.” Definition 1. An algorithm A is a partial algorithm (a.k.a. computational method [12, p5]) for a given problem if on all inputs, A either outputs the correct value, or does not terminate. Definition 2. We refer to partial algorithms for problems with Turing degree 0′ as 0′ algorithms. To analyze 0′ algorithms, and perhaps to better analyze normal terminating algorithms, we need a new approach that is not based on worst-case or average-case running time sequences. In Sect. 2 we present a new method for analyzing algorithms, called expected-reward analysis that avoids some of the issues mentioned above. Then in Sect. 3 we mention how this method can be used in self-improving AI systems. We give directions for further work in Sect. 4. Notation 1. Given a (possibly partial) algorithm A and an input ω, we denote the number of steps taken by A on ω by cA (ω), which takes the value ∞ if A does not halt on ω. 2 2.1 Expected-Reward Analysis of Algorithms Definition Let A be a (possibly partial) algorithm with inputs in Ω. We say the score of A is X S(A) = P ({ω})r(ω)D(cA (ω)) = E(r · (D ◦ cA )) , ω∈Ω where P is a probability measure on Ω, D is a discount function [7], and r(ω) is a reward (a.k.a. utility) value associated with obtaining the solution to ω. The expression S(A) may be interpreted as the expected discounted reward that A receives if run on a random input, and the practice of comparing scores among algorithms we call expected-reward analysis. A higher score indicates a more efficient algorithm. The functions D and r are arbitrary and are free to be set in the context of a particular application. E.g. in graphical user interface software we often desire near-instant responses, with utility rapidly dropping off with time. Assuming 0 ≤ r ≤ 1, we immediately see that for all A, partial or not, we have 0 ≤ S(A) ≤ 1 . For simplicity in this paper we assume r(ω) = 1 and D is an exponential discount function, i.e. D(cA (ω)) = exp(−λ cA (ω)) , where λ > 0 is a discount rate. The choice of P is also arbitrary; we remark on two special cases. If all inputs of a given length are weighted equally, P is determined by a probability mass function on Z0+ . In this case any common discrete probability distribution may be used as appropriate. The measure P is also determined by a probability mass function on Z0+ if we weight equal-length inputs according to Solomonoff’s universal distribution m [13], which is a particularly good general model, although computationally difficult. Expected-reward analysis is non-asymptotic, in the sense that all inputs potentially matter. Thus, while expected-reward analysis can be used on terminating algorithms, we expect it to give different results from traditional analysis, in general. Since particular inputs can make a difference to S(A), it may be advantageous to “hardcode” initial cases into an algorithm. This practice certainly exists, e.g. humans may store the 12 × 12 multiplication table as well as knowing a general integer multiplication algorithm. Computational complexity theory often works with classes of problems whose definitions are equivalent for all “reasonable” models of computation [5]. However, even a varying constant factor could arbitrarily change a score. This is simply the price of concreteness, and outside of complexity theory, traditional analysis of algorithms generally selects a particular model of computation and gives precise results that do not necessarily apply to other models [6]. Unlike traditional analysis, experimental data is relevant to score values in a statistical sense. If we are able to generate inputs according to P , either artificially or by sampling inputs found in practice, S(A) is a quantity amenable to statistical estimation. This suggests a form of experimental analysis of algorithms which focuses on a single real number rather than plotting the estimated running time for every input length, which, in the necessary absence of asymptotics in experimental analysis, may not conclusively rank two competing algorithms anyway. The expected-reward paradigm already appears in the analysis of artificial agents, rather than algorithms [8]. As we see in Sect. 3, however, even in applications to AI, working in the more classical domain of algorithms brings benefits. 2.2 Theory and Practice Traditional analysis of algorithms has an established literature going back decades which provides a set of techniques for performing traditional analysis on algorithms developed for various problems. We do not significantly develop a mathematical theory of expected-reward analysis here, but we make some very brief initial remarks. By way of introductory example, we consider expected-reward analysis applied to some well-known sorting algorithms. Let Sn be the set of permutations of [1..n] and let Πn be a uniform random element of Sn . We denote the algorithms mergesort and quicksort by M and Q, as defined in [15], and set mn = E [exp(−λ cM (Πn ))] , qn = E [exp(−λ cQ (Πn ))] , where cA (ω) is the number of comparison operations used by an algorithm A to sort an input ω. Proposition 1. For n ≥ 1 we have   mn = exp −λ(n⌈lg(n)⌉ + n − 2⌈lg(n)⌉ ) , qn = n e−λ(n+1) X qk−1 qn−k , n m0 = 1, (1) q0 = 1 . k=1 Proof. From [15], M makes the same number of comparisons for all inputs of length n ≥ 1: cM (Πn ) = n⌈lg(n)⌉ + n − 2⌈lg(n)⌉ , so (1) is immediate. Now, when Q is called on Πn , let ρ(Πn ) be the pivot element, and let Π n , Π n be the subarrays constructed for recursive calls to Q, where the elements in Π n are less than ρ(Πn ), and the elements in Π n are greater. We have E[ exp(−λcQ (Πn ))] n 1X E[exp( −λ(n + 1 + cQ (Π n ) + cQ (Π n )) ) | ρ(Πn ) = k] = n k=1 n e−λ(n+1) X E[exp( −λ(cQ (Π n ) + cQ (Π n )) ) | ρ(Πn ) = k] . = n k=1 It can be seen that given ρ(Πn ) = k, Π n and Π n are independent, thus E[ exp(−λcQ (Πn ))] n e−λ(n+1) X E[exp(−λcQ (Π n )) | ρ(Πn ) = k] · = n k=1 E[exp(−λcQ (Π n )) | ρ(Πn ) = k] = e n −λ(n+1) X n E[exp(−λcQ (Πk−1 ))]E[exp(−λcQ (Πn−k ))] . ⊓ ⊔ k=1 From examining the best-case performance of Q, it turns out that cM (Πn ) ≤ cQ (Πn ) for all n, so the expected-reward comparison of M and Q is easy: S(M ) ≥ S(Q) for any parameters. However, we may further analyze the absolute scores of M and Q to facilitate comparisons to arbitrary sorting algorithms. When performing expected-reward analysis on an individual algorithm, our main desideratum is a way to quickly compute the score value to within a given precision for each possible parameter value P, λ. Proposition 1 gives a way of computing scores of M and Q for measures P that give equal length inputs equal weight, although it does not immediately suggest an efficient way in all cases. Bounds on scores are also potentially useful and may be faster to compute; in the next proposition, we give bounds on mn and qn which are simpler than the exact expressions above. Proposition 2. For n ≥ 1, e−2λ(n−1) e−λ(n−1) ≤ m ≤ . n (n − 1)!λ/ log(2) (n − 1)!λ/ log(2) (2) For all 0 < λ ≤ log(2) and n ≥ 0, e−2λn e−2γλ(n+1)−λ λ (2π(n + 1)) < q ≤ , n (n + 1)!2λ (n!)λ/ log(2) where γ is Euler’s constant. Proof. Sedgewick and Flajolet [15] give an alternative expression for the running time of mergesort: n−1 X cM (Πn ) = (⌊lg k⌋ + 2) . k=1 Statement (2) follows from this because log(k)/ log(2) + 1 < ⌊lg k⌋ + 2 ≤ log(k)/ log(2) + 2 . With 0 < λ ≤ log(2), we prove the upper bound qn ≤ e−2λn (n!)λ/ log(2) (3) for all n ≥ 0 by induction. Relation (3) clearly holds for n = 0. We show that (3) can be proved for n = N (N > 0) on the assumption that (3) holds for 0 ≤ n ≤ N − 1. Proposition 1 gives qN = N e−λ(N +1) X qk−1 qN −k N k=1 ≤ e N −λ(N +1) X N k=1 e−2λ(k−1) e−2λ(N −k) ((k − 1)!)λ/ log(2) ((N − k)!)λ/ log(2) (by the assumption) λ/ log(2) ! N  1 1 1 X =e N (k − 1)! (N − k)! k=1  !λ/ log(2)  N X 1 1 1  ≤ e−3λN +λ  λ/ log(2) (k − 1)! (N − k)! N −3λN +λ k=1 (by Jensen’s inequality, since 0 < λ/ log(2) ≤ 1) = e−3λN +λ =  (2N −1 )λ/ log(2) (N !)λ/ log(2) e−2λN . (N !)λ/ log(2)  Thus (3) has been proved for all n ≥ 0. For the lower bound on qn , we use the probabilistic form of Jensen’s inequality, qn = E [exp(−λcQ (Πn ))] ≥ exp(−λE [cQ (Πn )]) , noting that average-case analysis of quicksort [15] yields E [cQ (Πn )] = 2(n + 1)(Hn+1 − 1), n≥0 , where (Hn ) is the harmonic sequence. For n ≥ 0, the bound Hn+1 < log(n + 1) + γ + 1 2(n + 1) holds [11] (sharper bounds exist), so we have   qn > exp −2λ(n + 1) log(n + 1) + γ + 1 −1 2(n + 1) = e−2(γ−1)λ(n+1)−λ (n + 1)−2λ(n+1) . We finish by applying Stirling’s inequality p (n + 1)−(n+1) ≥ 2π(n + 1) e−(n+1) /(n + 1)!,  n≥0 . ⊓ ⊔ From these results we may get a sense of the tasks involved in expectedreward analysis for typical algorithms. We note that with an exponential discount function, the independence of subproblems in quicksort is required for obtaining a recursive formula, whereas in traditional average-case analysis, linearity of expectation suffices. We end this section by mentioning an open question relevant to a theory of expected-reward analysis. Question 1. If we fix a computational problem and parameters P, λ, what is supA S(A), and is it attained? If supA S(A) is not attained then the situation is similar to that in Blum’s speedup theorem. Comparing supA S(A) among problems would be the expectedreward analog of computational complexity theory but because of the sensitivity of S to parameters and the model of computation, this is not useful. 3 Self-Improving AI The generality of 0′ problems allows us to view design and analysis of 0′ algorithms as a task which itself may be given to a 0′ algorithm, bringing about recursive self-improvement. Here we present one possible concrete example of this notion and discuss connections with AI. Computational problems with Turing degree 0′ are Turing-equivalent so without loss of generality in this section we assume 0′ algorithms are automated theorem provers. Specifically, we fix a formal logic system, say ZFC (assuming it is consistent), and take the set of inputs to be ZFC sentences, and the possible outputs to be provable and not provable. Let a predicate β be such that β(Z) holds iff Z is a 0′ algorithm which is correct on provable inputs and does not terminate otherwise. In pseudocode we write the instruction to run some Z on input ω as Z(ω), and if ω contains β or S (the score function), their definitions are implicitly included. We give an auxiliary procedure Search which takes as input a 0′ algorithm Z and a rational number x and uses Z to obtain a 0′ algorithm which satisfies β and has score greater than x (if possible). Symbols in bold within a string literal get replaced by the value of the corresponding variable. We assume 0′ algorithms are encoded as strings in a binary prefix code. 1: procedure Search(x, Z) 2: u ← the empty string 3: loop 4: do in parallel until one returns provable: 5: A: Z(“∃v : (Z ∗ = u0v =⇒ β(Z ∗ ) ∧ S(Z ∗ ) > x)”) 6: B: Z(“∃v : (Z ∗ = u1v =⇒ β(Z ∗ ) ∧ S(Z ∗ ) > x)” ) 7: C: Z(“Z ∗ = u =⇒ β(Z ∗ ) ∧ S(Z ∗ ) > x”) 8: 9: 10: 11: 12: 13: if A returned provable then u ← u0 if B returned provable then u ← u1 if C returned provable then return u We remark that the mechanism of Search is purely syntactic and does not rely on consistency or completeness of ZFC, or the provability thereof. This would not be the case if we strengthened β to require that β(Z) is true only if at most one of Z(ω) and Z(¬ω) returns provable. Such a β would never provably hold in ZFC. The following procedure Improve takes an initial 0′ algorithm Z0 and uses dovetailed calls to Search to output a sequence of 0′ algorithms that tend toward optimality. 1: procedure Improve(Z0 ) 2: best ← Z0 , pool ← {}, score ← 0 3: for n ← 1 to ∞ do 4: an ← nth term in Stern-Brocot enumeration of Q ∩ (0, 1] 5: if an > score then 6: initialState ← initial state of Search(an , best) 7: add (an , best, initialState) to pool 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: improvementF ound ← false for (a, Z, state) in pool do run Search(a, Z) one step starting in state state newState ← new current state of Search(a, Z) if state is not a terminating state then in pool, mutate (a, Z, state) into (a, Z, newState) continue improvementF ound ← true best ← output of Search(a, Z) score ← a ˆ for (â, Ẑ, state) in pool where â ≤ score do ˆ remove (â, Ẑ, state) from pool print best if improvementF ound then for (a, Z, state) in pool do initialState ← initial state of Search(a, best) add (a, best, initialState) to pool The procedure Improve has the following basic property. Proposition 3. Let (Zn ) be the sequence of 0′ algorithms printed by Improve. If β(Z0 ) holds, and if there is any 0′ algorithm Y and s ∈ Q where β(Y ) and S(Y ) > s > 0 are provable, we have lim S(Zn ) ≥ s . n→∞ If (Zn ) is finite, the above limit can be replaced with the last term in (Zn ). Proof. The value s appears as some value an . For an = s, if an > score in line 5, then Search(s, best) will be run one step for each greater or equal value of n and either terminates (since Y exists) and score is set to s, or is interrupted if we eventually have score ≥ s before Search(s, best) terminates. It suffices to note that when score attains any value x > 0, all further outputs Z satisfy S(Z) > x and there is at least one such output. ⊓ ⊔ The procedure Improve also makes an attempt to use recently printed 0′ algorithms in calls to Search. However, it is not true in general that S(Zn+1 ) ≥ S(Zn ). Checking if a particular output Zn is actually an improvement over Z0 or Zn−1 requires extra work. In artificial general intelligence (AGI) it is desirable to have intelligent systems with the ability to make autonomous improvements to themselves [14]. If an AGI system such as an AIXI approximation [10] already uses a 0′ algorithm Z to compute the universal distribution m, we can give the system the ability to improve Z over time by devoting some of its computational resources to running Improve. This yields a general agent whose environment prediction ability tends toward optimality. 4 Future Work We would like to be able to practically use expected-reward analysis with various parameter values, probability measures, and discount functions, on both terminating and non-terminating algorithms. Particularly, we would like to know whether 0′ algorithms may be practically analyzed. It may be possible to develop general mathematical tools and techniques to enhance the practicality of these methods, such as exist for traditional analysis; this is a broad and open-ended research goal. Acknowledgements. The author wishes to thank Zhicheng Gao, Nima Hoda, Patrick LaVictoire, Saran Neti, and anonymous referees for helpful comments. References 1. Aaronson, S.: Why philosophers should care about computational complexity. In: Computability: Gödel, Turing, Church, and Beyond (2012) 2. Burnim, J., Jalbert, N., Stergiou, C., Sen, K.: Looper: Lightweight detection of infinite loops at runtime. In: In International Conference on Automated Software Engineering (2009) 3. Buss, S.: Re: Proof theory on the eve of year 2000. http://www.ihes.fr/~carbone/papers/proofsurveyFeferman2000.html (1999), accessed: 2015-10-04 4. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms. MIT Press, Cambridge, MA, third edn. (2009) 5. van Emde Boas, P.: Handbook of Theoretical Computer Science, Vol. A. pp. 1–66. MIT Press, Cambridge, MA, USA (1990) 6. Flajolet, P., Sedgewick, R.: Analytic combinatorics. Cambridge University Press, Cambridge (2009) 7. Frederick, S., Loewenstein, G., O’Donoghue, T.: Time discounting and time preference: A critical review. Journal of Economic Literature pp. 351–401 (2002) 8. Goertzel, B.: Toward a formal characterization of real-world general intelligence. In: Proceedings of the 3rd Conference on Artificial General Intelligence, AGI. pp. 19–24 (2010) 9. Gurevich, Y.: Feasible functions. London Mathematical Society Newsletter 206, 6–7 (1993) 10. Hutter, M.: Universal Artificial Intelligence: Sequential Decisions based on Algorithmic Probability. Springer, Berlin (2005) 11. Julian, H.: Gamma: Exploring Euler’s Constant. Princeton University Press (2003) 12. Knuth, D.E.: The Art of Computer Programming, Vol. 1. Addison-Wesley, Reading, MA (1997) 13. Li, M., Vitányi, P.: An Introduction to Kolmogorov Complexity and its Applications. Springer Science & Business Media (2013) 14. Schmidhuber, J.: Gödel machines: Fully self-referential optimal universal selfimprovers. In: Artificial General Intelligence, pp. 199–226. Springer (2007) 15. Sedgewick, R., Flajolet, P.: An Introduction to the Analysis of Algorithms. AddisonWesley (2013) 16. Spielman, D.A., Teng, S.H.: Smoothed analysis: an attempt to explain the behavior of algorithms in practice. Communications of the ACM 52(10), 76–84 (2009) 17. Trott, M.: The Mathematica Guidebook for Symbolics. Springer Science & Business Media (2007)
8cs.DS
arXiv:1309.0135v1 [math.AC] 31 Aug 2013 RAMIFICATION OF LOCAL RINGS ALONG VALUATIONS STEVEN DALE CUTKOSKY AND PHAM AN VINH Abstract. In this paper we discuss stable forms of extensions of algebraic local rings along a valuation in all dimensions over a field k of characteristic zero, and generalize a formula of Ghezzi, Hà and Kashcheyeva describing the extension of associated graded rings along the valuation for stable extensions of regular algebraic local rings of dimension two to arbitrary ground fields k of characteristic zero. We discuss the failure of this result in positive characteristic. 1. Introduction Suppose that k is a field, K is an algebraic function field over k and ν is a valuation of K (which is trivial on k). Let Vν be the valuation ring of ν, with maximal ideal mν . Let Γν be the value group of ν. Important invariants associated to ν are its rank (one less than the number of prime ideals in Vν ), rational rank (dimQ Γν ⊗Z Q) and dimension (dim ν = trdegk Vν /mν ). We have that rank ν ≤ rational rank ν and by Abhyankar’s inequality ([1] and Appendix 2 [12]), (1) rational rank ν + dim ν ≤ dim K ∼ Zrr as an unordered group, where dim K = trdegk K, and if equality holds, then Γν = where rr = rational rank ν. Such valuations are called Abhyankar valuations. An algebraic local ring of K is a local ring R which is essentially of finite type over k and whose quotient field is K. R is dominated by ν if R ⊂ Vν and mν ∩ R = mR is the maximal ideal of R. A monoidal transform R → R1 of R is a local ring R1 of the blowup of a regular prime ideal P of R (R/P is regular). R → R1 is a quadratic transform if R1 is a local ring of the blow up of the maximal ideal of R. R → R1 is a monoidal transform along ν if Vν dominates R1 . For each γ ∈ Γν , let Pγ (R) = {f ∈ R | ν(f ) ≥ γ} and Pγ+ (R) = {f ∈ R | ν(f ) > γ}. We define the associated graded algebra of ν on R (as in [10]) as M Pγ (R)/Pγ+ (R). grν (R) = γ∈Γν If f ∈ R and ν(f ) = γ, we define the initial form inν (f ) of f in grν (R) as f + Pγ+ (R) ∈ Pγ /Pγ+ . A sequence {Pi }i≥0 in R is called a generating sequence of ν in R if {inν (Pi )}i≥0 generate grν (R) as an R/mR -algebra. The semigroup of R is S R (ν) = {ν(f ) | f ∈ R \ {0}}. The first author was partially supported by NSF. 1 Now suppose that K ∗ is an algebraic function field over k such that K ∗ is finite separable over K, and ν ∗ is a valuation of K ∗ which is an extension of ν. Let n = trdegk K ∗ − trdegk Vν ∗ /mν ∗ . Let e = [Γν ∗ : Γν ] and f = [Vν ∗ /mν ∗ : Vν /mν ] be the reduced ramification index and relative degree of ν ∗ over ν. Suppose that R and S are algebraic local rings for K and K ∗ such that S dominates R and ν ∗ dominates S (so that ν dominates R). Lemma 1.1. Suppose that Vν ∗ /mν ∗ = (Vν /mν )(S/mν ). Then [S/mS : R/mR ] = f if and only if Vν /mν and S/mS are linearly disjoint in Vν ∗ /mν ∗ over R/mR . Proof. Suppose that [S/mS : R/mR ] = f . Let h1 , . . . , hs ∈ S/mS be linearly independent over R/mR . Extend this set to a basis h1 , . . . , hf of S/mS over R/mR . Then h1 , . . . , hf span Vν ∗ /mν ∗ over Vν /mν , so they are linearly independent over Vν /mν . Now suppose that Vν /mν and S/mS are linearly disjoint over R/mR . There exist α1 , . . . , αf ∈ S/mS which are a basis of Vν ∗ /mν ∗ over Vν /mν . Then α1 , . . . , αf are linearly independent over R/mR , so [S/mS : R/mR ] ≥ f . However, a basis of S/mS over R/mR is linearly independent over Vν /mν , so [S/mS : R/mR ] = f .  We will say that R → S is monomial if R and S are n-dimensional regular local rings and there exist regular parameters x1 , . . . , xn in R, y1 , . . . , yn in S, an n × n matrix A = (aij ) of natural numbers with Det(A) 6= 0 and units δi ∈ S such that (2) xi = δi n Y a yj ij j=1 for 1 ≤ i ≤ n. In Theorem 1.1 [3] it is proven that when the ground field k has characteristic zero, there exists a commutative diagram (3) R0 → S 0 ↑ ↑ R → S such that the vertical arrows are products of monoidal transforms along ν ∗ and R0 → S0 is monomial. It is shown in Theorem 5.1 [3] and Theorem 4.8 [4] that the matrix A0 describing R0 → S0 (with respect to regular parameters x1 (0), . . . , xn (0) in R0 and y1 (0), . . . , yn (0) in S0 ) can be required to take a very special block form, which reflects the rank and rational rank of ν ∗ . We will say that R0 → S0 is strongly monomial if it is monomial and the matrix A0 has this special block form. In Theorem 6.1 [4] it is shown (assuming that k has characteristic zero) that we can always find a diagram (3) such that the following conditions hold: 1) R0 → S0 is strongly monomial. 2) If R1 → S 1 ↑ ↑ R0 → S 0 is such that R1 → S1 is strongly monomial with respect to regular parameters x1 (1), . . . , xn (1) in R1 and y1 (1), . . . , yn (1) in S1 , and the vertical arrows are products of monoidal transforms, then 2 2a) The natural group homomorphism Zn /At1 Zn → Γν ∗ /Γν defined by (b1 , . . . , bn ) 7→ [b1 ν ∗ (y1 (1)) + · · · + bn ν ∗ (yn (1))] is an isomorphism (where A1 is the matrix of exponents of R1 → S1 with respect to our given systems of parameters). 2b) Vν ∗ /mν ∗ is the join Vν ∗ /mν ∗ = (Vν /mν )(S1 /mS1 ). 2c) Vν /mν and S1 /mS1 are linearly disjoint over R1 /mR1 in Vν ∗ /mν ∗ . Theorem 6.1 [4] and Lemma 1.1 implies that, given R → S, there exists a monomial extension R0 → S0 as in (3) satisfying 1) and 2) above. In Theorem 6.3 [4] it is shown that the extension V → V ∗ can naturally be understood as a direct limit of R0 → S0 as above. We will say that R0 → S0 is stable if the conclusions 1) and 2) above hold. If R → S is stable, we have that e = Det(A) and f = [S/mS : R/mR ]. where e is the reduced ramification index and f is the relative degree of ν ∗ over ν. The simplest valuations are the Abhyankar valuations (defined at the beginning of this section). In this case, we easily obtain a very strong statement comparing the associated graded rings of the valuations. We have the following proposition. Proposition 1.2. Suppose that k has characteristic zero, ν is an Abhyankar valuation and R → S is stable. Then we have a natural isomorphism of graded rings  grν ∗ (S) ∼ = grν (R) ⊗R/mR S/mS [y 1 , . . . , y n ] where y 1 , . . . , y n are the initial forms of y1 , . . . , yn , with the only relations being [xi ] = [δi ]y 1ai1 · · · y anin 1 ≤ i ≤ n obtained from (2) ([δi ] is the class of δi in S/mS ). The degree of the extension of quotient fields of grν (R) → grν ∗ (S) is ef . Proof. Since R → S is stable, and ν ∗ and ν are Abhyankar valuations, we have that ν ∗ (y1 ), . . . , ν ∗ (yn ) is a Z-basis of Γν ∗ and ν(x1 ), . . . , ν(xn ) is a Z-basis of Γν . By Hensel’s lemma, R̂ ∼ = R/mR is a coefficient field of R̂. = k′ [[x1 , . . . , xn ]] where k′ ∼ Since ν(x1 ), . . . , ν(xn ) are rationally independent, ν has a unique extension to a valuation ν̂ of the quotient field of R̂, defined by ν̂(f ) = min{i1 ν(x1 ) + · · · + in ν(xn ) | ai1 ,...,in 6= 0} if f = ai1 ,...,in xi11 · · · xinn ∈ k′ [[x1 , . . . , xn ]] (with ai1 ,...,in ∈ k′ ). Since distinct monomials have distinct values, we have an isomorphism of residue fields Vν /mν ∼ = R/mR . Hence grν (R) ∼ = R/mR [x1 , . . . , xn ], is a polynomial ring, where xi is the class of xi , with the grading deg xi = ν(xi ). Further grν ∗ (S) ∼ = S/mS [y 1 , . . . , y n ], is a polynomial ring, where y i is the class of yi . The proposition follows.  P 3 If ν is an Abhyankar valuation, and R → S is quasi-finite, we have that S S (ν ∗ ) is finitely generated as a module over the semigroup S R (ν) by Proposition 1.2. It is natural to ask if an analog of Proposition 1.2 holds for more general valuations. We have the essential difference that the valuation groups Γν are not finitely generated in general. There even exist examples where R → S is quasi-finite but S S (ν ∗ ) is not a finitely generated module over S R (ν). In Theorem 9.4 [6] an example is given of a finite monomial extension of two dimensional regular algebraic local rings (over any ground field) such that S S (ν ∗ ) is not a finitely generated module over S R (ν). This example is necessarily not stable. Some other examples are given in [5] showing bad behavior of S S (ν ∗ ) over S R (ν). However, the conclusions of Proposition 1.2 always hold for stable mappings R → S when R and S have dimension two (n = 2). By Abhyankar’s inequality, when n = 2, ν is an Abhyankar valuation unless ν is rational (the value group is order isomorphic to a subgroup of the rational numbers). We have the following theorem, which generalizes Proposition 1.2 to this case. This surprising theorem was proven when k is algebraically closed of characteristic zero and dim K = 2 by Ghezzi, Hà and Kashcheyeva in [7]. If n = 2, ν is rational and R → S is stable, then R has regular parameters u, v, S has regular parameters x, y and there exist a unit γ in S such that u = γxe , v = y, (4) where e = |Γν ∗ /Γν | is the reduced ramification index. Theorem 1.3. Suppose that k is a field of characteristic zero, ν ∗ is a rational 0-dimensional valuation, n = 2 and R → S is stable. Then  gr ∗ (S) ∼ = gr (R) ⊗R/m S/mS [Z]/(Z e − [γ0 ]−1 [u]), ν ν R and the degree of the extension of quotient fields of gr ν (R) → grν ∗ (S) is ef . The remaining sections of this paper are devoted to the proof of this theorem. Our proof requires the construction of generating sequences for valuations in arbitrary regular local rings of dimension two in [6]. Theorem 1.3 is proven in Section 4, as a consequence of Proposition 4.1, which shows that a generating sequence in R is almost a generating sequence in S if R → S is stable. In contrast to the fact that finite generation may not hold even for a monomial mapping, when ν ∗ is a rational 0-dimensional valuation with n = 2 (Example 9.4 [6]), we have finite generation if R → S is stable. Corollary 1.4. Suppose that k is a field of characteristic zero, ν ∗ is a rational 0-dimensional valuation, n = 2 and R → S is stable. Then the semigroup S S (ν ∗ ) is a finitely generated S R (ν)-module. An interesting question is if an analogue of the conclusions of Proposition 1.2 holds in general for any n and arbitrary valuations for stable mappings over fields k of characteristic zero. It would be remarkable if this were true. With some small modification in the definition of strongly monomial (in (3)), strong monomialization holds for Ahhyankar valuations in positive characteristic, as follows from [9], (a strong form of local uniformization is proven for Abhyankar valuations by Knaf and Kuhlmann), and thus Proposition 1.2 holds in positive characteristic. A description of grν (R) for ν an Abhyankar valuation dominating a (singular) local ring R, over an algebraically closed field of arbitrary characteristic, and a proof of local uniformization for 4 Abhyankar valuations derived from this construction, has been recently given by Teissier in [11]. Over fields of positive characteristic, it is shown in Section 7.11 of [4] that the strong monomialization theorem is not true, even when n = 2, k is algebraically closed and ν is rational and zero dimensional. It is not known if monomialization holds, although it seems unlikely. Stable forms are given in [4] for mappings in dimension two over an algebraically closed field of positive characteristic which are much more complicated than in the characteristic zero case. The fundamental obstruction to obtaining strong monomialization is the defect. It is shown in [4] that strong monomialization holds in dimension two over algebraically closed fields k for extensions of valuations for which there is no defect. In [8], Ghezzi and Kashcheyeva prove Theorem 1.3 when k is algebraically closed of positive characteristic, dim K = 2 and the extension has no defect. In the example of Section 7.11 of [4], the stable forms Ri → Si satisfy (5) grν (Ri ) → grν ∗ (Si ) is integral but not finite, in contrast to the case of Proposition 1.2 and Theorem 1.3. In fact, grν (Ri ) = grν ∗ (Si )p . Further, S Si (ν ∗ ) is not a finitely generated S Ri (ν)-module for any ∗ i. In this example, the degree of the extension of quotient fields of (5) is ef pδ(ν /ν) = p2 , where δ(ν ∗ /ν) = 2 is the defect of ν ∗ over ν. The defect is always zero in characteristic zero, and for Abhyankar valuations. 2. A modification of the algorithm of [6] to construct a generating sequence Suppose that k is a field of characteristic zero and K is a two dimensional algebraic function field over k. Suppose that ν is a rational 0-dimensional valuation of K (the value group is isomorphic as an ordered group to a subgroup of Q and trdegk Vν /mν = 0). Suppose that R is a regular algebraic local ring of K such that ν dominates R. Let R → T1 → T2 → · · · be the sequence of quadratic transforms of R along ν, so that Vν = ∪Ti . Suppose that x, y are regular parameters in R. There exists a smallest value i such that the divisor of xy in spec(Ti ) has only one component. (6) Define R1 = Ti . We consider the algorithm of Theorem 4.2 [6] to construct a generating sequence in R with Remark 4.3 [6] and the following observation: We can replace Ui with a unit τi ∈ R times Ui in the algorithm. The algorithm (which we will call the modified algorithm to construct a generating sequence) iterates in the following way. Suppose that for i ≥ 0 we have constructed the first i + 1 terms P0 = x, P1 = y, P2 , . . . , Pi of a generating sequence by the (modified) algorithm. To produce the next term Pi+1 , the algorithm proceeds as follows. First we compute ni = [G(ν(P0 ), . . . , ν(Pi )) : G(ν(P0 ), . . . , ν(Pi−1 ))]. This allows us to find a suitable element (7) ω (i) ω (i) Ui = P0 0 P1 1 5 ω (i) i−1 · · · Pi−1 τi with τi ∈ R an arbitary unit, such that ν(Pini ) = ν(Ui ). Let " # Pini (8) αi = ∈ Vν /mν , Ui and fi (z) = z di + bi,di −1 z di −1 + · · · + bi,0 be the minimal polynomial of αi over R/mR (α1 , . . . , αi−1 ). Then the algorithm produces an element Pi+1 ∈ R of the form ! dX λt i −1 X j (s,t) ji−1 (s,t) as,t P0 0 · · · Pi−1 Pitni (9) Pi+1 = Pini di + t=0 s=1 where as,t ∈ R are units, j0 (s, t), . . . , ji−1 (s, t) ∈ N with 0 ≤ jk (s, t) < nk for k ≥ 1 and 0 ≤ t < di such that j (s,t) ν(P0 0 j i−1 · · · Pi−1 (s,t) Pitni ) = ni di ν(Pi ) for all s, t, and (10) bi,t = " λt X j (s,t) as,t P0 0 s=1 j i−1 · · · Pi−1 (s,t) Uidi −t # ∈ Vν /mν . Then P0 , P1 , . . . , Pi , Pi+1 are the first i + 2 terms of a generating sequence for ν in R. The observation of Remark 4.3 [6] is that any choice of (9) such that (10) holds gives an extension Pi+1 to the next term in a generating sequence, satisfying the conclusions of Theorem 4.2 [6]. We will consider the (modified) algorithm of Theorem 4.2 [6] in various rings R with given regular parameters x, y. We will denote Pi (R) = Pi so P0 (R) = x, P1 (R) = y, ni (R) = ni , Ui (R) = Ui , αi (R) = αi , fiR (z) = fi (z), di (R) = di , ni (R) = ni = di ni . These calculations not only depend on R, but on the previous terms P0 , P1 , . . . , Pi−1 constructed in the algorithm. We will also consider the algorithm of Theorem 7.1 [6] in different rings R, with given regular parameters x, y, and a generating sequence x = P0 , y = P1 , P2 , . . . , Pi , . . . constructed by the (modified) algorithm 4.2 of [6]. This algorithm considers the birational extension ring R1 of R defined by (6). The positive integers n1 and ω0 (1) of Theorem 4.2 [6] are defined by the conditions that n1 ν(y) = ω0 (1)ν(x) and gcd(n1 , ω0 (1)) = 1. Choose a, b ∈ N so that n1 b − ω0 (1)a = 1. Define (11) x1 = xb y n1 , y = . 1 ya xω0 (1) Let (12) σ = [y1 ] ∈ Vν /mν , 6 which is nonzero. Then (as is shown in Theorem 7.1 [6]) R1 /mR1 = R/mR [σ]. Theorem 7.1 [6] shows that (13) Q 0 = x1 , Q 1 = P2 ω0 (1)n1 x1 are regular parameters in R1 , and taking (14) Qi = Pi+1 ω0 (1)n1 ···ni Q0 for 1 ≤ i, the Qi are a generating sequence for ν in R1 produced by the algorithm of Theorem 4.2 [6] (as interpreted by Remark 4.3 [6]). We will consider the algorithm of Theorem 7.1 [6] in different rings R, and will denote Qi (R1 ) = Qi , β̂i (R1 ) = β̂i , Vi (R1 ) = Vi , α̂i (R1 ) = α̂i in the notation of the proof of Theorem 7.1 [6]. We have that the Vi (R1 ) constructed in the the proof of Theorem 7.1 [6] for R → R1 are actually the Ui (R1 ) as constructed by the algorithm of Theorem 4.2 [6]. Let L0 ∼ = R/mR be a coefficient field of R̂, so that R̂ = L0 [[x, y]]. R1 = R[x1 , y1 ]mν ∩R[x1 ,y1 ] . ν(x1 ) > 0 and ν(y1 ) = 0. We have that R1 /mR1 ∼ = L0 [σ], where σ is the class of y1 in R1 /mR1 . Let L1 ∼ = L0 (σ) be a coefficient field of R̂1 containing L0 (this is possible since k has characteristic zero, by Hensel’s Lemma). Let y1∗ = y1 − σ ∈ mRˆ1 . (15) Thus x1 , y1∗ are regular parameters in R̂1 and hence R̂1 = L1 [[x1 , y1∗ ]]. We have an expression ω (1) x = xn1 1 (y1∗ + σ)a , y = x1 0 (y1∗ + σ)b in R̂1 . 3. Monomial forms under sequences of quadratic transforms Suppose that k is a field of characteristic zero, and K → K ∗ is an extension of two dimensional algebraic function fields over k. Suppose that ν ∗ is a rational 0-dimensional valuation of K ∗ which restricts to ν. Suppose that R and S are regular algebraic local rings of K and K ∗ respectively such that ν ∗ dominates S and S dominates R. By Theorem 5.1 [3] and Theorem 4.8 [4] (summarized after (3)), there exists a sequence of quadratic transforms along ν ∗ R′ → S ′ ↑ ↑ R → S 7 such that R′ → S ′ is strongly monomial. For this type of valuation, this means that R′ has a regular system of parameters u, v and S ′ has a regular system of parameters x, y giving an expression u = γ0 x t , v = y (16) where γ0 is a unit in S ′ . For the rest of this section, we will assume that R → S is strongly monomial (so R, S have regular parameters satisfying (16)), but we do not assume that R → S is stable. Lemma 3.1. Suppose that R has regular parameters u, v and S has regular parameters x, y giving an expression u = γ0 x t , v = y where γ0 is a unit in S. Let R → R1 be the sequence of quadratic transforms along ν defined by (6) and Let S → S1 be the sequence of quadratic transforms along ν ∗ defined by (6). Then R1 has regular parameters u1 , ṽ1 and S1 has regular parameters x1 , ỹ1 such that u1 = γ1 xt11 , ṽ1 = ỹ1 where γ1 is a unit in S1 . Proof. We use the notation of the previous section. We have that R1 = R[u1 , v1 ]mν ∩R[u1 ,v1 ] , n (R) a(R) v1 , v u = u1 1 ω (1)(R) b(R) v1 = u1 0 with n1 (R)b(R) − ω0 (1)(R)a(R) = 1. We have that v n1 (R) uω0 (1)(R) so that ν(v1 ) = 0 and [v1 ] = σ(R) in Vν /mν . We have v1 = u1 = ub(R) . v a(R) Further, S1 = S[x1 , y1 ]mν ∗ ∩S[x1,y1 ] where n (S) a(S) ω (1)(S) b(S) y1 x = x1 1 y 1 , y = x1 0 with n1 (S)b(S) − ω0 (1)(S)a(S) = 1. We have that y n1 (S) xω0 (1)(S) so that ν ∗ (y1 ) = 0, and [y1 ] = σ(S) in Vν ∗ /mν ∗ . We have y1 = (17) Substitute x1 = xb(S) . y a(S) b(R) u1 = ub(R) v −a(R) = γ0 xtb(R) y −a(R) b(R) n (S) a(S) ω (1)(S) b(S) −a(R) = γ0 (x1 1 y1 )tb(R) (x1 0 y1 ) b(R) n (S)tb(R)−ω0 (1)(S)a(R) a(S)tb(R)−a(R)b(S) y1 . = γ0 x1 1 8 Set t1 = n1 (S)tb(R) − ω0 (1)(S)a(R). Since ν ∗ (u1 ) > 0, ν ∗ (x1 ) > 0 and ν ∗ (γ0 ) = ν ∗ (y1 ) = 0, we have t1 > 0. v1 = u−ω0 (1)(R) v n1 (R) = (γ0 xt )−ω0 (1)(R) y n1 (R) −ω (1)(R) n1 (S) a(S) −tω0 (1)(R) ω0 (1)(S) b(S) n1 (R) = γ0 0 (x1 y1 ) (x1 y1 ) −ω0 (1)(R) ω0 (1)(S)n1 (R)−tω0 (1)(R)n 1 (S) b(S)n1 (R)−a(S)tω0 (1)(R) y1 . = γ0 x1 ν ∗ (v1 ) = ν ∗ (y1 ) = ν ∗ (γ0 ) = 0 and ν ∗ (x1 ) > 0 implies ω0 (1)(S)n1 (R) − tω0 (1)(R)n1 (S) = 0. Since n1 (S)b(S) − ω0 (1)(S)a(S) 6= 0, we have that  Thus n1 (S) ω0 (1)(S) a(S) b(S)  −tω0 (1)(R) n1 (R)  6=  0 0  . m := b(S)n1 (R) − a(S)tω0 (1)(R) 6= 0. (18) We have that u1 , v1 ∈ S1 , so that R1 = R[u1 , v1 ]mν ∩R[u1 ,v1 ] ⊂ S1 . We have a commutative diagram R̂1 = L1 [[u1 , v1∗ ]] → Sˆ1 = M1 [[x1 , y1∗ ]] ↑ ↑ R̂ = L[[u, v]] → Ŝ = M [[x, y]] where L, M, L1 , M1 are coefficient fields of R̂, Ŝ, R̂1 , Sˆ1 such that there are inclusions L1 → M1 ↑ ↑ L → M This is possible (by Hensel’s Lemma) since R, S, R1 , S1 have equicharacteristic zero. y1∗ = y1 − σ(S), v1∗ = v1 − σ(R) are constructed as in (15). We compute in M1 [[x1 , y1∗ ]], y1m = (y1∗ + σ(S))m = σ(S)m + mσ(S)m−1 y1∗ + m(m − 1) σ(S)m−2 (y1∗ )2 + · · · 2! −ω0 (1)(R) γ0 = β + x1 Ω with 0 6= β ∈ M1 and Ω ∈ Sˆ1 . In Sˆ1 we have an expression v1 = (β + x1 Ω)(σ(S)m + mσ(S)m−1 y1∗ + (y1∗ )2 Λ) = βσ(S)m + βmσ(S)m−1 y1∗ + x1 Ω′ + (y1∗ )2 Λ′ for some Λ ∈ Sˆ1 , Ω′ , Λ′ ∈ Sˆ1 . Thus x1 , v1 − βσ(S)m are regular parameters in Sˆ1 , (and βσ(S)m = σ(R)). Hence if u1 , v1′ are regular parameters in R1 , then x1 , y1′ = v1′ are regular parameters in S1 , and we have an expression: u1 = γ1 xt11 v1′ = y1′ with γ1 a unit in S1 .  9 By iteration of Lemma 3.1 and (6), we obtain an infinite sequence .. .. . . ↑ ↑ R2 → S 2 ↑ ↑ R1 → S 1 ↑ ↑ R → S where each Ri has regular parameters ui , ṽi and each Si has regular parameters xi , ỹi such that ui = γi xtii , ṽi = ỹi where γi is a unit in Si . Let e = |Γν ∗ /Γν | and f = [Vν ∗ /mν ∗ : Vν /mν ]. If R → S is stable, then (19) ti = e and [Si /mSi : Ri /mRi ] = f for i ≥ 0. 4. Construction of a generating sequence in S from that of R In this section, we continue to have the assumptions of Section 3. We further assume that R → S is stable. Let P0 (R) = u, P1 (R) = v, P2 (R), . . . be a generating sequence in R, constructed by the algorithm of Theorem 4.2 [6]. Let P0 (S) = x, P1 (S) = y. Then we have that the t and t1 in Lemma 3.1 satisfy (20) t = |Γν ∗ /Γν | = t1 , and (21) [S/mS : R/mR ] = [Vν ∗ /mν ∗ : Vν /mν ] = [S1 /mS1 : R1 /mR1 ]. By the calculations in the previous section, we have that       b(R) −a(R) t 0 n1 (S) a(S) t1 ∗ (22) = . −ω0 (1)(R) n1 (R) 0 1 ω0 (1)(S) b(S) 0 m Taking determinants and using the fact that t1 = t gives t = tm so that m = 1. Multiplying (22) by   n1 (R) a(R) , ω0 (1)(R) b(R) we obtain (23) n1 (S) = n1 (R), ω0 (1)(S) = tω0 (1)(R). Since P1 (S)n1 (S) = P1 (R)n1 (R) , we can take U1 (S) to be U1 (R) = uω0 (1)(R) , so ω (1)(R) tω0 (1)(R) U1 (S) = uω0 (1)(R) = γ0 0 x 10 ω (1)(R) ω0 (1)(S) = γ0 0 x . ω (1)(R) That is, we take τ1 = γ0 0 in (7). Thus # " # " " # P1 (R)n1 (R) v n1 (R) P1 (S)n1 (S) = = α1 (S) = = α1 (R), U1 (S) U1 (R) uω0 (1)(R) with the notation of (8). We have that R1 /mR1 = R/mR [σ(R)] and S1 /mS1 = S/mS [σ(S)] (with notation of (12)). # " v n1 (R) = σ(R) α1 (R) = uω0 (1)(R) and α1 (S) = = h y n1 (R)  i  y n1 (R) = ω0 (1)(R) tω (1)(R) uω0 (1)(R) γ h 0n (S) ix 0 1 y −ω (1)(R) [γ0 ] 0 = [γ0 ]−ω0 (1)(R) σ(S). xω0 (1)(S) Thus R1 /mR1 = R/mR (α1 (R)) and S1 /mS1 = S/mS (α1 (R)). By (21), we have that [S1 /mS1 : S/mS ] = [R1 /mR1 : R/mR ] and thus d1 (S) = [S/mS (α1 (R)) : S/mS ] = [R/mR (α1 (R)) : R/mR ] = d1 (R), and the minimal polynomial f1S (z) of α1 (S) over S/mS is the minimal polynomial f1R (z) of α1 (R) over R/mR . Thus x, y = P1 (R), P2 (R) are the first terms of a generating sequence in S, obtained by the (modified) algorithm of Theorem 4.2 [6]. Proposition 4.1. Suppose that i ≥ 2 and P0 (S) = x, P1 (S) = y, P2 (S) = P2 (R), . . . , Pi (S) = Pi (R) are the first i + 1 terms of a generating sequence in S produced by the modified algorithm of Theorem 4.2 [6]. Then P0 (S) = x, P1 (S) = y, P2 (S) = P2 (R), . . . , Pi (S) = Pi (R), Pi+1 (S) = Pi+1 (R) are the first i + 2 terms of a generating sequence in S produced by the modified algorithm of Theorem 4.2 [6]. Proof. With the assumption, we have that for j ≤ i − 1, nj (S) = nj (R), αj (S) = αj (R), dj (S) = [S/mS (α1 (S), . . . , αj (S)) : S/mS (α1 (S), . . . , αj−1 (S))] = [R/mR (α1 (R), . . . , αj (R)) : R/mR (α1 (R), . . . , αj−1 (R))] = dj (R) and the minimal polynomial fjS (z) of αj (S) = αj (R) over S/mS (α1 (S), . . . , αj−1 (S)) is the minimal polynomial fjR (z) of αj (R) over R/mR (α1 (R), . . . , αj−1 (R)). Theorem 7.1 [6] produces a generating sequence Q0 (R1 ) = u1 , Q1 (R1 ), Q2 (R1 ), . . . in R1 from P0 (R), P1 (R), P2 (R), . . .. The generating sequence Q0 (R1 ) = u1 , Q1 (R1 ), Q2 (R1 ), . . . in R1 can be produced by the algorithm of Theorem 4.2 from the regular system of parameters u1 , Q1 (R1 ) in R1 (as shown in Theorem 7.1 [6] and recalled in (22) and (14)). Since R → S is stable, we have that (24) u1 = γ1 xt1 11 for some unit γ1 ∈ S1 , and recalling (23), we have that (25) ω0 (1)(S) = tω0 (1)(R). By the induction hypothesis applied to the stable map R1 → S1 , we have that x1 , Q1 (R1 ), . . . , Qi (R1 ) are the first i+1 terms of a generating sequence in S1 , produced by the modified algorithm of Theorem 4.2 [6] in S1 . For j ≥ 1, let nj (R1 ), Uj (R1 ), αj (R1 ), dj (R1 ), fjR1 (z) be the calculations of the algorithm of Theorem 4.2 [6] in R1 , obtained in the construction of the generating sequence Q0 (R1 ) = u1 , Q1 (R1 ), Q2 (R1 ), . . .. For j ≤ i, let nj (S1 ), Uj (S1 ), αj (S1 ), dj (S1 ), fjS1 (z) be the calculations of the modified algorithm of Theorem 4.2 [6] in S1 , obtained in the construction of the first i+ 1 terms of the generating sequence x1 , Q1 (R1 ), Q2 (R1 ), . . . , Qi (R1 ) in S1 . We have that for j ≤ i − 1, (26) nj (S1 ) = nj (R1 ), Uj (S1 ) = Uj (R1 ), αj (S1 ) = αj (R1 ), dj (S1 ) = dj (R1 ), fjS1 (u) = fjR1 (u). Since −ω0 (1)(R) Q0 (S1 )ω0 (1)(S) = Q0 (R1 )ω0 (1)(R) γ1 we have from (14) that for j ≤ i − 1, ω (1)(R)n1 (S)···nj (S) Qj (S1 ) = γ1 0 ω (1)(R)n1 (S)···nj (S) = γ1 0 , Pj+1 (S) Q0 (R1 )ω0 (1)(R)n1 (S)···nj (S) Qj (R1 ). For j ≤ i − 1, we have by (14) and (26), and then by (24) and (25), that ν ∗ (Qj (R1 )) = ν ∗ (Pj+1 (R)) − ω0 (1)(R)n1 (R) · · · nj (R)ν ∗ (u1 ) = ν ∗ (Pj+1 (R)) − n1 (R) · · · nj (R)ω0 (1)(S)ν ∗ (x1 ). Thus G(ν ∗ (x1 ), ν(Q1 (R)), . . . , ν(Qj (R))) = G(ν ∗ (x1 ), ν(P2 (R)), . . . , ν(Pj+1 (R))) = G(ν ∗ (x), ν ∗ (y), ν(P2 (R)), . . . , ν(Pj+1 (R))) = G(ν ∗ (x), ν(P1 (R)), . . . , ν(Pj+1 (R))) since G(ν ∗ (x1 )) = G(ν ∗ (x), ν ∗ (y)), as calculated before (55) in the proof of Theorem 7.1 [6]. Thus ni−1 (S1 ) = ni (S). We have that ni−1 (S1 ) = ni−1 (R1 ) by (26), and ni−1 (R1 ) = ni (R) by (55) and (54) in the proof of Theorem 7.1 [6]. Thus ni (S) = ni (R). In applying the modified algorithm of Theorem 4.2 [6] to extend x, P1 (R), . . . , Pi (R) to a generating sequence in S, we can thus take Ui (S) = Ui (R), and then # " # " Pi (R)ni (R) Pi (S)ni (S) = = αi (R). αi (S) = Ui (S) Ui (R) We have from (11) that y1 = n1 (R) y n1 (S) ω0 (1)(R) v ω (1)(R) = γ = γ0 0 v1 . 0 xω0 (1)(S) uω0 (1)(R) 12 Thus σ(S1 ) = [y1 ] = [γ0 ]ω0 (1)(R) [v1 ] = [γ0 ]ω0 (1)(R) α1 (R) in Vν ∗ /mν ∗ , and S1 /mS1 = S/mS [α1 (R)] and R1 /mR1 = R/mR [α1 (R)]. For 1 ≤ j ≤ i − 1, by (60) of [6], we have that αj (S1 ) = αj (R1 ) = α̂j (R1 ) = αj+1 (R)α1 (R)a(R)ω0 (i+1)(R)+b(R)ω1 (i+1)(R) . Thus di−1 (S1 ) = [S1 /mS1 (α1 (S1 ), . . . , αi−1 (S1 )) : S1 /mS1 (α1 (S1 ), . . . , αi−2 (S1 ))] = [S/mS (α1 (R), α2 (R), . . . , αi (R)) : S/mS (α1 (R), . . . , αi−1 (R))] = di (S) and di−1 (R1 ) = [R1 /mR1 (α1 (R1 ), . . . , αi−1 (R1 )) : R1 /mR1 (α1 (R1 ), . . . , αi−2 (R1 ))] = [R/mR (α1 (R), α2 (R), . . . , αi (R)) : R/mR (α1 (R), . . . , αi−1 (R))] = di (R). We thus have that di (S) = di (R) since di−1 (S1 ) = di−1 (R1 ) by (26). Thus the minimal polynomial fiS (z) of αi (S) = αi (R) over S/mS (α1 (R), . . . , αi−1 (R)) is the minimal polynomial fiR (z) of αi (R) over R/mR (α1 (R), . . . , αi−1 (R)). Thus we can take Pi+1 (S) = Pi+1 (R) in the modified algorithm of Theorem 4.2 [6].  We obtain the following theorem (Theorem 1.3 from the Introduction of this paper). Theorem 4.2 is proven by Ghezzi, Hà and Kashcheyeva in [7] when k is algebraically closed of characteristic zero. Theorem 4.2. Suppose that k is a field of characteristic zero, ν ∗ is a rational 0-dimensional valuation, n = 2 and R → S is stable. Then  gr ∗ (S) ∼ = gr (R) ⊗R/m S/mS [Z]/(Z e − [γ0 ]−1 [u]), ν ν R and the degree of the extension of quotient fields of gr ν (R) → grν ∗ (S) is ef . Proof. We have an inclusion of graded algebras grν (R) → grν ∗ (S). The classes [Pi (R)] for i ≥ 0 generate grν (R) as a grν (R)0 = R/mR -algebra and the classes [P0 (S)] and [Pi (R)] for i ≥ 1 generate grν ∗ (S) as a grν (S)0 = S/mS -algebra by Theorem 4.11 [6] and Proposition 4.1. We have the relation (27) [P0 (S)]t [γ0 ] = [P0 (R)] in grν ∗ (S). Further, (28) ni (R) = ni (S) for i ≥ 1 by Proposition 4.1. Since grν (R) ⊗R/mR S/mS → grν ∗ (S) is homogeneous, to verify that it is 1-1, it suffices to show that the homomorphism of S/mS -vector spaces (29) grν (R)λ ⊗R/mR S/mS → grν ∗ (S)λ is 1-1 for all λ ∈ S R (ν). By 2) of Theorem 4.2 [6], the set of all monomials (30) [P0 (R)]i0 [P1 (R)]i1 · · · [Pr (R)]ir such that r ∈ N, ik ∈ N, 0 ≤ ik < nk (R) for 1 ≤ k ≤ r and i0 ν(P0 (R)) + · · · + ir ν(Pr (R)) = λ 13 is an R/mR -basis of grν (R)λ , and the set of all (31) [P0 (S)]j0 [P1 (S)]j1 · · · [Ps (S)]js such that s ∈ N, jk ∈ N, 0 ≤ jk < nk (S) for 1 ≤ k ≤ s and j0 ν ∗ (P0 (S)) + · · · + js ν ∗ (Ps (S)) = λ is an S/mS -basis of grν ∗ (S)λ . By (27), (28), (30) and (31), we have that (29) is 1-1, so grν (R) ⊗R/mR S/mS → grν ∗ (S) is 1-1. We have established that [P0 (S)] generates grν ∗ (S) as a grν (R) ⊗R/mR S/mS -algebra and that the relation (27) holds. To establish that the conclusions of the theorem hold, we must show that if there is a relation (32) h0 + [P0 (S)]h1 + · · · + [P0 (S)]t−1 ht−1 = 0 in grν ∗ (S), with hi ∈ grν (R) ⊗R/mR S/mS , then h0 = h1 = · · · = ht−1 = 0. We may assume that each [P0 (S)]j hj is homogeneous of the same degree λ. Since R → S is stable, we have that t = [Γν ∗ : Γν ] and iν(P0 (S)) 6∈ Γν for 1 ≤ i ≤ t − 1. Thus there can be at most one nonzero expression in (32), so all terms are zero.  References [1] S. Abhyankar, On the Valuations centered in a Local Domain, Amer. J. Math., Vol 78., 1956. [2] S. Abhyankar, Ramification theoretic method in Algebraic Geometry, Princeton University Press, Princeton, New Jersey, 1959. [3] S.D. Cutkosky, Local factorization and monomialization of morphisms, Astérisque 260, 1999. [4] S.D. Cutkosky and O. Piltant, Ramification of valuations, Advances in Math. 183 (2004), 1-79. [5] S.D. Cutkosky and B. Teissier, Semigroups of valuations on local rings, Mich. Math. J. 57 (2008), 173 - 193. [6] S.D. Cutkosky and Pham An Vinh, Valuation semigroups of two dimensional local rings, to appear in the Proceedings of the London Math. Soc. [7] L. Ghezzi, Huy Tài Hà and O. Kashcheyeva, Toroidalization of generating sequences in dimension two function fields, J. Algebra 301 (2006) 838-866. [8] L. Ghezzi and O. Kashcheyeva, Toroidalization of generating sequences in dimension two function fields of positive characteristic, J. Pure and Applied Algebra 209 (2007), 631 - 649. [9] H. Knaf and F.-V. Kuhlmann, Abhyankar places admit local uniformization in any characteristic, Ann. Scient. Ec. Norm. Sup 30 (2005), 833 - 846. [10] B. Teissier, Valuations, Deformations and Toric geometry, Proceedings of the Saskatoon Conference and Workshop on Valuation Theory, Volume II, F.-V. Kuhlmann, S. Kuhlmann, M. Marshall (Eds.), Fields Inst. Comm. 33, AMS 2003. [11] B. Teissier, Overweight deformations of affine toric varieties and local uniformization, preprint. [12] O. Zariski and P. Samuel, Commutative Algebra, Volume 2, Van Nostrand, Princeton, New Jersey, 1960. Steven Dale Cutkosky, Department of Mathematics, University of Missouri, Columbia, MO 65211, USA E-mail address: [email protected] Pham An Vinh, Department of Mathematics, University of Missouri, Columbia, MO 65211, USA E-mail address: [email protected] 14
0math.AC
JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 1 RESIDE: A Benchmark for Single Image Dehazing arXiv:1712.04143v1 [cs.CV] 12 Dec 2017 Boyi Li*, Wenqi Ren*, Member, IEEE, Dengpan Fu, Dacheng Tao, Fellow, IEEE, Dan Feng, Member, IEEE, Wenjun Zeng, Fellow, IEEE and Zhangyang Wang, Member, IEEE. Abstract—In this paper, we present a comprehensive study and evaluation of existing single image dehazing algorithms, using a new large-scale benchmark consisting of both synthetic and real-world hazy images, called REalistic Single Image DEhazing (RESIDE). RESIDE highlights diverse data sources and image contents, and is divided into five subsets, each serving different training or evaluation purposes. We further provide a rich variety of criteria for dehazing algorithm evaluation, ranging from full-reference metrics, to no-reference metrics, to subjective evaluation and the novel task-driven evaluation. Experiments on RESIDE sheds light on the comparisons and limitations of stateof-the-art dehazing algorithms, and suggest promising future directions. Index Terms—Dehazing, Detection, Dataset, Evaluations. While some earlier works consider multiple images from the same scene to be available for dehazing [2], [3], [4], [5], the single image dehazing proves to be a more realistic setting in practice, and thus gained the dominant popularity. The atmospheric scattering model has been the classical description for the hazy image generation [6], [7], [8]: I (x) = J (x) t (x) + A (1 − t (x)) , (1) where I (x) is observed hazy image, J (x) is the hazefree scene radiance to be recovered. There are two critical parameters: A denotes the global atmospheric light, and t (x) is the transmission matrix defined as: t (x) = e−βd(x) , (2) I. I NTRODUCTION A. Problem Description: Single Image Dehazing Images captured in outdoor scenes often suffer from poor visibility, reduced contrasts, fainted surfaces and color shift, due to the presence of haze. Caused by aerosols such as dust, mist, and fumes, the existence of haze adds complicated, nonlinear and data-dependent noise to the images, making the haze removal (a.k.a. dehazing) a highly challenging image restoration and enhancement problem. Moreover, many computer vision algorithms can only work well with the scene radiance that is haze-free. However, a dependable vision system must reckon with the entire spectrum of degradations from unconstrained environments. Taking autonomous driving for example, hazy and foggy weather will obscure the vision of on-board cameras and create confusing reflections and glare, leaving state-of-the-art self-driving cars in struggle [1]. Dehazing is thus becoming an increasingly desirable technique for both computational photography and computer vision tasks, whose advance will immediately benefit many blooming application fields, such as video surveillance and autonomous/assisted driving. Boyi Li and Dan Feng are with the Wuhan National Laboratory for Optoelectronics, Huazhong University of Science and Technology, Wuhan, China. Email: [email protected], [email protected]. Wenqi Ren is with State Key Laboratory of Information Security, Institute of Information Engineering, Chinese Academy of Sciences. Email: [email protected]. Dengpan Fu is with Department of Electronic Engineering and Information Science, University of Science and Technology of China. Email: [email protected]. Dacheng Tao is with the Centre for Quantum Computation and Intelligent Systems and the Department of Engineering and Information Technology, University of Technology Sydney, Sydney, NSW 2007, Australia. Email: [email protected]. Wenjun Zeng is with Microsoft Research, Beijing, China. Email: [email protected]. Zhangyang Wang is with the Department of Computer Science and Engineering, Texas A&M University, USA, and is the corresponding author. Email: [email protected] The first two authors contribute equally. where β is the scattering coefficient of the atmosphere, and d (x) is the distance between the object and the camera. We can re-write the model (1) for the clean image as the output: 1 1 J (x) = I (x) − A + A. (3) t (x) t (x) Most state-of-the-art single image dehazing methods exploit the physical model (1), and estimate the key parameters A and t (x) in either physically grounded or data-driven ways. The performance of the top methods have continuously improved [9], [10], [11], [12], [13], [14], especially after the latest models embracing deep learning [15], [16], [17]. B. Existing Methodology: An Overview Given the atmospheric scattering model, most dehazing methods follow a similar three-step methodology: (1) estimating the transmission matrix t (x) from the hazy image I (x); (2) estimating A using some other (often empirical) methods; (3) estimating the clean image J (x) via computing (3). Usually, the majority of attention is paid to the first step, which can rely on either physically grounded priors or fully data-driven approaches. A noteworthy portion of dehazing methods exploited natural image priors and depth statistics. [18] imposed locally constant constraints of albedo values together with decorrelation of the transmission in local areas, and then estimated the depth value using the albedo estimates and the original image. It did not constrain the scenes depth structure, thus often leads to the inaccurate estimation of color or depth. [19], [20] discovered the dark channel prior (DCP) to more reliably calculate the transmission matrix, followed by many successors. However, the prior is found to be unreliable when the scene objects are similar to the atmospheric light [16]. [11] enforced the boundary constraint and contextual regularization for sharper restorations. [13] developed a color attenuation prior and JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 created a linear model of scene depth for the hazy image, and then learned the model parameters in a supervised way. [21] jointly estimated scene depth and recover the clear latent image from a foggy video sequence. [14] proposed a non-local prior, based on the assumption that each color cluster in the clear image became a haze-line in RGB space. In view of the prevailing success of Convolutional Neural Networks (CNNs) in computer vision tasks, several dehazing algorithms have relied on various CNNs to directly learn t (x) fully from data, in order to avoid the often inaccurate estimation of physical parameters from a single image. DehazeNet [15] proposed a trainable model to estimate the transmission matrix from a hazy image. [16] came up with a multi-scale CNN (MSCNN), that first generated a coarsescale transmission matrix and gradually refined it. Despite their promising results, the inherent limitation of training data is becoming a increasingly severe obstacle for this booming trend: see Section 2.1 for more discussions. Besides, a few efforts have been made beyond the suboptimal procedure of separately estimating parameters, which will cause accumulated or even amplified errors, when combining them together to calculate (3). They instead advocate simultaneous and unified parameter estimation. Earlier works [22], [23] modeled the hazy image with a factorial Markov random field, where t (x) and A were two statistically independent latent layers. Another line of researches [24], [25] try to make use of Retinux theory to approximate the spectral properties of object surfaces by the ratio of the reflected light. Very recently, [17] presented a re-formulation of (2) to integrate t (x) and A into one new variable. As a result. their CNN dehazing model was fully end-to-end: J (x) was directly generated from I (x), without any intermediate parameter estimation step. The idea was later extended to video dehazing in [26]. C. Our Contribution Despite the prosperity of single image dehazing algorithms, there have been two key hurdles to the further development of this field: (1) there has been no large-scale, realistic benchmark dataset so far for image dehazing; (2) current metrics for evaluating and comparing image dehazing algorithms are neither convincing nor sufficient. Detailed discussions will be presented in Section 2. This paper is directly motivated to overcome the above two hurdles, and makes three-fold technical contributions: • We introduce the first-of-its-kind benchmark, called the Realistic Single Image Dehazing (RESIDE) dataset. An overview of RESIDE could be found in Tables I, II, and image examples are displayed in Figure 1. Compared with exiting synthetic training and testing sets of unrealistic indoor scenes, the RESIDE dataset includes a large diversity of both indoor and outdoor scene images for training, as well as real-world hazy images in addition to synthetic ones for evaluation. Specially, we annotate a set of 4,322 real-world hazy images with object bounding boxes. • We bring in an innovative set of evaluation strategies in accordance with the new RESIDE dataset. Besides 2 TABLE I OVERVIEW OF RESIDE: DATA SOURCES AND CONTENTS Type Synthetic Indoor Hazy Images Synthetic Outdoor Hazy Images Realistic Hazy Images (Unannotated) Realistic Annotated Hazy Images Number 110,500 313,950 4,807 4,322 the widely adopted PSNR and SSIM, we further employ both no-reference metrics and human subjective scores to evaluate the dehazing results, especially for real-world hazy images without clean groundtruth. More importantly, we recognize that image dehazing in practice usually serves as the preprocessing step for mid-level and high-level vision tasks. We thus propose to exploit the object detection performance on the dehazed images as a brand-new “task-specific” evaluation criterion for dehazing algorithms. • We conduct an extensive and systematic range of experiments to quantitatively compare nine state-of-the-art single image dehazing algorithms, using the new RESIDE dataset and the proposed variety of evaluation criteria. Our evaluation and analysis demonstrate the performance and limitations of state-of-the-art algorithms. The findings from these experiments not only confirm what is commonly believed, but also suggest new research directions in single image dehazing. The RESIDE dataset will been made publicly available soon for research purposes on our project’s website1 . The manuscript will be periodically updated to include more benchmarking results. II. DATASET AND E VALUATION : S TATUS Q UO A. Training Data Many image restoration and enhancement tasks benefit from the continuous efforts for standardized benchmarks to allow for comparison of different proposed methods under the same conditions, such as [27], [28]. In comparison, a common large-scale benchmark has been long missing for dehazing, owing to the significant challenge in collecting or creating realistic hazy images with clean groundtruth references. It is generally impossible to capture the same visual scene with and without haze, while all other environment conditions stay identical. Therefore, recent dehazing models [29], [30] typically generate their training sets by creating synthetic hazy images from clean ones: they first obtain depth maps of the clean images, by either utilizing available depth maps for depth image datasets, or estimating the depth [31]; and then generate the hazy images by computing (1). Data-driven dehazing models could then be trained to regress clean images from hazy ones. Fattal’s dataset [29] provided 12 synthetic images. FRIDA [32] produced a set of 420 synthetic images, for evaluating the performance of automatic driving systems in various hazy environments. Both of them are too small to train effective 1 https://sites.google.com/site/boyilics/website-builder/reside JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 3 (a) ITS (b) OTS (c) SOTS (d) RTTS (e) HSTS. Top row: 10 synthetic hazy images; Bottom row: 10 realistic hazy images. Fig. 1. Example images from the five sets in RESIDE (see Table II). TABLE II S TRUCTURE OF RESIDE: FIVE SUBSETS FOR TRAINING AND TESTING Subset Indoor Training Set (ITS) Outdoor Training Set (OTS) Synthetic Objective Testing Set (SOTS) Real-world Task-driven Testing Set (RTTS) Hybrid Subjective Testing Set (HSTS) Number 110,000 313,950 1,000 4,322 20 dehazing models. To form large-scale training sets, [16], [17] used the ground-truth images with depth meta-data from the indoor NYU2 Depth Database [33] and the Middlebury stereo database [34]. Recently, [30] generated Foggy Cityscapes dataset with 20,550 images from the Cityscapes dataset, using incomplete depth information. Despite their positive driving effects in the development of dehazing algorithms, those synthetic images for training have inevitably brought in two limitations. On the one hand, many depth image datasets used to generate synthetic images, e.g, [33], [34], are collected from indoor scenes, while dehazing is applied to outdoor environments. The content of training data thus significantly diverges from the target subjects in real dehazing applications. Such a mismatch will undermine the practical effectiveness of the trained dehazing models. On the other hand, while a limited number of of outdoor datasets [35], [30] have been utilized, their depth information is either incomplete or inaccurate, often leading to unrealistic hazy images and artifacts during synthesis. JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 4 B. Testing Data and Evaluation Criteria The testing sets in use are mostly synthetic hazy images with known groundtruth too, although some algorithms were also visually evaluated on real hazy images [16], [15], [17]. With multiple dehazing algorithms available, it becomes pivotal to find appropriate evaluation criteria to compare their dehazing results. Most dehazing algorithms rely on the fullreference PSNR and SSIM metrics, with assuming a synthetic testing set with known clean groundtruth too. As discussed above, their practical applicability may be in jeopardy even a promising testing performance is achieved, due to the large content divergence between synthetic and real hazy images. To objectively evaluate dehazing algorithms on real hazy images without reference, no-reference image quality assessment (IQA) models [36], [37], [38] are possible candidates. [39] tested a few no-reference objective IQA models among several dehazing approaches on their self-collected set of 25 hazy images, but did not compare any latest CNN-based dehazing models. PSNR/SSIM, as well as other objective metrics, often align poorly with human perceived visual qualities [39]. Many papers visually display dehazing results, but the result differences between state-of-the-art dehazing algorithms are often too subtle for people to reliably judge. That suggests the necessity of conducting a subjective user study, towards which few efforts have been made so far [40], [39]. It has been recognized that the performance of high-level computer vision tasks, such as object detection and recognition, will deteriorate in the presence of various degradations, and is thus largely affected by the quality of image restoration and enhancement. Dehazing could be used as pre-processing for many computer vision tasks executed in the wild, and the resulting task performance could in turn be treated as an indirect indicator of the dehazing quality. Such a “task-driven” evaluation way has received little attention so far, despite its great implications for outdoor applications. A relevant preliminary effort was presented in [17], where the authors compared a few CNN-based dehazing models by placing them in an object detection pipeline, but their tests were on synthetic hazy data with bounding boxes. [30] created a dataset of 101 real-world images depicting foggy driving scenes, which came with ground truth annotations for evaluating semantic segmentation and object detection. Besides being relatively small, their dataset cannot be used for evaluating dehazing perceptual quality, either objectively or subjectively . Fig. 2. Visual comparison between the synthetic hazy images directly generated from Make3D and from OTS. The first and second rows are the synthesized hazy images based on the Make3D dataset and our OTS, respectively. We propose the REalistic Single Image DEhazing (RESIDE) dataset, a new large-scale dataset for benchmarking single image dehazing algorithms. RESIDE is built to be comprehensive and diverse in data sources (synthetic versus real world), contents (indoor versus outdoor scenes), and evaluation options (see Section 4 for details). synthetic images but from distinct sources and synthesis ways. ITS contains 110, 000 synthetic hazy images, generated using images from existing indoor depth datasets such as NYU2 [33] and Middlebury stereo [34]. An optional split of 100, 000 for training and 10,000 for validation is provided. OTS contains 313,950 images synthesized from collected real world outdoor scenes [41], without depth information. We use [31] to estimate the depth map for each image, with which we synthesize outdoor hazy images. For generating both synthetic sets, We set different atmospheric lights A, by choosing each channel uniformly between [0.6, 1.0], and select β ∈ {0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6}. Both ITS and OTS thus contains paired clean and hazy images, where a clean groundtruth image can leads to multiple pairs whose hazy images are generated under different parameters A and β. One straightforward option would be to utilize a few existing depth datasets collected from outdoor scene such as Make3D [35] and KITTI [42]. However, the outdoor depth maps tend to be very unreliable. Due to the limitations of RGB-based depth cameras, the Make3D dataset suffer from at least 4 meters of average root mean squared error in the predicted depths, and the KITTI dataset has at least 7 meters of average error [43]. In comparison, the average depth errors in indoor datasets, e.g., NYU-Depth-v2 [33], are usually as small as 0.5 meter. For the outdoor depth maps can also contain a large amount of artifacts and large holes, which renders it inappropriate for direct use in haze simulation. In comparison, [31] is observed to produce more accurate depth maps and lead to artifact-free hazy images. Visual comparisons between the synthetic hazy images directly generated from Make3D [35] and from OTS are included in Figure 2. Another possible alternative is to adopt recent approaches of depth map denoising and in-painting [44], which we leave for future exploration. A. RESIDE Training Set B. RESIDE Testing Set The REISDE training set consists of Indoor Training Set (ITS) and Outdoor Training Set (OTS), both of which are The REISDE testing set is composed of three components: Synthetic Objective Testing Set (SOTS), Real-world Task- III. A N EW DATASET: RESIDE JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 5 TABLE III D ETAILED CLASSES INFORMATION OF RTTS. Category Normal Difficult Total person 7,950 3,416 11,366 bicycle 534 164 698 car 18,413 6,904 25,317 bus 1,838 752 2,590 motorbike 862 370 1,232 Total 29,597 11,606 41,203 driven Testing Set (RTTS), and the Hybrid Subjective Testing Set (HSTS), each corresponding to a different evaluation viewpoint. SOTS selects 500 indoor images from NYU2 [33] and 500 outdoor scenes from internet (non-overlapping with images in ITS and OTS), and follow the same process as ITS to synthesize hazy images. We specially create challenging dehazing cases for testing, e.g., white scenes added with heavy haze. HSTS picks 10 synthetic outdoor hazy images generated in the same way as OTS, together with 10 real-world hazy images, combined for human subjective review. RTTS collects 4, 322 real-world hazy images crawled from the web, covering mostly traffic and driving scenarios. Each image is annotated with object categories and bounding boxes, and RTTS is organized in the same form as VOC2007 [45]. We currently focus on five traffic-related categories: car, bicycle, motorbike, person, bus. We obtain 41, 203 annotated bounding boxes, 11, 606 of which are marked as “difficult” and not used in this paper’s experiments. The class details of RTTS are show in III. Additionally, we also collect 4,807 unannotated real-world hazy images, which are not exploited in this paper, but may potentially be used for domain adaption in future, etc. IV. A N EW M INDSET FOR D EHAZING E VALUATION A. From Full-Reference to No-Reference Despite the popularity of the full-reference PSNR/SSIM metrics for evaluating dehazing algorithms, they are inherently limited due to the unavailability of clean groundtruth images in practice, as well as their often poor alignment with human perception quality [39]. We thus refer to two no-reference IQA models: spatialspectral entropy-based quality (SSEQ) [38], and blind image integrity notator using DCT statistics (BLIINDSII) [37], to complement the shortness of PSNR/SSIM. Note that the score of SSEQ and BLIINDS2 used in [38] and [37] are range from 0 (best) to 100 (worst), and we reverse the score to make the correlation consistent to full-reference metrics. We will apply PSNR, SSIM, SSEQ, and BLIINDS-II, to the dehazed results on SOTS, and examine how consistent their resulting ranking of dehazing algorithms will be. We will also apply the four metrics on HSTS (PSNR and SSIM are only computed on the 10 synthetic images), and further compare those objective measures with subjective ratings. B. From Objective to Subjective [39] investigated various choices of full-reference and noreference IQA models, and found them to be limited in predicting the quality of dehazed images. We then conduct a subjective user study on the quality of dehazing results produced by different algorithms, from which we gain more useful observations. Groundtruth images are also included when they are available as references. In the previous survey [39] a participant scored each dehazing result image with an integer from 1 to 10 that best reflects its perceptual quality. We make two important innovations: (1) asking participants to give pairwise comparisons rather than individual ratings, the former often believed to be more robust and consistent in subjective surveys; (2) decomposing the perceptual quality into two dimensions: the dehazing Clearness and Authenticity, the former defined as how thoroughly the haze has been removed, and the latter defined as how realistic the dehazed image looks like. Such two disentangled dimensions are motivated by our observations that some algorithms produce naturally-looking results but are unable to fully remove haze, while some others remove the haze at the price of unrealistic visual artifacts. During the survey, each participant is shown a set of dehazed result pairs obtained using two different algorithms for the same hazy image. For each pair, the participant needs to decide which one is better than the other in terms of clearness, and then which one is better for Authenticity. The image pairs are drawn from all the competitive methods randomly, and the images winning the pairwise comparison will be compared again in the next round, until the best one is selected. We fit a Bradley-Terry [46] model to estimate the subjective scores for each dehazing algorithm so that they can be ranked. More details on the subjective survey are included in the supplementary. C. From Signal-Level to Task-Driven Since dehazed images are often subsequently fed for automatic semantic analysis tasks such as recognition and detection, we argue that the optimization target of dehazing in these tasks is neither pixel-level or perceptual-level quality, but the utility of the dehazed images in the given semantic analysis task [47]. We thus propose the task-driven evaluation for dehazing algorithms, and study the problem of object detection in the presence of haze as an example. We notice that [30] investigated detection and segmentation problems in hazy images as well, but not for the dehazing evaluation purpose. Specially, we used the same pre-trained Faster R-CNN [48] model to detect the objects of interests, from the dehazed results of RTTS by various algorithms, and rank all algorithms via the mean Average Precision (mAP) achieved. V. E XPERIMENTAL C OMPARISON Based on the rich resources provided by RESIDE, we evaluate 9 representative state-of-the-art algorithms: Dark-Channel Prior (DCP) [9], Fast Visibility Restoration (FVR) [10], Boundary Constrained Context Regularization (BCCR) [11], Artifact Suppression via Gradient Residual Minimization (GRM) [12], Color Attenuation Prior (CAP) [13], Non-local Image Dehazing (NLD) [14], DehazeNet [15], Multi-scale CNN (MSCNN) [16], and All-in-One Dehazing Network (AOD-Net) [17]. The last three belong to the latest CNN-based dehazing algorithms. For all data-driven algorithms, they are trained on the entire RESIDE training set: ITS + OTS. JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 6 TABLE IV AVERAGE FULL - AND NO - REFERENCE EVALUATIONS RESULTS OF DEHAZED RESULTS ON SOTS. DCP [9] FVR [10] BCCR [11] PSNR SSIM SSEQ BLIINDS-II 18.87 0.7935 64.94 74.41 18.02 0.7256 67.75 76.13 17.87 0.7701 65.83 65.45 PSNR SSIM SSEQ BLIINDS-II 18.54 0.7100 83.59 89.12 16.61 0.7236 82.87 86.72 17.71 0.7409 83.04 89.43 GRM [12] CAP [13] NLD [14] DehazeNet [15] 500 synthetic indoor images in SOTS 20.44 21.31 18.53 22.66 0.8233 0.8247 0.7018 0.8325 63.30 64.69 67.46 65.46 66.67 73.41 74.85 71.71 500 synthetic outdoor images in SOTS 20.77 23.95 19.52 26.84 0.7617 0.8692 0.7328 0.8264 76.18 81.74 84.10 81.65 82.98 85.93 86.32 83.60 MSCNN [16] AOD-Net [17] 20.01 0.7907 65.22 74.49 21.01 0.8372 67.65 78.94 21.73 0.8313 81.46 86.72 24.08 0.8726 84.13 87.43 TABLE V AVERAGE SUBJECTIVE SCORES , AS WELL AS FULL - AND NO - REFERENCE EVALUATIONS RESULTS , OF DEHAZING RESULTS ON HSTS. DCP [9] FVR [10] BCCR [11] GRM [12] Clearness Authenticity PSNR SSIM SSEQ BLIINDS-II 1.26 0.78 17.27 0.7210 86.15 90.70 0.18 0.14 15.68 0.7157 85.68 87.65 0.62 0.50 16.61 0.6947 85.60 91.05 0.75 0.95 20.48 0.7631 78.43 82.30 Clearness Authenticity SSEQ BLIINDS-II 0.39 0.17 68.65 69.35 0.46 0.20 67.75 72.10 0.45 0.18 66.63 68.55 0.75 0.62 70.19 79.60 CAP [13] NLD [14] Synthetic images 0.50 1 0.86 1 22.88 18.92 0.8223 0.7411 85.32 86.28 85.75 85.30 Real-world images 1 0.54 1 0.15 67.67 67.96 63.55 70.80 A. Objective Comparison on SOTS We first compare the dehazed results on SOTS using two full-reference (PSNR, SSIM) and two no-reference metrics (SSEQ, BLIINDS-II). Table IV displays the detailed scores of each algorithm in terms of each metric.2 In general, since learning-based methods [15], [13], [16], [17] are optimized by directly minimizing the MSE loss between output and ground truth pairs or maximizing the likelihood on large-scale data, they clearly outperform earlier algorithms based on natural or statistical priors [9], [11], [10], [12], [14], in terms of PSNR and SSIM. Especially, for both indoor and outdoor synthetic images, DehazeNet [15] achieves the highest PSNR value and AOD-Net [17] obtains the best SSIM score, while CAP [13] obtains the suboptimal PSNR and SSIM on indoor and outdoor images, respectively. However, when it comes to no-reference metrics, the results become less consistent. AOD-Net [17] still maintains competitive performance by obtaining the best BLIINDS-II result on indoor images, and the best SSEQ result on outdoor images. On the other hand, several prior-based methods, such as DCP [9], FVR [10], BCCR [11] and NLD [14], also show competitiveness: FVR [10] ranks first in term of SSEQ on indoor images, and BCCR [11] wins on outdoor images in term of BLIINDS-II. We visually observe the results, and find that DCP [9], BCCR [11] and NLD [14] tend to produce sharp edges and highly contrasting colors, which explains why they are preferred by BLIINDS-II and SSEQ. Such an inconsistency between full- and no-reference evaluations aligns with the 2 We highlight the top-3 performances using red, cyan and blue, respectively. DehazeNet [15] MSCNN [16] AOD-Net [17] 0.29 1.94 26.94 0.8758 86.01 87.15 1.22 0.54 20.53 0.7893 85.56 88.70 0.86 1.41 23.41 0.8616 86.75 87.50 1.16 1.03 68.34 60.35 1.29 1.27 68.44 62.65 1.05 1.07 70.05 74.75 previous argument [39] that existing objective objective IQA models are very limited in providing proper quality predictions of dehazed images. B. Subjective Comparison on HSTS We recruit 100 participants from different educational backgrounds for the subjective survey as described in Section 4.2, using HSTS which contains 10 synthetic outdoor and 10 realworld hazy images. We fit a Bradley-Terry [46] model to estimate the subjective score for each method so that they can be ranked. In the Bradley-Terry model, the probability that an object X is favored over Y is assumed to be p(X  Y ) = esX 1 = , s s X Y e +e 1 + esY −sX (4) where sX and sY are the subjective scores for X and Y . The scores s for all the objects can be jointly estimated by maximizing the log likelihood of the pairwise comparison observations:   X 1 , (5) max wij log s 1 + esj −si i,j where wij is the (i, j)-th element in the winning matrix W, representing the number of times when method i is favored over method j. We use the Newton-Raphson method to solve Eq. (5). Note that for a synthetic image, we have a 10 × 10 winning matrix W, including the ground truth and nine dehazing methods results. For a real-world image, its winning matrix W is 9 × 9 due to the absence of ground truth. For JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 synthetic images, we set the score for ground truth method as 1 to normalization scores. Figures 4 and 5 show qualitative examples of dehazed results on a synthetic and a real-world image, respectively. Quantitative results can be found in Table V and the trends are visualized in Figure 3. We also compute the full- and no-reference metrics on synthetic images to examine their consistency with the subjective scores. A few interesting observations could be drawn: • • • The subjective qualities of various algorithms’ results show different trends on synthetic and real hazy images. On the 10 synthetic images of HSTS, DCP [9] receives the best clearness score and DehazeNet the best in authenticity score. On the 10 real images, CNNbased methods [15], [16], [17] rank top-3 in terms of both clearness and authenticity, in which MSCNN [16] achieves the best according to both scores. The clearness and authenticity scores of the same image are often not aligned. As can be seen from Figure 3, the two subjective scores are hardly correlated on synthetic images; their correlation shows better on real images. That reflects the complexity and multi-facet nature of subjective perceptual evaluation. From Table V, we observe the divergence between subjective and objective (both full- and no-reference) evaluation results. For the best performer in subjective evaluation, MSCNN [16], its PSNR/SSIM results on synthetic indoor images are quite low, while SSEQ/BLIINDS-II on both synthetic and outdoor images are moderate. As another example, GRM [12] receives the highest SSEQ/BLIINDS-II scores on real HSTS images. However both of its subjective scores rank only fifth among nine algorithms on the same set. C. Task-driven Comparison on RTTS We adopt the commonly used Faster R-CNN [48]3 , and use the same fixed model to detect objects from the dehazed results, over the RTTS images. Figure 6 compares the object detection results on an RTTS hazy image and after applying nine different dehazing algorithms4 . Table VI compares all mAP results, from which we can see that BCCR [11] and MSCNN [16] are two best performers, implying that both traditional and CNN-based methods have good potential to contribute to object detection. On the other hand, if comparing the ranking of detection mAP with the no-reference results on the same set, we can again only observe a weak correlation. For example, BCCR [11] achieves highest BLIINDS-II value, but MSCNN has lower SSEQ and BLIINDS-II scores than most competitors. That manifests the necessity of evaluating in a task-driven way. Discussion: Optimizing Detection Performance in Haze? [17] for the first time reported the promising performance on 7 TABLE VI D ETECTION RESULTS ON RTTS. RawHaze DCP [9] FVR [10] BCCR [11] GRM [12] CAP [13] NLD [14] DehazeNet [15] MSCNN [16] AOD-Net [17] mAP 0.38 0.41 0.35 0.42 0.29 0.40 0.40 0.41 0.41 0.37 Person 0.61 0.62 0.58 0.62 0.50 0.61 0.61 0.61 0.61 0.61 Bicycle 0.41 0.41 0.39 0.45 0.31 0.40 0.40 0.41 0.42 0.40 Car 0.35 0.42 0.35 0.43 0.26 0.42 0.42 0.42 0.43 0.35 Bus 0.21 0.24 0.19 0.25 0.15 0.25 0.24 0.25 0.25 0.21 Motorbike 0.30 0.34 0.25 0.34 0.22 0.30 0.33 0.34 0.36 0.30 detecting objects in the haze, by concatenating and jointly tuning AOD-Net with Faster-RCNN as one unified pipeline, following [49], [50]. The authors trained their detection pipeline using an annotated dataset of synthetic hazy images, generated from VOC2007 [45]. Due to the absence of annotated realistic hazy images, they only reported quantitative performance on a separate set of synthetic annotated images. While their goal is different from the scope of RTTS (where a fixed FasterRCNN is applied on dehazing results for fair comparison), we are interested to explore whether we could further boost the detection mAP on RTTS realistic hazy images using such a joint pipeline. In order for further enhancing the performance of such a dehazing + detection joint pipeline in realistic hazy photos or videos, there are at least two other noteworthy potential options as we can see for future efforts: • Developing photo-realistic simulation approaches of generating hazy images from clean ones [51], [52]. That would resolve the bottleneck of handle-labeling and supply large-scale annotated training data with little mismatch. The technique of haze severity estimation [53] may also help the synthesis, by first estimating the haze level from (unannotated) testing images and then generating training images accordingly. • If we view the synthetic hazy images as the source domain (with abundant labels) and the realistic ones as the target domain (with scarce labels), then the unsupervised domain adaption can be performed to reduce the domain gap in low-level features, by exploiting unannotated realistic hazy images. For example, [54] provided an example of pre-training the robust low-level CNN filters using unannotated data from both source and target domains, leading to much improved robustness when applied to testing on the target domain data. For this purpose, Vwe have included 4,322 unannotated realistic hazy images in RESIDE that might help build such models. Apparently, the above discussions can be straightforwardly applied to other high-level vision tasks in uncontrolled outdoor environments (e.g., bad weathers and poor illumination), such as tracking, recognition, semantic segmentation, etc. D. Running Time 3 Here we used py-faster-rcnn and its VGG16 based model trained on VOC2007 trainval dataset. 4 For FVR, only 3,966 images are counted, since for the remaining 356 FVR fails to provide any reasonable result. Table VIII reports the per-image running time of each algorithm, averaged over the synthetic indoor images (620 × 460) in SOTS, using a machine with 3.6 GHz CPU and 16G RAM. JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 8 Fig. 3. Averaged clearness and authenticity scores: (a) on 10 synthetic images in HSTS; and (b) on real-world images in HSTS. (b) Hazy Image (d) FVR (f) GRM (h) NLD (j) MSCNN (c) DCP (e) BCCR (g) CAP (i) DehazeNet (k) AOD-Net (a) Clean Image Fig. 4. Examples of dehazed results on a synthetic hazy image from HSTS. TABLE VII AVERAGE NO - REFERENCE METRICS OF DEHAZED RESULTS ON RTTS. SSEQ BLIINDS-II DCP [9] 62.87 68.34 FVR [10] 63.59 67.68 BCCR [11] 63.31 74.07 GRM [12] 58.64 54.54 CAP [13] 60.66 65.15 NLD [14] 59.37 68.32 DehazeNet [15] 60.01 52.54 MSCNN [16] 62.31 56.59 AOD-Net [17] 65.35 71.05 TABLE VIII C OMPARISON OF AVERAGE PER - IMAGE RUNNING TIME ( SECOND ) ON SYNTHETIC INDOOR IMAGES IN SOTS. Time DCP [9] 1.62 FVR [10] 6.79 BCCR [11] 3.85 GRM [12] 83.96 CAP [13] 0.95 All methods are implemented in MATLAB, except AOD-Net by Pycaffe. However, it is fair to compare AOD-Net with other methods since MATLAB implementation has superior efficiency than Pycaffe as shown in [17]. AOD-Net shows a clear advantage over others in efficiency, thanks to its lightweight feed-forward structure. NLD [14] 9.89 DehazeNet [15] 2.51 MSCNN [16] 2.60 AOD-Net [17] 0.65 VI. C ONCLUSIONS AND F UTURE W ORK In this paper, we propose the RESIDE benchmark and systematically evaluate the state-of-the-arts in single image dehazing. From the results presented, there seems to be no singlebest dehazing model for all criteria: AOD-Net and DehazeNet are favored by PSNR and SSIM; DCP, FVR and BCCR are kore competitive in terms of no-reference metrics; MSCNN shows to have the most appreciated subjective quality; BCCR JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 9 (a) Hazy Image (c) FVR (e) GRM (g) NLD (i) MSCNN (b) DCP (d) BCCR (f) CAP (h) DehazeNet (j) AOD-Net Fig. 5. Examples of dehazed results on a real-world hazy image from HSTS. and MSCNN lead to superior detection performance on real hazy images; and finally AOD-Net is the most efficient among all. We see the highly complicated nature of the dehazing problem, in both real-world generalization and evaluation criteria. For future research, we advocate to be evaluate and optimize dehazing algorithms towards more dedicated cafeterias (e.g., subjective visual quality, or high-level target task performance), rather than solely PSNR/SSIM, which are found to be poorly aligned with other metrics we used. In particular, correlating dehazing with high-level computer vision problems will likely lead to innovative robust computer vision pipelines that will find many immediate applications. Another blank to fill is developing no-reference metrics that are better correlated with human perception, for evaluating dehazing results. That progress will accelerate the needed shift from current fullreference evaluation on only synthetic images, to the more realistic evaluation schemes with no ground truth. ACKNOWLEDGEMENT We appreciate the support from the authors of [14], [18]. We acknowledge Dr. Changxing Ding, South China University of Technology, for his indispensible support to our data collection and cleaning. R EFERENCES [1] “How autonomous vehicles will navigate bad weather remains foggy,” https://www.forbes.com/sites/centurylink/2016/11/29/ how-autonomous-vehicles-will-navigate-bad-weather-remains-foggy/ #1aff07088662. 1 [2] S. G. Narasimhan and S. K. Nayar, “Contrast restoration of weather degraded images,” IEEE transactions on pattern analysis and machine intelligence, vol. 25, no. 6, pp. 713–724, 2003. 1 [3] Y. Y. Schechner, S. G. Narasimhan, and S. K. Nayar, “Instant dehazing of images using polarization,” in Computer Vision and Pattern Recognition, 2001. CVPR 2001. Proceedings of the 2001 IEEE Computer Society Conference on, vol. 1. IEEE, 2001, pp. I–I. 1 [4] T. Treibitz and Y. Y. Schechner, “Polarization: Beneficial for visibility enhancement?” in Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on. IEEE, 2009, pp. 525–532. 1 [5] J. Kopf, B. Neubert, B. Chen, M. Cohen, D. Cohen-Or, O. Deussen, M. Uyttendaele, and D. Lischinski, “Deep photo: Model-based photograph enhancement and viewing,” in ACM transactions on graphics (TOG), vol. 27, no. 5. ACM, 2008, p. 116. 1 [6] E. J. McCartney, “Optics of the atmosphere: scattering by molecules and particles,” New York, John Wiley and Sons, Inc., 1976. 421 p., 1976. 1 [7] S. G. Narasimhan and S. K. Nayar, “Chromatic framework for vision in bad weather,” in Computer Vision and Pattern Recognition, 2000. Proceedings. IEEE Conference on, vol. 1. IEEE, 2000, pp. 598–605. 1 [8] ——, “Vision and the atmosphere,” International Journal of Computer Vision, vol. 48, no. 3, pp. 233–254, 2002. 1 [9] K. He, J. Sun, and X. Tang, “Single image haze removal using dark channel prior,” in IEEE Conference on Computer Vision and Pattern Recognition, 2009. 1, 5, 6, 7, 8 [10] J.-P. Tarel and N. Hautiere, “Fast visibility restoration from a single color or gray level image,” in IEEE International Conference on Computer Vision, 2009. 1, 5, 6, 7, 8 [11] G. Meng, Y. Wang, J. Duan, S. Xiang, and C. Pan, “Efficient image dehazing with boundary constraint and contextual regularization,” in IEEE International Conference on Computer Vision, 2013. 1, 5, 6, 7, 8 [12] C. Chen, M. N. Do, and J. Wang, “Robust image and video dehazing with visual artifact suppression via gradient residual minimization,” in European Conference on Computer Vision, 2016. 1, 5, 6, 7, 8 [13] Q. Zhu, J. Mai, and L. Shao, “A fast single image haze removal algorithm using color attenuation prior,” IEEE Transactions on Image Processing, vol. 24, no. 11, pp. 3522–3533, 2015. 1, 5, 6, 7, 8 [14] D. Berman, S. Avidan et al., “Non-local image dehazing,” in IEEE JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 10 (b) RawHaze (d) FVR (f) GRM (h) NLD (j) MSCNN (c) DCP (e) BCCR (g) CAP (i) DehazeNet (k) AOD-Net (a) Ground Truth Fig. 6. Visualization of two RTTS images’ object detection results after applying different dehazing algorithms. [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] Conference on Computer Vision and Pattern Recognition, 2016. 1, 2, 5, 6, 7, 8, 9 B. Cai, X. Xu, K. Jia, C. Qing, and D. Tao, “Dehazenet: An end-to-end system for single image haze removal,” IEEE Transactions on Image Processing, vol. 25, no. 11, pp. 5187–5198, 2016. 1, 2, 4, 5, 6, 7, 8 W. Ren, S. Liu, H. Zhang, J. Pan, X. Cao, and M.-H. Yang, “Single image dehazing via multi-scale convolutional neural networks,” in European Conference on Computer Vision, 2016. 1, 2, 4, 5, 6, 7, 8 B. Li, X. Peng, Z. Wang, J. Xu, and D. Feng, “Aod-net: All-in-one dehazing network,” in IEEE International Conference on Computer Vision, 2017. 1, 2, 4, 5, 6, 7, 8 R. Fattal, “Single image dehazing,” ACM transactions on graphics (TOG), vol. 27, no. 3, p. 72, 2008. 1, 9 K. He, J. Sun, and X. Tang, “Single image haze removal using dark channel prior,” IEEE transactions on pattern analysis and machine intelligence, vol. 33, no. 12, pp. 2341–2353, 2011. 1 K. Tang, J. Yang, and J. Wang, “Investigating haze-relevant features in a learning framework for image dehazing,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2014, pp. 2995–3000. 1 Z. Li, P. Tan, R. T. Tan, D. Zou, S. Zhiying Zhou, and L.-F. Cheong, “Simultaneous video defogging and stereo reconstruction,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2015, pp. 4988–4997. 2 L. Kratz and K. Nishino, “Factorizing scene albedo and depth from a single foggy image,” in Computer Vision, 2009 IEEE 12th International Conference on. IEEE, 2009, pp. 1701–1708. 2 K. Nishino, L. Kratz, and S. Lombardi, “Bayesian defogging,” International journal of computer vision, vol. 98, no. 3, pp. 263–278, 2012. 2 D. Nair, P. A. Kumar, and P. Sankaran, “An effective surround filter for image dehazing,” in Proceedings of the 2014 International Conference on Interdisciplinary Advances in Applied Computing. ACM, 2014, p. 20. 2 J. Zhou and F. Zhou, “Single image dehazing motivated by retinex theory,” in Instrumentation and Measurement, Sensor Network and Automation (IMSNA), 2013 2nd International Symposium on, 2013, pp. 243–247. 2 B. Li, X. Peng, Z. Wang, J. Xu, and D. Feng, “End-to-end united video dehazing and detection,” arXiv preprint arXiv:1709.03919, 2017. 2 H. R. Sheikh, M. F. Sabir, and A. C. Bovik, “A statistical evaluation of recent full reference image quality assessment algorithms,” IEEE Transactions on image processing, vol. 15, no. 11, pp. 3440–3451, 2006. 2 [28] E. Agustsson and R. Timofte, “Ntire 2017 challenge on single image super-resolution: Dataset and study,” in The IEEE Conference on Computer Vision and Pattern Recognition (CVPR) Workshops, vol. 3, 2017. 2 [29] R. Fattal, “Dehazing using color-lines,” ACM Transactions on Graphics (TOG), vol. 34, no. 1, p. 13, 2014. 2 [30] C. Sakaridis, D. Dai, and L. Van Gool, “Semantic foggy scene understanding with synthetic data,” arXiv preprint arXiv:1708.07819, 2017. 2, 3, 4, 5 [31] F. Liu, C. Shen, G. Lin, and I. Reid, “Learning depth from single monocular images using deep convolutional neural fields,” IEEE transactions on pattern analysis and machine intelligence, vol. 38, no. 10, pp. 2024– 2039, 2016. 2, 4 [32] J.-P. Tarel, N. Hautiere, L. Caraffa, A. Cord, H. Halmaoui, and D. Gruyer, “Vision enhancement in homogeneous and heterogeneous fog,” IEEE Intelligent Transportation Systems Magazine, vol. 4, no. 2, pp. 6–20, 2012. 2 [33] N. Silberman, D. Hoiem, P. Kohli, and R. Fergus, “Indoor segmentation and support inference from rgbd images,” in European Conference on Computer Vision. Springer, 2012, pp. 746–760. 3, 4, 5 [34] D. Scharstein and R. Szeliski, “High-accuracy stereo depth maps using structured light,” in Computer Vision and Pattern Recognition, 2003. Proceedings. 2003 IEEE Computer Society Conference on, vol. 1. IEEE, 2003, pp. I–I. 3, 4 [35] A. Saxena, M. Sun, and A. Y. Ng, “Make3d: Learning 3d scene structure from a single still image,” IEEE transactions on pattern analysis and machine intelligence, vol. 31, no. 5, pp. 824–840, 2009. 3, 4 [36] A. Mittal, A. K. Moorthy, and A. C. Bovik, “No-reference image quality assessment in the spatial domain,” IEEE Transactions on Image Processing, vol. 21, no. 12, pp. 4695–4708, 2012. 4 [37] M. A. Saad, A. C. Bovik, and C. Charrier, “Blind image quality assessment: A natural scene statistics approach in the dct domain,” IEEE transactions on Image Processing, vol. 21, no. 8, pp. 3339–3352, 2012. 4, 5 [38] L. Liu, B. Liu, H. Huang, and A. C. Bovik, “No-reference image quality assessment based on spatial and spectral entropies,” Signal Processing: Image Communication, vol. 29, no. 8, pp. 856–863, 2014. 4, 5 [39] K. Ma, W. Liu, and Z. Wang, “Perceptual evaluation of single image dehazing algorithms,” in Image Processing (ICIP), 2015 IEEE International Conference on. IEEE, 2015, pp. 3600–3604. 4, 5, 6 [40] Z. Chen, T. Jiang, and Y. Tian, “Quality assessment for comparing image enhancement algorithms,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2014, pp. 3003–3010. 4 [41] “Beijing realtime weather photos,” http://goo.gl/svzxLm. 4 JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2015 [42] A. Geiger, P. Lenz, and R. Urtasun, “Are we ready for autonomous driving? the kitti vision benchmark suite,” in Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on. IEEE, 2012, pp. 3354–3361. 4 [43] F. Ma and S. Karaman, “Sparse-to-dense: Depth prediction from sparse depth samples and a single image,” arXiv preprint arXiv:1709.07492, 2017. 4 [44] L. Wang, H. Jin, R. Yang, and M. Gong, “Stereoscopic inpainting: Joint color and depth completion from stereo images,” in Computer Vision and Pattern Recognition, 2008. CVPR 2008. IEEE Conference on. IEEE, 2008, pp. 1–8. 4 [45] M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman, “The PASCAL Visual Object Classes Challenge 2007 (VOC2007) Results,” http://www.pascalnetwork.org/challenges/VOC/voc2007/workshop/index.html. 5, 7 [46] R. A. Bradley and M. E. Terry, “Rank analysis of incomplete block designs: I. the method of paired comparisons,” Biometrika, vol. 39, no. 3/4, pp. 324–345, 1952. 5, 6 [47] D. Liu, D. Wang, and H. Li, “Recognizable or not: Towards image semantic quality assessment for compression,” Sensing and Imaging, vol. 18, no. 1, p. 1, 2017. 5 [48] S. Ren, K. He, R. Girshick, and J. Sun, “Faster r-cnn: Towards real-time object detection with region proposal networks,” in Advances in Neural Information Processing Systems. 5, 7 [49] Z. Wang, S. Chang, Y. Yang, D. Liu, and T. S. Huang, “Studying very low resolution recognition using deep networks,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2016, pp. 4792–4800. 7 [50] B. Cheng, Z. Wang, Z. Zhang, Z. Li, J. Yang, and T. S. Huang, “Robust emotion recognition from low quality and low bit rate video: A deep learning approach,” in Proceedings of the 7-th Conference on Affective Computing and Intelligent Interaction, 2017. 7 [51] A. Shrivastava, T. Pfister, O. Tuzel, J. Susskind, W. Wang, and R. Webb, “Learning from simulated and unsupervised images through adversarial training,” arXiv preprint arXiv:1612.07828, 2016. 7 [52] K. Li, Y. Li, S. You, and N. Barnes, “Photo-realistic simulation of road scene for data-driven methods in bad weather,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Worksho, 2017, pp. 491–500. 7 [53] Y. Li, J. Huang, and J. Luo, “Using user generated online photos to estimate and monitor air pollution in major cities,” in Proceedings of the 7th International Conference on Internet Multimedia Computing and Service. ACM, 2015, p. 79. 7 [54] Z. Wang, J. Yang, H. Jin, E. Shechtman, A. Agarwala, J. Brandt, and T. S. Huang, “Deepfont: Identify your font from an image,” in Proceedings of the 23rd ACM international conference on Multimedia. ACM, 2015, pp. 451–459. 7 11
2cs.AI
V-Spline and Bayes Estimate Zhanglong Cao, David Bryant, Matthew Parry arXiv:1803.07645v1 [math.ST] 20 Mar 2018 Abstract Smoothing splines can be thought of as the posterior mean of a Gaussian process regression in a certain limit. By constructing a reproducing kernel Hilbert space with an appropriate inner product, the Bayesian form of the V-spline is derived when the penalty term is a fixed constant instead of a function. An extension to the usual generalized crossvalidation formula is utilized to find the optimal V-spline parameters. Keywords: Hilbert space 1 V-spline, generalised cross-validation, Bayes estimate, reproducing kernel Introduction A Hilbert space is a real or complex inner product space with respect to the distance function induced by the inner product [Dieudonné, 2013]. In particular, the Hilbert space L2 [0, 1] is the set of square integrable functions f (t) : [0, 1] 7→ R, where all functions satisfy  Z 1  L2 [0, 1] = f : f 2 dt < ∞ (1) 0 R1 with an inner product hf, gi = 0 f gdt. Consider a regression problem with observations modeled as yi = f (ti ) + εi , i = 1, . . . , n, where εi ∼ N (0, σ 2 ) are i.i.d. Gaussian noise and f ∈ C (m) [0, 1] = {f : f (m) ∈ L2 [0, 1]}. The classic nonparametric or semi-parametric regression is a function that minimizes the following penalized sum of squared functional Z 1 n 2 1X 2 (yi − f (ti )) + λ f (m) dt, (2) n i=1 0 where the first term is the lack of fit of f to the data. The parameter λ in the second term is a fixed smoothing parameter controlling the trade-off between over-fitting and bias [Trevor Hastie, 2009]. The minimizer fλ of the above equation resides in an n-dimensional space and the computation  in multivariate settings is generally of the order O n3 [Kim and Gu, 2004]. Schoenberg [1964] shows that a piecewise polynomial smoothing spline of degree 2m − 1 provides an aesthetically satisfying method for estimating f if y = {y1 , . . . , yn } cannot be interpolated exactly by some polynomial of degree less than m. For instance, when m = 2, a piecewise cubic smoothing spline providesR a powerful tool to estimate the above nonparametric function, in which the penalty term is f 002 dt [Hastie and Tibshirani, 1990]. Further, Kimeldorf and Wahba [1971, 1970] explore the corresponding between smoothing spline and Bayesian estimation. Actually, Wahba [1978] shows that a Bayesian version of this problem is to take a Gaussian process prior f (ti ) = a0 + a1 ti + · · · + am−1 tim−1 + xi on f with xi = X(ti ) being a zero-mean Gaussian process whose mth derivative is scaled white noise, 1 i = 1, . . . , n [Speckman and Sun, 2003]. The extended Bayes estimates fλ with a “partially diffuse” prior is exactly the same as the spline solution. Heckman and Woodroofe [1991] show that if prior distribution of the vector f = (f (t1 ), . . . , f (tn ))> is unknown but lies in a known class Ω, the estimator fˆ is found by minimizing the max E[fˆ − f ]2 . Branson et al. [2017] propose a Gaussian process regression method that acts as a Bayesian analog to local linear regression for sharp regression discontinuity designs. It is no doubt that one of the attractive features of the Bayesian approach is that, in principle, one can solve virtually any statistical decision or inference problem. Particularly, one can provide an accuracy assessment for fˆ = E(f | y) using posterior probability regions [Cox, 1993]. The problem of choosing the smoothing parameter is ubiquitous in curve estimation, and there are two different philosophical approaches to this question. The first one is to regard the free choice of smoothing parameter as an advantageous feature of the procedure. The other one is to find the parameter automatically by the data [Green and Silverman, 1993]. We prefer the latter one, to use data to train our model and to find the best parameters. The most well-known method is cross-validation. Assuming that mean of the random errors is zero, the true regression curve f (t) has the property that, if an observation y is taken away at a point t, the value f (t) is the best predictor 2 of y in terms of returning a least value of (y − f (t)) . Now, focus on an observation yi at point ti as being a new observation by omitting it from the set of data, which are used to estimate fˆ. Denote by fˆ(−i) (t, λ) the estimated function from the remaining data, where λ is the smoothing parameter. Then fˆ(−i) (t, λ) is the minimizer of Z 1X 2 (yj − f (tj )) + λ (f 00 )2 dt, (3) n j6=i and can be quantified by the cross-validation score function CV(λ) = n 2 1 X yi − fˆ(−i) (ti , λ) . n i=1 (4) The basis idea of the cross-validation is to choose the value of λ that minimizes CV(λ) [Green and Silverman, 1993]. An efficient way to calculate the cross-validation score is introduced by Green and Silverman [1993]. Because of the value of the smoothing spline fˆ depending linearly on the data yi , define the matrix A(λ), which is a map vector of observed values yi to predicted value fˆ(ti ). Then we have f̂ = A(λ)y. (5) Based on the correspondence between nonparametric regression and Bayesian estimation, Craven and Wahba [1978] propose a generalized cross-validation estimate for the minimizer fλ . The estimated λ̂ is the minimizer of the function where the trace of matrix A(λ) in (5) is incorporated. It is also possible to establish an optimal convergence property for the estimator when the number of observations in a fixed interval tends to infinity [Wecker and Ansley, 1983]. A highly efficient algorithm to optimize generalized cross-validation and generalized maximum likelihood scores with multiple smoothing parameters via the Newton method was proposed by Gu and Wahba [1991]. This algorithm can also be applied to maximum likelihood estimation and restricted maximum likelihood estimation. The behavior of the optimal regularization parameter in different regularization methods was investigated by Wahba and Wang [1990]. 2 In this paper, we prove that the V-spline, which incorporates both f and f 0 but penalizes excessive f 00 in the penalty term, can be estimated by a Bayesian approach in a certain reproducing kernel Hilbert space. An extended GCV is used to find the optimal parameters for the V-spline. 2 Polynomial Smoothing Splines on [0, 1] as Bayes Estimates A polynomial smoothing spline of degree 2m − 1 is a piecewise polynomial of the same degree on each interval [ti , ti+1 ), i = 1, . . . , n − 1, and the first 2m − 2 derivatives are continuous at the joined points. For instance, when m = 2, a piecewise cubic smoothing spline is a special case of the polynomial smoothing spline providing a powerful tool to estimate the objective function R (2) in the space C (2) [0, 1], where the penalty term is f 002 dt [Hastie and Tibshirani, 1990, Wang, 1998]. If a general space C (m) [0, 1] is equipped with an appropriate inner product, it can be made as a reproducing kernel Hilbert space. 2.1 Polynomial Smoothing Spline A spline is a numeric function that is piecewise-defined by polynomial functions, which possesses a high degree of smoothness at the places where the polynomial pieces connect (known as knots) [Chen, 2009, Judd, 1998]. Suppose we are given a set of paired data (t1 , y1 ), . . . , (tn , yn ) on the interval [0, 1], satisfying 0 < t1 < · · · < tn < 1. A piecewise polynomial function f (t) can be obtained by dividing the interval into contiguous intervals (t1 , t2 ), . . . , (tn−1 , tn ) and represented by a separate polynomial on each interval. For any continuous f ∈ C (m) [0, 1], it can be PM represented in a linear combination of basis functions hm (t) as f (t) = m=1 βm hm (t), where βm are coefficients [Ellis et al., 2009]. It is just like every vector in a vector space can be represented as a linear combination of basis vectors. A smoothing polynomial spline is uniquely the smoothest function that achieves a given degree of fidelity to a particular data set [Whittaker, 1922]. In deed, the minimizer of function (2) is the curve estimate fˆ(t) over all spline functions f (t) with m − 1 continuous derivatives fitting observed data in the space C (m) [0, 1]. In fact, the representer theorem [Kimeldorf and Wahba, P 2 1 2 1971] tells us that the P function fmin = arg min n i (yi − f (ti )) + λkf kC can be represented in the form fmin = i αi K(·, ti ), a linear combination of a positive-definite real-valued kernel K(·, ·) at each point. This is true for any arbitrary loss function [Rudin, 2005]. Further, Wahba [1978] proves that if f (t) has the prior distribution which is the same as the distribution of the stochastic process χ(t) on [0, 1], χ(t) = m X 1 dν φν (t) + b 2 Z(t), (6) ν=1 Rt m−1 where di ∼ N (0, ξI), Z(t) = 0 (t−u) (m−1)! dW (u) is the integrated Wiener process, then the polynomial spline fλ is the minimizer of the objective function (2) having the property that fλ (t) = lim Eξ {f (t) | f = y} , ξ→∞ (7) with λ = σ 2 /nb, where Eξ is expectation over the posterior distribution of f (t) with the prior (6). ξ = ∞ corresponds to the “diffuse” prior on d. 3 2.2 Reproducing Kernel Hilbert Space in C (m) [0, 1] Any f ∈ C (m) [0, 1] has a standard Taylor expansion, which is f (t) = m−1 X ν ν=0 t (ν) f (0) + ν! Z 1 0 (t − u)m−1 + f (m) (u)du, (m − 1)! (8) where (·)+ = max{0, ·}. With an inner product hf, gi = m−1 X Z 1 f (m) (t)g (m) (t)dt, (9) (s − u)m−1 (t − u)m−1 + + du (m − 1)! (m − 1)! (10) f (ν) (0)g (ν) (0) + 0 ν=0 the representer is Rs (t) = m−1 X ν=0 sν tν + ν! ν! Z 0 1 = R0 (s, t) + R1 (s, t). It is easy to prove that R(s, t) is a non-negative reproducing kernel, by which hR(s, t), f (t)i = (ν) hRs (t), f (t)i = f (s). Additionally, Rs (0) = sν /ν! for ν = 0, . . . , m − 1. Before moving on to further steps, we are now introducing the following two theorems. Theorem 1. [Aronszajn, 1950] Suppose R is a symmetric, positive definite kernel on a set X. Then, there is a unique Hilbert space of functions on X for which R is a reproducing kernel. Theorem 2. [Gu, 2013] If the reproducing kernel R of a space H on domain X can be decomposed into R = R0 + R1 , where R0 and R1 are both non-negative definite, R0 (x, ·), R1(x, ·) ∈ H, for ∀x ∈ X, and hR0 (x, ·), R1 (y, ·)i = 0, for ∀x, y ∈ X, then the spaces H0 and H1 corresponding respectively to R0 and R1 form a tensor sum decomposition of H. Conversely, if R0 and R1 are both nonnegative definite and H0 ∩H1 = {0}, then H = H0 ⊕H1 has a reproducing kernel R = R0 + R1 . According to Theorem 1, the Hilbert space associated with R(·) can be constructed as P containing all finite linear combinations of the form ai R(ti , ·), and their limits under the norm induced by the inner product hR(s, ·), R(t, ·)i = R(s, t). As  for Theorem 2, it is easy to verify that R0 corresponds to the space of polynomials H0 = f : f (m) = 0 with an inner Pm−1 product hf, gi0 = n ν=0 f (ν) (0)g (ν) (0) and R1 corresponds to the orthogonal complement of o R 1 (m) 2 (ν) H0 , that is H1 = f : f (0) = 0, ν = 0, . . . , m − 1, 0 (f ) dt < ∞ with an inner product R1 hf, gi1 = 0 f (m) g (m) dt. Given a set of sampling points, any f ∈ C (m) [0, 1] has the following form f (t) = m X dν φν (t) + ν=1 n X ci R1 (t, ti ). (11) i=1 where {φν (t)} is a set of basis functions of space H0 and R(·, t) is the representer in H1 [Wang, 2011]. Additionally, the coefficients ci and dν might be changed when different φν and R1 are used, but the function estimate remains the same regardless of the choices of φν and R1 [Gu, 2013]. 4 2.3 Polynomial Smoothing Splines as Bayes Estimates Because it is possible to interpret the smoothing spline regression estimator as a Bayes estimate when the mean function r(·) is given an improper prior distribution [Berlinet and ThomasAgnan, 2011, Wahba, 1990]. Therefore, one can find that the posterior mean of f on [0, 1] with a vague improper prior is the polynomial smoothing spline of the objective function (2). Consider f = f0 + f1 on [0, 1], with f0 and f1 having independent Gaussian priors with zero means and covariances satisfying E[f0 (s)f0 (t)] = τ 2 R0 (s, t) = τ 2 Z E[f1 (s)f1 (t)] = bR1 (s, t) = b 0 m−1 X ν=0 1 sν tν , ν! ν! (12) m−1 (s − u)m−1 (t − u)+ + , (m − 1)! (m − 1)! (13) where R0 and R1 are from (10). Because of the observations are normally distributed as yi ∼ N (f (ti ), σ 2 ), then the joint distribution for y and f (t) is normal with mean of zero and covariance matrix of   bQ + τ SS > + σ 2 I bξ + τ 2 Sφ Cov(f, y) = , bξ > + τ 2 φ> S > bR1 (t, t) + τ 2 φ> φ where {Qi,j }n×n = R1 (ti , tj ), {Si,ν }n×m = tν−1 /(ν − 1)!, {ξi,1 }n×1 = R1 (ti , t) and {φν,1 }m×1 = i ν−1 t /(ν − 1)!. Consequently, the posterior is −1 bQ + τ 2 SS > + σ 2 I y −1 −1 > > > Q + ρSS + nλI y + φ ρS Q + ρSS > + nλI y, E[f (t) | y] = bξ > + τ φ> s> = ξ>  (14) where ρ = τ 2 /b and nλ = σ 2 /b. Furthermore, by denoting M = Q + nλI, Gu [2013] gives that, when ρ → ∞, the posterior mean is in the form E[f (t) | y1:n ] = ξ > c + φ> d with coefficient vectors  −1 > −1  c = M −1 − M −1 S S > M −1 S S M y, (15)  −1 > d = S > M −1 S S M −1 y. (16) Theorem 3. [Gu, 2013] The polynomial smoothing spline of (2) is the posterior mean of f =  f0 + f1 , where f0 diffuses in span tν−1 , ν = 1, . . . , m and f1 has a Gaussian process prior with mean zero and a covariance function Z bR1 (s, t) = b 0 1 m−1 m−1 (s − u)+ (t − u)+ , (m − 1)! (m − 1)! (17) for b = σ 2 /nλ.  Remark : Equation (12) can be obtained from equation (6) if we assume dν ∼ N 0, τ 2 Im×m . Therefore the limit of ρ = τ 2 /b → ∞ indicates a diffuse prior for the coefficients d. 2.4 Gaussian Process Regression Gaussian processes are the extension of multivariate Gaussian to infinite-sized collections of real value variables, any finite number of which have a joint Gaussian distribution [Rasmussen 5 and Williams, 2006]. Gaussian process regression is a probability distribution over functions. It is fully defined by its mean m(t) and covariance K(s, t) function as m(t) = E[f (t)] (18) K(s, t) = E[(f (s) − m(s)) (f (t) − m(t))], (19) where s and t are two variables. A function f distributed as such is denoted in form of f ∼ GP (m(t), K(s, t)) . (20) Usually the mean function is assumed to be zero everywhere. Given a set of input variables t = {t1 , . . . , tn } for function f (t) and the output y = f (t) + ε with i.i.d. Gaussian noise ε of variance σn2 , we can use the above definition to predict the value of the function f∗ = f (t∗ ) at a particular input t∗ . As the noisy observations becoming Cov(yp , yq ) = K(tp , tq ) + σn2 δpq (21) where δpq is a Kronecker delta which is one if and only if p = q and zero otherwise, the joint distribution of the observed outputs y and the estimated output f∗ according to prior is      y K(t, t) + σn2 I K(t, t∗ ) ∼ N 0, . (22) K(t∗ , t) K(t∗ , t∗ ) f∗ The posterior distribution over the predicted value is obtained by conditioning on the observed data  f∗ | y, t, t∗ ∼ N f¯∗ , Cov(f∗ ) (23) where −1 f¯∗ = E (f∗ | y, t, t∗ ) = K(t∗ , t) K(t, t) + σn2 y,  −1 Cov(f∗ ) = K(t∗ , t∗ ) − K(t∗ , t) K(t, t) + σn2 I K(t, t∗ ). (24) (25) Therefore it can seen that the Bayesian estimation of a smoothing spline is a special format of Gaussian process regression with diffuse prior and the covariance matrix R(s, t). 3 3.1 V-Splines And Bayes Estimate V-Splines In a nonparametric regression, consider n paired time series points {t1 , y1 , v1 }, . . ., {tn , yn , vn }, such that 0 ≤ t1 < · · · < tn ≤ 1, y is the position information and v indicates its velocity. As in [Silverman, 1985] and [Donoho et al., 1995], we use a positive penalty function λ(t) in the following objective function rather than a constant λ in (3). Given function f : [0, 1] 7→ R and γ > 0, define the objective function n J[f ] = n n−1 Z ti+1 X 1X γX 0 2 2 (f (ti ) − yi ) + (f (ti ) − vi ) + n i=1 n i=1 i=1 λ(t)f 002 (t)dt, (26) ti where γ is the parameter that weights the residuals between f 0 = {f 0 (t1 ), . . . , f 0 (tn )} and v = {v1 , . . . , vn }. We make a simple assumption that λ(t) is a piecewise constant and adopts a constant value λi on interval (ti , ti+1 ) for i = 1, . . . , n − 1. 6 Theorem 4. For n ≥ 2, the objective function J[f ] is minimized by a cubic spline that is unique and linear outside the knots. A further minimizer of (26) is named V-spline, coming from the incorporation with velocity information and applications on vehicle and vessel tracking. It is the solution to the objective function (26), where an extra term for f 0 (t) − v and an extra parameter γ are incorporated. The penalty parameter λ(t) is a function varying on different domains. If λ(t) is constant and γ = 0, the V-spline degenerates to a conventional cubic smoothing spline consisting of a set of given basis functions. However, the Bayes estimate for a polynomial smoothing spline requires a constant penalty parameter. For this constraint, it is assumed that λ(t) stays the same on each subinterval in [0, 1] and named the solution “trivial V-spline”. In this section, we still use “V-spline” for sake of simplicity. 3.2 (2) Reproducing Kernel Hilbert Space Cp.w. [0, 1]  The space C (m) [0, 1] = f : f (m) ∈ L2 [0, 1] is a set of functions f whose mth derivatives are square integrable on the domain [0, 1]. For a V-spline, it only requires m = 2. In fact, its second derivative is piecewise linear but is not necessarily continuous at the knots. Besides, if and only if λ(t) is constant and γ = 0, the second derivative is piecewise linear and continuous at the knots. Here we are introducing the space (2) Cp.w. [0, 1] = {f : f 00 ∈ L2 [0, 1], f, f 0 are continuous and f 00 is piecewise linear} , in which the second derivative of any function f is not necessarily continuous. Given a sequence of paired data (t1 , y1 , v1 ) , . . . , (tn , yn , vn ), the minimizer of n n γX 1X (yi − f (ti ))2 + (vi − f 0 (ti ))2 + λ n i=1 n i=1 Z 1 f 002 dt (27) 0 (2) in the space Cp.w. [0, 1] is a V-spline. Equipped with an inner product hf, gi = f (0)g(0) + f 0 (0)g 0 (0) + 1 Z f 00 (t)g 00 (t)dt, (28) 0 (2) the space Cp.w. [0, 1] is made a reproducing kernel Hilbert space. In fact, the representer Rs (·) is Z 1 (s − u)+ (t − u)+ du. Rs (t) = 1 + st + 0 It can be seen that Rs (0) = 1, Rs0 (0) = s, and Rs00 (t) = (s − t)+ . Further, hRs , f i = Rs (0)f (0) + Rs0 (0)f 0 (0) + Z 1 (s − u)+ f 00 du 0 Z s s 0 0 = f (0) + sf (0) + (s − u)f (u) 0 + f 0 (u)du 0 0 0 = f (0) + sf (0) − sf (0) + f (s) − f (0) = f (s). 7 (29) The two terms of the reproducing kernel R(s, t) = Rs (t) = R0 (s, t) + R1 (s, t), where R0 (s, t) = 1 + st Z 1 R1 (s, t) = (s − u)+ (t − u)+ du (30) (31) 0 are both non-negative definite themselves. According to Theorem 2, R0 can correspond the space of polynomials H0 = {f : f 00 = 0} with an inner + f 0 (0)g 0 (0), complement n product hf, gi0 = f (0)g(0) o and R1 corresponds the orthogonal R R 1 00 00 1 0 002 H1 = f : f (0) = 0, f (0) = 0, 0 f dt < ∞ with inner product hf, gi1 = 0 f g dt. Thus, (2) H0 and H1 are two subspaces of the Cp.w. [0, 1], and the reproducing kernel is Rs (·) = R0 (s, ·) + R1 (s, ·). Rs ∂R0 ∂R1 Define a new notation Ṙ(s, t) = ∂R ∂s (s, t) = ∂s (s, t) + ∂s (s, t) = t + 0 (t − u)+ du. (2) 0 Obviously ( Ṙs (t) ∈ Cp.w. [0, 1]. Additionally, we have Ṙs (0) = 0, Ṙs (0) = 0 s≤t (2) Ṙs00 (t) = . Then any f ∈ Cp.w. [0, 1] satisfies 1 s>t hṘs , f i = Ṙs (0)f (0) + Ṙs0 (0)f 0 (0) + Z 1 Ṙs00 f 00 du = f 0 (0) + 0 Z ∂ Ṙs ∂t (0) = 1, and t f 00 du = f 0 (t). (32) 0 It can Rbe seen that the first term Ṙ0 = t ∈ H0 , and the space spanned by the second term s Ṙ1 = 0 (t − u)+ du, denoted as Ḣ, is a subspace of H1 , and H1 Ḣ 6= ∅. Given the sample points tj , j = 1, . . . , n, in equation (27) and noticing that the space   n n   X X A= f :f = cj R1 (tj , ·) + bj Ṙ1 (tj , ·) (33)   j=1 j=1 is a closed linear subspace of H1 . Then, we have a new space H∗ = Ḣ ∪ A. Thus, the two new (2) sub spaces in Cp.w. [0, 1] are H0 and H∗ . (2) Any f ∈ Cp.w. [0, 1] can be written as f (t) = d1 + d2 t + n X cj R1 (tj , t) + j=1 n X bj Ṙ1 (tj , t) + ρ(t) (34) j=1 where d, c and b are coefficient vectors, and ρ(t) ∈ H1 equation (27), it can be written as H∗ . Thus, by substituting to the  2 n n n X X 1 X yi − d1 − d2 ti − cj R1 (tj , ti ) − bj Ṙ1 (tj , ti ) − ρ(ti ) n i=1 j=1 j=1  2 n n n X X γ X vi − d2 − cj R10 (tj , ti ) − bj Ṙ10 (tj , ti ) − ρ0 (ti ) n i=1 j=1 j=1 Z +λ 0 1  2 n n X X  cj R100 (tj , t) + bj Ṙ100 (tj , t) + ρ00 (t) dt j=1 j=1 8 (35) Because of orthogonality, ρ(ti ) = hR1 (ti , ·), ρi = 0, ρ0 (ti ) = hṘ1 (ti , ·), ρ0 i = 0, i = 1, . . . , n. By denoting   S = {Sij }n×2 = 1 ti , Q = {Qij }n×n = R1 (tj , ti ), P = {Pij }n×n = Ṙ1 (tj , ti ),      0 = 0 1 , Q0 = Q0ij n×n = R10 (tj , ti ), P 0 = Pij0 n×n = Ṙ10 (tj , ti ). S 0 = Sij n×2 R1 R1 and the property in the space that 0 R100 (ti , t)R100 (tj , t)dt = R1 (ti , tj ), 0 R100 (ti , t)Ṙ100 (tj , t)dt = Rv R1 Rv (t − t)dt = Ṙ1 (tj , ti ), and 0 Ṙ100 (ti , t)Ṙ100 (tj , t)dt = 0 1dt = Ṙ10 (ti , tj ), where v = min(ti , tj ), 0 i the above equation (35) can be written as > (y − Sd − Qc − P b) (y − Sd − Qc − P b) + > γ (v − S 0 d − Q0 c − P 0 b) (v − S 0 d − Q0 c − P 0 b)  +nλ c> Qc + 2c> P b + b> P 0 b + nλhρ, ρi. (36) Notice that ρ only appears in the third term and is minimized at ρ = 0. Hence, a V-spline resides in the space H0 ⊕ H∗ of finite dimension. Thus, the solution to (27) is computed via the minimization of the first three terms in (36) with respect to d, c and b. 3.3 Posterior of Bayes Estimate Suppose the covariance functions for y, v and f , f 0 are E[f (s)f (t)] = τ 2 R0 (s, t) + βR1 (s, t) E[f (s)f 0 (t)] = τ 2 R00 (s, t) + βR10 (s, t) E[f 0 (s)f (t)] = τ 2 Ṙ0 (s, t) + β Ṙ1 (s, t) E[f 0 (s)f 0 (t)] = τ 2 Ṙ00 (s, t) + β Ṙ10 (s, t) E[yi yj ] = τ 2 R0 (si , sj ) + βR1 (si , sj ) + σ 2 δij E[vi vj ] = τ 2 Ṙ00 (si , sj ) + β Ṙ10 (si , sj ) + σ2 δij γ E[yi vj ] = τ 2 R00 (si , sj ) + βR10 (si , sj ) E[vi yj ] = τ 2 Ṙ0 (si , sj ) + β Ṙ1 (si , sj ) E[yi f (s)] = τ 2 R0 (si , s) + βR1 (si , s) E[yi f 0 (s)] = τ 2 R00 (si , s) + βR10 (si , s) E[vi f (s)] = τ 2 Ṙ0 (si , s) + β Ṙ1 (si , s) E[vi f 0 (s)] = τ 2 Ṙ00 (si , s) + β Ṙ10 (si , s) where R(s, t) is taken from (29), δij is a Kronecker delta   and β is fixed.  σ2 2 Observing yi ∼ N f (ti ), σ and vi ∼ N f (ti ), γ , i = 1, . . . , n, the joint distribution of y, v and f (t) is normal with mean zero and a covariance matrix can be found as      Var(y) Cov(y, v) Cov(y, f ) y v ∼ N 0, Cov(v, y) Var(v) Cov(v, f ) . Cov(f, y) Cov(f, v) Var(f ) f (37) With the property of Gaussian process regression, the posterior mean of f (t) is easily seen to be −1   Cov(y, v) y v Var(v) " #−1   2 > τ 2 SS 0> + βP   τ SS + βQ + σ 2 I y 2 = τ 2 φ> S > + βξ > τ 2 φ> S 0> + βψ > v τ 2 S 0 S > + βQ0 τ 2 S 0 S 0> + βP 0 + σγ I #−1   "   ρSS > + Q + nλI ρSS 0> + P y = ρφ> S > + ξ > ρφ> S 0> + ψ > 0 > 0 0 ρS S + Q ρS S 0> + P 0 + nλ I v γ !  > !−1    >      Q + nλI P S S S y = φ> ρ 0 + ξ> ψ> ρ 0 + Q0 P 0 + nλ I S S S0 v γ    −1 y    −1 y  = φ> ρT > ρT > T + M + ξ > ψ > ρT > T + M v v  E(f | y, v) = Cov(y, f )  Cov(v, f )  Var(y) Cov(v, y) 9 (38)  where φ is 2×1 matrix with entry 1 and t, ξ is n×1 matrix with ith entry R(ti , t), T > = S > and ψ is n × 1 matrix with ith entry Ṙ(ti , t), ρ = τ 2 /β and nλ = σ 2 /β. S 0>  Lemma 1. Suppose M is symmetric and nonsingular and T is of full column rank. lim ρT T > + M ρ→∞ −1 = M −1 − M −1 T T > M −1 T lim ρT > ρT T > + M −1 ρ→∞ = T > M −1 T −1 −1 T > M −1 , T > M −1 . (39) (40) Setting ρ → ∞ in equation (38) and applying Lemma 1, the posterior mean E(f (t) | y, v) is fˆ = φ> d + ξ > c + ψ > b, with the coefficient vectors given by   −1 > −1 y > −1 d= T M T T M , (41) v      −1 > −1  y c = M −1 − M −1 T T > M −1 T T M , (42) b v     Q + nλI P S . where T = 0 and M = Q0 P 0 + nλ S γ I It is easy to verify that d, c, b are the solutions to   > 0>  S 0 b + P > c + S 0> P 0 b − v = 0, S (Sd + Qc + P b − y) + γS  Q (Sd + (Q + nλI) c + P b − y) + P γS 0 b + γP > c + (γP 0 + nλI) b − γv = 0,    > P (Sd + (Q + nλI) c + P b − y) + P 0 γS 0 b + P > c + (γP 0 + nλI) b − γv = 0. (43) Finally we obtain the following theorem: Theorem 5. The smoothing V-spline of (27) is the posterior mean of f = f0 + f1 + f˙1 , where f0 diffuses in span {1, t} and f1 , f˙1 have Gaussian process priors with mean zero and covariance functions Z 1 Cov (f1 , f1 ) = R1 (s, t) = β (s − u)+ (t − u)+ du, (44) 0   Z s   Cov f˙1 , f1 = Ṙ (s, t) = β t + (t − u)+ du (45) 0 for β = σ 2 /nλ. 4 V-Spline with Correlated Random Errors In most of the studies on polynomial smoothing splines, the random errors are assumed being independent. By contrast, observations are often correlated in applications, such as time series data and spatial data. It is known that the correlation greatly affects the selection of smoothing parameters, which are critical to the performance of smoothing spline estimates [Wang, 1998]. The parameter selection methods, such as generalized maximum likelihood (GML), generalized cross-validation (GCV), underestimate smoothing parameters when data are correlated. Diggle and Hutchinson [1989] extend GCV for choosing the degree of smoothing spline to accommodate an autocorrelated error sequence, by which the smoothing parameter and autocorrelation parameters are estimated simultaneously. Kohn et al. [1992] propose an algorithm 10 to evaluate the cross-validation functions, whose autocorrelated errors are modeled by an autoregressive moving average. Wang [1998] extend GML and unbiased risk (UBR), other than GCV, to estimate the smoothing parameters and correlation parameters simultaneously. In this section, we explore the extended GCV for V-spline with correlated errors.  Firstof all, consider observations y = f (t) + ε1 and v = f 0 (t) + ε2 , where ε1 ∼ N 0, σ 2 W −1 ,  2 ε2 ∼ N 0, σγ U −1 with variance parameter σ 2 , and the structures of correlation matrices W (2) and U are known. The V-spline fˆ with correlated errors in the space Cp.w. [0, 1] is the minimizer of Z 1 1 γ 2 > 0 > 0 (y − f ) W (y − f ) + (v − f ) U (v − f ) + λ (f 00 ) dt. (46) n n 0 P2n 2n Because of f = i=1 θi Ni (t) is a linear combination of basis functions {Ni (t)}i=1 , extended to the solution with covariance matrices, the coefficients is found by θ̂ = B > W B + γC > U C + nΩλ −1  B > W y + γC > U v . (47) Furthermore, in Gaussian process regression, the covariance matrix with correlated variances becomes   Q + nλW P M= and the rest stays the same. Q0 P 0 + nλ γ U −1 >  Additionally, it is known that the parameter θ̂ = B > B + γC > C + nΩλ B y + γC > v and will give us the following form  −1  −1 f̂ = B θ̂ = B B > B + γC > C + nΩλ B > y + B B > B + γC > C + nΩλ C>v (48) = Sy + γT v,  −1  −1 f̂ 0 = C θ̂ = C B > B + γC > C + nΩλ B > y + C B > B + γC > C + nΩλ C>v (49) = U y + γV v. Lemma 2. The cross-validation score of a V-spline satisfies n 1X CV (λ, γ) = n i=1 Tii (fˆ0 (ti ) − vi ) fˆ(ti ) − yi + γ 1−γV ii !2 (50) Tii Uii 1 − Sii − γ 1−γV ii where fˆ is the V-spline smoother calculated from the full data set {(ti , yi , vi )} with smoothing parameter λ and γ. Followed by the approximation Sii ≈ n1 tr(S), Tii ≈ [Syed, 2011], the GCV for the V-spline will be 1 n tr(T ), Uii ≈ 1 n tr(U ) and Vii ≈  2 γtr(T )/n 0 n 1 X  fˆ(ti ) − yi + 1−γtr(V )/n (fˆ (ti ) − vi )  GCV(λ, γ) = , n i=1 1 − tr(S)/n − γtr(T )/n tr(U )/n 1 n tr(V ) (51) 1−γtr(V )/n which may provide further computational savings since it requires finding the trace rather than the individual diagonal entries of the hat matrix. Hence, it can be written in the form of  >   f̂ − y f̂ − y + GCV(λ, γ) =  >    2  >   tr(γT ) f̂ − y f̂ 0 − v + tr(I−γV ) f̂ 0 − v f̂ 0 − v .  2 tr(γT ) tr(I − S − tr(I−γV ) U ) 2tr(γT ) tr(I−γV ) 11 (52) A natural extension to the above GCV for V-spline with correlated errors is  f̂ − y > W  GCV (λ, γ) =  f̂ − y + 2tr(γT ) tr(I−γV )  > 2  >      tr(γT ) f̂ − y W 1/2 U >1/2 f̂ 0 − v + tr(I−γV ) f̂ 0 − v U f̂ 0 − v . 2   tr(γT ) tr I − S − tr(I−γV ) U (53) The GCV is used for finding the unknown constant parameter λ, instead of a piecewise constant λ(t) at different intervals, and the parameter γ. If the errors are independent, in which way W and U become identity matrices, the solution fˆ degenerates to a conventional V-spline with constant λ through over the entire interval [0, 1]. 5 A Numeric Simulation Consider a length of 100 even spaced simulation data on [0, 1] and the model f (t) = sin(2πt), f 0 (t) = cos(2πt). With given parameters σ 2 = 0.01, γ = 0.02 and covariance matrices W , U , the simulated data is generated from ( (1) yi = f (ti ) + εi , (54) (2) vi = f 0 (ti ) + εi ,    2 where ε(1) ∼ N 0, σ 2 W −1 , ε(2) ∼ N 0, σγ U −1 , 0 ≤ t1 < · · · < tn ≤ 1. With the same parameter found by GCV, V-spline and its Bayes estimate return the same reconstruction. However, because of the parameter is a constant λ rather than a piecewise constant function λ(t), the trivial V-spline might not be the optimal solution compared with the one consisting an adaptive penalty term. 6 Conclusion In this paper, we take a review of the work that has been done for the relationship between polynomial smoothing spline and the Bayes estimates. With improper priors, the two methods correspond to each other. In fact, the smoothing spline is a particular case of Gaussian process regression. By following the work done by Gu [2013], we find the Bayes estimate for a trivial V-spline with a constant penalty parameter λ. Additionally, we give the formula of GCV for V-spline with correlated errors on y and v. In order to find the Bayes estimate for the non-trivial V-spline with a piecewise penalty function λ(t), we conjecture that the methods discussed in this paper can be extended using the inner product n−1 X Z ti+1 0 0 hf, gi = f (0)g(0) + f (0)g (0) + wi f 00 (t)g 00 (t)dt, (55) i=1 (2) on Cp.w. [0, 1], where P i ti wi = 1 and wi > 0. References Aronszajn, N. (1950). Theory of reproducing kernels. Transactions of the American mathematical society 68 (3), 337–404. Berlinet, A. and C. Thomas-Agnan (2011). Reproducing kernel Hilbert spaces in probability and statistics. Springer Science & Business Media. 12 1.0 0.5 0.0 −0.5 −1.0 0.00 0.25 0.50 0.75 1.00 Figure 1: Comparison of (trivial) V-spline and its Bayes estimate. Two methods are corresponding to each other. In this figure, black dots are the observations and the solid line is the reconstruction. The V-spline and its posterior E(f (t) | y, v) of Bayes estimate give the same results. Branson, Z., M. Rischard, L. Bornn, and L. Miratrix (2017). A nonparametric bayesian methodology for regression discontinuity designs. arXiv preprint arXiv:1704.04858 . Chen, W.-K. (2009). Feedback, nonlinear, and distributed circuits. CRC Press. Cox, D. D. (1993). An analysis of bayesian inference for nonparametric regression. The Annals of Statistics, 903–923. Craven, P. and G. Wahba (1978). Smoothing noisy data with spline functions. Numerische Mathematik 31 (4), 377–403. Dieudonné, J. (2013). Foundations of modern analysis. Read Books Ltd. Diggle, P. J. and M. F. Hutchinson (1989). On spline smoothing with autocorrelated errors. Australian & New Zealand Journal of Statistics 31 (1), 166–182. Donoho, D. L., I. M. Johnstone, G. Kerkyacharian, and D. Picard (1995). Wavelet shrinkage: asymptopia? Journal of the Royal Statistical Society. Series B (Methodological), 301–369. Ellis, D., E. Sommerlade, and I. Reid (2009). Modelling pedestrian trajectory patterns with gaussian processes. In Computer Vision Workshops (ICCV Workshops), 2009 IEEE 12th International Conference on, pp. 1229–1234. IEEE. Green, P. J. and B. W. Silverman (1993). Nonparametric regression and generalized linear models: a roughness penalty approach. CRC Press. 13 Gu, C. (2013). Smoothing spline ANOVA models, Volume 297. Springer Science & Business Media. Gu, C. and G. Wahba (1991). Minimizing gcv/gml scores with multiple smoothing parameters via the newton method. SIAM Journal on Scientific and Statistical Computing 12 (2), 383–398. Hastie, T. J. and R. J. Tibshirani (1990). Generalized additive models, Volume 43. CRC Press. Heckman, N. E. and M. Woodroofe (1991). Minimax bayes estimation in nonparametric regression. The Annals of Statistics, 2003–2014. Judd, K. L. (1998). Numerical methods in economics. MIT press. Kim, Y.-J. and C. Gu (2004). Smoothing spline gaussian regression: more scalable computation via efficient approximation. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 66 (2), 337–356. Kimeldorf, G. and G. Wahba (1971). Some results on tchebycheffian spline functions. Journal of mathematical analysis and applications 33 (1), 82–95. Kimeldorf, G. S. and G. Wahba (1970). A correspondence between bayesian estimation on stochastic processes and smoothing by splines. The Annals of Mathematical Statistics 41 (2), 495–502. Kohn, R., C. F. Ansley, and C.-M. Wong (1992). Nonparametric spline regression with autoregressive moving average errors. Biometrika 79 (2), 335–346. Rasmussen, C. E. and C. K. Williams (2006). Gaussian processes for machine learning, Volume 1. MIT press Cambridge. Rudin, C. (2005). Stability analysis for regularized least squares regression. arXiv preprint cs/0502016 . Schoenberg, I. J. (1964). Spline functions and the problem of graduation. Proceedings of the National Academy of Sciences 52 (4), 947–950. Silverman, B. W. (1985). Some aspects of the spline smoothing approach to non-parametric regression curve fitting. Journal of the Royal Statistical Society. Series B (Methodological), 1–52. Speckman, P. L. and D. Sun (2003). Fully bayesian spline smoothing and intrinsic autoregressive priors. Biometrika 90 (2), 289–302. Syed, A. R. (2011). A review of cross validation and adaptive model selection. Trevor Hastie, Robert Tibshirani, J. F. (2009). The Elements of Statistical Learning: Data Mining, Inference, and Prediction. Second Edition. Springer-Verlag. Wahba, G. (1978). Improper priors, spline smoothing and the problem of guarding against model errors in regression. Journal of the Royal Statistical Society. Series B (Methodological), 364–372. Wahba, G. (1990). Spline models for observational data, Volume 59. Siam. 14 Wahba, G. and Y. Wang (1990). When is the optimal regularization parameter insensitive to the choice of the loss function? Communications in Statistics-Theory and Methods 19 (5), 1685–1700. Wang, Y. (1998). Smoothing spline models with correlated random errors. Journal of the American Statistical Association 93 (441), 341–348. Wang, Y. (2011). Smoothing splines: methods and applications. CRC Press. Wecker, W. E. and C. F. Ansley (1983). The signal extraction approach to nonlinear regression and spline smoothing. Journal of the American Statistical Association 78 (381), 81–89. Whittaker, E. T. (1922). On a new method of graduation. Proceedings of the Edinburgh Mathematical Society 41, 63–75. 15
10math.ST
New and simple algorithms for stable flow problems arXiv:1309.3701v2 [cs.DM] 27 Apr 2017 Ágnes Cseh1⋆ and Jannik Matuschke2⋆⋆ 2 1 Institute of Economics, Hungarian Academy of Sciences and Corvinus University of Budapest, e-mail: [email protected] TUM School of Management, Technische Universität München, e-mail: [email protected] Abstract. Stable flows generalize the well-known concept of stable matchings to markets in which transactions may involve several agents, forwarding flow from one to another. An instance of the problem consists of a capacitated directed network, in which vertices express their preferences over their incident edges. A network flow is stable if there is no group of vertices that all could benefit from rerouting the flow along a walk. Fleiner [13] established that a stable flow always exists by reducing it to the stable allocation problem. We present an augmenting-path algorithm for computing a stable flow, the first algorithm that achieves polynomial running time for this problem without using stable allocation as a blackbox subroutine. We further consider the problem of finding a stable flow such that the flow value on every edge is within a given interval. For this problem, we present an elegant graph transformation and based on this, we devise a simple and fast algorithm, which also can be used to find a solution to the stable marriage problem with forced and forbidden edges. Finally, we study the stable multicommodity flow model introduced by Király and Pap [24]. The original model is highly involved and allows for commodity-dependent preference lists at the vertices and commodityspecific edge capacities. We present several graph-based reductions that show equivalence to a significantly simpler model. We further show that it is NP-complete to decide whether an integral solution exists. 1 Introduction Stability is a well-known concept used for matching markets without monetary transactions [29]. A stable solution provides certainty that no two agents are willing to selfishly modify the market situation. Stable matchings were first formally defined in the seminal paper of Gale and Shapley [17]. They described an instance of the college admission problem and introduced the terminology ⋆ ⋆⋆ Supported by the Hungarian Academy of Sciences under its Momentum Programme (LP2016-3/2016) and OTKA grant K108383. Partially supported by COST Action IC1205 on Computational Social Choice. based on marriage that since then became wide-spread. Besides this initial application, variants of the stable matching problem are widely used in employer allocation markets [30], university admission decisions [2,4], campus housing assignments [5,28] and bandwidth allocation [16]. A recent honor proves the currentness and importance of results in the topic: in 2012, Lloyd S. Shapley and Alvin E. Roth were awarded the Sveriges Riksbank Prize in Economic Sciences in Memory of Alfred Nobel for their outstanding results on market design and matching theory. In the classic stable marriage problem, we are given a bipartite graph, where the two classes of vertices represent men and women, respectively. Each vertex has a strictly ordered preference list over his or her possible partners. A matching is stable if it is not blocked by any edge, that is, no man-woman pair exists who are mutually inclined to abandon their partners and marry each other [17]. In practice, the stable matching problem is mostly used in one of its capacitated variants, which are the stable many-to-one matching, many-to-many matching and allocation problems. The stable flow problem can be seen as a highlevel generalization of all these settings. As the most complex graph-theoretical generalization of the stable marriage model, it plays a crucial role in the theoretical understanding of the power and limitations of the stability concept. From a practical point of view, stable flows can be used to model markets in which interactions between agents can involve chains of participants, e.g., supply chain networks involving multiple independent companies. In the stable flow problem, a directed network with preferences models a market situation. Vertices are vendors dealing with some goods, while edges connecting them represent possible deals. Through his preference list, each vendor specifies how desirable a trade would be to him. Sources and sinks model suppliers and end-consumers. A feasible network flow is stable, if there is no set of vendors who mutually agree to modify the flow in the same manner. A blocking walk represents a set of vendors and a set of possible deals so that all of these vendors would benefit from rerouting some flow along the blocking walk. Literature review. The notion of stability was extended to so-called “vertical networks” by Ostrovsky in 2008 [26]. Even though the author proves the existence of a stable solution and presents an extension of the Gale-Shapley algorithm, his model is restricted to unit-capacity acyclic graphs. Stable flows in the more general setting were defined by Fleiner [13], who reduced the stable flow problem to the stable allocation problem. The best currently known computation time for finding a stable flow is O(|E| log |V |) in a network with vertex set V and edge set E. This bound is due to Fleiner’s reduction to the stable allocation problem and its fastest solution described by Dean and Munshi [8]. Since the reduction takes O(|V |) time and does not change the instance size significantly and the weighted stable allocation problem can be solved in O(|E|2 log |V |) time [8], the same holds for the maximum weight stable flow problem. The Gale-Shapley algorithm can also be extended for stable flows [7], but its straightforward implementation requires pseudo-polynomial running time, just like in the stable allocation problem. 2 It is sometimes desirable to compute stable solutions using certain forced edges or avoiding a set of forbidden edges. This setting has been an actively researched topic for decades [6,9,14,20,25]. This problem is known to be solvable in polynomial time in the one-to-one matching case, even in non-bipartite graphs [14]. Though Knuth presented a combinatorial method that finds a stable matching in a bipartite graph with a given set of forced edges or reports that none exists [25], all known methods for finding a stable matching with both forced and forbidden edges exploit a somewhat involved machinery, such as rotations [20], LP techniques [10,11,21] or reduction to other advanced problems in stability [9,14]. In many flow-based applications, various goods are exchanged. Such problems are usually modeled by multicommodity flows [22]. A maximum multicommodity flow can be computed in strongly polynomial time [31], but even when capacities are integer, all optimal solutions might be fractional, and finding a maximum integer multicommodity flow is NP-hard [19]. Király and Pap [24] introduced the concept of stable multicommodity flows, in which edges have preferences over which commodities they like to transport and the preference lists at the vertices may depend on the commodity. They show that a stable solution always exists, but it is PPAD-hard to find one. Our contribution and structure. In this paper we discuss new and simplified algorithms and complexity results for three differently complex variants of the stable flow problem. Section 2 contains preliminaries on stable flows. • In Section 3 we present a polynomial algorithm for stable flows. To derive an efficient solution method operating directly on the flow network, we combine the well-known pseudo-polynomial Gale-Shapley algorithm and the proposalrefusal pointer machinery known from stable allocations into an augmentingpath algorithm for computing a stable flow. • Then, in Section 4 stable flows with restricted intervals are discussed. We provide a simple combinatorial algorithm to find a flow with flow value within a pre-given interval for each edge. Surprisingly, our algorithm directly translates into a very simple new algorithm for the problem of stable matchings with forced and forbidden edges in the classical stable marriage case. Unlike the previously known methods, our result relies solely on elementary graph transformations. • Finally, in Section 5 we study stable multicommodity flows. First, we provide tools to simplify stable multicommodity flow instances to a great extent by showing that it is without loss of generality to assume that no commodityspecific preferences at the vertices and no commodity-specific capacities on the edges exist. Then, we reduce 3-sat to the integral stable multicommodity flow problem and show that it is NP-complete to decide whether an integral solution exists even if the network in the input has integral capacities only. 3 2 Preliminaries A network (D, c) consists of a directed graph D = (V, E) and a capacity function c : E → R≥0 on its edges. The vertex set of D has two distinct elements, also called terminal vertices: a source s, which has outgoing edges only and a sink t, which has incoming edges only. Definition 1 (flow). Function f : E → R≥0 is a flow if it fulfills both of the following requirements: 1. capacity constraints: for every uv ∈ E; Pf (uv) ≤ c(uv) P 2. flow conservation: uv∈E f (uv) = vw∈E f (vw) for all v ∈ V \ {s, t}. A stable flow instance is a triple I = (D, c, O). It comprises a network (D, c) and O, the preference ordering of vertices on their incident edges. Each nonterminal vertex ranks its incoming and also its outgoing edges strictly and separately. If v prefers edge vw to vz, then we write rv (vw) < rv (vz). Terminals do not rank their edges, because their preferences are irrelevant with respect to the following definition. Definition 2 (blocking walk, stable flow). A blocking walk of flow f is a directed walk W = hv1 , v2 , ..., vk i such that all of the following properties hold: 1. f (vi vi+1 ) < c(vi vi+1 ), for each edge vi vi+1 , i = 1, ..., k − 1; 2. v1 = s or there is an edge v1 u such that f (v1 u) > 0 and rv1 (v1 v2 ) < rv1 (v1 u); 3. vk = t or there is an edge wvk such that f (wvk ) > 0 and rvk (vk−1 vk ) < rvk (wvk ). A flow is stable, if there is no blocking walk with respect to it in the graph. Unsaturated walks fulfilling point 2 are said to dominate f at start, while walks fulfilling point 3 dominate f at the end. We can say that a walk blocks f if it dominates f at both ends. Throughout the paper, we will assume that the digraph D does not contain loops or parallel edges, the source s only has outgoing edges, the sink t only has incoming edges, and that no isolated vertices exist. All these assumptions are without loss of generality and only for notational convenience. Problem 1. sf Input: I = (D, c, O); a directed network (D, c) and O, the preference ordering of vertices. Question: Is there a flow f so that no walk blocks f ? Theorem 1 (Fleiner [13]). sf always has a stable solution and it can be found in polynomial time. Moreover, for a fixed sf instance, each edge incident to s or t has the same value in every stable flow. This result is based on a reduction to the stable allocation problem. The second half of Theorem 1 can be seen as the flow generalization of the so-called Rural Hospitals Theorem known for stable matching instances in general graphs [18]. While Theorem 1 implies that all stable flows have equal value, we remark that this value can be much smaller than that of a maximum flow in the network. In the following we give a sample instance with a gap of Ω(|E|). 4 2 2 2 s 1 v1 1 1 v2 1 1 v3 1 1 v4 1 1 2 v5 1 1 v6 1 2 t 2 Fig. 1. The maximum flow (marked by colored edges) has value 3, while the unique stable flow is of value 1 and is sent along the path hs, v1 , v2 , ..., ti. It is easy to see that this instance can be extended to demonstrate ratio Ω(|E|). Example for small stable flow value. Flows with no unsaturated terminal-terminal paths are maximal flows. We know that every stable flow is maximal and it is folklore that the ratio of the size of maximal and maximum flows can be of O(|E|). This ratio can also be achieved by stable and maximum flows in a graph. As the instance in Fig. 1 demonstrates, this ratio can also be achieved by stable and maximum flows in a graph. 3 A polynomial-time augmenting path algorithm for stable flows Using Fleiner’s construction [13], a stable flow can be found efficiently by computing a stable allocation instead. Another approach is adapting the widely used Gale-Shapley algorithm to sf. As described in [7], this yields a preflow-push type algorithm, in which vertices forward or reject excessive flow according to their preference lists. While this algorithm has the advantage of operating directly on the network without transformation to stable allocation, its running time is only pseudo-polynomial. In the following, we describe a polynomial time algorithm to produce a stable flow that operates directly on the network D. Our method is based on the wellknown augmenting path algorithm of Ford and Fulkerson [15], also used by Baïou and Balinski [1] and Dean and Munshi [8] for stability problems. The main idea is to introduce proposal and refusal pointers to keep track of possible Gale-Shapley steps and execute them in bulk. Each such iteration corresponds to augmenting flow along an s-t-path or cycle in a restricted residual network. 5 3.1 Our algorithm In the algorithm, every vertex v ∈ V \ {t} is associated with two pointers, the proposal pointer π[v] and the refusal pointer ρ[v]. Initially π[v] points to the firstchoice outgoing edge on v’s preference list, whereas ρ[v] is inactive. Throughout the algorithm π[v] traverses the outgoing edges of v in order of increasing rank on v’s preference list (for the source s, we assume an arbitrary preference order) until it gets advanced beyond the final outgoing edge. Then ρ[v] becomes active and traverses the incoming edges of v in order of decreasing rank on v’s preference list. With any state of the pointers π, ρ, we associate a helper graph Hπ,ρ , which contains the edges pointed at by the proposal pointers and the reversals of the edges pointed at by the refusal pointer. A recursive update procedure for advancing the pointers along their lists ensures that throughout the algorithm, Hπ,ρ contains an s-t-path or a cycle, with all edges having positive residual capacity cf with respect to the current flow. The algorithm then augments the flow along this path or cycle and updates the pointers of saturated edges. Once π[s] has traversed all outgoing edges of s, the algorithm has found a stable flow. As in each iteration, at least one pointer is advanced, the running time of the algorithm is polynomial in the input size. Initializing and updating pointers. In the algorithm, every vertex v ∈ V \ {t} is associated with two pointers, the proposal pointer π[v], which traverses the outgoing edges of v in order of decreasing rank on v’s preference list (for the source s, we assume an arbitrary preference order), and the refusal pointer ρ[v], which traverses the incoming edges of v in order of increasing rank on v’s preference list. Initially, π[v] points to the first-choice outgoing edge on v’s preference list, whereas ρ[v] is inactive, which is denoted by ρ[v] = ∅. The pointers at v are updated through a procedure UpdatePointers(v) (see Algorithm 1 for a formal listing). If π[v] is active, it is repeatedly advanced to point to the next outgoing edge on v’s preference list until we reach an edge that has not been refused by its head before. Once π[v] gets advanced beyond the final outgoing edge, it becomes inactive (π[v] = ∅), and ρ[v] gets advanced from its inactive state to pointing to the last incoming edge on v’s preference list. Whenever we update the refuse pointer ρ[v] to point at an edge uv, we also check whether π[u] = uv, and in this case we also advance π[u] (potentially activating u’s refuse pointer and triggering further updates). When we advance ρ[v] beyond v’s most preferred incoming edge, we set ρ[v] = ∗. We introduce the convention rv (∅) = ∞ and rv (∗) = 0. The helper graph. With any state of the pointers π, ρ, we associate a helper graph Hπ,ρ . It has the same vertex set as D and the following edge set: EHπ,ρ = {π[v] : v ∈ V \{t}, π[v] 6= ∅}∪{rev(ρ[v]) : v ∈ V \{t}, π[v] = ∅, ρ[v] 6= ∗}, where rev(uv) := vu denotes the reversal of a given edge. Hence, for every vertex v ∈ V \ {t}, the graph Hπ,ρ either contains the edge π[v], if the proposal pointer 6 is still active, or it contains the reversal rev(ρ[v]) of the edge ρ[v], if the refusal pointer is active, or neither of these, if both pointers are inactive. Each edge e ∈ EHπ,ρ has a residual capacity cf (e) depending on the current flow f , defined by ( c(e) − f (e) if e ∈ E, cf (e) := f (e) if e = rev(e′ ) for some e′ ∈ E. Augmenting the flow. The algorithm iteratively augments the flow f along an st-path or cycle W in Hπ,ρ by the bottleneck capacity mine∈W cf (e). Augmenting a flow f along a path or cycle W by ∆ means that for every e ∈ W , we increase f (e) by ∆ if e ∈ E and decrease f (e′ ) by ∆ if e = rev(e′ ) for some e′ ∈ E. Note that after the augmentation, cf (e) = 0 for at least one edge e = uv ∈ W . For every such edge we update the pointers at u. The algorithm stops when π[s] = ∅; we show below that an augmenting path or cycle in Hπ,ρ exists as long as this is not the case. The algorithm is listed as Algorithm 1. We continue with analyzing its correctness and running time. Algorithm 1: Augmenting path algorithm for stable flows Initialize π, ρ. while π[s] 6= ∅ do Let W be an s-t-path or cycle in Hπ,ρ . Let ∆ := mine∈W cf (e). Augment f by ∆ along W . while ∃ uv ∈ EHπ,ρ with cf (uv) = 0 do UpdatePointers (u) 3.2 procedure UpdatePointers (v) if π[v] 6= ∅ then repeat Advance (π[v]) w := head(π[v]) until rw (π[v]) < rw (ρ[w]) or π[v] = ∅; if π[v] = ∅ and ρ[v] 6= ∗ then Advance (ρ[v]) u := tail(ρ[v]) if π[u] = ρ[v] then UpdatePointers (u) Analysis We now analyze the correctness of the algorithm, using the following notation. We say the proposal pointer π[v] has reached at least edge vw if rv (π[v]) ≥ rv (vw). We say π[v] has passed the edge vw if rv (π[v]) > rv (vw). We use analogous terms for the refusal pointer ρ[v] with reversed inequality signs, respectively. Lemma 1. At any point in the algorithm, if rv (uv) > rv (ρ[v]) then π[u] 6= uv and f (uv) = 0. 7 Proof. Consider the time τ when ρ[v] reaches uv. If π[u] = uv at that time, then π[u] was advanced and hence will never point to uv at any time later than τ . If π[u] had not reached uv at time τ , then the pointer will skip over uv once it reaches it, because rv (ρ[v]) ≤ rv (uv) at any time later than τ . Hence f (vw) is never increased after time τ . Now consider the time τ ′ > τ when the refusal pointer of v is advanced from uv to some u′ v. Note that this only happens when UpdatePointers(v) is called because cf (rev(uv)) = 0. This implies f (uv) = 0 for time τ ′ and any time later than that. ⊓ ⊔ Lemma 2. At the beginning of any iteration of the outer while loop, the graph Hπ,ρ contains an s-t-path or a cycle. Proof. Consider any v ∈ V \ {s, t}. We show that if v has an incoming edge in Hπ,ρ , then it also has an outgoing edge. By contradiction assume that v has an incoming but no outgoing edge in Hπ,ρ . Note that the only situation in which v has no outgoing edge is when ρ[v] = ∗. By Lemma 1, this implies f (uv) = 0 and π[u] 6= uv for all incoming edges uv of v in D. As f is a flow, also f (vw) = 0 for all outgoing edges vw of v in D. Thus, cf (rev(vw)) = 0 and ρ[w] 6= vw is guaranteed by the run of the inner while loop in the preceding iteration. Hence π[v] = ∅ and ρ[w] 6= vw for all w, implying that v has no incoming edge, yielding the desired contradiction. Now observe that π[s] 6= ∅ ensures that s also has an outgoing edge in Hπ,ρ . Thus, we can start a walk at s and extend it until we visit a vertex as second time, closing a cycle, or until we reach t having found an s-t-path. This concludes the proof of the lemma. ⊓ ⊔ Theorem 2. Algorithm 1 computes a stable flow in polynomial time. Proof. We start our proof with a simple observation. Claim. If f (vw) < c(vw) and π[v] has passed vw, then w 6= t and ρ[w] has reached at least vw. Proof. Consider the time when π[v] was advanced beyond vw. The update of π[v] can either happen because ρ[w] reaches vw, or because cf (vw) = 0. In the former case, we are done. In the latter case, f (vw) must have been decreased after π[v] passed vw. This can only happen while ρ[w] = vw.  Now assume by contradiction there is a walk W = hv1 , v2 , . . . , vk i blocking f . We apply the above claim to the edges of the walk to obtain the following. Claim. For every i ∈ {1, . . . , k − 1}, the pointer π[vi ] has passed vi vi+1 , i.e., rvi (π[vi ]) > rvi (vi vi+1 ). Proof. We show the claim by induction on i. First consider the case i = 1. Due to point 2 in Definition 2, either v1 = s or rv1 (v1 v2 ) < rv1 (v1 w) for some v1 w ∈ E with f (v1 w) > 0. In the former case, the termination criterion of the algorihtm implies π[s] = ∅. In the latter case, f (v1 w) > 0 implies that π[v1 ] has at least reached v1 w and thus passed v1 v2 . 8 Now consider any i ∈ {2, . . . , k − 1}. Note that by induction hypothesis π[vi−1 ] has passed vi−1 vi . Furthermore f (vi−1 vi ) < c(vi−1 vi ) because no edge of W is saturated. Hence, the first claim implies that ρ[vi ] must have reached vi−1 vi . In particular, ρ[vi ] 6= ∅ and hence π[vi ] = ∅, completing the induction and proving the claim.  Now consider the vertex vk . Due to point 3 in Definition 2, either vk = t or rvk (vk−1 vk ) < rvk (uvk ) for some uvk ∈ E with f (uvk ) > 0. Note that, due to the second claim, π[vk−1 ] has passed vk−1 vk . Furthermore f (vk−1 vk ) < c(vk−1 vk ) as the blocking walk W is unsaturated. Hence, by the first claim, vk 6= t and ρ[vk ] has reached at least vk−1 vk . But then ρ[vk ] has passed uvk before, implying f (uvk ) = 0, a contradiction. Running time. In every iteration, the residual capacity of at least one edge drops to 0 and the corresponding pointer is advanced. As pointers move only in one direction the total number of such advances (and hence the total number of iterations) is bounded by 2|E|. Finding an augmenting path or cycle in Hπ,ρ can be done in time O(|V |). Hence the total the running time of the algorithm is bounded by O(|E||V |). We remark that a more sophisticated implementation using the dynamic-tree data structure can reduce this running time to O(|E| log |V |). However, since our primary aim in this article is to provide new and simple approaches, we omit further investigation of this complication. ⊓ ⊔ 4 Stable flows with restricted intervals Various stable matching problems have been tackled under the assumption that restricted edges are present in the graph [9,14]. A restricted edge can be forced or forbidden, and the aim is to find a stable matching that contains all forced edges, while it avoids all forbidden edges. Such edges correspond to transactions that are particularly desirable or undesirable from a social welfare perspective, but it is undesirable or impossible to push the participating agents directly to use or avoid the edges. We thus look for a stable solution in which the edge restrictions are met voluntarily. A natural way to generalize the notion of a restricted edge to the stable flow setting is to require the flow value on any given edge to be within a certain interval. To this end, we introduce a lower capacity function l : E → R≥0 and an upper capacity function u : E → R≥0 . Problem 1 sf restricted Input: I = (D, c, O, l, u); an sf instance (D, c, O), a lower capacity function l : E → R≥0 and an upper capacity function u : E → R≥0 . Question: Is there a stable flow f so that l(uv) ≤ f (uv) ≤ u(uv) for all uv ∈ E? Note that in the above definition, the upper bound u does not affect blocking walks, i.e., a blocking walk can use edge uv, even if f (uv) = u(uv) < c(uv) holds. In the following, we describe a polynomial algorithm that finds a stable flow with restricted intervals or proves its nonexistence. We start with an instance 9 modification step in Section 4.1. Then we prove that restricted intervals can be handled by small modifications of the network that reduce the problem to the unrestricted version of sf. We show this separately for the case that only forced edges occur, which we call sf forced, in Section 4.2 and for the case that only forbidden edges occur, called sf forbidden, in Section 4.3. It is straightforward to see that both results can be combined to solve the general version of sf restricted. We mention that it is also possible to solve sf restricted by transforming the instance first into a weighted sf instance, and then into a weighted stable allocation instance, both solvable in O(|E|2 log |V |) time [8]. The advantages of our method are that it can be applied directly to the sf restricted instance and it also gives us insights to solving the stable roommate problem with restricted edges directly, as pointed out at the end of Sections 4.2 and 4.3. Moreover, our running time is only O(|P ||E| log |V |). 4.1 Problem simplification sf restricted generalizes the natural notion of requiring flow to use an edge to its full capacity (by setting l(uv) = c(uv)) and of requiring flow not to use an edge at all (by setting u(uv) = 0), which corresponds to the traditional cases of forced and forbidden edges. In fact, it turns out that any given instance of sf restricted can be transformed to an equivalent instance in which l(uv), u(uv) ∈ {0, c(uv)} for all uv ∈ E. If l(uv) > u(uv) for some uv ∈ E, then sf restricted trivially has no solution. Otherwise, we execute a small technical change for the sake of simpler proofs later. As shown in Fig. 2, we substitute each edge uv ∈ E with three parallel paths (to avoid parallel edges): hu, x, vi, hu, y, vi and hu, z, vi. While uy and yv take over the rank of uv, ux and xv are ranked just above, uz and zv are ranked just below uy and yv. The capacities of the introduced edges are as follows. l(ux) = l(xv) = u(ux) = u(xv) = c(ux) = c(xv) = l(uv) l(uy) = l(yv) = 0 u(uy) = u(yv) = c(uy) = c(yv) = u(uv)− l(uv) l(uz) = l(zv) = u(uz) = u(zv) = 0 c(uz) = c(zv) = c(uv)− u(uv) In words, this splitting is substituting an edge uv with lower and upper capacities by three paths: the first path hu, x, vi forcing l(uv) amount of flow, the last path hu, z, vi forbidding u(uv) amount of flow and the middle path hu, y, vi being an unrestricted path. It is straightforward to see that the solutions of sf restricted on the original instance are in one-to-one correspondence with the solutions of sf restricted on the modified instance and the input size is increased by at most a constant factor. Henceforth, we will assume that our instances are of this form and use the notation Q := {uv ∈ E : l(uv) = c(uv)} and P := {uv ∈ E : u(uv) = 0} for the sets of forced and forbidden edges, respectively. 10 x a u b u v a − 0.5 a a + 0.5 y b − 0.5 b b + 0.5 v z Fig. 2. Splitting an edge with lower and upper capacities. Due to the preferences and capacities defined on the modified instance, the first l(uv) units of flow will saturate hu, x, vi, then, the coming u(uv) − l(uv) units of flow will saturate hu, y, vi, and the remaining c(uv) − u(uv) units of flow will use hu, z, vi. s t ru (uv) u ru (uv) rv (uv) v rv (uv) u v Fig. 3. Substituting forced edge uv by edges sv and ut in D′ . 4.2 Forced edges Let us first consider a single forbidden edge uv. We modify graph D to derive a graph D′ . The modification consists of deleting the forced edge uv and introducing two new edges sv and ut to substitute it. Both new edges have capacity c(uv) and take over uv’s rank on u’s and on v’s preference lists, respectively, as shown in Fig. 3. Lemma 3. Let f be a flow in D with f (uv) = c(uv). Let f ′ be the flow in D′ derived by setting f ′ (sv) = f ′ (ut) = f (uv) and f ′ (e) = f (e) for all e ∈ E \ {uv}. Then f is stable if and only if f ′ is stable. Proof. We first observe that the set of edges not saturated by f in D is the same as the set of edges not saturated by f ′ in D′ . This is because uv is saturated by f and ut, sv are saturated by f ′ . Now let u′ v ′ be such an unsaturated edge. Note that there is an edge u′ w′ with ru′ (u′ w) > ru′ (u′ v ′ ) and f (u′ w) > 0 if and only if there is an edge u′ w′ with ru′ (u′ w′ ) > ru′ (u′ v ′ ) and f ′ (u′ w′ ) > 0. The same is true for incoming edges at v ′ dominated by u′ v ′ . In other words, the dominance situation at all vertices is the same for f and f ′ . This implies that any blocking walk for f in D is a blocking walk for f ′ in D′ and vice versa. ⊓ ⊔ Repeated application of Lemma 3 in conjunction with the Rural Hospital Theorem (Theorem 1) allows us to transform any instance of sf forced into a standard stable flow instance. Theorem 3. sf forced can be solved in time O(|E| log |V |). 11 Proof. Observe that we can simultaneously replace all edges uv ∈ Q by the gadget sv, ut described above and obtain a graph DQ . Iterative application of Lemma 3 implies that a flow in D saturating all edges in Q is stable if and only if the corresponding flow in DQ , which satisfies all added edges sv, ut for all uv ∈ Q, is stable. As DQ contains at most twice as many edges as D, we can compute a stable flow f ′ in DQ in time O(|E| log |V |). If f ′ (sv) = f ′ (ut) = c(uv) for all uv ∈ Q, the corresponding flow in D with f (uv) = f ′ (sv) is a stable flow in D saturating all edges in Q. Now assume f ′ (sv) < c(uv) or f ′ (ut) < c(uv) for some uv ∈ Q. Then by Theorem 1, any stable flow in DQ has this property. Hence, no stable flow in D saturates all edges in Q. ⊓ ⊔ Stable matchings with forced edges The technique described above also provides a fairly simple method for the stable matching problem with forced edges even in non-bipartite graphs, because the Rural Hospitals Theorem holds for that case as well. After deleting each forced edge uw ∈ Q from the graph, we add uws and ut w edges to each of the pairs, where ws and ut are newly introduced vertices. These edges take over the rank of uw. Unlike in sf, here we need to introduce two separate dummy vertices to each forced edge, simply due to the matching constraints. There is a stable matching containing all forced edges if and only if an arbitrary stable matching covers all of these new vertices ws and ut . The running time of this algorithm is O(|E|), since it is sufficient to construct a single stable solution in an instance with at most 2|V | vertices. More vertices cannot occur, because in a matching problem more than one forced edge incident to a vertex immediately implies infeasibility. 4.3 Forbidden edges In order to handle sf forbidden, we present here an argumentation of the same structure as in the previous section. First, we show how to solve the problem of stable flows with a single forbidden edge by solving two instances on two different extended networks. Then we show how these constructions can be used to obtain an algorithm for the general case. Notation For e = uv ∈ P , we define edges e+ = sv and e− = ut. We set c(e+ ) = ε > 0 and set rv (e+ ) = rv (e) − 0.5, i.e., e+ occurs on v’s preference list exactly before e. Likewise, we set c(e− ) = ε and ru (e− ) = ru (e) − 0.5, i.e., e− occurs on u’s preference list exactly before e. For F ⊆ P we define E + (F ) := {e+ : e ∈ F } and E − (F ) := {e− : e ∈ F }. A single forbidden edge Assume that P = {e0 } for a single edge e0 . First we present two modified instances that will come handy when solving sf forbidden. The first is the graph D+ , which we obtain from D by adding an edge e+ 0 to E. Similarly, we obtain the graph D− by adding e− 0 to E. Both graphs are illustrated in Fig. 4. 12 s t rv (uv) − 0.5 u rv (uv) ru (uv) − 0.5 v u ru (uv) v Fig. 4. Adding edges sv in D+ and ut in D− to forbidden edge uv. In the following, we characterize sf forbidden instances with the help of D+ and D− . Our claim is that sf forbidden in D has a solution if and only if there is a stable flow f + in D+ with f + (e+ ) = 0 or there is a stable flow f − in D− with f − (e− ) = 0. These existence problems can be solved easily in polynomial time, since all stable flows have the same value on edges incident to terminal vertices by Theorem 1. We will use the following straightforward observation. It follows from the fact that deletion of an edge that does not carry any flow in a stable flow neither affects flow conversation nor can create blocking walks. Observation 1. If f (e) = 0 for an edge e ∈ E and stable flow f in D, then f remains stable in D \ e as well. Lemma 4. Let f be a flow in D = (V, E) with f (e0 ) = 0. Then f is a stable flow in D if and only if at least one of the following conditions hold: Property 1: The flow f + with f + (e) = f (e) for all e ∈ E and f + (e+ 0 ) = 0 is stable in (V, E ∪ {e+ }). 0 Property 2: The flow f − with f − (e) = f (e) for all e ∈ E and f − (e− 0 ) = 0 is stable in (V, E ∪ {e− }). 0 Proof. Sufficiency of any of the two properties follows immediately from Obser− vation 1 by deletion of e+ 0 or e0 , respectively. To see necessity, assume that f is a stable flow in D. By contradiction assume that neither f + nor f − is stable. Then there is a blocking walk W + for f + and a blocking walk W − for f − . Since W + is not a blocking walk for f in D, it must − start with e+ is not a blocking walk for f in D, it must end with 0 . Since W − ′+ + ′− e0 . Let W := W \ {e+ } := W − \ {e− 0 and W 0 }. Consider the concatenation ′− ′+ W := W ◦ e0 ◦ W . Note that W is an unsaturated walk in D. If W ′− 6= ∅, then W starts with the same edge as W − and thus dominates f at the start. If W ′− = ∅, then W starts with e0 , which dominates any flow-carrying edge dominated by ut, and hence it dominates f at the start also in this case. By analogous arguments it follows that W also dominates f at the end. Hence W is a blocking walk, contradicting the stability of f . We conclude that at least one of Properties 1 or 2 must be true if f is stable. ⊓ ⊔ 13 General case The method described above can be used to solve sf forbidden if |P | = 1: We simply compute stable flows f + in D+ and f − in D− . If f + (e+ ) = 0 or f − (e− ) = 0, we have found a stable flow in f avoiding the forbidden edge e0 . More generally, for |P | > 1, Lemma 4 guarantees that we can add either e+ or e− for each forbidden edge e ∈ P without destroying any stable flow avoiding the forbidden edges. However, it is not straightforward to decide for which forbidden edges to add e+ and for which to add e− . Simply applying our method greedily for each forbidden edge does not lead to correct results, since the steps can impact each other, as shown below. After our example we describe how to resolve this issue and obtain a polynomial time algorithm for sf forbidden. Sample instance for stable flows with forbidden edges. In the unit-capacity network of Fig. 5, the dashed edges u1 v1 and u2 v2 form P , while the gray edges are the ones added to the graph later. The instance admits two stable flows, both of them saturating all black edges from s and to t. In the rest of the graph, stable flow f1 is denoted by purple, and it sends one unit of flow along the edges in {u1 v2 , u2 v1 , u3 v3 }, while stable flow f2 is denoted by green, and it sends one unit of flow along the edges in f2 = {u1 v1 , u2 v3 , u3 v2 }. Since u1 v1 ∈ P is used by f2 , only f1 avoids P . Both properties in Lemma 4 hold for u2 v2 , while for u1 v1 , only Property 1 holds. Yet combining Property 2 for u2 v2 and Property 1 for u1 v1 and thus adding sv1 and u2 t to the graph (as the gray edges indicate) results in misreporting that no stable flow exists that avoids P . This is because the only stable flow in the network with sv1 and u2 t edges saturates edges su1 , su2 , su3 , sv1 , u1 v2 , u3 v3 , v1 t, v2 t, v3 t and u2 t. For any A, B ⊆ E, let us denote by D[A|B] the network with vertices V and edges E ∪ E + (A) ∪ E − (B). Our algorithm maintains a partition of the forbidden edges in two groups P + and P − . Initially P + = P and P − = ∅. In every iteration, we compute a stable flow f in D[P + |P − ]. If f (e+ ) > 0 for some e ∈ P + , we move e from P + to P − and repeat. If f (e+ ) = 0 for all e ∈ P + but f (e− ) > 0 for some e ∈ P − , we will show that no stable flow avoiding all forbidden edges exists in D. Finally, if we reach a flow f where neither of these two things happens, f is a stable flow in D avoiding all forbidden edges. For the analysis of Algorithm 2, the following consequence of the augmenting path algorithm presented earlier (Algorithm 1) is helpful. It allows us to prove an important invariant of the Algorithm 2. Lemma 5. Let f be a stable flow in D. Let f ′ be a stable flow in D′ = D − e′ for some edge e′ ∈ δ + (s). Then f ′ (e) ≥ f (e) for all e ∈ δ + (s) \ {e′ }. Proof. We run Algorithm 1 on the networks D and D′ , respectively, to obtain stable flows f and f ′ . Recall that Algorithm 1 uses an arbitrary but fixed order of the outgoing edges of s. We choose this order such that e′ comes last for the run in D. Observe that the algorithm run identically on both instances until π[s] reaches e′ for the run on D and terminates on D′ , respectively. Thus the flow f¯ computed by the algorithm on D right before π[s] is advanced to e′ is identical 14 s u1 u2 1 2 3 2 u3 1 1 2 2 1 1.5 1.5 2 1 v1 2 1 3 v2 v3 t Fig. 5. The greedy algorithm fails to report the existence of a stable solution in this instance. Algorithm 2: Stable flow with forbidden edges Initialize P + = P and P − = ∅. repeat Compute a stable flow f in D[P + |P − ]. if ∃ e ∈ P + with f (e+ ) > 0 then P + := P + \ {e} and P − := P − ∪ {e} until f (e+ ) = 0 for all e ∈ P + ; if ∃ e ∈ P − with f (e− ) > 0 then return ∅ else return f to f ′ . Further note that the algorithm does not increase the flow value on any edge e ∈ δ + (s) \ {e′ } after π[s] has passed e, which comes before e′ by our choice of preferences. Hence f (e) ≤ f¯(e) = f ′ (e). ⊓ ⊔ Lemma 6. Algorithm 2 maintains the following invariant: There is a stable flow in D avoiding P if and only if there is a stable flow in D[∅|P − ] avoiding P + ∪ E − (P − ). Proof. Clearly, the invariant holds initially as P + = P and P − = ∅. Now consider any later iteration of the algorithm in which P + , P − are changed. Let f0 be the computed stable flow in D[P + |P − ] and let e0 be the edge with f0 (e+ 0) > 0 + − + − found in that iteration. Let Pold , Pold and Pnew , Pnew denote the partition before + − + − and after the update, i.e., Pnew = Pold \ {e0 } and Pnew = Pold ∪ {e0 }. 15 − + − If there is a stable flow in D[∅|Pnew ] avoiding Pnew ∪ E − (Pnew ), then this flow + − − − also avoids P , as for every e ∈ P either e ∈ Pnew or e ∈ E (Pnew ) (note that − in the latter case e dominates e at the start and ends at a terminal). Conversely, if there is a stable flow in D avoiding P , then by induction − + − hypothesis there is a stable flow f in D[∅|Pold ] avoiding Pold ∪ E − (Pold ). Note + + that e0 starts at a terminal and recall that f0 (e0 ) > 0 for the stable flow + − f0 in D[Pold |Pold ]. By repeated application of Lemma 5, deleting every e+ ∈ + + − + E (Pold \{e0 }) from D[Pold |Pold ], we obtain that f ′ (e+ 0 ) > 0 for every stable flow − ′ f in D[{e0 }|Pold ]. In particular, this means that Property 1 of Lemma 4 fails for f and e0 . Therefore, by Lemma 4, Property 2 must hold for f , i.e., the extension − − − of f to D[∅|Pold ∪ {e− i }] = D[∅|Pnew ] with f (e0 ) = 0 is a stable flow avoiding + − − + − − + − − Pold ∪ E (Pold ) ∪ {e0 }. As Pnew ⊆ Pold and E (Pnew ) = E − (Pold ) ∪ {e− 0 }, this completes the induction. ⊓ ⊔ Lemma 7. If Algorithm 2 returns ∅, then no stable flow in D avoids P . Proof. If the algorithm returns ∅, then the algorithm computed a stable flow f in D[P + |P − ] with f (e+ ) = 0 for all e ∈ P + but f (e− ) > 0 for some e ∈ P − . Note that by Observation 1, the restriction of f is also stable in D[∅|P − ]. As e− is incident to a terminal, f (e− ) > 0 for every stable flow in D[∅|P − ]. Therefore, by Lemma 6, there is no stable flow in D avoiding P . ⊓ ⊔ Lemma 8. If Algorithm 2 returns flow f , then f is stable in D and it avoids P . Proof. If the algorithm returns flow f then f (e+ ) = 0 for all e ∈ P + and f (e− ) = 0 for all e ∈ P − . Hence the restriction of f to E is stable and avoids P+ ∪ P− = P. ⊓ ⊔ The correctness of Algorithm 2 follows immediately from the above lemmas. The running time of this algorithm is bounded by O(|P ||E| log |V |), as each stable flow f can be computed in O(|E| log |V |) time and in each round either |P + | decreases by one or the algorithm terminates. Note that both forced and forbidden edges in the same instance can be handled by our two algorithms, applying them one after the other. Finally, we can conclude the following result: Theorem 4. sf restricted can be solved in O(|P ||E| log |V |) time. Stable matchings with forbidden edges As before, we finish this part with the direct interpretation of our results in sr and sm instances. To each forbidden edge uw ∈ P we introduce edges uws or ut w. According to the preference lists, they are slightly better than uw itself. A stable matching with forbidden edges exists, if there is a suitable set of these uws and ut w edges such that all ws and ut are unmatched. Our algorithm for several forbidden edges runs in O(|P ||E|) time, because computing stable solutions in each of the |P | or less rounds takes only O(|E|) time in sm. With this running time, it is somewhat slower than the best known method [9] that requires only O(|E|) time, but it is a reasonable assumption that the number of forbidden edges is small. 16 5 Stable multicommodity flows A multicommodity network (D, ci , c), 1 ≤ i ≤ n consists of a directed graph D = (V, E), non-negative commodity capacity functions ci : E → R≥0 for all the n commodities and a non-negative cumulative capacity function c : E → R≥0 on E. For every commodity i, there is a source si ∈ V and a sink ti ∈ V , also referred to as the terminals of commodity i. Definition 3 (multicommodity flow). A set of functions f i : E → R≥0 , 1 ≤ i ≤ n is a multicommodity flow if it fulfills all of the following requirements: 1. capacity constraints for commodities: f i (uv) ≤ ci (uv) for all uv ∈ E and commodity i; 2. cumulative P capacity constraints: f (uv) = 1≤i≤n f i (uv) ≤ c(uv) for all uv ∈ E; 3. P flow conservation:P i i i i vw∈E f (vw) for all v ∈ V \ {s , t }. uv∈E f (uv) = The concept of stability was extended to multicommodity flows by Király and Pap [24]. A stable multicommodity flow instance I = (D, ci , c, OE , OVi ), 1 ≤ i ≤ n comprises a network (D, ci , c), 1 ≤ i ≤ n, edge preferences OE over commodities, and vertex preferences OVi , 1 ≤ i ≤ n over incident edges for commodity i. Each edge uv ranks all commodities in a strict order of preference. Separately for every commodity i, each non-terminal vertex ranks its incoming and also its outgoing edges strictly with respect to commodity i. Note that these preference orderings of v can be different for different commodities and they do not depend on the edge preferences OE over the commodities. If edge uv prefers commodity i to commodity j, then we write ruv (i) < ruv (j). Analogously, if vertex v prefers i i edge vw to vz with respect to commodity i, then we write rP v (vw) < rv (vz). We i i i denote the flow value with respect to commodity i by f = u∈V f (s u). Definition 4 (stable multicommodity flow). A directed walk W = hv1 , v2 , ..., vk i blocks flow f with respect to commodity i if all of the following properties hold: 1. f i (vj vj+1 ) < ci (vj vj+1 ) for each edge vj vj+1 , j = 1, ..., k − 1; 2. v1 = si or there is an edge v1 u such that f i (v1 u) > 0 and riv1 (v1 v2 ) < riv1 (v1 u); 3. vk = ti or there is an edge wvk such that f i (wvk ) > 0 and rivk (vk−1 vk ) < rivk (wvk ); ′ 4. if f (vj vj+1 ) = c(vj vj+1 ), then there is a commodity i′ such that f i (vj vj+1 ) > ′ 0 and rvj vj+1 (i) < rvj vj+1 (i ). A multicommodity flow is stable, if there is no blocking walk with respect to any commodity. Note that due to point 4, this definition allows saturated edges to occur in a blocking walk with respect to commodity i, provided that these edges are inclined to trade in some of their forwarded commodities for more flow of commodity i. On 17 the other hand, the role of edge preferences is limited: blocking walks still must start at vertices who are willing to reroute or send extra flow along the first edge of the walk according to their vertex preferences with respect to commodity i. Problem 2 smf Input: I = (D, ci , c, OE , OVi ), 1 ≤ i ≤ n ; a directed multicommodity network (D, ci , c), 1 ≤ i ≤ n, edge preferences over commodities OE and vertex preferences over incident edges OVi , 1 ≤ i ≤ n. Question: Is there a stable multicommodity flow? Theorem 5 (Király, Pap [24]). A stable multicommodity flow exists for any instance, but it is PPAD-hard to find. PPAD-hardness is a somewhat weaker evidence of intractability than NPhardness [27]. Király and Pap use a polyhedral version of Sperner’s lemma [23] to prove this existence result. Note that smf is one of the very few problems in stability [3] where a stable solution exists, but no extension of the Gale-Shapley algorithm is known to solve it – not even a variant with exponential running time. 5.1 Problem simplification The definition of smf given above involves many distinct components and constraints. It is natural to investigate how far the model can be simplified without losing any of its generality. It turns out that the majority of the commodityspecific input data can be dropped, as shown by Theorem 6. This result not only simplifies the instance, but it also sheds light to the most important characteristic of the problem, which seems to be the preference ordering of edges over commodities. Theorem 6. There is a polynomial-time transformation that, given an instance I of smf, constructs an instance I ′ of smf with the following properties: 1. all commodities have the same source and sink, 2. at each vertex, the preference lists are identical for all commodities, 3. there are no commodity-specific edge capacities, and there is a polynomially computable bijection between the stable multicommodity flows of I and the stable multicommodity flows of I ′ . The bijection preserves integrality. Proof. We present the construction in three steps, each ensuring one of the properties without destroying those established before. 1. All commodities have the same source and sink. We introduce two new super terminals s∗ and t∗ . These will take the place of all commodity-specific sources and sinks. For every commodity i and its terminals si and ti , P we introduce the edges s∗ si and ti t∗ with P capacities i ∗ i ∗ i c (s s ) = c(s s ) = e∈δ+ (si ) c(e) and ci (ti t∗ ) = c(ti t∗ ) = e∈δ− (ti ) c(e). 18 e′1 e′2 u ru (uv) rv (uv) v u e′1 e′2 ve′ e′n v ve′′ e′n Fig. 6. The gadget ensuring that the preference lists of each vertex are identical for all commodities. We assign arbitrary ranks to the edges originally incident to si or ti and put s∗ si and ti t∗ to the end of the preference list of si and ti for all commodities. Finally, we set s∗ and t∗ as source and sink for every commodity i. It is easy to verify that a flow f is stable in the original network D if and only if the natural extension of f to the added edges is a stable flow. 2. At each vertex, the preference lists over the edges are identical for all commodities. The main idea here is to substitute every edge by a gadget that separates different commodities. Then the edges can be ranked in a single preference list, since each of them is designated to carry its own commodity only and for edges carrying a specific commodity, the list on other edges is irrelevant. For any e ∈ E, we remove e = uv from the graph and replace it by the construction shown in Fig. 6. We introduce two new vertices ve′ and ve′′ and we add the edge ve′ ve′′ with c(ve′ ve′′ ) = ci (ve′ ve′′ ) = c(e) for every commodity i. We also add n new edges e′i for 1 ≤ i ≤ n from u to ve′ . We set c(e′i ) = ci (e′i ) = ci (e), cj (e′i ) = 0 for j 6= i, and ru (e′i ) = |E|i+riu (e). We choose rve′ (e′i ) arbitrarily. Likewise, we add n new edges e′′i for 1 ≤ i ≤ n from ve′′ to v. We set c(e′′i ) = ci (e′′i ) = ci (e), cj (e′′i ) = 0 for j 6= i, and rv (e′′i ) = |E|i + riv (e). We choose rve′′ (e′i ) arbitrarily. Let D′ be the network resulting from this modification. If f is a stable flow in D, then we define a flow f ′ in D′ as follows. For every commodity i and every e ∈ E, we set f ′i (e′i ) = f ′i (ve′ ve′′ ) = f ′i (e′′i ) = f i (e) and we set f ′j (e′i ) = f ′j (e′′i ) = 0 for j 6= i. It is easy to check that f ′ is a stable flow in D′ and that the mapping from f to f ′ is a bijection between stable flows in D and D′ . 3. There are no commodity-specific capacities. Finally we ensure that ci (e) = c(e) for all i and all e ∈ E, which implies that the commodity-specific capacities do not play any role. To this end, we introduce a new commodity i∗ . Each edge will be replaced by a gadget in which the capacity on a specific commodity translates into an edge willing to carry i∗ rather than forwarding more flow of the specific commodity. Note that our previous transformation already ensures that for every edge e ∈ E, one of the following is true: Either ci (e) = c(e) for all i, or there is an i such that ci (e) = c(e) and cj (e) = 0 for all j 6= i. We only have to deal with the latter case, that is, edge e being designated to carry commodity i only, up to its full capacity. Let e, i be such a pair. 19 s u′′ i∗ , ... 2 i∗ , ... 1 2 v ′′ i∗ , ... i , ... 1 ru (uv) rv (uv) v u ru (uv) ∗ 2 ..., i t 1 ∗ u i∗ , ... u′ 1 i, i∗ , ... 2 v′ rv (uv) ..., i∗ v Fig. 7. The gadget ensuring that there are no commodity-specific capacities. We replace e = uv by the gadget He,i , depicted in Fig. 7. We introduce four new vertices u′ , u′′ , v ′ and v ′′ . We add the edges uu′ , u′ v ′ , v ′ v, su′′ , u′′ v ′′ , v ′′ t, u′′ u′ and v ′ v ′′ , all with capacity c(e). For the edges su′′ , u′′ v ′′ , v ′′ t, u′′ u′ and v ′ v ′′ the new commodity i∗ is on top of their preference list, followed by all other commodities in arbitrary order. For edge u′ v ′ commodity i is first on the list, i∗ is second, followed by all other commodities in arbitrary order. For the edges uu′ and v ′ v, commodity i∗ is last on the list, the rank of the other commodities is arbitrary. For the vertex preferences, we set ru′′ (u′′ u′ ) < ru′′ (u′′ v ′′ ) and rv′′ (v ′ v ′′ ) < rv′′ (u′′ v ′′ ), as well as ru′ (u′′ u′ ) < ru′ (uu′ ) and rv′ (v ′ v ′′ ) < rv′ (v ′ v). We further set ru (uu′ ) = ru (e) and rv (v ′ v) = rv (e). Let us denote the modified network by D̄. For a stable flow f in the original network D, we define a flow f¯ in D̄ as follows. For edges e that were not replaced by a gadget in D̄, we set f¯i (e) = f i (e) for all i. For every e that was replaced by a gadget (because ci (e) = c(e) and cj (e) = 0 for all j 6= i), we set the flow values within the gadget as follows: For the new commodity i∗ we set f¯i (uu′ ) = f¯i (u′ v ′ ) = f¯i (vv ′ ) = f i (e). We set f¯i∗ (u′′ u′ ) = f¯i∗ (u′ v ′ ) = f¯i∗ (v ′ v ′′ ) = c(e) − f i (e), so that u′ v ′ is saturated with its two top-ranked commodities. Furthermore we set f¯i∗ (su′′ ) = f¯i∗ (v ′′ t) = c(e), and f¯i∗ (u′′ v ′′ ) = f i (e). All other flow values are set to zero within the gadget (recall that f j (e) = 0 for all j 6= i). Claim. Flow f¯ is stable in D̄. Proof. We have constructed f¯ so that it respects all capacities and fulfills flow conservation in D̄. To see that f¯ is a stable flow, assume by contradiction that there is an f¯-blocking walk W̄ for some commodity j. First assume W̄ starts in the interior of a gadget, i.e., with an arc different from uu′ . We eliminate the edges of the gadget one by one to show that this is not possible. • W̄ cannot start with su′′ , as this edge is saturated with its most preferred commodity i∗ . • W̄ also cannot start with u′′ v ′′ , u′ v ′ , or v ′ v, as these edges are the lastchoice outgoing edges on the preference lists of u′′ , u′ and v ′ respectively. • If W̄ starts at u′′ u′ , then j = i∗ , because this is the only commodity on the dominated edge u′′ v ′′ . But then W̄ must end at u′ because u′ v ′ 20 is saturated with commodities it ranks at least as high as i∗ . However, ∗ f¯i (uu′ ) = 0, so W does not dominate f at u′ . ∗ • Finally, if W̄ starts with v ′ v ′′ , then j 6= i∗ because f¯i (v ′ v) = 0. But it can neither end at v ′′ as v ′′ only receives commodity i∗ from u′′ v ′′ , nor can it continue as v ′′ t is saturated with its favorite commodity. We conclude that W̄ cannot start in the interior of a gadget. By a symmetric argument, W̄ cannot end in the interior of a gadget. Thus, if W̄ contains any edge of a gadget He,i , it must traverse the edges uu′ , u′ v ′ , v ′ v of the gadget. As u′ v ′ is saturated with commodities i and i∗ , ∗ we conclude that j = i and c(e) − f i (e) = f¯i (u′ v ′ ) > 0. We replace all such segments uu′ , u′ v ′ , v ′ v from any traversed gadget He,i with the corresponding edge e and get a walk W in D. Because f i (e) < c(e) for all inserted edges, W is a blocking walk for f , contradicting the stability of f .  It is easy to see that the mapping defined by φ(f ) = f¯ is injective. We now show that it also preserves stability in both directions. Claim. For any stable flow y in D̄, there is a stable flow f in D with φ(f ) = y. Proof. Let y be a stable flow in D̄. Consider a gadget He,i . By contradic∗ ∗ ∗ tion assume y i (uu′ ) > 0. Then y i (su′′ ) = y i (u′′ u′ ) = c(e) as otherwise ′′ ′′ ′ either hs, u , ui or hu , u i is a blocking walk for commodity i∗ . But then ∗ ∗ ∗ y i (uu′ ) + y i (u′′ u′ ) > c(e) ≥ y i (u′ v ′ ), contradicting flow conservation. ∗ i∗ ′ Hence y (uu ) = 0 and, by a symmetric argument, y i (v ′ v) = 0. As no ∗ flow of commodity i enters or leaves He,i , and the path hs, u′′ , v ′′ , ti is not ∗ ∗ blocking, we conclude that y i (su′′ ) = y i (v ′′ t) = c(e). By flow conserva∗ i∗ ′′ ′ i∗ ′ ′ i∗ ′ ′′ tion, y (u u ) = y (u v ) = y (v v ) = c(e) − y i (u′′ v ′′ ). Since the path ′′ ′ ′ ′′ hu , u , v , v i is not blocking and i is the only commodity that comes before ∗ i∗ on an edge of that path, we conclude that y i (u′ v ′ )+y i (u′ v ′ ) = c(e). Hence, ∗ i ′ i ′ ′ by flow conservation, y (uu ) = y (u v ) = y i (v ′ v) = c(e) − y i (v ′ v ′′ ), and j ′ ∗ ′ y (e ) = 0 for all j ∈ / {i, i } and all edges e in the gadget He,i . Now define f by setting f i (e) = y i (u′ v ′ ) for every gadget He,i ) in D̄ and f i (e) = y i (e) for all edges in E ∩ED̄ and all commodities i. Using the above observations, it is easy to check that φ(f ) = y and that f fulfills flow conservation and respects all capacity constraints (in particular f j (e) = y j (u′ v ′ ) = 0 for all j 6= i at any gadget He,i ). To see that f is a stable flow, assume by contradiction that there is a blocking walk W for f and commodity i. We obtain a walk W̄ in D̄ by replacing the edges of W with the corresponding gadgets He,i . At any such edge, f i (e) < c(e) because W is blocking with respect to i and i is the only commodity that can traverse e. Hence, y i (uu′ ) = y i (u′ v ′ ) = y i (v ′ v) < c(e). Also, as the preference lists of non-gadget vertices are the same in D and D̄, W̄ is indeed a blocking walk for y contradicting its stability. ⊓ ⊔ 5.2 Integral multicommodity stable flows Király and Pap [24] give an example instance with N commodities and N vertices, where no stable multicommodity flow exists with denominators at most N 21 u 2 3 2 2 2 1 1 3 1 v2 1 3,1 2 2 v1 1,2 1 1 1 2,3 1 2 2 v3 Fig. 8. The edge preferences are marked with colored labels in the middle of edges, while OVi is black and closer to the vertices. For all edges, c = 1. The purple edges can forward two commodities, while the black edges can carry only one commodity. for any integer N . Here we present a small and slightly modified version of that instance as an example and later use it as a gadget in our hardness proof. Example 1 ismf instance with no solution. We claim that the instance depicted in Fig. 8 admits no integer multicommodity flow. Vertex u is the only terminal vertex in the graph. Below we will distinguish two cases: 1) s1 = s2 = s3 = t1 = t2 = t3 = u (see Lemma 9) and 2) ∃i ∈ {1, 2, 3} : {si , ti } = ∅ (see Lemma 10). The edge capacities with respect to commodities are 1 for the commodities that appear in OE for the specific edge and 0 for the remaining commodities. All edges have cumulative capacity 1. The vertex preferences are the same for all commodities: v1 , v2 and v3 are inclined to receive and send the flow along the edges between themselves rather than trading with u. Each commodity i has a unique feasible cycle C i through u and it is easy to see that due to the choice of the ci functions, no other cycle or terminal-terminal path exists in the network. • C 1 = hu, v1 , v2 , v3 , ui • C 2 = hu, v2 , v3 , v1 , ui • C 3 = hu, v3 , v1 , v2 , ui Lemma 9. If s1 = s2 = s3 = t1 = t2 = t3 = u, then there is no integer stable flow. 22 Proof. First we show that the following fractional flow is stable. In this flow, each commodity i where i ∈ {1, 2, 3}, is sent along cycle C i with flow value 12 . g 3 (v1 v2 ) = g 1 (v1 v2 ) = g 1 (v2 v3 ) = g 2 (v2 v3 ) = g 2 (v3 v1 ) = g 3 (v3 v1 ) = g 1 (uv1 ) = g 1 (v3 u) = g 2 (uv2 ) = g 2 (uv1 ) = g 3 (uv3 ) = g 3 (uv2 ) = 1 2 1 2 Claim. No walk blocks g. Proof. It is enough to show that no walk W with respect to commodity 1 blocks g, as the instance is symmetric for all three commodities, and thus the nonexistence of blocking walks with respect to the other two commodities can be shown analogously. The only edges allowed to carry commodity 1 are the edges of C 1 , thus W ⊆ C 1 . Even though uv1 , v2 v3 and v3 u fulfill points 1-4 in Definition 4, v1 v2 is saturated and ranks commodity 1 last, violating point 4 in Definition 4.  Claim. No integral multicommodity flow is stable in the instance. Proof. Assume that there is an integral stable flow f in the instance. The empty flow cannot be f , because there is a cycle running through u for each commodity and such cycles block the empty flow. Without loss of generality we can now assume that C 1 is saturated by commodity 1: f 1 (uv1 ) = f 1 (v1 v2 ) = f 1 (v2 v3 ) = f 1 (v3 u) = 1, while all other flow values must be 0 due to commodity capacity constraints on edges. This flow is blocked by commodity 3 on the path hu, v3 , v1 , v2 , ui. It is easy to see that analogous arguments work for C 2 and C 3 as well. Thus, no integer stable flow exists in the graph.  ⊓ ⊔ Lemma 10. If u is a terminal for at most two out of the three commodities, then an integer stable flow exists. Proof. Let us now investigate the same instance with a slight modification: s1 = s2 = t1 = t2 = u, but {s3 , t3 } = ∅. Then, the following integer flow is stable: f 1 (uv1 ) = f 1 (v1 v2 ) = f 1 (v2 v3 ) = f 1 (v3 u) = 1. A blocking walk with respect to commodity 1 cannot exist, because all edges that can carry commodity 1 also carry it to their upper capacity. Commodity 2 could block along C 2 , but edge v2 v3 is saturated with its most preferred commodity. It is trivial that the same flow remains stable if we set s1 = t1 = u and {s2 , t2 } = {s3 , t3 } = ∅. If {s1 , t1 } = {s2 , t2 } = {s3 , t3 } = ∅, then the empty flow is stable. ⊓ ⊔ To sum up the established results about Example 1: the instance admits an integer stable flow if and only if u has at most two commodities. This argument will help us prove Claim 5.2 later in our hardness proof. 23 b1 1, 1̄, . . . 1̄, 1, . . . b2 a d bn−1 n, n̄, . . . n̄, n, . . . bn b1 s a b1 d u1 ui um bn a d bn v2 v1 v3 Fig. 9. A variable gadget and the entire construction for ismf. Theorem 7. It is NP-complete to decide whether there is an integer stable multicommodity flow in a given network. Deciding whether ismf has a solution is NP-complete. This holds even if all commodities share the same set of terminal vertices and all vertices have the same preferences with respect to all commodities (but edges might have different capacities with respect to different commodities). Proof. Testing whether a feasible integral multicommodity flow is stable can be done in polynomial time, as pointed out also in [24]. It is sufficient to check the existence of edges fulfilling points 2 and 3 in Definition 4 for every commodity and then execute a breadth-first search for every pair of vertices as v1 and vk vertices of the potential blocking walk. Thus ismf is in NP. Now we describe ismf instances I ′ constructed to every instance I of 3-sat, also illustrated in Fig. 9. To each of the n variables in the Boolean formula we create 2 commodities, i and ī, corresponding to truth values true and false. To simplify notation, we say that ¯ī = i. Every clause in the formula is assigned a clause gadget, identical to the instance presented in Example 1, but with u being a non-terminal for all commodities. The three relevant commodities are the commodities corresponding to the negations of the three literals appearing in the clause. The preferences of u in such a gadget are chosen so that the edges of the gadget are preferred to edges outside of the gadget. Their order with respect to each other is irrelevant due to the ci constraints. All commodities share the same terminals s and t. There is a long path running from s to t, consisting of three segments. The first and the third segment 24 t are two copies of the same variable gadget, while the second segment consists of the u vertices of clause gadgets. A variable gadget is defined on vertices {a, b1 , b2 , ..., bn , d}, where edges with c = 1 and unrestricted commodity capacities run from a to each bi and from each bi to d. Edge abi ranks commodity i best, ī second, and the rest in arbitrary order, while bi d ranks commodity ī best, i second, and the rest in arbitrary order. The vertex preferences of a and d are also arbitrary. These three segments are chained together so that the only edge of s ends at a of the first variable gadget, d of the same gadget is connected to the first u vertex of the second segment, the last u of the same segment is adjacent to a of the second variable gadget and d of this gadget has an edge running to t. On the edges connecting the segments and the u vertices of clause gadgets with each other and with the terminals, ci = c = 2n+1 for all 1 ≤ i ≤ n, and edge preferences can be chosen arbitrarily. Lemma 11. If an integral stable multicommodity flow f exists in I ′ , then there is a truth assignment in I. Proof. As defined after Definition 3, f i denotes the total flow value with respect to commodity i. Claim. For every commodity i, f i + f ī = 1. Proof. If f i (abi ) + f ī (abi ) < 1 for some commodity i and edge abi of a variable gadget, then there is an s-t path through bi , where edges are either unsaturated or they prefer both i and ī to the commodities they carry. This path blocks f . Since c(abi ) = 1 for every 1 ≤ i ≤ n, f i (abi ) + f ī (abi ) = 1, thus edges abi and bi d of the variable gadgets are saturated with commodities i and ī. This already implies that f i + f ī = 1 for every 1 ≤ i ≤ n.  This claim allows us to assign exactly one truth value to each variable: xi is true if f i = 1 and it is false if f ī = 1. Claim. For every clause C = xi ∨ xj ∨ xk , where the variables in C can be in a negated or unnegated form, f ī + f j̄ + f k̄ ≤ 2, for every 1 ≤ i, j, k ≤ n. Proof. Since u prefers sending flow along its edges in the gadget over forwarding it to the next u vertex on the path, u can be seen as a terminal vertex with respect to the commodities reaching it. As we have shown in Example 1, if there is a solution to ismf, then at most two relevant commodities are present at u. This is why we decided to take the negated version of each literal in the clause: at most two literals are false in each clause.  ⊓ ⊔ Lemma 12. If there is a truth assignment in I, then there is an integral stable multicommodity flow f in I ′ . Proof. The constructed flow to the given truth assignment is the following. For every variable i, f i = 1, f ī = 0 if i is true, and f i = 0, f ī = 1 otherwise. This rule obviously determines f on all edges not belonging to clause gadgets. Since we started with a valid truth assignment, each clause gadget has at most two 25 out of the three relevant commodities i1 , i2 and i3 reaching u. Commodity ij corresponds to commodity j in Example 1. If commodity ij , j ∈ {1, 2, 3} is not present at u, then we send commodity ij+1 (modulo 3) along cycle C ij+1 and set all other flow values in the gadget to 0. If two commodities are missing, we send the third along its cycle. If no relevant commodity reaches the gadget, then we leave all edges of the gadget empty. We need to show now that f is an integral stable flow. Feasibility and integrality clearly follows from the construction. Since the a-d paths in the two variable gadgets are saturated and one of them carries its most preferred commodity to its full cumulative capacity, no blocking walk W leaves s or reaches t, in fact, W must run between d of the first variable gadget and a of the second variable gadget. Having eliminated the terminals as starting or end vertices of W , we also eliminated the possibility that a commodity i with f i = 0 blocks f . Now we investigate which edge can play the role of the starting edge of a blocking walk W . • Blocking walks cannot start or end with edges outside of clause gadgets, because these edges are the least preferred edges of both of their end vertices. • Assume now without loss of generality that the first edge of W is uv1 in some clause gadget with relevant commodities i1 , i2 and i3 , in this order. Then, f i1 = 1, but commodity i1 was not chosen to fill C 1 . According to our rules above, the only reason for it is that commodity i2 is not present at u and commodity i3 saturates C 3 . But the only edge that could be the second edge in W is then v1 v2 in the gadget and it is saturated by its best ranked commodity i3 . • The last possibility to check is whether W can start with an edge of a clause gadget not incident to u. Without loss of generality let us assume this edge is v1 v2 , but it is the only outgoing edge of v1 , thus it cannot fulfill point 2 of Definition 4, because each commodity has exactly one outgoing edge at each of vertices v1 , v2 and v3 .  ⊓ ⊔ 6 Conclusion and open problems In this paper we presented four results: 1. 2. 3. 4. a polynomial version of the Gale-Shapley algorithm for stable flows; a direct algorithm for stable flows with restricted intervals; a simplification of the stable multicommodity flow problem; the NP-completeness of the integral stable multicommodity flow problem. The most riveting open question regarding Section 4 is probably about approximation algorithms. The approximation concept of minimum number of blocking edges or minimum number of violated restrictions [6] can be translated to sf restricted. Even if there is no stable flow containing all forced or avoiding all forbidden edges, how can stability be relaxed such that all edge 26 conditions are fulfilled? Or the other way round: how many edge conditions must be violated by stable flows? The big open question of Section 5 is clearly algorithms for finding a (possibly fractional) stable multicommodity flow for restricted cases of ismf. Even though Theorem 5 states that it is PPAD-hard to find a solution in the general case, it is natural to ask whether this complexity changes with restricted number of commodities, low degree, and so on. Since the Gale-Shapley algorithm typically executes steps with integer values if the input is integral and we showed the hardness of ismf, it is likely that a novel approach is needed. Linear programming is a promising direction, but constructing a description of the smf polytope seems to be an extremely challenging task. At the moment, the most elaborate structure for which a linear program is know is many-to-many stable matchings [12]. Finally, sf restricted and smf can be combined with other common notions in stability or flows, such as ties in preference lists, edge weights, unsplittable flows, and so on. Acknowledgment We thank Tamás Fleiner for discussions on Lemma 3. References 1. M. Baïou and M. Balinski. Many-to-many matching: stable polyandrous polygamy (or polygamous polyandry). Discrete Applied Mathematics, 101:1–12, 2000. 2. M. Balinski and T. Sönmez. A tale of two mechanisms: student placement. Journal of Economic Theory, 84:73–94, 1999. 3. P. Biró, W. Kern, D. Paulusma, and P. Wojuteczky. The stable fixtures problem with payments. arXiv preprint arXiv:1508.06420, 2015. 4. S. Braun, N. Dwenger, and D. Kübler. Telling the truth may not pay off: an empirical study of centralized university admissions in Germany. The B.E. Journal of Economic Analysis and Policy, 10, article 22, 2010. 5. Y. Chen and T. Sönmez. Improving efficiency of on-campus housing: an experimental study. American Economic Review, 92:1669–1686, 2002. 6. Á. Cseh and D. F. Manlove. Stable marriage and roommates problems with restricted edges: Complexity and approximability. Discrete Optimization, 20:62 – 89, 2016. 7. Á. Cseh, J. Matuschke, and M. Skutella. Stable flows over time. Algorithms, 6:532–545, 2013. 8. B. C. Dean and S. Munshi. Faster algorithms for stable allocation problems. Algorithmica, 58:59–81, 2010. 9. V. M. F. Dias, G. D. da Fonseca, C. M. H. de Figueiredo, and J. L. Szwarcfiter. The stable marriage problem with restricted pairs. Theoretical Computer Science, 306:391–405, 2003. 10. T. Feder. A new fixed point approach for stable networks and stable marriages. Journal of Computer and System Sciences, 45:233–284, 1992. 11. T. Feder. Network flow and 2-satisfiability. Algorithmica, 11:291–319, 1994. 12. T. Fleiner. On the stable b-matching polytope. Mathematical Social Sciences, 46:149–158, 2003. 13. T. Fleiner. On stable matchings and flows. Algorithms, 7:1–14, 2014. 27 14. T. Fleiner, R. W. Irving, and D. F. Manlove. Efficient algorithms for generalised stable marriage and roommates problems. Theoretical Computer Science, 381:162– 176, 2007. 15. L. R. Ford and D. R. Fulkerson. Flows in Networks. Princeton University Press, 1962. 16. A.-T. Gai, D. Lebedev, F. Mathieu, F. de Montgolfier, J. Reynier, and L. Viennot. Acyclic preference systems in P2P networks. In A. Kermarrec, L. Bougé, and T. Priol, editors, Proceedings of Euro-Par ’07 (European Conference on Parallel and Distributed Computing): the 13th International Euro-Par Conference, volume 4641 of Lecture Notes in Computer Science, pages 825–834. Springer, 2007. 17. D. Gale and L. S. Shapley. College admissions and the stability of marriage. American Mathematical Monthly, 69:9–15, 1962. 18. D. Gale and M. Sotomayor. Some remarks on the stable matching problem. Discrete Applied Mathematics, 11:223–232, 1985. 19. M. R. Garey and D. S. Johnson. Computers and Intractability. Freeman, San Francisco, CA., 1979. 20. D. Gusfield and R. W. Irving. The Stable Marriage Problem: Structure and Algorithms. MIT Press, 1989. 21. R. W. Irving, P. Leather, and D. Gusfield. An efficient algorithm for the “optimal” stable marriage. Journal of the ACM, 34:532–543, 1987. 22. W. S. Jewell. Multi-commodity Network Solutions. Operations Research Center, University of California, 1966. 23. T. Király and J. Pap. A note on kernels and Sperner’s Lemma. Discrete Applied Mathematics, 157:3327–3331, 2009. 24. T. Király and J. Pap. Stable multicommodity flows. Algorithms, 6:161–168, 2013. 25. D. Knuth. Mariages Stables. Les Presses de L’Université de Montréal, 1976. English translation in Stable Marriage and its Relation to Other Combinatorial Problems, volume 10 of CRM Proceedings and Lecture Notes, American Mathematical Society, 1997. 26. M. Ostrovsky. Stability in supply chain networks. American Economic Review, 98:897–923, 2008. 27. C. H. Papadimitriou. On the complexity of the parity argument and other inefficient proofs of existence. Journal of Computer and System Sciences, 48:498–532, 1994. 28. N. Perach, J. Polak, and U. G. Rothblum. A stable matching model with an entrance criterion applied to the assignment of students to dormitories at the Technion. International Journal of Game Theory, 36:519–535, 2008. 29. A. E. Roth. The evolution of the labor market for medical interns and residents: a case study in game theory. Journal of Political Economy, 92:991–1016, 1984. 30. A. E. Roth and M. A. O. Sotomayor. Two-Sided Matching: A Study in GameTheoretic Modeling and Analysis, volume 18 of Econometric Society Monographs. Cambridge University Press, 1990. 31. É. Tardos. A strongly polynomial algorithm to solve combinatorial linear programs. Operations Research, pages 250–256, 1986. 28
8cs.DS
The two-edge connectivity survivable-network design problem in planar graphs arXiv:1302.2184v2 [cs.DS] 30 Sep 2015 Glencora Borradaile Oregon State University Philip Klein Brown University October 1, 2015 Abstract Consider the following problem: given a graph with edge costs and a subset Q of vertices, find a minimum-cost subgraph in which there are two edge-disjoint paths connecting every pair of vertices in Q. The problem is a failure-resilient analog of the Steiner tree problem arising, for example, in telecommunications applications. We study a more general mixedconnectivity formulation, also employed in telecommunications optimization. Given a number (or requirement) r(v) ∈ {0, 1, 2} for each vertex v in the graph, find a minimum-cost subgraph in which there are min{r(u), r(v)} edge-disjoint u-to-v paths for every pair u, v of vertices. We address the problem in planar graphs, considering a popular relaxation in which the solution is allowed to use multiple copies of the input-graph edges (paying separately for each copy). The problem is max SNP-hard in general graphs and strongly NP-hard in planar graphs. We give the first polynomial-time approximation scheme in planar graphs. The running time is O(n log n). Under the additional restriction that the requirements are only non-zero for vertices on the boundary of a single face of a planar graph, we give a polynomial-time algorithm to find the optimal solution. 1 Introduction In the field of telecommunications network design, an important requirement of networks is resilience to link failures [24]. The goal of the survivable network problem is to find a graph that provides multiple routes between pairs of terminals. In this work we address a problem concerning edge-disjoint paths. For a set S of non-negative integers, an instance of the S-edge connectivity design problem is a pair (G, r) where G = (V, E) is a undirected graph with edge costs c : V → <+ and connectivity requirements r : V → S. The goal is to find a minimum-cost subgraph of G that, for each pair u, v of vertices, contains at least min{r(u), r(v)} edge-disjoint u-to-v paths. In telecommunication-network design, failures are rare; for this reason, there has been much research on low-connectivity network design problems, in which the maximum connectivity requirement is two. Resende and Pardalos [24] survey the literature, which includes heuristics, structural results, polyhedral results, computational results using cutting planes, and approximation algorithms. This work focuses on {0, 1, 2}-edge connectivity problems in planar graphs. We consider the previously studied variant wherein the solution subgraph is allowed to contain multiple copies of each edge of the input graph (a multi-subgraph); the costs of the edges in the solution are counted according to multiplicity. For {0, 1, 2}-connectivity, at most two copies of an 1 edge are needed. We call this the relaxed version of the problem and use the term strict to refer to the version of the problem in which multiple copies of edges of the input graph are disallowed. A polynomial-time approximation scheme (PTAS) for an optimization problem is an algorithm that, given a fixed constant  > 0, runs in polynomial time and returns a solution within 1 +  of optimal. The algorithm’s running time need not be polynomial in . The PTAS is efficient if the running time is bounded by a polynomial whose degree is independent of . In this paper, we focus on designing a PTAS for {0, 1, 2}-edge connectivity. Two edge-connected spanning subgraphs A special case that has received much attention is the problem of finding a minimum-cost subgraph of G in which every pair of vertices is two edge-connected. Formally this is the strict {2}-edge connectivity design problem. This problem is NP-hard [12] (even in planar graphs, by a reduction from Hamiltonian cycle) and max-SNP hard [10] in general graphs. In general graphs, Frederickson and JáJá [13] gave an approximation ratio of 3 which was later improved to 2 (and 1.5 for unit-cost graphs) by Khuller and Vishkin [17]. In planar graphs, Berger et al. [4] gave a polynomial-time approximation scheme (PTAS) for the relaxed {1, 2}-edge connectivity design problem and Berger and Grigni [5] gave a PTAS for the strict {2}-edge connectivity design problem. Neither of these algorithms is efficient; the degree of the polynomial bounding the running time grows with 1/. For the relaxed version of spanning planar 2-edge connectivity, the techniques of Klein [19] can be used to obtain a linear-time approximation scheme. Beyond spanning When a vertex can be assigned a requirement of zero, edge-connectivity design problems include the Steiner tree problem: given a graph with edge costs and given a subset of vertices (called the terminals), find a minimum-cost connected subgraph that includes all vertices in the subset. More generally, we refer to any vertex with a non-zero connectivity requirement as a terminal. For {0, 2}-edge connectivity design problem, in general graphs, Ravi [23] showed that Frederickson and JáJá’s approach could be generalized to give a 3-approximation algorithm (in general graphs). Klein and Ravi [20] gave a 2-approximation for the {0, 1, 2}-edge connectivity design problem. (In fact, they solve the even more general version in which requirements r(u, v) are specified for pairs u, v of vertices.) This result was generalized to connectivity requirements higher than two by Williamson et al. [27], Goemans et al. [14], and Jain [16]. These algorithms each handle the strict version of the problem. In their recent paper on the spanning case [5], Berger and Grigni raise the question of whether there is a PTAS for the {0, 2}-edge connectivity design problem in planar graphs. In this paper, we answer that question in the affirmative for the relaxed version. The question in the case of the strict version is still open. 1.1 Summary of new results Our main result is a PTAS for the relaxed {0, 1, 2}-edge connectivity problem in planar graphs: Theorem 1.1. For any , there is an O(n log n) algorithm that, given a planar instance (G, r) of relaxed {0, 1, 2}-edge connectivity, finds a solution whose cost is at most 1 +  times optimal. 2 This result builds on the work of Borradaile, Klein and Mathieu [7, 8, 9] which gives a PTAS for the Steiner tree (i.e. {0, 1}-edge connectivity) problem. This is the first PTAS for a non-spanning two-edge connectivity problem in planar graphs. Additionally, we give an exact, polynomial-time algorithm for the special case where are the vertices with non-zero requirement are on the boundary of a common face: Theorem 1.2. There is an O(k 3 n)-time algorithm that finds an optimal solution to any planar instance (G, r) of relaxed {0, 1, 2}-edge-connectivity in which only k vertices are assigned nonzero requirements and all of them are on the boundary of a single face. For instances of relaxed {0, 2}edge connectivity (i.e. all requirements are 0 or 2), the algorithm runs in linear time. 1.2 Organization We start by proving Theorem 1.2 in Section 3. The proof of this result is less involved and provides a good warm-up for the proof of Theorem 1.1. The algorithm uses the linear-time shortest-path algorithm for planar graphs [15] and a polynomial-time algorithm for the equivalent boundary Steiner-tree problem [11] as black boxes. In order to prove Theorem 1.1, we need to review the framework developed for the Steiner tree problem in planar graphs. We give an overview of this framework in Section 4 and show how to use it to solve the relaxed {0, 1, 2}-edge connectivity problem. The correctness of the PTAS relies on a Structure Theorem (Theorem 4.6) which bounds the number of interactions of a solution between different regions of the graph while paying only a small relative penalty in cost. We prove this Structure Theorem in Section 5. The algorithm itself requires a dynamic program; we give the details for this in Section 6. 2 Basics We consider graphs and multi-subgraphs. A multi-subgraph is a subgraph where edges may be included with multiplicity. In proving the Structure Theorem we will replace subgraphs of a solution with other subgraphs. In doing so, two of the newly introduced subgraphs may share an edge. For a subgraph H of a graph G, we use V (H) to denote the set of vertices in H. For a graph G and set of edges E, G/E denotes the graph obtained by contracting the edges E. For a path P , P [x, y] denotes the x-to-y subpath of P for vertices x and y of P ; end(P ) and start(P ) denote the first and last vertices of P ; rev(P ) denotes the reverse of path P . For paths A and B, A ◦ B denotes the concatenation of A and B. See Figure 1 for an illustration of the notion of paths crossing. A cycle is non-self-crossing if every pair of subpaths of the cycle do not cross. We employ the usual definitions of planar embedded graphs. For a face f , the cycle of edges making up the boundary of f is denoted ∂f . We assume the planar graph G is connected and is embedded in the plane, so there is a single infinite face, and we denote its boundary by ∂G. For a cycle C in a planar embedded graph, C[x, y] denotes an x-to-y path in C for vertices x and y of C. There are two such paths and the choice between the two possibilities will be disambiguated by always choosing the subpath in the clockwise direction. A cycle C is said to enclose the faces that are embedded inside it. C encloses an edge/vertex if the edge/vertex is embedded inside it or on it. In the former case, C strictly encloses the edge/vertex. For non-crossing x-to-y paths P and Q, P is said to be left of Q if P ◦ rev(Q) is a clockwise cycle. We will use the following as a subroutine: 3 Q y P P Q v x (a) (b) (c) (d) Figure 1: (a) P crosses Q. (b) P and Q are noncrossing; Q is left of P (c) A self-crossing cycle. (d) A non-self-crossing cycle (non-self-crossing allows for repeated vertices, i.e. v.) Theorem 2.1. Erickson, Monma and Veinott [11] Let G be a planar embedded graph with edgecosts and let Q be a set of k terminals that all lie on the boundary of a single face. Then there is an algorithm to find an minimum-cost Steiner tree of G spanning Q in time O(nk 3 + (n log n)k 2 ) or O(nk 3 ) time using the algorithm of [15]. 2.1 Edge-connectivity basics Since we are only interested in connectivity up to and including two-edge connectivity, we define the following: For a graph H and vertices x, y, let cH (x, y) = min{2, maximum number of edge-disjoint x-to-y paths in H}. For two multi-subgraphs H and H 0 of a common graph G and for a subset S of the vertices of G, we say H 0 achieves the two-connectivity of H for S if cH 0 (x, y) ≥ cH (x, y) for every x, y ∈ S. We say H 0 achieves the boundary two-connectivity of H if it achieves the two-connectivity of H for S = V (∂G). Several of the results in the paper build on observations of the structural property of two-edge connected graphs. The first is a well-known property: Lemma 2.2 (Transitivity). For any graph H, for vertices u, v, w ∈ V (H), cH (u, w) ≥ min{cH (u, v), cH (v, w)} Note that in the following, we can replace “strictly encloses no/strictly enclosed” with “strictly encloses all/strictly not enclosed” without loss of generality (by viewing a face enclosed by C as the infinite face). Lemma 2.3 (Empty Cycle). Let H be a (multi-)subgraph of G and let C be a non-self-crossing cycle of H that strictly encloses no terminals. Let H 0 be the subgraph of H obtained by removing the edges of H that are strictly enclosed by C. Then H 0 achieves the two-connectivity of H. Proof. See Figure 2(b). Without loss of generality, view C as a clockwise cycle. Consider two terminals x and y. We show that there are cH (x, y) edge-disjoint x-to-y paths in H that do not use edges strictly enclosed by C. There are two nontrivial cases: cH (x, y) = 1 : Let P be an x-to-y path in H. If P intersects C, let xP be the first vertex of P that is in C and let yP be the last vertex of P that is in C. Let P 0 = P [x, xP ] ◦ C[xP , yP ] ◦ P [yP , y]. If P does not intersect C, let P 0 = P . P 0 is an x-to-y path in H that has no edge strictly enclosed by C. 4 cH (x, y) = 2 : Let P and Q be edge-disjoint x-to-y paths in H. If Q does not intersect C, then P 0 and Q are edge-disjoint paths, neither of which has an edge strictly enclosed by C (where P 0 is as defined above). Suppose that both P and Q intersect C. Define xQ and yQ as for P . Suppose these vertices are ordered xP , xQ , yQ , yP around C. Then P [x, xP ] ◦ C[xP , yQ ] ◦ Q[yQ , y] and Q[x, xQ ] ◦ rev(C[yP , xQ ]) ◦ P [yP , y] are edge disjoint x-to-y paths that do not use any edges enclosed by C. This case is illustrated in Figure 2; other cases (for other orderings of {xP , xQ , yQ , yP } along C) follow similarly. y yQ yP P xP C x Q xQ Figure 2: An illustration of the proof of Lemma 2.3: there are edge-disjoint x-to-y paths (grey) that do not use edges enclosed by C. We have shown that we can achieve the boundary two-connectivity of H without using any edges strictly enclosed by a cycle of H. The lemma follows. 2.2 Vertex-connectivity basics The observations in this section do not involve planarity. Although our results are for edge connectivity, we use vertex connectivity in Section 5 to simplify our proofs. Vertices x and y are biconnected (a.k.a. two-vertex-connected) in a graph H if H contains two x-to-y paths that do not share any internal vertices, or, equivalently, if there is a simple cycle in H that contains both x and y. For a subset S of vertices of H, we say H is S-biconnected if for every pair x, y of vertices of S, H contains a simple cycle through x and y. We refer to the vertices of S as terminals. Lemma 2.4. A minimal S-biconnected graph is biconnected. Proof. Suppose H has a cut-vertex v: H = H1 ∪ H2 where H1 ∩ H2 = {v} and Hi 6= {v} for i = 1, 2. If H1 and H2 both have terminals then H does not biconnect every pair of terminals. If, say, H2 does not have a terminal then H − (H2 − {v}) is a smaller subgraph that biconnects the terminals. For the next two proofs, we use the notion of an (open) ear decomposition. An ear decomposition of a graph G is a partition of the edges S into a cycle C and a sequence of paths P1 , P2 , . . . , Pk such that the endpoints of Pi are in C ∪ ( j<i Pj ). The ear decomposition is open if the endpoints of Pi are distinct. A graph is biconnected iff it has an open ear decomposition [25]. Ear decompositions can be built greedily starting with any cycle. Theorem 2.5. Let H be a minimal S-biconnected graph. Every cycle in H contains a vertex of S. 5 Proof. Assume for a contradiction that H contains a cycle C that does not contain any terminals. By Lemma 2.4, H is biconnected and so has an open ear decomposition starting with C; let C, P1 , P2 , . . . , Pk be an open S ear decomposition of H. Define Ei to be the subgraph composed of C and the first i ears: C ∪ ( j≤i Pj ). We construct another open ear decomposition with S one fewer 0 0 0 0 0 0 ear C , P2 , . . . , Pk of H as follows (note there is no ear P1 ) and use Ei to denote C ∪ ( j≤i Pj0 ). Let x and y be the endpoints of P1 . Let C 0 = C[y, x] ◦ P1 . Let Q01 = C[x, y] be the portion of C that is not used in C 0 . We will maintain the invariant: Q0i contains at least one edge and Q0i = Ei − Ei0 Clearly this invariant holds for i = 1. For i ≥ 2, we define Pi0 using Pi and Q0i−1 . Note that 0 one or more of the endpoints of Pi may be in Q0i−1 and so Ei−1 ∪ Pi is not necessarily a valid 0 , allowing us to ear decomposition. However, by the invariant, Pi ’s endpoints are in Q0i−1 ∪ Ei−1 0 0 0 define a new valid ear Pi by extending Pi along Qi−1 to reach Ei−1 as follows: Pi0 is the minimal 0 0 path of Pi ∪ Q0i−1 ∪ Ei−1 whose endpoints are in Ei−1 such that Pi is a subpath of Pi0 . Define Q0i = Q0i−1 − (Pi0 − Pi ). Since Pi has distinct endpoints, Pi0 does not contain all the edges of Q0i−1 , thus maintaining the invariant. By construction, C 0 , P20 , . . . , Pk0 is an open ear decomposition of H − Q0k and so H − Q0k is biconnected. Since Q0k ⊂ C and C does not contain any terminals, H − Q0k is S-biconnected and since Q0k contains at least one edge, H − Q0k contradicts the minimality of H. Theorem 2.6. Let H be a minimal S-biconnected graph. For any cycle C in H, every C-to-C path contains a vertex of S. Proof. Let C be any cycle. By Theorem 2.5, C contains a terminal. We consider an ear decomposition C, P1 , P2 , . . . of H built as follows. Consider s ∈ S not spanned by C ∪ P1 ∪ · · · ∪ Pi−1 . Then there are vertex-disjoint paths from s to C ∪ P1 ∪ · · · ∪ Pi−1 since s and the terminal on, for example, C are biconnected. Let Pi be the ear formed by these vertex-disjoint paths. Observe that by this construction each ear Pi contains a terminal for every i. Suppose every path in ∪i≤k Pi with two endpoints in C strictly contains a vertex of S. We prove that this is then the case for ∪i≤k+1 Pi . Since Pk+1 is an ear, its endpoints are in ∪i≤k Pi and so any C-to-C path that uses an edge of Pk+1 would have to contain the entirety of Pk+1 ; therefore Pk+1 cannot introduce a terminal-free path. 3 An exact algorithm for boundary {0, 1, 2}-edge connectivity Our algorithm for the boundary case of {0, 1, 2}-edge connectivity, as formalized in Theorem 1.2 is based on the observation that there is an optimal solution to the problem that is the union of Steiner trees whose terminals are boundary vertices, allowing us to employ the boundary-Steinertree algorithm of Theorem 2.1. When terminals are restricted to the boundary of the graph, no cycle can strictly enclose a terminal. By Lemma 2.3, we get: Corollary 3.1. Let H be a subgraph of G and let H 0 be a minimal subgraph of H that achieves the boundary two-connectivity of H. Then in H 0 every cycle C strictly encloses no edges. 6 In the following we will assume that the boundary of the graph G is a simple cycle; that is, a vertex appears at most once along ∂G. Let us see why this is a safe assumption. Suppose the boundary of G is not simple: there is a vertex v that appears at least twice along ∂G. Partition G into two graphs G1 and G2 such that G1 ∩ G2 = v, v appears exactly once along ∂G1 and E(∂G) = E(∂G1 ) ∪ E(∂G2 ). Let x be a vertex of ∂G1 and let y be a vertex of ∂G2 . Then cG (x, y) = min{cG1 (x, v), cG2 (v, y)}, allowing us to define new connectivity requirements and solve the problem separately for G1 and G2 . Lemma 3.2. Let P and Q be leftmost non-self-crossing xP -to-yP and xQ -to-yQ paths, respectively, where xP , yP , xQ , and yQ are vertices in clockwise order on ∂G. Then P does not cross Q. Proof. For a contradiction, assume that Q crosses P . Refer to Figure 3(a). Let C (interior shaded) be the cycle P ◦ rev(∂G[xP , yP ]). C strictly encloses neither xQ nor yQ . If Q crosses P , there must be a subpath of Q enclosed by C. Let x be the first vertex of Q in P and let y be the last. There are two cases: x ∈ P [y, yP ] : Refer to Figure 3(a). In this case, rev(P [y, x]) is left of Q[x, y] and so Q[xQ , x] ◦ rev(P [y, x]) ◦ Q[y, yQ ] (grey path) is left of Q, contradicting the leftmostness of Q. x ∈ P [xP , y] : Refer to Figure 3(b). In this case, Q[xQ , x] ◦ rev(P [xP , x]) ◦ ∂G[xP , xQ ] (shaded interior) is a cycle that strictly encloses y and does not enclose yQ . Since y is the last vertex of Q on P , Q must cross itself, a contradiction. yQ Q y P yQ xP P Q y x xQ xP x xQ yP (a) yP (b) Figure 3: Illustration of Lemma 3.2: there exist leftmost paths that do not cross. Lemma 3.3. Let H be a subgraph of G. Let S be a subset of V (∂G) such that, for every x, y ∈ S, cH (x, y) = 2. Then there is a non-self-crossing cycle C in H such that S ⊆ V (C) and the order that C visits the vertices in S is the same as their order along ∂G. Proof. Assume that the vertices of S are in the clockwise order s0 , s1 , . . . , sk−1 along ∂G. Let Pi be the leftmost non-self-crossing si−1 -to-si path in H, taking the indices modulo k. Let C = P1 ◦ P2 ◦ · · · ◦ Pk−1 . Certainly C visits each of the vertices s0 , s1 , . . . in order. By Lemma 3.2, Pi does not cross Pj for all i 6= j. Therefore, C is non-self-crossing, proving the lemma. 7 We now give an algorithm for the following problem: given a planar graph G with edge costs and an assignment r of requirements such that r(v) > 0 only for vertices v of ∂G, find a minimum-cost multi-subgraph H of G that satisfies the requirements (i.e. such that there are at least min{r(x), r(y)} edge-disjoint x-to-y paths in H). Boundary2EC(G, r) 1. 2. 3. 4. Let q1 , q2 , . . . be the cyclic ordering of vertices {v ∈ V (∂G) : r(v) = 2}. For i = 1, . . ., let Xi = {qi } ∪ {v ∈ V (∂G[qi , qi+1 ]) : r(v) = 1} ∪ {qi+1 }. For i = 1, . . ., let Ti be the minimum-cost Steiner tree spanning Xi . Return the disjoint union ∪i Ti . We show that Boundary2EC correctly finds the minimum-cost multi-subgraph of G satisfying the requirements. Let OPT denote an optimal solution. By Lemma 3.3, OPT contains a non-selfcrossing cycle C that visits q1 , q2 , . . . (as defined in Boundary2EC). By Corollary 3.1, C strictly encloses no edges of OPT. Let Pi be the leftmost qi -to-qi+1 path in C. The vertices in Xi are connected in OPT, by the input requirements. Let Si be the subgraph of OPT that connects Xi . This subgraph is enclosed by ∂G[qi , qi+1 ] ◦ C[qi , qi+1 ]. Replacing Si by Ti achieves the same connectivity among vertices v with r(v) > 0 without increasing the cost. We will use the following lemma to give an efficient implementation of Boundary2EC. Lemma 3.4. Let a, b and c be vertices ordered along the clockwise boundary ∂G of a planar graph G. Let Ta be the shortest-path tree rooted at a (using edge costs for lengths). Then for any set of terminals Q in ∂G[b, c], there is a minimum-cost Steiner tree connecting them that enclosed by the cycle ∂G[b, c] ◦ Ta [c, b]. Proof. Refer to Figure 4. Let C = ∂G[b, c] ◦ Ta [c, b]. Let T be a minimum-cost Steiner tree in G connecting Q. Suppose some part of T is not enclosed by C. Let T 0 be a maximal subtree of T not enclosed by C. The leaves of T 0 are on Ta [c, b]. Let P be the minimum subpath of Ta [b, c] that spans these leaves. Let P 0 be the start(P )-to-end(P ) path in T 0 . See Figure 4. We consider the case when start(P 0 ) is a vertex of Ta [a, b] and end(P 0 ) is a vertex of Ta [a, c] (the other cases, when start(P 0 ) and end(P 0 ) are either both vertices of Ta [a, b] or both vertices of Tb [a, c], are simpler). Then P 0 must cross Ta [a, x] where x is the last vertex common to Ta [a, b] and Ta [a, c] (i.e. the lowest common ancestor in Ta of b and c). Let y be a vertex of P 0 ∩ Ta [a, x]. Since Ta is a shortest-path tree in an undirected path, every subpath of Ta [a, z] and Ta [z, a], for any vertex z, is a shortest path. We have that: c(P 0 ) = c(P 0 [start(P 0 ), y]) + c(P 0 [y, end(P 0 )]) ≥ c(Ta [start(P 0 ), y]) + c(Ta [y, end(P 0 )]) ≥ c(Ta [start(P 0 ), end(P 0 )]) ≥ c(P ) Let Tb = T − T 0 ∪ P . By construction, Tb spans Q. Using that c(P 0 ) ≥ c(P ), we have that c(Tb) = c(T ) − c(T 0 ) + c(P ) ≤ c(T ) − c(T 0 ) + c(P 0 ) ≤ c(T ) since P 0 is a subpath of T 0 . Repeating this process for every subtree of T not enclosed by C results in a tree enclosed by C spanning Q that is no longer than T . 8 Figure 4: There is a tree Tb that is just as cheap as T (dotted) and spans the terminals between b and c but is enclosed by C (whose interior is shaded). Tb is composed of the portion of T enclosed by C plus P , the thick grey path. We describe an O(k 3 n)-time implementation of Boundary2EC (where k is the number of terminals). Compute a shortest-path tree T rooted at terminal q1 in linear time. For each i, consider the graph Gi enclosed by Ci = ∂G[qi , qi+1 ] ◦ T [qi+1 , qi ]. Compute the minimum Steiner tree spanning Xi in Gi . By Lemma 3.4, Ti has the same cost as the minimum spanning tree spanning Xi in G. Since each edge of G appears in at most two subgraphs Gi and Gj , the trees Ti can be computed in O(k 3 n) time (by Theorem 2.1). Note: if the requirements are such that r(v) ∈ {0, 2} for every vertex v on the boundary of G, then the sets Xi have cardinality 2. Instead of computing Steiner trees in Step 3, we need only compute shortest paths. The running time for this special case is therefore linear. This completes the proof of Theorem 1.2. 4 A PTAS framework for connectivity problems in planar graphs In this section, we review the approach used in [9] to give a PTAS framework for the Steiner tree problem in planar graphs. While the contents of this section are largely a summary of the framework, we generalize where necessary for the survivable network design problem, but refer the reader to the original paper [9] for proofs and construction details that are not unique to the focus of this article. Herein, denote the set of terminals by Q. OPT denotes an optimal solution to the survivable network design problem. We overload this notation to also represent the cost of the optimal solution. 4.1 Mortar graph and bricks The framework relies on an algorithm for finding a subgraph MG of G, called the mortar graph [9]. The mortar graph spans Q and has total cost no more than 9−1 times the cost of a minimum Steiner tree in G spanning Q (Lemma 6.9 of [9]). Since a solution to the survivable network problem necessarily spans Q, the mortar graph has cost at most 9−1 · OPT. (1) The algorithm for computing MG first computes a 2-approximate Steiner tree [21, 26, 28] and then augments this subgraph with short paths. The resulting graph is a grid-like subgraph (the bold edges in Figure 5(a)) many of whose subpaths are -short: 9 Definition 4.1. A path P in a graph G is -short if for every pair of vertices x and y on P , distP (x, y) ≤ (1 + )distG (x, y). That is, the distance from x to y along P is at most (1 + ) times the distance from x to y in G. For each face f of the mortar graph, the subgraph of G enclosed by that face (including the edges and vertices of the face boundary) is called a brick (Figure 5(b)), and the brick’s boundary is defined to be f . The boundary of a brick B is written ∂B. The interior of B is defined to be the subgraph of edges of B not belonging to ∂B. The interior of B is written int(B). Bricks satisfy the following: Lemma 4.2 (Lemma 6.10 [9]). The boundary of a brick B, in counterclockwise order, is the concatenation of four paths WB , SB , EB , NB (west, south, east, north) such that: 1. The set of edges B − ∂B is nonempty. 2. Every vertex of Q ∩ B is in NB or in SB . 3. NB is 0-short in B, and every proper subpath of SB is -short in B. 4. There exists a number t ≤ κ() and vertices s0 , s1 , s2 , . . . , st ordered from west to east along SB such that, for any vertex x of SB [si , si+1 ), the distance from x to si along SB is less than  times the distance from x to NB in B: distSB (x, si ) <  distB (x, NB ). The number κ() is given by: κ() = 42 (1 + 1 ) (2) The mortar graph has some additional properties. Let B1 be a brick, and suppose B1 ’s eastern boundary EB1 contains at least one edge. Then there is another brick B2 whose western boundary WB2 exactly coincides with EB1 . Similarly, if B2 is a brick whose western boundary contains at least one edge then there is a brick B1 whose eastern boundary coincides with B2 ’s western boundary. The paths forming eastern and western boundaries of bricks are called supercolumns. Lemma 4.3 (Lemma 6.6 [9]). The sum of the costs of the edges in supercolumns is at most  OPT. The mortar graph and the bricks are building blocks of the structural properties required for designing an approximation scheme. Borradaile, Klein and Mathieu demonstrated that there is a near-optimal Steiner tree whose interaction with the mortar graph is “simple” [9]. We prove a similar theorem in Section 5. In order to formalize the notion of “simple”, we select a subset of vertices on the boundary of each brick, called portals, and define a portal-connected graph. 4.2 Portals and simple connections We define a subset of θ evenly spaced vertices along the boundary of every brick. The value of θ depends polynomially on the precision  and on α, a parameter that represents how complex the solution can be within a single brick (α will be defined precisely in Equation (6)) θ() is O(−2 α()) The portals are selected to satisfy the following: 10 (3) Lemma 4.4 (Lemma 7.1 [9]). For any vertex x on ∂B, there is a portal y such that the cost of the x-to-y subpath of ∂B is at most 1/θ times the cost of ∂B. Recall that, for each face f of the mortar graph M G, there is a corresponding brick B, and that B includes the vertices and edges comprising the boundary of f . The next graph construction starts with the disjoint union of the mortar graph M G with all the bricks. Each edge e of the mortar graph is represented by three edges in the disjoint union: one in M G (the mortar-graph copy of e) and one on each of two brick boundaries (the brick copies of e). Similarly, each vertex on the boundary of a brick occurs several times in the disjoint union. The portal-connected graph, denoted B + (M G), is obtained from the disjoint union as follows: a copy of each brick B of M G is embedded in the interior of the corresponding face of M G, and each portal p of B is connected by an artificial edge to the corresponding vertex of M G. The construction is illustrated in Figure 5(c). The artificial edges are called portal edges, and are assigned zero cost. Noting that each vertex v on the boundary of a brick occurs several times in B + (M G), we identify the original vertex v of G with that duplicate in B + (M G) that belongs to M G. In particular, each terminal (vertex in Q) is considered to appear exactly once in B + (M G), namely in M G. Thus the original instance gives rise to an instance in B + (M G): the goal is to compute the optimal solution w.r.t. the terminals on M G in B + (M G) and then map the edges of this solution to G. Since G can be obtained from B + (M G) by contracting portal edges and identifying all duplicates of each edge and all duplicates of each vertex, we infer: Lemma 4.5. Let H be a subgraph of B + (M G) that, for each pair of terminals u, v, contains at least min{r(u), r(v)} edge-disjoint u-to-v paths. Then the subgraph of G consisting of edges of H that are in G has the same property. The graph B ÷ (M G), which we call the brick-contracted graph, is obtained by contracting each brick in B + (M G) to a single vertex, called a brick vertex, as illustrated in Figure 5(d). This graph will be used in designing the dynamic program in Section 6. 4.3 Structure Theorem Lemma 4.5 implies that, to find an approximately optimal solution in G, it suffices to find a solution in B + (M G) whose cost is not much more than the cost of the optimal solution in G. The following theorem, which we prove in Section 5, suggests that this goal is achievable. An equivalent theorem was proven for the Steiner tree problem [9]. Theorem 4.6 (Structure Theorem). For any  > 0 and any planar instance (G, r) of the {0, 1, 2}edge connectivity problem, there exists a feasible solution S to the corresponding instance (B + (M G), r) such that • the cost of S is at most (1 + c)OPT where c is an absolute constant, and • the intersection of S with any brick B is the union of a set of non-crossing trees whose leaves are portals. 4.4 Approximation scheme We assume that the input graph G has degree at most three. This can be achieved using a wellknown embedding-preserving transformation in which each vertex of degree d > 3 is replaced with 11 (a) (b) (c) (d) Figure 5: (a) The mortar graph in bold, (b) the set of bricks, (c) the portal-connected graph B + (M G), and (d) the brick-contracted graph B ÷ (M G). a cycle of d degree-three vertices, as shown in Figure 6. Making this assumption simplifies the dynamic program using for Step 5 below. The approximation scheme consists of the following steps. Step 1: Find the mortar graph MG. Step 2: Decompose MG into “parcels”, subgraphs with the following properties: (a) The parcels partition the faces of MG. Since each edge of MG belongs to the boundaries of exactly two faces, it follows that each edge belongs to at most two parcels. (b) The cost of all boundary edges (those edges belonging to two parcels) is at most 1  η c(MG). We choose η so that this bound is 2 c(OP T ): η = η() = d20−2 e (4) (c) The planar dual of each parcel has a spanning tree of depth at most η + 1. Each parcel P corresponds to a subgraph of G, namely the subgraph consisting of the bricks corresponding to the faces making up P . Let us refer to this subgraph as the filled-in version of P . Step 3: Select a set of “artificial” terminals on the boundaries of parcels to achieve the following: 12 Figure 6: Each vertex of degree greater than 3 is replaced with a cycle of degree-three vertices • for each filled-in parcel, there is a solution that is feasible with respect to original and artificial terminals whose cost is at most that of the parcel’s boundary plus the cost of the intersection of OPT with the filled-in parcel, and • the union over all parcels of such feasible solutions is a feasible solution for the original graph. Step 4: Designate portals on the boundary of each brick. Step 5: For each filled-in parcel P , find a optimal solution in the portal-connected graph, B + (P ). Output the union of these solutions. Step 1 can be carried out in O(n log n) time [9]. Step 2 can be done in linear time via breadthfirst search in the planar dual of MG, and then applying a “shifting” technique in the tradition of Baker [1]. Step 3 uses the fact that each parcel’s boundary consists of edge-disjoint, noncrossing cycles. If such a cycle separates terminals, a vertex v on the cycle is designated an artificial terminal. We set r(v) = 2 if the cycle separates terminals with requirement 2 and r(v) = 1 otherwise. Under this condition, any feasible solution for the original graph must cross the cycle; by adding the edges of the cycle, we get a feasible solution that also spans the artificial terminal. Step 3 can be trivially implemented in linear time. Step 5 is achieved in linear time using dynamic programming (Section 6). 5 Proof of the Structure Theorem We are now ready to prove the Structure Theorem for {0, 1, 2}-edge connectivity, Theorem 4.6. In order to formalize the notion of connectivity across the boundary of a brick, we use the following definition: Definition 5.1 (Joining vertex). Let H be a subgraph of G and P be a subpath of ∂G. A joining vertex of H with P is a vertex of P that is the endpoint of an edge of H − P . We will use the following structural lemmas in simplifying OPT. The first two were used in proving a Structure Theorem for the Steiner tree PTAS [9]; in these, T is a tree and P is an -short path on the boundary of the graph in which T and P are embedded. The third is in fact a generalization of the second lemma that we require for maintaining two connectivity. 13 Lemma 5.2 (Simplifying a tree with one root, Lemma 10.4 [9]). Let r be a vertex of T . There is another tree Tb that spans r and the vertices of T ∩ P such that c(Tb) ≤ (1 + 4 · )c(T ) and Tb has at most 11 · −1.45 joining vertices with P . Lemma 5.3 (Simplifying a tree with two roots, Lemma 10.6 [9]). Let p and q be two vertices of T . There is another tree Tb that spans p and q and the vertices of T ∩ P such that c(Tb) ≤ (1 + c1 )c(T ) and Tb has at most c2 · −2.5 joining vertices with P , where c1 and c2 are constants. Lemma 5.4. Let F be a set of non-crossing trees whose leaves are vertices of -short boundary paths P and Q and such that each tree in the forest has leaves on both these paths. There is a cycle b a set Fb of trees, and a mapping φ : F −→ Fb ∪ {C} b with the following properties or empty set C, • For every tree T in F, φ(T ) spans T ’s leaves. b for at least one of i = 1, 2 then φ(T1 ) and φ(T2 ) • For two trees T1 and T2 in F , if φ(Ti ) 6= C are edge-disjoint (taking into account edge multiplicities). S b has o(−2.5 ) joining vertices with P ∪ Q. • The subgraph Fb ∪ {C} b + P{c(T ) : T ∈ F} b ≤ 3c(Q) + (1 + d · ) P{c(T ) : T ∈ F} where d is an absolute • c(C) constant. Proof. View the embedding of the boundary such that P is on top and Q is at the bottom. Let T1 , . . . , Tk be the trees of F ordered according the order of their leaves from left to right. There are two cases. b Let a be Case 1) k > 1/. In this case, we reduce the number of trees by incorporating a cycle C. the smallest index such that c(Ta ) ≤ c(F ) and let b be the largest index such that c(Tb ) ≤ c(F ). We will replace Let Q0 be the minimal subpath of Q that spans Sb trees Ta , Ta+1 , . . . , Tb with a cycle. 0 the leaves of i=a Ti on Q. We likewise define P . Let L be the leftmost Q-to-P path in Ta and let R be the rightmost Q-to-P path in Tb . Since P is -short, c(P 0 ) ≤ (1 + )c(L ∪ Q0 ∪ R). (5) b = P 0 ∪ L ∪ Q0 ∪ R and set To obtain Fb from F , we replace the trees Ta , . . . , Tb with the cycle C b b b φ(Ta ), . . . , φ(Tb ) to C. By construction C spans the leaves of ∪i=a Ti . Case 2) k ≤ 1/. In this case, the number of trees is already bounded. We set a = 2, b = 1 so b to be the empty set. as to not eliminate any trees, and we set C In both cases, for each remaining tree Ti (i 6= a, a + 1, . . . , b) we do the following. Let Ti0 be a minimal subtree of Ti that spans all the leaves of Ti on P and exactly one vertex r of Q. Let Qi be the minimal subpath of Q that spans the leaves of Ti on Q. We replace Ti with the tree Tbi that is the union of Q0i and the tree guaranteed by Lemma 5.2 for tree Ti0 with root r and -short path P . By construction Tbi spans the leaves of Ti . We set φ(Ti ) = Tbi for i 6= a, . . . , b. b has at most four joining vertices with P ∪ Q. Each tree Tbi has one joining vertex with Q and, C by Lemma 5.2, o(−1.5 ) joining vertices with P . By the choice of a and b, there are at most 2/ of the trees in the second part of the construction. This yields the bound on joining vertices. 14 The total cost of the replacement cycle is: b ≤ c(P 0 ) + c(L) + c(Q0 ) + c(R) c(C) ≤ (2 + )(c(L) + c(Q0 ) + c(R)) by Equation (5) 0 ≤ (2 + )(c(Ta ) + c(Q ) + c(Tb )) 0 ≤ (2 + )(2c(F ) + c(Q )) since L and R are paths in Ta and Tb by the choice of a and b 0 2 ≤ (4 + 2 )c(F ) + (2 + )c(Q ) The total cost of the replacement trees is: X X c(Tbi ) ≤ c(Q0i ) + (1 + 4)c(Ti0 ) i=1,...,a−1,b+1...k by Lemma 5.2 i=1,...,a−1,b+1...k ≤ X c(Q0i ) + (1 + 4)c(Ti ) since Ti0 is a subtree of Ti i=1,...,a−1,b+1...k By the ordering of the trees and the fact that they are non-crossing, Q0 and the Q0i ’s are disjoint. Combining the above gives the bound on cost. 5.1 Construction of a new solution We start with a brief overview of the steps used to prove the structure theorem. We start with an edge multiset forming an optimal solution, OPT. Each step modifies either the input graph G or a subgraph thereof while simultaneously modifies the solution. The graphs and edge multisets resulting from these steps are denoted by subscripts. Details are given in subsequent sections. Augment We add two copies of each supercolumn, obtaining GA and OPTA . We consider the two copies to be interior to the two adjacent bricks. This step allows us, in the restructure step, to concern ourselves only with connectivity between the north and south boundaries of a brick. Cleave Cleaving a vertex refers to splitting it into two vertices and adding an artificial edge between the two vertices. In the cleave step, we modify GA (and so in turn modify M GA and OPTA ) to create GC (and M GC and OPTC ) by cleaving certain vertices while maintaining a planar embedding. Let JC be the set of artificial edges introduced. Note that XC /JC = XA . The artificial edges are assigned zero cost so the metric between vertices is preserved. The artificial edges are added to the solution, possibly in multiplicity, so connectivity is preserved. Flatten In this step, for each brick B, we consider the intersection of the solution with int(B); we replace some of the connected components of the intersection with subpaths of the boundary of B. We denote the resulting solution by OPTF . Map We map the edges of OPTF to B + (M G) creating OPTM . This step temporarily disconnects the solution. Restructure In this step, we modify the solution OPTM . For each brick B in M GC , the part of OPTM strictly interior to B is replaced with another subgraph that has few joining vertices with ∂B. We denote the resulting solution by OPTS . 15 Rejoin In order to re-establish connections broken in the Map step, we add edges to OPTS . Next, we contract the artificial edges added in the cleave step. We denote the resulting solution by [ OP T. Note that the solutions OPT, OPTA , and so on are multisets; an edge can occur more than once. We now describe these steps in greater detail. 5.1.1 Augment Recall that a supercolumn is the eastern boundary of one brick and the western boundary of another, and that the sum of costs of all supercolumns is small. In the Augment step, for each supercolumn P , we modify the graph as shown in Figure 7: • Add to the graph two copies of P , called P1 and P2 , creating two new faces, one bounded by P1 and P and the other bounded by P and P2 . • Add P1 and P2 to OPT. The resulting graph is denoted GA , and the resulting solution is denoted OPT0A . We consider P1 and P2 to be internal to the two bricks. Thus P remains part of the boundary of each of the bricks, and M G contains P but not P1 or P2 . Since P1 and P2 share no internal vertices with P , the joining vertices of OPT0A ∩ B with ∂B belong to NB and SB . (a) (b) Figure 7: Adding the column between two adjacent bricks (solid) in the augment step. The dotted edges represent OPT in (a) and OPTA in (b). We perform one more step, a minimality-achieving step: • We remove edges from OPT0A until it is a minimal set of edges achieving the desired connectivity between terminals. Let OPTA be the resulting set. We get: Lemma 5.5. For every brick B, the joining vertices of OPTA ∩ B with ∂B belong to NB and SB . 16 5.1.2 Cleave We define a graph operation, cleave. Given a vertex v and a bipartition A, B of the edges incident to v, v is cleaved by • splitting v into two vertices, vA and vB , • mapping the endpoint v of edges in A to vA , • mapping the endpoint v of edges in B to vb , and • introducing a zero-cost edge ev = vA vB . This operation is illustrated in Figure 8(a) and (b). If the bipartition A, B is non-interleaving with respect to the embedding’s cycle of edges around v then the construction maintains a planar embedding. A v B vA vB ev (a) (b) vB v vA (c) eA (d) eA eB e'A e'A e'B v ev eB ev vA (e) vB e'B (f) Figure 8: Cleavings illustrated. The bipartition of the edges incident to v is given by the dashed edges A and solid edges B. (a) Starting with this bipartition, (b) the result of cleaving vertex v according to this bipartition. A simplifying cleaving of vertex v with respect to a cycle (bold) before (c) and after (d). A lengthening cleaving of a cycle (e) before and (f) after. We use two types of cleavings: 17 Simplifying cleavings Refer to Figures 8(c) and (d). Let C be a clockwise non-self-crossing, non-simple cycle that visits vertex v twice. Define a bipartition A, B of the edges incident to v as follows: given the clockwise embedding of the edges incident to v, let A start and end with consecutive edges of C and contain only two edges of C. Such a bipartition exists because C is non-self-crossing. Lengthening cleavings Refer to Figures 8(e) and (f). Let C be a cycle, let v be a vertex on C with two edges eA and eB adjacent to v embedded strictly inside C, and let e0A and e0B be consecutive edges of C adjacent to v such that the following bipartition is non-crossing with respect to the embedding: A, B is a bipartition of the edges adjacent to v such that eA , e0A ∈ A and eB , e0B ∈ B. We perform simplifying cleavings for non-simple cycles of OPTA until every cycle is simple; the artificial edges introduced are not included in OPT. The following lemma does not use planarity and shows that (since cycles get mapped to cycles in this type of cleaving) simplifying cleavings preserve two-edge connectivity. b be the graph obtained from H by a simplifying Lemma 5.6. Let e be an edge in a graph H. Let H b cleaving. Then e is a cut-edge in H iff it is a cut-edge in H. Proof. Let u1 , u2 be the endpoints of e and let C be the cycle w.r.t. which a simplifying cleaving was performed. If H contains an e-avoiding ui -to-C path for i = 1, 2 then e is not a cut-edge in H, b Suppose therefore that removing e separates ui from C in H. Then the same and similarly for H. b is true in H, and conversely. Corollary 5.7. For k = 1, 2, if two vertices are k-edge connected in H then any of their copies are k-edge connected in HC . Moreover, after all the simplifying cleavings, every cycle is simple, so: Lemma 5.8. Vertices that are two-edge-connected in OPTC are biconnected. Next we perform lengthening cleavings w.r.t. the boundary of a brick and edges eA and eB of OPTC ; we include in OPTC all the artificial zero-cost edges introduced. Lengthening cleavings clearly maintain connectivity. Suppose that vertices x and y are biconnected in OPTC , and consider performing a lengthening cleaving on a vertex v. Since there are two internally vertex-disjoint xto-y paths in OPTC , v cannot appear on both of them. It follows that there remain two internally vertex-disjoint x-to-y paths after the cleaving. We obtain the following lemma. Lemma 5.9. Lengthening cleavings maintain biconnectivity. Lengthening cleavings are performed while there are still multiple edges of the solution embedded in a brick that are incident to a common boundary vertex. Let JC be the set of artificial edges that are introduced by simplifying and lengthening cleavings. We denote the resulting graph by GC , we denote the resulting mortar graph by M GC , and we denote the resulting solution by OPTC . As a result of the cleavings, we get the following: Lemma 5.10. Let B be a brick in GC with respect to M GC . The intersection OPTC ∩ int(B) is a forest whose joining vertices with ∂B are the leaves of the forest. 18 Proof. Let H be a connected component of OPTC ∩int(B). As a result of the lengthening cleavings, the joining vertices of H with ∂B have degree 1 in H. Suppose otherwise; then there is a vertex v of H ∩ ∂B that has degree > 1 in H. Hence v is a candidate for a lengthening cleaving, a contradiction. By Theorem 2.5 and the minimality-achieving step of the Augment step, any cycle in H must include a terminal u with r(u) = 2 by Theorem 2.5. Since there are no terminals strictly enclosed by bricks, u must be a vertex of ∂B. However, that would make u a joining vertex of H with ∂B. As argued above, such vertices are leaves of H, a contradiction to the fact that u is a vertex of a cycle in H. Therefore H is acyclic. Furthermore, leaves of H are vertices of ∂B since OPTC is minimal with respect to edge inclusion and terminals are not strictly internal to bricks. Lemma 5.11. Let C be a cycle in OPTC . Let B be a brick. Distinct connected components of C ∩ int(B) belong to distinct components of OPTC ∩ int(B). Proof. Assume the lemma does not hold. Then there is a C-to-C path P in int(B). Each vertex of P that is strictly interior to B is not a terminal. A vertex of P that was on ∂(B) would be a candidate for a lengthening cleaving, a contradiction. Therefore P includes no terminals. This contradicts Theorem 2.6. 5.1.3 Flatten For each brick B, consider the edges of OPTC that are strictly interior to B. By Lemma 5.10, the connected components are trees. By Lemma 5.5, for each such tree T , every leaf is either on B’s northern boundary NB or on B’s southern boundary SB . For each such tree T whose leaves are purely in NB , replace T with the minimal subpath of NB that contains all the leaves of T . Similarly, for each such tree T whose leaves are purely in SB , replace T with the minimal subpath of SB that contains all the leaves of T . Let OPTF be the resulting solution. Note that OPTF is a multiset. An edge of the mortar graph can appear with multiplicity greater than one. 5.1.4 Map This step is illustrated in Figures 9(a) and (b). In this step, the multiset OPTF of edges resulting from the flatten step is used to select a set OPTM of edges of B + (M GC ). Recall that every edge e of M GC corresponds in B + (M GC ) to three edges: two brick copies (one in each of two bricks) and one mortar-graph copy. In this step, for every edge e of M GC , we include the mortar-graph copy of e in OPTM with multiplicity equal to the multiplicity of e in OPTF . At this point, none of the brick copies are represented in OPTM . Next, recall that in the augment step, for each supercolumn P , we created two new paths, P1 and P2 , and added them to OPT. The edges of these two paths were not considered part of the mortar graph, so mortar-graph copies were not included in OPTM for these edges. Instead, for each such edge e, we include the brick-copy of e in OPTF with multiplicity equal to the multiplicity of e in OPTF . Finally, for each edge e interior to a brick, we include e in OPTM with the same multiplicity as it has in OPTF . 19 (a) (b) Figure 9: Map (a) The intersection of OPTC with a brick, dashed. (b) The same brick in the portal connected graph with portal edges (double-lines) connecting the brick to the corresponding face (outer boundary) of the mortar graph. 5.1.5 Restructure Let B be a brick. For simplicity, we write the boundary paths of B as N, E, S, W . Let F be the multiset of edges of OPTM that are in the interior of B. F is a forest (Lemma 5.10). As a result of the flatten step, each component of F connects S to N . We will replace F with another subgraph Fb and map each component T of F to a subgraph φ(T ) of Fb where φ(T ) spans the leaves of T and is a tree or a cycle. Distinct components of F are mapped by φ to edge-disjoint subgraphs (taking into account multiplicities). Refer to Figure 10. We inductively define S-to-N paths P0 , P1 , . . . and corresponding integers k0 , k1 , . . .. Let s0 , . . . , st be the vertices of S guaranteed by Lemma 4.2 (where s0 is the vertex common to S and W and st is the vertex common to S and E). Let P0 be the easternmost path in F from S to N . Let k0 be the integer such that start(P0 )) is in S[sk0 , sk0 +1 ). Inductively, for i ≥ 0, let Pi+1 be the easternmost path in FN ∧S from S[s0 , ski ) to N that is vertex-disjoint from Pi . Let ki be the integer such that start(Pi ) ∈ S[ski , ski +1 ). This completes the inductive definition of P0 , P1 , . . .. Note that the number of paths is at most t, which in turn is at most κ() as defined in Equation 2. We use these paths to decompose F , as illustrated in Figure 10. Let Fi be the set of edges of F − Pi+1 enclosed by the cycle formed by Pi , Pi+1 , N and S. Clearly F = ∪i Fi . If Pi is connected to Pi+1 , they share at most one vertex, wi . If they are not connected, we say wi is undefined. There are two cases: either Fi is connected or not. yi Pi+1 ri s0 s1 Pi ski xi ski+1 st Figure 10: Paths used to decompose F . The brick boundary is given by the rectangle. The paths P0 , P1 , . . . are bold. Fi is given by the shaded background. 20 Connected case: There are two subcases. Either Fi spans vertices of S[·, ski ) or not. Suppose Fi spans vertices of S[·, ski ). Let TS be a minimal subtree of Fi that spans Fi ∩ S and let TN be a minimal subtree of Fi that spans Fi ∩ N . Let rN be the first vertex of Pi in TN and let rS be the last vertex of Pi in TS . A path in Fi from TS to N that does not go through rS contradicts the choice of Pi+1 as there would be a path in Fi from S[·, ski ) to N that is disjoint from Pi . It follows that TS and TN are edge disjoint: if they intersect they may only do so at rS = rN . If wi is defined, then there is a path Q from wi to Pi ; Q intersects Pi between rN and rS , for otherwise there would be a superpath of Q that contradicts the choice of Pi+1 . If wi−1 is defined and wi−1 ∈ TN , then we replace TN with the tree guaranteed by Lemma 5.3 with roots rN and wi−1 . Otherwise, we replace TN with the tree guaranteed by Lemma 5.2 with root rN . We do the same for TS . Suppose Fi does not span vertices of S[·, ski ). Let TN be a minimal connected subgraph of Fi ∪ S[ski , start(Pi )] that spans Fi ∩ N . Let rN be the first vertex of Pi in TN . If wi is defined, then there is a path Q from wi to Pi ∪ S[ski , start(Pi )] and Q’s intersection with Pi belongs to Pi [·, rN ], for otherwise there would be a superpath of Q that contradicts the choice of Pi+1 . If wi−1 is defined and wi−1 ∈ TN , then we replace Fi with the tree guaranteed by Lemma 5.3 with roots rN and wi−1 along with Q, Pi [·, rN ], and S[ski , start(Pi )]. Otherwise we replace Fi with the tree guaranteed by Lemma 5.2 with root rN along with Q, Pi [·, rN ], and S[ski , start(Pi )]. In both cases, we define φ0 (Fi ) to be the resulting tree that replaces Fi . By construction, φ0 (Fi ) spans the leaves of Fi and wi−1 and wi (if defined). Disconnected case: In this case, by the definition of Pi+1 , Fi ∩ S is a subset of the vertices of S[ski , start(Pi )], for otherwise there would be a path to the right of Pi+1 that connects to N and is disjoint from Pi . If Fi is connected to Fi+1 , then the western-most tree TW is a tree with root wi and leaves on S and does not connect to N as that would contradict the choice of Pi+1 ; if this is the case, let TbW be the tree guaranteed by Lemma 5.2 and define φ0 (TW ) = TbW . If Fi is connected to Fi−1 , let S 0 be the subpath of S that spans the eastern-most tree TE ’s leaves on S. Let TbE be the tree guaranteed by Lemma 5.3 that spans the eastern-most tree’s leaves on N and roots wi−1 and start(Pi ) and define φ0 (TE ) = TbE . Let F be the set of remaining trees, let P = N , and let Q = S[ski , start(Pi )] in Lemma 5.4. b F, b and φ be the cycle (or empty set), set of trees, and mapping that satisfy the properties Let C, stated in the lemma. b (and TbW , S 0 and TbE if defined). We define Fbi to consist of the trees of Fb and the cycle C We replace every Fi with Fbi , as described above, for every brick, creating OPTS . This is illustrated in Figure 11(a). Now we define φ in terms of φ0 . A component T of F is partitioned into adjacent trees in this restructuring: namely T1 , . . . , Tk , k ≥ 1. T1 and Tk may be restructured via the disconnected case and all others are restructured via the connected case. Define φ(T ) = ∪ki=1 φ0 (Ti ). If k > 1, then consecutive trees Ti and Ti+1 share a vertex wi and by construction φ0 (Ti ) and φ0 (Ti ) also share this vertex. Since φ0 (T ) spans the leaves of T , we get that φ(T ) spans the leaves of T , as desired. Also by construction, the submapping of φ0 of trees to trees (and not cycles) is bijective; the same holds for φ. 21 Number of joining vertices In both the connected and disconnected case, the number of leaves is the result of a constant number of trees resulting from Lemmas 5.2, 5.3 and 5.4. Therefore, Fbi has o(−2.5 ) joining vertices with N and S. Since i ≤ κ() = O(−3 ), OPTS has o(−5.5 ) joining vertices with the boundary of each brick. This is the number of connections required to allow a solution to be nearly optimal and affects the number of portals required in Equation (3): α() is o(−5.5 ) (6) This will allow us to prove the second part of the Structure Theorem. (a) (b) Figure 11: Continuing from Figure 9, restructure and rejoin: (a) Restructured version (dark grey) of the intersection of OPTM with the brick (dashed). (b) Connecting the restructured solution inside the brick to the mortar graph through portals (via dark grey edges). 5.1.6 Rejoin In this step, we make inter-brick connections for parts that were disconnected in the mapping step. Since joining vertices represent the ends of all disconnected parts, it suffices to connect joining vertices of OPTS with ∂B to their mortar-graph counterparts via portal edges. This is illustrated in Figure 11 (d): We first move the edges of OPTS ∩∂B to M G for every brick B. Such edges may have been introduced in the restructure step: for every brick B, we connect OPTS ∩ B to the mortar graph. For every joining vertex v of OPTS ∩ B, we find the nearest portal pv , add the subpath of ∂B and M G connecting v and pv and add the portal edge corresponding to pv . (We need at most two copies of each portal edge.) Finally we contract the edges introduced in [ the cleaving step. This produces a solution OP T of B + (M G). 5.2 Analysis of connectivity In the augment step, because the added paths P1 and P2 form a cycle, this transformation preserves two-connectivity and connectivity between terminals. Cleaving clearly preserves connectivity and, by Lemmas 5.8 and 5.9, terminals that require two-connectivity are biconnected in OPTC . Therefore, for terminals x and y requiring connectivity, there is a path PC in OPTC connecting them. If x and y require two-connectivity, there is a simple cycle CC in OPTC connecting them. We follow PC and CC through the remaining steps. Flatten Consider a tree T that is replaced by a subpath Q of a northern or southern boundary of a brick that spans T ’s leaves. Q spans any terminals that T spanned, since there are no terminals internal to bricks. 22 PC ∩ T is therefore a (set of) leaf-to-leaf paths and so (PC − T ) ∪ Q contains an x-to-y path. It follows that there is an x-to-y path PF in OPTF . By Lemma 5.11, CC ∩ T is a single path and, by the above reasoning, is a leaf-to-leaf path. Therefore (CC − T ) ∪ Q contains a cycle through x and y. It follows that there is a cycle CF through x and y in OPTF 1 , P 2 , . . .), (a cyclic sequence C 1 2 Map PF (CF ) gets mapped to a sequence PM = (PM M = (CM , CM , . . .)) M of paths of OPTM in B + (M GC ) such that each path either consists completely of mortargraph edges or consists completely of brick-copy edges. The last vertex of one path and the first vertex of the next path are copies of the same vertex of GC , and that vertex belongs to a north or south boundary of M GC . By Lemma 5.10, each path in PM or CM that consists of brick-copy edges starts and ends at the northern or southern boundary of a brick. Restructure We define a mapping φ̂, based in part on the map φ defined in Section 5.1.5. For a path Q in PM or CM that uses mortar-copy edges, define φ̂(Q) = Q. For a path Q in PM or CM that uses brick-copy edges, let T be the tree in OPTM that contains Q and define φ̂(Q) = φ(T ). Let CS be the cyclic sequence of trees and cycles to which CM maps by φ. Since φ(T ) spans the leaves (joining vertices) of T , consecutive trees/cycles in CS contain copies of the same vertex. By Lemma 5.11 and that, within a brick, the preimage of the set of trees mapped to by φ, the trees of CS are edge disjoint. (The cycles may be repeated.) Likewise we define PS having the same properties except for the fact that the sequence is not cyclic. Rejoin This step reconnects PS and CS . Consider a tree T in either of these sequences that contains brick-copy edges. The rejoin step first moves any edge of T that is in a brick boundary to the mortar copy. It then connects joining vertices to the mortar by way of detours to portals and portal edges. Therefore, T is mapped to a tree TJ that connects the mortar copies of T ’s leaves. Consider a cycle C in either PS or CS . C contains a subpath of N and S whose edges are moved to their mortar copy and two N -to-S paths whose joining vertices are connected to their mortar copies. Therefore C is mapped to a cycle CJ through the mortar copies of the boundary vertices of C. Let the resulting sequence and cyclic sequence of trees and cycles be PJ and CJ . Since consecutive trees/cycles in CS contain copies of the same vertex, in CJ consecutive trees/cycles contain common mortar vertices. We have that CJ is a cyclic sequence of trees and cycles, through x and y, the trees of which are edge-disjoint. Therefore the union of these contains a cycle through x and y. Similarly, we argue that the union of the trees and cycles in PJ contains and x-to-y path. 5.3 Analysis of cost increase By Lemma 4.3, the total costs of all the east and west boundaries of the bricks is an  fraction of OPT, so we have c(OPTA ) ≤ (1 + 2)c(OPT). (7) 23 The cleaving step only introduces edges of zero cost, so c(OPTC ) = c(OPTA ). (8) The flatten step replaces trees by -short paths, and so can only increase the cost by an  fraction, giving: c(OPTF ) ≤ (1 + )c(OPTC ). (9) The mapping step does not introduce any new edges, so c(OPTM ) = c(OPTF ). (10) The restructure step involves replacing disjoint parts of OPTM ∩ B for each brick by applying Lemmas 5.2, 5.3, and 5.4. This increases the cost of the solution by at most an O() fraction. Further we add subpaths of S[ski , start(Pi )] where OPTM contains disjoint subpaths Pi from start(Pi ) to N and by the brick properties, c(S[ski , start(Pi )]) ≤ c(Pi ). This increases the the cost of the solution by at most another O() fraction. We get, for some constant c: c(OPTS ) ≤ (1 + c)c(OPTM ). (11) In the rejoin step, we add two paths connecting a joining vertex to its nearest portal: along the mortar graph and along the boundary of the brick. The cost added per joining vertex is at most twice the interportal cost: at most 2c(∂B)/θ for a joining vertex with the boundary of brick B, by Lemma 4.4. Since each mortar graph edge appears as a brick-boundary edge at most twice, the sum of the costs of the boundaries of the bricks is at most 18−1 OPT (Equation (1)). Since there are α() joining vertices of OPTS with each brick, the total cost added due to portal connections is α OPT. Replacing α and θ via Equations (6) and (3) gives us that the total cost added at most 36 θ due to portal connections is O(c(OPT)) (12) [ ≤ (1 + c0 )c(OPT) for some constant c0 , proving Combining equations (7) through (12), c(OPT) Theorem 4.6. 6 Dynamic Program In this section we show that there is a dynamic program that finds an approximately optimal solution in the portal-connected graph B + (P ). 6.1 Structure of solution We start by showing that we can restrict our attention to solutions whose intersection with each brick is a small collection of trees whose leaves are portals. Lemma 6.1. Let S be a minimal solution to the instance (B + (M G), r) of the {0, 1, 2}-edge connectivity problem. Let B be a brick, and suppose that the intersection of S with B is the union of a set of non-crossing trees whose leaves are portals. Then the number of such trees is at most three times the number of portals. 24 Proof. Let the portals be v1 , . . . , vk in counterclockwise order. Each tree induces a subpartition on the set of pairs {(i, i + 1) : i ∈ {1, . . . , k − 1}} as follows: if the leaves of the tree are vi1 , vi2 , . . . , vip where i1 < i2 < · · · < ip , then the parts are {(i1 , i1 + 1), . . . , (i2 − 1, i2 )}, {(i2 , i2 + 1), . . . , (i3 − 1, i3 )}, . . . , {(ip−1 , ip−1 + 1), . . . , (ip − 1, ip )} Because the trees are non-crossing, the corresponding subpartitions are non-crossing as well: for each pair T1 , T2 of trees, either each part of T2 is a subset of some part of T1 , or vice versa. Therefore the trees themselves form a rooted tree T according to the nesting relation of the corresponding subpartitions. Furthermore, by minimality of S, no three trees have the same sets of leaves. This shows that a node of T with only one child has a parent with at least two children. The number of leaves of T is at most the number of pairs (i, i + 1), which is at most k − 1. This shows that the number of trees is at most 3(k − 1). Corollary 6.2. There exists a function f that maps each brick B to a cardinality-at-most-3θ subpartition f (B) of the portals of B with the following property: for each brick B, for each part PS of f (B), let TP be any minimum-cost tree in B whose leaves are P , and let HB be the union P ∈f (B) TP . Then there is a feasible solution S 0 to the instance (B + (M G), r) such that • the cost of S 0 is at most (1 + c)OPT where c is an absolute constant, and • the intersection of S with any brick B is HB . Proof. Theorem 4.6 states that there is a feasible solution S of cost at most (1 + c)OPT such that the intersection of S with any brick B is the multi-set union of a family TB of non-crossing trees whose leaves are portals. We assume that S is a minimal feasible solution. Lemma 6.1 shows that |TB | ≤ 3θ. Now we construct the multi-subgraph S 0 from S. For each brick B, replace each tree in TB0 with a minimum-cost tree having the same leaves. Clearly the cost of S 0 is at most that of S. It remains to show that S 0 is a feasible solution. Let u and v be two terminals. Let P or C be a minimal u-to-v path or minimal cycle containing u and v in B + (M G) using edges of S. We obtain a u-to-v path P 0 in S 0 or a cycle C 0 in S 0 containing u and v as follows. For each brick B, the intersection of P or C with B is a set of paths P1 , . . . , Pk through the trees in TB such that each path Pi starts and ends on a portal. For each path Pi , the tree in TB connecting the endpoints of Pi is replaced in S 0 by another tree that includes the same endpoints, so that tree contains a path Pi0 with the same endpoints. We replace each path Pi with the path Pi0 . Let P 0 and C 0 be the subgraphs obtained by performing these transformations for each brick B. The transformations ensure that P 0 and C 0 are in S 0 . The path P 0 shows that u and v are connected in S 0 . For a cycle C in S, we still need to show that C 0 is a cycle. In particular, we need to show that, for each brick B, the paths P1 , . . . , Pk forming the intersection of C with B all belong to different trees in TB0 . Assume for a contradiction that Pi and Pj belong to a single tree T ∈ TB0 . By the assumption that the degree is at most three, Pi and Pj cannot share a vertex. Therefore there is a Pi -to-Pj path in T containing at least one edge. However, since C is a cycle containing Pi and PJ , an edge of the Pi -to-Pj path can be removed while preserving feasibility, a contradiction. 25 Figure 12: The spanning tree of the dual of the parcel is transformed to be a spanning tree of the planar dual of B ÷ (P ). For each brick, all but one of the portal edges is included in the new spanning tree. 6.2 The tree used to guide the dynamic program Recall that B ÷ (P ) is the brick-contracted graph, in which each brick of B + (P ) is contracted to a vertex. Recall that a parcel P is a subgraph of M G and defines a set of bricks contained by the faces of P . The planar dual of the parcel has a spanning tree T of depth η + 1. The algorithm transforms T into a spanning tree T 0 of the planar dual of B ÷ (P ) as follows. Each brick is a vertex of T ; replace that vertex with a cycle minus one edge consisting of the duals of the portal edges, as shown in Figure 12. Since each brick has at most θ portal edges, it follows that the spanning tree T 0 of the dual of B ÷ (P ) has depth at most (η + 1)θ. Next, the algorithm defines Tb to be the set of edges of B ÷ (P ) whose duals are not in T 0 . A classical result on planar graphs implies that Tb is a spanning tree of B ÷ (P ). The construction ensures that each vertex of B ÷ (P ) that corresponds to a brick has only one incident edge in Tb. By our assumption that each vertex in the input graph has degree at most three, every vertex of B ÷ (P ) that appears in G has degree at most three in Tb. Thus Tb has degree at most three. The bound on the depth of T 0 ensures that, for each vertex v of Tb, the graph B ÷ (P ) contains at most 2(η + 1)(θ + 1) + 1 edges between descendents of v and non-descendents. 6.3 The dynamic programming table The algorithm considers the spanning tree Tb of B ÷ (P ) as rooted at an arbitrary leaf. By our assumption that the input graph has degree three, each vertex v of Tb has at most two children. Let Tb(v) denote the subtree of Tb rooted at v. For each vertex v of Tb, define  B if v is the result of contracting a brick B f (v) = v otherwise S and define W (v) to be the subgraph of B + (P ) induced by {f (w) : w ∈ Tb(v)}. Let δ(S) be the subset of edges with exactly one endpoint in the subgraph S (i.e. a cut). It follows that the cut δ(W (v)) in B + (P ) is equal to the cut δ(Tb(v)) in B ÷ (P ) and so has O(θη) edges. The dynamic programming table will be indexed over configurations, defined below. 26 6.3.1 Configurations Let L = δ(H) for a connected, vertex-induced subgraph H of B + (P ). We define a configuration KL corresponding to L, illustrated in Figure 13. First, for each edge e ∈ L, we defined two edges 2 e1 and the fact that an edge can be used twice. Let L̂ be the resulting set of edges, S e to1 reflect 2 L̂ = e∈L {e , e }. A configuration is a forest with no degree-2 vertices whose leaf edges are a subset of L̂, and such that, for each edge e ∈ L, if the forest contains both e1 and e2 then these two edges are incident to the same vertex in the forest, together with a {1, 2} labeling of the internal vertices. We denote the set of all configurations on edge set L by KL . c b a c d e a (c,1) (a,2) (d,1) d e (a,1) h g (a) f (h,1) h (g,1) (b) g f (c) Figure 13: (a) The cut edges (black) of a subgraph H (shaded). (b) A configuration (dotted forest) for L = δ(H). (c) A subgraph (bold) that meets the configuration. Lemma 6.3. The number of configurations for H where n = |δ(H)| is at most 16n (2n)2n−2 and these trees can be computed in O(16n (2n)2n−2 ) time. Proof. A configuration can be selected as follows. First, for each of the n edges, decide whether edge e1 is to be included and whether e2 is to be included. (There are 4n choices.) Let n0 be the number of edges e for which either e1 or e2 is to be included. Next, select a tree with the selected 0 edges as leaf edges. It follows from Cayley’s formula that the number of such trees is 2n02n −2 , which is at most 2n2n−2 . Next, delete some subset of non-leaf edges of the tree. There are at most 2n ways of selecting such a subset. Finally, select a {1, 2} labeling of the internal vertices. There are at most 2n such labelings. The set of trees can be computed in O(1) amortized time per tree [22]. Connecting A configuration KL ∈ KL is connecting if, for each internal vertex v of KL , if v has label c then KL contains c paths from v to leaves. Compatibility Configurations KA ∈ KA and KB ∈ KB are compatible if for every edge e ∈ Â∩ B̂ either e ∈ KA ∩ KB or e ∈ / KA ∪ KB . Compressed bridge-block forest For a graph G, a block is a maximal subgraph such that, for every two vertices u and v in the subgraph, there are two edge-disjoint u-to-v paths. Contracting each block of G to a single vertex yields the bridge-block forest of G. It is easy to see that it is indeed a forest. An edge e of G is an edge of this forest if e is a bridge of G, i.e. if the endpoints of e are in different connected components of G − e. 27 We define the compressed bridge-block forest to be the forest obtained from the bridge-block forest by substituting an edge for each maximal path of internal degree two. We denote the g compressed bridge-block forest of G by EC(G). Consistency We say a configuration KA is consistent with a set of mutually compatible configurations {KA1 , KA2 , . . .} if g i KA ) that preserves the identity of leaf edges • there is an isomorphism between KA and EC(∪ i of KA , and • for each vertex x of ∪i KAi that is labeled 2, x is in a block of ∪i KAi that corresponds to a vertex in KA that is labeled 2. Meeting Let H be a connected, vertex-induced subgraph of G. Let M be a minimal solution to an instance (G, r). Let MH be the graph obtained from M as follows. Remove edges not in H ∪ δ(H). Next, for each vertex v outside of H, if v has k incident edges, replace v with k copies of v, one incident to each of these edges. g H ) = Kδ(H) and if, for each terminal x in H, We say M meets a configuration Kδ(H) if EC(M MH either contains r(x) edge-disjoint paths to vertices outside of H or contains min{r(x), r(y)} edge-disjoint paths to every other terminal y. DP table entry The dynamic program constructs a table DPv for each vertex v of Tb. The table DPv is indexed by the configurations of δ(W (v)). We showed in Section 6.1 that we can restrict our attention to solutions with the following property: the intersection with each brick is a cardinality-at-most-3θ collection of minimum-cost trees whose leaves are portals. For each configuration K of δ(W (v)), the entry DPv [K] is the minimum cost of a subgraph of W (v) that meets configuration K and has the above property. We do not count the cost of edges of δ(W (v)). 6.3.2 The filling procedure If u is not a leaf of Tb, then we populate the entries of DPu with the procedure fill. We use the shorthand K for Kδ({u}) and Ki for Kδ(W (ui )) . The cuts are with respect to the graph B + (P ). fill(DPu ) Initialize each entry of DPu to ∞. Let u1 , . . . , us be the children of u. For every set of connecting, mutually compatible configurations K, K1 , . . . , Ks , For every connecting configuration K0 that is consistent with P K, K1 , . . . , Ks , cost ← c(K ∩ (∪si=1 Ki )) + (c(K1 ∩ K2 ) if s = 2 else 0) + si=1 DPui [Ki ]. DPu [K0 ] ← min{DPu [K0 ], cost} Since Tb has degree at most three, the number s of children of each vertex u in Tb is at most two. 28 If u is a leaf of Tb and u does not correspond to a brick (i.e. f (u) = u), the problem is trivial. Each configuration K is a star: u is the center vertex, and the edges of δ({u}) are the edges of K. Since the cost of any subgraph that is induced by {u} is zero, the value of DPu [K] is zero for every K. Suppose u is a leaf of Tb and f (u) is a brick B. Recall that we restrict our attention to solutions whose intersection with B is a collection of at most 3θ minimum-cost trees whose leaves are portals. The algorithm populates the table DPu as follows. Initialize each entry of DPu to ∞. Next, iterate over cardinality-at-most-3θ families of subsets of the portals. For each family F, • define a subgraph HF to be the multi-set union over subsets P in F of a minimum-cost tree spanning P , • find the configuration K corresponding to HF , and • set DPu [K] ← min{DPu [K], cost of HF }. The minimum-cost tree spanning a subset of portals can be computed in O(θ3 n) time using the algorithm of Theorem 2.1. 6.3.3 Running time Consider the time required to populate the DPu for all the leaves u of Tb. We need only consider non-crossing partitions of subsets of δ(W (v)) since HK is the union of non-crossing trees. The number of non-crossing partitions of an n element ordered set is the nth Catalan number, which is at most 4n /(n + 1). Therefore, the number of non-crossing sub-partitions is at most 4n . It follows that the time to populate DPv for v a brick vertex is O(θ4 4θ |B|) which is O(2poly(1/) |B|) since θ depends polynomially on 1/. Since a vertex appears at most twice in the set of bricks, the time needed to solve all the base cases in O(2poly(1/) n) where n is the number of vertices in the parcel. Consider the time required to populate the DPu for all the internal vertices u of Tb. The number of edges in δ(W (v)) in B + (P ) is O(θη). By Lemma 6.3, it follows that the corresponding number of configurations is O(2poly(1/) ) since θ and η each depend polynomially on 1/. There are O(n) vertices of the recursion tree and so the time required for the dynamic program, not including the base cases is O(2poly(1/) n). The total running time of the dynamic program is O(2poly(1/) n) where n is the number of vertices in the parcel. 6.4 Correctness The connecting property guarantees that the final solution is feasible (satisfying the conectivity requirements). The definitions of compatible and consistent guarantee the inductive hypothesis. We show that the procedure fill correctly computes the cost of a minimum-cost subgraph Hu of W (u) that meets the configuration K0 . We have shown that this is true for the leaves of the recursion tree. Since K is the configuration corresponding to the cut δ({u0 }), K is a star. Therefore c(K) is the cost of the edges of δ({u0 }): K is both the configuration and a minimum-cost subgraph that meets that configuration. Further, c(K ∩ (∪si=1 Ki )) is the cost of the edges of K that are in Ki (for i = 1, . . . , s). w(∩si=1 Ki ) is equal to the cost of the edges common to K1 and K2 if s = 2 and zero otherwise. By the inductive hypothesis the cost computed is that of a Hu : the subgraph of W (u) of a minimum-cost graph that meets this configuration. 29 Consider the entries of DPr where r is the root of Tb. Since δ(W (r)) is empty, there is only one configuration corresponding to this subproblem: the trivial configuration. Therefore, the dynamic program finds the optimal solution in B + (P ). As argued in Section 4.4, combining parcel solutions forms a valid solution in our input graph. We need to compare the cost of the output to the cost of an optimal solution. Recall that new terminals are added at the parcel boundaries to guarantee connectivity between the parcels; let r + denote the requirements including these new terminals. Let S(G, r) denote the optimal solution in graph G with requirements r. For each parcel P , there is a (possibly empty) solution SP in B + (P ) for the original and new terminals in P consisting of edges of S(B + (MG), r) ∪ ∂H (where H is the set of parcels and ∂H is the set of boundary edges of all parcels). We have: c(S(B + (MG), r) ∩ B + (P )) ≤ c(SP ) = c(SP − ∂H) + c(SP ∩ ∂H). Every edge of S(B + (MG), r) not in ∂H appears in SP for exactly one parcel P , and so X c(SP − ∂H) ≤ c(S(B + (MG), r)). P ∈H Every edge of ∂H appears in at most two parcels, and so X c(SP ∩ ∂H) ≤ 2 · c(∂H). P ∈H Since a feasible solution for the original and new terminals in B + (MG) can be obtained by adding a subset of the edges of ∂H to S(B + (MG), r), the cost of the output of our algorithms is at most X c(∂H) + S(B + (P ), r + ) ≤ c(S(B + (MG), r)) + 3c(∂H). P ∈H Combining the cost of the parcel boundaries, the definition of η, and the cost of the mortar graph, we obtain c(∂H) ≤ 21 c(S(G, r)) = 12 OPT. Finally, by Theorem 4.6, the cost of the output is at most (1 + c) OPT. This gives: Theorem 6.4. There is an approximation scheme for solving the {0, 1, 2}-edge connectivity problem (allowing duplication of edges) in planar graphs. The running time is O(2poly(1/) n + n log n). Comments The PTAS framework used is potentially applicable to problems where (i) the input consists of a planar graph G with edge-costs and a subset Q of the vertices of G (we call Q the set of terminals), and where (ii) the output spans the terminals. Steiner tree and two-edge-connectivity have been solved using this framework. The PTAS for the subset tour problem [18] (which was the inspiration for this framework) can be reframed using this technique. Since the extended abstract of this work first appeared, Borradaile, Demaine and Tazari have also this framework to give PTASes for the same set of problems in graphs of bounded genus [6], Bateni, Hajiaghayi and Marx [3] have extended the framework to the Steiner forest problem and Bateni et al. [2] have extended the framework to prize collecting problems. 30 Acknowledgements The authors thank David Pritchard for comments on early versions of this work and discussions with Baigong Zheng regarding Theorems 2.5 and 2.6. This material is based upon work supported by the National Science Foundation under Grant Nos. CCF-0964037, CCF0963921, CCF-14-09520 and by a Natural Science and Research Council of Canada Postdoctoral Fellowship. References [1] B. Baker. Approximation algorithms for NP-complete problems on planar graphs. Journal of the ACM, 41(1):153–180, 1994. [2] M. Bateni, C. Chekuri, A. Ene, M. Hajiaghayi, N. Korula, and D. Marx. Prize-collecting Steiner problems on planar graphs. In Proceedings of the 22nd Annual ACM-SIAM Symposium on Discrete Algorithms, pages 1028–1049, 2011. [3] M. Bateni, M. Hajiaghayi, and D. Marx. Approximation schemes for Steiner forest on planar graphs and graphs of bounded treewidth. J. ACM, 58(5):21, 2011. [4] A. Berger, A. Czumaj, M. Grigni, and H. Zhao. Approximation schemes for minimum 2connected spanning subgraphs in weighted planar graphs. In Proceedings of the 13th European Symposium on Algorithms, volume 3669 of Lecture Notes in Computer Science, pages 472–483, 2005. [5] A. Berger and M. Grigni. Minimum weight 2-edge-connected spanning subgraphs in planar graphs. In Proceedings of the 34th International Colloquium on Automata, Languages and Programming, volume 4596 of Lecture Notes in Computer Science, pages 90–101, 2007. [6] G. Borradaile, E. Demaine, and S. Tazari. Polynomial-time approximation schemes for subsetconnectivity problems in bounded-genus graphs. Algorithmica, 2012. Online. [7] G. Borradaile, C. Kenyon-Mathieu, and P. Klein. A polynomial-time approximation scheme for Steiner tree in planar graphs. In Proceedings of the 18th Annual ACM-SIAM Symposium on Discrete Algorithms, pages 1285–1294, 2007. [8] G. Borradaile, P. Klein, and C. Mathieu. Steiner tree in planar graphs: An O(n log n) approximation scheme with singly exponential dependence on epsilon. In Proceedings of the 10th International Workshop on Algorithms and Data Structures, volume 4619 of Lecture Notes in Computer Science, pages 275–286, 2007. [9] G. Borradaile, P. Klein, and C. Mathieu. An O(n log n) approximation scheme for Steiner tree in planar graphs. ACM Transactions on Algorithms, 5(3):1–31, 2009. [10] A. Czumaj and A. Lingas. On approximability of the minimum cost k-connected spanning subgraph problem. In Proceedings of the 10th Annual ACM-SIAM Symposium on Discrete Algorithms, pages 281–290, 1999. [11] R. Erickson, C. Monma, and A. Veinott. Send-and-split method for minimum-concave-cost network flows. Mathematics of Operations Research, 12:634–664, 1987. 31 [12] K. Eswaran and R. Tarjan. Augmentation problems. SIAM Journal on Computing, 5(4):653– 665, 1976. [13] G. Frederickson and J. Jájá. Approximation algorithms for several graph augmentation problems. SIAM Journal on Computing, 10(2):270–283, 1981. [14] M. Goemans, A. Goldberg, S. Plotkin, D. Shmoys, É. Tardos, and D. Williamson. Improved approximation algorithms for network design problems. In Proceedings of the 5th Annual ACM-SIAM Symposium on Discrete Algorithms, pages 223–232, 1994. [15] M. Henzinger, P. Klein, S. Rao, and S. Subramanian. Faster shortest-path algorithms for planar graphs. Journal of Computer and System Sciences, 55(1):3–23, 1997. [16] K. Jain. A factor 2 approximation algorithm for the generalized Steiner network problem. Combinatorica, 2001(1):39–60, 21. [17] S. Khuller and U. Vishkin. Biconnectivity approximations and graph carvings. Journal of the ACM, 41(2):214–235, 1994. [18] P. Klein. A subset spanner for planar graphs, with application to subset TSP. In Proceedings of the 38th Annual ACM Symposium on Theory of Computing, pages 749–756, 2006. [19] P. Klein. A linear-time approximation scheme for TSP in undirected planar graphs with edge-weights. SIAM Journal on Computing, 37(6):1926–1952, 2008. [20] P. Klein and R. Ravi. When cycles collapse: A general approximation technique for constraind two-connectivity problems. In Proceedings of the 3rd International Conference on Integer Programming and Combinatorial Optimization, pages 39–55, 1993. [21] K. Mehlhorn. A faster approximation algorithm for the Steiner problem in graphs. Information Processing Letters, 27(3):125–128, 1988. [22] S. Nakano and T. Uno. Efficient generation of rooted trees. Technical Report NII-2003-005E, National Institute of Informatics, 2003. [23] R. Ravi. Approximation algorithms for Steiner augmentations for two-connectivity. Technical Report TR-CS-92-21, Brown University, 1992. [24] M. Resende and P. Pardalos, editors. Handbook of Optimization in Telecommunications. Springer, 2006. [25] H. Whitney. Non-separable and planar graphs. Trans. Amer. Math. Soc., 34:339–362, 1932. [26] P. Widmayer. A fast approximation algorithm for Steiner’s problem in graphs. In GraphTheoretic Concepts in Computer Science, volume 246 of Lecture Notes in Computer Science, pages 17–28. Springer Verlag, 1986. [27] D. Williamson, M. Goemans, M. Mihail, and V. Vazirani. A primal-dual approximation algorithm for generalized Steiner network problems. In Proceedings of the 25th Annual ACM Symposium on Theory of Computing, pages 708–717, 1993. 32 [28] Y. Wu, P. Widmayer, and C. Wong. A faster approximation algorithm for the Steiner problem in graphs. Acta informatica, 23(2):223–229, 1986. 33
8cs.DS
Depth-Width Tradeoffs in Approximating Natural Functions with Neural Networks arXiv:1610.09887v2 [cs.LG] 9 Mar 2017 Itay Safran Weizmann Institute of Science [email protected] Ohad Shamir Weizmann Institute of Science [email protected] Abstract We provide several new depth-based separation results for feed-forward neural networks, proving that various types of simple and natural functions can be better approximated using deeper networks than shallower ones, even if the shallower networks are much larger. This includes indicators of balls and ellipses; non-linear functions which are radial with respect to the L1 norm; and smooth non-linear functions. We also show that these gaps can be observed experimentally: Increasing the depth indeed allows better learning than increasing width, when training neural networks to learn an indicator of a unit ball. 1 Introduction Deep learning, in the form of artificial neural networks, has seen a dramatic resurgence in the past recent years, achieving great performance improvements in various fields of artificial intelligence such as computer vision and speech recognition. While empirically successful, our theoretical understanding of deep learning is still limited at best. An emerging line of recent works has studied the expressive power of neural networks: What functions can and cannot be represented by networks of a given architecture (see related work section below). A particular focus has been the trade-off between the network’s width and depth: On the one hand, it is wellknown that large enough networks of depth 2 can already approximate any continuous target function on [0, 1]d to arbitrary accuracy (Cybenko, 1989; Hornik, 1991). On the other hand, it has long been evident that deeper networks tend to perform better than shallow ones, a phenomenon supported by the intuition that depth, providing compositional expressibility, is necessary for efficiently representing some functions. Indeed, recent empirical evidence suggests that even at large depths, deeper networks can offer benefits over shallower networks (He et al., 2015). To demonstrate the power of depth in neural networks, a clean and precise approach is to prove the existence of functions which can be expressed (or well-approximated) by moderately-sized networks of a given depth, yet cannot be approximated well by shallower networks, even if their size is much larger. However, the mere existence of such functions is not enough: Ideally, we would like to show such depth separation results using natural, interpretable functions, of the type we may expect neural networks to successfully train on. Proving that depth is necessary for such functions can give us a clearer and more useful insight into what various neural network architectures can and cannot express in practice. In this paper, we provide several contributions to this emerging line of work. We focus on standard, vanilla feedforward networks (using some fixed activation function, such as the popular ReLU), and measure 1 expressiveness directly in terms of approximation error, defined as the expected squared loss with respect to some distribution over the input domain. In this setting, we show the following: • We prove that the indicator of the Euclidean unit ball, x 7→ 1 (kxk ≤ 1) in Rd , which can be easily approximated to accuracy  using a 3-layer network with O(d/) neurons, cannot be approximated to an accuracy higher than O(1/d4 ) using a 2-layer network, unless its width is exponential in d. In fact, we show the same result more generally, for any indicator of an ellipsoid x 7→ 1 (kAx + bk ≤ r) (where A is a non-singular matrix and b is a vector). The proof is based on a reduction from the main result of Eldan & Shamir (2016), which shows a separation between 2-layer and 3-layer networks using a more complicated and less natural radial function. • We show that this depth/width trade-off can also be observed experimentally: Specifically, that the indicator of a unit ball can be learned quite well using a 3-layer network, using standard backpropagation, but learning the same function with a 2-layer network (even if much larger) is significantly more difficult. Our theoretical result indicates that this gap in performance is due to approximation error issues. This experiment also highlights the fact that our separation result is for a natural function that is not just well-approximated by some 3-layer network, but can also be learned well from data using standard methods. • We prove that any L1 radial function x 7→ f (kxk1 ), where x ∈ Rd and f : R → R is piecewise-linear, cannot be approximated to accuracy  by a depth 2 ReLU network of width less than Ω̃(min{1/, exp(Ω(d))}). In contrast, such functions can be represented exactly by 3-layer ReLU networks. • Finally, we prove that any member of a wide family of non-linear and twice-differentiable functions (including for instance x 7→ x2 in [0, 1]), which can be approximated to accuracy  using ReLU networks of depth and width O(poly(log(1/))), cannot be approximated to similar accuracy by constant-depth ReLU networks, unless their width is at least Ω(poly(1/)). We note that a similar result appeared online concurrently and independently of ours in Yarotsky (2016); Liang & Srikant (2016), but the setting is a bit different (see related work below for more details). Related Work The question of studying the effect of depth in neural network has received considerable attention recently, and studied under various settings. Many of these works consider a somewhat different setting than ours, and hence are not directly comparable. These include networks which are not plain-vanilla ones (e.g. Cohen et al. (2016); Delalleau & Bengio (2011); Martens & Medabalimi (2014)), measuring quantities other than approximation error (e.g. Bianchini & Scarselli (2014); Poole et al. (2016)), focusing only on approximation upper bounds (e.g. Shaham et al. (2016)), or measuring approximation error in terms of L∞ -type bounds, i.e. supx |f (x) − f˜(x))| rather than L2 -type bounds Ex (f (x) − f˜(x))2 (e.g. Yarotsky (2016); Liang & Srikant (2016)). We note that the latter distinction is important: Although L∞ bounds are more common in the approximation theory literature, L2 bounds are more natural in the context of statistical machine learning problems (where we care about the expected loss over some distribution). Moreover, L2 approximation lower bounds are stronger, in the sense that an L2 lower bound easily translates to a lower bound on L∞ lower bound, but not vice versa1 . 1 To give a trivial example, ReLU networks always express continuous functions, and therefore can never approximate a discontinuous function such as x 7→ 1 (x ≥ 0) in an L∞ sense, yet can easily approximate it in an L2 sense given any continuous distribution. 2 A noteworthy paper in the same setting as ours is Telgarsky (2016), which proves a separation result between the expressivity of ReLU networks of depth k and depth o (k/ log (k)) (for any k). This holds even for one-dimensional functions, where a depth k network is shown to realize a saw-tooth function with exp(O(k)) oscillations, whereas any network of depth o (k/ log (k)) would require a width superpolynomial in k to approximate it by more than a constant. In fact, we ourselves rely on this construction in the proofs of our results in Sec. 5. On the flip side, in our paper we focus on separation in terms of the accuracy or dimension, rather than a parameter k. Moreover, the construction there relies on a highly oscillatory function, with Lipschitz constant exponential in k almost everywhere. In contrast, in our paper we focus on simpler functions, of the type that are likely to be learnable from data using standard methods. Our separation results in Sec. 5 (for smooth non-linear functions) are closely related to those of Yarotsky (2016); Liang & Srikant (2016), which appeared online concurrently and independently of our work, and the proof ideas are quite similar. However, these papers focused on L∞ bounds rather than L2 bounds. Moreover, Yarotsky (2016) considers a class of functions different than ours in their positive results, and Liang & Srikant (2016) consider networks employing a mix of ReLU and threshold activations, whereas we consider a purely ReLU network. Another relevant and insightful work is Poggio et al. (2016), which considers width vs. depth and provide general results on expressibility of functions with a compositional nature. However, the focus there is on worse-case approximation over general classes of functions, rather than separation results in terms of specific functions as we do here, and the details and setting is somewhat orthogonal to ours. 2 Preliminaries In general, we let bold-faced letters such as x = (x1 , . . . , xd ) denote vectors, and capital letters denote matrices or probabilistic events. k·k denotes the Euclidean norm, and k·k1 the 1-norm. 1 (·) denotes the indicator function. We use the standard asymptotic notation O(·) and Ω(·) to hide constants, and Õ(·) and Ω̃(·) to hide constants and factors logarithmic in the problem parameters. Neural Networks. We consider feed-forward neural networks, computing functions from Rd to R. The network is composed of layers of neurons, where each neuron computes a function of the form x 7→ σ(w> x + b), where w is a weight vector, b is a bias term and σ : R 7→ R is a non-linear activation function, such as the ReLU function  σ(z) = [z]+ = max{0, z}. Letting σ(W x + b) be a shorthand for σ(w1> x + b1 ), . . . , σ(wn> x + bn ) , we define a layer of n neurons as x 7→ σ(W x + b). By denoting the output of the ith layer as Oi , we can define a network of arbitrary depth recursively by Oi+1 = σ(Wi+1 Oi + bi+1 ), where Wi , bi represent the matrix of weights and bias of the ith layer, respectively. Following a standard convention for multi-layer networks, the final layer h is a purely linear function with no bias, i.e. Oh = Wh · Oh−1 . We define the depth of the network as the number of layers l, and denote the number of neurons ni in the ith layer as the size of the layer. We define the width of a network as maxi∈{1,...,l} ni . Finally, a ReLU network is a neural network where all the non-linear activations are the ReLU function. We use “2-layer” and “3-layer” to denote networks of depth 2 and 3. In particular, in our notation a 2-layer ReLU network has the form n1 X x 7→ vi · [wi> x + bi ]+ i=1 for some parameters v1 , b1 , . . . , vn1 , bn1 and d-dimensional vectors w1 , . . . , wn1 . Similarly, a 3-layer ReLU 3 network has the form n2 X i=1   n1 h i X > ui  vi,j wi,j x + bi,j + ci  + j=1 + for some parameters {ui , vi,j , bi,j , ci , wi,j }. Approximation error. Given some function f on a domain X endowed with some probability distribution (with density function µ), we define the quality of its approximation by some other function f˜ as R 2 2 ˜ ˜ X (f (x) − f (x)) µ(x)dx = Ex∼µ [(f (x) − f (x)) ]. We refer to this as approximation in the L2 -norm sense. In one of our results (Thm. 6), we also consider approximation in the L∞ -norm sense, defined as supx∈X |f (x) − f˜(x)|. Clearly, this upper-bounds the (square root of the) L2 approximation error defined above, so as discussed in the introduction, lower bounds on the L2 approximation error (w.r.t. any distribution) are stronger than lower bounds on the L∞ approximation error. 3 Indicators of L2 Balls and Ellipsoids We begin by considering one of the simplest possible function classes on Rd , namely indicators of L2 balls (and more generally, ellipsoids). The ability to compute such functions is necessary for many useful primitives, for example determining if the distance between two points in Euclidean space is below or above some threshold (either with respect to the Euclidean distance, or a more general Mahalanobis distance). In this section, we show a depth separation result for such functions: Although they can be easily approximated with 3-layer networks, no 2-layer network can approximate it to high accuracy w.r.t. any distribution, unless its width is exponential in the dimension. This is formally stated in the following theorem: Theorem 1 (Inapproximability with 2-layer networks). The following holds for some positive universal constants c1 , c2 , c3 , c4 , and any network employing an activation function satisfying Assumptions 1 and 2 in Eldan & Shamir (2016): For any d > c1 , and any non-singular matrix A ∈ Rd×d , b ∈ Rd and r ∈ (0, ∞), there exists a continuous probability distribution γ on Rd , such that for any function g computed by a 2-layer network of width at most c3 exp(c4 d), and for the function f (x) = 1 (kAx + bk ≤ r), we have Z c2 (f (x) − g(x))2 · γ(x)dx ≥ 4 . d Rd We note that the assumptions from Eldan & Shamir (2016) are very mild, and apply to all standard activation functions, including ReLU, sigmoid and threshold. The formal proof of Thm. 1 (provided below) is based on a reduction from the main result of Eldan & Shamir (2016), which shows the existence of a certain radial function (depending on the input x only through its norm) and a probability distribution which cannot be expressed by a 2-layer network, whose width is less than exponential in the dimension d to more than constant accuracy. A closer look at the proof reveals that this function (denoted as g̃) can be expressed as a sum of Θ(d2 ) indicators of L2 balls of various radii. We argue that if we could have accurately approximated a given L2 ball indicator with respect to all distributions, then we could have approximated all the indicators whose sum add up to g̃, and hence reach a contradiction. By a linear transformation argument, we show the same contradiction would have occured if we could have approximated the indicators of an non-degenerate ellipse with respect to any distribution. The formal proof is provided below: 4 Proof of Thm. 1. Assume by contradiction that for f as described in the theorem, and for any distribution γ, there exists a two-layer network f˜γ of width at most c3 exp(c4 d), such that Z  2 c2 f (x) − f˜γ (x) γ(x)dx ≤  ≤ 4 . d x∈Rd Let  and b̂ be a d × d non-singular matrix and vector respectively, to be determined  later.  We begin by −1 −1 performing a change of variables, y = Âx + b̂ ⇐⇒ x =  (y − b̂), dx = det  · dy, which yields Z  2      f Â−1 y − b̂ − f˜γ Â−1 y − b̂ y∈Rd      · γ Â−1 y − b̂ · det Â−1 · dy ≤ . (1) In particular, let us choose the distribution γ defined as γ(z) = | det(Â)| · µ(Âz + b̂), where µ is the (continuous) distribution used in theR main result of Eldan & Shamir (2016) (note that γ is indeed a R distribution, since z γ (z) = (det(Â)) z µ(Âz + b̂)dz, which by the change of variables x = Âz + b̂, R dx = | det(Â)|dz equals x µ(x)dx = 1). Plugging the definition of γ in Eq. (1), and using the fact that | det(Â−1 )| · | det(Â)| = 1, we get Z  2      f Â−1 y − b̂ − f˜γ Â−1 y − b̂ y∈Rd · µ (y) dy ≤ . (2) Letting z > 0 be an arbitrary parameter, we now pick  = zr A and b̂ = zr b. Recalling the definition of f as x 7→ 1 (kAx + bk ≤ r), we get that Z   r z 2 1 (kyk ≤ z) − f˜γ A−1 y − b z r y∈Rd · µ (y) dy ≤ . (3)  Note that f˜γ zr A−1 y − zr b expresses a 2-layer network composed with a linear transformation of the input, and hence can be expressed in turn by a 2-layer network (as we can absorb theq linear transformation R 2 into the parameters of each neuron in the first layer). Therefore, letting kf kL2 (µ) = y f (y)dy denote the norm in L2 (µ) function space, we showed the following: For any z > 0, there exists a 2-layer network f˜z such that   √ 1 (k·k ≤ z) − f˜z (·) ≤ . (4) L2 (µ) With this key result in hand, we now turn to complete the proof. We consider the function g̃ from Eldan & Shamir (2016), for which it was proven that no 2-layer network can approximate it w.r.t. µ to better than constant accuracy, unless its width is exponential in the dimension d. In particular g̃ can be written as g̃(x) = n X i · 1 (kxk ∈ [ai , bi ]) , i=1 5 where [ai , bi ] are disjoint intervals, i ∈ {−1, +1}, and n = Θ(d2 ) where d is the dimension. Since g̃ can also be written as n X i (1 (kxk ≤ bi ) − 1 (kxk ≤ ai )) , i=1 we get by Eq. (4) and the triangle inequality that g̃(·) − n X i · (f˜bi (·) − f˜ai (·) i=1 n X ≤ |i | L2 (µ)   1 (k·k ≤ bi ) − f˜bi i=1 +  L2 (µ) 1 (k·k ≤ ai ) − f˜ai (·) √  L2 (µ) ≤ 2n . However, since a linear combination of 2nP2-layer neural networks of width at most w is still a 2-layer network, of width at most 2nw, we get that ni=1 i · (f˜bi (·) − f˜ai (·)) is a 2-layer network, most p of width at √ √ Θ(d2 )·c3 exp(c4 d), which approximates g̃ to an accuracy of less than 2n  = Θ(d2 )· c2 /d4 = Θ(1)· c2 . Hence, by picking c2 , c3 , c4 sufficiently small, we get a contradiction to the result of Eldan & Shamir (2016), that no 2-layer network of width smaller than c exp(cd) (for some constant c) can approximate g̃ to more than constant accuracy, for a sufficiently large dimension d. To complement Thm. 1, we also show that such indicator functions can be easily approximated with 3-layer networks. The argument is quite simple: Using an activation such as ReLU or Sigmoid, we can use one layer to approximate any Lipschitz continuous function on any bounded interval, and in particular x 7→ x2 . Given a vector x ∈P Rd , we can apply this construction on each coordinate xi seperately, hence 2 approximating x 7→ kxk = di=1 x2i . Similarly, we can approximate x 7→ kAx + bk for arbitrary fixed matrices A and vectors b. Finally, with a 3-layer network, we can use the second layer to compute a continuous approximation to the threshold function z 7→ 1 (z ≤ r). Composing these two layers, we get an arbitrarily good approximation to the function x 7→ 1 (kAx + bk ≤ r) w.r.t. any continuous distribution, with the network size scaling polynomially with the dimension d and the required accuracy. In the theorem below, we formalize this intuition, where for simplicity we focus on approximating the indicator of the unit ball: Theorem 2 (Approximability with 3-layer networks). Given δ > 0, for any activation function σ satisfying Assumption 1 in Eldan & Shamir (2016) and any continuous probability distribution µ on Rd , there exists a constant cσ dependent only n o on σ, and a function g expressible by a 3-layer network of width at most p 2 max 8cσ d /δ, cσ 1/2δ , such that the following holds: Z Rd (g (x) − 1 (kxk2 ≤ 1))2 µ (x) dx ≤ δ, where cσ is a constant depending solely on σ. The proof of the theorem appears in Subsection 6.1. 6 0.3 0.3 RMSE (training set) 0.26 RMSE (validation set) 3-layer, width 100 2-layer, width 100 2-layer, width 200 2-layer, width 400 2-layer, width 800 0.28 0.24 0.22 0.2 0.18 3-layer, width 100 2-layer, width 100 2-layer, width 200 2-layer, width 400 2-layer, width 800 0.25 0.2 0.16 0.14 0.12 0 20 40 60 80 100 120 140 160 180 0.15 0 200 Batch number (x1000) 20 40 60 80 100 120 140 160 180 200 Batch number (x1000) Figure 1: The experiment results, depicting the network’s root mean square error over the training set (left) and validation set (right), as a function of the number of batches processed. Best viewed in color. 3.1 An Experiment In this subsection, we empirically demonstrate that indicator functions of balls are indeed easier to learn with a 3-layer network, compared to a 2-layer network (even if the 2-layer network is significantly larger). This indicates that the depth/width trade-off for indicators of balls, predicted by our theory, can indeed be observed experimentally. Moreover, it highlights the fact that our separation result is for simple natural functions, that can be learned reasonably well from data using standard methods. For our experiment, we sampled 5 · 105 data instances in R100 , with a direction chosen uniformly at random and a norm drawn uniformly at random from the interval [0, 2]. To each instance, we associated a target value computed according to the target function f (x) = 1 (kxk2 ≤ 1). Another 5 · 104 examples were generated in a similar manner and used as a validation set. We trained 5 ReLU networks on this dataset: • One 3-layer network, with a first hidden layer of size 100, a second hidden layer of size 20, and a linear output neuron. • Four 2-layer networks, with hidden layer of sizes 100, 200, 400 and 800, and a linear output neuron. Training was performed with backpropagation, using the TensorFlow library. We used the squared loss `(y, y 0 ) = (y − y 0 )2 and batches of size 100. For all networks, we chose a momentum parameter of 0.95, and a learning rate starting at 0.1, decaying by a multiplicative factor of 0.95 every 1000 batches, and stopping at 10−4 . The results are presented in Fig. 1. As can be clearly seen, the 3-layer network achieves significantly better performance than the 2-layer networks. This is true even though some of these networks are significantly larger and with more parameters (for example, the 2-layer, width 800 network has ˜80K parameters, vs. ˜10K parameters for the 3-layer network). This gap in performance is the exact opposite of what might be expected based on parameter counting alone. Moreover, increasing the width of the 2-layer networks exhibits diminishing returns: The performance improvement in doubling the width from 100 to 200 is much larger than doubling the width from 200 to 400 or 400 to 800. This indicates that one would need a much larger 2-layer network to match the 3-layer, width 100 network’s performance. Thus, we conclude that the network’s depth indeed plays a crucial role, and that 3-layer networks are inherently more suitable to express indicator functions of the type we studied. 7 4 L1 Radial Functions; ReLU Networks Having considered functions depending on the L2 norm, we now turn to consider functions depending on the L1 norm. Focusing on ReLU networks, we will show a certain separation result holding for any non-linear function, which depends on the input x only via its 1-norm kxk1 . Theorem 3. Let f : [0, ∞) 7→ R be a function such that for some r, δ > 0 and  ∈ (0, 1/2), inf Ex uniform on [r,(1+)r] [(f (x) − (ax − b))2 ] > δ . a,b∈R Then there exists a distribution γ over {x : kxk1 ≤ (1 + )r}, such that if a 2-layer ReLU network F (x) satisfies Z x (f (kxk1 ) − F (x))2 γ(x)dx ≤ δ/2, then its width must be at least Ω̃(min {1/, exp(Ω(d))}) (where the Ω̃ notation hides constants and factors logarithmic in , d). To give a concrete example, suppose that f (z) = [z − 1]+ , which cannot be approximated by a linear function better than O(2 ) in an -neighborhood of 1. By taking r = 1 − 2 and δ = O(2 ), we get that no 2layer network can approximate the function [kxk1 − 1]+ (at least with respect to some distribution), unless its width is Ω̃(min {1/, exp(Ω(d))}). On the flip side, f (kxk1 ) can be expressed exactly by a 3-layer, P width 2d ReLU network: x 7→ [ di=1 ([xi ]+ + [−xi ]+ ) − 1]+ , where the output neuron is simply the identity function. The same argument would work for any piecewise-linear f . More generally, the same kind of argument would work for any function f exhibiting a non-linear behavior at some points: Such functions can be well-approximated by 3-layer networks (by approximating f with a piecewise-linear function), yet any approximating 2-layer network will have a lower bound on its size as specified in the theorem. Intuitively, the proof relies on showing that any good 2-layer approximation of f (kxk1 ) must capture the non-linear behavior of f close to “most” points x satisfying kxk1 ≈ r. However, a 2-layer ReLU P network x 7→ N j=1 aj [hwj , xi + bj ]+ is piecewise linear, with non-linearities only at the union of the N hyperplanes ∪j {x : hwj , xi + bj = 0}. This implies that “most” points x s.t. kxk1 ≈ r must be -close to a hyperplane {x : hwj , xi + bj = 0}. However, the geometry of the L1 ball {x : kxk = r} is such that the  neighborhood of any single hyperplane can only cover a “small” portion of that ball, yet we need to cover most of the L1 ball. Using this and an appropriate construction, we show that required number of hyperplanes is at least 1/, as long as  > exp(−O(d)) (and if  is smaller than that, we can simply use one neuron/hyperplane for each of the 2d facets of the L1 ball, and get a covering using 2d neurons/hyperplanes). The formal proof appears in Subsection 6.2. We note that the bound in Thm. 3 is of a weaker nature than the bound in the previous section, in that the lower bound is only polynomial rather than exponential (albeit w.r.t. different problem parameters:  vs. d). Nevertheless, we believe this does point out that L1 balls also pose a geometric difficulty for 2-layer networks, and conjecture that our lower bound can be considerably improved: Indeed, at the moment we do not know how to approximate a function such as x 7→ [kxk1 − 1]+ with 2-layer networks to better than constant accuracy, using less than Ω(2d ) neurons. 5 C 2 Nonlinear Functions; ReLU Networks In this section, we establish a depth separation result for approximating continuously twice-differentiable (C 2 ) functions using ReLU neural networks. Unlike the previous results in this paper, the separation is for 8 depths which can be larger than 3, depending on the required approximation error. Also, the results will all be with respect to the uniform distribution µd over [0, 1]d . As mentioned earlier, the results and techniques in this section are closely related to the independent results of Yarotsky (2016); Liang & Srikant (2016), but our emphasis is on L2 rather than L∞ approximation bounds, and we focus on somewhat different network architectures and function classes. Clearly, not all C 2 functions are difficult to approximate (e.g. a linear function can be expressed exactly with a 2-layer network). Instead, we consider functions which have a certain degree of non-linearity, in the sense that its Hessians are non-zero along some direction, on a significant portion of the domain. Formally, we make the following definition: Definition 1. Let µd denote the uniform distribution on [0, 1]d . For a function f : [0, 1]d → R and some λ > 0, denote σλ (f ) = sup µd (U ) , v∈Sd−1 , U ∈U s.t. v> H(f )(x)v≥λ ∀x∈U where Sd−1 = {x : kxk2 = 1} is the d-dimensional unit hypersphere, and U is the set of all connected and measurable subsets of [0, 1]d . In words, σλ (f ) is the measure (w.r.t. the uniform distribution on [0, 1]d ) of the largest connected set in the domain of f , where at any point, f has curvature at least λ along some fixed direction v. The “prototypical” functions f we are interested in is when σλ (f ) is lower bounded by a constant (e.g. it is 1 if f is strongly convex). We stress that our results in this section will hold equally well by considering the condition v> H(f )(x)v ≤ −λ as well, however for the sake of simplicity we focus on the former condition appearing in Def. 1. Our goal is to show a depth separation result inidividually for any such function (that is, for any such function, there is a gap in the attainable error between deeper and shallower networks, even if the shallow network is considerably larger). As usual, we start with an inapproximability result. Specifically, we prove the following lower bound on the attainable approximation error of f , using a ReLU neural network of a given depth and width: Theorem 4. For any C 2 function f : [0, 1]d → R, any λ > 0, and any function g on [0, 1]d expressible by a ReLU network of depth l and maximal width m, it holds that Z c · λ2 · σλ5 (f (x) − g(x)2 µd (x) dx ≥ , (2m)4l [0,1]d where c > 0 is a universal constant. The theorem conveys a key tradeoff between depth and width when approximating a C 2 function using ReLU networks: The error cannot decay faster than polynomially in the width m, yet the bound deteriorates exponentially in the depth l. As we show later on, this deterioration does not stem from the looseness in the bound: For well-behaved f , it is indeed possible to construct ReLU networks, where the approximation error decays exponentially with depth. The proof of Thm. 4 appears in Subsection 6.3, and is based on a series of intermediate results. First, we show that any strictly curved function (in a sense similar to Definition 1) cannot be well-approximated in an L2 sense by piecewise linear functions, unless the number of linear regions is large. To that end, we first establish some necessary tools based on Legendre polynomials. We then prove a result specific to the one-dimensional case, including an explicit lower bound if the target function is quadratic (Thm. 9) or strongly convex or concave (Thm. 10). We then expand the construction to get an error lower bound 9 Figure 2: ReLU approximation of the function x 7→ x2 obtained by extracting 5 bits. The number of linear segments grows exponentially with the number of bits and the approximating network size. in general dimension d, depending on the number of linear regions in the approximating piecewise-linear function. Finally, we note that any ReLU network induces a piecewise-linear function, and bound the number of linear regions induced by a ReLU network of a given width and depth (using a lemma borrowed from Telgarsky (2016)). Combining this with the previous lower bound yields Thm. 4. We now turn to complement this lower bound with an approximability result, showing that with more depth, a wide family of functions to which Thm. 4 applies can be approximated with exponentially high accuracy. Specifically, we consider functions which can be approximated using a moderate number of multiplications and additions, where the values of intermediate computations are bounded (for example, a special case is any function approximable by a moderately-sized Boolean circuit, or a polynomial). The key result to show this is the following, which implies that the multiplication of two (bounded-size) numbers can be approximated by a ReLU network, with error decaying exponentially with depth: 2 Theorem 5. Let f : [−M, M ] → R, f (x, y) = x · y and let    > 0 be arbitrary. Then exists a ReLU neural network g of width 4 log M + 13 and depth 2 log M + 9 satisfying sup |f (x, y) − g (x, y)| ≤ . (x,y)∈[−M,M ]2 The idea of the construction is that depth allows us to compute highly-oscillating functions, which can extract high-order bits from the binary representation of the inputs. Given these bits, one can compute the product by a procedure resembling long multiplication, as shown in Fig. 2, and formally proven as follows: Proof of Thm. 5. We begin by observing that by using a simple linear change of variables on x, we may assume without loss of generality that x ∈ [0, 1], as we can just rescale x to the interval [0, 1], and then map it back to its original domain [−M, M ], where the error will multiply by a factor of 2M . Then by requiring  instead of , the result will follow. accuracy 2M 10 The key behind the proof is that performing bit-wisePoperations on the first k bits of x ∈ [0, 1] yields an −i estimation of the product to accuracy 21−k M . Let x = ∞ i=1 2 xi be the binary representation of x where th xi is the i bit of x, then x·y = = ∞ X i=1 k X 2−i xi · y 2−i xi · y + i=1 But since ∞ X 2−i xi · y ≤ i=k+1 ∞ X 2−i xi · y. (5) i=k+1 ∞ X 2−i · y = 2−k |y| ≤ 21−k M, i=k+1 Eq. (5) implies x·y− k X 2−i xi · y ≤ 21−k M. i=1  , it suffices to show the existence of a network which approximates the function ≤ 2M    accuracy 2 , where k = 2 log 8M . This way both approximations will be at most 2 ,  Requiring that 22−k M Pk −i x i · y to resulting in the desired accuracy of . Before specifying the architecture which extracts the ith bit of x, we first describe the last 2 layers of the network. Let the penultimate layer comprise of k neurons, each receiving both y and xi as input, and having  the set of weights 2−i , 1, −1 . Thus, the output of the ith neuron in the penultimate layer is  −i  2 y + xi − 1 + = 2−i xi y. i=1 2 Let the final single neuron have the set of weights (1, . . . , 1, 0) ∈ Rk+1 , this way, the output of the Pkoutput −i network will be i=1 2 xi · y as required. We now specify the architecture which extracts the first most significant k bits of x. In Telgarsky (2016), the author demonstrates how the composition of the function ϕ (x) = [2x]+ − [4x − 2]+ with itself i times, ϕi , yields a highly oscillatory triangle wave function in the domain [0, 1]. Furthermore, we observe that ϕ (x) = 0 ∀x ≤ 0, and thus ϕi (x) = 0 ∀x ≤ 0. Now, a linear shift of the input of ϕi by 2−i−1 , and composing the output with     1 1 1 1 1 1 σδ (x) = x− + − x− − , 2δ 4δ 2 + 2δ 4δ 2 + which converges to 1[x≥0.5] (x) as δ → 0, results in an approximation of x 7→ xi : σδ ϕi x − 2−i−1  . We stress that choosing δ such that the network approximates the bit-wise product to accuracy 2will require δ to be of magnitude 1 , but this poses no problem as representing such a number requires log 1 bits, which is also the magnitude of the size of the network, as suggested by the following analysis. 11 Next, we compute the size of the network required to implement the above approximation. To compute ϕ only two neurons are required, therefore ϕi can be computed using i layers with 2 neurons in each, and finally composing this with σδ requires a subsequent layer with 2 more neurons. To implement the ith bit extractor we therefore require a network of size 2 × (i + 1). Using dummy neurons to propagate the ith bit for i < k, the architecture extracting the k most significant bits of x will be of size 2k × (k + 1). Adding the final component performing the multiplication estimation will require 2 more layers of width k and 1 respectively, and an increase of the width by 1 to propagate y to the penultimate layer, resulting in a network of size (2k + 1) × (k + 1). Thm. 5 shows that multiplication can be performed very accurately by deep networks. Moreover, additions can be computed by ReLU networks exactly, using only a single layer with 4 neurons: Let α, β ∈ R be arbitrary, then (x, y) 7→ α · x + β · y is given in terms of ReLU summation by α [x]+ − α [−x]+ + β [y]+ − β [−y]+ . Repeating these arguments, we see that any function which can be approximated by a bounded number of operations involving additions and multiplications, can also be approximated well by moderately-sized networks. This is formalized in the following theorem, which provides an approximation error upper bound (in the L∞ sense, which is stronger than L2 for upper bounds): Theorem 6. Let Ft,M, be the family of functions on the domain [0, 1]d with the property that f ∈ Ft,M, is approximable to accuracy  with respect to the infinity norm, using at most t operations involving weighted addition, (x, y) 7→ α · x + β · y, where α, β ∈ R are fixed; and multiplication, (x, y) 7→ x · y, where each intermediate computation stage is bounded in the interval [−M, M ]. Then there  exists a universal constant 1 2 c, and a ReLU network g of width and depth at most c t log  + t log (M ) , such that sup |f (x) − g (x)| ≤ 2. x∈[0,1]d As discussed in Sec. 2, this type of L∞ approximation bound implies an L2 approximation bound with respect to any distribution. The proof of the theorem appears in Subsection 6.4. Combining Thm. 4 and Thm. 6, we can state the following corollary, which formally shows how depth can be exponentially more valuable than width as a function of the target accuracy : Corollary 1. Suppose f ∈ C 2 ∩Ft(),M (), , where t () = O (poly (log (1/))) and M () = O (poly (1/)). Then approximating f to accuracy  in the L2 norm using a fixed depth ReLU network requires width at least poly(1/), whereas there exists a ReLU network of depth and width at most p (log (1/)) which approximates f to accuracy  in the infinity norm, where p is a polynomial depending solely on f . Proof. The lower bound follows immediately from Thm. 4. For the upper bound, observe that Thm. 6 implies an  approximation by a network of width and depth at most   c t (/2) log (2/) + (t (/2))2 log (M (/2)) , which by the assumption of Corollary 1, can be bounded by p (log (1/)) for some polynomial p which depends solely on f . 12 Acknowledgements This research is supported in part by an FP7 Marie Curie CIG grant, Israel Science Foundation grant 425/13, and the Intel ICRI-CI Institute. We would like to thank Shai Shalev-Shwartz for some illuminating discussions, and Eran Amar for his valuable help with the experiment. References Bianchini, M. and Scarselli, F. On the complexity of shallow and deep neural network classifiers. In ESANN, 2014. Cohen, Nadav, Sharir, Or, and Shashua, Amnon. On the expressive power of deep learning: A tensor analysis. In 29th Annual Conference on Learning Theory, pp. 698–728, 2016. Cybenko, George. Approximation by superpositions of a sigmoidal function. Mathematics of control, signals and systems, 2(4):303–314, 1989. Delalleau, O. and Bengio, Y. Shallow vs. deep sum-product networks. In NIPS, pp. 666–674, 2011. Eldan, Ronen and Shamir, Ohad. The power of depth for feedforward neural networks. In 29th Annual Conference on Learning Theory, pp. 907–940, 2016. He, Kaiming, Zhang, Xiangyu, Ren, Shaoqing, and Sun, Jian. Deep residual learning for image recognition. arXiv preprint arXiv:1512.03385, 2015. Hornik, Kurt. Approximation capabilities of multilayer feedforward networks. Neural networks, 4(2):251– 257, 1991. Liang, Shiyu and Srikant, R. Why deep neural networks? arXiv preprint arXiv:1610.04161, 2016. Martens, J. and Medabalimi, V. On the expressive efficiency of sum product networks. arXiv preprint arXiv:1411.7717, 2014. Poggio, Tomaso, Mhaskar, Hrushikesh, Rosasco, Lorenzo, Miranda, Brando, and Liao, Qianli. Why and when can deep–but not shallow–networks avoid the curse of dimensionality: a review. arXiv preprint arXiv:1611.00740, 2016. Poole, Ben, Lahiri, Subhaneil, Raghu, Maithreyi, Sohl-Dickstein, Jascha, and Ganguli, Surya. Exponential expressivity in deep neural networks through transient chaos. In Advances In Neural Information Processing Systems, pp. 3360–3368, 2016. Shaham, Uri, Cloninger, Alexander, and Coifman, Ronald R. Provable approximation properties for deep neural networks. Applied and Computational Harmonic Analysis, 2016. Telgarsky, Matus. Benefits of depth in neural networks. arXiv preprint arXiv:1602.04485, 2016. Yarotsky, Dmitry. Error bounds for approximations with deep relu networks. arXiv:1610.01145, 2016. 13 arXiv preprint 6 6.1 Proofs Proof of Thm. 2 This proof bears resemblance to the proof provided in Eldan & Shamir (2016)[Lemma 10], albeit once approximating kxk22 , the following construction takes a slightly different route. For completeness, we also state assumption 1 from Eldan & Shamir (2016): Assumption 1. Given the activation function σ, there is a constant cσ ≥ 1 (depending only on σ) such that the following holds: For any L-Lipschitz function f : R → R which is constant outside a bounded interval RL [−R, R], and for any δ, there exist scalars a, {αi , βi , γi }w i=1 , where w ≤ cσ δ , such that the function h(x) = a + w X αi · σ(βi x − γi ) i=1 satisfies sup |f (x) − h(x)| ≤ δ. x∈R As discussed in Eldan & Shamir (2016), this assumption is satisfied by ReLU, sigmoid, threshold, and more generally all standard activation functions we are familiar with. Proof. Consider the 4-Lipschitz function  l (x) = min x2 , 4 , which is constant outside [−2, 2], as well as the function ` (x) = d X l(xi ) = i=1 d X  min x2i , 4 i=1 P on Rd . Applying assumption 1, we obtain a function ˜l(x) having the form a + w i=1 αi σ (βi x − γi ) so that δ sup ˜l (x) − l (x) ≤ , d x∈R and where the width parameter w is at most 8cσ d δ . Consequently, the function `˜(x) = d X ˜l (xi ) i=1 can be expressed in the form a + fying Pw i=1 αi σ (βi x − γi ) where w ≤ 8cσ d2 δ , yielding an approximation satis- sup `˜(x) − ` (x) ≤ δ. x∈Rd We now invoke assumption 1 again to approximate the 1-Lipschitz function   x < −0.5 0 f (x) = x + 0.5 x ∈ [−0.5, 0.5]   1 x > 0.5 14   P and obtain an approximation f˜ (x) = ã + w̃ i=1 α̃i σ β̃i x − γ̃i satisfying r sup f˜ (x) − f (x) ≤ x∈R where w̃ ≤ cσ δ 2 (6) p 1/2δ.   Now consider the composition f˜ ◦ cµ · `˜ − cµ , where cµ > 0 is to be determined later. This composition has the form   w w X X a+ ui σ  vi,j σ (hwi,j , xi + bi,j ) + ci  i=1 j=1 o n p for appropriate scalars a, ui , ci , vi,j , bi,j and vectors wi,j , and where w is at most max 8cσ d2 /δ, cσ 1/2δ .   It is now left to bound the approximation error obtained by f˜ ◦ cµ · `˜ − cµ . Define for any  > 0, n o 2 d R = x ∈ R : 1 −  ≤ kxk2 ≤ 1 +  . Since µ is continuous, there exists  > 0 such that Z δ µ (x) dx ≤ . 4 R Now, for any x ∈ Rd such that 1 +  ≤ kxk22 we have n o `˜(x) ≥ ` (x) − δ = min kxk22 , 4 − δ ≥ 1 +  − δ. Assuming δ < /2, we have the above is at least 1 + /2. Taking cµ = 1/, we get   c  µ cµ · `˜(x) − cµ = cµ · `˜(x) − 1 ≥ = 0.5, 2 and thus  r  f˜ cµ · `˜(x) − cµ ∈ 1− δ ,1 + 2 r ! δ , 2 (7) For any x ∈ Rd satisfying 1 +  ≤ kxk22 . A similar argument shows that for any x ∈ R satisfying kxk22 ≤ 1 −  we have r r !   δ δ f˜ cµ · `˜(x) − cµ ∈ − , . (8) 2 2 15 Combining both Eq. (7) and Eq. (8) we obtain Z    2 f˜ cµ · `˜(x) − cµ − 1 (kxk2 ≤ 1) µ (x) dx d ZR    2 = f˜ cµ · `˜(x) − cµ − 1 (kxk2 ≤ 1) µ (x) dx R Z    2 + f˜ cµ · `˜(x) − cµ − 1 (kxk2 ≤ 1) µ (x) dx Rd \R Z Z δ 2µ (x) dx + µ (x) dx ≤ Rd \R 4 R δ δ ≤ + = δ, 2 2 Where in the penultimate inequality is justified due to f˜ being bounded in the interval h p the firstpsummand i p √ − δ/2, 1 + δ/2 by Eq. (6), and assuming 1 + δ/2 ≤ 2, and the second summand justified due to Equations (7) and (8), concluding the proof of the lemma. 6.2 Proof of Thm. 3 Consider an input distribution of the form x = srv, where v is drawn from a certain distribution on the unit L1 sphere {x : kxk1 = 1} to be specified later, and s is uniformly distributed on [1, 1 + ]. Let N X F (x) = aj [hwj , xi + bj ]+ j=1 be a 2-layer ReLU network of width N , such that with respect to the distribution above,      δ ≤ . Ex (f (kxk1 ) − F (x))2 = Ev Es (f (sr) − F (srv))2 v 2 By Markov’s inequality, this implies    1 Prv Es f (sr) − F (srv)2 v ≤ δ ≥ . 2   By the assumption on f , and the fact that s is uniform on [1, 1 + ], we have that Es f (sr) − F (srv)2 v ≤ δ only if f˜N is not a linear function on the line between rv and (1 + )rv. In other words, this line must be crossed by the hyperplane {x : hwj , xi + bj = 0} for some neuron j. Thus, we must have Prv (∃j ∈ {1, . . . , N }, s ∈ [1, 1 + ] s.t. hwj , srvi + bj = 0) ≥ 16 1 . 2 (9) The left hand side equals Prv (∃j ∈ {1 . . . N }, s ∈ [1, 1 + ] s.t. hwj , vi = −bj /sr)   bj bj and − = Prv ∃j ∈ {1 . . . N } s.t. hwj , vi between − r (1 + )r   bj bj ≤ Prv ∃j ∈ {1 . . . N } s.t. hwj , vi betwen − and − (1 − ) r r   N X bj bj ≤ Prv hwj , vi between − and − (1 − ) r r j=1   b b ≤ N · sup Prv hw, vi between − and − (1 − ) r r w∈Rd ,b∈R    −rw = N · sup Prv , v ∈ [1 − , 1] = N · sup Prv (hw, vi ∈ [1 − , 1]) , b w∈Rd ,b∈R w∈Rd 1 ≥ 1 −  for all  ∈ (0, 1), and in the second inequality where in the first inequality we used the fact that 1+ we used a union bound. Combining these inequalities with Eq. (9), we get that N ≥ 1 . supw Prv (hw, vi ∈ [1 − , 1]) As a result, to prove the theorem, it is enough to construct a distribution for v on the on the unit L1 ball, such that for any w, Prv (hw, vi ∈ [1 − , 1]) ≤ Õ( + exp(−Ω(d))) (10) By the inequality above, we would then get that N = Ω̃(min{1/, exp(Ω(d))}). Specifically, consider a distribution over v defined as follows: First, we sample σ ∈ {−1, +1}d uniformly at random, and n ∈ Rd from a standard Gaussian distribution, and define     1 1 > v̂ = σ + cd I − σσ n , d d where cd > 0 is a parameter dependent on d to be determined later. It is easily verified that hσ/d, v̂i = hσ/d, σ/di independent of n, hence v̂ lies on the hyperplane containing the facet of the L1 ball on which σ/d resides. Calling this facet Fσ , we define v to have the same distribution as v̂, conditioned on v̂ ∈ Fσ . We begin by arguing that Prv (hw, vi ∈ [1 − , 1]) ≤ 2 · Prv̂ (hw, v̂i ∈ [1 − , 1]) . To see this, let A = {x : hw, xi ∈ [1 − , 1]}, and note that the left hand side equals Pr(v ∈ A) = Eσ [Pr(v ∈ A|σ)] = Eσ [Pr (v̂ ∈ A|σ, v̂ ∈ Fσ )]   Pr(v̂ ∈ A ∩ Fσ |σ) 1 = Eσ ≤ Eσ [Pr(v̂ ∈ A|σ)] Pr(v̂ ∈ Fσ |σ) minσ Pr(v̂ ∈ Fσ |σ) Pr(v̂ ∈ A) = . minσ Pr(v̂ ∈ Fσ |σ) 17 (11) Therefore, to prove Eq. (11), it is enough to prove that Pr(v̂ ∈ Fσ |σ) ≥ 1/2 for any σ. As shown earlier, v̂ lies on the hyperplane containing Fσ , the facet of the L1 ball in which σ/d resides. Thus, v̂ can be outside Fσ , only if at least one of its coordinates has a different sign than σ. By definition of v̂, this can only happen if cd (I − σσ > /d)n ∞ ≥ 1. The probability of this event (over the random draw of n) equals !     d 1 1X 1 Pr max cd nj − hσ, ni σj ≥ 1 = Pr max nj − σj · σi ni ≥ . d d cd j∈{1...d} j∈{1...d} i=1 Since σi ∈ {−1, 1} for all i, the event on the right hand side can only occur if |nj | ≥ 1/2cd for some j. Recalling that each nj has a standard Gaussian distribution, this probability can be upper bounded by         1 1 1 1 ≤ d · Pr |n1 | ≥ = 2d · Pr n1 ≥ ≤ 2d · exp − 2 , Pr max |nj | ≥ 2cd 2cd 2cd 4cd j∈{1...d} where we used a union bound and a standard Gaussian tail bound. Thus, by picking s 1 cd = , 4 log(4d) we can ensure that the probability is at most 1/2, hence proving that Pr(v̂ ∈ Fσ |σ) ≥ 1/2 and validating Eq. (11). With Eq. (11) in hand, we now turn to upper bound       1 1 > Pr (hw, v̂i ∈ [1 − , 1]) = Pr w, σ + cd I − σσ n ∈ [1 − , 1] . d d By the equation above, we have that conditioned on σ, the distribution of hw, v̂i is Gaussian with mean hσ, wi /d and variance !  2   2 !  c2d c2d hw, σi2 1 1 w cd kwk 2 2 > > . ·w I − σσ w = 2 · kwk − · 1− ,σ = d2 d d d d d kwk By Hoeffding’s inequality, we have that for any t > 0,   hσ, wi kwk Prσ ≤ 2 exp(−2t2 ) >t· d d and  Prσ w ,σ kwk  r ! d > ≤ 2 exp(−d). 2 This means that with probability at least 1 − 2 exp(−d) − 2 exp(−2t2 ) over the choice of σ, the distribution of hw, v̂i (conditioned on σ) is Gaussian with mean bounded in absolute value by t kwk /d, and variance  2  1  cd kwk 2 1 d · 1 − . To continue, we utilize the following lemma: of at least cd kwk · d d 2 = 2 d Lemma 1. Let n be a Gaussian random variable on R with mean µ and variance v 2 for some v > 0. Then for any  ∈ (0, 1), r   2 |µ|  Pr (n ∈ [1 − , 1]) ≤ · max 1, . · π v 1− 18 Proof. Since the probability can only increase if we replace the mean µ by |µ|, we will assume without loss of generality that µ ≥ 0. By definition of a Gaussian distribution, and using the easily-verified fact that exp(−z 2 ) ≤ min{1, 1/z} for all z ≥ 0, the probability equals     Z 1  1 (x − µ)2 (x − µ)2 √ dx ≤ √ · max exp − exp − v2 v2 2πv 2 1− 2πv 2 x∈[1−,1]      v 1  1 ≤ √ · max min 1, = √ · max min , |x − µ| v |x − µ| 2π x∈[1−,1] 2πv 2 x∈[1−,1] max{1, µv }   1 = √ · max = √ · max µ 2π x∈[1−,1] max{v, |x − µ|} 2π x∈[1−,1] max{1, v } · max{v, |x − µ|} max{1, µv } max{1, µv }   ≤ √ · max = √ · 2π x∈[1−,1] max{µ, |x − µ|} 2π max{µ, minx∈[1−,1] |x − µ|} A simple case analysis reveals that the denominator is at least2 1− 2 , from which the result follows. Using this lemma and the previous observations, we get that with probability at least 1 − 2 exp(−d) − 2 exp(−2t2 ) over the choice of σ, r   t kwk /d 2  √ · max 1, · Pr(hw, v̂i ∈ [1 − , 1]|σ) ≤ π 1− cd kwk / 2d r   2 t  = · max 1, √ · . π 1− cd 2 Letting E be the event that σ is such that this inequality is satisfied (and noting that its probability of non-occurence is at most 2 exp(−d) + 2 exp(−2t2 )), we get overall that Pr(hw, v̂i ∈ [1 − , 1]) = Pr(E) · Pr(hw, v̂i ∈ [1 − , 1]|E) + Pr(¬E) · Pr(hw, v̂i ∈ [1 − , 1]|¬E) ≤ 1 · Pr(hw, v̂i ∈ [1 − , 1]|E) + Pr(¬E) · 1 r   t 2  · max 1, √ + 2 exp(−d) + 2 exp(−2t2 ). ≤ · π 1 −  cd 2 Recalling Eq. (11) and the definition of cd , we get that r n o p 8  Pr(hw, vi ∈ [1 − , 1]) ≤ · max 1, t · 2 log(4d) · + 2 exp(−d) + 2 exp(−2t2 ). π 1− q  Picking t = 12 log 1−  , we get the bound r ( s  ) !  8 1−  · max 1, log log(4d) + 2 · + 2 exp(−d) = Õ ( + exp(−d)) . π  1− This justifies Eq. (10), from which the result follows. 2 If µ ∈ [1 − , 1], then we get max{µ, 0} = µ ≥ 1 − . If µ > 1, we get max{µ, µ − 1} > 1 ≥ 1 − . If µ < 1 − , we get max{µ, 1 −  − µ} ≥ (1 − )/2. 19 6.3 Proof of Thm. 4 The proof rests largely on the following key result: Theorem 7. Let Gn be the family of piece-wise linear functions on the domain [0, 1] comprised of at most n linear segments. Let Gnd be the family of piece-wise linear functions on the domain [0, 1]d , with the property that for any g ∈ Gnd and any affine transformation h : R → Rd , g ◦ h ∈ Gn . Suppose f : [0, 1]d → R is C 2 . Then for all λ > 0 Z c · λ2 · σλ (f )5 (f − g)2 dµd ≥ , inf d n4 g∈Gn [0,1]d where c = 5 4096 . Thm. 7 establishes that the error of a piece-wise linear approximation of a C 2 function cannot decay faster than quartically in the number of linear segments of any one-dimensional projection of the approximating function. Note that this result is stronger than a bound in terms of the total number of linear regions in Rd , since that number can be exponentially higher (in the dimension) than n as defined in the theorem. Before proving Thm. 7, let us explain how we can use it to prove Thm. 4. To that end, we use the result in Telgarsky (2016, Lemma 3.2), of which the following is an immediate corollary: d denote the family of ReLU neural networks receiving input of dimension d and having Corollary 2. Let Nm,l depth l and maximal width m. Then d d ⊆ G(2m) Nm,l l. Combining this corollary with Thm. 7, the result follows. The remainder of this subsection will be devoted to proving Thm. 7. 6.3.1 Some Technical Tools Definition 2. Let Pi denote the ith Legendre Polynomial given by Rodrigues’ formula: Pi (x) = i i 1 di h 2 x − 1 . 2i i! dxi These polynomials are useful for the following analysis since they obey the orthogonality relationship Z 1 2 Pi (x) Pj (x) dx = δij . 2i + 1 −1 Since we are interested in approximations on small intervals where the approximating n o∞ function is linear, we 2 2 of shifted Legendre use the change of variables x = ` t − ` a − 1 to obtain an orthogonal family P̃i i=1 polynomials on the interval [a, a + `] with respect to the L2 norm. The first few polynomials of this family are given by P̃0 (x) = 1   2 2 P̃1 (x) = x − a+1 ` `    2  12a 6 6a 6 6a P̃2 (x) = 2 x2 − + x + + + 1 . ` `2 ` `2 ` 20 (12) The shifted Legendre polynomials obey the orthogonality relationship Z a+` ` P̃i (x) P̃j (x) dx = δij . 2i + 1 a (13) Definition 3. We define the Fourier-Legendre series of a function f : [a, a + `] → R to be f (x) = ∞ X ãi P̃i (x) , i=0 where the Fourier-Legendre Coefficients ãi are given by Z 2i + 1 a+` ãi = P̃i (x) f (x) dx. ` a Theorem 8. A generalization of Parseval’s identity yields kf k2L2 = ` ∞ X i=0 ã2i . 2i + 1 (14) Definition 4. A function f is λ-strongly convex if for all w, u and α ∈ (0, 1), f (αw + (1 − α)u) ≤ αf (w) + (1 − α)f (u) − λ α(1 − α) kw − uk22 . 2 A function is λ-strongly concave, if −f is λ-strongly convex. 6.3.2 One-dimensional Lower Bounds We begin by proving two useful lemmas; the first will allow us to compute the error of a linear approximation of one-dimensional functions on arbitrary intervals, and the second will allow us to infer bounds on the entire domain of approximation, from the lower bounds we have on small intervals where the approximating function is linear. Lemma 2. Let f ∈ C 2 . Then the error of the optimal linear approximation of f denoted P f on the interval [a, a + `] satisfies ∞ X ã2i kf − P f k2L2 = ` . (15) 2i + 1 i=2 Proof. A standard result on Legendre polynomials is that given any function f on the interval [a, a + `], the best linear approximation (w.r.t. the L2 norm) is given by P f = ã0 P̃0 (x) + ã1 P̃1 (x) , where P̃0 , P̃1 are the shifted Legendre polynomials of degree 0 and 1 respectively, and ã0 , ã1 are the first two Fourier-Legendre coefficients of f as defined in Eq. (3). The square of the error obtained by this approximation is therefore kf − P f k2 = kf k2 − 2 hf, P f i + kP f k2 !   ∞ X ã2i ã21 ã21 2 2 − 2 ã0 + + ã0 + =` 2i + 1 3 3 i=0 =` ∞ X i=2 ã2i . 2i + 1 21 Where in the second equality we used the orthogonality relationship from Eq. (13), and the generalized Parseval’s identity from Eq. (14). Lemma 3. Suppose f : [0, 1] → R satisfies kf − P f k2L2 ≥ c`5 for some constant c > 0, and on any interval [a, a + `] ⊆ [0, 1]. Then Z 1 c (f − g)2 dµ ≥ 4 . inf g∈Gn 0 n Proof. Let g ∈ Gn be some function, let a0 = 0, a1 , . . . , an−1 , an = 1 denote its partition into segments of length `j = aj − aj−1 , where g is linear when restricted to any interval [aj−1 , aj ], and let gj , j = 1, . . . , n denote the linear restriction of g to the interval [aj−1 , aj ]. Then 1 Z 2 (f − g) dµ = 0 ≥ = n Z X aj (f − gj )2 dµ j=1 aj−1 n X c`5j j=1 n X c `5j . j=1 (16) Now, recall Hölder’s sum inequality which states that for any p, q satisfying n X  |xj yj | ≤  j=1 n X 1 p + 1 q = 1 we have 1/p  1/q n X |xj |p   |yj |q  . j=1 j=1 Plugging in xj = `j , yj = 1 ∀j ∈ {1, . . . , n} we have n X  |`j | ≤  j=1 and using the equalities Pn j=1 |`j | = 1 and n X 1/p |`j |p  n1/q , j=1 p q = p − 1 we get that 1 np−1 ≤ n X |`j |p . (17) j=1 Plugging the inequality from Eq. (17) with p = 5 in Eq. (16) yields Z 1 c (p − g)2 dµ ≥ 4 , n 0 concluding the proof of the lemma. Our first lower bound for approximation using piece-wise linear functions is for non-linear target functions of the simplest kind. Namely, we obtain lower bounds on quadratic functions. 22 Theorem 9. If Gn is the family of piece-wise linear functions with at most n linear segments in the interval [0, 1], then for any quadratic function p(x) = p2 x2 + p1 x + p0 , we have 1 Z (p − g)2 dµ ≥ inf g∈Gn 0 p22 . 180n4 (18) Proof. Observe that since p is a degree 2 polynomial, we have that its coefficients satisfy ãi = 0 ∀i ≥ 3, ã2 ` so from Lemma 2 its optimal approximation error equals 52 . Computing ã2 can be done directly from the equation 2 X p (x) = ãi P̃i (x) , i=0 Which gives ã2 = `2 p2 6 due to Eq. (12). This implies that kp − P pk2 = p22 `5 . 180 Note that for quadratic functions, the optimal error is dependent solely on the length of the interval. Using p22 Lemma 3 with c = 180 we get Z 1 p22 , (p − g)2 dµ ≥ 180n4 0 concluding the proof of the theorem. Computing a lower bound for quadratic functions is made easy since the bound on any interval [a, a + `] depends on ` but not on a. This is not the case in general, as can be seen by observing  monomials  of high degree k. As k grows, xk on the interval [0, 0.5] converges rapidly to 0, whereas on 1 − k1 , 1 its second derivative is lower bounded by k(k−1) , which indicates that indeed a lower bound for xk will depend on a. 4 For non-quadratic functions, however, we now show that a lower bound can be derived under the assumption of strong convexity (or strong concavity) in [0, 1]. Theorem 10. Suppose f : [0, 1] → R is C 2 and either λ-strongly convex or λ-strongly concave. Then Z inf g∈Gn 1 (f − g)2 dµ ≥ cλ2 n−4 , (19) 0 where c > 0 is a universal constant. Proof. We first stress that an analogous assumption to λ-strong convexity would be that f is λ-strongly concave, since the same bound can be derived under concavity by simply applying the theorem to the additive inverse of f , and observing that the additive inverse of any piece-wise linear approximation of f is in itself, of course, a piece-wise linear function. For this reason from now on we shall use the convexity assumption, but will also refer without loss of generality to concave functions. As in the previous proof, we first prove a bound on intervals of length ` and then generalize for the unit interval. From Lemma 2, it suffices that we lower bound ã2 (although this might not give the tightest lower 23 bound in terms of constants, it is possible to show that it does give a tight bound over all C 2 functions). We compute Z 5 a+` ã2 = P̃2 (x) f (x) dx ` a   Z 2 5 a+` 2 P2 = x − a − 1 f (x) dx, ` a ` ` using the change of variables t = 2` x − 2` a − 1, dt = 2` dx, we get the above equals   Z ` 5 1 ` P2 (t) f t + + a dt 2 −1 2 2   Z 1  ` 5 ` 3t2 − 1 f = t + + a dt. 4 −1 2 2 We now integrate by parts twice, taking the anti-derivative of the polynomial to obtain   Z  ` ` 5 1 2 3t − 1 f t + + a dt 4 −1 2 2    1  Z  0 `  5` 1 3 5 ` ` ` 3 − t −t f = t −t f t+ +a t + + a dt 4 2 2 8 −1 2 2 −1   Z 1  5` ` ` = t − t3 f 0 t + + a dt 8 −1 2 2  2   1 4 5` t t ` ` 0 = − f t+ +a 8 2 4 2 2 −1    Z 1 2 2 4 5` t t ` ` 00 − − f t + + a dt 16 −1 2 4 2 2    Z 1 2 2  5` 5` 0 t t4 ` ` 0 00 = f (a + `) − f (a) − − f t + + a dt. 32 16 −1 2 4 2 2   4 2 But since t2 − t4 ∈ 0, 41 ∀t ∈ [−1, 1] and since f 00 > 0 due to strong convexity, we have that      Z 1 2 Z t t4 ` ` 1 1 00 ` ` 00 − f t + + a dt ≤ f t + + a dt. 2 4 2 2 4 −1 2 2 −1 (20) Plugging this inequality in Eq. (20) yields   Z  5`2 1 00 ` 5` 0 ` 0 f (a + `) − f (a) − f t + + a dt ã2 ≥ 32 64 −1 2 2 2   5` 0 5` = f (a + `) − f 0 (a) − f 0 (a + `) − f 0 (a) 32 64    ` 5` 0 = 1− f (a + `) − f 0 (a) , 2 32 but ` ≤ 1, so the above is at least  5` 0 f (a + `) − f 0 (a) . 64 24 (21) By Lagrange‘s intermediate value theorem, there exists some ξ ∈ [a, a + `] such that f 0 (a + `) − f 0 (a) = `f 00 (ξ), so Eq. (21) is at least 5`2 00 f (ξ) , 64 and by using the strong convexity of f again, we get that ã2 ≥ 5λ`2 . 64 Lemma 2 now gives 2 kf − P f k = ` ≥` ∞ X i=2 ã22 ã2i 2i + 1 5 5λ2 `5 ≥ . 4096 Finally, by using Lemma 3 we conclude Z inf g∈Gn 1 (f − g)2 dµ ≥ 0 5λ2 . 4096n4 We now derive a general lower bound for functions f : [0, 1] → R. Theorem 11. Suppose f : [0, 1] → R is C 2 . Then for any λ > 0 Z 1 c · λ2 · σλ (f )5 (f − g)2 dµ ≥ . inf g∈Gn 0 n4 Proof. First, observe that if f is λ-strongly convex on [a, b], then f ((b − a) x + a) is λ (b − a)2 -strongly convex on [0, 1] since ∀x ∈ [0, 1], ∂ f ((b − a) x + a) = (b − a)2 f 00 ((b − a) x + a) ≥ λ (b − a)2 . ∂x2 Now, we use the change of variables x = (b − a) t + a, dx = (b − a) dt Z b inf (f (x) − g(x))2 dx g∈Gn a Z 1 = inf (b − a) (f ((b − a) t + a) − g ((b − a) t + a))2 dt g∈Gn 0 Z 1 = inf (b − a) (f ((b − a) t + a) − g (t))2 dt g∈Gn 0 5 · (b − a) , (22) n4 where the inequality follows from an application of Thm. 10. Back to the theorem statement, if σλ = 0 then the bound trivially holds, therefore assume λ > 0 such that σλ > 0. Since f is strongly convex on a set of measure σλ > 0, the theorem follows by applying the inequality from Eq. (22). ≥ c· λ2 25 6.3.3 Multi-dimensional Lower Bounds We now move to generalize the bounds in the previous subsection to general dimension d. Namely, we can now turn to proving Thm. 7. Proof of Thm. 7. Analogously to the proof of Thm. 11, we identify a neighborhood of f in which the restriction of f to a line in a certain direction is non-linear. We then integrate along all lines in that direction and use the result of Thm. 11 to establish the lower bound. Before we can prove the theorem, we need to assert that indeed there exists a set having a strictly positive measure where f has strong curvature along a certain direction. Assuming f is not piece-wise linear; namely, we have some x0 ∈ [0, 1]d such that H (f ) (x0 ) 6= 0. Since H (f ) is continuous, we have that the function hv (x) = v> H (f ) (x) v is continuous and there exists a direction v ∈ Sd−1 where without loss of generality hv (x0 ) > 0. Thus, we have an open neighborhood containing x0 where restricting f to the direction v forms a strongly convex function, which implies that indeed σλ > 0 for small enough λ > 0. We now integrate the approximation error on f in the neighborhood U along the direction v. Compute Z inf d g∈Gn d [0,1] Z (f − g)2 dµd Z = inf d g∈Gn u:hu,vi=0 Z d β:(u+βv)∈[0,1] Z (f − g)2 dµ1 dµd−1 ≥ inf d g∈Gn u:hu,vi=0 Z u:hu,vi=0 Z 5λ2 4096n4 5λ2 ≥ 4096n4 = β:(u+βv)∈U (µ1 ({β : (u + βv) ∈ U }))5 ≥ = (f − g)2 dµ1 dµd−1 5λ2 dµd−1 4096n4 |µ1 ({β : (u + βv) ∈ U })|5 dµd−1 u:hu,vi=0 !5 Z µ1 ({β : (u + βv) ∈ U }) dµd−1 u:hu,vi=0 5λ2 σλ5 , 4096n4 where in the second inequality we used Thm. 11 and in the third inequality we used Jensen‘s inequality with respect to the convex function x 7→ |x|5 . 6.4 Proof of Thm. 6 We begin by monitoring the rate of growth of the error when performing either an addition or a multiplication. Suppose that the given input ã, b̃ is of distance at most δ > 0 from the desired target values a, b, i.e., |a − ã| ≤ δ, |b − b̃| ≤ δ. Then for addition we have   (a + b) − ã + b̃ ≤ |a − ã| + b − b̃ ≤ 2δ, 26 and for multiplication we compute the product error estimation ã · b̃ − a · b ≤ |(a + δ) · (b + δ) − a · b| = δ (a + b) + δ 2 . (23) Now, we have bounded the error of approximating the product of two numbers which we only have approximations of, but since the computation of the product itself cannot be done with perfect accuracy using ReLU networks, we need to suffer the error of approximating a product, as shown in Thm. 5. We add the error of approximating the product of ã · b̃, which we may assume is at most δ (assuming Θ (log2 (M/δ)) bits are used for the product, since each intermediate computation is bounded in the interval [−M, M ]). Overall, we get an error bound of δ (a + b) + δ 2 + δ ≤ 3M δ. From this, we see that at each stage the error grows by at most a multiplicative factor of 3M . After t operations, and with an initial estimation error of δ, we have that the error is bounded by (3M )t−1 δ. Choosing δ ≤ (3M )1−t  to guarantee approximation , we have from Thm. 5 that each operation will require at most & !'     M (3M )t−1 1 4 log + t log (M ) + 13 ≤ c log   width and & 2 log M (3M )t−1  !'     1 + 9 ≤ c log + t log (M )  depth for some universal c > 0. Composing the networks performing each operation, we arrive at a total network width and depth of at most     1 2 c t log + t log (M ) .  Now, our target function is approximated to accuracy  by a function which our network approximates to the same accuracy , for a total approximation error of the target function by our network of 2. 27
9cs.NE
Single-cluster PHD filter methods for joint multi-object filtering and parameter estimation arXiv:1705.05312v1 [math.ST] 15 May 2017 Isabel Schlangen∗ , Daniel E. Clark,∗ and Emmanuel Delande∗ Abstract—Many multi-object estimation problems require additional estimation of model or sensor parameters that are either common to all objects or related to unknown characterisation of one or more sensors. Important examples of these include registration of multiple sensors, estimating clutter profiles, and robot localisation. Often these parameters are estimated separately to the multi-object estimation process, which can lead to systematic errors or overconfidence in the estimates. These parameters can be estimated jointly with the multi-object process based only on the sensor data using a single-cluster point process model. This paper presents novel results for joint parameter estimation and multi-object filtering based on a single-cluster second-order Probability Hypothesis Density (PHD) and Cardinalized PHD (CPHD) filter. Experiments provide a comparison between the discussed approaches using different likelihood functions. Index Terms—PHD filters, SLAM, sensor calibration, parameter estimation I. I NTRODUCTION Methods for detecting and estimating multiple targets from multiple sensors are fundamentally important for sensor fusion applications. Methods based on Finite Set Statistics [1] are a popular choice for developing solutions to multi-sensor fusion applications, including the sub-optimal solutions known as the Probability Hypothesis Density (PHD) filter [2] that propagates the first-order moment of a point process, and the Cardinalized PHD (CPHD) filter [3] that additionally propagates second-order information through its cardinality distribution. In particular, their Gaussian mixture [4]–[6] and sequential Monte Carlo implementations [7], [8] have been applied for a wide range of applications like tracking maritime craft in live multi-sensor trials [9] or even tracking dolphin whistles [10]. A recent variation of the PHD filter, namely the second-order PHD filter [11], works with generalised model assumptions that allow to propagate the variance [12] along with the first-order moment. There are many multi-object filtering problems that require additional estimation of parameters which are common to all objects or related to the sensor profile. Examples of these include registration of multiple sensors, estimating clutter profiles, and robot localisation with respect to its surroundings. Typically these parameters are estimated separately to the multi-object estimation process, which can lead to systematic errors or overconfidence in the estimates. This paper addresses ∗ School of Electrical and Physical Sciences, Heriot-Watt University, Edinburgh EH14 4AS, UK. Email: {is117, E.D.Delande, D.E.Clark}@hw.ac.uk. Isabel Schlangen is supported by the Edinburgh Super-Resolution Imaging Consortium (MR/K01563X/1). This work was supported by the EPSRC Platform Grant (EP/J015180/1), and the MoD UDRC Phase 2 (EP/K014227/1). specifically this kind of problems by estimating the parameters jointly with the multi-object process based only on the sensor data. Using the PHD, second-order PHD and CPHD filters as a basis for the multi-object estimation, the approach presented in this paper also estimates a parameter common to the multiple targets or related to the sensor configuration. The approach has been further studied for target tracking applications [13] and more recently, it has been used for jointly triangulating multiple objects and calibrating cameras [14] and estimating sensor drift in microscopes [15] and telescopes [16], and distributed multi-sensor localisation [17]. The approach adopted in this paper was initially developed for group and extended object tracking using hierarchical cluster point processes [18]–[21], restricting the number of groups or extended objects to one [22]. This enables the modelling of multiple objects that are all conditioned on a single parameter, which could represent, for example, a vehicle position or sensor calibration and registration parameters. The method, known as the single-cluster PHD filter, has been applied to the problems of sensor calibration [23]–[25] and Simultaneous Localisation And Mapping (SLAM) [26]. The single-cluster PHD filter approach is distinct from the earlier random finite set method for SLAM developed by Mullane, Vo, Adams et al. [27]–[29] in that it considers the process to be estimated as a unified point process by making a single approximation and determining the vehicle location based on this approximation; therefore, there is no need to explicitly determine a set of landmarks to update the vehicle position. The single-cluster PHD filter, just like the PHD filter itself, relies on a Poisson assumption on the multi-target process. While this resulted in algorithms that are able to estimate the number of targets in the presence of false alarms, it has a restricted variance in the estimated target number. This paper develops more accurate and versatile estimators for singlecluster PHD filtering by considering different processes for modelling the target and clutter processes, in particular the independent and identically distributed (i.i.d.) cluster process used in the CPHD filter, and binomial, Poisson, and negative binomial processes within the unified Panjer point process used in the recent second-order PHD filter. The paper is structured as follows: In Sec. II, point process theory is quickly reviewed and the single-cluster point process is described with its two-level hierarchy. Section III describes three different single-cluster multi-object filters based on Poisson, Panjer, and i.i.d. cluster point processes, with proofs given in the appendix. Section IV presents a detailed statistical analysis of the different methods in simulations, as well as a comparison with the most accurate method based on the initial Random Finite Set (RFS) SLAM formulation, eg. [30], [31]. The paper concludes in section V, and the appendices present the pseudo-code and proofs for the likelihood functions. II. J OINT MULTI - OBJECT FILTERING AND PARAMETER ESTIMATION This section aims to describe the joint multi-object state and parameter estimation in terms of a single-cluster point process framework as described in [32] which carries a two-layer hierarchy. Note that in general, there might be interactions between the sensor and its environment, however this case is not considered in this article, i.e. the dynamical models of the sensor and the targets are assumed to be independent. A. A short introduction to point processes and functionals Let (Ω, F, P) be a probability space with sample space Ω, σ-algebra F, and probability measure P. In the following, all random variables are defined on (Ω, F, P). A point process ΦSon the state space X is a random variable on the space X = n≥0 X n of finite sequences of points in X . A realisation of Φ is a sequence ϕ = (x1 , . . . , xn ) ∈ X n which describes a population of n targets with states xi ∈ X . One way to describe a point process is by its probability distribution PΦ on the measurable space (X, B(X)), B(X) being the Borel σ-algebra of X [33]; the (symmetrical) projection measure PnΦ on the n-fold product space X n describes realisations with exactly n elements for any natural number n ≥ 0. The projection measures facilitate the notation of the Probability Generating Functional (PGFL) of a point process Φ for any test function h: " n # XZ Y (n) GΦ (h) = h(xi ) PΦ (dx1:n ). (1) n≥0 i=1 B. Single-cluster point processes Let Ψ be a point process on the sensor state space S with probability distribution PΨ describing the evolution of a single sensor and let Φ denote a point process on the target state space X describing the evolution of the multi-target configuration. Their PGFLs are given by Z GΨ (h) = h(s)PΨ (s)ds, (2) " # n XZ Y (n) GΦ (g) = g(xi ) PΦ (dx1:n ). (3) n≥0 i=1 In order to jointly describe the target process Φ and the sensor process Ψ, we can formulate the joint PGFL GΦ,Ψ (g, h) = GΨ (hGΦ (g|·))   " n # Z XZ Y (n) = h(s)  g(xi |s) PΦ (dx1:n |s) PΨ (s)ds. n≥0 i=1 (4) Therefore, it is of interest to propagate the probability distribution PΨ of the sensor process over time, as well as the distribution PΦ conditioned on the sensor state s. This structure induces a hierarchy on the processes, such that the sensor process Ψ is also referred to as parent process and the multi-object process Φ as daughter process. 1) The parent process: The parent process estimates the time-varying sensor configuration, e.g. the sensor position relative to its surroundings or other sensors, the clutter rate etc. The notation ˆ· will refer to the parent process in this article. The sensor configuration is assumed to evolve through some Markov transition function t̂k|k−1 , and the multi-object likelihood `ˆk (s|Z) describes the sensor configuration based on the estimate of the respective daughter process. The following Bayes recursion is used to propagate the law P̂k of the sensor process at time k: Z P̂k|k−1 (s) = t̂k|k−1 (s|s0 )P̂k−1 (s0 )ds0 , (5) P̂k (s|Zk ) = R `ˆk (Zk |s)P̂k|k−1 (s) . `ˆk (Zk |s0 )P̂k|k−1 (s0 )ds0 (6) 2) The daughter process: The daughter processs estimates the time-varying multi-object configuration ϕ ∈ X nk . It is assumed to evolve through some Markov transition function tk|k−1 and the multi-measurement/multi-target likelihood `k describes the association likelihood of targets and measurements based on the sensor state s. The following Bayes recursion is used to propagate the law Pk of the target process at time k: Z Pk|k−1 (ϕ|s) = tk|k−1 (ϕ|ϕ0 , s)Pk−1 (ϕ0 |s)dϕ0 , (7) Pk (ϕ|s, Zk ) = R `k (Zk |ϕ, s)Pk|k−1 (ϕ|s) . `k (Zk |ϕ0 , s)Pk|k−1 (ϕ0 )dϕ0 (8) In this article, multi-object tracking methods are considered for the daughter process that do not propagate the whole probability distribution but only the low-order moments of the latter which carry the most information, i.e. the mean and possibly the variance of the process. Three different filters are chosen and described below, namely the first- and secondorder PHD filters [2], [11] and the CPHD filter [3]. III. T HREE MULTI - OBJECT FILTERS AND THEIR SINGLE - CLUSTER MULTI - OBJECT LIKELIHOODS For all three filters, let ps,k (x) and pd,k (x) denote the statedependent probabilities of survival and detection at a given time k. Furthermore, tk|k−1 stands for the Markov transition from time k − 1 to time k, and `k (z|x) denotes the singletarget association likelihood of measurement z with target x at time k. The birth and clutter intensities at time k will be denoted by µb,k and µc,k (z), respectively. A. The PHD filter [2] The PHD filter is the oldest and most widely used of the three multi-object estimation algorithms discussed in this article. It was first introduced in [2], and it is based on the assumption that the number of predicted targets, as well as the clutter cardinality, is Poisson distributed. The superscript [ will be used in the following to refer to the PHD filter. Proposition III.1 (PHD recursion [2]). (a) The first-order moment measure is given by predicted µ[k|k−1 (B) = µb,k (B) + µs,k (B) (9) with survival intensity Z µs,k (B) = ps,k (x)tk|k−1 (B|x)µ[k−1 (dx). Recall the Pochhammer symbol or rising factorial (ζ)n for any ζ ∈ R and n ∈ N: (ζ)n := ζ(ζ + 1) · · · (ζ + n − 1), |Z| X (αk|k−1 )j+u j=0 (αc,k )|Z|−j F −j−u ej (Z) (βk|k−1 )j+u (βc,k + 1)|Z|−j d (16) X (b) The updated first-order moment measure with Poisson distributed prediction and clutter model is derived as X µzk (B) µ[k (B) = µφk (B) + (11) µc,k (z) + µzk (X ) z∈Zk with missed detection term Z µφk (B) = (1 − pd,k (x))µ[k|k−1 (dx) for any Z ⊆ Zk , where Fd is the scalar given by  Z  pd,k (x) \ Fd := 1+ µk|k−1 (dx), βk|k−1 ej (Z) := (13) Theorem III.2 (PHD multi-object likelihood [32]). The likelihood function of the PHD filter for a given sensor state s is found to be `[k (s|Z) Q = h i R µc,k (z|s) + X pd,k (x|s)`k (z|x, s)µ[k|k−1 (dx|s) hR i . R exp Z µc,k (z|s)dz + X pd,k (x|s)µ[k|k−1 (dx|s) (14) z∈Z B. The second-order PHD filter [11] The second-order PHD filter was introduced in [11] as an extension of the PHD filter, including second-order information by propagating the variance in the target number. It uses the assumption that the predicted target process and the clutter process are Panjer distributed as described in [11], [34], which generalises the Poisson distribution. It is therefore less restrictive, and it does not require the computationally expensive propagation of the whole cardinality distribution like in the CPHD filter. Instead, the Panjer distribution is completely characterised by two parameters which stand in direct correspondence with its mean and variance. This makes it possible to propagate both the mean and variance of the target cardinality in the second-order PHD recursion, leading to a very similar structure like the CPHD filter below. The notation \ will refer to the second-order PHD filter. (18) where sc,k denotes the spatial clutter distribution at time k and the association term is defined as in (13) but using µ\k|k−1 instead of µ[k|k−1 . Furthermore, define the expression ld\ for d = 1, 2 via for any measurement z ∈ Zk . In context of SLAM and parameter estimation, the PHD can be easily utilised for multi-object estimation using the following multi-object likelihood function [32]: X Y µz (X ) k , s (z) c,k 0 0 Z ⊆Z z∈Z |Z 0 |=j (12) B (17) and ej (cf. Eq. (34)) B and association term Z z µk (B) = pd,k (x)`k (z|x)µ[k|k−1 (dx) (15) Moreover, let αk|k−1 , βk|k−1 and αc,k , βc,k be the parameters of the predicted target and clutter processes at time k, respectively. Define the terms Yu (Z) := (10) (ζ)0 := 1. ld\ (φ) := Yd (Zk \{z}) Yd (Zk ) and ld\ (z) := . Y0 (Zk ) Y0 (Zk ) In a similar manner, define   Y2 (Zk \{z, z 0 }) if z 6= z 0 , \ 0 l2 (z, z ) := Y (Z ) 0 k  0 otherwise. (19) (20) The prediction of the variance involves the second-order (2) factorial moment νk which, in general, cannot be retrieved from the predicted information µ\k|k−1 , var\k|k−1 only. The assumption that ps,k (x) = ps,k shall be uniform for all x in the state space X , however, leads to the following closed-form recursion. Proposition III.3 (Second-order PHD recursion [11]). . (a) Assume that ps,k (x) = ps,k is constant for all x ∈ X at time k. In the manner of (9) and (37), the predicted first-order moment measure of the Panjer filter is given by µ\k|k−1 (B) = µb,k (B) + µs,k (B), (21) using µ\k−1 instead of µ[k−1 in (10). The predicted variance in the whole state space X is given by var\k|k−1 (X ) = varb,k (X ) + vars,k (X ), (22) where varb,k denotes the variance of the birth process and vars,k is the variance of the predicted process concerning the surviving targets which is found to be vars,k (X ) = p2s,k vark−1 (X ) + ps,k [1 − ps,k ]µk−1 (X ). (23) Following the notation in [5], define the terms Υd [µ, Z] via (b) Find αk|k−1 and βk|k−1 using αk|k−1 = βk|k−1 = µ\k|k−1 (X )2 min(|Z|,n−u) , var\k|k−1 (X ) − µ\k|k−1 (X ) µ\k|k−1 (X ) . var\k|k−1 (X ) − µ\k|k−1 (X ) (24) X Υd [µ, Z](n) = j=0 · ρc (|Z| − j) (25) Then, the updated first-order moment measure becomes X µ\k (B) = µ̂φk (B)ˆl1 (φ) + µ̂zk (B)ˆl1 (z). (26) where ej (Z) := z∈Zk + µ]k|k−1 (X )n (33) ej (Z), X Y µz (X ) k . µc,k (z) 0 0 (34) This leads to the terms hΥ1 [µ, Z], ρk|k−1 i , hΥ0 [µ, Z], ρk|k−1 i hΥ1 [µ, Z \ {z}], ρk|k−1 i l1 (z) = . hΥ0 [µ, Z], ρk|k−1 i l1 (φ) = (27) h i 0 µ̂zk (B)µ̂zk (B) ˆl26= (z, z 0 ) − ˆl1 (z)ˆl1 (z 0 ) . X µφk (X )n−(j+d) Z ⊆Z z∈Z |Z 0 |=j z∈Zk The updated variance is obtained with h i var\k (B) = µ\k (B) + µ̂φk (B)2 ˆl2 (φ) − ˆl1 (φ)2 h i X + 2µ̂φk (B) µ̂zk (B) ˆl2 (z) − ˆl1 (φ)ˆl1 (z) n!(|Z| − j)! (n − (j + d))! (35) (36) z,z 0 ∈Zk Theorem III.4 (Second-order PHD likelihood). Write α = αk|k−1 and β = βk|k−1 for the sake of brevity, and let Z 1 pd,k (x|s)sk|k−1 (dx, s), (28) F̃d,s = 1 − β X 1 Fc = 1 + (29) βc for a given sensor state s. The multi-object likelihood function of the Panjer PHD filter for s is found to be |Z| X (α)j (αc,k )|Z|−j j (β |Z|−j (β) c,k + 1) j=0 X Y −α−j −αc −|Z|−j · F̃d,s Fc µ̂zk (X ) `\k (s|Z) = 0 Z ⊆Z z∈Z 0 |Z 0 |=j Proposition III.5 (CPHD recursion [3]). (a) Similarly to (9), the predicted first-order moment measure is given by µ]k|k−1 (B) = µb,k (B) + µs,k (B), Y Proof. See appendix. C. The CPHD filter [3] The CPHD filter was introduced by Mahler in [3] after the need of a filter which propagates higher-order information was expressed in [35]. Instead of taking a particular assumption on the nature of the cardinality distribution, this filter estimates the latter alongside with the intensity of the point process. The notation ] is used below to refer to the CPHD filter. Let ρk denote the cardinality distribution of the target population at time k, and let ρb and ρc denote the birth and clutter cardinality distributions, respectively. In comparison to (11), the CPHD filter update has additional factors ld which depend on the cardinality distribution. First of all, recall the inner product Z hf, gi = f (x)g(x)d(x) (continuous case), (31) X hf, gi = f (n)g(n) (discrete case). (32) n X ρb (n − j)S[µ]k−1 , ρk−1 ](j) (38) j=0 µc,k (z|s). z 0 ∈(Z 0 )c (37) using µ]k−1 instead of µ[k−1 in (10). The predicted target cardinality distribution is found to be ρk|k−1 (n) = (30) n≥0 As mentioned before, the CPHD filter recursion involves both the intensity measure and the cardinality distribution. The notation below is inspired by [5] and [12]. for any n ∈ N with ∞   X l hps,k , µij h(1 − ps,k ), µil−j S[µ, ρ](j) = ρ(l). h1, µil j l=j (39) (b) The updated first-order moment measure is given by µ]k (B) = µφk (B)l1 (φ) + X z∈Zk µzk (B) l1 (z) µc,k (z) (40) with missed detection term (12) and association term (13) using µ]k|k−1 instead of µ[k|k−1 . The updated target cardinality distribution is given by ρk (n) = Υ0 [µ]k|k−1 , Z](n)ρk|k−1 (n) hΥ0 [µ]k|k−1 , Z], ρk|k−1 i (41) for any n ∈ N. Theorem III.6 (CPHD multi-object likelihood). The multiobject likelihood function of the CPHD filter for a given sensor state s is found to be `]k (s|Z) = hΥ̃0 [µ]k|k−1 , Z], ρk,k−1 i (42) with min(|Z|,n−u) n!(|Z| − j)! ρc (|Z| − j) (n − (j + d))! j=0 X Y Y µzk (X ) µc,k (z), Υ̃0 [µ]k|k−1 , Z](n) = · µφk (X |s)n−(j+d) X Z 0 ⊆Z z∈Z 0 |Z 0 |=j z 0 ∈(Z 0 )c (43) where (Z 0 )c = Z \ Z 0 . Proof. See appendix. runs, and the sensor estimate as well as the estimated number of targets is computed as the weighted mean over all particles. As [31] suggests, the likelihood (46) needs additional assumptions to make it computationally feasible. Firstly, only associations are taken into account that lead to a single object - single association likelihood above a threshold τ0 = 10−7 in the first time step and τ = 10−3 otherwise. Furthermore, a connected component analysis is performed to find groups of object-measurement clusters that are worth being associated, and these groups are restricted contain at most 3 measurements and 3 targets. Note that the three multi-object likelihood functions (14), (30) and (42) do not require any restrictions. D. An alternative likelihood function [31] For the sake of comparison, an alternative likelihood function is consulted which is introduced in [31]. This multiobject likelihood takes all possible associations between the measurement set and the target population into account. First of all, write the short-hand notation Q z∈Z sc (z|sk ) . R (44) pc (Z) = exp sc (z 0 |sk )dz 0 Furthermore, define the association function θ : B(Z) → B(X ) which maps a selection of measurements Z = {z1 , . . . , zmk } to a selection of targets X = {x1 , . . . , xnk } via ( xi if zj is associated with xi , (45) θ(zj ) = 0 otherwise, where the xi are extracted from the predicted intensity µ•k|k−1 with • ∈ {[, ], \}. Then, `ˆk (s|Z) = pc (Z) · X θ nk Y (1 − pd (xi |s)) i=1 mk Y j=1 θ(j)6=0 pd (θ(zj )|s)`(zj |θ(zj ), s) . (1 − pd (θ(zj |s))pc (zj ) (46) Note that in contrast to (14), the associations in the last term of (46) are not marginalised over all possible states, but this algorithm depends on the extraction of specific object locations xi . In other words, this approach does not use the full information available through the predicted intensity. IV. S IMULATIONS All experiments presented in this section are performed using a Gaussian Mixture implementation of the algorithms described earlier, see [4], [5], [11] for more detail. The calibration is conducted for all filters with their respective full multiobject likelihoods (14), (30) and (42), henceforth globally denoted by L1, as well as with the likelihood (46), labeled by L2 in the following. The parent process is implemented in all cases with a Sequential Monte Carlo (SMC) filter approach in the manner of [15], [36] and others, using 300 Monte Carlo (MC) particles for each run and performing basic roulette resampling if the effective sample size falls below 150. All results presented in the following are averaged over 50 MC A. Experiment 1 For the first experiment, a global ground truth is simulated over 100 time steps (of unit 1 s) for both the multi-target configuration and the sensor trajectory, and the 50 MC runs are performed on different measurement sets extracted from this ground truth. Both the target and the sensor state space are assumed four-dimensional, accounting for position and velocity in a two-dimensional environment measured in m. The targets follow a Poisson birth model with mean 4, and the objects move according to a near constant velocity (n.c.v.) model with acceleration noise of 0.3 m s−2 and with an initial velocity of 0 with Gaussian noise of 0.1 m s−1 in both x and y. Each target survives with a probability of ps = 0.95. The sensor follows an n.c.v. model with acceleration noise 0.2 m s−2 and initial velocity 0 m s−1 in both x and y. The simulated sensor trajectory is depicted in Fig. 1a. From this scenario, measurements are generated with a uniform detection probability of pd = 0.99 over the whole state space. The observation space is assumed two-dimensional, accounting for the two dimensions of the environment that contains the objects. Measurements are superimposed with a measurement noise of 0.1 m in both dimensions and with the created sensor drift, and false alarms are generated uniformly over the state space according to a Poisson noise model with mean 10. In this scenario, the filter parameters are set to the same parameters that were used to generate the simulation. Fig. 2a shows the root mean square error in the estimation of the sensor trajectory over all 100 time steps for all filters. It can be seen that the three filters do not differ greatly among each other since the generated measurements fit the filter parameters. The full multi-object likelihoods associated to each filter, however, bring a much better estimation of the sensor state in comparison to the likelihood suggested by [31] which is consistently diverging after time step 10 for all three filters. In terms of the estimated number of targets (Fig. 2b and 2c), all filters seem to monitor the ground truth consistently, apart from the second-order PHD filter with the alternative likelihood that slightly underestimates the number of targets in comparison to the other filters. Tab. I shows the averaged runtimes for the prediction, update and likelihood functions of all filters, averaged over 50 MC runs. The CPHD filter update is up to 16 times slower filter PHD L1 PHD L2 SO-PHD L1 SO-PHD L2 CPHD L1 CPHD L2 prediction 0.0022 0.0022 0.0024 0.0019 0.2256 0.2141 update 0.2805 0.7205 0.5914 0.8681 4.5857 4.8107 likelihood 0.0182 0.5007 0.0191 0.4285 0.0218 0.4630 TABLE I: Averaged runtimes in seconds, Experiment 1. y y 0 15 10 −5 5 15 births 14 deaths 0 filter PHD L1 PHD L2 SO-PHD L1 SO-PHD L2 CPHD L1 CPHD L2 PHD L1 PHD L2 SO-PHD L1 SO-PHD L2 CPHD L1 CPHD L2 prediction 0.0014 0.0014 0.0014 0.0013 0.3281 0.3079 0.0016 0.0016 0.0017 0.0017 0.3185 0.3066 update 0.0812 0.0897 0.2003 0.1957 1.6374 1.5674 0.2323 0.2664 0.7661 0.7389 5.1335 4.8654 likelihood 0.0033 0.0173 0.0036 0.0153 0.0067 0.0166 0.0109 0.0484 0.0117 0.0431 0.0143 0.0427 TABLE II: Averaged runtimes in seconds, Experiment 2. than the updates of the PHD filters of first and second order. Moreover, the alternative likelihood function L2 also performs considerably slower than the full multi-object likelihood function. B. Experiment 2 The second experiment aims at analysing the effect of model mismatches on the robustness of the filters. While the filters follow the same target birth/death model as in Experiment 1, the ground truth does not: 15 targets are created at the initial step, and stay alive until time step t = 15; then, either 14 objects are artificially removed (Experiment 2.1) or 15 objects are added to the existing population (Experiment 2.2), such that the number of targets changes to 1 or 30, respectively, all of which stay alive until the end of the scenario. Little is known for the filters about the birth/death model, thus the second-order PHD and the CPHD filters are fed with a negative binomial birth with mean 2 and variance 20, accounting for a large uncertainty. The PHD filter, on the other hand, can only describe the number of newborn targets through its mean value, which is set to 2 as well. The probability of survival in the three filters is set to ps = 0.99. There are no model mismatches for the remaining parameters, whose values are set as in Experiment 1, except for a slightly smaller acceleration noise (0.1 m s−2 ). Fig. 3 shows the estimation results for Experiment 2.1, with unexpected target death at time t = 15. As for the first experiment, the proposed likelihood L1 leads to a significantly more accurate estimation of the sensor state. Regardless of the chosen filter or likelihood, the estimation error increases sharply after time t = 15; it might be explained by the sudden target death which drastically decreases the amount of information for the estimation of the sensor state. Fig. 3b and 3c suggest that the CPHD filter is less reactive to unexpected −20 −10 0 (a) Experiment 1. x −10 −2 0 2 x (b) Experiment 2. Fig. 1: Ground truth for the sensor state for Experiments 1 and 2, both originating at (0, 0). target disappearances; this might be explained by its lower flexibility to out-of-model target deaths since it maintains a full cardinality distribution on the number of targets. On the other hand, it remains unclear why the second-order PHD filter slightly underestimates the number of targets if combined with the alternative likelihood L2, but shows accurate results with the proposed likelihood L1. The results for Experiment 2.2 are displayed in Fig. 4. Again, the proposed method using likelihood L1 shows better performances in the estimation of the sensor state. Unlike Experiment 2.1, the unexpected increase in the number of targets provides more information and seems to facilitate the estimation of the sensor state, resulting in an improvement for all the filters and likelihoods immediately after time step t = 15. Again, the second-order PHD filter underestimates the number of targets when combined with the alternative likelihood L2. Tab. II confirms the findings on the runtime analysis of Experiment 1. The decrease in target number in Experiment 2.1 leads to a generally faster performance for all three filters, whereas the increase in target number in Experiment 2.2 results in longer runtimes. In the update, the CPHD filter again runs up to 20 times slower than the PHD filter, whereas the second-order PHD filter needs only twice as much time to run as the PHD filter. Furthermore, the proposed likelihood L1 is consistently faster than the alternative likelihood L2. V. C ONCLUSION Following the idea of the single-cluster PHD filter, the second-order PHD filter and the CPHD filter have been embedded in a single-cluster environment to solve estimation problems where sensor-specific parameters have to be estimated alongside the multi-target configuration, e.g. robot localisation, sensor calibration, or the estimation of the sensor profile. Specific multi-object likelihood functions for both filters have been derived in the same manner as it was previously done for the PHD filter, and simulations have shown that these likelihood functions yield better results in the sensor state estimation than existing multi-object likelihood approaches. All three filters perform well on the experimental setups 6 3 4 2 1 0 PHD L1 PHD L2 Panjer L1 Panjer L2 CPHD L1 CPHD L2 RMSE RMSE 2 PHD L1 PHD L2 Panjer L1 Panjer L2 CPHD L1 CPHD L2 20 40 60 80 0 100 5 10 time 15 time 20 gt PHD Panjer CPHD 0 # targets # targets 30 gt PHD Panjer CPHD 10 20 40 60 80 15 10 5 0 100 5 10 time (b) Estimated number of targets, proposed likelihood (L1). 15 time 20 10 0 # targets # targets gt PHD Panjer CPHD 20 40 60 80 25 30 (b) Estimated number of targets, proposed likelihood (L1). gt PHD Panjer CPHD 30 20 30 (a) Error in the estimated sensor state. (a) Error in the estimated sensor state. 20 25 15 10 5 0 100 5 10 time 15 time 20 25 30 (c) Estimated number of targets, alternative likelihood (L2). (c) Estimated number of targets, alternative likelihood (L2). Fig. 2: Results for Experiment 1 (no model mismatches). Fig. 3: Experiment 2.1 (out-of-model target deaths). studied in this article, even though the single-cluster CPHD filter is significantly slower than the other two filters. h : X → R+ , define the (chain) derivative of G with respect to h in the direction of η with A PPENDIX A: P ROOFS FOR THE MULTI - OBJECT δG(h; η) = lim LIKELIHOODS The appendix provides proofs for the likelihood functions (14), (42) and (30). Therefore, let us define some basic concepts of PGFLs and their differentiation. A. PGFLs and functional differentiation PGFLs are convenient tools for calculating moments and other statistical quantities using functional differentiation [33]. In the following, the so-called chain derivative will be used for this purpose as follows [37]. Let (εn )n∈N be a sequence of real numbers converging to 0 and (ηn : X → R+ )n∈N be a series of functions converging pointwise to a function η : X → R+ . For any given functional G and test function n→∞ G(h + εn ηn ) − G(h) . εn (47) If the limit exists, it is identical for any two sequences (εn )n∈N and (ηn )n∈N as described above. Since the multi-object likelihood `k (s|Z) is found by marginalising the observation process over the measurement set Z, the following differentiation will be of importance for the proofs. (n) PΦ (B1 × · · · ×Bn ) = δ n GΦ (h; 1B1 , . . . , 1Bn )|h=0 ; (48) in particular, (m) PΦ  (z1 , . . . , zm ) = δ m GΦ (h; δz1 , . . . , δzm )|h=0 (49) product and chain rules [21], [39] 4 PHD L1 PHD L2 Panjer L1 Panjer L2 CPHD L1 CPHD L2 RMSE 3 2 δ n (F · G)(h; η1 , . . . , ηn )   c   X = δ |ω| F h; (ηi )i∈ω δ |ω | G h; (ηj )j∈ωc , (53) ω⊆{1,...,n} n δ (F ◦ G)(h; η1 , . . . , ηn )    X δ |π| F G(h); δ |ω| G(h; (ηi )i∈ω ) = 1 π∈Πn 0 5 10 15 time 20 25 # targets gt PHD Panjer CPHD 0 5 10 15 time 20 25 30 n≥0 The CPHD filter is constructed using i.i.d. cluster processes for the predicted target process as well as for the birth and clutter processes. 2) Bernoulli process: A Bernoulli point process with parameter 0 ≤ p ≤ 1 and spatial distribution s is an i.i.d. cluster process with spatial distribution s whose size is 1 with probability p and 0 with probability q = (1 − p). Its PGFL is given by Z GBernoulli (h) = q + p h(x)s(dx). (56) (b) Estimated number of targets, proposed likelihood (L1). # targets 30 20 gt PHD Panjer CPHD 10 0 5 10 15 time 20 25 30 (c) Estimated number of targets, alternative likelihood (L2). Fig. 4: Experiment 2.2 (out-of-model target births). with Dirac delta functions δzi ; the notation δG(f, δx ) will be understood as the Radon-Nikodym derivative of the measure µ0 : B 7→ δG(f, 1B ) evaluated at point x, i.e. δG(f, δx ) := (54) Since the PHD, CPHD and second-order PHD filters utilise different special cases of point processes, four relevant examples will be listed below. 1) Independent and identically distributed cluster process: An i.i.d. cluster process with cardinality distribution ρ on N and spatial distribution s on X describes a population whose size is described by ρ, and whose object states are i.i.d. according to s. Its PGFL is given by Z n X Gi.i.d. (h) = ρ(n) h(x)s(dx) . (55) 30 10 . ω∈π B. Four examples of point processes 30 (a) Error in the estimated sensor state. 20  dµ0 (x), dλ (50) for any appropriate function f on X and any point x ∈ X under the assumption that the theorem of Radon and Nikodym holds [38]. Similarly to ordinary differentiation, the differential (47) admits a product rule and a chain rule given by [37] δ(F · G)(h; η) = δF (h; η)G(h) + F (h)δG(h; η), δ(F ◦ G)(h; η) = δF (G(h); δG(h; η)), (51) (52) respectively. These rules can be generalised to the n-fold In the context of target tracking, Bernoulli processes are commonly used to describe binary events such as the detection or survival of individual targets. 3) Poisson process: A Poisson process with parameter λ and spatial distribution s is an i.i.d. cluster process with spatial distribution s, whose size is Poisson distributed with rate λ. Its PGFL is given by Z  GPoisson (h) = exp [h(x) − 1]µ(dx) , (57) where the intensity measure µ of the process is such that µ(dx) = λs(dx). In the construction of the PHD filter, Poisson point processes are used for the predicted target and clutter processes. 4) Panjer process: A Panjer point process with parameters α and β and spatial distribution s is an i.i.d. cluster process with spatial distribution s, whose size is Panjer distributed with parameters α and β [40]. Its PGFL is given by [11], [41] −α  Z 1 [1 − h(x)]s(dx) . (58) GPanjer (h) = 1 + β Each of the following proofs follows the same structure. First, the PGFL of the observation process is found using the specific assumptions of the respective filter. In particular, eliminates almost every term of the i.i.d. cluster process. The second term is evaluated using the chain rule (54) which leads to the sum Gobs (g|s) = Gk|k−1 (Gd (g|·, s))Gc (g|s) δ |Z| G]k|k−1 (Gd (g; (δz )z∈Z |·, s))|g=0 X n!ρk|k−1 (n) Y Z pd (x)`(z|x, s)s]k|k−1 (x|s)dx = (n − |Z|)! z∈Z n≥|Z| n−|Z| Z ] . · (1 − pd (x))sk|k−1 (x)dx (59) where s ∈ S. The functional Gk|k−1 denotes the PGFL of the predicted process and Gc is the PGFL of the clutter process; the detection process is always described by a Bernoulli point process with (possibly state-dependent) parameter pd (·) and single-object likelihood l(·|·), thus its PGFL takes the form (56). C. Proof of PHD likelihood (14) The PHD likelihood was demonstrated in [32] in the context of random finite sets, for the sake of completeness this section provides an alternative proof using point processes. In case of the PHD filter, both Gk|k−1 and Gc are Poisson PGFLs such that (59) takes the form Z [ (g(z) − 1)µc (z|s) Gobs (g|s) = exp   Z  Z + 1 − pd (x|s) + pd (x|s) g(z)`(z|x, s)dz − 1  µk|k−1 (x|s)dx . (60) Differentiation by g requires repeated applications of the chain rule R (52) which pulls out one multiplicative term µc (z) + pd (x|s)l(z|x, s)µk|k−1 (x|s)dx for each measurement z ∈ Zk . The final result is obtained by setting g = 0. D. Proof of CPHD likelihood (42) The CPHD filter assumes the target and clutter processes to be i.i.d. cluster processes. This results in the following variation of (59): G]obs (g|s) = G]c (g|s)G]k|k−1 (Gd (g|·, s))  :=  X n Z ρc (n) g(z)sc (z|s)dz  · (61) n≥0 +pd (x|s) E. Proof of second-order PHD likelihood (30) The Panjer assumption of the second-order PHD filter leads to the PGFL G\obs (g|s) = G\c (g|s)G\k|k−1 (Gd (g|·, s))  Z h  1 = 1+ 1 − 1 − pd (x|s) βk|k−1 −αk|k−1 Z i \ + pd (x|s) `(z|x, s)g(z)dz sk|k−1 (x|s)dx  −αc Z 1 · 1+ (1 − g(z))sc (z|s)dz . βc (64) The general product rule (53) is needed for the product in (64) in the same manner as (62), replacing ] by \. Using the notations G\k|k−1 (g|s) := Fd (g|s)−αk|k−1 and G\c (g|s) := Fc (g|s)−αc , the corresponding derivatives are δ |Z| G\k|k−1 (g; (δz )z∈Z |s) = Fd (g|s)−αk|k−1 −|Z| Z (αk|k−1 )|Z| Y · pd (x|s)`(z|x, s)sk|k−1 (x|s)dx |Z| βk|k−1 z∈Z (65) c Z  ρk|k−1 (n) 1 − pd (x|s) Z The result is obtained by switching summations and rearranging the terms. and  n≥0 X (63)  g(z)`(z|x, s)dz s]k|k−1 (x|s)dx Since the product in (61) cannot be simplified like in (60) above, it requires the use of the general product rule (53) leading to (62) Z⊆Zm (66) Including (65) and (66) into (64), switching the summations and rearranging the terms leads to the desired result. n ! δ m G]obs (g; δz1 , . . . , δzm |s)|g=0 X  c = δ |Z | G]c (g; (δz )z∈Z c |s)|g=0 δ |Z | G\c (g; (δz )z∈Z c |s) c (αc )|Z| Y = Fd (g|s)−αc −|Z | |Z| sc (z). βc z∈Z c  · δ |Z| G]k|k−1 (Gd (g; (δz )z∈Z |·, s))|g=0 , where Z c = Zm \ Z. The first term in (62) creates the product Q c z∈Zm \Z sc (z|s)ρc (Z ) for all Z ⊆ Zk since setting g = 0 A PPENDIX B: P SEUDOCODE FOR THE SINGLE - CLUSTER MULTI - OBJECT FILTER Algorithm 1 shows the modular concept of the discussed approach in form of a particle filter. The sensor parameter at time k is represented by a set of N particles yki where 1 ≤ i ≤ N , and each of the particles comes with a corresponding weight wki and and a set of multi-object estimation statistics Θik . These statistics depend on the multi-object filter of choice: for the PHD filter, Θik is simply the intensity µk of the target population at time k, for the second-order PHD filter it is the intensity µk and variance vark and for the CPHD filter it denotes the intensity µk and the full cardinality distribution ρk of the target process, all dependent on the parameter yki . Similarly, the functions Prediction and Update are the respective prediction and update functions of the filter of choice, and the function MOL can be the filter-specific multiobject likelihood of the respective filter, i.e. (14), (30), or (42), or the method given in [31]. Throughout this article, the roulette method was used to perform the resampling, but other approaches can be used instead [42]. Furthermore, resampling is only performed if the effective sample size is low, based on the user-defined parameter 0 ≤ r ≤ 1. In this article, r = 0.5 was used. Input Set of particles {(yki , wki , Θik )}N i=1 Set of measurements Zk+1 Prediction for 1 ≤ i ≤ N do i Sample yk+1 ∼ N (yki , Σs ) i Θk+1|k ← Prediction(Θik ) end for Update for 1 ≤ i ≤ N do Θik+1 ← Update(Θik+1|k , Zk+1 ) i ← MOL(Θik+1|k , Zk+1 ) wk+1 end for Resampling Neff ← PN 1 i 2 i=1 (wk+1 ) if Neff ≤ r · N then i i i N {yk+1 }N i=1 ← Resampling({(yk+1 , wk+1 )}i=1 ) for 1 ≤ i ≤ N do i wk+1 ← N1 end for end if Algorithm 1: Algorithm for parameter estimation. R EFERENCES [1] R. P. S. Mahler, Statistical multisource-multitarget information fusion. Boston: Artech House, 2007. [2] ——, “Multitarget Bayes filtering via first-order multitarget moments,” Aerospace and Electronic Systems, IEEE Transactions on, vol. 39, no. 4, pp. 1152–1178, 2003. [3] ——, “PHD filters of higher order in target number,” Aerospace and Electronic Systems, IEEE Transactions on, vol. 43, no. 4, pp. 1523– 1543, Oct. 2007. [4] B.-N. Vo and W.-K. Ma, “The Gaussian Mixture Probability Hypothesis Density Filter,” Signal Processing, IEEE Transactions on, vol. 54, no. 11, pp. 4091–4104, 2006. [5] B.-T. Vo, B.-N. Vo, and A. Cantoni, “Analytic Implementations of the Cardinalized Probability Hypothesis Density Filter,” Signal Processing, IEEE Transactions on, vol. 55, no. 7, pp. 3553–3567, Jul. 2007. [6] J. Houssineau and D. Laneuville, “PHD filter with diffuse spatial prior on the birth process with applications to GM-PHD filter,” in Information Fusion, Proceedings of the 13th International Conference on, 2010, pp. 1–8. [7] B.-N. Vo, S. S. Singh, and A. Doucet, “Sequential Monte Carlo methods for multitarget filtering with random finite sets,” Aerospace and Electronic Systems, IEEE Transactions on, vol. 41, no. 4, pp. 1224–1245, 2005. [8] B. Ristic, D. E. Clark, B.-N. Vo, and B.-T. Vo, “Adaptive target birth intensity for PHD and CPHD filters,” Aerospace and Electronic Systems, IEEE Transactions on, vol. 48, no. 2, pp. 1656 – 1668, Apr. 2012. [9] J. Barr, M. Uney, D. Clark, D. Miller, M. Porter, E. A. Gning, and S. J. Julier, “A multi-sensor inference and data fusion method for tracking small, manoeuvrable maritime craft in cluttered regions,” in the Proc. of the 3rd IMA Conference on Mathematics in Defence. IMA, Malvern, UK, 2013. [10] P. Gruden and P. R. White, “Automated tracking of dolphin whistles using Gaussian mixture probability hypothesis density filters,” The Journal of the Acoustical Society of America, vol. 140, no. 3, pp. 1981– 1991, 2016. [11] I. Schlangen, E. D. Delande, J. Houssineau, and D. E. Clark, “A secondorder PHD filter with mean and variance in target number,” 2017, arXiv:1704.02084. [12] E. D. Delande, M. Üney, J. Houssineau, and D. E. Clark, “Regional variance for multi-object filtering,” Signal Processing, IEEE Transactions on, vol. 62, no. 13, pp. 3415–3428, Jul. 2014. [13] E. Brekke, B. Kalyan, and M. Chitre, “A novel formulation of the Bayes recursion for single-cluster filtering,” in 2014 IEEE Aerospace Conference. IEEE, 2014, pp. 1–16. [14] J. Houssineau, D. E. Clark, S. Ivekovic, C. S. Lee, and J. Franco, “A unified approach for multi-object triangulation, tracking and camera calibration,” IEEE Transactions on Signal Processing, vol. 64, no. 11, pp. 2934–2948, 2016. [15] I. Schlangen, J. Franco, J. Houssineau, W. T. E. Pitkeathly, D. E. Clark, I. Smal, and C. Rickman, “Marker-less stage drift correction in superresolution microscopy using the single-cluster PHD filter,” Selected Topics in Signal Processing, IEEE Journal of, vol. 10, no. 1, pp. 193– 202, Feb. 2016. [16] O. Hagen, J. Houssineau, I. Schlangen, E. D. Delande, J. Franco, and D. E. Clark, “Joint estimation of telescope drift and space object tracking,” in Aerospace Conference, 2016 IEEE. IEEE, 2016, pp. 1–10. [17] M. Üney, B. Mulgrew, and D. E. Clark, “A cooperative approach to sensor localisation in distributed fusion networks,” IEEE Transactions on Signal Processing, vol. 64, no. 5, pp. 1187–1199, 2015. [18] A. Swain and D. Clark, “Extended object filtering using spatial independent cluster processes,” in Information Fusion (FUSION), 2010 13th Conference on. IEEE, 2010, pp. 1–8. [19] A. Swain and D. E. Clark, “First-moment filters for spatial independent cluster processes,” in SPIE Defense, Security, and Sensing. International Society for Optics and Photonics, 2010, pp. 76 970I–76 970I. [20] A. Swain and D. Clark, “The PHD filter for extended target tracking with estimable extent shape parameters of varying size,” in Information Fusion (FUSION), 2012 15th International Conference on. IEEE, 2012, pp. 1111–1118. [21] D. E. Clark and J. Houssineau, “Faa di Bruno’s formula for chain differentials,” ArXiv e-prints, Oct. 2013, arXiv:1202.0264v4. [22] A. Swain and D. E. Clark, “The single-group PHD filter: An analytic solution,” in Information Fusion, Proceedings of the 14th International Conference on, 2011, pp. 1–8. [23] B. Ristic and D. Clark, “Particle filter for joint estimation of multiobject dynamic state and multi-sensor bias,” in 2012 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). IEEE, 2012, pp. 3877–3880. [24] B. Ristic, D. E. Clark, and N. Gordon, “Calibration of multi-target tracking algorithms using non-cooperative targets,” IEEE Journal of Selected Topics in Signal Processing, vol. 7, no. 3, pp. 390–398, 2013. [25] ——, “Calibration of tracking systems using detections from noncooperative targets,” in Sensor Data Fusion: Trends, Solutions, Applications (SDF), 2012 Workshop on. IEEE, 2012, pp. 25–30. [26] C.-S. Lee, D. E. Clark, and J. Salvi, “SLAM with dynamic targets via single-cluster PHD filtering,” Selected Topics in Signal Processing, IEEE Journal of, vol. PP, no. 99, pp. 1–1, 2013. [27] J. Mullane, B.-N. Vo, M. D. Adams, and B.-T. Vo, “A random-finite-set approach to Bayesian SLAM,” IEEE Transactions on Robotics, vol. 27, no. 2, pp. 268–282, 2011. [28] M. Adams, B.-N. Vo, R. Mahler, and J. Mullane, “SLAM gets a PHD: New concepts in map estimation,” IEEE Robotics & Automation Magazine, vol. 21, no. 2, pp. 26–37, 2014. [29] M. Adams, J. Mullane, and B.-N. Vo, “Circumventing the feature association problem in SLAM,” IEEE Intelligent Transportation Systems Magazine, vol. 5, no. 3, pp. 40–58, 2013. [30] K. Y. Leung, F. Inostroza, and M. Adams, “Evaluating set measurement likelihoods in random-finite-set slam,” in Information Fusion (FUSION), 2014 17th International Conference on. IEEE, 2014, pp. 1–8. [31] K. Y. K. Leung, F. Inostroza, and M. Adams, “Multifeature-based importance weighting for the PHD SLAM filter,” IEEE Transactions on Aerospace and Electronic Systems, vol. 52, no. 6, pp. 2697–2714, Dec. 2016. [32] A. J. Swain, “Group and extended target tracking with the probability hypothesis density filter,” Ph.D. dissertation, Heriot-Watt University, 9 2013. [33] D. Stoyan, W. S. Kendall, and J. Mecke, Stochastic geometry and its applications. John Wiley & Sons, 1997. [34] S. A. Klugman, H. H. Panjer, and G. Willmot, Loss Models: From Data to Decisions, ser. Wiley Series in Probability and Statistics. Wiley, 2012. [35] O. Erdinc, P. Willett, and Y. Bar-Shalom, “Probability hypothesis density filter for multitarget multisensor tracking,” in Information Fusion, Proceedings of the 7th International Conference on, vol. 1, Jul. 2005, p. 8. [36] C.-S. Lee, D. E. Clark, and J. Salvi, “SLAM with single cluster PHD filters,” in Robotics and Automation (ICRA), 2012 IEEE International Conference on, 2012, pp. 2096–2101. [37] P. Bernhard, “Chain differentials with an application to the mathematical fear operator,” Nonlinear Analysis: Theory, Methods & Applications, vol. 62, no. 7, pp. 1225–1233, 2005. [38] O. Nikodym, “Sur une généralisation des intégrales de MJ Radon,” Fundamenta Mathematicae, vol. 15, no. 1, pp. 131–179, 1930. [39] D. E. Clark, J. Houssineau, and E. D. Delande, “A few calculus rules for chain differentials,” ArXiv e-prints, Jun. 2015, arXiv:1506.08626v1. [40] M. Fackler, “Panjer class united – one formula for the Poisson, Binomial, and Negative Binomial distribution,” ASTIN colloquium, 2009. [41] I. Schlangen, E. Delande, J. Houssineau, and D. E. Clark, “A PHD filter with negative binomial clutter,” in Information Fusion (FUSION), 2016 19th International Conference on. IEEE, 2016, pp. 658–665. [42] A. Doucet, N. de Freitas, and N. Gordon, Eds., Sequential Monte Carlo Methods in Practice. Springer-Verlag, 2001, vol. 1.
10math.ST
Robust Reactive Power Optimization and Voltage Control Method for Active Distribution Networks via Dual Time-scale Coordination Weiye Zheng, Wenchuan Wu, Boming Zhang, Yongjie Wang (Department of Electrical Engineering, Tsinghua University, China )  Abstract—In distribution networks, there are slow controlling devices and fast controlling devices for Volt-VAR regulation. These slow controlling devices, such as capacitors or voltage regulators, cannot be operated frequently and should be scheduled tens of minutes ahead (Hereafter named as slow control). Since of the uncertainties in predicting the load and distributed generation, the voltage violations cannot be eliminated by fast controlling devices with improper schedule of the slow controlling devices. In this paper we propose dual time-scale coordination for the VoltVAR control scheme, corresponding to slow and fast control. In the case of slow control, a robust voltage and reactive power optimization model is developed. This guarantees that subsequent fast controls can maintain the system’s voltage security if the uncertain parameters vary within predefined limits. This nonconvex optimization problem is relaxed to a mix integer second order conic problem, and the dual form of its sub-problem is also derived. Then a column-andconstraint generation algorithm was used to solve the robust convexified model. A conventional deterministic optimization model can be used to determine the fast control mechanism. Numerical tests were conducted on a real distribution feeder in China, a balanced IEEE 69-bus and unbalanced 123-bus benchmark distribution networks. The simulation results show that solving the deterministic model is not always feasible and voltage violation may occur. The robust model was shown to be effective with respect to all possible scenarios in the uncertainty set, with little compromise in terms of network losses. Index Terms—Robust optimization, reactive power optimization, voltage control, active distribution network, mixed integer second-order cone program. NOMENCLATURE The main symbols used throughout this paper are stated below for quick reference. Others are defined as required. A. Indices and Sets i,j Indices of buses, from 1 to N. Indices of phases, typically referring to a, b and c. φ t Iteration of the proposed algorithm. k Index of the tap settings of voltage regulators, from 1 to R.  Set of buses in the entire system. Set of branches in the entire system.  ij Set of allowable taps of branch ij, consisting of Kij ,1 , Kij,2 ,..., Kij , R  ..     Set of allowable on-off decisions for capacitor banks at bus i. Feasible region of the first stage variables. Set of branches with voltage regulators. Set of buses with machanically switched capacitors/capacitor banks. Uncertainty set for fluctuation of d. Qij , Qij Upper and lower bounds of the reactive power at the sending end of branch ij, respectively. i B. Input Parameters and Functions rij, xij Resistance and reactance of branch ij, respectively. Vref Voltage at the point of common coupling Upper and lower bounds of the active power at the sending end of branch ij, respectively. Pij , Pij I ij Upper bound of the current magnitude of branch ij. Vi ,Vi Upper and lower bounds of the voltage magnitude at bus i, respectively. QGi , QGi Upper and lower bounds of the injected reactive powers of the static var compensation devices at bus i, respectively. Upper and lower bounds of the injected reactive powers of the generators at bus i, respectively. d0 d Forecasted loads and active outputs of DGs Realized loads and active outputs of DGs QCi , QCi biC C. Variables Pij, Qij, lij PDi ,QDi PGi ,QGi QCi vi Pi , Qi κij βi β κ x y The admittance element of capacitor bank at bus i. Active power flow, reactive power flow and squared magnitude of the current at the sending end of branch ij, respectively. Active and reactive power load demands at bus i respectively. Injected active and reactive powers of generators at bus i. Total reactive power from compensators at bus i. Squared voltage magnitude at bus i. Total injected active and reactive powers at bus i. Turn ratio variable for tap changer at branch ij. On and off decision variable for the capacitor bank at bus i. On and off decision vector for capacitor banks. Tap setting vector for voltage regulators. First-stage decision vector for voltage regulators and capacitor banks. Second-stage decision vector for reactive outputs of static VAR compensators and distributed generators. Notation: Upper (lower) boldface letters will be used for matrices (column vectors); ||  ||p denotes the vector p-norm for p ≥ 1; ()T transposition; I the identity matrix; variables with superscript φ denote corresponding variables for phase φ. I. INTRODUCTION Volt-VAR optimization aims to minimize network power losses and prevent voltage violations by dispatching reactive power control devices [1]. In recent years, the numbers of renewable distributed generations (DGs), including photovoltaic (PV) and wind power generators, have increased significantly in distribution networks, formulating active distribution networks (ADNs). Due to the reverse power flow, DG outputs may lead to overvoltage [2]. To address this issue, reactive power optimization was investigated in [3], in which it was shown that power losses can be reduced significantly. Most studies concerning reactive power optimization do not consider any uncertain factors [4]-[6]. Three major factors contribute to the uncertainties in ADNs: 1) The active outputs of renewable DGs fluctuate dramatically due to their inherent volatility and intermittency; 2) Load demands vary with time and are hard to predict precisely; 3) There are limited real-time measurements in distribution networks, so large errors may occur in the estimations of the outputs of the DGs and load demands. These uncertainties pose a series of technical challenges to the operation of ADNs. Voltage regulation in distribution networks is conventionally accomplished by voltage regulators (VRs), under-load tap changing (ULTCs) transformers and capacitor banks/mechanically switched capcaitors (MSCs). Although these devices are effective in managing slow variations in voltages, on the time scale of hours, they do not perform well for fast fluctuations, on the time scale of minutes or seconds. On the one hand, these slow controlling devices cannot be operated frequently and they are expected to maintain their states for a long time, since the maximum allowable daily operating time (MADPT) is limited by the expected lifetime. On the other hand, in certain scenarios, where the actual loads and outputs of the DGs significantly deviate from their predicted values, voltage violation may occur. Some recent papers have made efforts to address these uncertainties. Based on Niederreiter’s quasi-random sampling technique, the authors of [7] proposed a robust algorithm for Volt-VAR control. However, optimality is not guaranteed by the theory. A robust voltage control model is described in [8], where a scenario generation and reduction method is used, but slow controlling devices such as ULTCs and MSCs are not considered. Based on scenario generation and reduction method, [9] proposed a robust voltage regulation method, where monotonicity assumption is necessary for scenario reduction. Also, the discrete variables introduced by ULTCs and MSCs are tackled with an empirical two-step solution method. This paper tackles the uncertainties by coordinating slow and fast controlling devices. A dual time scale coordinated control scheme is proposed, as shown in Figure 1. In the case of the larger time scale, here-and-now dispatch of slow controlling devices (including VRs and MSCs) is determined. This occurs on scales of tens of minutes or even hours (hereafter referred to as slow control). In the case of the smaller time scale, the controlling device is activated every minute using a wait-and-see control method for reactive optimal power flow, e.g., reactive outputs of DGs and SVCs, are used to mitigate the impact of frequent voltage variations that occur due to uncertain demands and the output of the DGs (hereafter referred to as fast control). In the case of slow control, a robust Volt-VAR optimization model is proposed to determine the operation of slow devices and guarantee that the subsequent fast controls can ensure the system’s voltage security as long as the uncertain parameters vary within the predefined limits. As conventional deterministic optimization models are suitable for fast control, this paper addresses a robust optimization model used for slow control. dispatch of slow devices (slow control) fast ctrl. fast ctrl. fast ctrl. fast ctrl. dispatch of slow devices (slow control) fast ctrl. fast ctrl. fast ctrl. fast ctrl. Figure 1Timeline for sequential coordination of slow control and fast control ... Time As shown in Figure 1, the operating times for the slow controls should be optimally scheduled in advance. Some heuristic approaches have been proposed in previous work [10][11]. This paper concentrates on how to generate optimal control strategies when the operating times are determined. Since the MADPTs of the slow controlling devices are considered when scheduling operating times, the sequential slow controls can be formulated as independent optimization problems. The main contributions of this paper include: (1) No literatures before have ever reported such a dual time scale coordinated control scheme to reduce the uncertainty of load and distributed generation for three phase distribution networks. Different from [9] which is essentially based on scenario method, the coordination is directly cast as a multilevel robust optimization problem in this paper. Both the convergence of the dual time-scale coordination and the optimality under uncertainties are guaranteed theoretically. (2) A robust Volt-VAR optimization model is developed to determine the operation of slow devices and guarantee that the subsequent fast controls can maintain the system’s voltage security under specified uncertainties. The remainder of the paper is organized as follows: In Section II, the robust Volt-VAR optimization model for slow control is formulated. Section III describes the solution methodology. Section IV details the results of numerical simulations. These demonstrate the performance of the proposed algorithm. Section V concludes the paper. II. ROBUST VOLT-VAR OPTIMIZATION MODEL In this section, we describe deterministic and robust Volt-VAR optimization models. First, we review a deterministic model using forecast loads and active DG outputs. A. Deterministic Model For an ADN with N buses, where bus 1 denotes the point of common coupling, the reactive power optimization problem is to find an optimal dispatch for the system equipment (e.g., VRs, MSCs, DGs and SVCs, etc.). This should minimize losses whilst taking into account security constraints. Farivar et al. [12] showed that the non-convex branch flow in radial distribution networks can be convexified and that the deterministic model can be formulated as the following problem. 1) Objective function We aim to minimize the active power loss of the network, i.e., min  , ,QC ,QG     a ,b , c ( i , j ) lij rij . (1) 2) DistFlow branch flow constraints in second-order conic programming (SOCP) form In power distribution systems, DistFlow branch equations are typically used to describe the power flow. The equations were first proposed by Baran and Wu in [13] and later adopted by Steven H. Low in [12] for relaxations and convexification.  ( P  l r )  P   P , j   ,  ij i:i  j ij ij j k : j k  (Q  l x )  Q    b  i:i  j ij ij ij j j j v  ,C  j jk  Q , j   ,  k : j k jk (2) (3) vj   ij ,2 vi  2( rij Pij  xij Qij )  (rij ,2  xij ,2 )lij , (i , j )   ,  (4) 2 Pij 2Qij  lij  vi  lij  vi , (i , j )   ,  (5) 2 Pj  PGj  PDj , j   ,  (6)  Qj  QGj  QCj  QDj , j   ,  (7) ij ij (8) {K , K ,..., K ij , R }, if (i, j )   ij   ij ,1 ij ,2 otherwise  {1.0}, (9)  j  j (10) {0,1}, if j   . j    0, otherwise (11) Here, (2) is the conventional nodal active power balance constraint used in the DistFlow equations. (3) extends the conventional nodal reactive power balance constraint by considering MSCs. (4) is a general form of the voltage constraint that takes into account branches with VRs, as shown in Figure 2. (5) is the relaxed second-order conic constraint proposed in [12]. (6) and (7) represent the net injected active and reactive power for each bus respectively. (8) and (9) describe all allowable taps of branch ij; (10) and (11) specify allowable on-off decisions at bus i. Combined with equations (8)-(11), the branch flow equations in (3) and (4) provide a unified expression for the cases with or without MSCs and VRs. Figure 2 DistFlow branch flow model with voltage regulators 3) Reference voltage of point of common coupling (PCC) V1  Vref ,  . (12) (12) implies that the voltage of PCC is set to reference voltage. 4) Security constraints lij  I ij ,2 , (i, j )   ,  (13) Pij  Pij  Pij , (i, j )   ,  (14) Qij  Qij  Qij , (i, j )   ,  (15) Vi ,2  vi  Vi  ,2 , i   ,  . (16) The security constraints for the current, active power flow and reactive power flow of branch ij, are represented by (13)-(15), respectively. Voltage violation is prevented by introducing a voltage constraint (16). 5) Operating constraints of DGs and compensation devices    QGi  QGi  QGi , i   ,  (17) QCi  QCi  QCi , i   ,  . (18) The reactive powers of the DGs and SVCs are confined by (17)-(18). B. Convexification of deterministic model It is very difficult to obtain global optimal solutions of the nonconvex deterministic model efficiently. Therefore, the cross terms in (3) and (4) have to be relaxed. 1) Relaxation of MSCs By introducing j  vj  j , [4] shows that (3) is identical to  (Q  l x )  Q  b  i:i  j with additional constraints: ij ij ij j j ,C j   Q , j   ,  k: j k jk (19) vj  V j ,2 (1   j )  j  vj  V j ,2 (1   j ), j   ,  (20) V j ,2  j  j  V j ,2  j , j   ,  . (21) 2) Exact linearization of VR model The intuitive idea is to approximate the original surface by a series of polyhedra. The approximation is exact in the case of discrete feasible set of tap settings for VRs, as shown in Figure 3. By using the exact piecewise linearization technique from [14], (4) can be rewritten as  K R 1 k 1 with extra constraints: ,2 ij , k ( gij,kVi ,2  hij,kVi  ,2 )  2( rij Pij  xij Qij )  ( rij ,2  xij ,2 )lij  vj  0, (i , j )   ,   ( g R k 1 ij , k  hij, k )  1 (22) (23)    1 ik (24) 0  gij,1 , hij,1  ij ,1 (25) 0  gij,R , hij,R  ij, R1 (26) R 1 k 1 0  gij,k , hij,k  ij,k  ij,k 1 , k [2, R  1] (27) ij,k {0,1} . (28) where δik denotes the section of interest. Note that the allowable taps divide the function f into R sections, gij,k and hij,k are auxiliary variables that approximate the original function f. For details, please refer to [14]. Figure 3 Piecewise linearization of cross term introduced by Voltage Regulators (VRs) 3) Compact form of the convex deterministic Volt- VAR Optimization model (DVO) The convex deterministic model consists of an objective   min  , , g , h , , ,QC ,QG   a ,b ,c ( i , j ) lij rij (29) with constraints (2), (19)-(21), (22)-(28) and (5)-(18). By defining an augmented vector x  (  ,  , g , h ,  ,  ) that holds the decision variables for the MSCs and VRs, a vector y  (QC , QG , v, lij , Pij , Qij )T that relates the power flow and the dispatch of DGs and SVCs and a forecasted vector d0  ( PD ,QD ,QG )T , this model can also be written in a compact form: min bT y x , y s.t. (30) Ax  By  d0  0 (31) Cx  Dy  e (32) x (33) Gl y 2  glT y, l   (34) y y y . (35) where (30) is equivalent to (29), (31) represents the power balance constraints (2), (19) and (22), (32) is identical to the inequality constraints (20)-(21), (33) is an expression for the constraints (8)-(11) and (23)-(28), (34) simplifies the expression of (5), and the security constraints in (13)-(16) and the reference constraint in (12) can be represented by (35). C. Two-Stage Robust Volt-VAR Optimization Model (RVO) In the deterministic model, neither the difference in time-scales among our devices nor the uncertainties in the loads and DG outputs is considered. In the robust model, it is assumed that the dispatch for the slow control (VRs and MSCs) is decided prior to the loads and active DG outputs of DGs occurring. For each instance of uncertain loads and DG outputs, the fast control (reactive outputs of SVCs and DGs) reduces network losses and prevents voltage violation. The first-stage dispatch of VRs and MSCs attempts to minimize the worst-case second-stage power loss, which can be formulated as the following twostage robust model: min max min bT y (36) A x  B y  d  0, d   (37) Cx  Dy  e, d   (38) l   , d   (39) d  (40) x s.t. d  Gl y 2  glT y, y y  y  y, and (33). The uncertainty set  is assumed to form a polyhedron. This guarantees that the column-and-constraint generation (C&CG) algorithm used to solve the proposed model converges after a finite number of iterations [15]. First we calculate the optimal reactive power flow of a given schedule x of VRs and MSCs for a particular load and DG scenario d , which replaces the forecasted value d0. This enables us to obtain the actual power losses. Next, the worst scenario where the optimal losses are maximized for a given dispatch of VRs and MSCs is obtained. Finally, our robust model finds an optimal way to dispatch the VRs and MSCs. This minimizes the worst-case losses. It is ensured by (37)-(40) that power balance and security constraints are maintained when loads and active outputs of DGs fluctuate within the uncertainty set  . III. SOLUTION METHODOLOGY The C&CG algorithm in [15] is used to solve the two-stage robust reactive power optimization model. The distinctive feature of the proposed robust model is that the innermost problem is an SOCP, while the outermost problem is a mixed integer secondorder conic program (MISOCP). The C&CG algorithm can be naturally extended for this robust reactive power optimization model. The application of the algorithm is outlined as follows. The C&CG algorithm tries to solve the following extensive formulation of the proposed robust model:  (41) bT y(d )   (42) 0 (43) A x  B y ( d )  d  0,  d   (44) C x  D y (d )  e , (45) min x, y ( d), s.t. d   Gl y(d ) 2  glT y( d ), l   , d   y  y(d )  y, d  (46) (47) and (33). The above problem has an infinite number of variables and constraints corresponding to each scenario d. A. Master Problem Due to the infinite number of constraints (44)-(47), which are indexed by the uncertainty set  , it is not possible to solve the above problem directly. The following reduced problem, where  is replaced by a finite subset, provides a lower bound for the robust model:  (48) t  1, 2,..., t0 (49) min x , y ( t ), s.t. by( t )   , Ax  By(t )  d (t )  0, t  1,2,..., t0 Cx  Dy(t )  e, t  1,2,...,t0 Gl y(t ) 2  glT y(t ), l , t  1,2,..., t0 y  y(t )  y, t  1,2,..., t0 (50) (51) (52) (53) and (33). where d (t )  , t  1,2,..., t0 . The master problem is an MISOCP with binary variables in x and second-order conic constraints in (52). B. Sub-problem The next key step in the C&CG algorithm is to search for the worst-case scenario for the master problem and obtain an upper bound for the robust model. This is achieved by solving the following sub-problem for the given dispatch scheme x * of VRs and MSCs:  ( x * )  max min bT y (54) B y  d   Ax * , (τ ) (55) d  s.t. y Dy  e - Cx * , (56) (ξ ) Gl y(t ) 2  glT y(t ), l (σl . μl ) y  y  y, (57) (58) ( λ, λ ) The optimal objective value of this sub-problem is the worst-case network losses for a given dispatch scheme x * . Hence, it can be used to estimate an upper bound for the robust model. This two-level max-min problem cannot be solved directly. Therefore, we convert the inner conic problem. The Lagrangian function of the inner problem is : L( y,ol ,l , σ l , λ, λ,ξ, μl , l )  bT y - τ T ( Ax*  By  d )   σ lT (G l y - ol ) l  l ( g y - l )   l (l  ol 2 )  λ ( y - y ) T l l T l  λ T ( y - y )  ξ T ( Dy + Cx*  e ) (59)  [bT  τ T B   (σ lT G l l glT )  λT + λ T  ξ T D] y l τ ( Ax  d )  λT y  λ T y   (σ lT ol   l ol 2 ) T *   ( l   l )l  ξ (Cx  e ) T l * l with νl , λ, λ , ξ  0 . The dual problem can be formulated as: max inf L( y, d , σ l , λ , λ,ξ, μl ) . (60) d , σl , λ , λ,ξ, μl y,ol ,l The minimization over y and l is bounded if and only if BT  τ   ( GTl σl  l gl )  λ - λ + DT  ξ = b . (61) l   l , l (62) l σl 2  μl , l . (63) To minimize over ol , note that inf σlT ol   l ol ol 2 0,  , σl 2 l otherwise . (64) The Lagrangian dual function is    (σ l , λ, λ,ξ , l , l )     -( Ax* + d )T τ + yT λ if σ l l , -y T λ + (e - Cx* )T ξ , (61) and (62) . (65) , otherwise 2 which leads to the dual problem in a monolithic form: max d  , τ , λ, λ,ξ,σ l , μl -( Ax *  d )T τ  y T λ - y T λ + (e - Cx * )T ξ (66) BT  τ   ( GTl σl  l gl )  λ - λ + DT  ξ = b s.t. (67) l  μl , l (68) ξ, λ, λ , μl  0 (69) σl 2 The objective function is linear except for the bilinear term d T τ , and the constraints are all in SOCP form. With the assumption that the uncertainty set  is polyhedral, the extreme points of  can be described by a set of auxiliary binary variables and linear constraints. By introducing big-M constraints, the bilinear term can be linearized, which can enable us to transform the sub-problem into an MISOCP. When d fluctuates within the interval [ d , d ] , introducing an auxiliary binary vector ζ that satisfies d i  d i   i d i element-wise and an auxiliary variable  i   i i , the above bilinear program is equivalent to the following MISOCP: max d  , τ , λ, λ,ξ,σ l , μl , ζ,γ s.t. -( Ax *  d )T τ  y T λ - y T λ + (e - Cx * )T ξ - d T γ (70) τ  M (1  ζ )  γ  τ  M ( 1  ζ ) (71)  Mζ  γ  Mζ (72)  i  {0,1} (73) and (67)-(69) where 1 is a column vector whose elements are all equal to 1, M is a very large positive number (e.g., 106) and (71)-(72) are big-M constraints. C. C&CG Algorithm The whole procedure to solve the two-stage robust reactive power optimization problem is summarized in Table I. TABLE I A SUMMARY OF THE C&CG ALGORITHM FOR ROBUST VOLT-VAR OPTIMIZATION PROBLEM 1. 2. Initialization LB : 0, UB : , t : 0 . Set tolerance level ε > 0. Solve the master problem to get an optimal dispatch scheme x * and  * . Then update LB : max{LB, * } . While UB – LB > ε 3. 4. 5. Given x * , solve the sub-problem to obtain an optimal objective  ( x * ) corresponding to the worst-case scenario d * . Update UB : min{UB, ( x* )} . Update d (t  1) : d * . Create variables y(t+1) and add corresponding constraints (37)-(40) to the reduced master problem. Update t : t  1 . Return to Step 1. To be more readable, a schematic flowchart of the proposed algorithm is depicted in Figure 4. The interaction between the master problem and the sub-problem is annotated over the arrow. The master problem solves a reduced problem considering typical worst-case scenario set and then transfers the optimal dispatch x* for slow control devices to sub-problem. The subproblem simply solves the dual problem of optimal power flow, searches for the worst-case scenarios given the slow dispatch x*, and renew the typical worst-case scenario set in the master problem. The master problem updates the lower bound of the objectives, while the sub-problem updates the upper bound. The whole procedure terminates while the difference of these two bounds are sufficiently small. Initialization solve the master problem for VRs and CBs update LB : max{LB, * } Create y(t+1) and add corresponding constraints (37)-(40) to master problem; Update iteration index t:=t+1 UB – LB > ε? No End transfer the optimal dispatch x* to subproblem solve the OPF sub-problem to obtain the worst-case scenario d* of load and DG fluctuation UB : min{UB, ( x * )} d (t  1) : d * Figure 4 Flowchart of the proposed algorithm. IV. SIMULATION RESULTS In this section, we outline results from numerical experiments on a real feeder from Shandong distribution system in China [6][16], an IEEE 69-bus and a three-phase unbalanced IEEE 123-bus distribution systems [17]. These were conducted to enable us to evaluate the performance of the proposed robust model. System DG Shandong 14-bus test feeder buses {5, 6, 7, 8, 9, 10, 11, 12, 13} TABLE II CONFIGURATIONS OF TEST SYSTEMS IEEE 69-bus buses {19, 20, 26, 22, 54, 69, 34, 38} IEEE 123-bus buses {7, 12, 33, 47, 115, 98, 84, 19, 43, 61} SVC bus 14 buses {94, 68} VR line 6 line 10 line 58 MSC buses {11, 12, 13, 14} buses {5, 20, 27, 50, 25} buses {4, 12, 19, 55, 93, 68, 43} DG, distributed generations; SVC, static VAR compensators; VR, voltage regulator; MSC, capacitor bank/ mechanically switched capacitor In the IEEE 69-bus system, there are eight DGs, one VR and five MSCs. In the IEEE 123-bus system, there are ten DGs, two SVCs, one VR and five MSCs. DG at bus 68 is operated at phase B, while DGs at buses at 61 and 94 are operated at phase A and phase B. Other equipment is operated in three phase. Details of the configuration is listed in Table II. The admittance of the MSCs was set as 1.0 p.u.. The capacity of the SVCs was 0.3 p.u. The capacity of the DGs was 0.3 p.u. for both active and reactive power generation. Suppose that the DGs operate in maximum power point tracking (MPPT) mode, which attempts to generate the maximum allowable active power, and the reactive power is optimized [18]. The allowable turn ratio of the VR lie in the interval [0.95, 1.05] with step length 0.01. The operational limits for voltage magnitude are 0.9 p.u. and 1.042 p.u. [21]. The algorithms, namely the Deterministic Volt-VAR Optimization Model (DVO) and the two stage Robust Volt-VAR Optimization Model (RVO), were implemented using the Matlab program and solved with IBM ILOG CPLEX software (ver.12.5) [19]. The test environment was a laptop with an Intel Core i5-3210M 2.50-GHz processor and 8 GB of RAM. The following uncertainty set is considered:  PD  (1   ) PDBase  PD  (1   ) PDBase       QD  (1   )QDBase  QD  (1   )QDBase  Base Base  P  (1   ) P  PG  (1   ) PG  G  G  (74) where the base loads PDBase , QDBase were taken from the data in the standard test archive and the volatility is denoted as  . The simulation results are organized as follows. In section A, we first demonstrate the practical applicability issue of RVO. We use a real feeder in China and a scenario along with the base case to show the technical issues arising from DVO and how RVO can tackle with this issue. Then, both DVO and RVO were tested on a large number of scenarios generated by Monte Carlo simulation in section B, using two IEEE standard test archives. The results show that RVO can handle uncertainties in a single-time period. In section C, numerical tests were further performed in multiple-time period, and RVO can successively keep the voltage profiles within security region. A. Practical applicability of the proposed algorithm The major drawback of DVO is firstly demonstrated through a real feeder from Shandong distribution system in China. Detailed data are all online available [16]. In this section, the base loads PDBase , QDBase were taken from the data in [16] and the volatility  is set as 50%. In the base case, although the voltage magnitudes of all buses did not violate upper bound, voltage violation occurred in buses {3, 5-14} after fluctuation of loads and DG outputs (50% loads and 150% DG active power outputs in comparison to the base case), as shown in Figure 5. And this practical issue can be addressed by RVO, which can keep voltage security even after loads and DG outputs fluctuation as shown in Figure 6. Figure 5 Simulated voltage magnitude of the convex deterministic Volt-VAR Optimization Model (DVO) in the Shandong Test Feeder. Figure 6 Simulated voltage magnitude of the two stage robust Volt-VAR Optimization Model (RVO) in the Shandong Test Feeder. TABLE III CONTROL STRATEGIES FOR SLOW DEVICES GENERATED BY RVO AND DVO IN SHANDONG TEST FEEDER (1: SWITCH ON, 0: SWITCH OFF) Devices Dispatch schedule MSC11 DVO 1 MSC13 1 MSC12 MSC14 VR6 0 1 1.02 Strategy RVO 0 0 0 1 0.99 Here, the reason why RVO differs from DVO is briefly discussed using the dispatch schedules generated by them in Table III. Since DVO does not consider any uncertainties, its objective is to minimize network losses by increasing the voltages profile for the base-case scenario, which would probably encounter voltage violation after fluctuation of DGs. RVO is comparatively conservative when making control decisions for slow control devices by considering the worst-case scenario, which make the subsequent fast control has the capability to eliminate the voltage violations. B. Comparison of handling uncertainties in a single-time period In this section, the base loads PDBase , QDBase were taken from the data in [17] and the volatility  is set to 10%. In total, 100 Monte Carlo runs were conducted independently to generate scenarios. Figure 7 Simulated voltage magnitude of the convex deterministic Volt-VAR Optimization Model (DVO) in the IEEE 69-bus system. Figure 8 Simulated voltage magnitude of the two stage robust Volt-VAR Optimization Model (RVO) in the IEEE 69-bus system. In simulation, the DVO made optimal dispatches for VRs and MSCs, and achieved optimal reactive power flow for forecasted loads and DG outputs. However, the dispatch could not accommodate fluctuating loads and DG outputs, and the simulated voltage magnitude varied between the blue “×” and the black circle in Figure 7. The slow control in the RVO considered all possibilities in the uncertainty set, and taken account each possible loads and active output of DGs. Therefore, the fast control enhanced optimality and feasibility. As a result, no voltage violation was observed in RVO simulations, which were prepared for the worst-case scenario, as shown in Figure 8. (a) (b) (c) Figure 9 Simulated voltage magnitude of DVO in the IEEE 123-bus system for (a) phase A; (b) phase B; and (c) phase C. (a) (b) Figure 10 (c) Simulated voltage magnitude of RVO in the IEEE 123-bus system for (a) phase A; (b) phase B; and (c) phase C. In Figure 9, we see that the results for the IEEE 123-bus system were similar to those for the 69-bus system, except that voltage violation was more severe in this system with more DGs. Voltage violation was again eliminated by the RVO, as shown in Figure 10. TABLE IV System 69-bus 123-bus COMPARISON OF OVERALL PERFORMANCE BETWEEN DVO AND RVO DVO RVO E[Ploss] (kW) Failure Rate E[Ploss] (kW) Failure Rate 81.9 44% 92.2 0 212.0 68% 213.0 0 DVO, convex deterministic Volt-VAR Optimization model; RVO, Two-Stage Robust Volt-VAR Optimization Model The overall performance, including the expectation of the network loss and failure rate (i.e. the possibility of voltage violation), is summarized in Table IV . Note that there are a number of infeasible cases in the DVO simulations. To enable direct comparisons, only expected losses for feasible cases are considered in DVO. This means that the infeasible cases have been removed prior to calculating the expected losses for DVO. RVO can prevent voltage violation in uncertain conditions with a reasonable extra cost of optimality in comparison to DVO. The uncertainty set (74) can be adjusted by changing the volatility  of demand and DG output variation. Table V shows the sensitivity of the minimum worst-case power losses of the RVO with respect to the different volatility of the uncertainty set in the IEEE 123-bus system. It is observed that the worst-case power losses increases as the size of the uncertainty set gets larger. The result is intuitive. A larger uncertainty set will make things worse and incur a higher power loss. The iterations required to converge are 2~3 steps, which shows that RVO is numerically stable. TABLE V COMPARISON OF RVO WITH DIFFERENT VOLATILITY OF THE UNCERTAINTY SETS IN IEEE 123-BUS SYSTEM Volatility  0.02 0.04 0.06 0.08 0.1 E[Ploss] (kW) 208.9 210.1 211.2 212.0 213.0 Iteration 2 2 2 3 3 C. Comparison of handling uncertainties in multi-time period The DVO and RVO were tested in multi-time period scenarios using the IEEE 123-bus System. Here, the DGs were assumed to be PV generators and their outputs were simulated using Hybrid optimization model for renewable energy (HOMER) software [20]. The standardized curves for the load and DG output is shown in Figure 11. The 100% load level is the base load available in the test archive in [17], while the 100% PV output is the maximal capacity. Figure 11 The standardized curves of the load and DG output In the simulations, the DVO and RVO were compared using the load level and PV output level between 6:00 and 14:00. DVO made here-and-now decision for VRs, MSCs and optimal reactive power flow for current loads and DG outputs. When performing each slow control, an uncertainty set was constructed based on the extreme values of the injected active power over the whole test period. For each load and PV output, both algorithms adopted the fast controls. In both algorithms, the slow control interval was 2 hours and fast control interval was 15 minutes. TABLE VI CONTROL STRATEGIES FOR SLOW DEVICES GENERATED BY RVO AND DVO IN IEEE 123-BUS SYSTEM (1: SWITCH ON, 0: SWITCH OFF) Strategy Devices MSC4 MSC12 MSC19 MSC55 DVO MSC93 MSC68 MSC43 MSC5 MSC119 VR58 MSC4 MSC12 MSC19 MSC55 RVO MSC93 MSC68 MSC43 MSC5 MSC119 VR58 6:00 Dispatch schedule 1 1 1 0 0 0 1 1 0 8:00 10:00 12:00 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 1 0 0 1.01 1.01 1.03 1.03 1 1 0 1 0 1 0 0 0 0 0 0 0.96 1 1 0 0 0 1 0 0 1.03 0 0 0 0 0 1 0 0 1.04 0 1 0 0 0 1 0 0 1.00 A major reason for overvoltage is reverse power flow [21]. This problem is likely to occur in DVO when the growth of the PV outputs exceeds the growth of loads. This was especially the case in the period from 6:00 to 10:00 and from 11:00 to 12:00 in Figure 11. Table VI summarized the dispatch results for slow control using the DVO and RVO strategies for the IEEE 123bus system. Figure 12 depicts the number of overvoltage buses in the 123-bus system. Even with sequential fast controls, some buses operating beyond the upper voltage limits in the cases of DVO. However, in the cases of RVO, no voltage violations were observed for the entire time period investigated (6:00-14:00). Figure 12 The evolution of overvoltage buses in the IEEE 123-bus system. V. CONCLUSION We described a dual time-scale coordinated robust reactive power and voltage optimization model. This model can handle the uncertainties in predicted load and distributed generation. The nonconvex optimization problem is first convexified using second-order conic relaxation for branch flow, piecewise linearization for VRs and an equivalent transformation for MSCs. Then a C&CG algorithm was used to solve the convexified robust model. The simulation results show that the solution of the deterministic model is not always feasible and voltage violations may occur. The robust model can ensure security with regard to all possible scenarios limited by the uncertainty sets with little compromise in terms of losses. Due to the MADPT constraints, the dispatch of the slow controlling devices should be formulated as a dynamic optimization problem. To be applicable, this problem is always simplified into a sequence of independent static optimization problems. This means that we need to schedule the operating times of the slow controlling devices in advance. Future research should address the question of exactly how to schedule these operating time. Development and implementation of a software that can be directly deployed in the operation center is also an important future work. VI. ACKNOWLEDGMENTS This work was supported in part by the National Key Basic Research Program of China (Grant. 2013CB228205), in part by the National Science Foundation of China (Grant. 51477083) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] REFERENCES L. Franchi, M. Innorta, P. Marannino, and C. Sabelli, "Evaluation of economy and/or security oriented objective functions for reactive power scheduling in large scale systems," Power Apparatus and Systems, IEEE Transactions on, vol. PAS-102, no. 10, pp. 3481-3488, 1983. C. D'Adamo, S. Jupe, and C. Abbey, "Global survey on planning and operation of active distribution networks - Update of CIGRE C6.11 working group activities," in Electricity Distribution - Part 1, 2009. CIRED 2009. 20th International Conference and Exhibition on, 2009, pp. 1-4. P. M. De Oliveira-De Jesus, E. D. Castronuovo, and M. T. Ponce de Leao, "Reactive power response of wind generators under an incremental networkloss allocation approach," Energy Conversion, IEEE Transactions on, vol. 23, no. 2, pp. 612-621, 2008. H. Ahmadi, J. R. Marti, and H. W. Dommel, "A framework for Volt-Var optimization in distribution systems," Smart Grid, IEEE Transactions on, vol. 6, no. 3, pp. 1473-1483, 2015. B. Zhang, A. Y. S. Lam, A. D. Dominguez-Garcia, and D. Tse, "An optimal and distributed method for voltage regulation in power distribution systems," Power Systems, IEEE Transactions on, vol. 30, no. 4, pp. 1714-1726, 2015. W. Zheng, W. Wu, B. Zhang, H. Sun, and Y. Liu, "A fully distributed reactive power optimization and control method for active distribution networks," Smart Grid, IEEE Transactions on, vol. PP, no. 99, pp. 1-1, 2015. A. T. Saric, Stankovic, x, and A. M., "A robust algorithm for Volt/Var control," in Power Systems Conference and Exposition, 2009. PSCE '09. IEEE/PES, 2009, pp. 1-8. Y. Wang, W. Wu, B. Zhang, Z. Li, and W. Zheng, "Robust voltage control model for active distribution network considering PVs and loads uncertainties," in Power & Energy Society General Meeting, 2015 IEEE, 2015, pp. 1-5. N. Daratha, B. Das, and J. Sharma, "Robust voltage regulation in unbalanced radial distribution system under uncertainty of distributed generation and loads," International Journal of Electrical Power & Energy Systems, vol. 73, pp. 516-527, 12// 2015. W. Wu, B. Zhang, and K. L. Lo, "Capacitors dispatch for quasi minimum energy loss in distribution systems using a loop-analysis based method," International Journal of Electrical Power & Energy Systems, vol. 32, no. 6, pp. 543-550, 2010. Z. Li, W. Wu, B. Zhang, and B.Wang, "Adjustable robust real-time power dispatch with large-scale wind power integration," Sustainable Energy, IEEE Transactions on, vol. 6, no. 2, pp. 357-368, 2015. M. Farivar and S. H. Low, "Branch flow model: relaxations and convexification (Part I)," Power Systems, IEEE Transactions on, vol. 28, no. 3, pp. 2554-2564, 2013. M. E. Baran and F. F. Wu, "Network reconfiguration in distribution systems for loss reduction and load balancing," Power Delivery, IEEE Transactions on, vol. 4, no. 2, pp. 1401-1407, 1989. B. Liu, F. Liu, S. Mei, and Y. Chen, "Optimal reactive power flow with exact linearized transformer model in distribution power networks," in Control and Decision Conference (CCDC), 2015 27th Chinese, 2015, pp. 5562-5567. B. Zeng and L. Zhao, "Solving two-stage robust optimization problems using a column-and-constraint generation method," Operations Research Letters, vol. 41, no. 5, pp. 457-461, 9// 2013. Distribution system in Shandong province, China [Online].https://drive.google.com/file/d/0BzVXltCTbTuyZU1aY0MzVUZGTGc/view?usp=sharing Distribution Test Feeders [Online]. Available: http://ewh.ieee.org/soc/pes/dsacom/testfeeders/ T. Esram and P. L. Chapman, "Comparison of photovoltaic array maximum power point tracking techniques," Energy Conversion, IEEE Transactions on, vol. 22, no. 2, pp. 439-449, 2007. Cplex [Online]. Available: http://www-01.ibm.com/software/integration/optimization/cplexoptimizer/ [20] HOMER [Online]. Available: www.nrel.gov/docs/fy04osti/35406.pdf [21] Y. Wang, P. Zhang, W. Li, W. Xiao, and A. Abdollahi, "Online overvoltage prevention control of photovoltaic generators in microgrids," Smart Grid, IEEE Transactions on, vol. 3, no. 4, pp. 2071-2078, 2012.
3cs.SY
arXiv:1603.09144v1 [math.ST] 30 Mar 2016 The Annals of Statistics 2016, Vol. 44, No. 2, 564–597 DOI: 10.1214/15-AOS1377 c Institute of Mathematical Statistics, 2016 OPTIMAL SHRINKAGE ESTIMATION OF MEAN PARAMETERS IN FAMILY OF DISTRIBUTIONS WITH QUADRATIC VARIANCE By Xianchao Xie, S. C. Kou1 and Lawrence Brown2 Two Sigma Investments LLC, Harvard University and University of Pennsylvania This paper discusses the simultaneous inference of mean parameters in a family of distributions with quadratic variance function. We first introduce a class of semiparametric/parametric shrinkage estimators and establish their asymptotic optimality properties. Two specific cases, the location-scale family and the natural exponential family with quadratic variance function, are then studied in detail. We conduct a comprehensive simulation study to compare the performance of the proposed methods with existing shrinkage estimators. We also apply the method to real data and obtain encouraging results. 1. Introduction. The simultaneous inference of several mean parameters has interested statisticians since the 1950s and has been widely applied in many scientific and engineering problems ever since. Stein (1956) and James and Stein (1961) discussed the homoscedastic (equal variance) normal model and proved that shrinkage estimators can have uniformly smaller risk compared to the ordinary maximum likelihood estimate. This seminal work inspired a broad interest in the study of shrinkage estimators in hierarchical normal models. Efron and Morris (1972, 1973) studied the James–Stein estimators in an empirical Bayes framework and proposed several competing shrinkage estimators. Berger and Strawderman (1996) discussed this problem from a hierarchical Bayesian perspective. For applications of shrinkage techniques in practice, see Efron and Morris (1975), Rubin (1981), Morris (1983), Green and Strawderman (1985), Jones (1991) and Brown (2008). Received February 2015; revised August 2015. Supported in part by grants from NIH and NSF. 2 Supported in part by grants from NSF. AMS 2000 subject classifications. 60K35. Key words and phrases. Hierarchical model, shrinkage estimator, unbiased estimate of risk, asymptotic optimality, quadratic variance function, NEF-QVF, location-scale family. 1 This is an electronic reprint of the original article published by the Institute of Mathematical Statistics in The Annals of Statistics, 2016, Vol. 44, No. 2, 564–597. This reprint differs from the original in pagination and typographic detail. 1 2 X. XIE, S. C. KOU AND L. BROWN There has also been substantial discussion on simultaneous inference for non-Gaussian cases. Brown (1966) studied the admissibility of invariance estimators in general location families. Johnstone (1984) discussed inference in the context of Poisson estimation. Clevenson and Zidek (1975) showed that Stein’s effect also exists in the Poisson case, while a more general treatment of discrete exponential families is given in Hwang (1982). The application of non-Gaussian hierarchical models has also flourished. Mosteller and Wallace (1964) used a hierarchical Bayesian model based on the negative-binomial distribution to study the authorship of the Federalist Papers. Berry and Christensen (1979) analyzed the binomial data using a mixture of dirichlet processes. Gelman and Hill (2007) gave a comprehensive discussion of data analysis using hierarchical models. Recently, nonparametric empirical Bayes methods have been proposed by Brown and Greenshtein (2009), Jiang and Zhang (2009, 2010) and Koenker and Mizera (2014). In this article, we focus on the simultaneous inference of the mean parameters for families of distributions with quadratic variance function. These distributions include many common ones, such as the normal, Poisson, binomial, negative-binomial and gamma distributions; they also include locationscale families, such as the t, logistic, uniform, Laplace, Pareto and extreme value distributions. We ask the question: among all the estimators that estimate the mean parameters by shrinking the within-group sample mean toward a central location, is there an optimal one, subject to the intuitive constraint that more shrinkage is applied to observations with larger variances (or smaller sample sizes)? We propose a class of semiparametric/parametric shrinkage estimators and show that there is indeed an asymptotically optimal shrinkage estimator; this estimator is explicitly obtained by minimizing an unbiased estimate of the risk. We note that similar types of estimators are found in Xie, Kou and Brown (2012) in the context of the heteroscedastic (unequal variance) hierarchical normal model. The treatment in this article, however, is far more general, as it covers a much wider range of distributions. We illustrate the performance of our shrinkage estimators by a comprehensive simulation study on both exponential and location-scale families. We apply our shrinkage estimators on the baseball data obtained by Brown (2008), observing quite encouraging results. The remainder of the article is organized as follows: In Section 2, we introduce the general class of semiparametric URE shrinkage estimators, identify the asymptotically optimal one and discuss its properties. We then study the special case of location-scale families in Section 3 and the case of natural exponential families with quadratic variance (NEF-QVF) in Section 4. A systematic simulation study is conducted in Section 5, along with the application of the proposed methods to the baseball data set in Section 6. We give a brief discussion in Section 7 and the technical proofs are placed in the Appendix. OPTIMAL SHRINKAGE ESTIMATION 3 2. Semiparametric estimation of mean parameters of distributions with quadratic variance function. Consider simultaneously estimating the mean parameters of p independent observations Yi , i = 1, . . . , p. Assume that the observation Yi comes from a distribution with quadratic variance function, that is, E(Yi ) = θi ∈ Θ and Var(Yi ) = V (θi )/τi such that V (θi ) = ν0 + ν1 θi + ν2 θi2 with νk (k = 0, 1, 2) being known constants. The set Θ of allowable parameters is a subset of {θ : V (θ) ≥ 0}. τi is assumed to be known here and can be interpreted as the within-group sample size (i.e., when Yi is the sample average of the ith group) or as the (square root) inverse-scale of Yi . It is worth emphasizing that distributions with quadratic variance function include many common ones, such as the normal, Poisson, binomial, negativebinomial and gamma distributions as well as location-scale families. We introduce the general theory on distributions with quadratic variance function in this section and will specifically treat the cases of location-scale family and exponential family in the next two sections. In a simultaneous inference problem, hierarchical models are often used to achieve partial pooling of information among different groups. For example, ind. in the famous normal-normal hierarchical model Yi ∼ N (θi , 1/τi ), one often i.i.d. puts a conjugate prior distribution θi ∼ N (µ, λ) and uses the posterior mean (2.1) E(θi |Y; µ, λ) = 1/λ τi · Yi + ·µ τi + 1/λ τi + 1/λ to estimate θi . Similarly, if Yi represents the within-group average of Poisind. son observations τi Yi ∼ Poisson(τi θi ), then with a conjugate gamma prior i.i.d. distribution θi ∼ Γ(α, λ), the posterior mean (2.2) E(θi |Y; α, λ) = τi 1/λ · Yi + · αλ τi + 1/λ τi + 1/λ is often used to estimate θi . The hyper-parameters, (µ, λ) or (α, λ) above, are usually first estimated from the marginal distribution of Yi and then plugged into the above formulae to form an empirical Bayes estimate. One potential drawback of the formal parametric empirical Bayes approaches lies in its explicit parametric assumption on the prior distribution. It can lead to undesirable results if the explicit parametric assumption is violated in real applications—we will see a real-data example in Section 6. Aiming to provide more flexible and, at the same time, efficient simultaneous estimation procedures, we consider in this section a class of semiparametric shrinkage estimators. 4 X. XIE, S. C. KOU AND L. BROWN To motivate these estimators, let us go back to the normal and Poisson examples (2.1) and (2.2). It is seen that the Bayes estimate of each mean parameter θi is the weighted average of Yi and the prior mean µ (or αλ). In other words, θi is estimated by shrinking Yi toward a central location (µ or αλ). It is also noteworthy that the amount of shrinkage is governed by τi , the sample size: the larger the sample size, the less is the shrinkage toward the central location. This feature makes intuitive sense. We will see in Section 4.2 that in fact these observations hold not only for normal and Poisson distributions, but also for general natural exponential families. With these observations in mind, we consider in this section shrinkage estimators of the following form: (2.3) with bi ∈ [0, 1] satisfying θ̂ b,µ = (1 − bi ) · Yi + bi · µ i (2.4) Requirement (MON) : bi ≤ bj for any i and j such that τi ≥ τj . Requirement (MON) asks the estimator to shrink the group mean with a larger sample size (or smaller variance) less toward the central location µ. Other than this intuitive requirement, we do not put on any restriction on bi . Therefore, this class of estimators is semiparametic in nature. The question we want to investigate is, for such a general estimator θ̂ b,µ , whether there exists an optimal choice of b and µ. Note that the two parametric estimates (2.1) and (2.2) are special cases of the general class with bi = τi 1/λ +1/λ . We will see shortly that such an optimal choice indeed exists asymptotically (i.e., as p → ∞) and this asymptotically optimal choice is specified by an unbiased risk estimate (URE). For a general estimator θ̂ b,µ with fixed b and µ, under the sum of squarederror loss p 1 X b,µ b,µ lp (θ, θ̂ ) = (θ̂i − θi )2 , p i=1 an unbiased estimate of its risk Rp (θ, θ̂ b,µ ) = E[lp (θ, θ̂b,µ )] is given by  p  1X 2 V (Yi ) 2 URE(b, µ) = bi · (Yi − µ) + (1 − 2bi ) · , p τ i + ν2 i=1 because p E[URE(b, µ)] = 1X 2 {bi [Var(Yi ) + (θi − µ)2 ] + (1 − 2bi ) Var(Yi )} p i=1 p = 1X [(1 − bi )2 Var(Yi ) + b2i (θi − µ)2 ] = Rp (θ, θ̂b,µ ). p i=1 5 OPTIMAL SHRINKAGE ESTIMATION Note that the idea and results below can be easily extended to the case of weighted quadratic loss, with the only difference being that the regularity conditions will then involve the corresponding weight sequence. Ideally the “best” choice of b and µ is the one that minimizes Rp (θ, θ̂ b,µ ), which is, however, unobtainable as the risk depends on the unknown θ. To bypass this impracticability, we minimize URE, the unbiased estimate, with respect to (b, µ) instead. This gives our semiparametric URE shrinkage estimator: = (1 − b̂i ) · Yi + b̂i · µ̂SM , θ̂SM i (2.5) where (b̂SM , µ̂SM ) = minimizer of URE(b, µ) h i subject to bi ∈ [0, 1], µ ∈ − max |Yi |, max |Yi | ∩ Θ i i and Requirement (MON). We require |µ| ≤ maxi |Yi |, since no sensible estimators shrink the observations to a location completely outside the range of the data. Intuitively, the URE shrinkage estimator would behave well if URE(b, µ) is close to the risk Rp (θ, θ̂ b,µ ). To investigate the properties of the semiparametric URE shrinkage estimator, we now introduce the following regularity conditions: P (A) lim supp→∞ p1 pi=1 Var(Yi ) < ∞; P (B) lim supp→∞ 1p pi=1 Var(Yi ) · θi2 < ∞; P (C) lim supp→∞ 1p pi=1 Var(Yi2 ) < ∞; τi 1 )2 < ∞, supi ( τi ν+ν )2 < ∞; (D) supi ( τi +ν 2 2 1 E(max1≤i≤p Yi2 ) < ∞ for some ε > 0. (E) lim supp→∞ p1−ε The theorem below shows that URE(b, µ) not only unbiasedly estimates the risk, but also serves as a good approximation of the actual loss lp (θ, θ̂ b,µ ), which is a much stronger property. In fact, URE(b, µ) is asymptotically uniformly close to the actual loss. Therefore, we expect that minimizing URE(b, µ) would lead to an estimate with competitive risk properties. Theorem 2.1. Assuming regularity conditions (A)–(E), we have sup|URE(b, µ) − lp (θ, θ̂ b,µ )| → 0 in L1 and in probability, as p → ∞, where the supremum is taken over bi ∈ [0, 1], |µ| ≤ maxi |Yi | and Requirement (MON). 6 X. XIE, S. C. KOU AND L. BROWN The following result compares the asymptotic behavior of our URE shrinkage estimator (2.5) with other shrinkage estimators from the general class. It establishes the asymptotic optimality of our URE shrinkage estimator. Theorem 2.2. Assume regularity conditions (A)–(E). Then for any shrinkage estimator θ̂ b̂,µ̂ = (1 − b̂) · Y + b̂ · µ̂, where b̂ ∈ [0, 1] satisfies Requirement (MON), and |µ̂| ≤ maxi |Yi |, we always have lim P (lp (θ, θ̂SM ) ≥ lp (θ, θ̂ b̂,µ̂ ) + ε) = 0 p→∞ for any ε > 0 and lim sup[R(θ, θ̂ SM ) − R(θ, θ̂ b̂,µ̂ )] ≤ 0. p→∞ As a special case of Theorem 2.2, the semiparametric URE shrinkage estimator asymptotically dominates the parametric empirical Bayes estimators, like (2.1) or (2.2). It is worth noting that the asymptotic optimality of our semiparametric URE shrinkage estimators does not assume any prior distribution on the mean parameters θi , nor does it assume any parametric form on the distribution of Y (other than the quadratic variance function). Therefore, the results enjoy a large extent of robustness. In fact, the individual Yi ’s do not even have to be from the same distribution family as long as the regularity conditions (A)–(E) are met. (However, whether shrinkage estimation in that case is a good idea or not becomes debatable.) 2.1. Shrinking toward the grand mean. In the previous development, the central shrinkage location µ is determined by minimizing URE. The joint minimization of b and µ offers asymptotic optimality in the class of estimators. For small or moderate p (the number of Yi ’s), however, it is not necessarily true that the semiparametric URE shrinkage estimator will always be the optimal one. In this setting, it might be beneficial to set µ by a predetermined rule and only optimize b, as it might reduce the variability of the resulting estimate. In this subsection, we consider shrinking toward the grand mean: p 1X µ̂ = Ȳ = Yi . p i=1 The particular reason P why the grand P average is chosen instead of the weighted average Ȳw = ( pi=1 τi Yi )/( pi=1 τi ) is that the latter might be biased when θi and τi are dependent. In the case where such dependence is not a concern, the idea and results obtained below can be similarly derived. OPTIMAL SHRINKAGE ESTIMATION 7 The corresponding estimator becomes Ȳ θ̂b, = (1 − bi )Yi + bi Ȳ , i (2.6) where bi ∈ [0, 1] satisfies Requirement (MON). To find the asymptotically optimal choice of b, we start from an unbiased estimate of the risk of θ̂b,Ȳ . It is straightforward to verify that for fixed b an unbiased estimate of the risk of θ̂ b,Ȳ is      p  1X 2 V (Yi ) 1 UREG (b) = . bi bi (Yi − Ȳ )2 + 1 − 2 1 − p p τ i + ν2 i=1 Note that we use the superscript “G”, which stands for “grand mean”, to distinguish it from the previous URE(b, µ). Like what we did previously, minimizing the UREG with respect to b then leads to our semiparametric URE grand-mean shrinkage estimator SG SG θ̂SG i = (1 − b̂i ) · Yi + b̂i · Ȳ , (2.7) where b̂SG = minimizer of UREG (b) subject to bi ∈ [0, 1] and Requirement (MON). Again, we expect that the URE estimator θ̂ SG would be competitive if UREG is close to the risk function or the loss function. The next theorem confirms the uniform closeness. Theorem 2.3. Under regularity conditions (A)–(E), we have sup|UREG (b) − lp (θ, θ̂ b,Ȳ )| → 0 in L1 and in probability, as p → ∞, where the supremum is taken over bi ∈ [0, 1] and Requirement (MON). Consequently, θ̂ SG is asymptotically optimal among all shrinkage estimators θ̂ b,Ȳ that shrink toward the grand mean Ȳ , as shown in the next theorem. Theorem 2.4. Assume regularity conditions (A)–(E). Then for any shrinkage estimator θ̂ b̂,Ȳ = (1 − b̂) · Y + b̂ · Ȳ , where b̂ ∈ [0, 1] satisfies Requirement (MON), we have lim P (lp (θ, θ̂ SG ) ≥ lp (θ, θ̂ b̂,Ȳ ) + ε) = 0 p→∞ for any ε > 0 and lim sup[R(θ, θ̂SG ) − R(θ, θ̂b̂,Ȳ )] ≤ 0. p→∞ 8 X. XIE, S. C. KOU AND L. BROWN 3. Simultaneous estimation of mean parameters in location-scale families. In this section, we focus on location-scale families, which are a special case of distributions with quadratic variance functions. We show how the regularity conditions can be simplified in this case. For a location-scale family, we can write √ (3.1) Yi = θi + Zi / τi , where the standard variates Zi are i.i.d. with mean zero and variance ν0 . The constants ν1 and ν2 in the quadratic variance function V (θi ) = ν0 + √ ν1 θi + ν2 θi2 are zero for the location-scale family. 1/ τi is the scale of Yi . The next lemma simplifies the regularity conditions for a location-scale family. Lemma 3.1. For Yi , i = 1, . . . , p, independently from a location-scale family (3.1), the following four conditions imply the regularity conditions (A)–(E) in Section 2: P (i) lim supp→∞ p1 pi=1 1/τi2 < ∞; P (ii) lim supp→∞ 1p pi=1 θi2 /τi < ∞; P (iii) lim supp→∞ 1p pi=1 |θi |2+ε < ∞ for some ε > 0; (iv) the standard variate Z satisfies P (|Z| > t) ≤ Dt−α for constants D > 0, α > 4. Note that (i)–(iv) in Lemma 3.1 covers the common location-scale families, including the t (degree of freedom > 4), normal, uniform, logistic, Laplace, Pareto (α > 4) and extreme value distributions. Lemma 3.1, together with Theorems 2.1 and 2.2, immediately yields the following corollaries: the semiparametric URE shrinkage estimator is asymptotically optimal for location-scale families. Corollary 3.2. For Yi , i = 1, . . . , p, independently from a locationscale family (3.1), under conditions (i)–(iv) in Lemma 3.1, we have sup|URE(b, µ) − lp (θ, θ̂ b,µ )| → 0 in L1 and in probability, as p → ∞, where the supremum is taken over bi ∈ [0, 1], |µ| ≤ maxi |Yi | and Requirement (MON). Corollary 3.3. Let Yi , i = 1, . . . , p, be independent from a locationscale family (3.1). Assume conditions (i)–(iv) in Lemma 3.1. Then for any shrinkage estimator θ̂ b̂,µ̂ = (1 − b̂) · Y + b̂ · µ̂, where b̂ ∈ [0, 1] satisfies Requirement (MON), and |µ̂| ≤ maxi |Yi |, we always have lim P (lp (θ, θ̂SM ) ≥ lp (θ, θ̂ b̂,µ̂ ) + ε) = 0 p→∞ for any ε > 0 OPTIMAL SHRINKAGE ESTIMATION 9 and lim sup[R(θ, θ̂ SM ) − R(θ, θ̂ b̂,µ̂ )] ≤ 0. p→∞ In the case of shrinking toward the grand mean Ȳ , the corresponding semiparametric URE grand-mean shrinkage estimator is also asymptotically optimal. Corollary 3.4. For Yi , i = 1, . . . , p, independently from a locationscale family (3.1), under conditions (i)–(iv) in Lemma 3.1, we have sup|UREG (b) − lp (θ, θ̂ b,Ȳ )| → 0 in L1 and in probability, as p → ∞, where the supremum is taken over bi ∈ [0, 1] and Requirement (MON). Corollary 3.5. Let Yi , i = 1, . . . , p, be independent from a locationscale family (3.1). Assume conditions (i)–(iv) in Lemma 3.1. Then for any shrinkage estimator θ̂ b̂,Ȳ = (1 − b̂) · Y + b̂ · Ȳ , where b̂ ∈ [0, 1] satisfies Requirement (MON), we have lim P (lp (θ, θ̂ SG ) ≥ lp (θ, θ̂ b̂,Ȳ ) + ε) = 0 p→∞ for any ε > 0 and lim sup[R(θ, θ̂SG ) − R(θ, θ̂b̂,Ȳ )] ≤ 0. p→∞ 4. Simultaneous estimation of mean parameters in natural exponential family with quadratic variance function. 4.1. Semiparametric URE shrinkage estimators. In this section, we focus on natural exponential families with quadratic variance functions (NEFQVF), as they incorporate the most common distributions that one encounters in practice. We show how the regularity conditions (A)–(E) can be significantly simplified and offer concrete examples. It is well known that there are in total six distinct distributions that belong to NEF-QVF [Morris (1982)]: the normal, binomial, Poisson, negativebinomial, Gamma and generalized hyperbolic secant (GHS) distributions. We represent in general an NEF-QVF as Yi ∼ NEF-QVF[θi , V (θi )/τi ], where θi = E(Yi ) ∈ Θ is the mean parameter and τi is the convolution parameter (or within-group sample size). For example, in the binomial case Yi ∼ Bin(ni , pi )/ni , θi = pi , V (θi ) = θi (1 − θi ) and τi = ni . 10 X. XIE, S. C. KOU AND L. BROWN Table 1 The conditions for the five nonnormal NEF-QVF distributions to guarantee the regularity conditions (A)–(E) in Section 2 Data (ν0 , ν1 , ν2 ) Note Yi ∼ Bin(ni , pi )/ni (0, 1, −1) τi = ni Distribution Binomial Poisson Yi ∼ Poi(τi θi )/τi (0, 1, 0) Neg-binomial Yi ∼ N Bin(ni , pi )/ni Gamma GHS (0, 1, 1) Conditions ni ≥ 2 for all i = 1, . . . , p (i) inf Pi τi > 0, inf i (τi θi ) > 0 (ii) i θi3 = O(p) τi = ni (i) inf 0 Pi (nippii ) > pi θi = 1−p (ii) i ( 1−p )4 = O(p) i i Yi ∼ Γ(τi α, λi )/τi (0, 0, 1/α) θi = αλi (i) inf Pi τi > 0 (ii) i λ4i = O(p) Yi ∼ GHS(τi α, λi )/τi (α, 0, 1/α) θi = αλi (i) inf Pi τi > 0 (ii) i λ4i = O(p) The next result provides easy-to-check conditions that considerably simplify those in Section 2. As the case of heteroscedastic normal data has been studied in Xie, Kou and Brown (2012), we concentrate on the other five NEF-QVF distributions. Lemma 4.1. For the five non-Gaussian NEF-QVF distributions, Table 1 lists the respective conditions, under which regularity conditions (A)–(E) in Section 2 are satisfied. For example, for the binomial distribution, the condition is τi = ni ≥ 2 for all i. Lemma 4.1 and the general theory in Section 2 yield the following optimality results for our semiparametric URE shrinkage estimator in the case of NEF-QVF. ind. Corollary 4.2. Let Yi ∼ NEF-QVF[θi , V (θi )/τi ], i = 1, . . . , p, be nonGaussian. Under the respective conditions listed in Table 1, we have sup|URE(b, µ) − lp (θ, θ̂ b,µ )| → 0 in L1 and in probability, as p → ∞, where the supremum is taken over bi ∈ [0, 1], |µ| ≤ maxi |Yi | and Requirement (MON). ind. Corollary 4.3. Let Yi ∼ NEF-QVF[θi , V (θi )/τi ], i = 1, . . . , p, be nonGaussian. Assume the respective conditions listed in Table 1. Then for any shrinkage estimator θ̂ b̂,µ̂ = (1 − b̂) · Y + b̂ · µ̂, where b̂ ∈ [0, 1] satisfies Requirement (MON), and |µ̂| ≤ maxi |Yi |, we always have lim P (lp (θ, θ̂SM ) ≥ lp (θ, θ̂ b̂,µ̂ ) + ε) = 0 p→∞ for any ε > 0 OPTIMAL SHRINKAGE ESTIMATION 11 and lim sup[R(θ, θ̂ SM ) − R(θ, θ̂ b̂,µ̂ )] ≤ 0. p→∞ For shrinking toward the grand mean Ȳ , the corresponding semiparametric URE grand mean shrinkage estimator is also asymptotically optimal (within the smaller class). ind. Corollary 4.4. Let Yi ∼ NEF-QVF[θi , V (θi )/τi ], i = 1, . . . , p, be nonGaussian. Under the respective conditions listed in Table 1, we have sup|UREG (b) − lp (θ, θ̂ b,Ȳ )| → 0 in L1 and in probability, as p → ∞, where the supremum is taken over bi ∈ [0, 1] and Requirement (MON). ind. Corollary 4.5. Let Yi ∼ NEF-QVF[θi , V (θi )/τi ], i = 1, . . . , p, be nonGaussian. Assume the respective conditions listed in Table 1. Then for any shrinkage estimator θ̂ b̂,Ȳ = (1 − b̂) · Y + b̂ · Ȳ , where b̂ ∈ [0, 1] satisfies Requirement (MON), we have lim P (lp (θ, θ̂ SG ) ≥ lp (θ, θ̂ b̂,Ȳ ) + ε) = 0 p→∞ for any ε > 0 and lim sup[R(θ, θ̂ p→∞ SG ) − R(θ, θ̂b̂,Ȳ )] ≤ 0. 4.2. Parametric URE shrinkage estimators and conjugate priors. For Yi from an exponential family, hierarchical models based on the conjugate prior distributions are often used; the hyper-parameters in the prior distribution are often estimated from the marginal distribution of Yi in an empirical Bayes way. Two questions arise naturally in this scenario. First, are there other choices to estimate the hyper-parameters? Second, is there an optimal choice? We will show in this subsection that our URE shrinkage idea applies to the parametric conjugate prior case; the resulting parametric URE shrinkage estimators are asymptotically optimal, and thus asymptotically dominate the traditional empirical Bayes estimators. Let Yi ∼ NEF-QVF[θi , V (θi )/τi ], i = 1, . . . , p, be independent. If θi are i.i.d. from the conjugate prior, the Bayesian estimate of θi is then γ τi (4.1) · Yi + · µ, θ̂γ,µ = i τi + γ τi + γ where γ and µ are functions of the hyper-parameters in the prior distribution. Table 2 details the conjugate priors for the five well-known NEF-QVF 12 X. XIE, S. C. KOU AND L. BROWN Table 2 Conjugate priors for the five well-known NEF-QVF distributions Distribution Normal Binomial Conjugate prior Yi ∼ N (θi , 1/τi ) θi ∼ N (µ, λ) Poisson Yi ∼ Poi(τi θi )/τi γ = 1/λ i.i.d. θi ∼ Beta(α, β) γ = α + β, µ = i.i.d. Yi ∼ N Bin(τi , pi )/τi Yi ∼ Γ(τi α, λi )/τi γ and µ i.i.d. Yi ∼ Bin(τi , θi )/τi Neg-binomial Gamma Data i.i.d. θi ∼ Γ(α, λ) pi ∼ Beta(α, β), θi = α α+β γ = 1/λ, µ = αλ pi 1−pi i.i.d. λi ∼ inv-Γ(α0 , β0 ), θi = αλi γ = β − 1, µ = γ= α0 −1 , α µ= α β−1 αβ0 α0 −1 distributions—the normal, binomial, Poisson, negative-binomial and gamma distributions—and the corresponding expressions of γ and µ in terms of the ind. hyper-parameters. For example, in the binomial case, Yi ∼ Bin(τi , θi )/τi i.i.d. and the conjugate prior is θi ∼ Beta(α, β); γ = α + β, µ = α/(α + β). Although it can be shown that for the sixth NEF-QVF distribution—the GHS distribution—taking a conjugate prior also gives (4.1), the conjugate prior distribution does not have a clean expression and is rarely encountered in practice. We thus omit it from Table 2. We now apply our URE idea to formula (4.1) to estimate (γ, µ), in contrast to the conventional empirical Bayes method that determines the hyperparameters through the marginal distribution. For fixed γ and µ, an unbiased estimate for the risk of θ̂ γ,µ is given by  p  1X τi − γ V (Yi ) γ2 P 2 URE (γ, µ) = · (Yi − µ) + · , p (τi + γ)2 τ i + γ τ i + ν2 i=1 where we use the superscript “P ” to stand for “parametric”. Minimizing UREP (γ, µ) leads to our parametric URE shrinkage estimator (4.2) θ̂PM = i γ̂ P M τi · Y + · µ̂PM , i τi + γ̂ PM τi + γ̂ PM where (γ̂ PM , µ̂PM ) = arg min UREP (γ, µ) n o over 0 ≤ γ ≤ ∞, |µ| ≤ max |Yi |, µ ∈ Θ] . i Parallel to Theorems 2.1 and 2.2, the next two results show that the parametric URE shrinkage estimator gives the asymptotically optimal choice of (γ, µ), if one wants to use estimators of the form (4.1). OPTIMAL SHRINKAGE ESTIMATION 13 ind. Theorem 4.6. Let Yi ∼ NEF-QVF[θi , V (θi )/τi ], i = 1, . . . , p, be nonGaussian. Under the respective conditions listed in Table 1, we have sup|UREP (γ, µ) − lp (θ, θ̂γ,µ )| → in L1 and in probability, as p → ∞, where the supremum is taken over {0 ≤ γ ≤ ∞, |µ| ≤ maxi |Yi |, µ ∈ Θ]}. ind. Theorem 4.7. Let Yi ∼ NEF-QVF[θi , V (θi )/τi ], i = 1, . . . , p, be nonGaussian. Assume the respective conditions listed in Table 1. Then for any γ̂ τ estimator θ̂ γ̂,µ̂ = τ +γ̂ Y + τ +γ̂ µ̂, where γ̂ ≥ 0 and |µ̂| ≤ maxi |Yi |, we always have lim P (lp (θ, θ̂PM ) ≥ lp (θ, θ̂ γ̂,µ̂ ) + ε) = 0 p→∞ for any ε > 0 and lim sup[Rp (θ, θ̂ PM ) − Rp (θ, θ̂ γ̂,µ̂ )] ≤ 0. p→∞ In the case of shrinking toward the grand mean Ȳ (when p, the number of Yi ’s, is small or moderate), we have the following parametric results parallel to the semiparametric ones. First, for the grand-mean shrinkage estimator γ τi (4.3) · Yi + · Ȳ , θ̂γ,Ȳ = τi + γ τi + γ with a fixed γ, an unbiased estimate of its risk is      p  1X γ V (Yi ) 1 γ2 2 UREPG (γ) = (Y − Ȳ ) + 1 − 2 1 − . i p (τi + γ)2 p τ i + γ τ i + ν2 i=1 Minimizing it yields our parametric URE grand-mean shrinkage estimator (4.4) θ̂iPG = τi γ̂ PG · Y + · Ȳ , i τi + γ̂ PG τi + γ̂ PG where γ̂ PG = arg min UREPG (γ). 0≤γ≤∞ Similar to Theorems 4.6 and 4.7, the next two results show that in the case of shrinking toward the grand mean under the formula (4.3), the parametric URE grand-mean shrinkage estimator is asymptotically optimal. ind. Theorem 4.8. Let Yi ∼ NEF-QVF[θi , V (θi )/τi ], i = 1, . . . , p, be nonGaussian. Under the respective conditions listed in Table 1, we have sup |UREPG (γ) − lp (θ, θ̂ γ,Ȳ )| → 0≤γ<∞ in L1 and in probability, as p → ∞. 14 X. XIE, S. C. KOU AND L. BROWN ind. Theorem 4.9. Let Yi ∼ NEF-QVF[θi , V (θi )/τi ], i = 1, . . . , p, be nonGaussian. Assume the respective conditions listed in Table 1. Then for any γ̂ τ estimator θ̂ γ̂,Ȳ = τ +γ̂ Y + τ +γ̂ Ȳ , where γ̂ ≥ 0, we have lim P (lp (θ, θ̂ PG ) ≥ lp (θ, θ̂γ̂,Ȳ ) + ε) = 0 p→∞ for any ε > 0 and lim inf [Rp (θ, θ̂PG ) − Rp (θ, θ̂ γ̂,Ȳ )] ≤ 0. p→∞ 5. Simulation study. In this section, we conduct a number of simulations to investigate the performance of the URE estimators and compare their performance to that of other existing shrinkage estimators. For each simulation, we first draw (θi , τi ), i = 1, . . . , p, independently from a distribution and then generate Yi given (θi , τi ). This process is repeated a large number of times (N = 100,000) to obtain an accurate estimate of the risk for each estimator. The sample size p is chosen to vary from 20 to 500 at an interval of length 20. For notational convenience, in this section, we write Ai = 1/τi so that Ai is (essentially) the variance. 5.1. Location-scale family. For the location-scale families, we consider three non-Gaussian cases: the Laplace [where the standard variate Z has density f (z) = 12 exp(−|z|)], logistic [where the standard variate Z has density f (z) = e−z /(1 + e−z )2 ] and Student-t distributions with 7 degrees of freedom. To evaluate the performance of the semiparametric URE estimator θ̂SM , we compare it to the naive estimator θ̂ Naive = Yi i and the extended James–Stein estimator  + (p − 3) JS+ JS+ P (5.1) · Yi , θ̂ i = µ̂ + 1− p JS+ )2 /A i i=1 (Yi − µ̂ P P where Ai = 1/τi and µ̂JS+ = pi=1 (Xi /Ai )/ pi=1 1/Ai . For each of the three distributions we study four different setups to generate (θi , Ai = 1/τi ) for i = 1, . . . , p. We then generate Yi via (3.1) except for scenario (4) below. Scenario (1). (θi , Ai ) are drawn from Ai ∼ Unif(0.1, 1) and θi ∼ N (0, 1) independently. In this scenario, the location and scale are independent of each other. Panels (a) in Figures 1–3 plot the performance of the three estimators. The risk function of the naive estimator θ̂ Naive , being a constant i for all p, is way above the other two. The risk of the semiparametric URE OPTIMAL SHRINKAGE ESTIMATION 15 Fig. 1. Comparison of the risks of different shrinkage estimators for√ the Laplace case. (a) A ∼ Unif(0.1, 1), θ ∼ N√ (0, 1) independently; Y = θ + A · Z. (b) A ∼ Unif(0.1, 1), θ = A; Y = θ + A · Z. (c) A ∼ 21 · 1{A=0.1} + 12 · 1{A=0.5} , √ θ|A = 0.1 ∼ N√ (2, 0.1), θ|A √ = 0.5 ∼ N (0, 0.5); Y = θ + A · Z. (d) A ∼ Unif(0.1, 1), θ = A; Y ∼ Unif[θ − 6A, θ + 6A]. estimator is significantly smaller than that of both the extended James– Stein estimator and the naive estimator, particularly so when the sample size p > 40. Scenario (2). (θi , Ai ) are drawn from Ai ∼ Unif(0.1, 1) and θi = Ai . This scenario tests the case that the location and scale have a strong correlation. Panels (b) in Figures 1–3 show the performance of the three estimators. The risk of the semiparametric URE estimator is significantly smaller than that of both the extended James–Stein estimator and the native estimator. The naive estimator θ̂ Naive , with a constant risk, performs the worst. This i example indicates that the semiparametric URE estimator behaves robustly well even when there is a strong correlation between the location and the scale. This is because the semiparametric URE estimator does not make any assumption on the relationship between θi and τi . Scenario (3). (θi , Ai ) are drawn such that Ai ∼ 21 ·1{Ai =0.1} + 21 ·1{Ai =0.5} — that is, Ai is 0.1 or 0.5 with 50% probability each—and that conditioning on Ai being 0.1 or 0.5, θi |Ai = 0.1 ∼ N (2, 0.1); θi |Ai = 0.5 ∼ N (0, 0.5). This 16 X. XIE, S. C. KOU AND L. BROWN Fig. 2. Comparison of the risks of different shrinkage estimators for √ the logistic case. (a) A ∼ Unif(0.1, 1), θ ∼ √N (0, 1) independently; Y = θ + A · Z. (b) A ∼ Unif(0.1, 1), θ = A; Y = θ + A · Z. (c) A ∼ 21 · 1{A=0.1} + 12 · 1{A=0.5} , √ θ|A = 0.1 ∼ N (2, √ 0.1), θ|A √= 0.5 ∼ N (0, 0.5); Y = θ + A · Z. (d) A ∼ Unif(0.1, 1), θ = A; Y ∼ Unif[θ − π A, θ + π A]. scenario tests the case that there are two underlying groups in the data. Panels (c) in Figures 1–3 compare the performance of the semiparametric URE estimator to that of the native estimator and the extended James– Stein estimator. The semiparametric URE estimator is seen to significantly outperform the other two estimators. Scenario (4). (θi , Ai ) are drawn from Ai ∼ Unif(0.1, 1) and √ θi = Ai . Given √ θi and Ai , Yi are generated from Yi ∼ Unif(θi − 3Ai σ, θ + 3Ai σ), √ where√σ is thepstandard deviation of the standard variate Z, that is, σ = 2, π/ 3 and 7/5 for the Laplace, logistics and t-distribution (df = 7), respectively. This scenario tests the case of model mis-specification and, hence, the robustness of the estimators. Note that Yi is drawn from a uniform distribution, not from the Laplace, logistic or t distribution. Panels (d) in Figures 1–3 show the performance of the three estimators. It is seen that the naive estimator behaves the worst and that the semiparametric URE estimator clearly outperforms the other two. This example indicates the robust performance of the semiparametric URE estimator even when the model is incorrectly OPTIMAL SHRINKAGE ESTIMATION 17 Fig. 3. Comparison of the risks of different shrinkage estimators for the √ t-distribution (df = 7). (a) A ∼ Unif(0.1, 1), θ ∼√N (0, 1) independently; Y = θ + A · Z. (b) A ∼ Unif(0.1, 1), θ = A; Y = θ + A · Z. (c) A ∼ 21 · 1{A=0.1} + 12 · 1{A=0.5} , √ θ|A = 0.1 ∼ Np (2, 0.1), θ|A = p0.5 ∼ N (0, 0.5); Y = θ + A · Z. (d) A ∼ Unif(0.1, 1), θ = A; Y ∼ Unif[θ − 21A/5, θ + 21A/5]. specified. This is because URE estimator essentially only involves the first two moments of Yi ; it does not rely on the specific density function of the distribution. 5.2. Exponential family. We consider exponential family in this subsection, conducting simulation evaluations on the beta-binomial and Poissongamma models. ind. 5.2.1. Beta-binomial hierarchical model. For binomial observations Yi ∼ Bin(τi , θi )/τi , classical hierarchical inference typically assumes the conjugate i.i.d. prior θi ∼ Beta(α, β). The marginal distribution of Yi is used by classical empirical Bayes methods to estimate the hyper-parameters. Plugging the estimate of these hyper-parameters into the posterior mean of θi given Yi yields the empirical Bayes estimate of θi . In this subsection, we consider both the semiparametric URE estimator θ̂ SM [equation (2.5)] and the parametric 18 X. XIE, S. C. KOU AND L. BROWN URE estimator θ̂ PM [equation (4.2)], and compare them with the parametric empirical Bayes maximum likelihood estimator θ̂ ML and the parametric empirical Bayes method-of-moment estimator θ̂MM . The empirical Bayes maximum likelihood estimator θ̂ ML is given by θ̂ML = i τi γ̂ ML · Y + · µ̂ML , i τi + γ̂ ML τi + γ̂ ML where (γ̂ ML , µ̂ML ) maximizes the marginal likelihood of Yi : (γ̂ ML , µ̂ML ) = arg max γ≥0,µ Y Γ(γµ + τi yi )Γ(γ(1 − µ) + (1 − yi )τi )Γ(γ) Γ(γ + τi )Γ(γµ)Γ(γ(1 − µ)) i , where µ = α/(α + β) and γ = α + β as in Table 2. Likewise, the empirical Bayes method-of-moment estimator θ̂ MM is given by γ̂ MM τi · Y + · µ̂MM , i τi + γ̂ MM τi + γ̂ MM θ̂MM = i where p µ̂ MM 1X Yi , = Ȳ = p i=1 γ̂ MM P Ȳ (1 − Ȳ ) · pi=1 (1 − 1/τi ) = Pp . [ i=1 (Yi2 − Ȳ /τi − Ȳ 2 (1 − 1/τi ))]+ There are in total four different simulation setups in which we study the four different estimators. In addition, in each case, we also calculate the oracle risk “estimator” θ̃ OR , defined as (5.2) θ̃ OR = i τi γ̃ OR · Y + · µ̃OR , i τi + γ̃ OR τi + γ̃ OR where (γ̃ OR , µ̃OR ) = arg min Rp (θ, θ̂ γ,µ ) γ≥0,µ  2  p X 1 τi γ = arg min E Yi + µ − θi . γ≥0,µ p τi + γ τi + γ i=1 Clearly, the oracle risk estimator θ̃ OR cannot be used in practice, since it depends on the unknown θ, but it does provide a sensible lower bound of the risk achievable by any shrinkage estimator with the given parametric form. OPTIMAL SHRINKAGE ESTIMATION 19 Example 1. We generate τi ∼ Poisson(3) + 2 and θi ∼ Beta(1, 1) independently, and draw Yi ∼ Bin(τi , θi )/τi . The oracle estimator θ̃ OR is found to have γ̃ OR = 2 and µ̃OR = 0.5. The corresponding risk for the oracle estimator is numerically found to be Rp (θ, θ̃ OR ) ≈ 0.0253. The plot in Figure 4(a) shows the risks of the five shrinkage estimators as the sample size p varies. It is seen that the performance of all four shrinkage estimators approaches that of the parametric oracle estimator, the “best estimator” one can hope to get under the parametric form. Note that the two empirical Bayes estimators converges to the oracle estimator faster than the two URE shrinkage estimators. This is because the hierarchical distribution on τi and θi are exactly the one assumed by the empirical Bayes estimators. In contrast, the URE estimators do not make any assumption on the hierarchical distribution but still achieve rather competitive performance. When the sample size is moderately large, all four estimators well approach the limit given by the parametric oracle estimator. Example 2. We generate τi ∼ Poisson(3) + 2 and θi ∼ 12 Beta(1, 3) + 1 2 Beta(3, 1) independently, and draw Yi ∼ Bin(τi , θi )/τi . In this example, θi no longer comes from a beta distribution, but θi and τi are still independent. The oracle estimator is found to have γ̃ OR ≈ 1.5 and µ̃OR = 0.5. The corresponding risk for the oracle estimator θ̂ τ0 ,θ is Rp (θ, θ̃ OR ) ≈ 0.0248. The plot in Figure 4(b) shows the risks of the five shrinkage estimators as the sample size p varies. Again, as p gets large, the performance of all shrinkage estimators eventually approaches that of the oracle estimator. This observation indicates that the parametric form of the prior on θi is not crucial as long as τi and θi are independent. Example 3. We generate τi ∼ Poisson(3) + 2 and let θi = 1/τi , and then we draw Yi ∼ Bin(τi , θi )/τi . In this case, there is a (negative) correlation between θi and τi . The parametric oracle estimator is found to have γ̃ OR ≈ 23.0898 and µ̃OR ≈ 0.2377 numerically; the corresponding risk is Rp (µ, θ̃ OR ) ≈ 0.0069. The plot in Figure 4(c) shows the risks of the five shrinkage estimators as functions of the sample size p. Unlike the previous examples, the two empirical Bayes estimators no longer converge to the parametric oracle estimator, that is, the limit of their risk (as p → ∞) is strictly above the risk of the parametric oracle estimator. On the other hand, the risk of the parametric URE estimator θ̂ PM still converges to the risk of the parametric oracle estimator. It is interesting to note that the limiting risk of the semiparametric URE estimators θ̂ SM is actually strictly smaller than the risk of the parametric oracle estimator (although the difference between the two is not easy to spot due to the scale of the plot). 20 X. XIE, S. C. KOU AND L. BROWN Example 4. We generate (τi , θi , Yi ) as follows. First, we draw Ii from Bernoulli(1/2), and then generate τi ∼ Ii ·Poisson(10)+ (1− Ii )·Poisson(1)+ 2 and θi ∼ Ii · Beta(1, 3) + (1 − Ii ) · Beta(3, 1). Given (τi , θi ), we draw Yi ∼ Bin(τi , θi )/τi . In this example, there exist two groups in the data (indexed by Ii ). It thus serves to test the different estimators in the presence of grouping. The parametric oracle estimator is found to have γ̃ OR ≈ 0.3108 and µ̃OR ≈ 2.0426; the corresponding risk is Rp (µ, θ̃ OR ) ≈ 0.0201. Figure 4(d) plots the risks of the five shrinkage estimators versus the sample size p. The two empirical Bayes estimators clearly encounter much greater risk than the URE estimators, and the limiting risks of the two empirical Bayes estimators are significantly larger than the risk of the parametric oracle estimator. The risk of the parametric URE estimator θ̂ PM converges to that of the Fig. 4. Comparison of the risks of shrinkage estimators in the Beta–Binomial hierarchical models. (a) τ ∼ Poisson(3) + 2, θ ∼ Beta(1, 1) independently; Y ∼ Bin(τ, θ)/τ . (b) τ ∼ Poisson(3) + 2, θ ∼ 12 · Beta(1, 3) + 21 · Beta(3, 1) independently; Y ∼ Bin(τ, θ)/τ . (c) τ ∼ Poisson(3) + 2, θ = 1/τ , Y ∼ Bin(τ, θ)/τ . (d) I ∼ Bern(1/2), τ ∼ I · Poisson(10) + (1 − I) · Poisson(1) + 2, θ ∼ I · Beta(1, 3) + (1 − I) · Beta(3, 1); Y ∼ Bin(τ, θ)/τ . OPTIMAL SHRINKAGE ESTIMATION 21 parametric oracle estimator. It is quite noteworthy that the semiparametric URE estimator θ̂ SM achieves a significant improvement over the parametric oracle one. 5.2.2. Poisson–Gamma hierarchical model. For Poisson observations ind. i.i.d. Yi ∼ Poisson(τi θi )/τi , the conjugate prior is θi ∼ Γ(α, λ). Like in the previous subsection, we compare five estimators: the empirical Bayes maximum likelihood estimator, the empirical Bayes method-of-moment estimator, the parametric and semiparametric URE estimators and the parametric oracle “estimator” (5.2). The empirical Bayes maximum likelihood estimator θ̂ ML is given by θ̂ML = i γ̂ ML τi · Y + · µ̂ML , i τi + γ̂ ML τi + γ̂ ML where (γ̂ ML , µ̂ML ) maximizes the marginal likelihood of Yi : Y γ γµ Γ(γµ + τi yi ) , (γ̂ ML , µ̂ML ) = arg max γ≥0,µ (τi + γ)τi yi +γµ Γ(γµ) i where µ = αλ and γ = 1/λ as in Table 2. The empirical Bayes method-ofmoment estimator θ̂ MM is given by θ̂MM = i γ̂ MM τi · Y + · µ̂MM , i τi + γ̂ MM τi + γ̂ MM where p µ̂ MM 1X = Ȳ = Yi , p i=1 p · Ȳ γ̂ MM = Pp . 2 [ i=1 (Yi − Ȳ /τi − Ȳ 2 )]+ We consider four different simulation settings. Example 5. We generate τi ∼ Poisson(3) + 2 and θi ∼ Γ(1, 1) independently, and draw Yi ∼ Poisson(τi θi )/τi . The plot in Figure 5(a) shows the risks of the five shrinkage estimators as the sample size p varies. Clearly, the performance of all shrinkage estimators approaches that of the parametric oracle estimator. As in the beta-binomial case, the two empirical Bayes estimators converge to the oracle estimator faster than the two URE shrinkage estimators. Again, this is because the hierarchical distribution on τi and θi are exactly the one assumed by the empirical Bayes estimators. The URE estimators, without making any assumption on the hierarchical distribution, still achieve rather competitive performance. 22 X. XIE, S. C. KOU AND L. BROWN Example 6. We generate τi ∼ Poisson(3) + 2 and θi ∼ Unif(0.1, 1) independently, and draw Yi ∼ Poisson(τi θi )/τi . In this setting, θi no longer comes from a gamma distribution, but θi and τi are still independent. The plot in Figure 5(b) shows the risks of the five shrinkage estimators as the sample size p varies. As p gets large, the performance of all shrinkage estimators eventually approaches that of the oracle estimator. Like in the beta-binomial case, the picture indicates that the parametric form of the prior on θi is not crucial as long as τi and θi are independent. Example 7. We generate τi ∼ Poisson(3) + 2 and let θi = 1/τi , and then we draw Yi ∼ Poisson(τi θi )/τi . In this setting, there is a (negative) correlation between θi and τi . The plot in Figure 5(c) shows the risks of the five shrinkage estimators as functions of the sample size p. Unlike the previous two examples, the two empirical Bayes estimators no longer converge to the parametric oracle estimator—the limit of their risk is strictly above the risk of the parametric oracle estimator. The risk of the parametric URE estimator θ̂ PM , on the other hand, still converges to the risk of the parametric oracle estimator. The limiting risk of the semiparametric URE estimators θ̂ SM is actually strictly smaller than the risk of the parametric oracle estimator (although it is not easy to spot it on the plot). Example 8. We generate (τi , θi ) by first drawing Ii ∼ Bernoulli(1/2) and then τi ∼ Ii · Poisson(10) + (1 − Ii ) · Poisson(1) + 2 and θi ∼ Ii · Γ(1, 1) + (1 − Ii ) · Γ(5, 1). With (τi , θi ) obtained, we draw Yi ∼ Poisson(τi θi )/τi . This setting tests the case that there is grouping in the data. Figure 5(d) plots the risks of the five shrinkage estimators versus the sample size p. It is seen that the two empirical Bayes estimators have the largest risk, and that the parametric URE estimator θ̂ PM achieves the risk of the parametric oracle estimator in the limit. The semiparametric URE estimator θ̂ SM notably outperforms the parametric oracle estimator, when p > 100. 6. Application to the prediction of batting average. In this section, we apply the URE shrinkage estimators to a baseball data set, collected and discussed in Brown (2008). This data set consists of the batting records for all the Major League Baseball players in the season of 2005. Following Brown (2008), the data are divided into two half seasons; the goal is to use the data from the first half season to predict the players’ batting average in the second half season. The prediction can then be compared against the actual record of the second half season. The performance of different estimators can thus be directly evaluated. OPTIMAL SHRINKAGE ESTIMATION 23 Fig. 5. Comparison of the risks of shrinkage estimators in Poisson–Gamma hierarchical model. (a) τ ∼ Poisson(3) + 2, θ ∼ Γ(1, 1) independently; Y ∼ Poisson(τ θ)/τ . (b) τ ∼ Poisson(3) + 2, θ ∼ Unif(0.1, 1) independently; Y ∼ Poisson(τ θ)/τ . (c) τ ∼ Poisson(3) + 2, θ = 1/τ , Y ∼ Poisson(τ θ)/τ . (d) I ∼ Bern(1/2), τ ∼ I · Poisson(10) + (1 − I) · Poisson(1) + 2, θ ∼ I · Gamma(1, 1) + (1 − I) · Gamma(5, 1); Y ∼ Poisson(τ θ)/τ . For each player, let the number of at-bats be N and the successful number of batting be H; we then have Hij ∼ Binomial(Nij , pj ), where i = 1, 2 is the season indicator, j = 1, 2, . . . , is the player indicator, and pj corresponds to the player’s hitting ability. Let Yij be the observed proportion: Yij = Hij /Nij . For this binomial setup, we apply our method to obtain the semiparametric URE estimators p̂SM and p̂SG , defined in (2.5) and (2.7), respectively, and the parametric URE estimators p̂PM and p̂PG , defined in (4.2) and (4.4), respectively. 24 X. XIE, S. C. KOU AND L. BROWN To compare the prediction accuracy of different estimators, we note that most shrinkage estimators in the literature assume normality of the underlying data. Therefore, for sensible evaluation of different methods, we can apply the following variance-stablizing transformation as discussed in Brown (2008): s Hij + 1/4 Xij = arcsin , Nij + 1/2 which gives  1 , Xij ∼N ˙ θj , 4Nij  √ θj = arcsin( pj ). To evaluate an estimator θ̂ based on the transformed Xij , we measure the total sum of squared prediction errors (TSE) as X X 1 . TSE(θ̂) = (X2j − θ̂j )2 − 4N2j j j To conform to the above transformation (as used by most shrinkage estip mators), we calculate θ̂j = arcsin( p̂j ), where p̂j is a URE estimator of the binomial probability, so that the TSE of the URE estimators can be calculated and compared with other (normality based) shrinkage estimators. Table 3 below summarizes the numerical results of our URE estimators with a collection of competing shrinkage estimators. The values reported are the ratios of the error of a given estimator to that of the benchmark naive estimator, which simply uses the first half season X1j to predict the second half X2j . All shrinkage estimators are applied three times—to all the baseball players, the pitchers only, and the nonpitchers only. The first group of shrinkage estimators in Table 3 are the classical ones based on normal theory: two empirical Bayes methods (applied to X1j ), the grand mean and the extended James–Stein estimator (5.1). The second group includes a number of more recently developed methods: the nonparametric shrinkage methods in Brown and Greenshtein (2009), the binomial mixture model in Muralidharan (2010) and the weighted least squares and general maximum likelihood estimators (with or without the covariate of at-bats effect) in Jiang and Zhang (2009, 2010). The numerical results for these methods are from Brown (2008), Muralidharan (2010) and Jiang and Zhang (2009, 2010). The last group corresponds to the results from our binomial URE methods: the first two are the parametric methods and the last two are the semiparametric ones. It is seen that our URE shrinkage estimators, especially the semiparametric ones, achieve very competitive prediction result among all the estimators. 25 OPTIMAL SHRINKAGE ESTIMATION Table 3 Prediction errors of batting averages for the baseball data ALL Naive Pitchers Non-Pitchers 1 1 1 Grand mean X̄1· Parametric EB-MM Parametric EB-ML Extended James–Stein 0.852 0.593 0.902 0.525 0.127 0.129 0.117 0.164 0.378 0.387 0.398 0.359 Nonparametric EB Binomial mixture Weighted least square (Null) Weighted generalized MLE (Null) Weighted least square (AB) Weighted generalized MLE (AB) 0.508 0.588 1.074 0.306 0.537 0.301 0.212 0.156 0.127 0.173 0.087 0.141 0.372 0.314 0.468 0.326 0.290 0.261 Parametric URE θ̂ PG Parametric URE θ̂ PM Semiparametric URE θ̂ SG Semiparametric URE θ̂ SM 0.515 0.421 0.414 0.422 0.105 0.105 0.045 0.041 0.278 0.276 0.259 0.273 We think the primary reason is that the baseball data contain unique features that violate the underlying assumptions of the classical empirical Bayes methods. Both the normal prior assumption and the implicit assumption of the uncorrelatedness between the binomial probability p and the sample size τ are not justified here. To illustrate the last point, we present a scatter plot of log10 (number of at bats) versus the observed batting average y for the nonpitcher group in Figure 6. 7. Summary. In this paper, we develop a general theory of URE shrinkage estimation in family of distributions with quadratic variance function. We first discuss a class of semiparametric URE estimator and establish their optimality property. Two specific cases are then carefully studied: the location-scale family and the natural exponential families with quadratic variance function. In the latter case, we also study a class of parametric URE estimators, whose forms are derived from the classical conjugate hierarchical model. We show that each URE shrinkage estimator is asymptotically optimal in its own class and their asymptotic optimality do not depend on the specific distribution assumptions, and more importantly, do not depend on the implicit assumption that the group mean θ and the sample size τ are uncorrelated, which underlies many classical shrinkage estimators. The URE estimators are evaluated in comprehensive simulation studies and one real data set. It is found that the URE estimators offer numerically superior performance compared to the classical empirical Bayes and many other com- 26 X. XIE, S. C. KOU AND L. BROWN Fig. 6. Scatter plot of log 10 (number of at bats) versus observed batting average peting shrinkage estimators. The semiparametric URE estimators appear to be particularly competitive. It is worth emphasizing that the optimality properties of the URE estimators is not in contradiction with well established results on the nonexistence of Stein’s paradox in simultaneous inference problems with finite sample space [Gutmann (1982)], since the results we obtained here are asymptotic ones when p approaches infinity. A question that naturally arises here is then how large p needs to be for the URE estimators to become superior compared with their competitors. Even though we did not develop a formal finite-sample theory for such comparison, our comprehensive simulation indicates that p usually does not need to be large—p can be as small as 100—for the URE estimators to achieve competitive performance. The theory here extends the one on the normal hierarchical models in Xie, Kou and Brown (2012). There are three critical features that make the generalization of previous results possible here: (i) the use of quadratic risk; (ii) the linear form of the shrinkage estimator and (iii) the quadratic variance function of the distribution. The three features together guarantee the existence of an unbiased risk estimate. For the hierarchical models where an unbiased risk estimate does not exist, similar idea can still be applied to some estimate of risk, for example, the bootstrap estimate [Efron (2004)]. However, a theory is in demand to justify the performance of the resulting shrinkage estimators. It would also be an important area of research to study confidence intervals for the URE estimators obtained here. Understanding whether the OPTIMAL SHRINKAGE ESTIMATION 27 optimality of the URE estimators implies any optimality property of the estimators of the hyper-parameters under certain conditions is an interesting related question. However, such topics are out of scope for the current paper and we will need to address them in future research. APPENDIX: PROOFS Proof of Theorem 2.1. Throughout this proof, when a supremum is taken, it is over bi ∈ [0, 1], |µ| ≤ maxi |Yi | and Requirement (MON), unless explicitly stated otherwise. Since URE(b, µ) − l(θ, θ̂ b,µ )   p 1X V (Yi ) 2 = (1 − 2bi ) − (Yi − θi ) p τ i + ν2 i=1 p 2X bi (Yi − θi )(θi − µ), + p i=1 it follows that sup|URE(b, µ) − l(θ, θ̂ (A.1) b,µ  p  1 X V (Yi ) 2 )| ≤ − (Yi − θi ) p τ i + ν2 i=1   p X V (Yi ) 2 2 bi + sup − (Yi − θi ) p τ i + ν2 i=1 p X 2 + sup bi (Yi − θi )(θi − µ) . p i=1 For the first term on the right-hand side, we note that V (Yi ) − (Yi − θi )2 τ i + ν2   τi ν1 2 2 =− (Y − EYi ) + 2θi − (Yi − θi ). τ i + ν2 i τ i + ν2 Thus,  2  V (Yi ) 2 E − (Yi − θi ) τ i + ν2   2 2  ν1 τi Var(Yi2 ) + 2θi − Var(Yi ) ≤2 τ i + ν2 τ i + ν2   2 2 ν1 τi 2 2 Var(Yi ) + 16θi Var(Yi ) + 4 Var(Yi ). ≤2 τ i + ν2 τ i + ν2 28 X. XIE, S. C. KOU AND L. BROWN It follows that by conditions (A)–(D)  p  1 X V (Yi ) 2 − (Yi − θi ) → 0 p τ i + ν2 (A.2) i=1 in L2 as p → ∞. P (Yi ) − (Yi − θi )2 )| in (A.1), without loss of generFor the term 2p sup | i bi ( τVi +ν 2 ality, let us assume τ1 ≤ · · · ≤ τp ; we then know from Requirement (MON) that b1 ≥ · · · ≥ b2 . As in Lemma 2.1 in Li (1986), we observe that sup   p 2 X V (Yi ) − (Yi − θi )2 bi p τ i + ν2 i=1 =   p V (Yi ) 2 X bi − (Yi − θi )2 τ i + ν2 1≥b1 ≥···≥bp ≥0 p sup i=1 2 = max 1≤j≤p p j  X i=1 V (Yi ) − (Yi − θi )2 τ i + ν2  . P (Yi ) − (Yi − θi )2 ). Then {Mj ; j = 1, 2, . . .} forms a martinLet Mj = ji=1 ( τVi +ν 2 p gale. The L maximum inequality implies  2 p   X V (Yi ) 2 2 2 E E max Mj ≤ 4E(Mp ) = 4 − (Yi − θi ) , 1≤j≤p τ i + ν2 i=1 which implies by (A.2) that (A.3)   p 2 X V (Yi ) 2 − (Yi − θi ) →0 bi sup p τ i + ν2 i=1 For the last term 2 p sup | p P i bi (Yi in L2 as p → ∞. − θi )(θi − µ)| in (A.1), we note that p p i=1 i=1 1X µX 1X bi (Yi − θi )(θi − µ) = bi θi (Yi − θi ) − bi (Yi − θi ). p p p i=1 Using the same argument as in the proof of (A.3), we can show that 1 X bi θi (Yi − θi ) → 0 in L2 , p i  2 X bi (Yi − θi ) E sup = O(p). sup i OPTIMAL SHRINKAGE ESTIMATION 29 Applying condition (E) and the Cauchy–Schwarz inequality, we obtain ! p X 1 bi (Yi − θi ) E sup µ p i=1   X 1 = E max |Yi | · sup bi (Yi − θi ) 1≤i≤p p i   2 1/2   X 1 2 ≤ bi (Yi − θi ) E max Yi · E sup 1≤i≤p p i = O(p(1−ε+1)/2−1 ) = O(p−ε/2 ). Therefore, p X 1 bi (Yi − θi ) → 0 in L1 . sup µ p i=1 This completes the proof, since each term on the right-hand side of (A.1) converges to zero in L1 .  Proof of Theorem 2.2. Throughout this proof, when a supremum is taken, it is over bi ∈ [0, 1], |µ| ≤ maxi |Yi | and Requirement (MON). Note that URE(b̂SM , µ̂SM ) ≤ URE(b̂, µ̂) and we know from Theorem 2.1 that sup|URE(b, µ) − lp (θ, θ̂ b,µ )| → 0 in probability. It follows that for any ε > 0 P (lp (θ, θ̂SM ) ≥ lp (θ, θ̂ b̂,µ̂ ) + ε) ≤ P (lp (θ, θ̂ SM ) − URE(b̂SM , µ̂SM ) ≥ lp (θ, θ̂ b̂,µ̂ ) − URE(b̂, µ̂) + ε)   ε SM SM SM ≤ P |lp (θ, θ̂ ) − URE(b̂ , µ̂ )| ≥ 2   ε + P |lp (θ, θ̂ b̂,µ̂ ) − URE(b̂, µ̂)| ≥ → 0. 2 Next, to show that lim sup[Rp (θ, θ̂ SM ) − Rp (θ, θ̂ b̂,µ̂ )] ≤ 0, p→∞ 30 X. XIE, S. C. KOU AND L. BROWN we note that lp (θ, θ̂ SM ) − lp (θ, θ̂ b̂,µ̂ ) = (lp (θ, θ̂ SM ) − URE(b̂SM , µ̂SM )) + (URE(b̂SM , µ̂SM ) − URE(b̂, µ̂)) + (URE(b̂, µ̂) − lp (θ, θ̂b̂,µ̂ )) ≤ 2 sup|URE(b, µ) − lp (θ, θ̂ b,µ )|. Theorem 2.1 then implies that lim sup[R(θ, θ̂ SM ) − R(θ, θ̂ b̂,µ̂ )] ≤ 0. p→∞  Proof of Theorem 2.3. Throughout this proof, when a supremum is taken, it is over bi ∈ [0, 1] and Requirement (MON). Since UREG (b) − lp (θ, θ̂ b,Ȳ )     p  1X 1 V (Yi ) 2 = − (Yi − θi ) bi 1−2 1− p p τ i + ν2 i=1   p 2X 1 bi θi (Yi − θi ) + (Yi − θi )2 − (Yi − θi )Ȳ , + p p i=1 it follows that (A.4) sup|UREG (b) − lp (θ, θ̂ b,Ȳ )|   1 X V (Yi ) ≤ − (Yi − θi )2 p τ i + ν2 i    X  V (Yi ) 1 2 − (Yi − θi )2 bi 1− sup + p p τ i + ν2 i + 2 sup p X i bi θi (Yi − θi ) X 2 2 X (Yi − θi )2 + |Ȳ | · sup bi (Yi − θi ) . + 2 p p i i We have already shown in the proof of Theorem 2.1 that the first three terms on the right-hand side converge to zero in L2 . It only remains to manage the last two terms:   X 2 X 2 2 (Yi − θi ) = 2 Var(Yi ) → 0 E 2 p p i i 31 OPTIMAL SHRINKAGE ESTIMATION by regularity condition (A),     X X 1 1 bi (Yi − θi ) ≤ E max |Yi | · sup bi (Yi − θi ) → 0, E |Ȳ | · sup 1≤i≤p p p i i as was shown in the proof of Theorem 2.1. Therefore, the last two terms of (A.4) converge to zero in L1 , and this completes the proof.  Proof of Theorem 2.4. With Theorem 2.3 established, the proof is almost identical to that of Theorem 2.2.  Proof of Lemma 3.1. It is straightforward to check that (i)–(iii) imply conditions (A)–(D) in Section 2, so we only need to verify condition (E). √ Since Yi2 = Zi2 /τi + θi2 + 2θi Zi / τi , we know that √ 1 (A.5) max Yi2 ≤ max · max Zi2 + max θi2 + 2 max |θi / τi | · max |Zi |. i i τi i i i 1≤i≤p √ 1/2 1/2 (i) and (ii) imply maxi 1/τi = O(p ) and maxi |θi / τi | = O(p ). (iii) gives maxi θi2 = O(p2/(2+ε) ). We next bound E(max1≤i≤p |Zi |k ) for k = 1, 2. (iv) implies that for k = 1, 2,   E max |Zi |k i Z ∞   ktk−1 P max |Zi | > t dt = i Z0 ∞ ktk−1 (1 − (1 − Dt−α )p ) dt ≤ 0 = Z p1/α kt k−1 0 = O(p k/α )+p (1 − (1 − Dt −α p ∞  k/α Z kz k−1 1 ) ) dt + Z ∞ p1/α  ktk−1 (1 − (1 − Dt−α )p ) dt 1 1 − 1 − Dz −α p p  dz, where a change of variable z = t/p1/α is applied. We know by the monotone convergence theorem that for k ≥ 1, as p → ∞,     Z ∞ Z ∞ 1 −α p k−1 z 1 − 1 − Dz z k−1 (1 − exp(−Dz −α )) dz < ∞. dz → p 1 1 It then follows that  E max |Zi |k = O(pk/α ), 1≤i≤p for k = 1, 2. Taking it back to (A.5) gives   E max Yi2 = O(p1/2+2/α ) + O(p2/(2+ε) ) + O(p1/2+1/α ), 1≤i≤p which verifies condition (E).  32 X. XIE, S. C. KOU AND L. BROWN To prove Lemma 4.1, we need the following lemma. Lemma A.1. Let Yi be independent from one of the six NEF-QVFs. Then condition (B) in Section 2 and P (F) lim supp→∞ p1 pi=1 |θi |2+ε < ∞ for some ε > 0; P (G) lim supp→∞ p1 pi=1 Var2 (Yi ) < ∞; (H) supi skew(Yi ) = supi √1τi (ν ν1 +2ν2 θi 2 1/2 0 +ν1 θi +ν2 θi ) < ∞; imply condition (E). Proof of Lemma A.1. Let us denote σi2 = Var(Yi ). We can write Yi = σi Zi + θi , where Zi are independent with mean zero and variance one. It follows from Yi2 = σi2 Zi2 + θi2 + 2σi θi Zi that (A.6) max Yi2 ≤ max σi2 · max Zi2 + max θi2 + 2 max σi |θi | · max |Zi |. i 1≤i≤p i i i i Condition (B) implies maxi σi2 θi2 ≤ i σi2 θi2 = O(p). Thus, maxi σi |θi | = O(p1/2 ). Similarly, condition (G) implies that maxi σi2 = O(p1/2 ). Condition (F) imP plies that maxi |θi |2+ε ≤ i |θi |2+ε = O(p), which gives maxi θi2 = O(p2/(2+ε) ). If we can show that     (A.7) E max |Zi | = O(log p), E max Zi2 = O(log2 p), P 1≤i≤p 1≤i≤p then we establish (E), since   ∗ E max Yi2 = O(p1/2 log2 p + p2/(2+ε) + p1/2 log p) = O(p2/(2+ε ) ), 1≤i≤p where ε∗ = min(ε, 1). To prove (A.7), we begin from Z ∞     k (A.8) E max |Zi | = k tk−1 P max |Zi | > t dt i 0 i for all k > 0. The large deviation results for NEF-QVF in Morris [(1982), Section 9] and condition (H) (i.e., Yi have bounded skewness) imply that for all t > 1, the tail probabilities P (|Zi | > t) are uniformly bounded exponentially: there exists a constant c0 > 0 such that P (|Zi | > t) ≤ e−c0 t for all i. Taking it into (A.8), we have  Z ∞  ktk−1 (1 − (1 − e−c0 t )p ) dt E max |Zi |k ≤ i 0 = Z log p/c0 0 ktk−1 (1 − (1 − e−c0 t )p ) dt 33 OPTIMAL SHRINKAGE ESTIMATION (A.9) + Z ∞ log p/c0 k ktk−1 (1 − (1 − e−c0 t )p ) dt = O(log p) + Z ∞ 0  1 k z + log p c0 k−1   1 1 − 1 − e−c0 z p p  dz, where in the last line a change of variable z = t − log p/c0 is applied. We know by the monotone convergence theorem that for k ≥ 1, as p → ∞,     Z ∞ Z ∞ 1 −c0 z p k−1 z k−1 (1 − exp(−e−c0 z )) dz < ∞. dz → z 1− 1− e p 0 0 It then follows from (A.9) that   k E max |Zi | = O(logk p), 1≤i≤p for k = 1, 2, which completes our proof.  Proof of Lemma 4.1. We go over the five distributions one by one. (1) Binomial. Since θi = pi , Var(Yi ) = pi (1 − pi )/ni , and Var(Yi2 ) ≤ EYi4 ≤ 1, it is straightforward to verify that ni ≥ 2 for all i guarantees conditions (A)–(E) in Section 2. (2) Poisson. Var(Yi ) = θi /τi , and Var(Yi2 ) = (4τi2 θi3 + P 6τi θi2 + θi )/τi3 . It is straightforward to verify that inf i τi > 0, inf i τi θi > 0 and i θi3 = O(p) imply conditions (A)–(D) in Section 2 and conditions (F)–(H) in Lemma A.1. pi pi 1 2 (3) Negative-binomial. θi = 1−p , Var(Yi ) = n1i (1−p 2 = n (θi + θi ), so i i i) 1 (p + 4p2i + 6ni p2i + p3i + 4ni p3i + n3i (1−pi )4 i Pp P pi 4 1 2 4n2i p3i ). From these, we know that i=1 Var (Yi ) = i (ni pi )2 ( 1−pi ) = P P pi 4 ) ) = O(p), which verifies conditions (A) and (G). pi=1 Var(Yi )θi2 = O( i ( 1−p i P 1 P pi 4 pi 4 i ni pi ( 1−pi ) = O( i ( 1−pi ) ) = O(p), which verifies condition (B). For v0 = 0, ν1 = ν2 = 1. Var(Yi2 ) = condition (C), since ni ≥ 1 and 0 ≤ pi ≤ 1, we P only need to verify that P 1 1 2 ) = O(p). This is true, since 2 (p + 6n p i i i n3i (1−pi )4 (pi + 6ni pi ) = i n3i (1−pi )4 i P P pi 4 pi 4 pi 4 1 6 i ( (ni pi )3 ( 1−pi ) + (ni pi )2 ( 1−pi ) ) = O( i ( 1−pi ) ) = O(p). Condition (D) is P P pi 4 automatically satisfied. For condition (F), consider pi=1 θi4 . It is i ( 1−p ) = i √ p +1 1 i O(p). For condition (H), note that skew(Yi ) = √ni √pi ≤ 1 + 1/ ni pi . Thus, supi skew(Yi ) < ∞ by (i). (4) Gamma. θi = αλi , Var(Yi ) = αλ2i /τi , so v0 = ν1 = 0, ν2 = 1/α. skew(Yi ) = √ 2/ τi α. Var(Yi2 ) = ταi λ4i (α + τ1i )(4α + τ6i ). It is straightforward to verify that (i) and (ii) imply conditions (A)–(D) in Section 2 and conditions (F)–(H) in Lemma A.1. (5) GHS. θi = αλi , Var(Yi ) = α(1 + λ2i )/τi , so v0 = α, ν1 = 0, ν2 = 1/α. √ √ 1 2 skew(Yi ) = (2/ τi α)λi /(1+λ2i )1/2 ≤ 2/ τi α. Var(Yi2 ) = 2α τi (1+λi )(α+ τi ) × 34 X. XIE, S. C. KOU AND L. BROWN ( τ1i + τ3i λ2i + 2αλ2i ). It is then straightforward to verify that (i) and (ii) imply conditions (A)–(D) in Section 2 and conditions (F)–(H) in Lemma A.1.  Proof of Theorem 4.6. We note that the set over which the supremum is taken is a subset of that of Theorem 2.1. The desired result thus automatically holds.  Proof of Theorem 4.7. With Theorem 4.6 established, the proof is almost identical to that of Theorem 2.2.  Proof of Theorem 4.8. We note that the set over which the supremum is taken is a subset of that of Theorem 2.3. The desired result thus holds.  Proof of Theorem 4.9. in that of Theorem 2.2.  The proof essentially follows the same steps Acknowledgments. The views expressed herein are the authors alone and are not necessarily the views of Two Sigma Investments, LLC or any of its affliates. REFERENCES Berger, J. O. and Strawderman, W. E. (1996). Choice of hierarchical priors: Admissibility in estimation of normal means. Ann. Statist. 24 931–951. MR1401831 Berry, D. A. and Christensen, R. (1979). Empirical Bayes estimation of a binomial parameter via mixtures of Dirichlet processes. Ann. Statist. 7 558–568. MR0527491 Brown, L. D. (1966). On the admissibility of invariant estimators of one or more location parameters. Ann. Math. Statist 37 1087–1136. MR0216647 Brown, L. D. (2008). In-season prediction of batting averages: A field test of empirical Bayes and Bayes methodologies. Ann. Appl. Stat. 2 113–152. MR2415597 Brown, L. D. and Greenshtein, E. (2009). Nonparametric empirical Bayes and compound decision approaches to estimation of a high-dimensional vector of normal means. Ann. Statist. 37 1685–1704. MR2533468 Clevenson, M. L. and Zidek, J. V. (1975). Simultaneous estimation of the means of independent Poisson laws. J. Amer. Statist. Assoc. 70 698–705. MR0394962 Efron, B. and Morris, C. N. (1975). Data analysis using Stein’s estimator and its generalizations. J. Amer. Statist. Assoc. 70 311–319. Efron, B. (2004). The estimation of prediction error: Covariance penalties and crossvalidation. J. Amer. Statist. Assoc. 99 619–642. MR2090899 Efron, B. and Morris, C. (1972). Empirical Bayes on vector observations: An extension of Stein’s method. Biometrika 59 335–347. MR0334386 Efron, B. and Morris, C. (1973). Stein’s estimation rule and its competitors—An empirical Bayes approach. J. Amer. Statist. Assoc. 68 117–130. MR0388597 Gelman, A. and Hill, J. (2007). Data Analysis Using Regression and Multilevel/Hierarchical Models. Cambridge Univ. Press, Cambridge. Green, J. and Strawderman, W. E. (1985). The use of Bayes/empirical Bayes estimation in individual tree volume development. Forest Science 31 975–990. OPTIMAL SHRINKAGE ESTIMATION 35 Gutmann, S. (1982). Stein’s paradox is impossible in problems with finite sample space. Ann. Statist. 10 1017–1020. MR0663454 Hwang, J. T. (1982). Improving upon standard estimators in discrete exponential families with applications to Poisson and negative binomial cases. Ann. Statist. 10 857–867. MR0663437 James, W. and Stein, C. (1961). Estimation with quadratic loss. In Proc. 4th Berkeley Sympos. Math. Statist. and Prob., Vol. I 361–379. Univ. California Press, Berkeley, CA. MR0133191 Jiang, W. and Zhang, C.-H. (2009). General maximum likelihood empirical Bayes estimation of normal means. Ann. Statist. 37 1647–1684. MR2533467 Jiang, W. and Zhang, C.-H. (2010). Empirical Bayes in-season prediction of baseball batting averages. In Borrowing Strength: Theory Powering Applications—A Festschrift for Lawrence D. Brown. Inst. Math. Stat. Collect. 6 263–273. IMS, Beachwood, OH. MR2798524 Johnstone, I. (1984). Admissibility, difference equations and recurrence in estimating a Poisson mean. Ann. Statist. 12 1173–1198. MR0760682 Jones, K. (1991). Specifying and estimating multi-level models for geographical research. Transactions of the Institute of British Geographers 16 148–159. Koenker, R. and Mizera, I. (2014). Convex optimization, shape constraints, compound decisions, and empirical Bayes rules. J. Amer. Statist. Assoc. 109 674–685. MR3223742 Li, K.-C. (1986). Asymptotic optimality of CL and generalized cross-validation in ridge regression with application to spline smoothing. Ann. Statist. 14 1101–1112. MR0856808 Morris, C. N. (1982). Natural exponential families with quadratic variance functions. Ann. Statist. 10 65–80. MR0642719 Morris, C. N. (1983). Parametric empirical Bayes inference: Theory and applications. J. Amer. Statist. Assoc. 78 47–65. MR0696849 Mosteller, F. and Wallace, D. L. (1964). Inference and Disputed Authorship: The Federalist. Addison-Wesley, Reading, MA. MR0175668 Muralidharan, O. (2010). An empirical Bayes mixture method for effect size and false discovery rate estimation. Ann. Appl. Statist. 4 422–438. MR2758178 Rubin, D. (1981). Using empirical Bayes techniques in the law school validity studies. J. Amer. Statist. Assoc. 75 801–827. Stein, C. (1956). Inadmissibility of the usual estimator for the mean of a multivariate normal distribution. In Proceedings of the Third Berkeley Symposium on Mathematical Statistics and Probability, 1954–1955, Vol. I 197–206. Univ. California Press, Berkeley, CA. MR0084922 Xie, X., Kou, S. C. and Brown, L. D. (2012). SURE estimates for a heteroscedastic hierarchical model. J. Amer. Statist. Assoc. 107 1465–1479. MR3036408 X. Xie Two Sigma Investments LLC 100 Avenue of the Americas, Floor 16 New York, New York 10013 USA E-mail: [email protected] S. C. Kou Department of Statistics Harvard University Cambridge, Massachusetts 02138 USA E-mail: [email protected] L. Brown The Wharton School University of Pennsylvania Philadelphia, Pennsylvania 19104 USA E-mail: [email protected]
10math.ST
1 Containment Control of Multi-Agent Systems with Dynamic Leaders Based on a P I n-Type Approach arXiv:1411.4346v3 [cs.SY] 27 Aug 2015 Long Cheng, Yunpeng Wang, Wei Ren, Zeng-Guang Hou, and Min Tan Abstract—This paper studies the containment control of multi-agent systems with multiple dynamic leaders in both the continuous-time domain and the discrete-time domain. The leaders’ motions are described by the nth-order polynomial trajectories. This setting makes practical sense because given some critical points, the leaders’ trajectories are usually planned by the polynomial interpolations. In order to drive all followers into the convex hull spanned by the leaders, a P I n -type containment algorithm is proposed (P and I are short for Proportional and Integral , respectively; I n implies that the algorithm includes up to the nth-order integral terms). It is theoretically proved that the P I n -type containment algorithm is able to solve the containment problem of multi-agent systems where the followers are described by any order integral dynamics. Compared to the previous results on the multi-agent systems with dynamic leaders, the distinguished features of this paper are that: (1) the containment problem is studied not only in the continuoustime domain but also in the discrete-time domain while most existing results only work in the continuous-time domain; (2) to deal with the leaders with the nth-order polynomial trajectories, existing results require the follower’s dynamics to be the (n+1)thorder integral while the followers considered in this paper can be described by any-order integral dynamics; (3) the “sign” function is not employed in the proposed algorithm, which avoids the chattering phenomenon; and (4) both the disturbance and the measurement noise are taken into account. Finally, some simulation examples are given to demonstrate the effectiveness of the proposed algorithm. Index Terms—Containment control, multi-agent system, P I n type algorithm, polynomial trajectory. I. I NTRODUCTION Recently, the distributed coordinated control of multi-agent systems (MASs) has become a research focal in the systems and control community. Roughly speaking, agents in concern can be divided into two categories: leaders and followers. Depending on whether there are leaders in MASs, the coordinated control problem becomes the consensus problem (leaderless case) [1]–[3]; the leader-following problem (single leader case) [4]; and the containment problem (multiple leaders case). This paper mainly focuses on the containment problem of MASs because, from one side, the containment problem roots in some natural phenomena such as the relationship between sheepdogs and sheep [5] and the relationship between female silkworm moths and male silkworm moths [6]; from the other Long Cheng, Yunpeng Wang, Zeng-Guang Hou and Min Tan are with the State Key Laboratory of Management and Control for Complex Systems, Institute of Automation, Chinese Academy of Sciences, Beijing 100190, China. Wei Ren is with the Department of Electrical and Computer Engineering, University of California at Riverside, CA 92521, USA. Please address all correspondences to Dr. Long Cheng at Email: [email protected]; Tel: 8610-82544522; Fax: 8610-82544794. side, the containment problem has many practical applications such as the mixed containment-sensing problem [7] and the coordinated control of a group of mobile robots [8]–[10]. Looking back at the history of the containment problem, the rapid development started after the publication of [11], [12]. A leader-based containment control strategy for multiple unicycle agents was introduced in [11], where the containment problem was interpreted as a combination of the formation and agreement control problems. The leaders were convergent to a desired formation while the followers converged to the convex hull spanned by the leaders. A similar containment problem of MASs with single-integrator dynamics was studied in [13], where consensus-like interaction rules were designed for the followers while a hybrid “Stop-Go” policy was applied to the leaders. Since then, a great number of results concerning the containment control have been reported. According to the type of the agent’s dynamics, these results can be divided into four categories: (1) single-integrator dynamics [14]–[16]; (2) double-integrator dynamics [9], [17]–[23]; (3) general linear dynamics [24]–[27]; (4) Euler-Lagrange dynamics [28]–[30]; and (5) nonlinear dynamics [31]. In [14], the containment problem of MASs with undirected switching communication topologies was studied. However, in practice, the communication link is usually a one-way channel. For this reason, the containment problem of MASs with directed communication topologies has been widely investigated recently. In [15], it was shown that the necessary and sufficient condition for achieving the containment of single-integrator MASs with a directed topology was that for each follower, there existed at least one leader that had a directed path to this follower. This condition was also proved to be necessary and sufficient for the containment problem of double-integrator MASs in [18], [19]. Experimental validations on a team of mobile robots were conducted in [9]. The finite-time containment problem of double-integrator MASs was investigated in [17]. In [20], [21], containment control algorithms were proposed for double-integrator MASs based on only position measurements. The containment problem of double-integrator MASs with randomly switching topologies was investigated in [22], where the switching signal was described by a continuous-time irreducible Markov chain. It was proved that the containment problems could be solved if and only if for each follower, there existed at least one leader which had a directed path to this follower in the union graph of all possible communication graphs. Because the communication noise is unavoidable in practical applications, the noise effect in containment problems of single-integrator and double-integrator MASs were studied in [16] and [23], respectively. The results in [24] show that the 2 containment control of general linear MASs can be achieved by applying a state-feedback algorithm. When the agents’ states were unavailable, output-feedback based containment control algorithms were proposed for general linear MASs in [25], [26]. In [27], the communication constraint such as the non-uniform delay was considered in studying the containment problem. For Euler-Lagrange MASs with uncertainties, adaptive containment algorithms were proposed based on sliding-mode estimators and neural networks in [28] and [29], respectively. Furthermore, the finite-time containment problem of Euler-Lagrange MASs was studied in [30]. Finally, in [31], the containment problem of the second-order locally Lipschitz nonlinear MASs was solved within the framework of the nonlinear input-to-state stability. Although great effort has been made to address various factors in the containment control of MASs, there are still some limitations in the existing results. Let us first consider an application scenario shown in Fig. 1. In this application, a group of mobile robots are required to move across a partially unknown area through a narrow safe tunnel. There are two kinds of robots: the master robots and the slave robots. The master robots are capable of self-navigation, while the slave robots can only measure the relative positions with its neighbor robots. This task can be solved by the containment control strategy: 1) Master robots act as leaders. For each master robot, design a reference trajectory which is inside the safe channel. Let each master robot move along its corresponding reference trajectory. 2) Slave robots act as followers. Let all slave robots move into the area surrounded by master robots and move together with master robots. Then the challenge is how to design the reference trajectories for master robots. For each master robot, we can select a sequence of suitable reference points inside the safe tunnel. A polynomial trajectory, which goes through these points, can be constructed by the polynomial interpolation. The obtained trajectory is checked whether it is inside the safe tunnel. If not (caused by the Runge’s phenomenon), we need to reselect the reference points and construct the new polynomial trajectory. This process is repeated until the trajectory is within the safe tunnel. Then the following nth-order polynomial can be determined x(t) = a0 + a1 t + · · · + an tn , (1) whose trajectory goes through the selected (n + 1) reference points (a0 , · · · , an are coefficients determined by these reference points). The polynomial trajectory can be used as the reference trajectory for the master robot. In [9], [14]–[16], [18]–[23], [28], [30], every leader has the following single-integrator or double-integrator dynamics: ( ẋ(t) = v(t) ẋ(t) = u(t) or , (2) v̇(t) = u(t) where the control input u(t) is assumed to be bounded or even zero. Obviously, if the control input of (2) is bounded, then this controller cannot generate the polynomial trajectory Unknown Area B A Unknown Area Master Robot Refrence Points Fig. 1. Safe Tunnel Slave Robot Refrence Trajectories A group of mobile robots travel across a partially unknown area. defined by (1) with the order n ≥ 3. If the leader has the nth-order integrator or the n-dimensional linear dynamics [24]–[26], then the polynomial trajectory can be generated by properly selecting the parameters in the system matrix of the leader’s dynamics. However, by doing so, it is required that all followers have the same dynamics as the leader [24]– [26]. In reality, the follower’s dynamics has no relationship with the order of the leader’s polynomial trajectory. In fact, under the nth-order polynomial trajectories for leaders, how to solve the containment problem of MASs with single-integrator followers is not answered yet. In addition, from the controller design point of view, most containment algorithms include the non-smooth “sign” function to deal with the dynamic leaders [9], [15], [20], [21], [28], [30], which would cause the harmful “chattering” phenomenon. Furthermore, all results aforementioned above only study the containment problem in the continuous-time domain. The counterpart results in the discrete-time domain are not clear. Inspired by the above observations, this paper investigates the containment problem of MASs with dynamic leaders in both the continuous-time domain and the discrete-time domain. It is assumed that each leader’s motion is described by a corresponding polynomial trajectory. Every follower is first assumed to have the single-integrator dynamics. A so-called P I n -type (P and I are short for Proportional and Integral, respectively) algorithm is proposed to solve the containment problem, where I n implies that the algorithm includes up-to the nth-order integral terms. It turns out that the P I n -type algorithm is able to solve the containment problem if for each follower, there exists at least one leader which has a directed path to this follower. Then the obtained results are extended to the case where the followers are described by the highorder integral dynamics. In this case, the P I n -type algorithm is modified as a P I n−m Dm -type algorithm (D is short for derivative; and Dm implies that the algorithm includes up to the mth-order differential terms). Then, the counterpart results in the discrete-time domain are presented. Moreover, effects of the disturbance and the measurement noise are also taken into account in this paper. Compared to the previous results, the contributions of this paper can be summarized as follows: 1) The proposed algorithms can solve the containment problem with dynamic leaders in both the continuous-time 3 domain and the discrete-time domain. 2) The follower can be described by any-order integral dynamics. 3) There is no discontinuous “sign” function in the proposed controllers, which avoids the “chattering” phenomenon. 4) Effects of the disturbance and the measurement noise are taken into account. It is noted that there are some recent results on the “P I”type consensus algorithms for MASs [32], [33]. This kind of consensus algorithms has also been applied in the distributed filter of distributed parameter systems [34]. Compared to [32], [33], the distinguished features of this paper mainly lie in the following five aspects: 1) The control objective of [32], [33] is to solve the leaderless consensus problem of multi-agent systems with disturbances. The aim of this paper is to solve the containment problem with dynamic leaders. 2) In [32], [33], the agent is described by the singleintegrator or double-integrator dynamics. In this paper, the leaders move along the polynomial trajectories, and the followers can be described by any-order integral dynamics. 3) In [32], [33], the main role of the integral term is to attenuate constant disturbances. In this paper, the main purpose of employing the integral-terms is to eliminate the containment error caused by the polynomial trajectory. 4) The algorithms proposed in [32], [33] can only deal with constant disturbances, while the ones proposed in this paper can attenuate some kinds of time-varying disturbances (polynomial-type disturbance). 5) In [32], [33], only results in the continuous-time domain are presented. This paper studies the containment problem of MASs in both the continuous-time domain and the discrete-time domain. The remainder of this paper is organized as follows: Section II gives some preliminary results on the containment problem with dynamic leaders; Section III presents a containment algorithm and the related theoretical analysis in the continuoustime domain, where the followers are described by the singleintegrator dynamics; Section IV discusses how to generalize the obtained results to the case where the followers are described by the high-order integral dynamics; counterpart results in the discrete-time domain are presented in Section V; Section VI concludes this paper with final remarks. Notations: 1n = (1, · · · , 1)T ∈ Rn ; 0n = (0, · · · , 0)T ∈ Rn ; In denotes the n × n dimensional identity matrix; 0m×n ∈ Rm×n denotes the m × n dimensional zero matrix; ⊗ denotes the Kronecker product. N and N+ denote the set of natural numbers and the set of positive natural numbers, respectively. For a given vector p ∈ Rn and a set Ω ⊆ Rn , the distance between p and Ω is defined as dis(p, Ω) = inf y∈Ω kp−yk2 . For a given matrix X, kXk2 denotes its 2-norm; kXkF denotes its Frobenius norm; X T denotes its transpose; and X H denotes its conjugate transpose. diag(·) denotes a block diagonal matrix formed by its inputs. For a complex number c, <(c) denotes its real part. For a given random variable or vector x, E(x) denotes its mathematical expectation. II. P RELIMINARIES & P ROBLEM F ORMULATION Consider a MAS composed of M + N agents. Define two sets M = {1, 2, · · · , M } and N = {M + 1, M + 2, · · · , M + N }. Motivated by [15], [16], [18], [19], [22]–[24], [35], [36], the interaction topology of the MAS is modeled by a weighted digraph G = {VG , EG , AG }, where VG = {v1 , v2 , · · · , vM +N }, EG ⊂ VG × VG = {ij |i, j ∈ M ∪ N } and AG = [αij ] ∈ R(M +N )×(M +N ) are the node set, the directed edge set and the adjacency matrix, respectively. Node vi denotes agent i; ij ∈ EG means that there is an information flow from agent i to agent j; αji denotes the weight associated with the directed edge ij . The element of AG satisfies that αji > 0 ⇔ ij ∈ EG and αji = 0 ⇔ ij ∈ / EG . It is assumed that there is no selfloop in VG (ii ∈ / EG and αii = 0, i ∈ M ∪ N ). If ij ∈ EG , then agent i is called the parent of agent j. The neighborhood of node vi is defined as Ni = {vj |ji ∈ EGP }. The indegree of node vi is defined as degin (vi ) = j∈Ni αij . The Laplacian matrix of G is defined as LG = DG − AG , where DG = diag(degin (v1 ), degin (v2 ), · · · , degin (vM +N )). A directed path from node vi1 to node vin is a sequence of end-to-end directed edge i1 i2 , i2 i3 , · · · , in−1 in where ij ij+1 ∈ VG (j = 1, · · · , n − 1). In this paper, an agent is called a leader if it has no parent; otherwise it is called a follower. Without loss of generality, it is assumed that the agents labeled from 1 to M are the leaders while the agents labeled from M + 1 to M + N are the followers. Hence the Laplacian matrix of the interaction topology graph has the following form   0M ×M 0M ×N LG = , (3) L1 L2 where L1 ∈ RN ×M and L2 ∈ RN ×N . Throughout this paper, it is assumed that the following two assumptions hold. (A1) For each follower, there exists at least one leader that has a directed path to this follower. (A2) Each follower can only measure the relative positions between itself and its neighbors. Lemma 1 ( [30]). Under Assumption (A1), • all eigenvalues of L2 defined in (3) have positive real parts; −1 • each entry of −L2 L1 is nonnegative and the row sum −1 of −L2 L1 equals to one. The control objective is to design the control algorithms for the followers such that all followers are convergent into the convex hull spanned by the leaders (containment problem) while the leaders move along some predesigned trajectories. To this end, how to describe the motions of the leaders and followers should be given. Let us first consider the continuoustime domain case. The position of agent i at time t is denoted by xi (t) ∈ Rp (it is assumed that the agent moves in the p-dimensional space). The ith leader’s motion is assumed to move along the following nth-order polynomial trajectory xi (t) = ai0 + ai1 t + · · · + ain tn , i ∈ M, (4) 4 where aij ∈ Rp , j = 0, · · · , n. The reason of employing the polynomial trajectory is that the robot’s trajectory is usually planned by the polynomial interpolation. In this paper, we do not care about the dynamics of the leaders. The leaders can be considered as the reference signals. The motion of the (i−M )th follower (i ∈ N ) is described by the following first-order differential equation P where ūi (t) , Dn ui (t) = j∈M∪N K(ξj (t) − ξi (t), K = (κn , · · · , κ0 ), B = (0, · · · , 0, 1)T ∈ Rn+1 , and   0 1 ··· 0  .. .. . . .  . ..  A = . .  ∈ R(n+1)×(n+1) . 0 0 · · · 1 0 0 ··· 0 Dxi (t) = ui (t) + δi (t), T T Let ΞL (t) = (ξ1T (t), · · · , ξM (t))T and ΞF (t) = (ξM +1 (t), T T · · · , ξM +N (t)) . Then the closed-loop dynamics of the MAS can be rewritten in the following compact form   DΞL (t) = (IM ⊗ A ⊗ Ip )ΞL (t),  DΞF (t) = IN ⊗ A ⊗ Ip − L2 ⊗ BK ⊗ Ip ΞF (t) (8)    − L1 ⊗ BK ⊗ Ip ΞL (t) + (IN ⊗ B ⊗ Ip )∆(t), (5) where ui (t) ∈ Rp and xi (t) ∈ Rp . In (5), the symbol D denotes the differential operator (namely Dxi (t) = ẋi (t) and Dn x(t) = D(Dn−1 x(t)) = x(n) (t)). And δi (t) = bi0 + bi1 t + · · · + bir tr is the polynomial-type disturbance, where r ∈ N and bij ∈ Rp (j = 0, · · · , r). The inversion of this differential Rt operator D is defined as D−1 x(t) = 0 x(s)ds. It is easy to see that D(D−1 x(t)) = x(t). By the above terminologies, the containment problem can be formally defined as follows. Definition 1. The containment problem of MASs is solved if all followers’ positions are convergent into the convex hull spanned by the leaders’ positions. That is lim dis(xi (t), coL (t)) = 0, i ∈ N , t→∞ where coL (t) P = co{x1 (t), · · · , xM (t)} = P { i∈M µi xi (t)| i∈M µi = 1, µi ≥ 0} is the convex hull spanned by the leaders’ positions at time t. Definition 2. The containment error of MASs as time t is P defined as Er (t) = i∈N dis(xi (t), coL (t)). It is easy to see that the containment problem of MASs is solved if and only if limt→∞ Er (t) = 0. III. C ONTAINMENT C ONTROL OF MAS S IN C ONTINUOUS -T IME D OMAIN Let eji (t) = xj (t) − xi (t) denote the relative state between agent j and agent i. The following containment controller is proposed for the ith agent   n X X X ui (t) = κl D−l  αij eji (t) + αij eji (t) , (6) l=0 j∈M j∈N where {κl ; l = 0, · · · , n} are parameters to be determined. Because (6) includes the proportional term P α ij eji (t) and up to the nth-order integral terms j∈M∪N P {D−l j∈M∪N αij eji (t), l = 1, · · · , n}, (6) is called P I n type algorithm. The main purpose of employing the integral terms is to eliminate the containment error caused by the polynomial trajectory. Let ξi (t) = (xTi (t), DxTi (t), · · · , Dn xi T (t))T . Then the ith agent’s dynamical behavior can be described by the following differential equation   i ∈ M, Dξi (t) = (A ⊗ Ip )ξi (t), (7) Dξi (t) = (A ⊗ Ip )ξi (t) + (B ⊗ Ip )ūi (t)   n +D δi (t), i ∈ N, T n T where ∆(t) = diag(Dn δM +1 (t), · · · , D δM +N (t)). This leads to that DΞ̂F (t) = (IN ⊗ A ⊗ Ip − L2 ⊗ BK ⊗ Ip )Ξ̂F (t) + (IN ⊗ B ⊗ Ip )∆(t), (9) ΞF (t)+(L−1 2 L1 ⊗I(n+1)p )ΞL (t). where Ξ̂F (t) = By Lemma 1 and Definition 1, if Ξ̂F (t) is convergent to zero, then the containment problem is solved. Theorem 1. Assume all leaders move along polynomial trajectories described by (4); and all followers have singleintegrator dynamics described by (5). Let P denote the positive definite solution to the following matrix inequality AT P + P A + In+1 − P BB T P ≤ 0. (10) If the order of the polynomial disturbance δi (t) in (5) is not greater than n − 1 (namely, r ≤ n − 1), then the containment problem of MASs can be solved by −1 }, (6) with K = εB T P where ε ≥ 0.5 max{1, σmin σmin ∈ (0, λmin ), and λmin = min{<(λi )|λi (i = 1, · · · , N ) is the minimum eigenvalue of L2 }. Proof: First, it is proved that (IN ⊗ A − L2 ⊗ BK) ⊗ Ip is a Hurwitz matrix. By Schur decomposition, there must exist a transformation matrix Tc such that   λ1 ∗ · · · ∗  0 λ2 · · · ∗    Λc , Tc L2 Tc−1 =  . . ..  , . .. ..  .. .  0 0 · · · λN which leads to (IN ⊗ A − L2 ⊗ BK) = (Tc ⊗ In )(IN ⊗ A − Λc ⊗ BK)(Tc−1 ⊗ In ). Hence, the diagonal elements of IN ⊗ A − Λc ⊗ BK are A − λi BK (i = 1, · · · , N ). By Lemma 1, all eigenvalues {λi ; i = 1, · · · , N } have positive real parts. Hence, (0, λmin ) is not empty. It is easy −1 to see that ε<(λi ) ≥ 0.5<(λi ) max{1, σmin } ≥ 0.5. This together with (10) leads to that (A − λi BK)H P + P (A − λi BK) =(A − ελi BB T P )H P + P (A − ελi BB T P ) =AT P + P A − 2ε<(λi )P BB T P ≤ − In+1 + (1 − 2ε<(λi ))P BB T P < 0. 5 By Lyapunov stability theory, A − λi BK (i = 1, · · · , N ) are all Hurwitz matrices, which implies that (IN ⊗A−L2 ⊗BK)⊗ Ip is a Hurwitz matrix. Next, it is proved that kΞ̂F (t)k2 is convergent to zero. Since r ≤ n − 1, it is obtained that Dn δi (t) = 0p . Therefore, the solution to (9) is Ξ̂F (t) = e((IN ⊗A−L2 ⊗BK)⊗Ip )t Ξ̂F (0). Since (IN ⊗ A − L2 ⊗ BK) ⊗ Ip is a Hurwitz matrix, it is obtained lim kΞ̂F (t)k2 t→∞ ≤ lim ke((IN ⊗A−L2 ⊗BK)⊗Ip )t k2 kΞ̂F (0)k2 = 0. (11) t→∞ IV. E XTENSIONS TO F OLLOWERS WITH H IGH -O RDER I NTEGRAL DYNAMICS In Section III, the followers are described by the first-order integral dynamics. However, due to the diversity of control objects in practice, it is more interesting to study the follower described by the high-order integral dynamics. In this section, the dynamics of the (i − M )th follower (i ∈ N ) is described by Dm xi (t) = ui (t), (12) where xi (t) ∈ Rp is the position vector of the (i − M )th follower; and ui (t) ∈ Rp is the control input of the (i − M )th follower. Motivated by the P I n -type algorithm (6), we propose the following containment algorithm ui (t) = lX m −1 κl Dm−l−1 X αij eji (t), (13) j∈M∪N l=0 1, the algorithm defined by (13) solves the containment problem. Remark 1. It can P be seen from (13) that besides the proportional term j∈M∪N αij eji (t) and the integral terms  −l P D 1, 2, · · · , lm − m , (13) also j∈M∪N αij eji (t), l =  P includes the “differential terms” Dl j∈M∪N αij eji (t), l = 1, 2, · · · , m − 1 . Therefore, the proposed algorithm defined by (13) is essentially a generalized “P ID” algorithm (we can call it the “P I lm −m Dm−1 ”-type algorithm). It is well known that the proportional term depends on the present information; the integral term represents the accumulation of past information; and the differential term is the future information, which might be more expensive to be measured.  P Hence the differential terms Dl j∈M∪N αij eji (t), l = 1, 2, · · · , m−1 in (13) might be difficult to obtain. Motivated by [37], [38], one way to handle this challenge is to design the state estimator for the (i − M )th follower agent to estimate its own state {xi (t), Dxi (t), · · · , Dm−1 xi (t), i ∈ N }. Let T zi (t) = (ziT (t), · · · , zim (t)T )T ∈ Rmp denote the estimated state of the (i − M )th follower agent. Then the followers exchange their estimated states with their neighbor agents via the communication network G to obtain the differential terms. Since the leaders are essentially the reference signals (the polynomial trajectories defined by (4)), each leader should know its current position and any-order derivatives of the current position accurately. Therefore, there is no need to design the estimators for leaders. The ith leader (i ∈ M) directly sends its state zi (t) = (xi (t), DxTi (t), · · · , Dm−1 xTi (t))T to the connected neighbors. By the above discussion, the state estimator of the (i−M )th follower (i ∈ N ) is designed as where lm = max{m, n + 1}. Theorem 2. Assume all leaders move along their polynomial trajectories described by (4); and all followers are described by (12). Let P denote the positive definite solution to the following matrix inequality E T P + P E + Ilm − P F F T P ≤ 0, where  0 1  .. ..  E = . . 0 0 0 0 ··· .. . ··· ···    0 0  ..  ..    .  ∈ Rlm ×lm , and F =  .  ∈ Rlm . 0 1 0 1 The containment problem of MASs can be solved by (13) with K = (κlm −1 , · · · , κ0 ) = εF T P , where ε is defined in Theorem 1. T (1) T (l −1) T Proof: Let ξi (t) = xTi (t), xi (t), · · · , xi m (t) , T ΞL (t) = (ξ1T (t), · · · , ξM (t)T )T , ΞF (t) = T T T (ξM +1 (t), · · · , ξM +N (t)) and Ξ̂F (t) = ΞF (t) + (L−1 Following the same procedure 2 L1 ⊗ Ilm p )ΞL (t). of the proof of Theorem 1, it can be proved that there must exist two positive constants M1 < ∞ and β1 , such that ke(IN ⊗E⊗Ip −L2 ⊗F K⊗Ip )t k2 ≤ M1 e−β1 t and kΞ̂F (t)k2 ≤ M1 e−β1 t kΞ̂F (0)k2 → 0 (t → ∞). By Lemma Dzi (t) = (Ē ⊗ Ip )zi (t) + (F̄ ⊗ Ip )ui (t) + (Ke ⊗ Ip ) M +N   X αij (G ⊗ Ip )(zj (t) − zi (t)) − eji (t) , (14) × j=1 where Ke ∈ Rm , F̄ = (0, · · · , 0, 1)T ∈ Rm , G = (1, 0, · · · , 0) ∈ R1×m and   0 1 ··· 0  .. .. . . .  . ..  Ē =  . .  ∈ Rm×m . 0 0 · · · 1 0 0 ··· 0 Lemma 2. Let Ke = εP GT where ε is defined in Theorem 1 and P is the solution to the following matrix inequality ĒP + P Ē T + Ilm − P GT GP ≤ 0. Then there exist two positive constants M2 < ∞ and β2 such that kDlm −m Ẑ(t)k2 ≤ M2 e−β2 t , where Ẑ(t) = T T T (ẑM +1 (t), · · · , ẑM +N (t)) , ẑi (t) = zi (t) − ζi (t) and ζi (t) = T T m−1 T (xi (t), Dxi (t), · · · , D xi (t))T . Proof: From (12) and (14), it is obtained that Dlm −m+1 Ẑ(t) = (IN ⊗E⊗Ip −L2 ⊗Ke G⊗Ip )D(lm −m) Ẑ(t). Following the same procedure of the proof of Theorem 1, it can be easily proved that (IN ⊗ E ⊗ Ip − L2 ⊗ Ke G ⊗ Ip ) 6 is a Hurwitz matrix. Therefore, there must exist two positive constants M2 < ∞ and β2 such that kD(lm −m) Ẑ(t)k2 = ke(IN ⊗E⊗Ip −L2 ⊗Ke G⊗Ip )t k2 kẐ (lm −m) (0)k2 ≤ M2 e−β2 t . Replacing Dl eji (t) with (zjl (t) − zil (t)), l = 1, · · · , m − 1, the containment algorithm (13) is modified as ui (t) = X lX m −1 αij j∈M∪N κl Dm−l−1 eji (t) , + 5 6 2 4 8 7 3 Fig. 2. The interaction topology of the MAS in the Simulation Example of Section IV. l=m−1 m−2 X 1 ! TABLE I VALUES OF C OEFFICIENTS aij IN (18). κl (zj(m−l) (t) − zi(m−l) (t)) . (15) l=0 agent Theorem 3. Assume all leaders move along their polynomial trajectories described by (4); and all followers are described by high-order integral dynamics (12). The containment problem can be solved by (15) with K = (κlm −1 , · · · , κ0 ) = εF T P , where ε is defined in Theorem 1 and P is defined in Theorem 2. Proof: By applying the containment algorithm defined by (15), it can be obtained that DΞ̂F (t) = R1 Ξ̂F (t) − R2 D(lm −m) Ẑ(t), (16) where Ξ̂F (t) is defined in the proof of Theorem 2; R1 = IN ⊗ E ⊗ Ip − L2 ⊗ F K ⊗ Ip ; R2 = L2 ⊗ F K2 ⊗ Ip and K2 = (0, κm−2 , · · · , κ0 ). solution to (16) is Ξ̂F (t) = eR1 t Ξ̂F (0) + R t The R1 (t−τ ) e R2 D(lm −m) Ẑ(τ )dτ , which together with Theorem 0 2 and Lemma 2 leads to kΞ̂F (t)k2 ≤keR1 t k2 kΞ̂F (0)k2 Z t + keR1 (t−τ ) k2 kR2 k2 kD(lm −m) Ẑ(τ )k2 dτ e−β1 t −e−β2 t β1 −β2 −β1 t M1 M2 kR2 k2 lim te t→∞ ai2 ai3 2 2 5   0.3 3.43   0.0095 −0.075   0 0.0005  3  −5 10   0.2 3.43   0.01 −0.075   0 0.0005  4  −10 0   0.2 3.43   0.01 −0.075   0 0.0005 the selected agent is another follower, the calculated absolute position is obviously inaccurate. Next, a simulation example is provided to demonstrate the effectiveness of the proposed algorithm. Simulation Example: Consider a MAS composed of eight agents, whose communication topology is shown in Fig. 2. It is easy to see that agents 1 to 4 are leaders and agents 5 to 8 are followers. The ith row and the jth column entry of the adjacency matrix satisfies that αij = 1 if there is a directed edge from agent j to agent i, otherwise αij = 0. The ith leader’s move along the trajectory defined by the following polynomial 2 where Σ1 (t)R = M1 e−β1 t kΞ̂F [0]k2 and Σ2 (t) = t −β1 (t−τ ) −β2 τ M1 M2 kR2 k2 0 e e dτ . It is easy to see that limt→∞ Σ1 (t) = 0 and t→∞ ai1 1 0 0   0.23 3.43   0.0095 −0.75   0 0.0005 xi (t) = ai0 + ai1 t + ai2 t2 + ai3 t3 , 0 ≤Σ1 (t) + Σ2 (t), lim Σ2 (t) = t→∞  M1 M2 kR2 k2 lim ai0 = 0, = 0, if β2 6= β1 if β1 = β2 . (17) Therefore, limt→∞ kΞ̂F (t)k2 = 0. By Lemma 1, the containment problem is solved. Remark 2. Since the leader sends its absolute position to the connected followers, one may wonder whether these followers can calculate their own absolute positions by their relative positions with the leader and the leader’s absolute position. However, this idea does not work because the follower can receive the position information not only from the leader (accurate position) but also other followers (estimated positions, not accurate). Due to the nature of distributed control of MASs, the follower cannot distinct the leader from other neighbor agents. Hence the follower can only randomly pick up one agent in its neighborhood to calculate its absolute position. If aij (18) 2 where xi (t) ∈ R and the coefficients ∈ R are given in TABLE I. The (i − 4)th follower (i = 5, 6, 7, 8) has the (3) third-order integral dynamics, i.e., xi (t) = ui (t). The control algorithm (15) is applied to solve this containment problem. By Theorem 2, the parameters in algorithm (15) are set to be K = (κ3 , κ2 , κ1 , κ0 ) = (2, 6.1554, 8.4721, 6.1554). The simulation result is given in Fig. 3. As shown in Fig. 3, all followers are convergent into the convex hull spanned by the leaders and move along with them. Therefore, the proposed algorithm is able to effectively solve the containment problem with dynamic leaders. V. E XTENSIONS TO MAS S IN D ISCRETE -T IME D OMAIN In this subsection, the containment problem is studied in the discrete-time domain. The ith leader is assumed to move along the following polynomial trajectory xi [k] = ai0 + ai1 k + · · · + ain k n , p aij p (19) where xi [k] ∈ R and ∈R . In this section, the symbol D denotes the difference operator (namely, Dx[k] = x[k + 1] − x[k]). The inversion Pk−1of the difference operator D is defined as D−1 x[k] = i=0 x[k]. It is easy to see that D(D−1 x[k]) = x[k]. 7 x2 100 90 Theorem 4. Assume all leaders move along their polynomial trajectories described by (19); and all followers are described by the single-integrator dynamics (20). Let P denote the positive definite solution to the following matrix inequality Trajectories of Leaders Trajectories of Followers 80 70 P > ÂT P  − (1 − ε2 )ÂT P B(B T P B)−1 B T P Â, 60 50 where ε ∈ (maxi∈{1,2,··· ,N } |1 − λ̂i |, 1), and {λ̂i ; i = 1, · · · , N } are the eigenvalues of L̂2 . If the order of the polynomial disturbance δi [k] in (20) is not greater than n − 1 (namely, r ≤ n − 1), then the containment problem in the discrete-time domain can be solved by the P I n -type algorithm defined by (21) with K = (B T P B)−1 B T P Â. 40 30 20 10 0 Fig. 3. IV. (24) 0 20 40 60 80 100 120 x1 Moving profiles of all agents in the Simulation Example of Section Proof: Since r ≤ n−1, it can be obtained that Dn δi [k] = 0p . This together with (23) leads to that Ξ̂F [k] = (IN ⊗  ⊗ Ip − L̂2 ⊗ BK ⊗ Ip )k Ξ̂F [0]. A. Followers with Single-Integrator Dynamics In this subsection, the (i − M )th follower (i ∈ N ) is described by the following single-integrator dynamics Dxi [k] = ui [k] + δi [k], (20) where xi [k] ∈ Rp denotes the position of the (i − M )th follower; ui [k] ∈ Rp is the control input, δi [k] = bi0 + bi1 k + · · · + bir k r ∈ Rp is the polynomial disturbance, and bij ∈ Rp (j = 0, · · · , r). Motivated by (6), the following discrete-time P I n -type algorithm is proposed X n 1 X −l ui [k] = κl D αij eji [k] 1 + di j∈M l=0  X + αij eji [k] , (21) j∈N where eji [k] = xj [k] − xi [k]. Let ξi [k] = (xTi [k], DxTi [k], · · · , Dn xTi [k])T , T T T ΞL [k] = (ξ1 [k], · · · , ξM [k])T and ΞF [k] = (ξM +1 [k], T T · · · , ξM +N [k]) . Substituting (21) into (20) obtains the following closed-loop dynamics   DΞL [k] = (IM ⊗ A ⊗ Ip )ΞL [k],     DΞF [k] = IN ⊗ A ⊗ Ip   −(IN + D)−1 L2 ⊗ BK ⊗ Ip ΞF [k] (22)     − (IN + D)−1 L1 ⊗ BK ⊗ Ip ΞL [k]     +(IN ⊗ B ⊗ Ip )∆[k], where D = diag(dM +1 , · · · , dM +N ), ∆[k] = T n T diag(Dn δM [k], · · · , D δ [k]), K = (κ , · · · , κ n−1 0 ); +1 M +N A and B are defined in (7). It follows from (22) that Ξ̂F [k + 1] = (IN ⊗  ⊗ Ip − L̂2 ⊗ BK ⊗ Ip )Ξ̂F [k] +(IN ⊗ B ⊗ Ip )∆[k], (23) where Ξ̂F [k] = ΞF [k] + (L−1 2 L1 ⊗ I(n+1)p )ΞL [k],  = A + −1 In+1 and L̂2 = (IN +D) L2 . By Lemma 1, if every element in Ξ̂F [k] is convergent to zero, then the containment problem is solved. By the Gerschgorin circle theorem and Lemma 1, all eigenvalues of L̂2 are inside the open circle U (1, 1) , {a + bj|a, b ∈ R and (a − 1)2 + b2 < 1}. Therefore, the set (maxi∈{1,2,··· ,N } |1 − λi |, 1) is not empty. By Lemma 5 in [39], we know that the matrix inequality Q (24) has a positive definite solution P as long as |ε| < 1/ i |λui (Â)|, where {λui } are the unstable eigenvalues of Â. Since all unstable eigenvalues of  are 1, (24) has a positive definite solution P. Next, it is proved all eigenvalues of  − λ̂i BK are inside the unit circle. From (24), it can be calculated that ( − λ̂i BK)H P ( − λ̂i BK) − P ¯ ¯ =(ÂT P  − P ) − (λ̂i + λ̂i − λ̂i λ̂i )ÂT P B(B T P B)−1 B T P  <(1 − δ 2 )ÂT P B(B T P B)−1 B T P  ¯ −(1 − (1 − λ̂i )(1 − λ̂i ))ÂT P B(B T P B)−1 B T P  =(|1 − λ̂i |2 − ε2 )ÂT P B(B T P B)−1 B T P  ≤ 0. By Lyapunov stability theory, all eigenvalues of  − λ̂i BK are inside the unit circle. By Schur decomposition, there must exist a transformation matrix T such that   λ1 ∗ · · · ∗  0 λ2 · · · ∗    Λ , T L̂2 T −1 =  . . ..  . .. ..  .. . .  0 0 ··· λN Hence, IN ⊗  ⊗ Ip − L̂2 ⊗ BK ⊗ Ip = ((T −1 ⊗ In )(IN ⊗  − Λ ⊗ BK)(T ⊗ In )) ⊗ Ip . (25) The diagonal elements of IN ⊗  − Λ ⊗ BK are  − λ̂i BK (i = 1, · · · , N ). Therefore, all eigenvalues of IN ⊗  − Λ ⊗ BK are inside the unit circle. Hence, there must exist two positive constants M3 < ∞ and β3 ∈ (0, 1) such that k(IN ⊗  ⊗ Ip − L̂2 ⊗ BK ⊗ Ip )k k2 ≤ M3 β3k and kΞ̂F [k]k2 ≤ M3 β3k kΞF (0)k2 → 0 (k → ∞). 8 In (21), the coefficient 1/(1 + di ) is used to normalize the Laplacian matrix. If we replace 1/(1 + di ) with a uniform constant µ, then the algorithm (21) is modified as X  n X X ui [k] = µ κl D−l αij eji [k] + αij eji [k] . (26) l=0 j∈M j∈N Let {λ1 , · · · , λN } denote the eigenvalues of L2 . Then by Lemma 1, we know <(λi ) > 0. Hence, there must exist a positive constant µmin ∈ (0, 1) such that maxi |1 − µmin λi | < 1. Following the same procedure of Theorem 4, the following corollary can be easily obtained. Corollary 1. Let P denote the positive definite solution to the following matrix inequality P > ÂT P  − (1 − γ 2 )ÂT P B(B T P B)−1 B T P Â, (27) where γ ∈ (εmax , 1) and εmax = maxi {|1−µmin λi |} < 1. The containment problem of MASs in the discrete time domain can be solved by the algorithm (26) with K = (B T P B)−1 B T P  and µ = µmin . Remark 3. Compared to the previous results [9], [15], [20], [21], [28], [30], one distinguished feature of this paper is that the proposed algorithms do not employ the “sign” function. One limitation of the “sign” function is that it can cause the harmful “chattering” phenomenon. Therefore, the proposed algorithm can avoid the high-frequency control switches occurred in the “chattering” phenomenon. Moreover, the “sign” function can hardly be used in the discrete-time domain. The current literature rarely discusses the containment problem with dynamic leaders in the discrete-time domain, and this paper gives a preliminary attempt. B. Containment Control of MASs with Measurement Noises In the above sections, it is assumed that all followers can accurately measure the relative states between themselves and their neighbors. However, the measurement noise is unavoidable in practice. In this subsection, it is assumed that the relative state eji [k] is corrupted by the measurement noise ρji ηji [k], where ρji = diag(ρji1 , · · · , ρjip ), ρijs < ∞ (s = 1, · · · , p) denotes the noise intensity; and ηij [k] ∈ Rp is the standard white noise vector. Moreover, it is assumed that {ηji [k]|j ∈ M ∪ N ; i ∈ N } are mutually independent. Denote ēji [k] = eji [k] + ρji ηji [k]. The containment P I n type algorithm (21) is modified as X n 1 X κl D−l αij ēji [k] ui [k] = 1 + di j∈M l=0  X + αij ēji [k] . (28) j∈N The definition of the containment problem should also be modified to take the noise effect into account. Definition 3. The containment problem of MASs with measurement noises is solved in the stochastic sense if limt→∞ dis(E(xi [k]), coL [k]) = 0 and E(dis(xi [k], coL [k]))2 < ∞, i ∈ N . Theorem 5. Assume all leaders move along their polynomial trajectories described by (19); and all followers are described by the single-integrator dynamics (20). If the order of the polynomial disturbance δi [k] in (20) is not greater than n − 1 (namely, r ≤ n − 1), then the containment algorithm (28) with K = (B T P B)−1 B T P  (P is defined in Theorem 4) can solve the containment problem of MASs with measurement noises in the stochastic sense. Proof: Since r ≤ n − 1, the closed-loop dynamics (23) can be rewritten as Ξ̂F [k + 1] = (IN ⊗  ⊗ Ip − L̂2 ⊗ BK ⊗ Ip )Ξ̂F [k] + ((IN + D)−1 Γ ⊗ BK ⊗ Ip )V [k], (29) where Γ = diag(ΓM +1 , · · · , ΓM +N ), V [k] = T T T (VM Γi = (αi1 ρ1i , · · · , +1 [k], · · · , VM +N [k]) , T T T [k], · · · , ν(M αi(M +N ) ρ(M +N )i ), Vi [k] = (ν1i +N )i [k]) , n T and νji [k] = (ηji [k], Dηji [k], · · · , D ηji [k]) . Let R3 = IN ⊗  ⊗ Ip − L̂2 ⊗ BK ⊗ Ip and R4 = (IN + D)−1 Γ ⊗ BK ⊗ Ip . By (29), it is obtained that Ξ̂F [k] = R3k Ξ̂F [0] + k−1 X R3k−i−1 R4 V [i]. (30) i=0 From the proof of Theorem 4, we know that there exist two finite positive constants M3 and β3 ∈ (0, 1) such that kR3k kF ≤ M3 β3k . Hence limk→∞ R3k Ξ̂F [0] = 0p(n+1)N . Pk−1 By Lemma 6, we know that E( i=0 R3k−i−1 R4 V [i]) = Pk−1 k−i−1 R4 E(V [i]) = 0p(n+1)N . Therefore, i=0 R3 lim E(Ξ̂F [k]) = lim R3k Ξ̂F [0] = 0p(n+1)N , k→∞ (31) k→∞ which together with Lemma 1 leads to that limt→∞ dis(E(xi [k]), coL [k]) = 0, i ∈ N . Pk−1 Let Y1 [k] = R3k Ξ̂F [0] and Y2 [k] = i=0 R3k−i−1 R4 V [i]. Since limk→∞ kY1 [k]k2 = 0, there must exist a finite positive constant M̂3 such that kY1 [k]k2 < M̂3 . By Lemma 5, we know that ∀m ∈ {0, 1, 2 · · · , n}, there exists a finite positive constant M̄3 such that kE(V [k]V T [k + m])kF < M̄3 . And for ∀m ≥ n + 1, E(V [k]V T [k + m]) = 0N (M +N )(n+1)p×N (M +N )(n+1) holds. Therefore, kE(Y2 [k]Y2T [k])kF = E k−1 X k−1 X R3k−i−1 R4 V [i]V T [j]R4T R3k−j−1 i=0 j=0 = E F k−1 X min{k−1,i+n} X R3k−i−1 R4 V [i]V T [j]R4T R3k−j−1 i=0 j=max{0,i−n} ≤ T T F k−1 i+n X X kR3k−i−1 kF kR4 k2F kE(V [i]V T [j])kF kR3k−j−1 kF i=0 j=i−n ≤ M32 M̄3 kR4 k2F k−1 i+n X X β32k−i−j−2 i=0 j=i−n (1 − β 2k )(1 − β32n+1 ) < ∞, = M32 M̄3 kR4 k2F n 3 β3 (1 − β3 )(1 − β32 ) 9 which leads to that EkY2 [k]k22 ≤ kE(Y2 [k]Y2T [k])k2F < ∞. Therefore, Lemma 3. Let Ke = ẼP GT (GP GT )−1 where P is the positive definite solution to the following matrix inequality EkΞ̂F [k]k22 ≤ 2EkY1 [k]k22 + 2EkY1 [k]k22 < ∞, P > ẼP Ẽ T − (1 − ε2 )ẼP GT (GP GT )−1 GP Ẽ T , which together with Lemma E(dis(xi [k], coL [k]))2 < ∞, i ∈ N . 1 leads to that C. Followers with High-Order Integral Dynamics In this subsection, the dynamics of the (i − M )th follower (i ∈ N ) is described by the following high-order difference equation Dm xi [k] = ui [k], (32) where xi [k] ∈ Rp is the position vector of the (i − M )th follower; and ui [k] ∈ Rp is the control input. Motivated by the algorithm (13), the following P I lm −m Dm−1 -type containment algorithm is proposed ui [k] = X lX m −1 1 κl Dm−l−1 αij eji [k] 1 + di j∈M l=0 + X  αij eji [k] , (33) j∈N where ε ∈ (maxi∈{1,2,··· ,N } |1 − λ̂i |, 1) and Ẽ = Im + Ē. Then there exist two positive constants M5 < ∞ and β5 ∈ (0, 1) such that kDlm −m Ẑ[k]k2 ≤ M5 β5k , where T T T Ẑ[k] = (ẑM +1 [k], · · · , ẑM +N [k]) , ẑi [k] = zi [k] − ζi [k] and T T m−1 T ζi [k] = (xi [k], Dxi [k], · · · , D xi [k])T . Proof: From (32) and (34), it can be obtained that Ẑ[k + 1] = ((IN ⊗ Ẽ − L2 ⊗ Ke G) ⊗ Ip )Ẑ[k], which implies that Dlm −m Ẑ[k + 1] = ((IN ⊗ Ẽ − L2 ⊗ Ke G) ⊗ Ip )Dlm −m Ẑ[k]. Following the same procedure of the proof of Theorem 4, it can be easily proved that all eigenvalues of IN ⊗ Ẽ ⊗ Ip − L2 ⊗ Ke G ⊗ Ip are inside the unit circle. Hence, there exist two positive constants M5 < ∞ and β5 ∈ (0, 1) such that kDlm −m Ẑ[k]k2 ≤ k(IN ⊗ Ẽ − L2 ⊗ Ke G)k k2 kDlm −m Ẑ[0]k2 ≤ M5 β5k . Replacing Dl eji [k] with zjl [k] − zil [k] (l = 1, · · · , m − 1) in (33) obtains the following modified containment algorithm: where lm = max{n + 1, m}. Theorem 6. Assume all leaders move along their polynomial trajectories described by (19); and all followers are described by the high-order integral dynamics (32). Let P denote the positive definite solution to the following matrix inequality T 2 T T P > Ê P Ê − (1 − ε )Ê P F (F P F ) −1 T F P Ê, where ε ∈ (maxi∈{1,2,··· ,N } |1 − λ̂i |, 1), Ê = Ilm + E, E and F are defined in Theorem 2. The containment problem can be solved by (33) with K = (κlm −1 , · · · , κ0 ) = (F T P F )−1 F T P Ê. ξi [k] = (xTi [k], DxTi [k], · · · , T [k])T , ΞL [k] = (ξ1T [k], · · · , ξM T T T ΞF [k] = (ξM +1 [k], · · · , ξM +N [k]) and Ξ̂[k] = ΞF [k] + (L−1 L ⊗ I )Ξ [k]. Following the same 1 lm p L 2 procedure of the proof of Theorem 4, it can proved that there exist two positive constants M4 < ∞ and β4 ∈ (0, 1) such that k(IN ⊗ Ê − L̂2 ⊗ F K)k k2 ≤ M4 β4k and limk→∞ kΞ̂[k]k2 ≤ limk→∞ M4 β4k kΞ̂[0]k2 = 0. If {Deji [k], · · · , Dm−1 eji [k]} in (33) are not available for the algorithm design, motivated by (14), the following estimator is designed to estimate the (i − M )th follower’s position and the position’s differences up to the (m − 1)thorder, i ∈ N . Let Proof: Dlm −1 xTi [k])T , (Ke ⊗ Ip ) 1 + di M +N   X × αij (G ⊗ Ip )(zj [k] − zi [k]) − eji [k] , (34) Dzi [k] = (Ē ⊗ Ip )zi [k] + (F̄ ⊗ Ip )ui [k] + j=1 T T where zi [k] = (zi1 [k], · · · , zim [k]T )T ; Ke , Ē, F̄ and G are defined in (14). ui [k] = 1 1 + di + X j∈M∪N m−2 X αij lX m −1 κl Dm−l−1 eji [k] , l=m−1 ! κm−l−1 (zj(m−l) [k] − zi(m−l) [k]) . (35) l=0 Theorem 7. Assume all leaders move along their polynomial trajectories described by (19); and all followers are described by the high-order-integral dynamics (32). The containment problem of MASs can be solved by (35) with K = (κlm −1 , · · · , κ0 ) = (F T P F )−1 F T P Ê, where P is the solution to the following matrix inequality P > Ê T P Ê − (1 − ε2 )Ê T P F (F T P F )−1 F T P Ê, where ε ∈ (maxi∈{1,2,··· ,N } |1 − λ̂i |, 1). Proof: By applying the containment algorithm defined by (15), the closed-loop dynamics of the MAS can be rewritten in the following compact form  DΞL [k] = (IM ⊗ E ⊗ Ip )ΞL [k],    DΞ [k] = (I ⊗ E ⊗ I − L̂ ⊗ F K ⊗ I )Ξ [k] F N p 2 p F (36) −1  −((I + D) L ⊗ F K ⊗ I )Ξ N 1 p L [k]    −(L̂2 ⊗ F K2 ⊗ Ip )Dlm −m Ẑ[k], where K2 = (0, κm−2 , · · · , κ0 ); ΞL [k] and ΞF [k] are defined in Theorem 6. Let Ξ̂F [k] = ΞF [k] + (L−1 2 L1 ⊗ Ilm p )ΞL [k]. Then it is derived from (36) that Ξ̂F [k + 1] = R5 Ξ̂F [k] − R6 Dlm −m Ẑ[k], (37) where R5 = IN ⊗ Ê ⊗ Ip − L̂2 ⊗ F K ⊗ Ip and R6 = L̂2 ⊗ F K2 ⊗ Ip . 10 follows from (37) that Ξ̂F [k] = R5k ΞF [0] + PIt k−1 k−l−1 R6 Dlm −m Ẑ[l]. This together with the proof of l=0 R5 Theorem 6 and Lemma 3 implies that k−1 X kR5k−l−1 k2 kR6 k2 kDlm −m Ẑ[l]k2 l=0 + kR5k k2 kΞF [0]k2 ≤ Σ1 [k] + Σ2 [k], (38) where Σ1 [k]P = M4 β4k kΞF [0]k2 k−1 k−l−1 l M4 M5 kR6 k2 l=0 β4 β5 . It is limk→∞ Σ1 [k] = 0 and  k k M4 M5 kR6 k2 lim β5 −β4 β −β 4 k→∞ 5 lim Σ2 [k] = M4 M5 kR6 k2 lim kβ4k−1 k→∞ k→∞ and Σ2 [k] calculated = that The center point of the mobile robot (x c i, y c i) kΞ̂F [k]k2 ≤ The center point between two driving wheels Passive wheel d θi (xi , y i) Driving wheels = 0, if β4 6= β5 = 0, if β4 = β5 . Fig. 4. The schematic diagram of the ith nonholonomic mobile robot. Hence, limk→∞ kΞ̂F [k]k2 = 0. By Lemma 1, the containment problem is solved. D. Applications: Coordinated Control of a Group of Mobile Robots In order to demonstrate the practical value of the proposed algorithm, this section provides an application example: the coordinated control of a group of mobile robots. Consider the scenario shown in Fig. 1, where a group of mobile robots are required to move across a partially unknown area through a narrow safe tunnel. There are three master robots and three slave robots. As claimed in Introduction Section, the master robots are capable of self-navigation; and the slave robots can measure the relative positions with neighbor robots. Each robot is a differential drive mobile robot. The schematic diagram of the ith mobile robot is given in Fig. 4. The coordinate of the center point between two driving wheels is denoted by (xi , yi ). The coordinate of the center of the ith mobile robot is denoted by (xci , yic ). The ith mobile robot’s kinematics is described by   ẋi (t) = vi (t) cos(θi ) (39) ẏi (t) = vi (t) sin(θi ) ,   θ̇i (t) = ωi (t) where θi is the orientation of the ith mobile robot with respect to the horizontal axis; vi and ωi are the linear velocity and the angular velocity of the ith robot, respectively. Unfortunately, the proposed algorithm cannot be directly applied to this kind of mobile robots due to its nonlinear kinematics. To deal with this challenge, we reformulate (39) at the point (xci , yic ) by the feedback linearization [40]: ϕ̇i (t) = ui (t), where ϕi (t) = (xci (t), yic (t))T , ui (t) = (uxi (t), uyi (t)), uxi (t) = vi (t) cos(θi ) − dωi (t) sin(θi ) and uyi (t) = vi (t) sin(θi ) + dωi (t) cos(θi ). In the rest of this paper, the mobile robot is simply denoted by the coordination of its center point (e.g. the ith robot is denoted by ϕi (t)). TABLE II T HE COORDINATE VALUES OF ALL REFRENCE POINTS . ``` ``` Leader ``` Time (k) 0 30 60 90 120 150 1 2 3 (0, 25) (110, 8) (200, 50) (300, 120) (405, 155) (475, 150) (20, −5) (130, −15) (230, 35) (335, 100) (440, 130) (510, 130) (−10, −20) (100, −35) (210, 0) (315, 70) (410, 110) (480, 110) Remark 4. According to the above analysis, the control inputs of the ith mobile robot are vi (t) and wi (t), which can be easily obtained from ui (t) by using the following transformation     cos(θi ) sin(θi ) vi (t) = u (t). ωi (t) − d1 sin(θi ) d1 cos(θi ) i Due to the wide use of digital devices, it is assumed that only the sampled data at each sampling instant is available. Assume that the sampling period is T = 1. For any signal s(t), the sampled data s(kT ) at the kth sampling instance is denoted by s[k]. By adopting the zero-order holder strategy, the ith robot’s behavior is described by the following discretetime difference equation ϕi [k + 1] = ϕi [k] + ui [k]. (40) Moreover, in this application, it is assumed that the robot’s dynamics (40) is disturbed by the polynomial disturbance δi [k] = 12 ⊗(1+0.2k −0.01k 2 +0.001k 3 ). The corresponding dynamics of the ith robot can therefore be written as ϕi [k + 1] = ϕi [k] + ui [k] + δi [k]. The task shown in Fig. 1 can be accomplished by adopting the control strategy introduced in Introduction Section. For each master robot, we select six reference points inside the safe tunnel. The coordinates of these reference points are shown in Table II. By the polynomial interpolation, we can obtain the reference trajectory which goes though these points. The trajectory of the ith master robot is ϕi [k] = ai5 k 5 + ai4 k 4 + ai3 k 3 + ai2 k 2 + ai1 k + ai0 . (41) The coefficients aij in (41) are given in Table III. Because the 11 TABLE III VALUES OF COEFFICIENTS aij IN (41). ‘ x2 140 120 Leader ai0 ai1 ai2 × 102 ai3 × 104 ai4 × 106 ai5 × 108 1 0  25  4.625  −1.028  −4.560 −0.7963   5.092  10.77  1.800 −10.91 0 3.086 2 1 2  20.00 −5.000 4.100 −1.392 −1.944 2.801 1.698  4.167  0  −6.430  −0.3429 2.058  3  −10.00  −20.00  3.544 −0.3833 0.7407 −3.796 −1.389  15.05  1.029  −1.337  −0.3429 3.601  5 4 6 3 Fig. 5. Interaction topology: nodes 1, 2 and 3 denote master robots; nodes 4, 5 and 6 denote slave robots. master robots are capable of self-navigation, the master robots can autonomously move along their reference trajectories. The communication topology of the multi-robot system is shown in Fig. 5. If there is a directed edge from node j to node i, then the ith robot can measure the relative position eji [k] between itself and robot j. By Section V-B, the control input of the (i − 3)th slave robot (i = 4, 5, 6) is designed as: ui [k] = 5 6 X X 1 κl D−l αij (eji [k] + ρji ηji [k]), (42) (1 + di ) j=1 l=0 where ρji ηji [k] is the measurement noise; αij = 1 if there is a directed edge from robot j to robot i, otherwise αij = 0. By Theorem 4, the parameters (k6 , k5 , · · · , k0 ) are set to be (1.806, 0.4769, 0.0786, 0.0085, 5.660 × 10−4 , 1.826 × 10−5 ). In order to verify the effectiveness of the algorithm (42), a simulation is carried out. The simulation results are shown in Fig. 6. Despite of the existence of the disturbance and the measurement noise, all slave robots are convergent into the convex hull spanned by the master robots and move along with them. VI. C ONCLUSIONS n A P I -type containment algorithm is proposed for solving the containment problem of MASs in both the continuous-time domain and the discrete-time domain. Leaders in the MAS are assumed to be the polynomial trajectories. Followers are described by the single-integrator dynamics and the high-order integral dynamics. It is proved that the proposed algorithm can solve the containment problem if for each follower, there is at least one leader which has a directed path to this follower. Compared to the previous results, (1) the containment problem is studied not only in the continuous-time domain but also in the discrete-time domain; (2) the proposed algorithm can 100 80 60 40 Reference Points Trajectories of Master Robots Trajectories of Slave Robots 20 0 −20 −40 0 Fig. 6. 50 100 150 200 250 300 350 400 450 500 x1 Moving profiles of all robots. solve the containment problem with dynamic leaders even if followers are described by the single-integrator dynamics; (3) there is no non-smooth “sign” function in the proposed algorithm; and (4) effects of both the disturbance and the measurement noise are taken into account. A potential application, the containment control of networked multiple mobile robots, is presented to demonstrate the practical value of the proposed algorithm. A PPENDIX A Lemma 4. For any sequence of numbers {x[k]|k = 0, 1, 2, · · · }, the following formula holds   n X n Dn x[k] = (−1)i x[k + n − i], n = 1, 2, · · · . (43) i i=0 Proof: If n = 1, the correctness of (43) can be easily verified. Assume when n = m, (43) is correct. It can be calculated that   m X m+1 m i m D x[k] = D(D x[k]) = D (−1) x[k + m − i] i i=0   m X i m (−1) (x[k + m − i + 1] − x[k + m − i]) = i i=0   m X i m = (−1) x[k + m − i + 1] i i=0   m+1 X m + (−1)i x[k + m − i + 1] i−1 i=1     m X m m = (−1)i+1 + x[k + m − i + 1] i i−1 i=1 + x[k + m + 1] + (−1)m+1 x[k]   m X m+1 = (−1)i+1 x[k + m − i + 1] i i=1 + x[k + m + 1] + (−1)m+1 x[k]   m+1 X m+1 = (−1)i x[k + m + 1 − i]. i i=0 By the mathematical induction, it is proved that (43) holds. 12 Lemma 5. Define a random vector ν[k] = (η[k], Dη[k], · · · , Dn η[k])T , where η[k] is the standard white noise. For ∀m ∈ {0, 1, 2 · · · , n}, there exists a finite positive constant G such that kE(ν[k]ν T [k + m])kF < G. For ∀m ≥ n + 1, the following equation holds E(ν[k]ν T [k + m]) = 0(n+1)×(n+1) . Proof: The ith row and the jth column entry of ν[k]ν T [k + m] is Di−1 η[k]Dj−1 η[k + m]. By Lemma 4, we know Di−1 η[k]Dj−1 η[k + m] is a linear combination of the following terms η[k + i − 1 − s]η[k + m + j − 1 − t], where s ∈ {0, 1, · · · , i − 1} and t ∈ {0, 1, · · · , j − 1}. If m ∈ {0, 1, 2 · · · , n − 1}, then ∀s ∈ {0, 1, · · · , i − 1} and ∀t ∈ {0, 1, · · · , j − 1}, |E(η[k + i − 1 − s]η[k + m + j − 1 − t])|2 = ( 0, m + j − i + s − t 6= 0 1, m + j − i + s − t = 0 . Hence, there must exist a finite positive constant G1 such that |E(Di−1 η[k]Dj−1 η[k + m])|2 < G1 , which follows that kE(ν[k]ν T [k + m])kF < q (n + 1)2 G21 = (n + 1)G1 . Let G = (n + 1)G1 < ∞. Then kE(ν[k]ν T [k + m])k2 < G. If m ≥ n + 1, then k + m + j − 1 − t ≥ k + n + 1 + j − 1 − (j − 1) = k + n + 1 and k + i − 1 − s ≤ k + n + 1 − 1 − 0 = k + n. Hence, E(η[k + i − 1 − s]η[k + m + j − 1 − t]) = 0, which leads to that E(Di−1 η[k]Dj−1 η[k +m]) = 0. Therefore E(ν[k]ν T [k + m]) = 0(n+1)×(n+1) . Lemma 6. The standard white noise η[k] has the following property: E(Dl η[k]) = 0, l = 0, 1, 2, · · · . (44) Proof: It is easy to see E(D0 η[k]) = E(η[k]) = 0. Assume that E(Dj η[k]) = 0. Then it can be obtained that E(Dj+1 η[k]) = E(Dj η[k + 1] − Dj η[k]) = E(Dj η[k + 1]) − E(Dj η[k]) = 0. By the mathematic induction, it is proved that E(Dl η[k]) = 0, l = 0, 1, 2, · · · . R EFERENCES [1] W. Hu, L. Liu, and G. Feng, “Consensus of linear multi-agent systems by distributed event-triggered strategy,” IEEE Transactions on Cybernetics, in press, DOI: 10.1109/TCYB.2015.2398892, 2015. [2] S. Li, G. Feng, X. Luo, and X. Guan, “Output consensus of heterogeneous linear discrete-time multiagent systems with structural uncertainties,” IEEE Transactions on Cybernetics, in press, DOI: 10.1109/TCYB.2015.2388538, 2015. [3] Z.-G. Hou, L. Cheng, and M. Tan, “Decentralized robust adaptive control for the multiagent system consensus problem using neural networks,” IEEE Transactions on Systems, Man, and Cybernetics, Part B: Cybernetics, vol. 3, no. 39, pp. 636–647, 2009. [4] L. Cheng, Z.-G. Hou, M. Tan, Y. Lin, and W. Zhang, “Neural-networkbased adaptive leader-following control for multi-agent systems with uncertainties,” IEEE Transactions on Neural Networks, vol. 8, no. 21, pp. 1351–1358, 2010. [5] R. Vaughan, N. Sumpter, J. Henderson, A. Frost, and S. Cameron, “Experiments in automatic flock control,” Robotics and Autonomous Systems, vol. 30, no. 1–2, pp. 109–117, 2000. [6] M. A. Haque, M. Egerstedt, and C. F. Martin, “First-order, networked control models of swarming silkworm moths,” in Proceedings of American Control Conference, Seattle, USA, 2008, pp. 3798–3803. [7] L. Galbusera, G. Ferrari-Trecate, and R. Scattolini, “A hybrid model predictive control scheme for containment and distributed sensing in multi-agent systems,” Systems & Control Letters, vol. 62, no. 5, pp. 413–419, 2013. [8] L. E. Parker, B. Kannan, X. Fu, and Y. Tang, “Heterogeneous mobile sensor net deployment using robot herding and line-of-sight formations,” in Proceedings of the 2003 IEEE/RSJ International Conference on Intelligent Robots and Systems, Las Vegas, USA, 2003, pp. 2488–2493. [9] Y. Cao, D. Stuart, W. Ren, and Z. Meng, “Distributed containment control for multiple autonomous vehicles with double-integrator dynamics: Algorithms and experiments,” IEEE Transactions on Control Systems Technology, vol. 19, no. 4, pp. 929–938, 2011. [10] Y. Wang, L. Cheng, Z.-G. Hou, M. Tan, and H. Yu, “Coordinated transportation of a group of unmanned ground vehicles,” in Proceedings of The 34th Chinese Control Conference and SICE Annual Conference 2015, Hangzhou, China, 2015, pp. 7027–7032. [11] D. Dimarogonas, M. Egerstedt, and K. Kyriakopoulos, “A leader-based containment control strategy for multiple unicycles,” in Proceedings of the 45th IEEE Conference on Decision and Control, San Diego, USA, 2006, pp. 5968–5973. [12] G. Ferrari-Trecate, M. Egerstedt, A. Buffa, and M. Ji, “Laplacian sheep: A hybrid, stop-go policy for leader-based containment control,” in Proceedings of the 9th International Workshop on Hybrid Systems: Computation and Control, Santa Barbara, USA, 2006, pp. 212–226. [13] M. Ji, G. Ferrari-Trecate, M. Egerstedt, and A. Buffa, “Containment control in mobile networks,” IEEE Transactions on Automatic Control, vol. 53, no. 8, pp. 1972–1975, 2008. [14] G. Notarstefano, M. Egerstedt, and M. Haque, “Containment in leaderfollower networks with switching communication topologies,” Automatica, vol. 47, no. 5, pp. 1035–1040, 2011. [15] Y. Cao, W. Ren, and M. Egerstedt, “Distributed containment control with multiple stationary or dynamic leaders in fixed and switching directed networks,” Automatica, vol. 48, no. 8, pp. 1586–1597, 2012. [16] Z.-J. Tang, T.-Z. Huang, and J.-L. Shao, “Containment control of multiagent systems with multiple leaders and noisy measurements,” Abstract and Applied Analysis, vol. 2012, Article ID 262153, 2012. [17] X. Wang, S. Li, and P. Shi, “Distributed finite-time containment control for double-integrator multiagent systems,” IEEE Transactions on Cybernetics, vol. 9, no. 44, pp. 1518–1528, 2014. [18] H. Liu, G. Xie, and L. Wang, “Necessary and sufficient conditions for containment control of networked multi-agent systems,” Automatica, vol. 48, no. 7, pp. 1415–1422, 2012. [19] J. Li, Z.-H. Guan, R.-Q. Liao, and D.-X. Zhang, “Impulsive containment control for second-order networked multi-agent systems with sampled information,” Nonlinear Analysis: Hybrid Systems, vol. 12, pp. 93–103, 2014. [20] J. Li, W. Ren, and S. Xu, “Distributed containment control with multiple dynamic leaders for double-integrator dynamics using only position measurements,” IEEE Transactions on Automatic Control, vol. 57, no. 6, pp. 1553–1559, 2012. [21] B. Zhang, Y. Jia, and F. Matsuno, “Finite-time observers for multi-agent systems without velocity measurements and with input saturations,” Systems & Control Letters, vol. 68, pp. 86–94, 2014. [22] Y. Lou and Y. Hong, “Target containment control of multi-agent systems with random switching interconnection topologies,” Automatica, vol. 48, no. 5, pp. 879–885, 2012. [23] Y. Wang, L. Cheng, Z.-G. Hou, M. Tan, and M. Wang, “Containment control of multi-agent systems in a noisy communication environment,” Automatica, vol. 50, no. 7, pp. 1922–1928, 2014. [24] H. Liu, G. Xie, and L. Wang, “Containment of linear multi-agent systems under general interaction topologies,” Systems & Control Letters, vol. 61, no. 4, pp. 528–534, 2012. [25] Q. Ma and G. Miao, “Distributed containment control of linear multiagent systems,” Neurocomputing, vol. 133, pp. 399–403, 2014. 13 [26] Z. Li, W. Ren, X. Liu, and M. Fu, “Distributed containment control of multi-agent systems with general linear dynamics in the presence of multiple leaders,” International Journal of Robust and Nonlinear Control, vol. 23, no. 5, pp. 62–75, 2013. [27] H. Liu, L. Cheng, M. Tan, and Z.-G. Hou, “Containment control of continuous-time linear multi-agent systems with aperiodic sampling,” Automatica, vol. 7, no. 57, pp. 78–84, 2015. [28] J. Mei, W. Ren, and G. Ma, “Distributed containment control for Lagrangian networks with parametric uncertainties under a directed graph,” Automatica, vol. 48, no. 12, pp. 653–659, 2012. [29] S. J. Yoo, “Distributed adaptive containment control of networked flexible-joint robots using neural networks,” Expert Systems with Applications, vol. 41, no. 2, pp. 470–477, 2014. [30] Z. Meng, W. Ren, and Z. You, “Distributed finite-time attitude containment control for multiple rigid bodies,” Automatica, vol. 46, no. 12, pp. 2092–2099, 2010. [31] X. Wang, J. Qin, and C. Yu, “Iss method for coordination control of nonlinear dynamical agents under directed topology,” IEEE Transactions on Cybernetics, vol. 44, no. 10, pp. 1832–1845, 2014. [32] M. Andreasson, D. V. Dimarogonas, and H. Sandberg, “Distributed control of networked dynamical systems: static feedback, integral action and consensus,” IEEE Transactions on Automatic Control, vol. 59, no. 7, pp. 1750–1764, 2014. [33] D. Burbano and M. di Bernardo, “Distributed PID control for consensus of homogeneous and heterogeneous networks,” IEEE Transactions on Control of Network Systems, vol. 2, no. 2, pp. 154–163, 2015. [34] M. A. Demetriou, “Spatial pid consensus controllers for distributed filters of distributed parameter systems,” Systems & Control Letters, vol. 1, no. 63, pp. 57–62, 2014. [35] X. Wang, S. Li, and P. Shi, “Distributed finite-time containment control for double-integrator multiagent systems,” IEEE Transactions on Cybernetics, vol. 44, no. 9, pp. 1518–1528, 2014. [36] Z. Meng, W. Ren, Y. Cao, and Z. You, “Leaderless and leader-following consensus with communication and input delays under a directed network topology,” IEEE Transactions on Systems, Man, and Cybernetics– Part B: Cybernetics, vol. 41, no. 1, pp. 75–88, 2011. [37] Z. Li, W. Ren, X. Liu, and M. Fu, “Distributed containment control of multi-agent systems with general linear dynamics in the presence of multiple leaders,” International Journal of Robust and Nonlinear Control, vol. 23, no. 5, pp. 534–547, 2013. [38] G. Wen, Z. Li, Z. Duan, and G. Chen, “Distributed consensus control for linear multi-agent systems with discontinuous observations,” International Journal of Control, vol. 86, no. 1, pp. 95–106, 2013. [39] K. Hengster-Movrica, K. You, F. L. Lewis, and L. Xie, “Synchronization of discrete-time multi-agent systems on graphs using Riccati design,” Automatica, vol. 49, no. 2, pp. 414–423, 2013. [40] W. Ren and N. Sorensen, “Distributed coordination architecture for multi-robot formation control,” Robotics and Autonomous Systems, vol. 56, no. 4, pp. 324–333, 2008.
3cs.SY
Memory-Efficient Deep Salient Object Segmentation Networks on Gridized Superpixels Caglar Aytekin, Xingyang Ni, Francesco Cricri, Lixin Fan, Emre Aksu arXiv:1712.09558v1 [cs.CV] 27 Dec 2017 Nokia Technologies, Tampere, Finland Corresponding Author’s Email: [email protected] Abstract—Computer vision algorithms with pixel-wise labeling tasks, such as semantic segmentation and salient object detection, have gone through a significant accuracy increase with the incorporation of deep learning. Deep segmentation methods slightly modify and fine-tune pre-trained networks that have hundreds of millions of parameters. In this work, we question the need to have such memory demanding networks for the specific task of salient object segmentation. To this end, we propose a way to learn a memory-efficient network from scratch by training it only on salient object detection datasets. Our method encodes images to gridized superpixels that preserve both the object boundaries and the connectivity rules of regular pixels. This representation allows us to use convolutional neural networks that operate on regular grids. By using these encoded images, we train a memory-efficient network using only 0.048% of the number of parameters that other deep salient object detection networks have. Our method shows comparable accuracy with the state-of-the-art deep salient object detection methods and provides a faster and a much more memory-efficient alternative to them. Due to its easy deployment, such a network is preferable for applications in memory limited devices such as mobile phones and IoT devices. I. I NTRODUCTION Convolutional Neural Networks (CNNs) are learning machines that are extensively used by top performing methods in image classification [1], [2], [3], [4]. By the introduction of Fully Convolutional Neural Networks (FCNNs) [5], these structures have also proven to constitute the state of the art in pixel-wise classification tasks such as semantic image segmentation and salient object detection. A typical FCNN relies on a pre-trained CNN that is used for image classification and fine-tunes the CNN’s parameters for segmentation task, often adding or replacing some layers. These pre-trained CNNs usually contain a very large number of parameters, e.g. 138 million for VGG-16 [2]. Such large networks require a lot of memory, which makes them challenging to deploy on limited memory devices such as mobile phones. There have been some efforts to reduce memory requirement of a CNN via pruning [44] or quantizing [45] the weights of the network, however these approaches are post-processing operations on large networks trained on millions of images. For some segmentation tasks such as salient object detection, one might question the need for using such a high capacity network in the first place. It can be argued that such a network might be an overkill for salient object detection and one can achieve reasonable performance by using a much smaller network. Moreover, object recognition CNNs have greatly re- Fig. 1: Our method (GRIDS) compared to state-of-the-art deep salient object detection methods. (a) Network size comparison (plotted in log-scale), the true number of parameters are written on the corresponding bar. (b) Performance comparison according to Fβ measure. duced resolutions in their final layer activations due to pooling or strided convolution operations throughout the network. In order to atone for this resolution loss, segmentation networks either introduces additional connections to make use of the localization power of low-middle layers [5], [10], or adds a deconvolutional network on top of the CNN [11], [12] with unpooling layers. Both approaches results into an even more increase in the number of parameters used in the segmentation network. In this paper, we propose a way to overcome two problems of FCNNs mentioned above: requirement of a big pre-trained network and resolution loss because of pooling layers. To this end, we utilize a memory-efficient deep segmentation network without any pooling layers. We achieve this by encoding input images via gridized superpixels [15]. This allows us to use low resolution images that accurately encode object edges. By using these images, we show that it is possible to train a memory-efficient FCNN with a reasonable depth, no pooling layers, yet with large receptive field and comparable performance with state of the art, see Fig. 1. The contributions of our work are listed as follows: • We propose a way to use FCNNs without any pooling layers or strided convolutions by abstracting input images via gridized superpixels. The predictions of our network does not suffer from inaccurate object edges. • Our proposed network has less than 67k parameters (about 0.048% of others). • Our proposed network does not require a pre-trained model and can be trained from scratch by existing pixelwise classification datasets. • We show that the performance of our method is comparable with state of the art segmentation networks in salient object detection task. The rest of the paper is organized as follows. In Section II, the related work is discussed, in Section III, the proposed method is described, in IV, the experimental results are analyzed. Finally, Section V concludes the paper and suggests topics for future research. • Fig. 2: From left to right: Original, encoded with [15] (950 superpixels) and reconstructed images (first row) and corresponding ground truths (second row). II. R ELATED W ORK A. Superpixel Gridization Superpixel gridization produces over-segmentations that form a regular pixel-like lattice which best preserves the object edges in an image. There is a small number of studies in this topic which we review shortly next. The method in [17] relies on a boundary cost map which is an inverted edge detection result. Incrementally horizontal and vertical stripes are added to the image where no horizontal and vertical stripes intersect more than once and no two horizontal (or vertical) stripes intersect with each other. In each step the optimal stripe is found by minimizing the boundary cost that the stripe passes through by a min-cut based optimization algorithm. An extended version of [17] was proposed in [18] where the authors use an alternating optimization strategy. The method finds globally optimal solutions to the horizontal and vertical components of the lattice via using a multi-label Markov Random Field, as opposed to the greedy optimization strategy adopted in [17]. In [16], a generic approach is proposed to optimally regularize superpixels extracted by any algorithm. The approach is based on placing dummy nodes between superpixels to satisfy the regularity criterion. Finally, the method proposed in [15], starts with regular lattice seeds and relocates the seeds -in a search space defined by the initialization- to the locally maximal boundary response. The relocated seeds are considered as superpixel junctions. Next, for each junction pair a path was found that maximize the edge strength on the path. These paths form a superpixel boundary map which results in a regular superpixel grid. B. Salient Object Detection A salient object is generally defined as the object that visually stands out from the rest of the image, thus is more appealing to the human eye [19]. Unsupervised salient object detection methods rely mostly on following saliency assumptions: 1) A salient object has high local or global contrast [20], [21], 2) The boundary of an image is less likely to contain a salient object [22], [23], 3) The salient object is more likely to be large [23], 4) Regions of similar feature maps have similar saliency [24]. Prior to deep learning, supervised approaches to salient object detection focused on following tracks: 1) Learning a dense labeling of each region as salient or not [25], [26], 2) Learning to rank salient object proposals [27], 3) Learning region affinities for [28] end to end salient object segmentation. Deep learning based approaches to salient object detection either train a network to learn to classify each region in an image separately [29], [30], [31], or employ FCNNs to learn a dense pixel-wise labeling for salient object detection [32], [33]. FCNN based models utilize pre-trained networks on other tasks, and employ special tricks to preserve the accurate edges in segmentation results. Next, we propose an FCNN that does not need a pre-trained network, automatically preserves accurate object edges with no pooling layers or strided convolutions, has much fewer parameters than other methods, and is comparable in performance to the state-ofthe-art. III. P ROPOSED M ETHOD A. Data Preparation We use the superpixel extraction method in [15] to abstract an input image I with a small number of homogeneous image regions (superpixels). Thanks to the special property of the method in [15], the extracted superpixels form a grid. We encode each superpixel with its mean color, thus we end up with a new image X with low dimensions as follows: 1 X (c) (c) Xi = Ij . (1) |si | {j}∈si In Eq. 1, c indicates a channel of an image, i and j are indices of X and I images respectively, si is a set of pixels of I covered in superpixel i, and |.| is cardinality operation. We will use this image X as input to an FCNN. For training purposes, we also form a low resolution version of the ground truth label by the procedure described in the previous subsection. Note that the convolutions are utilized with zero padding and stride 1, so that the input shape is preserved for each convolutional layer. Moreover, there are no pooling layers in the network architecture in order to avoid any resolution loss. This is possible because the input resolution is already low and we can use a constant number of convolutional filters throughout the network, whereas prior art networks need to reduce the resolution in order to increase the number of filters. The receptive field of our network is around 30x30 which is enough to cover the entire input size for an abstraction of an image with 900 superpixels if the abstraction forms a square grid. Typically the aspect ratio of the superpixel representation varies with the image aspect ratio, however we find the above receptive field enough to accurately detect the salient objects. Algorithm 1 Test-time implementation Input: image I Output: salient segment S̃ 1: Encode I to X by Eq. 1 2: Apply min-max normalization on X 3: Predict S from X via neural network 4: Reconstruct S̃ from S by Eq. 2 Fig. 3: Network Architecture. image G via encoding the mean of the 0 (not salient) and 1 (salient) values in the regions indicated by superpixels similar to the process in Eq. 1. In order to have binary values in the low dimensional ground truth Y , we simply threshold the above image by 0.5. Note that it is equivalent to selecting the most common value within a superpixel. It should be noted that, one can reconstruct an approximation of I and G from X and Y respectively as follows: (c) (c) I˜j = Xi , j ∈ si . (2) In Fig. 2, we illustrate original (I), encoded (X) and recon˜ images with corresponding ground truths. The structed (I) encoded image is the input that will be supplied to the FCNN with the encoded ground truth as its label for training. As we observe from Fig. 2, even though the superpixel extraction is constrained by the grid structure, it is able to reconstruct the image well by preserving the object edges. B. Network Architecture We use a 28-layers deep convolutional network with residual blocks [4]. In particular, the network has a convolutional (conv) layer with rectified linear unit [41] (relu) activation, 13 residual blocks followed by a batch normalization [42] (bnorm) , relu and conv layer and sigmoid activation. Note that we have not applied bnorm layer right before the sigmoid in order to avoid restricting the convolutional output to a small interval. Each residual block consists of a bnorm-relu-convbnorm-relu-conv structure. The input of a residual block is short-connected to its output. We use same number of filters in each layer. The entire network is illustrated in Fig. 3. The network’s inputs and corresponding ground truths are obtained C. Training and Testing The parameters of the network are optimized in order to minimize the binary cross entropy loss between the output of the network and the ground truth, by treating the sigmoid outputs as probabilities that the corresponding input pixels are salient. Separate datasets are used for training and validation sets and the model with the best validation error is selected. For testing, we use entirely different datasets and run the model learned by the training as described above. During testing, an image is encoded to the low dimensional superpixel grid representation and fed to the network. It should be noted here that we apply min-max normalization to each input, i.e. we linearly scale the values between 0 and 1. The output of the network lies in the same grid structure, thus should be converted back, i.e. reconstructed to the original image size. The reconstruction is simply utilized via replicating the value in each grid node in the image region that the node corresponds to as formulated in Eq. 2. The test-time algorithm is given in Algorithm 1. IV. E XPERIMENTAL R ESULTS A. Datasets and Evaluation Metrics We conducted evaluations on widely used salient object detection datasets. MSRA10K [34] includes 10000 images that exhibit a simple case with one salient object and clear background, HKU-IS [30] includes 4447 images with slightly challenging cases, ECSSD [37] includes 1000 relatively complex images , PASCALS [38] contains 850 images adopted from PASCAL VOC segmentation dataset, and SOD [39] contains 300 images from BSD300 [40] segmentation dataset. We use two most widely used evaluation metrics, mean absolute error (MAE) and F-measure. For a saliency map S and a binary ground truth GT , MAE is defined as follows: |S| M AE = 1 X |Si − GTi |. |S| i=1 (3) Precision-recall curves are extracted via thresholding the saliency map S at several values τ and plotting the precision and recall values which are calculated as follows: P REτ = |S > τ | ∩ |GT | |S > τ | ∩ |GT | , RECτ = . |S > τ | |GT | (4) The F-measure is used to obtain a global evaluation of the precision recall curve and is obtained as follows. Fβ = (1 + β 2 )P REτ × RECτ . β 2 P REτ + RECτ (5) It is widely adopted in salient object detection literature to chose β 2 to be 0.3 and use an adaptive thresholding where τ equals twice the mean saliency in saliency map. [19]. B. Implementation Our network is based on the publicly available Keras with Theano backend. Network parameters are initialized by Xavier’s method [43]. We use Nesterov Adam optimizer with an initial learning rate of µ = 0.002. We utilize a number of superpixel granularities for augmenting the input data. In particular, we use {900, 925, 950, 975, 1000} number of superpixels. Therefore, we have 5 different encoded image for each original image. This is only done for training and validation data for data augmentation. During test stage, we stick to 950 superpixels ,simply because it is the median of the above set, for evaluation. Unlike other methods, our network is trained from scratch, hence it seems like it needs more data to be trained on, but in reality it is trained on less data if we consider also the pre-training data in prior art works. Thus, we use largest datasets DUT-OMRON, HKU-IS and MSRA10K datasets for training and SOD for validation. Further data augmentation is employed via randomly flipping the input and labels in horizontal direction. We use a batch size of 20. The network was run for 5 million iterations and the model that gives the best validation set accuracy was selected. We evaluate 2 different variants of the network: one with 16 filters at each layer and one with 32. We call the methods GRIDS16 and GRIDS32 respectively. The networks that GRIDS16 and GRIDS32 use have 67k and 248k parameters respectively. C. Comparison with State-of-the-art We compare our approach with 4 unsupervised methods: RC [20], CHM [26], DSR [22], EQCUT [23], and 8 supervised methods: DRFI [25], MC [29], ELD [31], MDF [30], RFCN [32], DHS [35], DCL [33] and DSS [36]. In Table I, we share results for ECSSD and PASCALS datasets as these are the only datasets used for testing in all methods. The ordering of the methods is made according to ascending Fβ measure. As one can observe from Table I, both variants of our method TABLE I: Comparison with State-of-the-art PASCALS MAE Fβ CHM 0.222 0.631 RC 0.225 0.640 DSR 0.204 0.646 EQCUT 0.217 0.670 DRFI 0.221 0.679 MC 0.147 0.721 MDF 0.145 0.764 GRIDS16 0.171 0.781 GRIDS32 0.166 0.793 ELD 0.121 0.767 DCL 0.108 0.822 RFCN 0.118 0.827 DHS 0.091 0.820 DSS 0.080 0.830 Method ECSSD MAE Fβ 0.195 0.722 0.187 0.741 0.173 0.737 0.174 0.765 0.166 0.787 0.107 0.822 0.108 0.833 0.085 0.823 0.080 0.839 0.098 0.865 0.071 0.898 0.097 0.898 0.061 0.905 0.052 0.915 Avg. Perf. MAE Fβ 0.209 0.677 0.206 0.691 0.189 0.692 0.196 0.718 0.194 0.733 0.127 0.772 0.127 0.799 0.128 0.802 0.123 0.816 0.110 0.816 0.090 0.860 0.108 0.863 0.076 0.863 0.066 0.873 TABLE II: Complexity of Deep Learning Methods Method #Parameters Run-time (sec.) GPU MC 58m 2.38 Titan Black MDF 138m 8 Titan Black ELD 138m 0.5 Titan Black DCL 138m 1.5 Titan Black RFCN 138m 4.6 Titan X DHS 138m 0.04 Titan Black DSS 138m 0.08 Titan X GRIDS16 67k 0.02 GTX 1080 GRIDS32 248k 0.03 GTX 1080 GRIDS can achieve better Fβ measure and MAE than that of all unsupervised methods and three supervised methods: DRFI, MC and MDF. Out of these methods MC and MDF are deep learning based and use around 58 and 138 million parameters respectively. Other methods that outperform our method are all deep learning based algorithms and use more than 138 million parameters - VGG-16 models with additional layers/connections. Yet, our models GRIDS16 and GRIDS32 only use around 67 and 248 thousand parameters respectively, which corresponds to respectively 0.048% and 0.18% of other methods and still achieve a comparable accuracy with the state of the art. The number of parameters each deep learning based method use and run times with used GPUs are given in Table II. Our method is the one with least memory requirement and fastest run-time. At this point, one should note that the superpixel extraction time is not included in the above table. With the method of [15], this takes around an additional 0.5 seconds for an image of size 300x400 for superpixel granularity 950. D. Analysis and Variants In this section, we investigate the impact of several factors to our method’s performance. First, we evaluate the performance robustness to different superpixel granularities. We report the test performance when employing 900, 950 and 1000 number TABLE III: Robustness to Resolution PASCALS MAE Fβ ECSSD MAE Fβ 900 0.169 0.787 0.080 0.838 950 0.166 0.793 0.080 0.839 1000 0.167 0.792 0.080 0.840 Superpixel No. TABLE IV: Improvement via Multi-resolution Approach PASCALS MAE Fβ ECSSD MAE Fβ GRIDS (950) 0.166 0.793 0.080 0.839 GRIDSM 0.164 0.800 0.075 0.851 Method TABLE V: Encoding Strategy Comparison PASCALS MAE Fβ ECSSD MAE Fβ Downsampling 0.172 0.732 0.096 0.741 GRIDS 0.166 0.793 0.080 0.839 Encoding Type of superpixels in Table III. The experiments are made with GRIDS32 model. It can be observed that the resolution change in this interval has an insignificant impact on our method’s performance and does not alter the ranking in Table I. Next, we have tried to improve the performance via combination of segmentation results from all resolutions via majority voting. Experiments are made with GRIDS32 model. It can be observed from Table III that multi-resolution approach (GRIDSM) results into a notable performance improvement in both MAE and Fβ measure. The rank of GRIDSM is the same with GRIDS for MAE, but it beats one more deep learning method (ELD) in Fβ measure in Table I. One might argue that a natural baseline related to our network is (a) plain downsampling of the datasets, (b) training a network on the downsampled images and ground truths (c) upsampling results to evaluate the performance. This would highlight the performance upgrade of dimension reduction and later reconstruction with gridized superpixel encoding compared to plain downsampling and upsampling. To make this comparison, we train a network with exactly the same structure as described in the text, only this time we train the network with downsampled images and ground truths. Ground truths were again binarized via thresholding with 0.5. Augmentation with scale was similarly performed by defining downsampled dimensions to result into around 900,925,950,975 and 1000 number of pixels while preserving the aspect ratio. During test time we have again utilized only the 950 granularity. Bicubic downsampling and upsampling is used. Experiments are made with GRIDS32 model. The comparison in V clearly indicates the improvement of superpixel gridization encoding scheme over plain downsampling. Especially the improvement in Fβ measure is dramatic; up to a 13% relative improvement. As we have previously mentioned, since our method is trained from scratch we obviously need more data to be trained on. That is why we use largest datasets DUT-OMRON, HKU- TABLE VI: Impact of Training Data PASCALS MAE Fβ ECSSD MAE Fβ MSRA10k 0.190 0.752 0.096 0.814 MSRA10k+HKUIS+DUTOMRON 0.166 0.793 0.080 0.839 Training Data IS and MSRA10K for training. We would like to emphasize here that the majority of other works use only MSRA10K for training and validation purposes for fine-tuning the pre-trained network they use. For transfer learning, fine-tuning with little number of data is known to give satisfactory results. Since our network is trained from scratch, such small data is not enough to train a network that gives satisfactory generalization. Moreover, we do not possess the advantage of starting with a pre-trained network on millions of images for object detection -as others do- which is clearly expected to contribute to salient object detection performance acting as a top-down prior, i.e. using the semantically higher level information of object recognition for detecting the salient object. Therefore, we argue the fairness of a comparison where we use only MSRA10k for our method. Yet, in order to give a complete set of experiments, we have also trained our model with other methods’ training and validation sets (partitions on MSRA10K dataset) and we report the test results in Table VI. Experiments are made with GRIDS32 model. Clearly, the model trained on MSRA10K is inferior to the one trained on MSRA10K, HKUIS and DUT-OMRON. V. C ONCLUSION AND F UTURE W ORK We have presented a deep, fast and memory-efficient method for salient object segmentation operating on encoded images with gridized superpixels. With the boundary preserving gridized superpixel encoding, we also do not suffer from blurry object boundaries. Moreover, the network does not employ any pooling layer, thus further resolution loss is prevented. This also eliminates the need of tricks such as additional connections and layers to atone for the resolution loss. We have shown that our method can outperform some deep learning based methods and shows comparable accuracy with others while having only 0.048% of their parameters. With only 430 KB memory, the network is extremely easy to deploy to any device. This especially makes the method preferable considering applications in mobile and small IoT devices. The presented framework can be applied to any pixelwise labeling task such as semantic segmentation. This will be the main topic that we will work on in the future improvements of this work. R EFERENCES [1] A. Krizhevsky, I Sutskever and G. E. Hinton, ”Imagenet Classification with Deep Convolutional Neural Networks”, Advances in Neural Information Processing Systems (NIPS), pp. 1097-1105,2012. [2] K. Simonyan and A. Zisserman, Very Deep Convolutional Neural Networks for Large-scale Image Recognition, arXiv:1409.1556, 2014. [3] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov and A. Rabinovich, Going Deeper with Convolutions, IEEE Conference on Computer Vision and Pattern Recognition, pp. 1-9, 2015. [4] K. He, X. Zhang, S. Ren and J. Sun, Deep Residual Learning for Image Recognition, IEEE Conference on Computer Vision and Pattern Recognition, pp. 770-778, 2016. [5] J. Long, E. ShelHamer, and T. Darrell, Fully Convolutional Networks for Semantic Segmentation, IEEE Conference on Computer Vision and Pattern Recognition, pp. 3431-3440, 2015. [6] M. Everingham, L. Van Gool, C. K. Williams, J. Winn, and A. Zisserman, The PASCAL Visual Object Classes (VOC) Challenge, International Journal of Computer Vision, vol. 88, no.2, pp. 303-338, 2010. [7] T. Y. Lin, M. Maire, S. Belongie, J. Hays, P. Perona, D. Ramanan, P. Dollar, and C.L. Zitnick, Microsoft COCO: Common Objects in Context, European Conference on Computer Vision, pp. 740-755, 2014. [8] R. Mottaghi, X. Chen, X. Liu, N. G. Cho, S. W. Lee, S. Fidler, and R. Urtasun. The Role of Context for Object Detection and Semantic Segmantation in the Wild, IEEE Conference on Computer Vision and Pattern Recognition, pp. 891-898, 2014. [9] B. Zhou, H. Zhao, X. Puig, S. Fidler, A. Barriuso, and A. Torralba, Semantic Understanding of Scenes Through the ADE20K dataset, arXiv:1608.05442, 2016. [10] B. Hariharan, P. Arbelaez, R. Girshick, and J. Malik, ”Hypercolumns for Object Segmentation and Fine-grained Localization”, IEEE Conference on Computer Vision and Pattern Recognition, 2014. [11] V. Badrinarayanan, A. Kendall, and R. Cipolla, ”Segnet: A Deep Convolutional Encoder-Decoder Network Arhcitecture for Image Segmentation”, arXiv:1511.00561, 2015. [12] H. Noh, S. Hong, and B. Han, ”Learning Deconvolutional Network for Semantic Segmentation”, International Conference on Computer Vision, pp. 1520-1528, 2015. [13] L. Chen, G. Papandreou, I. Kokkinos, K. Murphy, and A. L. Yuille. ”DeepLab: Semantic Image Segmentation with Deep Convolutional Nets, Atrous Convolution and Fully Connected CRFs”, arXiv:1606.00915, 2016. [14] F. Yu, and V. Koltun. ”Multi-scale Context Aggregation by Dilated Convolutions”, arXiv:1511.07122, 2015. [15] H. Fu, X. Cao, D. Tang, Y. Han, and D. Xu. ”Regularity Preserved Superpixels and Supervoxels”, IEEE Transactions on Multimedia vol. 16, no. 4, pp. 1165-1175, 2014. [16] L. Li, W. Feng, L. Wan, and J. Zhang. ”Maximum Cohesive Grid of Superpixels for Fast Object Localization”. IEEE Conference on Computer Vision and Pattern Recognition pp. 3174-3181, 2013. [17] A. P. Moore, S. J. Prince, J. Warrell, U. Mohammed, and G. Jones, ”Superpixel Lattices”, IEEE Conference on Computer Vision and Pattern Recognition, pp. 1-8, 2008. [18] A. P. Moore, S. J. Prince, J. Warrell, ”Lattice Cut-Constructing Superpixels Using Layer Constraints”, IEEE Conference on Computer Vision and Pattern Recognition, pp. 2117-2124, 2010. [19] A. Borji, M. M. Cheng, H. Jiang, and J. Li, ”Salient Object Detection: A Survey”, arXiv:1411.5878, 2014. [20] M. M. Cheng, N. J. Mitra, X. Huang, P. H. Torr, and S. Hu, ”Global contrast based salient region detection”, IEEE Transaction on Pattern Analysis and Machine Intelligence, 2015. [21] C. Aytekin, S. Kiranyaz, and M. Gabbouj. ”Automatic Object Segmentation by Quantum Cuts.” International Conference on Pattern Recognition, pp.112-117, 2014. [22] X. Li, H. Lu, L. Zhang, X. Ruan, and M.-H. Yang. ”Saliency detection via dense and sparse reconstruction”, International Conference on Computer Vision, pp. 29762983, 2013 [23] C. Aytekin, E. C. Ozan, S. Kiranyaz, and M. Gabbouj. ”Extended Quantum Cuts for Unsupervised Salient Object Extraction” Multimedia Tools and Applications vol. 76, no. 8, pp. 10443-10463, 2017. [24] C. Aytekin, A. Iosifidis, and M. Gabbouj. ”Probabilistic Saliency Estimation” Pattern Recognition, https://doi.org/10.1016/j.patcog.2017.09.023, 2017. [25] H. Jiang, J. Wang, Z. Yuan, Y. Wu, N. Zheng, and S. Li. ”Salient object detection: A discriminative regional feature integration approach”, IEEE Conference on Computer Vision and Pattern Recognition, pp. 2083-2090, 2013. [26] X. Li, Y. Li, C. Shen, A. Dick, and A. Van Den Hengel. ”Contextual hypergraph modeling for salient object detection”, International Conference on Computer Vision, pp. 33283335, 2013. [27] C. Aytekin, S. Kiranyaz, and M. Gabbouj. ”Learning to Rank Salient Segments Extracted by Multispectral Quantum Cuts”, Pattern Recognition Letters, vol. 72, pp. 91-99, 2016. [28] C. Aytekin, A. Iosifidis, S. Kiranyaz, and M. Gabbouj. ”Learning Graph Affinities for Spectral Graph-based Salient Object Detection”, Pattern Recognition, vol. 64, pp. 159-167, 2017. [29] R. Zhao, W. Ouyang, H. Li, and X. Wang. ”Saliency Detection by Multi-Context Deep Learning”. IEEE Conference on Computer Vision and Pattern Recognition, pp. 1265-1274, 2015. [30] G. Li and Y. Yu. ”Visual saliency based on multiscale deep features”, IEEE Conference on Computer Vision and Pattern Recognition, pp. 54555463, 2015. [31] L. Gayoung, T. Yu-Wing, and K. Junmo. ”Deep saliency with encoded low level distance map and high level features”. IEEE Conference on Computer Vision and Pattern Recognition, pp. 660-668, 2016. [32] L. Wang, L. Wang, H. Lu, P. Zhang, and X. Ruan, ”Saliency detection with recurrent fully convolutional networks”, European Conference on Computer Vision, pp. 825-841, 2016. [33] G. Li, and Y. Yu, ”Deep contrast learning for salient object detection”, IEEE Conference on Computer Vision and Pattern Recognition, pp. 478487, 2016. [34] T. Liu, Z. Yuan, J. Sun, J. Wang, N. Zheng, X. Tang and H. Y. Shum, ”Learning to detect a salient object”, IEEE Transactions on Pattern Analysis and Machine Intelligence, pp. 353-367, vol. 33, no. 2, .2011 [35] N. Liu and J. Han. ”Dhsnet: Deep hierarchical saliency network for salient object detection”, IEEE Conference on Computer Vision and Pattern Recognition, pp. 678-686, 2016. [36] Q. Hou, M. M. Cheng, X. Hu, A. Borji, Z. Tu and P. Torr. Deeply supervised salient object detection with short connections, IEEE Conference on Computer Vision and Pattern Recognition, pp. 5300-5309, 2017. [37] Q. Yan, L. Xu, J. Shi and J. Jia, ”Hierarchical saliency detection”. IEEE Conference on Computer Vision and Pattern Recognition, pp. 1155-1162, 2013. [38] Y. Li, X. Hou, C. Koch, J. M. Rehg, and A. L. Yuille. ”The secrets of salient object segmentation”, IEEE Conference on Computer Vision and Pattern Recognition, pp. 280-287, 2014. [39] V. Movahedi and J. H. Elder, ”Design and perceptual validation of performance measures for salient object segmentation”, IEEE Conference on Computer Vision and Pattern Recognition Workshops, pp. 49-56, 2010. [40] D. Martin, C. Fowlkes, D. Tal and J. Malik, ”A database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statics”, International Conference on Computer Vision, pp. 416-423, 2001. [41] V. Nair and G. E. Hinton, ”Rectified linear units improve restricted boltzmann machines”, Proceedings of the 27th international conference on machine learning, pp. 807-814, 2010. [42] S. Ioffe and C. Szegedy, ”Batch normalization: Accelerating deep network training by reducing internal covariate shift”, International Conference on Machine Learning, pp. 448-456, 2015. [43] X. Glorot and Y. Bengio, ”Understanding the difficulty of training deep feedforward neural networks”, International Conference on Artificial Intelligence and Statistics, pp. 249-256, 2010. [44] S. Han, J. Pool, J. Tran, W. Dally ”Learning both weights and connections for efficient neural network”, Advances in Neural Information Processing Systems, pp. 1135-1143, 2015. [45] S. Gupta, A. Agrawal, K. Gopalakrishnan and P. Narayanan, ”Deep learning with limited numerical precision”, International Conference on Machine Learning, pp. 1737-1746, 2015.
1cs.CV
Submitted to the Annals of Statistics MODEL ASSISTED VARIABLE CLUSTERING: MINIMAX-OPTIMAL RECOVERY AND ALGORITHMS By Florentina Bunea Cornell University arXiv:1508.01939v4 [stat.ME] 16 Apr 2018 By Christophe Giraud CNRS, Université Paris Sud, Université Paris-Saclay By Xi Luo Brown University By Martin Royer CNRS, Université Paris Sud, Université Paris-Saclay and By Nicolas Verzelen INRA The problem of variable clustering is that of estimating groups of similar components of a p-dimensional vector X = (X1 , . . . , Xp ) from n independent copies of X. There exists a large number of algorithms that return data-dependent groups of variables, but their interpretation is limited to the algorithm that produced them. An alternative is model-based clustering, in which one begins by defining population level clusters relative to a model that embeds notions of similarity. Algorithms tailored to such models yield estimated clusters with a clear statistical interpretation. We take this view here and introduce the class of G-block covariance models as a background model for variable clustering. In such models, two variables in a cluster are deemed similar if they have similar associations will all other variables. This can arise, for instance, when groups of variables are noise corrupted versions of the same latent factor. We quantify the difficulty of clustering data generated from a G-block covariance model in terms of cluster proximity, measured with respect to two related, but different, cluster separation metrics. We derive minimax cluster separation thresholds, which are the metric values below which no algorithm can recover the model-defined clusters exactly, and show that they are different for the two metrics. We therefore develop two algorithms, COD and PECOK, tailored to G-block covariance models, and study their minimax-optimality with respect to each metric. Of independent interest is the fact that the analysis of the PECOK algorithm, which is based on a corrected convex relaxation of the popular K-means algorithm, provides the first statistical analysis of such algorithms for variable clustering. Additionally, we contrast our methods with another popular clustering method, spectral clustering, specialized to variable clustering, and show that ensuring exact cluster recovery via this method requires clusters to have a higher separation, relative to the minimax threshold. Extensive simulation studies, as well as our data analyses, confirm the applicability of our approach. 1 imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 2 1. Introduction. The problem of variable clustering is that of grouping similar components of a p-dimensional vector X = (X1 , . . . , Xp ). These groups are referred to as clusters. In this work we investigate the problem of cluster recovery from a sample of n independent copies of X. Variable clustering has had a long history in a variety of fields, with important examples stemming from gene expression data [18, 22, 39] or protein profile data [7]. The solutions to this problem are typically algorithmic and entirely data based. They include applications of K-means, hierarchical clustering, spectral clustering, or versions of them. The statistical properties of these procedures have received a very limited amount of investigation. It is not currently known what probabilistic cluster models on X can be estimated by these popular techniques, or by their modifications. More generally, model-based variable clustering has received a limited amount of attention. One net advantage of model-based clustering is that population-level clusters are clearly defined, offering both interpretability of the clusters and a benchmark against which one can check the quality of a particular clustering algorithm. In this work we propose the G-block covariance model as a flexible model for variable clustering and show that the clusters given by this model are uniquely defined. We then motivate and develop two algorithms tailored to the model, COD and PECOK, and analyze their respective performance in terms of exact cluster recovery, for minimally separated clusters, under appropriately defined cluster separation metrics. 1.1. The G-block covariance model. Our proposed model for variable clustering subsumes that the covariance matrix Σ of a centered random vector X ∈ Rp follows a block, or near-block, decomposition, with blocks corresponding to a partition G = {G1 , . . . , GK } of {1, . . . , p}. This structure of the covariance matrix has been observed to hold, empirically, in a number of very recent studies on the parcelation of the human brain, for instance [17, 19, 24, 38]. We further support these findings in Section 8, where we apply the clustering methods developed in this paper, tailored to G-block covariance models, for the clustering of brain regions. To describe our model, we associate, to a partition G, a membership matrix A ∈ Rp×K defined by Aak = 1 if a ∈ Gk , and Aak = 0 otherwise. (A) The exact G-block covariance model. In view of the above discussion, clustering the variables (X1 , . . . , Xp ) amounts to find a minimal (i.e. coarsest partition) G∗ , such that two variables belong to the same cluster if they have the same covariance with all other variables. This implies that the covariance matrix Σ of X decomposes as (1) Σ = AC ∗ At + Γ, where A is relative to G∗ , C ∗ is a symmetric K × K matrix, and Γ a diagonal matrix. When a such a decomposition exists with the partition G∗ , we say that X ∈ Rp follows an (exact) G∗ -block covariance model. (i) G-Latent Model. Such a structure arises, for instance, when components of X that belong to the same group can be decomposed into the sum between a common latent variable and an uncorrelated random fluctuation. Similarity within group is therefore given by association with the same unobservable source. Specifically, the exact block-covariance model (1) holds, with a diagonal matrix Γ, when (2) Xa = Zk(a) + Ea , with Cov(Zk(a) , Ea ) = 0, Cov(Z) = C ∗ , and the individual fluctuations Ea are uncorrelated, and thus E has diagonal covariance matrix Γ. camThe index assignment function k : {1, . . . , p} → imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 3 VARIABLE CLUSTERING {1, . . . , K} is defined by Gk = {a : k(a) = k}. In practice, this model is used to justify the construction of a single variable that represents a cluster, the average of Xa , a ∈ Gk , viewed as an observable proxy of Zk(a) . For example, a popular analysis approach for fMRI data, called regionof-interest (ROI) analysis [34], requires averaging the observations from multiple voxels (a imaging unit for a small cubic volume of the brain) within each ROI (or cluster of voxels) to produce new variables, each representing a larger and interpretable brain area. These new variables are then used for downstream analyses. From this perspective, model (2) can be used in practice, see, for example [6], as a building block in a data analysis based on cluster representatives, which in turn requires accurate cluster estimation. Indeed, data-driven methods for clustering either voxels into regions or regions into functional systems, especially based on the covariance matrix of X, is becoming increasingly important, see for example [17, 19, 35, 38]. Accurate data-driven clustering methods also enable studying the cluster differences across subjects [16] or experimental conditions [21]. (ii) The Ising Block Model. The Ising Block Model has been proposed in [8] for modelling social interactions, for instance political affinities. Under this model, the joint distribution of X ∈ {−1, 1}p , a p-dimensional vector with binary entries, is given by (3) f (x) = 1 κα,β exp hβ X i α X xa xb + xa xb , 2p 2p a∼b ab where the quantity κα,β is a normalizing constant, and the notation a ∼ b means that the elements are in the same group of the partition. The variables Xa may for instance represent the votes of U.S. senators on a bill [5]. For parameters α > β, the density (3) models the fact that senators belonging to the same political group tend to share the same vote. By symmetry of the density f , the covariance matrix Σ of X decomposes as an exact block covariance model Σ = AC ∗ At + Γ where Γ is diagonal. When all groups G∗k have identical size, we have C ∗ = (ωin − ωout )IK + ωout J and Γ = (1 − ωin )I, where the K × K matrix J has all entries equal to 1, and IK denotes the K × K identity matrix, and the quantities ωin , ωout depend on α, β, p. (B) The approximate G-block model. In many situations, it is more appealing to group variables that nearly share the same covariance with all the other variables. In that situation, the covariance matrix Σ would decompose as (4) Σ = ACAt + Γ, where Γ has small off-diagonal entries. Such a situation can arise, for instance when Xa = (1 + δa )Zk(a) + Ea , with δa = o(1) and the individual fluctuations Ea are uncorrelated, 1 ≤ a ≤ p. 1.2. Our contribution. We assume that the data consist in i.i.d. observations X (1) , . . . , X (n) of a random vector X with mean 0 and covariance matrix Σ. This work is devoted to the development b of G∗ , such that G b = G∗ , with high of computationally feasible methods that yield estimates G probability, when the clusters are minimally separated, and to characterize the minimal value of the cluster separation from a minimax perspective. The separation between clusters is a key element in quantifying the difficulty of a clustering task as, intuitively, well separated clusters should be easier to identify. We consider two related, but different, separation metrics, that can be viewed as canonical whenever Σ satisfies (4). Although all our results allow, and are proved, for small departures from the diagonal structure of Γ in (1), our main contribution can be best seen when Γ is a diagonal matrix. We focus on this case below, for clarity of exposition. The case of Γ being a perturbation of a diagonal matrix is treated in Section 6. imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 4 When Γ is diagonal, our target partition G∗ can be easily defined. It is the unique minimal (with respect to partition refinement) partition G∗ for which there is a decomposition Σ = AC ∗ At +Γ, with A associated to G∗ . We refer to Section 2 for details. We observe in particular, that maxc6=a,b |Σac − Σbc | > 0 if and only if Xa and Xb belong to different clusters in G∗ . This last remark motivates our first metric MCOD based on the following COvariance Difference (COD) measure (5) COD(a, b) := max |Σac − Σbc | c6=a,b for any a, b = 1, . . . , p. G∗ We use the notation a ∼ b whenever a and b belong to the same group G∗k , for some k, in the G∗ partition G∗ , and similarly a  b means that there does not exist any group G∗k of the partition G∗ that contains both a and b. We define the MCOD metric as (6) MCOD(Σ) := min COD(a, b). G∗ ab The measure COD(a, b) quantifies the similarity of the covariances that Xa and Xb have, respectively, with all other variables. From this perspective, the size of MCOD(Σ) is a natural measure for the difficulty of clustering when analyzing clusters with components that are similar in this sense. Moreover, note that this metric is well defined even if C ∗ of model (1) is not semi-positive definite. Another cluster separation metric appears naturally when we view model (1) as arising via model (2), or via small deviations from it. Then, clusters in (1) are driven by the latent factors, and intuitively they differ when the latent factors differ. Specifically, we define the ”within-between group” covariance gap    ∗ ∗ ∗ (7) ∆(C ∗ ) := min Ckk + Cjj − 2Cjk = min E (Zj − Zk )2 , j<k j<k where the second equality holds whenever (2) holds. In the latter case, the matrix C ∗ , which is the covariance matrix of the latent factors, is necessarily semi-positive definite. Further, we observe that ∆(C ∗ ) = 0 implies Zj = Zk a.s. Conversely, we prove in Corollary 1 of Section 2 that if the decomposition (1) holds with ∆(C ∗ ) > 0, then the partition related to A is the partition G∗ described above. An instance of ∆(C ∗ ) > 0 corresponds to having the within group covariances stronger than those between groups. This suggests the usage of this metric ∆(C ∗ ) for cluster analysis whenever, in addition to the general model formulation (1), we also expect clusters to have this property, which has been observed, empirically, to hold in applications. For instance, it is implicit in the methods developed by [17] for creating a human brain atlas by partitioning appropriate covariance matrices. We also present a neuroscience-based data example in 8. Formally, the two metrics are connected via the following chain of inequalities, proved in Lemma 1 of Section 1.1 of the supplemental material [12], and valid as soon as the size of the smallest cluster is larger than one, Γ and C ∗ is semi-positive definite (for the last inequality) p p ∗ (8) 2λK (C ∗ ) ≤ ∆(C ∗ ) ≤ 2MCOD(Σ) ≤ 2 ∆(C ∗ ) max Ckk . k=1,...,K The first inequality shows that conditions on ∆(C ∗ ) are weaker than conditions on the minimal eigenvalue λK (C ∗ ) of C ∗ . In order to preserve the generality of our model, we do not necessarily assume that λK (C ∗ ) > 0, as we show that, for model identifiability, it is enough to have the weaker condition ∆(C ∗ ) > 0, when the two quantities differ. imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 VARIABLE CLUSTERING 5 The second inequality in (8) shows that ∆(C ∗ ) and MCOD(Σ) can have the same order of magnitude, whereas the third inequality shows that they can also differ in order, and ∆(C ∗ ) can be as small as MCOD2 (Σ), for small values of these metrics, which is our main focus. This suggests that different statistical assessments, and possibly different algorithms, should be developed for estimators of clusters defined by (1), depending on the cluster separation metric. To substantiate this intuition, we first derive, for each metric, the rate below which no algorithm can recover exactly the clusters defined by (1). We call this the minimax optimal threshold for cluster separation, and prove that it is different for the two metrics. We call an algorithm that can be proved to recover exactly clusters with separation above the minimax threshold a minimax optimal algorithm. Theorem 1 in Section 3 shows that no algorithm can estimate consistently clusters defined by (1) if r log(p) (9) MCOD(Σ) . . n Here and throughout this paper the symbol . is used whenever an inequality holds up to multiplicative constants, which are made precise in the statements of the theorems where such inequalities are proved. Theorem 2 in Section 3 shows that optimal separation distances with respect to the metric ∆(C ∗ ) are sensitive to the size of the smallest cluster, m∗ = min |G∗k |, 1≤k≤K in that no algorithm can estimate consistently clusters defined by (1) when ! r _ log(p) log(p) (10) ∆(C ∗ ) . . nm∗ n The first term will be dominant whenever the smallest cluster has size m∗ < n/ log(p), which will be the case in most situations. The second term in (10) becomes dominant whenever m∗ > n/ log(p), which can also happen when p scales as n, and we have a few balanced clusters. The PECOK algorithm is tailored to the ∆(C ∗ ) metric, and is shown in Theorem 4 to be nearminimax optimal. For instance, for balanced clusters, exact recovery is guaranteed when ∆(C ∗ ) & q + K∨log(p) . This differs by factors in K from the ∆(C ∗ )-minimax threshold, for general K, n whereas it is of optimal order when K is a constant, or grows as slowly as log p. A similar discrepancy between minimax lower bounds and the performance of polynomial-time estimators has also been pinpointed in network clustering via the stochastic block model [15] and in sparse PCA [9]. It has been conjectured that, when K increases with n, there exists a gap between the statistical boundary, i.e. the minimal cluster separation for which a statistical method achieves perfect clustering with high probability, and the polynomial boundary, i.e. the minimal cluster separation for which there exists a polynomial-time algorithm that achieves perfect clustering. Further investigation of this computational trade-off is beyond the scope of this paper and we refer to [15] and [9] for more details. However, if we consider directly the metric MCOD(Σ), and its corresponding, larger, minimax threshold, we derive the COD algorithm, which is minimax optimal with respect to MCOD(Σ). In view of (8), it is also minimax optimal with respect to ∆(C ∗ ), whenever there exist small clusters, the size of which does not change with n. The description of the two algorithms and theoretical properties are given in Sections 4 and 5, respectively, for exact block covariance models. Companions of these results, regarding the performance of the algorithms for approximate block covariance models are given in Section 6, in Theorem 6 and Theorem 7, respectively. K∨log p m∗ n imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 6 Table 1 below gives a snap-shot of our results, which for ease of presentation, correspond to the case of balanced clusters, with the same number of variables per cluster. We stress that neither our algorithms, nor our theory, is restricted to this case, but the exposition becomes more transparent in this situation. Metric ∗ d1 =: ∆(C ) d2 =: MCOD(Σ) Minimax threshold q log p log p + n mn q PECOK Always near-minimax w.r.t. d1 . log p n COD optimal Minimax optimal w.r.t. d1 when m is constant. Minimax optimal w.r.t. d2 when Always minimax m > n/ log(p) and K = O(log p). w.r.t. d2 . Table 1 Algorithm performance relative to minimax thresholds of each metric optimal In this table m denotes the size of the smallest cluster in the partition. The performance of COD under d1 follows from the second inequality in (8), whereas the performance of PECOK under d2 follows from the last inequality in (8). The overall message transmitted by Table 1 and our analysis is that, irrespective of the separation metric, the COD algorithm will be most powerful whenever we expect to have at least one, possibly more, small clusters, a situation that is typically not handled well in practice by most of the popular clustering algorithms, see [11] for an in-depth review. The PECOK algorithm is expected to work best for larger clusters, in particular when there are no clusters of size one. We defer more comments on the relative numerical performance of the methods to the discussion Section 9.3. We emphasize that both our algorithms are generally applicable, and our performance analysis is only in terms of the most difficult scenarios, when two different clusters are almost indistinguishable and yet, as our results show, consistently estimable. Our extensive simulation results confirm these theoretical findings. We summarize below our key contributions. (1) An identifiable model for variable clustering and metrics for cluster separation. We advocate model-based variable clustering, as a way of proposing objectively defined and interpretable clusters. We propose identifiable G-block covariance models for clustering, and prove cluster identifiability in Proposition 1 of Section 2. (2) Minimax lower bounds on cluster separation metrics for exact partition recovery. Two of our main results are Theorem 2 and Theorem 1, presented in Section 3, in which we establish, respectively, minimax limits on the size of the ∆(C ∗ )-cluster separation and MCOD(Σ)cluster separation below which no algorithm can recover clusters defined by (1) consistently, from a sample of size n on X. To the best of our knowledge these are the first results of this type in variable clustering. (3) Variable clustering procedures with guaranteed exact recovery of minimally separated clusters. The results of (1) and (2) provide a much needed framework for motivating variable clustering algorithm development and for clustering algorithm assessments. In particular, they motivate a correction of a convex relaxation of the K-means algorithm, leading to our proposed PECOK procedure, based on Semi-Definite Programing (SDP). Theorem 4 shows it to be near-minimax optimal with respect to the ∆(C ∗ ) metric. The PECOK - ∆(C ∗ ) pairing is natural, as ∆(C ∗ ) measures the difference of the ”within cluster” signal relative to the ”between clusters” signal, which is the idea that underlies K-means type procedures. To the best of our knowledge, this is the first work that explicitly shows what model-based clusters of variables can be estimated via K-means style methods, and assesses theoretically the quality of estimation. imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 VARIABLE CLUSTERING 7 Moreover, our work shows that the results obtained in [8], for the block Ising model, can be generalized to arbitrary values of K and unbalanced clusters. The COD procedure is a companion of PECOK for clusters given by model (1), and is minimax optimal with respect to the MCOD(Σ) cluster separation, as established in Theorem 1. Another advantage of COD is of computational nature, as SDP-based methods, although convex, can be computationally involved. (4) Comparison with corrected spectral variable clustering methods. In Section 5.4, we connect PECOK with another popular algorithm, spectral clustering. We show that although it may be less computationally involved than PECOK, good cluster recovery can only be theoretically guaranteed for very well separated clusters, well above the minimax optimal threshold. 1.3. Organization of the paper. The rest of the paper is organized as follows: Sections 1.4 and 1.5 contain the notation and distributional assumptions used throughout the paper. For clarity of exposition, Sections 2 - 5 contain results established for model (1), when is Γ a diagonal matrix. Extensions to the case when Γ has small off-diagonal entries are presented in Section 6. Section 2 shows that we have a uniquely defined target of estimation, the partition G∗ . Section 3 derives the minimax thresholds on the separation metrics ∆(C ∗ ) and M COD(Σ), respectively, for estimating G∗ consistently. Section 4 is devoted to the COD algorithm, and its analysis. Section 5 is devoted to the PECOK algorithm and its analysis. Section 5.4 analyses spectral clustering for variable clustering, and compares it with PECOK. Section 6 contains extensions to approximate G-block covariance models. Section 7 explores the numerical performance of our methods, and Section 8 presents their application to the clustering of putative brain areas using a real fMRI data. Section 9 contains a discussion of our results and overall recommendations regarding the usage of our methods. Given the space constraints, only some of our proofs are presented in the Appendix, while a large portion of them are included in the supplemental material [12]. 1.4. Notation. We denote by X the n × p matrix with rows corresponding to observations b is defined by ∈ Rp , for i = 1, . . . , n. The sample covariance matrix Σ X (i) n X b = 1 Xt X = 1 Σ X (i) (X (i) )t . n n i=1 Given a vector v and q ≥ 1, |v|q stands for the `q norm. For a generic matrix M : |M |q denotes its the entry-wise `q norm, kM kop denotes its operator norm, and kM kF refers to the Frobenius norm. We use M:a , Mb: , to denote the a-th column or, respectively, b-th row of a generic matrix M . The bracket h., .i refers to the Frobenius scalar product. Given a matrix M , we denote supp(M ) its support, that is the set of indices (i, j) such that Mij 6= 0. I denotes the identity matrix. We define the variation semi-norm of a diagonal matrix D as |D|V := maxa Daa − mina Daa . We use B < 0 to denote a symmetric and positive semidefinite matrix. Throughout this paper will make use of the notation c1 , c2 , · · · to denote positive constants independent of n, p, K, m. The same letter, for instance c1 may be used in different statements and may denote different constants, which are made clear within each statement, when there is no possibility for confusion. imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 8 G We use [p] to denote the set {1, . . . , p}. We use the notation a ∼ b whenever a, b ∈ Gk , for the same k. Also, m = mink |Gk | stands for the size of the smallest group of the partition G. The notation & and . is used for whenever the inequalities hold up to multiplicative numerical constants. 1.5. Distributional assumptions. For a p-dimensional random vector Y , its Orlicz norm is det 2 fined by kY kψ2 = supt∈Rp : ktk2 =1 inf{s > 0 : E[e(Z t)/s ≤ 2]}. Throughout the paper we will assume that X follows a sub-Gaussian distribution. Specifically, we use: Assumption 1. (sub-Gaussian distributions) The exists L > 0 such that random vector Σ−1/2 X satisfies kΣ−1/2 Xkψ2 ≤ L, where Our class of distributions includes, in particular, that of bounded distributions, which may be of independent interest, as example (ii) illustrates. We will therefore also specialize some of our results to this case, in which case we will use directly Assumption 1-bis. (Bounded distributions) There exists M > 0 such that maxi=1,...,p |Xi | ≤ M almost surely. Gaussian distributions satisfy Assumption 1 with L = 1. A bounded distribution is also subGaussian, but the corresponding quantity L can be much larger than M , and sharper results can be obtained if Assumption 1-bis holds. 2. Cluster identifiability in G-block covariance models. To keep the presentation focused, we consider in sections 2–5 the model (1) with Γ diagonal. We treat the case corresponding to a diagonally dominant Γ in Section 6 below. In the sequel, it is assumed that p > 2. We observe that if the decomposition (1) holds for a partition G, it also holds for any subpartition of G. It is natural therefore to seek the smallest (coarsest) of such partitions, that is the partition with the least number of groups for which (1) holds. Since the partition ordering is a partial order, the smallest partition is not necessarily unique. However, the following lemma shows that uniqueness is guaranteed for our model class. Lemma 1. Consider any covariance matrix Σ. (a) There exists a unique minimal partition G∗ such that Σ = ACAt +Γ for some diagonal matrix Γ, some membership matrix A associated to G∗ and some matrix C. (b) The partition G∗ is given by the equivalence classes of the relation (11) a ≡ b if and only if COD(a, b) := max |Σac − Σbc | = 0. c6=a,b Proof of Lemma 1. If decomposition Σ = ACAt + Γ holds with A related to a partition G, then we have COD(a, b) = 0 for any a, b belonging to the same group of G. Hence, each group Gk of G is included in one of the equivalence class of ≡. As a consequence, G is a finer partition than G∗ as defined in (b). Hence, G∗ is the (unique) minimal partition such that decomposition Σ = ACAt + Γ holds. As a consequence, the partition G∗ is well-defined and is identifiable. Next, we discuss the definitions of MCOD and ∆ metrics. For any partition G, we let MCOD(Σ, G) := min G COD(a, b), G ab where we recall that the notation a  b means that a and b are not in a same group of the partition G. By definition of G∗ , we notice that MCOD(Σ, G∗ ) > 0 and the next proposition shows that G∗ is characterized by this property. imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 9 VARIABLE CLUSTERING Proposition 1. Let G be any partition such that MCOD(Σ, G) > 0 and the decomposition Σ = ACAt + Γ holds with A associated to G. Then G = G∗ . The proofs of this proposition and the following corollary are given in Section 1 of the supplemental material [12]. In what follows, we use the notation MCOD(Σ) for MCOD(Σ, G∗ ). In general, without further restrictions on the model parameters, the decomposition Σ = ACAt + Γ with A relative to G∗ is not unique. If, for instance Σ is the identity matrix I, then G∗ is the complete partition (with p groups) and the decomposition (1) holds for any (C, Γ) = (λI, (1 − λ)I) with λ ∈ R. Recall that m∗ := min |G∗k | stands for the size of the smallest cluster. If we assume that m∗ > 1 (no singleton), then Γ is uniquely defined. Besides, the matrix C in (1) is only defined up to a permutation of its rows and columns. In the sequel, we denote C ∗ any of these matrices C. When the partition contains singletons (m∗ = 1), the matrix decomposition Σ = ACAt + Γ is made unique (up to a permutation of row and columns of C) by putting the additional constraint that the entries Γaa corresponding to singletons are equal to 0. Since the definition of ∆(C) is invariant with respect to permutation of rows and columns, this implies that ∆(C ∗ ) is well-defined for any covariance matrix Σ. For arbitrary Σ, ∆(C ∗ ) is not necessarily positive. Nevertheless, if ∆(C ∗ ) > 0, then G∗ is characterized by this property. Corollary 1. Let G be a partition such that m = mink |Gk | ≥ 2, the decomposition Σ = ACAt + Γ holds with A associated to G and ∆(C) > 0. Then G = G∗ . As pointed in (7), in the latent model (2), ∆(C ∗ ) is equal to the square of the minimal L2 -norm between two latent variables. So, in this case, the condition ∆(C ∗ ) > 0 simply requires that all latent variables are distincts. 3. Minimax thresholds on cluster separation for perfect recovery. Before developing variable clustering procedures, we begin by assessing the limits of the size of each of the two cluster separation metrics below which no algorithm can be expected to recover the clusters perfectly. We denote by m∗ = mink |G∗k | the size of the smallest cluster of the target partition G∗ defined above. For 1 ≤ m ≤ p and η, τ > 0, we consider the following sets of covariance matrices : M(m, η) := {Σ : MCOD(Σ) > η|Σ|∞ , m∗ > m} and D(m, τ ) := {Σ : ∆(C ∗ ) > τ |Γ|∞ , m∗ > m}. We use the notation PΣ to refer to the normal distribution with covariance Σ. Theorem 1. such that (12) There exists a positive constant c2 such that, for any 1 ≤ m ≤ p/3 and any η ∗ 0 ≤ η < η := c2 r log(p) , n b 6= G∗ ) ≥ 1/7, where the infimum is taken over all possible estimators. we have inf Gb supΣ∈M(m,η) P(G We also have: Theorem 2. such that (13) There exists a positive constant c1 such that, for any 2 ≤ m ≤ p/2 and any τ ∗ 0 ≤ τ < τ := c1 "s log(p) _ log(p) n(m − 1) n # imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 10   b 6= G∗ ≥ 1/7, where the infimum is taken over all estimators. then inf Gb supΣ∈D(m,τ ) PΣ G Theorems 2 and 1 show that if either metric falls below the thresholds in (13) or (12), respectively, b irrespective of the method of estimation, cannot achieve perfect recovery the estimated partition G, with high-probability uniformly over the set M(m, η) or D(m, τ ). The proofs are given in Sections 2.1 and 2.2, respectively, of the supplement [12]. We note that ∆(C ∗ ) minimax threshold takes into account the size m∗ of the smallest cluster, and therefore the required cluster separation becomes smaller for large clusters. This is not the case for the second metric. The proof of (12) shows that even when we have K = 3 clusters, that are very large, of size m∗ = p/3 each, the MCOD(Σ) threshold does not decrease with m∗ . 4. COD for variable clustering. 4.1. COD Procedure. We begin with a procedure that can be viewed as natural for model (1). It is based on the following intuition. Two indices a and b belong to the same cluster of G∗ , if and only if COD(a, b) = 0, with COD defined in (11). Equivalently, a and b belong to the same cluster when |cov(Xa − Xb , Xc )| sCOD(a, b) =: max p = max |cor(Xa − Xb , Xc )| = 0, c6=a,b var(Xb − Xa )var(Xc ) c6=a,b where sCOD stands for scaled COvariance Differences. In the following we work with this quantity, as it is scale invariant. It is natural to place a and b in the same cluster when the estimator \ sCOD(a, b) is below a certain threshold, where (14) \ sCOD(a, b) := max |d cor(Xa − Xb , Xc )| = max r c6=a,b c6=a,b b ac − Σ b bc Σ .  b b b b Σaa + Σbb − 2Σab Σcc b according to the simple COD algorithm explained below. The algoWe estimate the partition G rithm does not require as input the specification of the number K of groups, which is automatically estimated by our procedure. Step 3(c) of the algorithm is called the “or” rule, and can be replaced with the “and” rule below, without changing the theoretical properties of our algorithm, n o b l = j ∈ S : sCOD(a \ l , j) ∨ sCOD(b \ l , j) ≤ α . G The numerical performance of these two rules are also very close through simulation studies, same as we reported on a related COD procedure on correlations [13]. Due to these small differences, we b is will focus on the “or” rule for the sake of space. The algorithmic complexity for computing Σ O(p2 n) and the complexity of COD is O(p3 ), so the overall complexity of our estimation procedure is O p2 (p ∨ n) . The procedure is also valid when Γ has very small off-diagonal entries, and the results are presented in Section 6. imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 11 VARIABLE CLUSTERING The COD Algorithm b and α > 0 • Input: Σ • Initialization: S = {1, . . . , p} and l = 0 • Repeat: while S 6= ∅ 1. l ← l + 1 bl = S 2. If |S| = 1 Then G 3. If |S| > 1 Then \ (a) (al , bl ) = argmin sCOD(a, b) a,b∈S, a6=b b l = {al } \ l , bl ) > α Then G (b) If sCOD(a \ l , bl ) ≤ α Then (c) If sCOD(a n o b l = j ∈ S : sCOD(a \ l , j) ∧ sCOD(b \ l , j) ≤ α G bl 4. S ← S \ G b = (G b l )l=1,...,k • Output: the partition G 4.2. Perfect cluster recovery with COD for minimax optimal MCOD(Σ) cluster separation. b produced by the COD algorithm has the property that Theorem 3 shows that the partition G ∗ b G = G , with high probability, as soon as the separation MCOD(Σ) between clusters exceeds its minimax optimal threshold established in Theorem 1 of the previous section. Theorem 3. such that, if Under the distributional Assumption 1, there exists numerical constants c1 , c2 > 0 r log(p) n and M COD(Σ) > 3α|Σ|∞ , then we have exact cluster recovery with probability 1 − c2 /p. α ≥ c1 L 2 We recall that for Gaussian data, the constant L = 1. The proof is given in Section 3.1 of the supplement [12]. 4.3. A Data-driven Calibration procedure for COD. The performance of the COD algorithm depends on the value pof the threshold parameter α. Whereas Theorem 3 ensures that a good value for α is the order of log p/n, its optimal value depends on the actual distribution (at least through the subGaussian norm) and is unknown to the statistician. We propose below a new, fully data b from a set of candidate dependent, criterion for selecting α, and the corresponding partition G, partitions G. This criterion is based on data splitting: the estimators are built from a training sample, and then the selection involves an independent test sample (Hold-Out sample). The main task is to design a meaningful selection criterion. Let us consider two independent sample sets indexed by i = 1, 2, each of size n/2. The sample (1) will be a training dataset, and we denote by Gb(1) a collection of partitions computed from sample (1),  for instance via the COD algorithm with b (i) = Cor d (i) (Xa − Xb , Xc ) a varying threshold α. For any a < b, we set ∆ ab ; i = 1, 2. Since c6=a,b G ∆ab := [Cor(Xa − Xb , Xc )]c6=a,b equals zero if and only if a ∼ b, we want to select a partition G b (2) 1 G is a good predictor of ∆ab . To implement this principle, it remains to evaluate such that ∆ ab ab imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 12 b (2) . For this evaluation, we propose to re-use the training sample (1) which ∆ab independently of ∆ ab b ∈ Gb(1) by has already been used to build the family of partitions Gb(1) . More precisely, we select G minimizing i X h (2) b ∈ argmin CV (G) with CV (G) = b 1 G −∆ b (1) |2∞ . G |∆ ab ab G∈Gb(1) a<b ab An unusual feature of the above criterion is that the training sample (1) is involved both in the training stage and in the test stage. b We need the following additional asThe following proposition assesses the performance of G. sumption. d a − Xb , Xc ) = 0. (P1) If Cor(Xa − Xb , Xc ) = 0 then E Cor(X In general, the sample correlation is not an unbiased estimator of the population level correlation. Still, (P1) is satisfied when the data are normally distributed or in a latent model (2) when the noise variables Ea have a symmetric distribution. The next proposition provides guaranties for the CV criterion averaged over the Hold-Out sample E(2) [CV (G)]. The proof is given in Section 3.2 of the supplement [12]. Proposition 2. Assume that the distributional Assumption p 1 and (P1) hold. Then, there exists 2 a constant c1 > 0 such that, when M COD(Σ) > c1 |Σ|∞ L log(p)/n, we have E(2) [CV (G∗ )] ≤ min E(2) [CV (G)], (15) G∈Gb(1) both with probability larger than 1 − 4/p and in expectation with respect to P(1) . p Under the condition M COD(Σ) > c1 |Σ|∞ L2 log(p)/n, Theorem 3 ensures that G∗ belongs to Gb(1) with high probability, whereas (15) suggests that the CV criterion is minimized at G∗ . [ \ If we consider a CV algorithm based on COD(a, b) instead of sCOD(a, b), then we can obtain a counterpart of Proposition 2 without requiring the additional assumption (P1). Still, we favor the \ procedure based on sCOD(a, b) mainly for its scale-invariance property. 5. Penalized convex K-means: PECOK. 5.1. PECOK Algorithm. Motivated by the fact that the COD algorithm is minimax optimal with respect to the MCOD(Σ) metric, but not necessarily with respect to the ∆(C ∗ ) metric (unless the size of the smallest cluster is constant), we propose below an alternative procedure, that adapts to this metric. Our second method is a natural extension of one of the most popular clustering strategies. When we view the G-block covariance model as arising via the latent factor representation in (i) in the Introduction, the canonical clustering approach would be via the K-means algorithm [29], which is NP-hard [4]. Following Peng and Wei [32], we consider a convex relaxation of it, which is computationally feasible in polynomial time. We argue below that, for estimating clusters given by (1), one needs to further tailor it to our model. The statistical analysis of the modified procedure is the first to establish consistency of variable clustering via K-means type procedures, to the best of our knowledge. The estimator offered by the standard K-means algorithm, with the number K of groups of G∗ known, is (16) b ∈ argmin crit(X, G) with G G crit(X, G) = p X a=1 min kX:a − X̄Gk k2 , k=1,...,K imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 13 VARIABLE CLUSTERING P and X̄Gk = |Gk |−1 a∈Gk X:a . For a partition G, let us introduce the corresponding partnership matrix B by ( 1 if a and b are in the same group Gk , (17) Bab = |Gk | 0 if a and b are in a different groups. G we observe that Bab > 0 if and only if a ∼ b. In particular, there is a one-to-one correspondence between partitions G and their corresponding partnership matrices. It is shown in Peng and Wei [32] that the collection of such matrices B is described by the collection O of orthogonal projectors fulfilling tr(B) = K, B1 = 1 and Bab ≥ 0 for all a, b. Theorem 2.2 in Peng and Wei [32] shows that solving the K-means problem is equivalent to finding the global maximum b Bi , B̄ = argmaxhΣ, (18) B∈O b from B̄. and then recovering G The set of orthogonal projectors is not convex, so, following Peng and Wei [32], we consider a convex relaxation C of O obtained by relaxing the condition ”B orthogonal projector”, by ”B positive semi-definite”, leading to   •B < 0 (symmetric and positive semidefinite)     P   • Bab = 1, ∀b p×p a (19) C := B ∈ R : . • Bab ≥ 0, ∀a, b       • tr(B) = K Thus, the (uncorrected) convex relaxation of K-means is equivalent with finding e = argmaxhΣ, b Bi. B (20) B∈C To assess the relevance of this estimator, we first study its behavior at the population level, b is replaced by Σ in (20). Indeed, if the minimizer of our criterion does not recover the when Σ true partition at the population level, we cannot expect it to be consistent, even in a large sample asymptotic context (fixed p, n goes to infinity). We recall that |Γ|V := maxa Γaa − mina Γaa . Proposition 3. Assume that ∆(C ∗ ) > 2|Γ|V /m∗ . Then, B ∗ = argmaxB∈O hΣ, Bi. If ∆(C ∗ ) > 7|Γ|V /m∗ , then B ∗ = argmaxB∈C hΣ, Bi. For ∆(C ∗ ) large enough, the population version of convexified K-means recovers B ∗ . The next proposition illustrates that the condition ∆(C ∗ ) > 2|Γ|V /m∗ for population K-means is in fact necessary. Proposition 4. Consider the model (1) with  α   γ 0 0 0 + ∗ 0 β β − τ 0 γ− C = , Γ= 0 β−τ β 0 0 0 0 γ−  , and |G∗1 | = |G∗2 | = |G∗3 | = m∗ . The population maximizer BΣ = argmaxB∈O hΣ, Bi is not equal to B ∗ as soon as 2τ = ∆(C ∗ ) < 2 m∗ |Γ|V . imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 14 The two propositions above are proved in Appendix A.1. As a consequence, when Γ is not proportionnal to the identity matrix, the population minimizers based on K-means and convexified K-means do not necessary recover the true partition even when the ”within-between group“ covariance gap is strictly positive. This undesirable behavior of K-means is not completely unexpected as K-means is a quantization algorithm which aims to find for clusters of similar width, instead of ”homogeneous” clusters. Hence, we need to modify it for our purpose. This leads us to suggesting a population level correction in Proposition 3. Indeed, as a direct Corollary of Proposition 3, we have B ∗ = argminhΣ − Γ, Bi , B∈C as long as ∆(C ∗ ) > 0. This suggests the following Penalized Convex K-means (PECOK) algob of B from which we derive the rithm, in three steps. The main step 2 produces an estimator B b estimated partition G. We summarize this below. The PECOK algorithm b Step 1. Estimate Γ by Γ.   b = argmax hΣ, b Bi − hΓ, b Bi . Step 2. Estimate B ∗ by B B∈C b Step 3. Estimate G by applying a clustering algorithm to the columns of B. ∗ b the sample covariance matrix; (ii) Γ, b The required inputs for Step 2 of our algorithm are: (i) Σ, the estimator produced at Step 1; and (iii) K, the number of groups. Our only requirement on the clustering algorithm applied in Step 3 is that it succeeds to recover the partition G∗ when applied to true partnership matrix B ∗ . The standard K-means algorithm [29] seeded with K distinct centroids, kmeans++ [3], or any approximate K-means as defined in (28) in Section 5.4, fulfill this property. This step is done at no additional statistical accuracy cost, as shown in Corollary 4 below. b Bi as a penalty term on B, with data dependent weights Γ. b Therefore, We view the term hΓ, b the construction of an accurate estimator Γ of Γ is a crucial step for guaranteeing the statistical optimality of the PECOK estimator. b Estimating Γ before estimating the partition itself is a non-trivial task, 5.2. Construction of Γ. and needs to be done with care. We explain our estimation below and analyze it in Proposition 8 in Appendix A.4. We show that this estimator of Γ is appropriate whenever Γ is a diagonal matrix (or diagonally dominant, with small off-diagonal entries). For any a, b ∈ [p], define (21) V (a, b) := max c,d∈[p]\{a,b} b ac − Σ b ad ) − (Σ b bc − Σ b bd ) (Σ q , b cc + Σ b dd − 2Σ b cd Σ with the convention 0/0 = 0. Guided by the block structure of Σ, we define b1 (a) := argmin V (a, b) b∈[p]\{a} and b2 (a) := argmin V (a, b), b∈[p]\{a,b1 (a)} to be two elements ”close” to a, that is two indices b1 = b1 (a) and b2 = b2 (a) such that the empirical bb c − Σ b b d , i = 1, 2, is most similar to Σ b ac − Σ b ad , for all variables c and d not covariance difference Σ i i imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 15 VARIABLE CLUSTERING equal to a or bi , i = 1, 2. It is expected that b1 (a) and b2 (a) either belong to the same group as a, b is a diagonal matrix, defined by or belong to some ”close” groups. Then, our estimator Γ (22) b aa = Σ b aa + Σ b b (a)b (a) − Σ b ab (a) − Σ b ab (a) , Γ 1 2 1 2 for a = 1, . . . , p. b aa should be close to Σaa + Σb (a)b (a) − Σab (a) − Σab (a) , which is equal to Γaa in the Intuitively, Γ 1 2 1 2 favorable event where both b1 (a) and b2 (a) belong to the same group as a. In general, b1 (a) and b2 (a) cannot be guaranteed to belong to the same group as a. Nevertheless, b these two surrogates p b1 (a) and b∞2 (a) are close enough to a so that |Γaa − Γaa | to be at most of the order of |Γ|∞ log(p)/n in ` -norm, as shown in Proposition 8 in Appendix A.4. In the next b is good enough to ensure that PECOK perfectly recovers G∗ under subsection, we show that Γ minimal separation condition. Note that PECOK requires the knowledge of the true number K of groups. When the number K of groups itself is unknown, we can modify the PECOK criterion by adding a penalty term as explained in a previous version of our work [14, Sec. 4]. Alternatively, we propose in Section 7 a simple cross-validation procedure. 5.3. Perfect cluster recovery with PECOK for near-minimax ∆-cluster separation. We show in this section that the PECOK estimator recovers the clusters exactly, with high probability, at a near-minimax separation rate with respect to the ∆(C ∗ ) metric. b Theorem 4. There exist c1 , c2 , c3 three positive constants such that the following holds. Let Γ b be any estimator of Γ, such that |Γ − Γ|V ≤ δn,p with probability 1 − c1 /p. Then, under Assumption 1, and when L4 log(p) ≤ c3 n and " (r ) # r δn,p log p p log(p) p ∗ (23) ∆(C ) ≥ cL kΓk∞ + + + + ∗ , m∗ n nm∗2 n nm∗ m b = B ∗ , with probability higher than 1−c1 /p. Here, cL is a positive constant that only depends then B b is the estimator (22), the same conclusion holds with on L in Assumption 1. In particular, if Γ probability higher than 1 − c2 /p when ) (r r log p p log(p) p ∗ (24) ∆(C ) ≥ cL kΓk∞ + + + . m∗ n nm∗2 n nm∗ The proof is given in Appendix A.3. Remark 1. We left the term δn,p explicit in (23) in order to make clear how the estimation of b = 0), the term Γ affects the cluster separation ∆(C ∗ ) metric. Without a correction (i.e. taking Γ ∗ ∗ δn,p /m equals |Γ|V /m which is non zero (and does not decrease in a high-sample asymptotic) unless Γ has equal diagonal entries. This phenomenon is consistent with the population analysis in the previous subsection. Display (24) shows that the separation condition can be much decreased with the correction. In particular, for balanced clusters, exact recovery is guaranteed when "r # K ∨ log p K ∨ log p (25) ∆(C ∗ ) ≥ cL + , m∗ n n for an appropriate constant cL > 0. In view of Theorem 2 the rate is minimax optimal when the number of clusters K ≤ log(p). For an even larger number of clusters (K ≥ log(p)), the rate is imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 16 only minimax up to some loss. For instance, if the clusters are balanced, we possibly lose a factor K/ log(p) relative to the optimal rate. As discussed in the introduction, this gap is possibly due to a computational barrier and we refer to [15] for more details. Bounded variables X also follow subGaussian distribution. Nevertheless, the corresponding subGaussian norm L may be large and Theorem 4 can sometimes be improved, as in Theorem 5 below, proved in Appendix A.3 b Theorem 5. There exist c1 , c2 , c3 three positive constants such that the following holds. Let Γ b be any estimator of Γ, such that |Γ − Γ|V ≤ δn,p with probability 1 − c1 /p. Then, under Assumption 1-bis, and " # r δ p log(p) p log(p) n,p 1/2 (26) ∆(C ∗ ) ≥ c2 M kΓk∞ + M2 + ∗ . nm∗2 nm∗ m b = B ∗ , with probability higher than 1 − c1 /p. then B b as in (22), the term δn,p /m∗ can be simplified as under Assumption 1, see When we choose Γ Proposition 8 in Appendix A.4. For balanced clusters, Condition (26) can be simplified in # " r δ K log(p) K log(p) n,p 1/2 ∆(C ∗ ) ≥ c2 M kΓk∞ + M2 + ∗ . nm∗ n m In comparison to (25), the condition does not depend anymore on the subGaussian nom L, but the term K ∨ log(p) has been replaced by K log(p). Remark 2. For the Ising Block Model (3) with K balanced groups, we have M = 1 and p = m∗ K, C ∗ = (ωin − ωout )IK + ωout J and Γ = (1 − ωin )IK . As a consequence, no diagonal correction is b = 0, and since |Γ|V = 0, we have δn,p = 0. Then, for K balanced needed, that is we can take Γ groups, condition (26) simplifies to s log(p) K log(p) (ωin − ωout ) & K + np n In the specific case K = 2, we recover (up to numerical multiplicative constants) the optimal rate proved in [8]. Our procedure and analysis provide a generalization of these results, as they are valid for general K and Theorem 5 also allows for unequal groups. 5.4. A comparison between PECOK and Spectral Clustering. In this section we discuss connections between the clustering methods introduced above and spectral clustering, a method that has become popular in network clustering. When used for variable clustering, uncorrected spectral clustering consists in applying a clustering algorithm, such as K-means, on the rows of the p×K-matrix b obtained by retaining the K leading eigenvectors of Σ. SC algorithm b 1. Compute Vb , the matrix of the K leading eigenvectors of Σ ∗ 2. Estimate G by applying a (rotation invariant) clustering method to the rows of Vb . First, we recall the premise of spectral clustering, adapted to our context. For G∗ -block covariance models as (1), we have Σ − Γ = AC ∗ At . Let U be the p × K matrix collecting the K leading imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 VARIABLE CLUSTERING 17 eigenvectors of Σ − Γ. It has been shown, see e.g. Lemma 2.1 in Lei and Rinaldo [27], that a and b belong to the same cluster if and only if Ua: = Ub: and if and only if [U U t ]a: = [U U t ]b: . Arguing as in Peng and Wei [32], we have the following. Lemma 2. SC algorithm is equivalent to the following algorithm: b Bi : tr(B) = K, I < B < 0}. Step 1. Find B = argmax{hΣ, ∗ Step 2. Estimate G by applying a (rotation invariant) clustering method to the rows of B. The connection between (unpenalized) PECOK and spectral clustering now becomes clear. The e (20) involves the calculation of (unpenalized) PECOK estimator B (27) e = argmax{hΣ, b Bi : B1 = 1, Bab ≥ 0, tr(B) = K, B < 0}. B B Since the matrices B involved in (27) are doubly stochastic, their eigenvalues are smaller than 1 e = argmaxB {hΣ, b Bi : B1 = 1, Bab ≥ 0, tr(B) = K, I < B < 0}. and hence (27) is equivalent to B e in which C is replaced by Note then that B can be viewed as a less constrained version of B, C = {B : tr(B) = K, I < B < 0}, where we have dropped the p(p + 1)/2 constraints given by B1 = 1, and Bab ≥ 0. We show in what follows that the possible computational gains resulting from such a strategy may result in severe losses in the theoretical guarantees for exact partition b the estimator recovery. In addition, the proof of Lemma 2 shows that B = Vb Vb t , so, contrary to B, ∗ B is (almost surely) never equal to B . In view of this connection between Spectral clustering and unpenalized PECOK and on the fact that the population justification of spectral clustering deals with the spectral decomposition of e := Σ b − Γ. b Σ − Γ, this leads to propose the following corrected version of the algorithm based on Σ CSC algorithm b , the matrix of the K leading eigenvectors of Σ e := Σ b −Γ b 1. Compute U b , via an η-approximation of K-means (28). 2. Estimate G∗ by clustering the rows of U b such For η > 1, an η-approximation of K-means is a clustering algorithm producing a partition G that     b t, G b ≤ η min crit U b t, G , (28) crit U G with crit(·, ·) the K-means criterion (16). Although solving K-means is NP-Hard [4], there exist polynomial time approximate K-means algorithms, see Kumar et al. [25]. As a consequence of the above discussion, the first step of CSC can be interpreted as a relaxation of the program associated b to PECOK estimator B. In the sequel, we provide some results for CSC procedure. To simplify the presentation, we assume in the following that all the groups have the same size |G∗1 | = . . . = |G∗K | = m = p/K. We emphasize that this information is not required by either PECOK or CSC, or in the proof of Proposition 5 below. We only use it here to illustrate the issues associated with CSC in a way that is not cluttered by unnecessary notation. We denote by SK the set of permutations on {1, . . . , K} and we denote by K b σ(k) | X |G∗k \ G b G∗ ) = min L(G, σ∈SK m k=1 imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 18 the sum of the ratios of miss-assigned variables with indices in G∗k . In the previous sections, we b G∗ ) = 0. We give below conditions studied perfect recovery of G∗ , which would correspond to L(G, ∗ b G ) ≤ ρ, for an appropriate quantity ρ < 1, and we show that very small values under which L(G, of ρ require large cluster separation, possibly much larger than the minimax optimal rate. We begin with a general theorem pertaining to partial partition recovery by CSC, under restrictions on the smallest eigenvalue λK (C ∗ ) of C ∗ . Proposition 5. We let Re(Σ) = tr(Σ)/kΣkop denote the effective rank of Σ. There exist cη,L > 0 only depending on η and L and a numerical constant c1 such that the following holds under Assumption 1. For any 0 < ρ < 1, if r √ c KkΣk Re(Σ) ∨ log(p) op η,L (29) λK (C ∗ ) ≥ , √ ∗ m ρ n b G∗ ) ≤ ρ, with probability larger than 1 − c1 /p. then L(G, The proof extends the arguments of [27], initially developed for clustering procedures in stochastic b G∗ ) to the noise level, quantified block models, to our context. Specifically, we relate the error L(G, ∗ t e − AC A kop . We then employ the results of [23] to show that this operator in this problem by kΣ norm can be controlled, with high probability, which leads to the conclusion of the theorem. We observe that ∆(C ∗ ) ≥ 2λK (C ∗ ), so the lower bound (29) on λK (C ∗ ) enforces the same lowerbound on ∆(C ∗ ). As n goes to infinity, the right hand side of Condition (29) goes to zero, and CSC is therefore consistent in a large sample asymptotic. In contrast, we emphasize that (uncorrected) SC algorithm is not consistent as can be shown by a population analysis similar to that of Proposition 4. To further facilitate the comparison between CSC and PECOK, we discuss both the conditions and the conclusion of this theorem in the simple setting where C ∗ = τ IK and Γ = Ip . Then, the cluster separation measures coincide up to a factor 2, ∆(C ∗ ) = 2λK (C ∗ ) = 2τ . Corollary 2 (Illustrative example: C ∗ = τ IK and Γ = Ip ). There exist three positive numerical constants cη,L , c0η,L and c3 such that the following holds under Assumption 1. For any 0 < ρ < 1, if (30) ρ ≥ cη,L h K2 n + K log(p) i n and τ ≥ c0η,L h K2 ρn ∨√ K i , ρnm b G∗ ) ≤ ρ, with probability larger than 1 − c3 /p. then L(G, b is obtained via the PECOK Recall that, as a benchmark, Theorem 4 above states that, when G q p b G∗ ) = 0, or equivalently, G b = G∗ , with high algorithm, and if τ & K∨log + log(p)∨K , then L(G, mn n probability. We can therefore provide the following comparison. • If we consider ρ as a user specified small value, independent of n or p, and if the number of groups K is either a constant or grows at most as log p, then the size of the cluster separation given by either Condition (30) or by PECOK are essentially the same, up to unavoidable log p factors. The difference is that, in this regime, CSC guarantees recovery up to a fixed, small, fraction of mistakes, whereas PECOK guarantees exact recovery. imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 19 VARIABLE CLUSTERING • Although perfect recovery, with high probability, cannot be guaranteed for CSC, we could be close to it by requiring ρ to be close to zero. In this case, the distinctions between Conditions (30) and that for PECOK become much more pronounced. • When we move away from the case C ∗ = τ IK , the comparison becomes even less favorable to CSC. For instance, when Γ = I and C ∗ = τ IK + αJ, with J being the matrix with all entries equal to one, as in the Ising Block model discuss page 16. Notice that in this case we continue to have ∆(C ∗ ) = 2λK (C ∗ ) = 2τ . Then, for a given, fixed, value of ρ and K fixed, condition (29) requires the cluster separation p α log(p) τ& , √ nρ which is independent of m, unlike the minimax cluster separation rate that we established in Theorem 2 above. Therefore, the correction strategies employed in SBM are not directly transferable to variable clustering, which further supports the merits our PECOK method. All the results of this section are proved in Section 5 of the supplement [12]. 6. Approximate G-block covariance models. In the previous sections, we have proved that under some separation conditions, COD and PECOK procedures are able to exactly recover the partition G∗ . However, in practical situations, the separation conditions may not be met. Besides, if the entries of Σ have been modified by an infinitesimal perturbation, then the corresponding partition G∗ would consist of p singletons. As a consequence, it may be more realistic and more appealing from a practical point of view to look for a partition G[K] with K < |G∗ | groups such that Σ is close to a matrix of the form ACAt + Γ where Γ is diagonal and A is associated to G[K]. This is equivalent to considering a decomposition Σ = ACAt + Γ with Γ non-diagonal, where the non-diagonal entries of Γ are small. In the sequence, we write R = Γ − Diag(Γ) for the matrix of the off-diagonal elements of Γ and D = Diag(Γ) for the diagonal matrix given by the diagonal of Γ. In the next subsection, we discuss under which conditions the partition G[K] is identifiable and then, we prove that COD and PECOK are able to recover these partitions. 6.1. Identifiability of approximate G-block covariance models. When Γ is allowed to be not exactly equal to a diagonal matrix, we encounter a further identifiability issue, as a generic matrix Σ may admit many decompositions Σ = ACAt + Γ. In fact, such a decomposition holds for any membership matrix A and any matrix C if we define Γ = Σ − ACAt . So we need to specify the kind of decomposition that we are looking for. For K being fixed, we would like to consider the partition G with K clusters that maximizes the distance between goups (e.g. MCOD(Σ, G)) while having the smallest possible noise term |R|∞ . Unfortunately, such a partition G does not necessarily exist and is not necessarily unique. Let us illustrate  this situation  with a simple example. 2r 0 0 Example. Assume that Σ is given by Σ =  0 2r 0  + Ip , with r > 0, with the convention 0 0 2r that each entry corresponds to a block of size 2. Considering partitions with 2 groups and allowing Γ to be non diagonal, we can decompose Σ using different partitions. For instance         2r 0 0 0 0 0 r r 0 r −r 0 Σ =  0 r r  + 0 r −r + Ip = r r 0  + −r r 0 + Ip . 0 r r 0 −r r 0 0 2r 0 0 0 | {z } | {z } | {z } | {z } =A1 C1 At1 =Γ1 =A2 C2 At2 =Γ2 imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 20 Importantly, the two decompositions correspond to two different partitions G1 and G2 and both decompositions have |Ri |∞ = r and MCOD(Σ, Gi ) = 2r = 2|R|∞ , for i = 1, 2. In addition, no decomposition Σ = ACAt + D + R with associated partition in 2 groups, satisfies MCOD(Σ, G) > 2r or |R|∞ < r. As a consequence, there is no satisfying way to define a unique partition maximizing MCOD(Σ, G), while having |R|∞ as small as possible. We show below that the cutoff MCOD(Σ, G) > 2|R|∞ is actually sufficient for partition identifiability. For this, let us define Pj (Σ, K), j = {1, 2} as the set of quadruplets (A, C, D, R) such that Σ = ACAt + D + R, with A a membership matrix associated to a partition G with K groups with mink |GK | ≥ j, and D and R defined as above. Hence P1 corresponds to partitions without restrictions on the minimum group size. For instance, singletons are allowed. In contrast P2 only contains partitions without singletons. We define ρ1 (Σ, K) = max {MCOD(Σ, G)/|R|∞ : (A, C, D, R) ∈ P1 (Σ, K) and G associated to A} , ρ2 (Σ, K) = max {∆(C)/|R|∞ : (A, C, D, R) ∈ P2 (Σ, K)} . We view ρ1 and ρ2 as respective measures of “purity” of the block structure of Σ. Proposition 6. (i) Assume that ρ1 (Σ, K) > 2. Then, there exists a unique partition G such that there exists a decomposition Σ = ACAt +Γ, with A associated to G and MCOD(Σ, G) > 2|R|∞ . We denote by G1 [K] this partition. (ii) Assume that ρ2 (Σ, K) > 8. Then, there exists a unique partition G with mink |Gk | ≥ 2, such that there exists a decomposition Σ = ACAt + Γ, with A associated to G and ∆(C) > 8|R|∞ . We denote by G2 [K] this partition. (iii) In addition, if both ρ1 (Σ, K) > 2 and ρ2 (Σ, K) > 8, then G1 [K] = G2 [K]. The conditions ρ1 (Σ, K) > 2 and ρ2 (Σ, K) > 8 are minimal for defining uniquely the partition G1 [K]. For ρ1 , this has been illustrated in the example above the proposition. For ρ2 , we provide a counter example when ρ2 (Σ, K) = 8 in Section 1.3 of the supplement [12]. The proof of Proposition 6. is given in Section 1.2 of [12]. The conclusion of Proposition 6 does essentially revert to that of Proposition 1 of Section 2 as soon as |R|∞ is small enough respective to the cluster separation sizes. Denoting K ∗ the number of groups of G∗ , we observe that G1 [K ∗ ] = G∗ and G2 [K ∗ ] = G∗ if m∗ ≥ 2. Besides, ρ1 (Σ, K) = ρ2 (Σ, K) = 0 for K > K ∗ . For K < K ∗ and when G1 [K] (resp. G2 [K]) are well defined, then the partition G1 [K] (resp. G2 [K]) is coarser than G∗ . In other words, G1 [K] is derived from G∗ by merging groups G∗k thereby increasing M COD(Σ, G) (resp. ∆(C)) while requiring |R|∞ to be small enough. We point out that, in general, there is no unique decomposition Σ = ACAt + Γ with A associated to G2 [K], even when mink |G2 [K]k | ≥ 2. Actually, it can be possible to change some entries of C and R, while keeping C + R, ∆(C) and |R|∞ unchanged. 6.2. The COD algorithm for approximate G-block covariance models. We show below that the COD algorithm is still applicable if Σ has small departures from a block structure. We set λmin (Σ) for the smallest eigenvalue of Σ. Theorem 6. Under the distributional Assumption 1, there exist numerical constants c1 , c2 > 0 q log p 2 such that the following holds for all α ≥ c1 L n . If, for some partition G and decomposition t Σ = ACA + R + D, we have (31) |R|∞ ≤ λmin (Σ) √ α 2 2 and MCOD(Σ, G) > 3α|Σ|∞ , imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 21 VARIABLE CLUSTERING then COD recovers G with probability higher than 1 − c2 /p. The proof is given in Section 3.1 of the supplement [12]. If G satisfies the assumptions of Theorem 6, then it follows from Proposition 6 that G = G1 [K] for some p K > 0. First, consider the situation where the tuning parameter α is chosen to be of the order log(p)/n. If MCOD(Σ, G∗ ) ≥ 3α|Σ|∞ , then COD selects G∗ with high probability. If MCOD(Σ, G∗ ) is smaller than this threshold, then no procedure is able to recover G∗ with high probability (Theorem 1). Nevertheless, COD is able to recover a coarser partition G1 [K] whose corresponding MCOD metric MCOD(Σ, G) is higher than the threshold 3α|Σ|∞ and whose matrix R is small enough. For larger α, then COD recovers a coarser partition G (corresponding to G1 [K] with a smaller K) whose corresponding approximation |R|∞ is allowed to be larger. 6.3. The PECOK algorithm for approximate G-block covariance models. In this subsection, we investigate the behavior of PECOK under the approximate G-block models. The number K of groups being fixed, we assume that ρ2 (Σ, K) > 8 so that G2 [K] is well defined. We shall prove that PECOK recovers G2 [K] with high probability. By abusing the notation, we denote in this subsection G∗ for the target partition G2 [K], B ∗ for the associated partnership matrix and (A, C ∗ , D, R) ∈ P2 (Σ, K) any decomposition of Σ maximizing ∆(C)/|R|∞ . Similarly to Proposition 3, we first provide sufficient conditions on C ∗ under which a population version of PECOK can recover the true partition. Proposition 7. Corollary 3. If, ∆(C ∗ ) > 7|D|V +2kRkop m If ∆(C ∗ ) > 3|R|∞ + + 3|R|∞ , then B ∗ = argminB∈C hΣ, Bi. 2kRkop m , then B ∗ = argminB∈C hΣ − D, Bi. In contrast to the exact G-block model, the cluster distance ∆(C ∗ ) now needs to be larger than |R|∞ for the population version to recover the true partition. The |R|∞ condition is fact necessary as discussed in subsection 6.1. In comparison to the necessary conditions discussed in subsection 6.1, there is an additional kRkop /m term. The proofs are given in Appendix A.2. b to be as in (22). Note We now examine the behavior of PECOK when we specify the estimator Γ b is in fact an estimator that in this approximate block covariance setting, the diagonal estimator Γ b we need the of the diagonal matrix D. In order to derive deviation bounds for our estimator Γ, following diagonal dominance assumption. Assumption 2: (diagonal dominance of Γ) The matrix Γ = D + R fulfills (32) Γaa ≥ 3 max |Γac | (or equivalently Daa ≥ 3 max |Rac |). c:c6=a c:c6=a b recovers the groups under similar conditions The next theorem states that PECOK estimator B to that of Theorem 4 if R is small enough. The proof is given in Appendix A.3, with proofs of intermediate results given in Section 4 of the supplement [12]. Theorem 7. There exist c1 , c2 , cL , c0L four positive constants such that the following holds. Under Assumptions 1 and 2, and when L4 log(p) ≤ c1 n and (r ) p r |R|∞ |D|∞ + kRkop log p p log(p) p (33) |R|∞ + ≤ cL kΓkop + + + m mn nm2 n nm imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 22 b = B ∗ , with probability higher than 1 − c2 /p, as soon as we have B )# (r " r log p p log(p) p , + + + (34) ∆(C ∗ ) ≥ c0L kΓkop mn nm2 n nm So, as a long as |R|∞ and kRkop are small enough so that (33) are satisfied, PECOK algorithm will correctly identify the target partition G∗ at the ∆-(near) optimal minimax level (34). A counterpart of Theorem 7 for Assumption 1-bis is provided in Appendix A.3. 7. Simulation results. In this section we verify numerically our theoretical findings and also illustrate the finite sample performance of our methods. The implementation of PECOK can be found at github.com/martinroyer/pecok/ and that of COD at CRAN.R-project.org/package=cord. 7.1. Simulation design. Recall our G-latent covariance Σ = ACA0 + Γ. Under various scenarios of A and Γ to be described momentarily, we consider the following models for C: • Model 1: C = B T B where B is a random (K − 1) × K matrix with independent entries. Each entry takes the value +1 and −1 with equal probability 0.5 × K −1/2 , and the value 0 with probability 1 − K 1/2 . • Model 2: C = C 0 − 0.001I where C 0 is generated by Model 1. The matrix C is positive semi-definite in Model 1 and negative definite in Model 2. In the first two simulation scenarios (referred to as M1 and M2 thereafter), we set C derived from Models 1–2 respectively, and specify A to correspond to K = 10 equal-size groups of variables (or equivalently m = p/K). In a third scenario (M1S), we specify A such that it corresponds to the existence of 5 singletons, which are variables that form their own groups of size 1, respectively, and the remaining K − 5 groups have equal-size, while C is the same as M1. In these first three scenarios, we employ diagonal Γ = D where the p diagonal entires of D are random permutations of {0.5, 0.5 + 1.5/(p − 1), . . . , 2}. In the fourth scenario (M1P), we consider the approximate G-block model by setting Γ = D + R where R = 0.1 · U t U/ max(U t U ) and U is a p × p matrix with iid random entries from a uniform distribution on [−1, 1]. We run these four scenarios for two representative p = 200 and p = 1600, and for sample sizes n = 100, 300, . . . , 900 unless noted otherwise. All simulations are repeated 100 times. The goal of our methods is to create sub-groups of vectors of dimension n, from a given collection of p vectors of observations, each of dimension n. This task can be viewed as that of clustering p objects in Rn . The existing data clustering algorithms are not tailored to recovering groups with this structure, but they can serve as comparative methods. We thus compare the performance of COD and PECOK with three popular clustering algorithms: K-means, Hierarchical Clustering (HC) and spectral clustering. We apply K-means on the columns of the n×p matrix of n observations, and use the negative correlation as distance matrix in HC. The spectral clustering algorithm is discussed in Section 5.4, which does not correct for Γ. We use the standard K-means and HC algorithms in R, and we also implement our COD algorithm in R. We also include a variant of the COD algorithm suggested by a reviewer. This variant applies the connected component algorithm (as implemented in CRAN package igraph available at https://CRAN.R-project.org/package=igraph) to a graph converted from our proposed COD metric matrix thresholded at level α, which will be referred to as COD-cc. The spectral clustering algorithm is based on the widely used Python package scikit-learn, and we implement our PECOK algorithm also using Python. imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 VARIABLE CLUSTERING 23 The three competing methods require specification of the number of groups K, and we will use the true K = 10 to evaluate their oracle performance. For our proposed methods, we use the CV approach proposed in Section 4.3 to determine K in a data-adaptive fashion. We select either K from a grid in PECOK or the K-related threshold α also from a grid in COD, using the two independent datasets of size n proposed in Section 4.3. The grid for PECOK is 2, 4, . . . , 40.Since the theoretical choice of α is proportional to n−1/2 log1/2 p, we use a grid of α/ n−1/2 log1/2 p = 0.25, 0.5, . . . , 5 in COD. 7.2. Exact recovery performance and comparison. Figure 1 shows the average percentages of exact recovery across 100 runs by K-means, HC, COD, COD-cc, and PECOK when n varies. Under one setting with a very large p = 1600, PECOK did not complete computation within two weeks, and thus its numerical performance for large p = 1600 was not reported in the figure. COD and COD-cc clearly outperform all other competing methods (K-means, HC and spectral clustering) when n is about 300 or larger in all the scenarios. K-means and HC, even with the oracle choice of K and large n = 900, fail to recover the true groups exactly. COD-cc is better than COD for small n = 100, there are almost no finite sample differences between COD and COD-cc for n = 900, which is consistent with our theory showing that they share the same rates described before. COD-cc and COD have similar performance across almost all models, and COD-cc achieves close to 100% recovery for smaller samples than COD under the model with singletons (M1S). Except for the model containing singletons (M1S), PECOK has the best performance for small n = 100 and p = 200, and achieves close to 100% as COD and CODcc for larger n. Under the singleton scenario M1S, COD-cc has the best performance for all n, while the difference between COD-cc and COD vanishes when n = 900. Under this model, the recovery percentages of PECOK increase with n but only reaches about 40% when n = 900 and p = 200. This is consistent with our theoretical results that PECOK is not expected to work well in the presence of singletons, while COD adapts to this situation. We also note that the competing methods used for comparison are able to recover clusters very close to the truth (measured by the adjusted rand index, or ARI), see Section 7 of the supplemental material [12] for this partial recovery comparison. 7.3. The importance of correcting for Γ in PECOK. The step 1 of our PECOK algorithm is to estimate and correct for Γ. We illustrate the importance of this step by comparing its performance with two closely related methods, Γ-uncorrected PECOK and K-means, neither of which corrects for Γ. The Γ-uncorrected PECOK algorithm simply replaces the estimated Γ̂ in the step 1 of PECOK by a zero matrix. We use the true K as input to these two methods to assess their oracle performance under the true K, while the parameter K in PECOK is selected by CV as described before. To fix ideas, we use scenario M1 described before and set p = 200. Figure 2(a) shows that the exact recovery percentages of K-means are close to zero, and those of Γ-uncorrected PECOK are smaller than 30%, across all n. After correcting for Γ, PECOK yields close to 100% exact recovery when n increases to 300. 7.4. Comparison under varying m. In this section we illustrate the finite sample performance of PECOK when m varies. We use the simulation scenario M1 under p = 200, and consider m = 50 and m = 20, for n = 60, 80, 100, 150, to compare the increasing trend in performance before reaching 100% when n reaches 200 as shown in Figure 1. The rest of the simulation set-up is the same as that of the previous section. As predicted by our theory, Figure 2(b) shows the percentages of exact recovery is better for a larger m = 50, compared with m = 20, for the same n. imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 24 Fig 1: Percentages of exact recovery by K-means (K-Oracle, medium green lines, triangle points), HC (H-Oracle, light blue lines, cross points), spectral clustering (S-Oracle, light yellow lines, upside-down triangle points), COD (dark red lines, circle points), COD-cc (light orange lines, plus points), PECOK (light pink lines, diamond points) across 100 runs of 4 scenarios described in the main text, when p = 200 (solid lines) and p = 1600 (dashed lines). All standard errors are smaller than 5%. ● (b) M2 ● ● ● ● 100 100 (a) M1 ● ● ● ● ● ● ● ● ● ● 80 60 40 40 0 20 ● ● 400 600 ● ● 800 200 400 600 n (c) M1S (d) M1P ● ● ● ● 100 n 100 200 COD COD−cc PECOK K−Oracle H−Oracle S−Oracle p=200 p=1600 ● 20 Exact Recovery % 80 60 COD COD−cc PECOK K−Oracle H−Oracle S−Oracle p=200 p=1600 ● 0 Exact Recovery % ● 800 ● ● ● ● ● ● ● 80 60 0 ● ● ● 40 40 20 ● COD COD−cc PECOK K−Oracle H−Oracle S−Oracle p=200 p=1600 200 400 600 n 800 ● 20 ● ● Exact Recovery % 80 60 ● 0 Exact Recovery % ● COD COD−cc PECOK K−Oracle H−Oracle S−Oracle p=200 p=1600 ● 200 400 600 800 n imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 25 VARIABLE CLUSTERING Fig 2: Comparison of Exact recovery percentages across 100 runs. (a) The parameter K in K-means (K-Oracle, medium green lines, triangle points) and Γ-uncorrected PECOK (UP-Oracle, navy blue lines, square points) are set to the true K while PECOK (light pink lines, diamond points) selects K using our CV criterion. (b) The exact recovery percentages of PECOK are shown under m = 50 (solid line) and m = 20 (dash line). All standard errors are smaller than 5%. (a) With/without correcting for Γ 100 80 60 40 PECOK 20 m=50 m=20 0 Exact Recovery % 80 60 20 40 PECOK UP−Oracle K−Oracle 0 Exact Recovery % 100 (b) Varying m 200 400 600 n 800 60 80 100 120 140 n 8. Data analysis. Using functional MRI data, [35] found that the human brain putative areas are organized into clusters, sometimes referred to as networks or functional systems. We use a publicly available fMRI dataset to illustrate the clusters recovered by different methods. The dataset was originally published in [37] and is publicly available from Open fMRI (https://openfmri.org/datasets) under the accession number ds000007. We will focus on analyzing two scan sessions from subject 1 under a visual-motor stop/go task (task 1). Before performing the analysis, we follow the preprocessing steps suggested by [37], and we follow [35] to subsample the whole brain data using p = 264 putative areas, see Section 8 of the supplementary materials [12] for details. This subject was also scanned in two separate sessions, and each session yielded n = 180 samples for each putative area. We apply our CV approach described in Section 4.3 to these two session data. Using the pfirst scan session data only, we first estimate Ĝ using COD and COD-cc on a fine grid of α = c log(p)/n where c = 0.5, 0.6, . . . , 3. For a fair comparison, we set K in PECOK to be the same as the resulting K’s found by COD. We then use the second session data to evaluate the CV loss CV (G) given in Section 4.3. Among our methods (COD, COD-cc, and PECOK), COD yields the smallest CV loss when K = 142. We thus first focus on illustrating the COD clusters here. Table 2 lists the largest cluster of putative areas recovered by COD and their functional classification based on prior knowledge. Most of these areas are classified to be related to visual, motor, and task functioning, which is consistent with the implication of our experimental task that requires the subject to perform motor responses based on visual stimuli. Figure 3(a) plots the locations of these coordinates on a standard brain template. It shows that our COD cluster appears to come mostly from approximately symmetric locations from the left and right hemisphere, though we do not imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 26 enforce this brain function symmetry in our algorithm. Note that the original coordinates in [35] are not sampled with exact symmetry from both hemispheres of the brain, and thus we do not expect exact symmetric locations in the resulting clusters based on these coordinates. Because there are no gold standards for partitioning the brain, we follow common practice and use a prediction criterion to further compare the clustering performance of different methods. For a fair comparison, we also estimate Ĝ using K-means, HC, and spectral clustering on the same resulting K’s found by COD. The prediction criterion is as follows. We first compute the covariance matrices Ŝ1 and Ŝ2 from the first and second session data respectively. For a grouping estimate Ĝ, we use the following loss to evaluate its performance   . (35) Ŝ2 − Υ Ŝ1 , Ĝ F where block averaging operator Υ (R, G) produces a G-block structured matrix based on Ĝ. For any a ∈ Gk and b ∈ Gk0 , the output matrix entry [Υ (R, G)]ab is given by [Υ (R, G)]ab  P −1 1)−1 i,j∈Gk ,i6=j Rij  |Gk | (|Gk | − P = |Gk |−1 |Gk0 |−1 i∈Gk ,j∈G 0 Rij k   1 if a 6= b and k = k 0 if a = 6 b and k 6= k 0 if a = b. In essence, this operator smooths over the matrix entries with indices in the same group, and one may expect that such smoothing over variables in the true cluster will reduce the loss (35) while smoothing over different clusters will increase the loss. Figure 3(b) compares the prediction loss values under different group sizes for each method. This shows that our CV approach for COD indeed selects a value K = 142 that is immediately next to a slightly larger one (K = 206), the latter having the smallest prediction loss, near the bottom plateau. However, the differences are almost negligible. This suggests that our CV criterion, which comes with theoretical guarantees, also provides good prediction performance in this real data example, while selecting a slightly smaller K, as desired, since this makes the resulting clusters easier to describe and interpret. Regardless of the choice of K or α, Figure 3(b) also shows that COD almost always yields the smallest prediction loss for a wide range of K, while PECOK does slightly better when K is between 5 and 10. Though COD-cc has large losses for medium or small K, its performance is very close to the best performer COD near K = 146. Kmeans in this example is the closest competing method, while the other two methods (HC and SC) yield larger losses across the choices of K. 9. Discussion. In this section, we discuss some related models and give an overall recommendation on the usage of our methods. 9.1. Comparison with Stochastic Block Model. The problem of variable clustering that we consider in this work is fundamentally different from that of variable clustering from network data. The latter, especially in the context of the Stochastic Block Model (SBM), has received a large amount of attention over the past years, for instance [1, 15, 20, 26–28, 31]. The most important difference stems from the nature of the data: the data analyzed via the SBM is a p × p binary matrix A, called the adjacency matrix, with entries assumed to have been generated as independent Bernoulli random variables; its expected value is assumed to have a block structure. In contrast, the data matrix X generated from a G-block covariance is a n × p matrix with real entries, and rows viewed as i.i.d copies of a p-dimensional vector X with mean zero and dependent entries. The covariance matrix Σ of X is assumed to have (up to the diagonal) a block structure. imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 27 VARIABLE CLUSTERING Fig 3: (a) Plot of the coordinates of the largest COD cluster overplayed over a standard brain template. The coordinates are shown as red balls. (b) Comparison of COD, COD-cc, PECOK, K-means, HC, and SC using the Frobenius prediction loss criterion (35) where the groups are estimated by these methods respectively. (a) A brain cluster by COD COD COD−cc PECOK Kmeans HC SC 150000 ● 140000 ● ● ● ● ● 120000 130000 Frob Loss 160000 (b) Prediction loss ● ● ● ● ● ● 5 10 20 50 100 ● ● 200 K Table 2 MNI coordinates (x, y, z, in mm) of the largest COD group and their functioning classification. X 40 -28 20 29 37 47 -41 38 -41 8 22 Y -72 -79 -66 -77 -81 10 6 43 -75 48 39 Z 14 19 2 25 1 33 33 15 26 -15 39 Function visual visual visual visual visual task task task default default default X -7 -7 13 10 36 -53 -37 52 -58 -42 -11 Y -21 -33 -33 -46 -9 -10 -29 -34 -26 -60 26 Z 65 72 75 73 14 24 -26 -27 -15 -9 25 Function motor motor motor motor motor motor uncertain uncertain uncertain attention saliency imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 28 Need for a correction. Even though the analysis of the methods in our setting would differ from the SBM setting, we could have applied available clustering procedures tailored for SBMs b = Xt X/n by treating it as some sort of weighted adjacency to the empirical covariance matrix Σ matrix. It turns out that applying verbatim the spectral clustering procedure of Lei and Rinaldo [27] or the SDP such as the ones in [2] would lead to poor results. The main reason for this is that, in our setting, we need to correct both the spectral algorithm and the SDP to recover the correct clusters (Section 5). Second, the SDPs studied in the SBM context (such as those of [2]) do not handle properly groups with different and unknown sizes, contrary to our SDP. To the best of our knowledge, our SDP (without correction) has only been independently studied by Mixon et al. [30] in the context of Gaussian mixtures. Analysis of the SDP. As for the mathematical arguments, our analysis of the SDP in our on covariance-type model differs from that in mean-type models partly because of the the presence of non-trivial cross-product terms. Instead of relying on dual certificates arguments as in other work such as [33], we directly investigate the primal problem and combine different duality-norm bounds. The crucial step is the Lemma 5 which allows to control the Frobenius inner product by a (unusual) combination of `1 and spectral control. In our opinion, our approach is more transparent than dual b and allows for the attainment of certificates techniques, especially in the presence of a correction Γ optimal convergence rates. 9.2. Extension to other Models. The general strategy of correcting a convex relaxation of Kmeans can be applied to other models. In [36], one of the authors has adapted the PECOK algorithm to the clustering problem of mixture of subGaussian distributions. In particular, in the high-dimensional setting where the correction plays a key role, [36] obtains sharper separation conditions dependencies than in state-of-the-art clustering procedures [30]. Extensions to model-based overlapping clustering are beyond the scope of this paper, but we refer to [10] for recent results. 9.3. Practical recommendations. Based on our extensive simulation studies, we conclude this section with general recommendations on the usage of our proposed algorithms. If p is moderate in size, and if there are reasons to believe that no singletons exist in a particular application, or if they have been removed in a pre-processing step, we recommend the usage of the PECOK algorithm, which is numerically superior to existing methods: exact recovery can be reached for relatively small sample sizes. COD is also very competitive, but requires a slightly larger sample size to reach the same performance as PECOK. The constraint on the size of p reflects the existing computational limits in state-of-the art algorithms for SDP, not the statistical capabilities of the procedure, the theoretical analysis of which being one of the foci of this work. If p is large, we recommend COD-type algorithms. Since COD is optimization-free, it scales very well with p, and only requires a moderate sample size to reach exact cluster recovery. Moreover, COD adapts very well to data that contains singletons and, more generally, to data that is expected to have many inhomogeneous clusters. APPENDIX A: RESULTS FOR THE PECOK ESTIMATOR In order to avoid notational clutter, we write G for G∗ and m for m∗ for the entirety of this section. A.1. The motivation for a K-means correction: proof of Propositions 3 and 4 . imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 VARIABLE CLUSTERING 29 A.1.1. Proofs of Proposition 3. The basis of this proof is the following lemma. Lemma 3. that is The collection C contains only one matrix whose support is included in supp(B ∗ ),  C ∩ B, supp(B) ⊂ supp(B ∗ ) = {B ∗ } . Proof. Consider any matrix B ∈ C whose support is included in supp(B ∗ ). Since B1 = 1, it follows that each submatrix BGk Gk is symmetric doubly stochastic. Since BGk Gk is also positive semidefinite, we have tr(BGk Gk ) ≥ kBGk Gk kop ≥ 1t BGk Gk 1/|Gk | = 1 . As B ∈ C, we have tr(B) = K, so all the submatrices BGk Gk have a unit trace. Since kBGk Gk kop ≥ 1, this also enforces that BGk Gk contains only one non-zero eigenvalue and that a corresponding eigenvector is the constant vector 1. As a consequence, BGk Gk = 11t /|Gk | for all k = 1, . . . , K and B = B∗. As a consequence of Lemma 3, in order to prove Proposition 3 we only need to prove that hΣ, B ∗ − Bi > 0, for all B ∈ C (resp. O) such that supp(B) * supp(B ∗ ). We have hΣ, B ∗ − Bi = hAC ∗ At , B ∗ − Bi + hΓ, B ∗ − Bi. Define the p-dimensional vector v by v = diag(AC ∗ At ). Since B1 = 1 for all B ∈ C, we have hv1t + 1v t , B ∗ − Bi = 0. Hence, we have (36) 1 hAC ∗ At , B ∗ − Bi = hAC ∗ At − (v1t + 1v t ), B ∗ − Bi 2  ∗ + C∗  X X Cjj kk ∗ ∗ − Bab ) = Cjk − (Bab 2 j,k a∈Gj , b∈Gk  ∗  ∗ X X Cjj + Ckk ∗ = − Cjk Bab 2 j6=k a∈Gj , b∈Gk  ∗ + C∗ X  Cjj kk ∗ = − Cjk |BGj Gk |1 , 2 j6=k where BGj Gk = [Bab ]a∈Gj , b∈Gk . Next lemma lower bounds hΓ, B ∗ − Bi for B ∈ O. It is stated below and proved at page 30. Lemma 4. (37) For any matrix B belonging to O and any diagonal matrix Γ, hΓ, B ∗ − Bi ≥ − kΓkV X |BGj Gk |1 . m k6=j Hence, combining (36) and Lemma 4, we obtain  ∗ + C∗ X  Cjj kΓkV kk ∗ ∗ hΣ, B − Bi ≥ − Cjk − |BGj Gk |1 , 2 m j6=k imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 30 V ∗ ∗ for all B ∈ O. The condition ∆(C ∗ ) > 2|Γ| m enforces that if supp(B) * supp(B ) then hΣ, B −Bi > 0. This proves the first claim of Proposition 3. To show the counterpart of this result that corresponds to replacing O by C, we invoke the lemma stated below and proved at page 30. Lemma 5. For any p × p symmetric matrix S, we have for any B ∈ C # "  X kSkop ∗ ∗ |hS, B − Bi| ≤ 2 |BGj Gk |1 + 3|B S|∞ . 2m j6=k Define the diagonal matrix D = (maxa Γaa + mina Γaa )I/2. Since tr(B) = tr(B ∗ ), we have hΓ, B ∗ − Bi = hΓ − D, B ∗ − Bi. The matrix S = Γ − D satisfies kSkop = kΓkV /2 and |B ∗ S|∞ ≤ kΓkV /(2m). Applying Lemma 5 to S, we obtain |hΓ, B ∗ − Bi| ≤ i hX 7 kΓkV |BGj Gk |1 . 2m j6=k Hence, together with (36), we obtain  ∗ + C∗ X  Cjj 7kΓkV kk ∗ hΣ, B − Bi ≥ − Cjk − |BGj Gk |1 , 2 2m ∗ j6=k V ∗ ∗ for all B ∈ C. The condition ∆(C ∗ ) > 7|Γ| m enforces that if supp(B) * supp(B ) then hΣ, B −Bi > 0, which proves the second claim of Proposition 3. To complete the proof of Proposition 3 it remains to prove the two lemmas stated above. Proof of Lemma 4. By definition of B ∗ and since tr(B) = tr(B ∗ ) = K, we have p h X hΓ, B − Bi = hΓ − (max Γbb )I, B − Bi = (Γaa − (max Γbb )) ∗ (38) ∗ b ≥ p X a=1 b a=1 −kΓkV h 1 |Gk(a) | − Baa i 1 |Gk(a) | − Baa i + Since B belongs to O, each row sums to one and each Bab is either equal to 0 or to Baa . Thus, X X Bab = 1 − Bab ≥ [1 − |Gk(a) |Baa ]+ b∈Gk(a) b∈G / k(a) which implies h 1 |Gk(a) | − Baa i + ≤ 1 X Bab m b∈G / k(a) V Coming back to (38), this gives us hΓ, B ∗ − Bi ≥ − kΓk m P k6=j |BGj Gk |1 . Proof of Lemma 5. Observe first that B ∗ is a projection matrix that induces the following decomposition of S. S = B ∗ S + SB ∗ − B ∗ SB ∗ + (I − B ∗ )S(I − B ∗ ). imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 31 VARIABLE CLUSTERING By the definition of the inner product, followed by the triangle inequality, and since (I −B ∗ )B ∗ = 0, we further have (39) |hS, B ∗ − Bi| ≤ 3|B ∗ S|∞ |B ∗ (B ∗ − B)|1 + |h(I − B ∗ )S(I − B ∗ ), B ∗ − Bi| = 3|B ∗ S|∞ |B ∗ (B ∗ − B)|1 + |hS, (I − B ∗ )B(I − B ∗ )i|. Relying on the duality of the nuclear k k∗ and operator k kop norms, we have |hS, (I − B ∗ )B(I − B ∗ )i| ≤ kSkop k(I − B ∗ )B(I − B ∗ )k∗ . We begin by bounding the nuclear norm k(I − B ∗ )B(I − B ∗ )k∗ . Since (I − B ∗ )B(I − B ∗ ) ∈ S + , we have k(I − B ∗ )B(I − B ∗ )k∗ = tr((I − B ∗ )B(I − B ∗ )) = hI − B ∗ , B(I − B ∗ )i = hI − B ∗ , Bi. Using the fact that the sum of each row of B is 1 and tr(B) = K, we have K X X Bab k(I − B )B(I − B )k∗ = hI − B , Bi = tr(B) − |Gk | ∗ ∗ ∗ k=1 a,b∈Gk =K −K + X k6=j a∈Gk , b∈Gj 1 X ≤ |BGj Gk |1 . m (40) X Bab |Gk | k6=j Next, we simplify the expression of |B ∗ (B ∗ − B)|1 = |B ∗ (I − B)|1 . |B (I − B)|1 = X X = X X ∗ j6=k a∈Gj , b∈Gk j6=k a∈Gj , b∈Gk = 2 X j6=k ∗ |(B B)ab | + K X X k=1 a,b∈Gk |[B ∗ (I − B)]ab | K X X 1 X 1 X Bcb + 1− Bcb |Gj | |Gk | c∈Gj c∈Gk k=1 a,b∈Gk |BGj Gk |1 , where we used again B1 = 1 and that the entries of B are nonnegative. Gathering the above bounds together with (39) yields the desired result. This completes the proof of this result and of Proposition 3. A.1.2. Proof of Proposition 4. By symmetry, we can assume that the true partition matrix B ∗  2/m  0 0 0 2/m 0 is diagonal block constant. Define the partition matrix B1 := where the first 0 0 1/(2m) two blocks are of size m/2 and the the last block has size 2m. The construction of the matrix B1 amounts to merging groups G2 and G3 , and to splitting G1 into two groups of equal size. Then, hΣ, B ∗ i = γ+ + 2γ− + mtr(C ∗ ) , hΣ, B1 i = 2γ+ + γ− + mtr(C ∗ ) − mτ . As a consequence, hΣ, B1 i < hΣ, B ∗ i if and only if τ > γ+ −γ− m . imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 32 A.2. Analysis of the population version under the approximate model: proofs of Proposition 7 and Corollary 3. In this subsection, we prove Proposition 7 and Corollary 3. As a consequence of Lemma 3 above, we only need to prove that, hΣ, B ∗ − Bi > 0, for all B ∈ C such that supp(B) * supp(B ∗ ). We have hΣ, B ∗ − Bi = hAC ∗ At , B ∗ − Bi + hD, B ∗ − Bi + hR, B ∗ − Bi. Define the p-dimensional vector v by v = diag(AC ∗ At ). Since B1 = 1 for all B ∈ C, we have hv1t + 1v t , B ∗ − Bi = 0. Hence, we have (41) 1 hAC ∗ At , B ∗ − Bi = hAC ∗ At − (v1t + 1v t ), B ∗ − Bi 2  ∗ + C∗  X X Cjj kk ∗ ∗ Cjk − (Bab − Bab ) = 2 j,k a∈Gj , b∈Gk  ∗  ∗ X X Cjj + Ckk ∗ = − Cjk Bab 2 j6=k a∈Gj , b∈Gk  ∗ + C∗ X  Cjj kk ∗ = − Cjk |BGj Gk |1 , 2 j6=k where BGj Gk = [Bab ]a∈Gj , b∈Gk . From Lemma 5 we get |hD, B ∗ − Bi| ≤ and |hR, B ∗ − Bi| ≤  X 7 |D|V |BGj Gk |1 2m j6=k kRkop 3 |R|∞ + 2 m X j6=k |BGj Gk |1 . Combining the two last inequalities with (41) gives the Proposition. The Corollary follows. A.3. Exact recovery with PECOK: approximate model. Proofs of Theorems 7, 4 and 5. The conclusion of Theorems 7 and 4 follows by combining the conclusion of Theorems 8 and 9, stated below and proved in the next subsection, with the conclusion of Proposition 8 stated and proved in Appendix A.4 below. Specifically: Theorem 8, specialized to R = 0 and coupled with (i) of Proposition 8 proves Theorem 4. Theorem 9, specialized to R = 0 and coupled with (ii) of Proposition 8 proves Theorem 5. Finally, Theorem 8 coupled with (i) of Proposition 8 proves Theorem 7. If we combine Theorem 8 with (ii) of Proposition 8 we obtained a version of Theorem 7 for bounded variables, which we do not state, for space limitations. The following theorem examines the behavior of PECOK under the general model (4). Theorem 8. There exist c1 , . . . , c3 three positive constants such that the following holds. Let b b − D|V ≤ δn,p with probability 1 − c1 /(2p). Then, under Γ be any estimator of D, such that |Γ 4 Assumption 1, and when L log(p) ≤ c3 n and " (r ) # r δn,p + kRkop log p p log(p) p ∗ (42) ∆(C ) ≥ cL kΓkop + + + + + |R|∞ , mn nm2 n nm m b = B ∗ , with probability higher than 1 − c1 /p. we have B imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 VARIABLE CLUSTERING 33 The following theorem examines the behavior of PECOK under the general model (4) and when the variables are bounded. b be Theorem 9. There exist c1 , c2 two positive constants such that the following holds. Let Γ b − D|V ≤ δn,p with probability 1 − c1 /(2p). Then, under Assumption any estimator of D, such that |Γ 1-bis, and when " # r δ + kRk p log(p) p log(p) n,p op (43) ∆(C ∗ ) ≥ c2 M kΓk1/2 + M2 + + |R|∞ , op nm2 nm m b = B ∗ , with probability higher than 1 − c1 /p. we have B A.3.1. Proofs of Theorems 8 and 9. In contrast to other SDP analyses performed for other models [30], our proof does not rely on dual certificates techniques. Instead of that, we directly investigate the primal problem and combine different duality-norm bounds. In our opinion, this makes the arguments more transparent. The two key ingredients are Lemmas 3 and 5 above. ∗ + C ∗ − 2C ∗ . As a consequence of Lemma 3 page 29, Given k, l ∈ [K], we define ∆kl (C ∗ ) = Ckk kl ll we only need to prove that (44) b − Γ, b B ∗ − Bi > 0, for all B ∈ C such that supp(B) * supp(B ∗ ), hΣ with high probability. We begin by introducing some notation. For any k, l ∈ [K], we denote mk = |Gk | the size of group Gk and (45) γkl = 1 mk ml X Γab . a∈Gk ,b∈Gl Recall that X denotes the n × p matrix of observations and we set Z = XAt (At A)−1 . We have the decomposition X = XB ∗ + X(I − B ∗ ) =: ZAt + E ∗ +γ . with Cov (AZ, E) = B ∗ Γ(I − B ∗ ), Cov (E) = (I − B ∗ )Γ(I − B ∗ ), and Cov (Z k , Z l ) = Ckl kl Note that in the latent model Xa = Zk(a) + Ea , the random variables Z k and E a differ from Zk and Ea . b −Γ b in such a way that the distance |Z:k − Z:j |2 becomes evident. Our first goal is to decompose Σ 2 b = Xt X and let us define Γ e = 1 Et E. Hence, we have To this end, recall that nΣ n b = AZt ZAt + nΓ e + A(Zt E) + (Et Z)At . nΣ Using the fact that for any vectors v1 and v2 we have |v1 − v2 |22 = |v1 |22 + |v2 |2 − 2v1t v2 , we can write 1 1 1 [AZt ZAt ]ab = |[AZt ]a: |22 + |[AZt ]b: |22 − |[AZt ]a: − [AZt ]b: |22 , 2 2 2 for any 1 ≤ a, b ≤ p. We also observe that [A(Zt E) + (Et Z)At ]ab = [(AZt )a: − (AZt )b: ][Eb: − Ea: ] + [AZt E]aa + [AZt E]bb . imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 34 Define the p × p matrix W by b ab − Γ b ab ) − 1 |[AZt ]a: |22 − 1 |[AZt ]b: |22 − [AZt E]aa − [AZt E]bb . Wab := n(Σ 2 2 Combining the four displays above we have (46) b W = W1 + W2 + W3 + n(Γ − Γ), (47) with (48) (49) 1 (W1 )ab := − |[AZt ]a: − [AZt ]b: |22 − nB ∗ ΓB ∗ , 2 (W2 )ab := [(AZt )a: − (AZt )b: ][Eb: − Ea: ] − n[B ∗ Γ(I − B ∗ ) + (I − B ∗ )ΓB ∗ ]ab , and e − n(I − B ∗ )Γ(I − B ∗ ), W3 = nΓ (50) b − Γ) b is a sum of four matrices, two of for any 1 ≤ a, b ≤ p. Observe from (46) that W − n(Σ t t which are of the type 1v1 , and two of the type v2 1 , for some vectors v1 , v2 ∈ Rp . Since for any two matrices B1 and B2 in C, we have B1 1 = B2 1 = 1, it follows that b − Γ), b B1 − B2 i = 0 . hW − n(Σ As a consequence and using the decomposition (47), proving (44) reduces to proving (51) b B ∗ − Bi > 0, for all B ∈ C such that supp(B) * supp(B ∗ ). hW1 + W2 + W3 + n(Γ − Γ), We will analyze the inner product between B ∗ − B and each of the four matrices in (51) separately in the following lemmas. Their proofs are given after the proof of this theorem. The matrix W1 contains the information about the clusters, as we explain below. Note that for two variables P a and b belonging to the same group Gk , (W1 )ab = −nγkk . As a consequence, hW1 , B ∗ i = −n k mk γkk . For two variables a and b belonging to two different groups Gj and Gk , (W1 )ab = −|Z:i − Z:k |22 /2 − nγkj . In the sequel, we denote by BGj ,Gk the submatrix (Bab )a∈Gj , b∈Gk . Since all the entries of B are nonnegative, and B1 = 1, X 1X −hW1 , Bi = |Z:j − Z:k |22 |BGj Gk |1 + nγjk |BGj Gk |1 , 2 j6=k j,k   X X X   1 = γkk mk − |BGj Gk |1  |Z:j − Z:k |22 + 2nγjk |BGj Gk |1 + n 2 j6=k = 1X 2 j6=k k  |Z:j − Z:k |22 − nγkk − nγjj + 2nγjk |BGj Gk |1 + n j:j6=k X mk γkk . k Hence, we obtain (52) hW1 , B ∗ − Bi = i 1 Xh |Z:j − Z:k |22 − nγjj − nγkk + 2nγjk |BGj Gk |1 , 2 j6=k Each of the random variables |Z:j − Z:k |22 is a quadratic form of independent random variables. As a consequence, we can apply Hanson-Wright inequalities, of the type stated in Lemma 10 of the suplement [12] to simultaneously control all these quantities. This leads us to Lemmas 6 - 9, proved in the supplement [12]. imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 35 VARIABLE CLUSTERING Lemma 6. Under either Assumption 1 and Condition (42) or Assumption 1-bis and Condition (43), it holds with probability higher than 1 − 1/p, that hW1 , B ∗ − Bi ≥ (53) X ∆jk (C ∗ ) n |BGj Gk |1 , 4 j6=k simultaneously for all matrices B ∈ C. We will analyze below the three remaining cross products. Lemma 7. Under Assumption 1, there exists an event of probability larger than 1 − 2/p such that the following holds simultaneously for all B ∈ C (54) h i X q p |D|∞ ∗ 2 1/2 1/2 ∗ √ |hW2 , B −Bi| ≤ c1 L ∆jk (C )|Γ|∞ + n log(p) + log(p) |BGj Gk |1 , + |R|∞ + |R|∞ |D|∞ m j6=k Under Assumption 1-bis, there exists an event of probability larger than 1 − 2/p such that the following holds simultaneously for all B ∈ C "s #   X |D| ∞ ∗ 0 (55) |hW2 , B −Bi| ≤ c1 M n log(p) ∆k(a)k(b) (C ∗ ) + + |R|∞ + M log(p) |BGj Gk |1 . m j6=k It remains to control the term W3 corresponding to the empirical covariance matrix of the noise E. This is the main technical difficulty in this proof. Lemma 8. (56) Under Assumption 1, it holds with probability higher than 1 − 1/p that r  np p X ∗ |hW3 , B − Bi| ≤ cL kΓkop + |BGj Gk |1 , m2 m j6=k simultaneously over all matrices B ∈ C. Here, cL is a constant that only depends on L > 0. Under Assumption 1-bis, it holds with probability higher than 1 − 1/p that r h npkΓk log(p) pM log(p) i X op ∗ |hW3 , B − Bi| ≤ c2 M (57) + |BGj Gk |1 , m2 m j6=k simultaneously over all matrices B ∈ C. b B ∗ − Bi with the next lemma. Finally, we control the last term hn(Γ − Γ), Lemma 9. (58) It holds that h iX b b B ∗ − Bi| ≤ c3 |D − Γ|V + kRkop + |R|∞ |hΓ − Γ, |BGj Gk |1 m j6=k simultaneously over all matrices B ∈ C. imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 36 End of the proof of Theorem 8. Under Assumption 1, we combine (53), (54), (56) and (58) and the assumption L4 log(p) ≤ c4 n and obtain that, with probability larger than 1 − c/p, " r X ∆jk (C ∗ ) log(p) 1 ∗ 2 hW, B − Bi ≥ − c1 L ∆jk (C ∗ )|Γ|∞ n 4 n j6=k r h i log(p) hr p p i 2 |D|∞ 1/2 1/2 + −c2 L √ + |R|∞ + |R|∞ |D|∞ − cL kΓkop n nm2 nm m # h |D − Γ| i b V + kRkop (59) −c3 + |R|∞ |BGj Gk |1 , m simultaneously for all B ∈ C. Condition (42) enforces that, for each (j, k), the term in the bracket of (59) is positive. Hence, with probability at least 1 − c1 /p, the Inequality (51) holds since any matrix B ∈ C whose support is not included in supp(B ∗ ) satisfies |BGj Gk |1 > 0 for some j 6= k.  End of the proof of Theorem 9. Let us now assume that Assumption 1-bis holds. Combining (52), (55), (57) and (58) we obtain that, with probability larger than 1 − c/p, " r X ∆jk (C ∗ ) 1 log(p) hW, B ∗ − Bi ≥ − c1 M ∆jk (C ∗ ) n 4 n j6=k r r r |D|∞ log(p) p log(p) 2 p log(p) 1/2 −c2 M + |R|∞ − c3 M − c4 M kΓkop m n nm nm2 # h |D − Γ| i b V + kRkop −c5 (60) + |R|∞ |BGj Gk |1 , m simultaneously for all B ∈ C. Condition (43) enforces that, for each (j, k), the term in the bracket of (60) is positive and as previously that (51) holds with probability at least 1 − c3 /p.  A.4. Guarantees for the estimator (22) of Γ. Proposition 8 controls the estimation error b defined by (22) under both the exact model and the approximate block G-block of estimator Γ model (4). We set v 2 = minc6=d Var (Xc − Xd ). Proposition 8. Assume that Γ either (a) is diagonal; (b) or fulfills the diagonal dominance assumption (32). Assume also that ∆(C ∗ ) ≥ 0. Then, the two following results holds. (i) Under Assumption 1, there exist three numerical constants c1 –c3 such that when m ≥ 3 and 4 b defined by (22) satisfies L log(p) ≤ c1 n, with probability larger than 1 − c3 /p, the estimator Γ ! r p log(p) 2 b − Γ|V ≤ 2|Γ b − Γ|∞ ≤ c2 (61) |Γ |R|∞ |Γ|∞ + |Γ|∞ L . n (ii) Under Assumption 1-bis, there exist three numerical constants c1 –c3 such that when m ≥ 3 b defined by (22) and log(p) ≤ c1 (v/M )2 n, with probability larger than 1 − c3 /p, the estimator Γ satisfies ! r p |Γ| log(p) log(p) ∞ 2 b − Γ|V ≤ 2|Γ b − Γ|∞ ≤ c2 (62) |Γ |R|∞ |Γ|∞ + M +M . n n imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 37 VARIABLE CLUSTERING Proof of Proposition 8. To ease the presentation of this proof, we introduce the new notation ne1 (a) := argmin V (a, b) and ne2 (a) := argmin V (a, b). b∈[p]\{a} b∈[p]\{a,ne1 (a)} (i) We start with the first part of the proposition. Let a, b1 , b2 be three different indices. Under Assumption 1, the Corollary 1 of Hanson-Wright inequality given in the supplemental material [12] gives that with probability at least 1 − p−4 1 hX:a − X:b1 , X:a − X:b2 i − Cov (Xa − Xb1 , Xa − Xb2 ) n ! r q log(p) log(p) 2 ≤ cL Var(Xa − Xb1 ) Var(Xa − Xb2 ) . + n n Applying the inequality 2ab ≤ a2 + b2 , and a union bound, we obtain that the inequalities 1 hX:a − X:b1 , X:a − X:b2 i − Cov (Xa − Xb1 , Xa − Xb2 ) n ! r   log(p) log(p) 0 2 ≤ c L Var (Xa − Xb1 ) + Var (Xa − Xb2 ) + n n hold simultaneously over all triplets of different indices a, b1 , b2 , with probability 1 − 1/p. Decomposing these variance and covariance terms, we obtain Cov (Xa − Xb1 , Xa − Xb2 )  1 ∆k(a)k(b1 ) (C ∗ ) + ∆k(a)k(b2 ) (C ∗ ) − ∆k(b2 )k(b1 ) (C ∗ ) + Rb1 b2 − Rab1 − Rab2 , = Daa + 2 and Var (Xa − Xb ) = Daa + Dbb + ∆k(a)k(b) (C ∗ ) − 2Rab . Hence (63) (64) Var (Xa − Xbi ) ≤ 2|D|∞ + 2|R|∞ + |∆k(a)k(bi ) (C ∗ )|, Cov (Xa − Xb1 , Xa − Xb2 ) − Daa ≤ 3|R|∞ + |∆k(a)k(b1 ) (C ∗ )| + |∆k(a)k(b2 ) (C ∗ )| + |∆k(b1 )k(b2 ) (C ∗ )| . 2 For i = 1, 2, write ti := |∆k(a)k(nei (a)) (C ∗ )| and t12 = |∆k(ne1 (a))k(ne2 (a)) (C ∗ )|. Since log(p) ≤ c1 L−4 n, the previous inequalities entail that ! r log(p) b aa − Daa ≤ c |R|∞ + (t1 + t2 + t12 ) + L2 |Γ|∞ (65) Γ n with probability a consequence, we only have to prove that t1 , t2 and t12 are pat least 1 − 1/p. As p  2 smaller than c |R|∞ |Γ|∞ + L |Γ|∞ log(p)/n with probability at least 1 − c/p. We focus on t1 , the arguments for t2 and t12 being similar. First note that t1 = 0 if k(a) = k(ne1 (a)) so that we may assume henceforth that k(a) 6= k(ne1 (a)). We have the following. Lemma 10. Assume that Γ either imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 38 (a) is diagonal; (b) or fulfills the diagonal dominance assumption (32). Assume also that ∆(C ∗ ) ≥ 0. Then, there exists a numerical constant c1 , such that, outside an event of probability less than 1/p2 , we have (i) under Assumption 1, p  p (66) hX:a − X:ne1 (a) , X:c − X:d i ≤ c1 n|R|∞ + L2 |Γ|1/2 log(p) |X:c − X:d |2 , ∞ simultaneously over all c, d 6= (a, ne1 (a)); (ii) under Assumption 1-bis, (67) hX:a − X:ne1 (a) , X:c − X:d i ≤ c1 p  p n|R|∞ + M log(p) |X:c − X:d |2 , simultaneously over all c, d 6= (a, ne1 (a)). Similar bounds also hold for ne2 (a) instead of ne1 (a). This lemma is proved in the supplement [12]. Below, c0 denotes a numerical constant, whose value may vary from line to line. For any c and d, the variance of Xc − Xd is less than ∆k(c)k(d) (C ∗ ) + 2|D|∞ + 2|R|∞ . As a consequence, Hanson-Wright inequality together with an union bound over all c, d ∈ [p] and the condition L4 log(p) ≤ c1 n leads to q |X:c − X:d |2 ≤ c0 n[4|Γ|∞ + ∆k(c)k(d) (C ∗ )] , simultaneously over all c 6= d, with probability 1 − 1/p2 . Take c and d any two indices such that k(a) = k(c) and k(ne1 (a)) = k(d). So combined with Lemma 10, we get with probability at least 1 − 2p−2 p p p 1/2 (68) hX:a − X:ne1 (a) , X:c − X:d i ≤ c0 n|R|∞ + L2 |Γ|∞ log(p) n[|Γ|∞ + t1 ]. Let us now lower bound the left hand-side of the above inequality. For any c in the same group as a and b in the same group as d, we have E [hXa − Xb , Xc − Xd i] = ∆k(b)k(a) (C ∗ )+Rac +Rbd −Rbc −Rab . Therefore, Corollary 1 of the Hanson-Wright inequality given in the supplement [12] yiels, with probability at least 1 − p4 , p hX:a − X:b , X:c − X:d i ≥ n∆k(b)k(a) (C ∗ ) − 4n|R|∞ − c0 L2 n log(p)[∆k(b)k(a) (C ∗ ) + |Γ|∞ ]. As a consequence, for any c and d such that k(a) = k(c) and k(ne1 (a)) = k(d), we get from L4 log(p) ≤ c1 n and a union bound p hX:a − X:ne1 (a) , X:c − X:d i ≥ nt1 /2 − 4n|R|∞ − c0 L2 |Γ|∞ n log(p) with probability 1 − 1/p2 . Gathering the previous bound with (68), Condition (66), Assumption (32) and L4 log(p) ≤ n, we conclude that " # r log(p) 1/2 2 t1 ≤ c0 |R|∞ |Γ|1/2 ∞ + L |Γ|∞ n simultaneously for all a, with probability 1 − c3 /p. Together with (65), this concludes the proof of the first part. imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 VARIABLE CLUSTERING 39 Acknowledgements. We thank Andrea Montanari for pointing to us the reference [30]. The project is partially supported by the CNRS PICS grant HighClust. Christophe Giraud is partially supported by the LabEx LMH, ANR-11-LABX-0056-LMH. Martin Royer is supported by an IDEX Paris-Saclay IDI grant, ANR-11-IDEX-0003-02. Xi Luo is partially supported by NSF-DMS 1557467, NIH R01EB022911, P01AA019072, P20GM103645, P30AI042853, and S10OD016366. Florentina Bunea is partially supported by NSF-DMS 1712709 REFERENCES [1] Emmanuel Abbe and Colin Sandon. Community detection in general stochastic block models: Fundamental limits and efficient algorithms for recovery. In Foundations of Computer Science (FOCS), 2015 IEEE 56th Annual Symposium on, pages 670–688, 2015. [2] A. A. Amini and E. Levina. On semidefinite relaxations for the block model. ArXiv e-prints, June 2014. [3] David Arthur and Sergei Vassilvitskii. K-means++: The advantages of careful seeding. In Proceedings of the Eighteenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’07, pages 1027–1035, Philadelphia, PA, USA, 2007. Society for Industrial and Applied Mathematics. [4] Pranjal Awasthi, Moses Charikar, Ravishankar Krishnaswamy, and Ali Kemal Sinop. The hardness of approximation of euclidean k-means. In Symposium on Computational Geometry, 2015. [5] Onureena Banerjee, Laurent El Ghaoui, and Alexandre d’Aspremont. Model selection through sparse maximum likelihood estimation for multivariate gaussian or binary data. Journal of Machine learning research, 9(Mar):485– 516, 2008. [6] Pierre Bellec, Vincent Perlbarg, Saâd Jbabdi, Mélanie Pélégrini-Issac, Jean-Luc Anton, Julien Doyon, and Habib Benali. Identification of large-scale networks in the brain using fmri. Neuroimage, 29(4):1231–1243, 2006. [7] Juliana S. Bernardes, Fabio RJ Vieira, Lygia MM Costa, and Gerson Zaverucha. Evaluation and improvements of clustering algorithms for detecting remote homologous protein families. BMC Bioinformatics, 16(1):1–14, 2015. [8] Q. Berthet, P. Rigollet, and P. Srivastava. Exact recovery in the ising blockmodel. Annals of Statistics (to appear), page arXiv:1612.03880, 2018. [9] Quentin Berthet and Philippe Rigollet. Complexity theoretic lower bounds for sparse principal component detection. In Shai Shalev-Shwartz and Ingo Steinwart, editors, Proceedings of the 26th Annual Conference on Learning Theory, volume 30 of Proceedings of Machine Learning Research, pages 1046–1066, Princeton, NJ, USA, 12–14 Jun 2013. PMLR. [10] M. Bing, F. Bunea, Y. Ning, and M. Wegkamp. Adaptive estimation in structured factor models with applications to overlapping clustering. ArXiv e-prints, 2018. [11] Charles Bouveyron and Camille Brunet-Saumard. Model-based clustering of high-dimensional data: A review. Computational Statistics & Data Analysis, 71:52–78, 2014. [12] F. Bunea, C. Giraud, X. Luo, M. Royer, and N. Verzelen. Supplement to: Model assisted variable clustering: minimax-optimal recovery and algorithms. Preprint, 2018. [13] Florentina Bunea, Christophe Giraud, and Xi Luo. Minimax optimal variable clustering in g-models via cord. arXiv preprint arXiv:1508.01939, 2015. [14] Florentina Bunea, Christophe Giraud, Martin Royer, and Nicolas Verzelen. Pecok: a convex optimization approach to variable clustering. arXiv preprint arXiv:1606.05100, 2016. [15] Yudong Chen and Jiaming Xu. Statistical-computational tradeoffs in planted problems and submatrix localization with a growing number of clusters and submatrices. Journal of Machine Learning Research, 17(27):1–57, 2016. [16] M Chong, C Bhushan, AA Joshi, S Choi, JP Haldar, DW Shattuck, RN Spreng, and RM Leahy. Individual parcellation of resting fmri with a group functional connectivity prior. NeuroImage, 156:87–100, 2017. [17] R Cameron Craddock, G Andrew James, Paul E Holtzheimer, Xiaoping P Hu, and Helen S Mayberg. A whole brain fmri atlas generated via spatially constrained spectral clustering. Human brain mapping, 33(8):1914–1928, 2012. [18] Nicolas Frei dit Frey, Ana Victoria Garcia, Jean Bigeard, Rim Zaag, Eduardo Bueso, Marie Garmier, Stéphanie Pateyron, Marie-Ludivine de Tauzia-Moreau, Véronique Brunaud, Sandrine Balzergue, Jean Colcombet, Sébastien Aubourg, Marie-Laure Martin-Magniette, and Heribert Hirt. Functional analysis of arabidopsisimmune-related mapks uncovers a role for mpk3 as negative regulator of inducible defences. Genome Biology, 15(6):1–22, 2014. [19] M.F. Glasser, T.S. Coalson, E.C. Robinson, C.D. Hacker, J. Harwell, E. Yacoub, K. Ugurbil, J. Andersson, C.F. Beckmann, M. Jenkinson, S.M. Smith, and D.C. Van Essen. A multi-modal parcelation of human cerebral cortex. Nature, 536:171–178, 2016. imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 40 [20] Olivier Guédon and Roman Vershynin. Community detection in sparse networks via grothendieck’s inequality. arXiv preprint arXiv:1411.4686, 2014. [21] George Andrew James, Onder Hazaroglu, and Keith A Bush. A human brain atlas derived via n-cut parcellation of resting-state and task-based fmri data. Magnetic resonance imaging, 34(2):209–218, 2016. [22] Daxin Jiang, Chun Tang, and Aidong Zhang. Cluster analysis for gene expression data: a survey. IEEE Transactions on Knowledge and Data Engineering, 16(11):1370–1386, Nov 2004. [23] Vladimir Koltchinskii and Karim Lounici. Concentration inequalities and moment bounds for sample covariance operators. Bernoulli, to appear. [24] Ru Kong, Jingwei Li, Nanbo Sun, Mert Sabuncu, Hesheng Liu, Andrew Schaefer, Xi-Nian Zuo, Avram Holmes, Simon Eickhoff, and Thomas Yeo. Spatial topography of individual-specific cortical networks predicts human cognition, personality and emotion. https://www.biorxiv.org/content/early/2018/01/31/213041, 2018. [25] A. Kumar, Y. Sabharwal, and S. Sen. A simple linear time (1 + )-approximation algorithm for k-means clustering in any dimensions. In Foundations of Computer Science, 2004. Proceedings. 45th Annual IEEE Symposium on, pages 454–462, Oct 2004. [26] Can M Le, Elizaveta Levina, and Roman Vershynin. Optimization via low-rank approximation for community detection in networks. arXiv preprint arXiv:1406.0067, 2014. [27] Jing Lei and Alessandro Rinaldo. Consistency of spectral clustering in stochastic block models. Ann. Statist., 43(1):215–237, 2015. [28] Jing Lei and Lingxue Zhu. A generic sample splitting approach for refined community recovery in stochastic block models. arXiv preprint arXiv:1411.1469, 2014. [29] S. Lloyd. Least squares quantization in pcm. IEEE Trans. Inf. Theor., 28(2):129–137, September 1982. [30] D. G. Mixon, S. Villar, and R. Ward. Clustering subgaussian mixtures by semidefinite programming. ArXiv e-prints, February 2016. [31] Elchanan Mossel, Joe Neeman, and Allan Sly. Consistency thresholds for binary symmetric block models. arXiv preprint arXiv:1407.1591, 2014. [32] Jiming Peng and Yu Wei. Approximating k-means-type clustering via semidefinite programming. SIAM J. on Optimization, 18(1):186–205, February 2007. [33] A. Perry and A. S. Wein. A semidefinite program for unbalanced multisection in the stochastic block model. ArXiv e-prints, July 2015. [34] Russell A Poldrack. Region of interest analysis for fmri. Social cognitive and affective neuroscience, 2(1):67–70, 2007. [35] Jonathan D Power, Alexander L Cohen, Steven M Nelson, Gagan S Wig, Kelly Anne Barnes, Jessica A Church, Alecia C Vogel, Timothy O Laumann, Fran M Miezin, Bradley L Schlaggar, et al. Functional network organization of the human brain. Neuron, 72(4):665–678, 2011. [36] M. Royer. Adaptive clustering through semidefinite programming. Advances in Neural Information Processing Systems (NIPS), 2017. [37] Gui Xue, Adam R Aron, and Russell A Poldrack. Common neural substrates for inhibition of spoken and manual responses. Cerebral Cortex, 18(8):1923–1932, 2008. [38] B.T. Yeo, F.M. Krienen, J. Sepulcre, M.R. Sabuncu, D. Lashkari, M. Hollinshead, J.L. Roffman, J.W. Smoller, L. Z?llei, J.R. Polimeni, B. Fischl, H. Liu, and R.L. Buckner. The organization of the human cerebral cortex estimated by intrinsic functional connectivity. Journal of Neurophysiology, 106:1125 –1165, 2011. [39] Rim Zaag, Jean-Philippe Tamby, Cécile Guichard, Zakia Tariq, Guillem Rigaill, Etienne Delannoy, JeanPierre Renou, Sandrine Balzergue, Tristan Mary-Huard, Sébastien Aubourg, Marie-Laure Martin-Magniette, and Véronique Brunaud. Gem2net: from gene expression modeling to -omics networks, a new catdb module to investigate Arabidopsis thaliana genes involved in stress response. Nucleic Acids Research, 43(DatabaseIssue):1010–1017, 2015. Department of Statistical Science Cornell University Ithaca, NY 14853-2601, USA E-mail: [email protected] Laboratoire de Mathématiques d’Orsay Univ. Paris-Sud, CNRS, Université Paris-Saclay F-91405 Orsay, France E-mail: [email protected] Department of Biostatistics Brown University Providence, RI 02903, USA E-mail: [email protected] Laboratoire de Mathématiques d’Orsay Univ. Paris-Sud, CNRS, Université Paris-Saclay F-91405 Orsay, France E-mail: [email protected] INRA UMR 729 MISTEA, F-34060 Montpellier, FRANCE E-mail: [email protected] imsart-aos ver. 2014/10/16 file: main.tex date: April 15, 2018 Submitted to the Annals of Statistics SUPPLEMENT TO: MODEL ASSISTED VARIABLE CLUSTERING: MINIMAX-OPTIMAL RECOVERY AND ALGORITHMS By Florentina Bunea Cornell University By Christophe Giraud Université Paris Sud By Xi Luo Brown University By Martin Royer CNRS, Université Paris Sud, Université Paris-Saclay and By Nicolas Verzelen INRA Abstract The following document provides proofs of a large portion of the theoretical results stated in [2]. It also contains additional simulation results and supporting information regarding the data analysis. The numbering of the quoted lemmas, propositions, corollaries and theorems will be the same as in [2]. Results in [2] will be used without explicit reference. 1. Proof of results concerning model Identifiability. 1.1. Proofs of Section 2 and 6.1. Proof of Proposition 1. We first observe that if G is such that Σ = ACAt + Γ holds, with A associated to G, then G is a sub-partition of G∗ . To see this, note that for any a, b belonging to the same group of the partition G, we have COD(a, b) = 0. Hence a, b are in a same group of the partition G∗ , therefore G is a sub-partition of G∗ . Furthermore, for any sub-partition G of G∗ , M COD(Σ, G) = 0 unless G = G∗ . Thus, G = G∗ . Proof of Corollary 1. We start with the following lemma that proves the inequalities in display (8) of the main text [2]. Lemma 1. Assume that G is a partition, such that Σ = ACAt +Γ with Γ diagonal and A associated to G. Then, we have: (a) 2λK (C) ≤ ∆(C) (b) if the size m of the smallest group of G is larger than one, then (1) ∆(C) ≤ 2MCOD(Σ, G). (c) if C is semi-positive definite, then MCOD(Σ, G) ≤ p ∆(C) 1 max k=1,...,K p Ckk . imsart-aos ver. 2014/10/16 file: SupplementtosubmissionPC.2018-29MARCH.tex date: April 15, 2018 2 F. BUNEA, C. GIRAUD, M. ROYER, X. LUO AND N. VERZELEN The proof of Corollary 1 relies on the inequality (1) which holds since m ≥ 2. The result then follows from Proposition 1. Proof of Lemma 1. The first inequality holds because ∆(C) = min(ej − ek )t C(ej − ek ) ≥ 2λK (C). j<k Let us prove the second inequality. For any k 6= j, and for any pair of a, a0 ∈ Gk and b, b0 ∈ Gj we have Ckk + Cjj − 2Cjk = Σaa0 − Σba0 + Σbb0 − Σab0 ≤ 2COD(a, b). Since the inequalities are valid for any a, b in distincts groups, the bound ∆(C) ≤ 2MCOD(Σ, G) follows. For the last bound, we observe that for any a ∈ Gk , b ∈ Gj and c ∈ G` , we have q q |Σac − Σbc | = |Ck` − Cj` | = (ek − ej )t Ce` ≤ (ek − ej )t C(ek − ej ) et` Ce` , where the last inequality holds since C is positive semi-definite. The last inequality of the lemma follows. 1.2. Proof of Proposition 6. Consider any covariance matrix Σ that either satisfies ρ1 (Σ, K) > 2 or ρ2 (Σ, K) > 8. Thus, there either exists (A, C, D, R) ∈ P1 (Σ, K) with M COD(Σ, G) > 2|R|∞ , where G be the partition associated to A; or (A, C, D, R) ∈ P2 (Σ, K) with ∆(C) > 8|R|∞ . Let us consider another quadruplet (A0 , C 0 , D0 , R0 ) ∈ P1 (Σ, K) (resp. P2 (Σ, K)) with M COD(Σ, G0 ) > 2|R|∞ (resp. ∆(C 0 ) > 8|R0 |∞ ) and with associated partition G0 . We prove below G = G0 , based on the following lemma. Lemma 2. Assume either that (A, C, D, R) ∈ P1 (Σ, K) with M COD(Σ, G) > 2|R|∞ or that (A, C, D, R) ∈ P2 (Σ, K) with ∆(C) > 8|R|∞ . For any integer a between 1 and p set V (a) = {a0 : a0 6= a, COD(a, a0 ) ≤ 2|R|∞ } . Writing k(a) for the integer such that a ∈ Gk(a) , we have V (a) = Gk(a) \ {a}. Before proving this lemma, let us explain why it implies that G = G0 . By symmetry, we can assume that |R0 |∞ ≤ |R|∞ . So V 0 (a) ⊂ V (a) and hence G0k0 (a) ⊂ Gk(a) . To conclude, we observe that G0 is then a sub-partition of G, with the same number K of groups, so the two partitions G and G0 are equal. The three assertions (i), (ii) and (iii) of the Proposition 6 follows. To conclude, it remains to prove the Lemma 2. Proof of Lemma 2. Since Σ = ACAt + R + D, writing k(a) for the integer such that a ∈ Gk(a) , we have Σab = Ck(a)k(b) + Rab for any a 6= b. First, if a0 ∈ Gk(a) \ {a}, then k(a0 ) = k(a), so |Σac − Σa0 c | = |Rac + Ck(a)k(c) − Ck(a)k(c) − Ra0 c | ≤ 2|R|∞ for any c 6= a, a0 . So a0 ∈ V (a) and hence Gk(a) \ {a} ⊂ V (a). Conversely, let us prove that V (a) ⊂ Gk(a) \{a}. If (A, C, D, R) belongs to P1 (Σ, K), then any two a and b in different groups satisfy COD(a, b) > 2|R|∞ , implying that V (a) ⊂ Gk(a) \{a}. Now assume imsart-aos ver. 2014/10/16 file: SupplementtosubmissionPC.2018-29MARCH.tex date: April 15, 2018 3 SUPPLEMENT TO: VARIABLE CLUSTERING that (A, C, D, R) belongs to P2 (Σ, K) and that there exists a0 ∈ V (a) such that k(a0 ) 6= k(a). Hence, m > 1 and a0 ∈ / Gk(a) . We can therefore find b ∈ Gk(a) \ {a} and b0 ∈ Gk(a0 ) \ {a0 }. We have Ck(a)k(a) − Ck(a)k(a0 ) = Σab − Σa0 b − Rab + Ra0 b Ck(a)k(a0 ) − Ck(a0 )k(a0 ) = Σab0 − Σa0 b0 − Rab0 + Ra0 b0 . Since a0 ∈ V (a), we have COD(a, a0 ) ≤ 2|R|∞ so ∆(C) ≤ Ck(a)k(a) +Ck(a0 )k(a0 ) −2Ck(a)k(a0 ) = Σab −Σa0 b −Σab0 +Σa0 b0 +Ra0 b −Rab −Ra0 b0 +Rab0 ≤ 8|R|∞ , which is in contradiction with ∆(C) > 8|R|∞ . So it cannot hold that k(a0 ) 6= k(a), which means that any a0 ∈ V (a) belongs to Gk(a) \ {a}, i.e. V (a) ⊂ Gk(a) \ {a}. This conclude the proof of the equality V (a) = Gk(a) \ {a}. 1.3. Examples of Σ with ρ(Σ, K) = 8. Consider the matrix Σ =  3r r 0 0 r 3r 0 0 0 0 3r r  0 0 r 3r + Ip with r > 0 and the convention that each entry in the matrix corresponds to a block of size 2. Fixing K = 3, we have the following decompositions for Σ Σ − Ip =  4r  0  −r −r | 0 4r −r −r −r −r 2r 2r {z =A1 C1 At1   −r r  −r −r  + r 2r  2r 0 } | −r r r 0 r r r −r {z =R1 +D1 −Ip  r r   −r r } =  2r  2r  −r −r | 2r 2r −r −r −r −r 4r 0 {z =A2 C2 At2   −r r  −r −r  + r 0  4r r } | −r r r r r r −r r {z =R2 +D2 −Ip  r r   r  −r } For both decompositions, we have ∆(C1 ) = ∆(C2 ) = 8r = 8|R1 |∞ = 8|R2 |∞ , so that two different partitions G1 and G2 lead to the same ratio ∆(Ci )/|Ri |∞ = 8. It remains to prove that maxC,R ∆(C)/|R|∞ = 8 to conclude. For any decomposition associated to size 3 partition G, we have |R|∞ ≥ r. By symmetry we may assume that one group of G1 ∩ G∗1 6= ∅ and G3 ∩ G∗3 6= ∅ and G3 ∩ G∗4 6= ∅. As consequence, C3,3 ≤ r + |R|∞ , C1,1 ≤ 3r + |R|∞ and C1,3 ≥ −r − |R|∞ implying that ∆(C) ≤ 4r + 4|R|∞ . Since |R|∞ ≥ r, we obtain ρ2 (Σ, 3) ≤ 8. So we have prove that ρ2 (Σ, 3) = 8 and that the maximum is achieved for at least 2 different partitions. 2. Proofs for Section 3: minimax lower bounds. These proofs of Theorems 2 and 1 are based on a version of Fano’s lemma that is appropriate for our application. Specifically, we will employ Birgé’s Lemma (Corollary 2.18 in [6]), which we state below, translated to our problem. We let S denote generically either M(η, m) or D(τ, m). Then: b and for any collection of distinct covariance matrices Lemma 3. For any partition estimator G, Σ(j) ∈ S, 1 ≤ j ≤ M , we have b 6= G∗ ) ≥ sup PΣ (G Σ∈S (2) (3) b 6= G(j) ) max PΣ(j) (G j=1,...,M ! ≥ 1 ∧ 2e + 1 K(Σ(j) , Σ(1) ) 1 − max j≥2 log(M ) ≥ 1 ∧ 2e + 1 nk(Σ(1) )−1 (Σ(j) − Σ(1) )k2 1 − max j≥2 2 log(M ) , ! , where K(Σ(j) , Σ(1) ) denotes the Kulback-Leibler divergence between two Gaussian likelihoods based on n observations. imsart-aos ver. 2014/10/16 file: SupplementtosubmissionPC.2018-29MARCH.tex date: April 15, 2018 4 F. BUNEA, C. GIRAUD, M. ROYER, X. LUO AND N. VERZELEN Proof. Inequality (2) is Birgé’s Lemma (Corollary 2.18 in [6]), translated to our problem. We prove inequality (3) below. We only need to check that K(Σ(j) , Σ(1) ) ≤ nk(Σ(1) )−1 (Σ(j) − Σ(1) )k2 /2. (4) We have   n T race((Σ(1) )−1 Σ(j) − I) − log det (Σ(1) )−1 Σ(j) 2 n = (F ((Σ(1) )−1 Σ(j) ) − F (I)). 2 K(Σ(j) , Σ(1) ) = with F (S) = T race(S) − log det(S). Notice that F is convex, and therefore F (I + H) − F (I) ≤ hI − (I + H)−1 , Hi, since the gradient of our function F in I + H is I − (I + H)−1 . Let σ1 ≥ σ2 ≥ . . . be the singular values of H. Then X σ2 X k hI − (I + H)−1 , Hi = ≤ σk2 = kHk2 . 1 + σk k k Consequently, (3) holds, and the proof of this lemma is complete. 2.1. Minimax lower bounds with respect to the MCOD metric: Proof of Theorem 1. We derive the lower bound by constructing an example that corresponds to partitions with K = 3 blocks of size p/3 each, and thus the size of the smallest cluster m = p/3. We would expect that in this case the clusters will be easier to separate, and that m will play a role in the p minimax bound, however our result below shows that the perfect recovery separation rate is O( log p/n). To construct the class of covariance matrices to which we will apply Lemma 3 we let 0 <  < 1 and define     − 2 −   , C() =   − 2 −  2 which is positive semi-definite. Consider the following covariance matrix with K = 3 blocks of equal size m = p/3 given by Σ := AC()At + I, where A is a p × 3 hard assignment matrix given by Aj1 = 1, if 1 ≤ j ≤ m, and zero otherwise, Aj2 = 1, if m + 1 ≤ j ≤ 2m, and zero otherwise and Aj3 = 1, if 2m + 1 ≤ j ≤ 3m, and zero otherwise. We observe that MCOD(Σ) = 2 and |Σ|∞ = 3. For a ∈ {1, . . . , m} and b ∈ {m + 1, . . . , 2m + 1}, we construct Σ(a,b) by permuting the indices a and b. Naturally, the candidate matrices will still correspond to the same K = 3 and m = p/3, but the groups in the corresponding partitions will have switched labels. We collect the M = m2 + 1 0 candidate matrices in a set F. Let G be the partition associated with one of the generic matrices Σ0 ∈ F. We show below that if r 0.8 log(p/3) ≤ and η ≤ 0.8, n then inf b 6= G) ≥ inf max PΣ0 (G b 6= G0 ) sup PΣ (G 0 b Σ∈M(η) G ≥ b Σ ∈F G 1 . 2e + 1 imsart-aos ver. 2014/10/16 file: SupplementtosubmissionPC.2018-29MARCH.tex date: April 15, 2018 SUPPLEMENT TO: VARIABLE CLUSTERING 5 To apply Lemma 3, we calculate below the KL-divergence K(Σ(a,b) , Σ). By symmetry, we can assume that a = 1 and b = m + 1. We write henceforth Q for the permutation matrix associated to the transposition of 1 and m + 1 and Σ0 = QΣQt . We start by writing out the eigenvalues and the corresponding eigenvectors of C(): • λ1 = (2 − ) with ut1 = √12 [1 1 0], • λ2 = 2 + 2 with ut2 = √  2 [−1 1 2 • λ3 = 0 with ut3 = Let vkt = √1 (Auk )t , m 1+ /2 √ 1 [1 2+2 −1 2/], ]. for k = 1, 2. Then, with I denoting the p × p identity matrix, we have Σ= Σ0 − Σ = 2 X k=1 2 X k=1 mλk vk vkt + I, Σ−1 = − 2 X k=1 mλk vk vkt + I 1 + mλk mλk [Qvk vkt Qt − vk vkt ]. We have Qvk = vk + ∆k with ∆tk = √1m [(uk )2 − (uk )1 , 0...0, (uk )1 − (uk )2 , 0...0]. Then, ∆1 = 0, ∆t2 = √ 2 √ [1, 0...0, −1, 0...0], and 1+ /2 m Σ0 − Σ = mλ2 (v2 ∆t2 + ∆2 v2t + ∆2 ∆t2 ). We notice that v1 v1t ∆2 = 0 and v1 v1t v2 = 0, so putting pieces together: Σ−1 Σ0 = I + Σ−1 (Σ0 − Σ) = I + mλ2 F, where mλ2 v2 v2t )(v2 ∆t2 + ∆2 v2t + ∆2 ∆t2 ). 1 + mλ2 Writing s := ∆t2 v2 , γ := ∆t2 ∆2 and ρ := mλ2 / (1 + mλ2 ), we have F := (I − F = [v2 ∆t2 + ∆2 v2t + ∆2 ∆t2 − ρ(v2 ∆t2 + sv2 v2t + sv2 ∆t2 )] = v2 ∆t2 (1 − ρ(1 + s)) + ∆2 v2t + ∆2 ∆t2 − ρsv2 v2t . Let us compute the eigenvalues of F . We observe that the range of F is spanned by v2 and ∆2 , so we seek for eigenvectors ω = v2 + α∆2 . Since (5) s=− 22 22 = − , m(2 + 2 ) mλ2 and γ = 42 = −2s, mλ2 computing F ω, we obtain F ω = [(1 − ρ(1 + s))(s + αγ) − ρs(1 + αs)]v2 + [1 + αs + s + αγ]∆2 = [(1 − ρ(1 + s))(1 − 2α) − ρ(1 + αs)]sv2 + [1 + (1 − α)s]∆2 , so ( 1 + (1 − α)s = αµ F ω = µω ⇐⇒ [(1 − ρ(1 + s))(1 − 2α) − ρ(1 + αs)]s = µ ( 1+s α = µ+s ⇐⇒ 0 = µ2 + µ[ρs(2 + s)] + (1 − ρ)(s + 2)s. imsart-aos ver. 2014/10/16 file: SupplementtosubmissionPC.2018-29MARCH.tex date: April 15, 2018 6 F. BUNEA, C. GIRAUD, M. ROYER, X. LUO AND N. VERZELEN Therefore, the two non-zero eigenvalues µ1 and µ2 of F fulfill ( µ1 + µ2 = −ρs(2 + s) µ1 µ2 = (1 − ρ)s(2 + s). Since Σ−1 Σ0 = I + mλ2 F , with F of rank 2, we can now compute K(Σ0 , Σ): 2 K(Σ0 , Σ) = Tr(mλ2 F ) − log det(I + mλ2 F ) n = mλ2 (µ1 + µ2 ) − log(1 + mλ2 (µ1 + µ2 ) + (mλ2 )2 µ1 µ2 )  = −mλ2 ρs(2 + s) − log 1 − mλ2 ρs(2 + s) + (mλ2 )2 (1 − ρ)s(2 + s) . We observe that mλ2 (1 − ρ) = ρ, so the terms in the log cancel and finally, plugging the values in (5) into the above display, we obtain   2 n 2 0 ≤ 2n2 . K(Σ , Σ) = − mλ2 ρs(2 + s) = 2nρ 1 − 2 m(2 + 2 ) q log(p/3) 2 Since we have M ≥ (p/3) candidate matrices, Lemma 3 ensures that when  ≤ 2e(2e+1)n the probability of mis-clustering is larger than 1/(2e + 1) ≥ 1/7. This completes the proof.  2.2. Minimax cluster lower bounds with respect to the ∆(C ∗ )-metric: Proof of Theorem 2. It is sufficient to consider the model corresponding to C ∗ = τ IK and Γ = Ip , so that, given a partition G, the covariance matrix decomposes as  (6) ΣG = AG τ IK AtG + Ip , where AG is the assignment matrix associated to the partition G. Note that, in this case ∆(C ∗ ) = 2τ and |Γ|∞ = 1. Define G the class of all partitions of {1, . . . , p} into K groups of identical size m = p/K. Recall that, as before, PΣG refers to the normal distribution with covariance ΣG . We will once again use Lemma 3. To this end, we construct the candidate matrices below. Construction of the covariance matrices Σ(j) . Let A(0) be the assignment matrix such that the m first variables belong to the first group, the next m belong to the second group and so on. In other words,     1+τ τ τ 0 ... 1 0 0 ... 0   ..   ..  τ  . τ .       τ  τ 1+τ 1 0 0 . . .  0       0 1 0 . . .  0 1 + τ τ τ 0 . . . 0     (0) (0)   , .. A =  so that Σ =  .. .. . .  . . τ τ   . .         τ τ 1 + τ 0 1      ..  ..    . 0  .   .. 1 . t where Σ(0) = A(0) τ IK A(0) + Ip . Note that the associated partition for G(0) is {{1...m}...{p − m + 1...p}}. For any a = m + 1, . . . , p, denote µa the transposition between 1 and a in {1...p}. Then, for any a = m + 1, . . . , p, define the assignement matrix A(a) and Σ(a) by (a) (0) Aij = Aµa (i),j , (a) (0) Σij = Σµa (i),µa (j) . imsart-aos ver. 2014/10/16 file: SupplementtosubmissionPC.2018-29MARCH.tex date: April 15, 2018 SUPPLEMENT TO: VARIABLE CLUSTERING 7 In other words, the corresponding partition G(a) is obtained from G(0) by exchanging the role of the first and the a-th node. Define the set T := {0, m + 1, m + 2, . . . , p}. Then, according to Lemma 3, we have ! P (j) (0)  1 ^ j∈T \{0} K(Σ , Σ ) 1− , inf max Pj Ĝ 6= Gj ≥ 2e + 1 (|T | − 1) log(|T |) Ĝ j∈T where, as in the previous proof, K(Σ(j) , Σ(0) ) refers to the KL-divergence between two Gaussian likelihoods based on n observations. By symmetry, all the Kullback divergences are equal. Since 2e/(2e + 1) ≥ 0.8 and 1/(2e + 1) ≥ 1/7, the RHS of the above inequality is further larger than 1/7, provide that we show that nKL(PΣ(m+1) , PΣ(0) ) ≤ 0.8 log(p − m + 1) , (7) where, KL(PΣ(m+1) , PΣ(0) ) is the KL-divergence between two Gaussian distributions (n = 1), and is evaluated below. Lemma 4. For any τ > 1 and any integers p and m, we have KL(PΣ(m+1) , PΣ(0) ) = (8) 2(m − 1)τ 2 1 + mτ As a consequence, the desired result holds as soon as  1  b= inf sup PΣ G 6 G∗ ≥ , 7 b Σ∈D(τ ) G 2n(m − 1)τ 2 ≤ 0.8 log(p − m + 1) . 1 + mτ This last condition is satisfied as soon as "s # log(p) _ log(p) τ ≤c , n(m − 1) n for some numerical constant c > 0. It remains to prove Lemma 4, and we do so below. Proof of Lemma 4. The Kullback-Leibler divergence between two centered normal distributions writes as (9) KL(PΣ(m+1) , PΣ(0) ) =   1 − log det (Σ(0) )−1 Σ(m+1) + trace (Σ(0) )−1 Σ(m+1) − Ip , 2 so that we only have to compute the determinant and the trace of A := (Σ(1) )−1 Σ(m+1) . We shall see that see that A is a rank 2 perturbation of the identity matrix, so that we will only need to compute its two eigenvalues different from zero. t Observe that for i = 0, m + 1, the matrices A(i) A(i) admit exactly K non-zero eigenvalues that are P t (i) (i) t (i) all equal to m. As a consequence, we can decompose A(i) A(i) = m K k=1 uk (uk ) where uk is a unit vector whose non zero components are all equal to 1/m and correspond to the k-th group in imsart-aos ver. 2014/10/16 file: SupplementtosubmissionPC.2018-29MARCH.tex date: April 15, 2018 8 F. BUNEA, C. GIRAUD, M. ROYER, X. LUO AND N. VERZELEN (0) (m+1) G(i) . Note that uk = uk for k = 3, . . . , K as A(0) and A(m+1) only differ by rows 1 and m + 1. P (i) (i) t The orthogonal projector Pi = K k=1 uk (uk ) satisfies Σ(i) = mτ Pi + Ip = (1 + mτ )Pi + (Ip − Pi ) . Since Pi and Ip − Pi are orthogonal, (Σ(i) )−1 = (1 + mτ )−1 Pi + (Ip − Pi ) = Ip − mτ Pi 1 + mτ As a consequence of the above observations, we have h i A = Ip + (Σ(0) )−1 Σ(m+1) − Σ(0)  m2 τ 2 = Ip + mτ Pm+1 − P0 − P0 (Pm+1 − P0 ) =: Ip + B 1 + mτ The matrices P0 and Pm+1 are k − 1 block diagonal with a first block of size 2m × 2m. Besides, P0 and Pm+1 take the same values on all the K − 2 remaining blocks. To compute the non-zero eigenvalues of B, we only to consider the restrictions P 0 and P m+1 of P0 and Pm+1 to the first 2m × 2m entries. Also observe that the matrices P 0 and P m+1 are 4 × 4 block-constant, with block size   and the entries are 1×1 (m  − 1) × 1 1×1 (m − 1) × 1 mP 0 = 1 × (m − 1) (m − 1) × (m − 1) 1 × (m − 1) (m − 1) × (m − 1)  1 1 0 0 1 1 0 0 0 0 1 1  0 0 1 and 1 1×1 (m − 1) × 1 1×1 (m − 1) × 1 mP m+1 = 1 × (m − 1) (m − 1) × (m − 1) 1 × (m − 1) (m − 1) × (m − 1)  1 0 0 1 0 1 1 0 0 1 1 0  1 0 0 1. As a consequence, the non zero eigenvalues of B are the same as those of  m2 τ 2 C := mτ P m+1 − P 0 − P (P − P 0) 1 + mτ 0 m+1 where P m+1 and P 0 are two 4 × 4 matrices   mP 0 = 1 1 0 0 (m − 1) (m − 1) 0 0 0 0 1 1 0 0  (m − 1) and (m − 1) Working out the product of matrices, we get  C = −τ 0 1 0 −1 (m − 1) 0 −(m − 1) 0 0 −1 0 1 mP m+1 =  −(m − 1) 0  (m − 1) 0 +  1 0 0 1 1)τ 2 (m − 1 + mτ 0 (m − 1) (m − 1) 0  1 1 −1 −1 0 1 1 0 1 1 −1 −1  (m − 1) 0  0 (m − 1) . −1 −1 1 1  −1 −1 1 1 We observe that these two matrices have their first (resp. second) and third (resp. fourth) lines and columns opposite to each other. As a consequence, the two non-zero eigenvalues of C ∗ are the same as those of h i 2(m − 1)τ 2 h i 0 (m − 1) 1 1 D := −2τ 1 + 0 1 1 1 + mτ h i 2τ (m − 1)τ −(m − 1)[1 + (m − 1)τ ] = . (m − 1)τ 1 + mτ −(1 + τ ) imsart-aos ver. 2014/10/16 file: SupplementtosubmissionPC.2018-29MARCH.tex date: April 15, 2018 9 SUPPLEMENT TO: VARIABLE CLUSTERING Straightforward computations then lead to tr(D) = 4(m − 1)τ 2 , 1 + mτ det(D) = −tr(D) Coming back to (9), we have   2KL(PΣ(m+1) , PΣ(0) ) = − log det A + trace A − Ip = − log det(I + D) + tr(D)   = tr(D) − log 1 + tr(D) + det(D) = 4(m − 1)τ 2 . 1 + mτ 3. Results for the COD estimator: Section 4 and 6.2. We give below the proofs of Theorems 3, 6 and Proposition 2. 3.1. Proof of Theorems 3 and 6. In order to avoid cluttered notation, in all this subsection, we write G for G∗ (resp. G[K]) and m for m∗ (resp. m[K]). The proof consists in the application of Lemma 5 and Lemma 6 proved below. Lemma 5. Xb , Xc )|, Consider any partition G. Let us set τ = maxa,b,c=1,...,p |d cor(Xa − Xb , Xc ) − cor(Xa − µ = max sCOD(a, b), and η = min sCOD(a, b), where sCOD(a, b) := max |cor(Xa − Xb , Xc )| . G G ab a∼b c6=a,b Then, under the condition µ + τ ≤ α < η − τ , the COD algorithm exactly recovers the partition G. The control on the size of τ is given below. Lemma 6. (10) Under Assumption 1, there exist two constants c1 , c2 such that r τ := max a,b,c=1,...,p |d cor(Xa − Xb , Xc ) − cor(Xa − Xb , Xc )| ≤ c1 L2 log(p) , n with probability at least 1 − c2 /p. To conclude Theorem 3, we apply the two lemmas with G = G∗ , implying that µ = 0 and η ≥ MCOD(Σ)/(2|Σ| ∞ ). To conclude Theorem 6, we remark that η ≥ MCOD(Σ, G)/(2|Σ|∞ ), and √ µ ≤ 2|R|∞ /λmin (Σ). Proof of Lemma 5. First, we notice that, \ \ sCOD(a, b) − τ ≤ sCOD(a, b) ≤ sCOD(a, b) + τ. We then observe that G \ a ∼ b =⇒ sCOD(a, b) ≤ µ =⇒ sCOD(a, b) ≤ µ + τ, and G \ a  b =⇒ sCOD(a, b) ≥ η =⇒ sCOD(a, b) ≥ η − τ. imsart-aos ver. 2014/10/16 file: SupplementtosubmissionPC.2018-29MARCH.tex date: April 15, 2018 10 F. BUNEA, C. GIRAUD, M. ROYER, X. LUO AND N. VERZELEN In particular, under the condition µ + τ ≤ α < η − τ , we have G \ a ∼ b ⇐⇒ sCOD(a, b) ≤ α. (11) Let us prove Lemma 5 by induction on l. We consider the algorithm at some step l and assume b j = Gk(a ) for j = 1, . . . , l − 1. that the algorithm was consistent up to this step, i.e. G j b = G. Assume now that |S| > 1. If |S| = 1, then it directly follows that G \ l , bl ) > α, then according to (11) no b ∈ S is in the same group as al . Since the (i) If sCOD(a b l := {al } = Gk(a ) . algorithm has been consistent up to step l, it means that al is a singleton and G l G \ l , bl ) ≤ α, then al ∼ (ii) If sCOD(a bl according to (11). The equivalence (11) furthermore ensures b l = S ∩ Gk(a ) . Since the algorithm has been consistent up to this step we have Gk(a ) ⊂ S that G l l b l = Gk(a ) . and hence G l To conclude, the algorithm remains consistent at step l and the Lemma 5 follows by induction. Proof of Lemma 6. We start with the following lemma. Lemma 7. (12) Let W be a random vector in Rd , then d a , Wb ) − cov(Wa , Wb )| |cov(W p . a,b=1,...,d var(Wa )var(Wb ) max |d cor(Wa , Wb ) − cor(Wa , Wb )| ≤ 2 max a,b=1,...,d Proof of Lemma 7. Since both sides of (12) are invariant by rescaling any of the Wa , we can b the correlation always assume that var(Wa ) = 1 for all a = 1 . . . , d. We denote by R and R matrix of W and its empirical counterpart, and by S and Sb its covariance matrix and its empirical counterpart. Since var(Wa ) = 1 for all a = 1 . . . , d, we have R = S, and the triangular inequality gives  bab − Rab | = |R bab 1 − (Sbaa Sbbb )1/2 + Sbab − Sab | |R bab | |1 − (Sbaa Sbbb )1/2 | + |Sbab − Sab |. ≤ |R We notice that |1 − (Sbaa Sbbb )1/2 | ≤ |1 − Sbaa | ∨ |1 − Sbbb | = |Saa − Sbaa | ∨ |Sbb − Sbbb |. bab | ≤ 1, we conclude that for any a, b ∈ {1, . . . , d} Since |R   bab − Rab | ≤ |R bab | |Saa − Sbaa | ∨ |Sbb − Sbbb | + |Sbab − Sab | |R ≤ 2|Sb − S|∞ . The proof of Lemma 7 is complete. We now apply previous lemma to the random vector W in dimension d = p(p + 1)/2 gathering all the Xc for c = 1, . . . , p and all the Xa − Xb for 1 ≤ a < b ≤ p. We complete the proof of Lemma 6 by combining (12) with (24) and by noticing that we always have τ ≤ 2 so the term with the square-root is dominant. imsart-aos ver. 2014/10/16 file: SupplementtosubmissionPC.2018-29MARCH.tex date: April 15, 2018 11 SUPPLEMENT TO: VARIABLE CLUSTERING (i) (i) b − ∆ab for i = 1, 2. 3.2. Proof of Proposition 2. For any a < b, we introduce the notation ab = ∆ ab (2) We recall the notation ECV (G) = E [CV (G)]. For any partition G, we have h i X (1) (2) (1) ECV (G) − ECV (G∗ ) = 1 G E(2) |ab − ab |2∞ − |ab |2∞ ab G∗ a∼b + X G∗ ab 1 G a∼b h i (1) (1) (2) E(2) |∆ab + ab |2∞ − |ab − ab |2∞ . Let us prove that both terms are positive both in expectation and in probability with respect to P(2) . (2) The property (P1) ensures that since E[ab ] = 0. So, for the first sum, Jensen inequality implies that h i h i (1) (2) (1) (2) E(2) |ab − ab |2∞ ≥ ab − E(2) ab 2 ∞ (1) = |ab |2∞ . Hence the first sum is always non-negative. G∗ G Let us now consider the second sum where a  b but a ∼ b. The inequality (1) (1) (1) (1) |∆ab |2∞ ≤ (|∆ab + ab |∞ + |ab |∞ )2 ≤ 2|∆ab + ab |2∞ + 2|ab |2∞ , ensures the lower bound h i 1 (1) (1) (2) (1) (2) E(2) |∆ab + ab |2∞ − |ab − ab |2∞ ≥ |∆ab |2∞ − 2|ab |2∞ − E(2) [|ab |2∞ ]. 2 The Lemma 7 together with the Corollary 1 of Hanson-Wright inequality ensures that !!2 r log(p) log(p) log(p) (i) 2 2 max |[ab ]c | ≤ min 2, cL + , ≤ 4c2 L4 |Σ|2∞ a,b,c=1,...,p n n n both with probability larger than 1 − 4/p and in expectation with respect to P(i) . Since 4|∆ab |2∞ ≥ M COD(Σ)2 /|Σ|2∞ > c21 L4 log(p)/n, the proof of Proposition 2 is complete. 4. Proofs regarding cluster recovery with Pecok: Theorem 7 of Section 6.3. 4.1. Proofs of the Lemmas 6 - 9 used in the proofs of Theorems 8 and 9 stated in Appendix A.3. We recall that these theorems, and the lemmas that lead to their conclusion, are used to prove Theorem 7. Proof of Lemma 6. Fix j 6= k ∈ [p]. For i = 1, . . . , n, the random variables Ti = Zij − Zik are independent and identically distributed with ∗ ∗ ∗ E[Ti2 ] = Cjj + Ckk − 2Cjl + γkk + γjj − 2γjl = ∆jk (C ∗ ) + ∆jk (γ). Let us first work under assumption 1. We have kTi k2ψ2 ≤ Var (Ti ) L2 . Applying the Hanson-Wright inequality (22) to |Z:j − Z:k |22 , we obtain, for some constant c > 0, p |Z:j − Z:k |22 − n(γjj + γkk − 2γjk ) ≥ n∆jk (C ∗ ) − cL2 (∆jk (C ∗ ) + ∆jk (γ))(log(p) + n log(p)) , imsart-aos ver. 2014/10/16 file: SupplementtosubmissionPC.2018-29MARCH.tex date: April 15, 2018 12 F. BUNEA, C. GIRAUD, M. ROYER, X. LUO AND N. VERZELEN with probability higher than 1 − 1/(pK 2 ). We derive from |∆jk (γ)| ≤ 4|R|∞ + 2|D|∞ /m, Condition (42) of Theorem 8 and the condition L4 log(p) ≤ c1 n that |Z:j − Z:k |22 − n(γjj + γkk − 2γjk ) ≥ n ∆jk (C ∗ ) , 2 with probability higher than 1 − 1/(pK 2 ). Taking an union bound over all j 6= k leads to (53) of Lemma 6. P Let us now turn to Assumption 1-bis. Since Zij = m−1 a∈Gj Xia , it follows that |Ti | ≤ 2M j almost surely. Then, applying Hanson-Wright inequality for Bernstein-type random variables (23), we derive that, for some constant c > 0 q |Z:j − Z:k |22 − n(γjj + γkk − 2γjk ) ≥ n∆jk (C ∗ ) − cM 2 log(p) − cM (∆jk (C ∗ ) + ∆jk (γ))n log(p) , with probability higher than 1 − 1/(pK 2 ). We derive from |∆jk (γ)| ≤ 4|R|∞ + 2|D|∞ /m and Condition (43) of Theorem 8 that |Z:j − Z:k |22 − n(γjj + γkk − 2γjk ) ≥ n ∆jk (C ∗ ) , 2 with probability higher than 1 − 1/(pK 2 ). Taking an union bound over all j 6= k leads to (53) of Lemma 6. Proof of Lemma 7. For all a ∼ b, one has (W2 )ab = 0. For all a  b, it follows from the covariance structure of Z and E that the expectation of E[(W2 )ab ] is zero. We will control the deviation of W2 from zero with the Corollary 1 of Hanson-Wright inequality, with u = B ∗ (ea − eb ) and v = (I − B ∗ )(ea − eb ). We observe that Var (E a − E b ) ≤ 16|Γ|∞ and   |D|∞ + 3|R|∞ . Var ((AZ):a − (AZ):b ) = Var Z k(a) − Z k(b) ≤ ∆k(a)k(b) (C ∗ ) + 2 m Let us control (W2 )ab under Assumption 1. From the variance bounds and the Corollary 1 of Hanson-Wright inequality, we derive that hp i p |(W2 )ab | ≤ cL2 Var (E a − E b ) Var ((AZ):a − (AZ):b ) n log(p) + log(p) h q i p |D|∞ 0 2 1/2 1/2 ∗ √ ≤cL ∆k(a)k(b) (C )|Γ|∞ + + |R|∞ + |R|∞ |D|∞ n log(p) + log(p) , m with probability higher than 1 − 4/p3 . Taking an union bound over all (a, b) such that a  b leads to the desired result. Turning to Assumption 1-bis, we use Lemma 11 below, which gives " s #   |D| ∞ |(W2 )ab | ≤ c M n log(p) ∆k(a)k(b) (C ∗ ) + + |R|∞ + M 2 log(p) m with probability higher than 1 − 4/p3 . The result follows again from a union bound. imsart-aos ver. 2014/10/16 file: SupplementtosubmissionPC.2018-29MARCH.tex date: April 15, 2018 SUPPLEMENT TO: VARIABLE CLUSTERING 13 e one has Γ e = (I − B ∗ )Γ(I e − B ∗ ) and therefore Proof of Lemma 8. By definition of E and Γ, e = 0. Then, Lemma 5 of the main document [2] entails B∗Γ P j6=k |BGj Gk |1 ∗ ∗ ∗ ∗ ∗ e − (I − B )Γ(I − B ), B − Bi| ≤ kΓ e − (I − B )Γ(I − B )kop (13) |hΓ . m e − (I − B ∗ )Γ(I − B ∗ )kop under Assumption 1. We apply Let us first control the random variable kΓ Lemma 12 and obtain  r p p ∗ ∗ e , + kΓ − (I − B )Γ(I − B )kop ≤ cL kΓkop n n with probability higher than 1 − 1/p. Turning to Assumption 1-bis, we observe that the random variables |Ea | are all bounded by 2M . Applying the matrix Bernstein inequality (Lemma 13 below), we obtain r pkΓkop log(p) pM 2 log(p) ∗ ∗ e kΓ − (I − B )Γ(I − B )kop ≤ cM +c , n n with probability higher than 1 − 1/p. Together with (13) and the definition of W3 , these two deviation inequalities allows us to prove the desired results. Proof of Lemma 9. We first observe that b B ∗ − Bi| = |hR + D − D, b B ∗ − Bi| ≤ |hR, B ∗ − Bi| + |hD − D, b B ∗ − Bi|. |hΓ − Γ, According to Lemma 5 of the main document [2] " #  X kRkop ∗ ∗ |hR, B − Bi| ≤ |BGj Gk |1 + 6|B R|∞ m j6=k hence (14) b B − Bi| ≤ |hΓ − Γ, ∗  X kRkop b B ∗ − Bi|. |BGj Gk |1 + |hD − D, + 6|R|∞ m j6=k e − Γ. The additional ingredient is that For the second term, we follow the same approach as for Γ ∗ ∗ b b hD − D, B − Bi = hD − D − αIp , B − Bi for any α ∈ R, since tr(B ∗ ) = K = tr(B). According to Lemma 5 of the main document [2], for any α ∈ R, the following holds: b B ∗ − Bi| =|hD − D b − αIp , B ∗ − Bi| |hD − D, " # ! X b − αIp kop kD − D b − αIp ]|∞ ≤2 |BGj Gk |1 + 3|B ∗ [(D − D) 2m j6=k " # b − αIp k∞ X 7kD − D ≤ |BGj Gk |1 , m j6=k b where we used  in the last line that αIp , D and D are  diagonal matrices. b kk ) + mink (Dkk − D b kk ) /2. The above inequality simplifies to We fix α = maxk (Dkk − D X b b B ∗ − Bi| ≤ 7kD − DkV |hD − D, |BGj Gk |1 . 2m j6=k The result follows. imsart-aos ver. 2014/10/16 file: SupplementtosubmissionPC.2018-29MARCH.tex date: April 15, 2018 14 F. BUNEA, C. GIRAUD, M. ROYER, X. LUO AND N. VERZELEN 4.2. Proof of (ii) of Proposition 8 of Appendix A.4 and Proof of Lemma 10 of the main text [2]. We recall that Proposition 8 is also an intermediate step for Theorem 7 of Section 6.3. We begin with the Proof of (ii). We will follow the same lines of proof as for part (i), adjusting the probabilistic inequalities to the bounded setting. Under Assumption 1-bis, Lemma 11 below ensures that, simultaneously for all triplet (a, b1 , b2 ) of distinct indices, 1 hXa − Xb1 , Xa − Xb2 i − Cov (Xa − Xb1 , Xa − Xb2 ) n r 0 ≤c M Var (Xa − Xb1 ) log(p) log(p) + M2 n n ! , with probability at least 1 − p−4 . Plugging the estimates (??) and (??), we get with probability 1 − 1/p2 ! r p log(p) log(p) b aa − Daa ≤ c0 |R|∞ + (t1 + t2 + t12 ) + M |Γ|∞ + t1 Γ + M2 n n ! r |Γ|∞ log(p) log(p) ≤ c00 |R|∞ + (t1 + t2 + t12 ) + M + M2 (15) , n n √ √ where we used for the last inequality a x + y ≤ y + a 2x + a2 for any a, x, y ≥ 0. Soagain, as in the first part of the proof, we only need  to upper bound the bias terms t1 , t2 , t12 by p p 0 2 c |Γ|∞ |R|∞ + M |Γ|∞ log(p)/n + M log(p)/n . For any c and d such that k(a) = k(c) and k(ne1 (a)) = k(d), Hanson-Wright inequality together with the condition M 2 log(p) ≤ c1 v 2 n give r 1 Var (Xc − Xd ) log(p) log(p) 2 |X:c − X:d |2 ≤ Var (Xc − Xd ) + cM + cM 2 n n n ≤ c0 Var (Xc − Xd ) ≤ c00 (|Γ|∞ + t1 ), with probability 1 − 1/p2 . So combined with Lemma 10 of the main text [2], proved below, we get with probability at least 1 − 2p−2 p p p (16) hX:a − X:ne1 (a) , X:c − X:d i ≤ c0 n|R|∞ + M log(p) n[|Γ|∞ + t1 ]. Applying again the Lemma 11 and M 2 log(p) ≤ c1 v 2 n, we obtain p hX:a − X:ne1 (a) , X:c − X:d i ≥ nt1 − 4n|R|∞ − cM n Var (Xc − Xd ) log(p) − cM 2 log(p) p p ≥ nt1 − 4n|R|∞ − c0 M |Γ|∞ + t1 n log(p). with probability 1 − 1/p2 . Hence, as in the first part of the proof, we conclude that " # r |Γ| log(p) ∞ 1/2 1/2 t1 ≤ c0 |R|∞ |Γ|∞ +M n simultaneously for all a, with probability 1 − c3 /p. Together with (15), this concludes the proof of the second part of the proposition. imsart-aos ver. 2014/10/16 file: SupplementtosubmissionPC.2018-29MARCH.tex date: April 15, 2018 SUPPLEMENT TO: VARIABLE CLUSTERING 15 Proof of Lemma 10. In this proof, c0 denotes a numerical constant, whose value can vary from line to line. Since m ≥ 3, there exists two indices b1 and b2 other than a belonging to the group Gk(a) . Fix any c and d different from a and b1 . Under Assumption 1, by Hanson-Wright inequality and since log(p) ≤ c1 L−4 n, it holds that !! r log(p) log(p) |X:c − X:d |22 ≥ n Var (Xc − Xd ) 1 − c0 L2 ≥ n Var (Xc − Xd ) /2 , + n n with probability 1 − 1/p5 . Similarly, under Assumption 1-bis, by Hanson-Wright inequality and since M 2 log(p) ≤ c1 v 2 n, we get  p  |X:c −X:d |22 ≥ n Var (Xc − Xd )−c0 M Var (Xc − Xd ) n log(p) + M 2 log(p) ≥ n Var (Xc − Xd ) /2 , with probability 1 − 1/p5 . The random variable hX:a − X:bi , X:c − X:d i has expectation n(Rac − Rbi c + Rbi d − Rad ). Under the diagonal dominance assumption (32) of the main text [2] and the assumption ∆(C ∗ ) ≥ 0, we have | E [hX:a − X:bi , X:c − X:d i] | ≤ n (|Rac | + |Rbi c | + |Rbi d | + |Rad |) p 1/2 ≤ 2n|R|∞ Dcc + Ddd − 2Rcd p ≤ 4 n|R|∞ |X:c − X:d |2 . p We observe that the inequality | E [hX:a − X:bi , X:c − X:d i] | ≤ 4 n|R|∞ |X:c − X:d |2 still holds when Γ is diagonal (i.e. R = 0), since in this case the left-hand side is equal to zero. Under Assumption 1, by Hanson-Wright inequality, we obtain with probability 1 − 1/p5 p p |hX:a − X:bi , X:c − X:d i| ≤ | E [hX:a − X:bi , X:c − X:d i] | + cL2 Var (Xc − Xd ) |Γ|∞ n log(p)  p  p ≤ 4 n|R|∞ + cL2 2|Γ|∞ log(p) |X:c − X:d |2 . Similarly, under Assumption 1-bis, by Hanson-Wright inequality and M 2 log(p) ≤ c1 v 2 n, we obtain with probability 1 − 1/p5 p p |hX:a − X:bi , X:c − X:d i| ≤ | E [hX:a − X:bi , X:c − X:d i] | + cM Var (Xc − Xd ) n log(p) + cM 2 log(p)  p  p ≤ 4 n|R|∞ + c0 M log(p) |X:c − X:d |2 . By the definition of ne1 (a) and ne2 (a) and a union bound, we obtain the desired result. 5. Analysis of corrected spectral clustering: Section 5.4. In this section, we prove Proposition 5. We recall that we work here with the decomposition Σ = AC ∗ At + Γ where Γ is diagonal. As in the previous section, we write m for m∗ and G for G∗ . An alternative formulation of an approximate K-means is the following. Let η > 1 be a given positive number. Denote Ap,K the collection of membership matrices, that is p × K binary matrices whose rows contain exactly one non-zero entry. Note that a membership matrix A ∈ Ap,K defines b , the membership matrix A b is said to be an η-approximation a partition G. Given a p × K matrix U b b K-means problem on U if there exists a K × K matrix Q such that (17) b −A bQk b 2 ≤ η min min kU b − AQk2 . kU F F A∈Ap,k Q imsart-aos ver. 2014/10/16 file: SupplementtosubmissionPC.2018-29MARCH.tex date: April 15, 2018 16 F. BUNEA, C. GIRAUD, M. ROYER, X. LUO AND N. VERZELEN b is then the partition corresponding to A. b The partition G The proof is based on the following Lemma by Lei and Rinaldo [5]. Lemma 8. Let M be any matrix of the form M = AQ where A ∈ Ap,K is a membership matrix associated to G and Q ∈ RK×q , and denote by δ the minimal distance between two rows of Q. Then, there exists a constant cη , such that, for any matrix M 0 fulfilling kM − M 0 k2F < mδ 2 /cη , the b fulfilling classification of the rows of M 0 by an η-approximate K-means provides a clustering G L̄(Ĝ, G) ≤ cη kM − M 0 k2F . mδ 2 We also need the following bounds Lemma 9. We have kΣkop ≥ mkC ∗ kop and |Γ|∞ ≤ kΣkop . In view of this Lemma, we obtain kΣkop ≥ mkC ∗ kop ≥ mλK (C ∗ ). Then, Condition (29) of Proposition 5 of the main text [2] enforces that (18) Re(Σ) ∨ log(p) ≤ 1/c2η . n Let U be a K × p matrix which gathers the eigenvectors of AC ∗ At associated to the K leading eigenvalues. The associated eigenvectors are block constant. Therefore U0 = AQ0 , and since At A = √ mI, the matrix mQ0 is orthogonal. b and M = U0 O, b where O b is a K × K orthogonal matrix to be We apply Lemma 8 with M 0 = U √ √ b chosen. We have M = AQ with p mQ = mQ0 O orthogonal. In particular, the minimal distance between two rows of Q is δ = 2/m. Lemma 8 ensures that (19) L̄(ĜS , G) ≤ cη b − U0 Ok b 2 kU F , 2 whenever the right-hand side is smaller than 1. By Davis-Kahan inequality (e.g. [5]), there exists b such that an orthogonal matrix O (20) b − U0 Ok b 2F ≤ kU e − AC ∗ At k2 8KkΣ op . m2 λ2K (C ∗ ) e − AC ∗ At by We can upper-bound the operator norm of Σ e − AC ∗ At kop ≤ kΣ b − Σkop + kΓ b − Γkop . kΣ According to Theorem 9 in [4], there exists a constant c > 0 such that, with probability at least 1 − 1/p ! r r _ Re(Σ) _ log(p) _ log(p) Re(Σ) b − Σkop ≤ cL kΣkop kΣ n n n n ! r r Re(Σ) _ log(p) ≤ cL kΣkop , n n where we used (18) in the second line. imsart-aos ver. 2014/10/16 file: SupplementtosubmissionPC.2018-29MARCH.tex date: April 15, 2018 17 SUPPLEMENT TO: VARIABLE CLUSTERING b − Γkop = |Γ b − Γ|∞ and Proposition 8 of the main text [2], together with Then, using that kΓ |Γ|∞ ≤ kΣkop (Lemma 9 above), we obtain the inequality ! r r _ log(p) Re(Σ) e − AC ∗ At kop ≤ cL kΣkop (21) kΣ , n n with probability at least 1 − c/p. So combining (19), with (20) and (21) we obtain the existence of c0η > 0 such that we have L̄(ĜS , G) ≤ r c0η,L KkΣk2op m2 λK (C ∗ )2 Re(Σ) _ n r log(p) n !2 , with probability at least 1 − c/p, whenever the right-hand side is smaller than 1. The proof of Proposition 5 follows. Proof of Lemma 2. We recall that Vb is the p × K matrix stacking the K leading eigenvectors b We first prove that the matrix Vb Vb t is solution of the SDP in Lemma 2. of Σ. b = Ve D e Ve t for a diagonalisation of Σ b with Ve orthogonal and D e 11 ≥ . . . ≥ D e pp ≥ 0. Let us write Σ b Bi = hD, e Ve t B Ve i, and that B ∈ C iff Ve t B Ve ∈ C since the matrix B e = Ve t B Ve We observe that hΣ, t t has the same eigenvalues as B. We observe also that Vb Vb = Ve ΠK Ve , where ΠK is the diagonal matrix, with 1 on the first K diagonal elements and 0 on the p − K remaining ones. So proving that B = Vb Vb t is solution of the SDP in Lemma 2 is equivalent to proving that e Bi. e ΠK = argmaxhD, e B∈C Let us prove this result. To start with, we notice that K X k=1 e kk = D max P ekk ≤1; 0≤B k ekk =K B e Bi. e hD, ekk ≤ 1; e < 0 enforces 0 ≤ B ekk ≤ 1, we have C ⊂ {B : 0 ≤ B Since the condition I < B and then K X e Bi e ≤ e kk = hD, e ΠK i. maxhD, D e B∈C P e k Bkk = K} k=1 Hence ΠK is solution to the above maximisation problem and B = Ve ΠK Ve t = Vb Vb t . To conclude the proof, we notice that Vba: Vb t is an orthogonal transformation of Vba: , so we obtain the same results when applying a rotationally invariant clustering algorithm to the rows of Vb and to the rows of Vb Vb t . Proof of Lemma 9. We claim that, for each group Gk , there is at most one negative value Γaa with a ∈ Gk . When it exists, this negative value also satisfies |Γaa | ≤ minb∈Gk \{a} Γbb . Indeed, take any a, b ∈ Gk such that Γaa < 0 (if it exists). Then, the corresponding 2 × 2 submatrix of Σ     Σaa Σab Ckk − |Γaa | Ckk = Σba Σbb Ckk Ckk + Γbb is positive semi-definite, which enforces Γbb ≥ |Γaa |. imsart-aos ver. 2014/10/16 file: SupplementtosubmissionPC.2018-29MARCH.tex date: April 15, 2018 18 F. BUNEA, C. GIRAUD, M. ROYER, X. LUO AND N. VERZELEN Let us now prove the first result of the lemma. Since At A = mI, we haveP kΣkop ≥ kAt ΣAkop /m = kmC + At ΓA/mkop . Since At ΓA/m is a diagonal matrix with entries a∈Gk Γaa /|Gk |, for k = 1, . . . , K, we finally have kΣkop ≥ mkC ∗ kop + min k X a∈Gk 1 Γaa ≥ mkC ∗ kop , |Gk | where the second inequality is a consequence of the above claim. As for the second result, we observe ∗ that |Γ|∞ is achieved by some Γaa > 0. Then, kΣkop ≥ Ck(a)k(a) + Γaa ≥ |Γ|∞ since Condition (29) of Proposition 5 of the main text [2] enforces that C is positive. 6. Deviation inequalities. The following lemma provides deviation inequalities for quadratic form of Sub-Gaussian and Bernstein-type random variables that we used in the proofs presented above and in the main text [2]. For the first inequality we use [8], whereas the second one is proved in [1]. Lemma 10 (Hanson-Wright Inequalities). There exists two positive constants c and c0 such that the following holds for all n × n matrices A. Let ξ = (ξ1 , ξ2 , . . . , ξn )t denote a vector of independent zero-mean random variables with respectives variances σ12 , . . . , σn2 . (i) Assume that all variables ξi follow sub-Gaussian distributions with maxi=1,...,n kξi kψ2 ≤ L for some L > 0. Then, for all t > 0 h √ i (22) P ξ t Aξ − E[ξ t Aξ] > cL2 kAk2 t + ckAkop t ≤ e−t . (ii) Assume that, for some M > 0, ξ satisfies maxi=1,...,n |ξi | ≤ M almost surely. Then, for all t>0 h √ i (23) P ξ t Aξ − E[ξ t Aξ] > c0 M kADσ k2 t + cM 2 kAkop t ≤ e−t , where Dσ = Diag(σ1 , . . . , σn ). The following corollary will be useful for controlling cross-products of random variables. Corollary 1. Let X denotes the observation matrix and let u, v be two p-dimensional vectors. Under Assumption 1, for any t > 0, with probability at least 1 − 4e−t , we have ! r √ 1 t t (24) hXu, Xvi − ut Σv ≤ cL2 ut Σu v t Σv + . n n n Proof of Corollary 1. Let us set α = (v t Σv/ut Σu)1/4 . We first observe that hXu, Xvi =  1 kαXu + α−1 Xvk2 − kαXu − α−1 Xvk2 . 4 Since for any w ∈ Rp , we have kX t wkψ2 ≤ L(wt Σw)1/2 , Hanson-Wright inequality gives that with probability at least 1 − 4e−t , we have both √   |kαXu + α−1 Xvk2 − E kαXu + α−1 Xvk2 | ≤ cL2 (αu + α−1 v)t Σ(αu + α−1 v)( nt + t) √   |kαXu − α−1 Xvk2 − E kαXu − α−1 Xvk2 | ≤ cL2 (αu − α−1 v)t Σ(αu − α−1 v)( nt + t). imsart-aos ver. 2014/10/16 file: SupplementtosubmissionPC.2018-29MARCH.tex date: April 15, 2018 SUPPLEMENT TO: VARIABLE CLUSTERING 19 Combining the two bounds, we get  p 1 1 hXu, Xvi − ut Σv ≤ cL2 α2 ut Σu + α−2 v t Σv ( t/n + t/n). n 2 Replacing α2 by its value α2 = (v t Σv/ut Σu)1/2 , we get the desired result. We have a similar result under Assumption 1-bis. Lemma 11. Let X denotes the observation matrix and let u, v be two p-dimensional vectors. Under Assumption 1-bis, for any t > 0, with probability at least 1 − 2e−t , we have    r t  √ √ 1 t (25) hXu, Xvi − ut Σv ≤ 2M |v|1 ut Σu ∧ |u|1 v t Σv + 3M 2 |u|1 |v|1 . n n n Proof of Lemma 11. The variable Zi = (Xit u)(Xit v) − ut Σv fulfills |Zi | ≤ B = 2M 2 |v|1 |u|1 and h   2 i E Zi2 ≤ E Xit u Xit v ≤ M 2 min(|u|21 v t Σv, |v|21 ut Σu). The inequality (25) then simply follows from Bernstein inequality. The two following lemmas control the behavior of empirical covariance matrices both under subGaussian and Bernstein-type distributional assumptions. The first one follows from [4, 10], whereas the second one can be found in the expository paper [9]. Lemma 12. Consider a zero mean random vector Y of size p and invertible covariance matrix Σ. Assume that, for some L > 0, kΣ−1/2 Y kψ2 ≤ L. Then, for some constant cL > 0, the following b = Pn Yi Y t /n satisfies holds. Given a n-sample (Y1 , . . . , Yn ), the empirical covariance matrix Σ i i=1 the following deviation inequality " # r hr p i p t t b − Σkop > cL kΣkop P kΣ ≤ e−t , + + + n n n n for any t > 0. Lemma 13 (Matrix Bernstein Inequality). Consider a zero mean random vector Y of size p and covariance matrix Σ. Assume that, for some M > 0, maxi=1,...,p |Yi | ≤ M almost surely. Given b = Pn Yi Y t /n satisfies the following a n-sample (Y1 , . . . , Yn ), the empirical covariance matrix Σ i i=1 deviation inequality r h i 2 b − Σkop > M 2 pkΣkop (t + log(2p)) + 4pM (t + log(2p)) ≤ e−t , P kΣ n 3n for any t > 0. 7. Additional Simulation Results. Our work is devoted to exact cluster recovery. For completeness, we also assess the performance of our methods in terms of partial cluster recovery, and compare them with existing procedures. We employ the commonly used Adjusted Rand Index (ARI) to compare different methods. The largest ARI value is 1 when the recovered clusters match the truth exactly. The simulated data are the same as those illustrated in Figure 1 and 2 in the main text. Figure 1 compares the average ARI values under different simulation settings. Our methods, COD, COD-cc, and PECOK, have their ARI measures close to 1 across all simulation settings, outperforming all other methods. Their performance also increases with n as predicted by our theory, while all other competing methods have flat ARI measures even if n increases. Under varying m, PECOK yields close to 1 ARI values for small n = 60, 80, 100, 150. imsart-aos ver. 2014/10/16 file: SupplementtosubmissionPC.2018-29MARCH.tex date: April 15, 2018 20 F. BUNEA, C. GIRAUD, M. ROYER, X. LUO AND N. VERZELEN Figure 1: (a)-(d) Average ARI values by K-means (K-Oracle, medium green lines, triangle points), HC (H-Oracle, light blue lines, cross points), spectral clustering (S-Oracle, light yellow lines, up-sidedown triangle points), COD (dark red lines, circle points), COD-cc (light orange lines, plus points), PECOK (light pink lines, diamond points). (e) The parameter K in K-means and Γ-uncorrected PECOK (UP-Oracle, navy blue lines, square points) are set to the true K while PECOK selects K based on our CV criterion. (f) Average ARI values of PECOK are shown under varying m. ● (b) M2 ● ● 1.0 1.0 (a) M1 ● ● ● ● ● ● ● 0.8 0.6 ARI COD COD−cc PECOK K−Oracle H−Oracle S−Oracle p=200 p=1600 ● 0.0 0.0 0.2 0.4 ● 0.4 0.6 COD COD−cc PECOK K−Oracle H−Oracle S−Oracle p=200 p=1600 ● 0.2 ARI 0.8 ● 400 600 800 200 400 600 n n (c) M1S (d) M1P ● ● ● ● 1.0 1.0 200 ● ● 800 ● ● ● ● 0.6 0.4 ARI 0.8 200 400 600 800 200 400 600 (e) With/without correcting for Γ (f) Varying m 800 0.8 0.6 ARI 0.4 PECOK UP−Oracle K−Oracle 0.4 0.6 0.8 1.0 n 1.0 n 0.2 m=50 m=20 0.0 0.2 PECOK 0.0 ARI COD COD−cc PECOK K−Oracle H−Oracle S−Oracle p=200 p=1600 ● 0.0 0.0 COD COD−cc PECOK K−Oracle H−Oracle S−Oracle p=200 p=1600 ● 0.2 0.6 0.4 ● 0.2 ARI 0.8 ● 200 400 600 n 800 60 80 100 120 140 n imsart-aos ver. 2014/10/16 file: SupplementtosubmissionPC.2018-29MARCH.tex date: April 15, 2018 SUPPLEMENT TO: VARIABLE CLUSTERING 21 8. Supplemental Materials for the fMRI Example. Preprocessing. We applied the preprocessing steps suggested by [11], which includes slice timing correction, alignment, registration, normalization to the average 152 T1 MNI template, smoothing with a 5mm full-width-half-maximum Gaussian kernel, denoising using the FSL MELODIC procedure, and a high pass filter with a 66s cut-off. The event-related activation and temporal correlation were removed using general linear models (GLM) for each voxel [3]. Following [7], we extract 180 mean activities within a 10mm spheres centered around each of 264 putative functional areas (see Table S2 from [7]). References. [1] Pierre C Bellec. Concentration of quadratic forms under a bernstein moment assumption. [2] F. Bunea, C. Giraud, X. Luo, M. Royer, and N. Verzelen. Model assisted variable clustering: minimax-optimal recovery and algorithms. Preprint, 2018. [3] Karl J Friston, Andrew P Holmes, Keith J Worsley, J-P Poline, Chris D Frith, and Richard SJ Frackowiak. Statistical parametric maps in functional imaging: a general linear approach. Human brain mapping, 2(4):189– 210, 1994. [4] Vladimir Koltchinskii and Karim Lounici. Concentration inequalities and moment bounds for sample covariance operators. Bernoulli, to appear. [5] Jing Lei and Alessandro Rinaldo. Consistency of spectral clustering in stochastic block models. Ann. Statist., 43(1):215–237, 2015. [6] Pascal Massart. Concentration inequalities and model selection, volume 1896 of Lecture Notes in Mathematics. Springer, Berlin, 2007. Lectures from the 33rd Summer School on Probability Theory held in Saint-Flour, July 6–23, 2003, With a foreword by Jean Picard. [7] Jonathan D Power, Alexander L Cohen, Steven M Nelson, Gagan S Wig, Kelly Anne Barnes, Jessica A Church, Alecia C Vogel, Timothy O Laumann, Fran M Miezin, Bradley L Schlaggar, et al. Functional network organization of the human brain. Neuron, 72(4):665–678, 2011. [8] Mark Rudelson and Roman Vershynin. Hanson-wright inequality and sub-gaussian concentration. Electron. Commun. Probab, 18(82):1–9, 2013. [9] J. A. Tropp. An Introduction to Matrix Concentration Inequalities. ArXiv e-prints, January 2015. [10] Roman Vershynin. Introduction to the non-asymptotic analysis of random matrices. arXiv preprint arXiv:1011.3027, 2010. [11] Gui Xue, Adam R Aron, and Russell A Poldrack. Common neural substrates for inhibition of spoken and manual responses. Cerebral Cortex, 18(8):1923–1932, 2008. Department of Statistical Science Cornell University Ithaca, NY 14853-2601, USA E-mail: [email protected] Department of Biostatistics and Center for Statistical Science Brown University Providence, RI 02912, USA E-mail: [email protected] Département de Mathématiques Université Paris-Sud F-91405 Orsay Cedex, France E-mail: [email protected] Laboratoire de Mathématiques d’Orsay Université Paris-Sud F-91405 Orsay Cedex, France E-mail: [email protected] INRA UMR 729 MISTEA, F-34060 Montpellier, FRANCE E-mail: [email protected] imsart-aos ver. 2014/10/16 file: SupplementtosubmissionPC.2018-29MARCH.tex date: April 15, 2018
10math.ST
Approximate Modularity Revisited arXiv:1612.02034v1 [cs.DS] 6 Dec 2016 Uriel Feige∗, Michal Feldman†, Inbal Talgam-Cohen‡ Abstract Set functions with convenient properties (such as submodularity) appear in application areas of current interest, such as algorithmic game theory, and allow for improved optimization algorithms. It is natural to ask (e.g., in the context of data driven optimization) how robust such properties are, and whether small deviations from them can be tolerated. We consider two such questions in the important special case of linear set functions. One question that we address is whether any set function that approximately satisfies the modularity equation (linear functions satisfy the modularity equation exactly) is close to a linear function. The answer to this is positive (in a precise formal sense) as shown by Kalton and Roberts [1983] (and further improved by Bondarenko, Prymak, and Radchenko [2013]). We revisit their proof idea that is based on expander graphs, and provide significantly stronger upper bounds by combining it with new techniques. Furthermore, we provide improved lower bounds for this problem. Another question that we address is that of how to learn a linear function h that is close to an approximately linear function f , while querying the value of f on only a small number of sets. We present a deterministic algorithm that makes only linearly many (in the number of items) nonadaptive queries, by this improving over a previous algorithm of Chierichetti, Das, Dasgupta and Kumar [2015] that is randomized and makes more than a quadratic number of queries. Our learning algorithm is based on a Hadamard transform. ∗ Department of Computer Science, Weizmann Institute of Science, and Microsoft Research, Israel School of Computer Science, Tel-Aviv University, and Microsoft Research, Israel ‡ School of Computer Science, Hebrew and Tel-Aviv Universities, Israel † 1 Introduction A set function f over a universe U of n items assigns a real value f (S) to every subset S ⊆ U (including the empty set ∅). Equivalently, it is a function whose domain is the Boolean ndimensional cube {0, 1}n , where each coordinate corresponds to an item, and a vector in {0, 1}n corresponds to the indicator vector of a set. Set functions appear in numerous applications, some of which are briefly mentioned in Section 1.2. Though set functions are defined over domains of size 2n , one is often interested in optimizing over them in time polynomial in n. This offers several challenges, not least of which is the issue of representing f . An explicit representation of the truth table of f is of exponential size, and hence other representations are sought. Some classes of set functions have convenient structure that leads to a polynomial size representation, from which the value of every set can easily be computed. A prime example for this is the class of linear functions. Formally, a set P function f is linear if there exist constants c0 , c1 , . . . , cn such that for every set S, f (S) = c0 + i∈S ci . The constants (c0 , c1 , . . . , cn ) may serve as a polynomial size representation of f . More generally, for set functions that arise naturally, one typically assumes that there is a so called value oracle, such that for every set S one can query the oracle on S and receive f (S) in reply (either in unit time, or in polynomial time, depending on the context). The value oracle serves as an abstraction of either having some explicit polynomial time representation (e.g., a Boolean circuit) from which the value of f on any given input can be computed, or (in cases in which set functions model some physical reality) having a physical process of evaluating f on the set S (e.g., by making a measurement). Optimizing over general set functions (e.g., finding the maximum, the minimum, maximizing subject to size constraints, etc.) is a difficult task, requiring exponentially many value queries if only a value oracle is given, and NP-hard if an explicit representation is given. However, for some special classes of set functions various optimization problems can be solved in polynomial time and with only polynomially many value queries. Notable nontrivial examples are minimization of submodular set functions [Schrijver, 2000; Iwata et al., 2001], and welfare maximization when the valuation function of each agent satisfies the gross substitutes property (see, e.g., [Paes Leme, 2014]). For the class of linear set functions, many optimization problems of interest can be solved in polynomial time, often by trivial algorithms. A major concern regarding the positive algorithmic results for some nice classes of set functions is their stability. Namely, if f is not a member of that nice class, but rather is only close to being a member (under some natural notion of closeness), is optimizing over f still easy? Can one obtain solutions that are “close” to optimal? Or are the algorithmic results “unstable” in the sense that a small divergence from the nice class leads to dramatic deterioration in the performance of the associated algorithms? A complicating factor is that there is more than one way of defining closeness. For example, when considering two functions, one may consider the variational distance between them, the mean square distance, the Hamming distance, and more. The situation becomes even more complicated when one wishes to define how close f is to a given class C of nice functions (rather than to a particular function). One natural definition is in terms of a distance to the function g ∈ C closest to f . But other definitions make sense as well, especially if the class C is defined in terms of properties that functions in C have. For example, the distance from being submodular can be measured also by the extent to which the submodularity condition f (S)+f (T ) ≥ f (S ∪T )+f (S ∩T ) might be violated by f (as in Lehmann et al. [2006]; Krause and Cevher [2010]), or even by the so called supermodular degree [Feige and Izsak, 2013]. Following the lead of Chierichetti, Das, Dasgupta, and Kumar [2015], the goal of this work is to study questions such as the above in a setting that is relatively simple, yet important, namely, that 1 of linear set functions. As illustrated by the work of Chierichetti et al. [2015], even this relatively simple setting is challenging. 1.1 Our results and techniques Kalton constants One question that we address is the relation between two natural notions of being close to a linear function. The first notion is that of being close point-wise in an additive sense. We say that f is ∆-linear if there is a linear set function g such that |f (S) − g(S)| ≤ ∆ for every set S. Under this notion, the smaller ∆ is, the closer we consider f to being linear. The other notion of closeness concerns a different but equivalent definition of linear functions, namely, as those functions that satisfy the modular equation f (S) + f (T ) = f (S ∪ T ) + f (S ∩ T ) for every two sets S and T . This form of defining linear functions is the key to generalizing linear functions to other classes of functions of interest, and specifically to submodular functions that satisfy f (S) + f (T ) ≥ f (S ∪ T ) + f (S ∩ T ), and are considered to be the discrete analog of convex functions. We say that f is ǫ-modular if |f (S) + f (T ) − f (S ∪ T ) − f (S ∩ T )| ≤ ǫ for every two sets S and T . We say that f is weakly ǫ-modular if the last inequality holds for every two disjoint sets S and T . The smaller ǫ is, the closer we consider f to being linear (or equivalently, to being modular). It can easily be shown that every ∆-linear function is ǫ-modular for ǫ ≤ 4∆. Establishing a reverse implication is more difficult. In Chierichetti et al. [2015] it was shown that every ǫ-modular function is ∆-linear for ∆ = O(ǫ log n). However, the authors of Chierichetti et al. [2015] were not aware of earlier work of Kalton and Roberts [1983], which already showed that ∆ ≤ O(ǫ) (this work was brought to our attention by Assaf Naor). We shall use Ks to denote the smallest constant such that every ǫ-modular function is Ks ǫ-linear, and refer to Ks as the strong Kalton constant. The bound provided in Kalton and Roberts [1983] was Ks ≤ 89 2 , and this was subsequently improved by Bondarenko, Prymak, and Radchenko Bondarenko et al. [2013] to Ks ≤ 35.8. The approach initiated by Kalton and Roberts (and used almost as a blackbox in Bondarenko et al. [2013]) makes essential use of expander graphs in deriving upper bounds on Ks . We revisit this approach, simplify it and add to it new ingredients. Technically, the advantage that we get by our new ingredients is that we can use bipartite graphs in which only small sets of vertices expand, whereas previous work needed to use bipartite graphs in which large sets expand. This allows us to use expanders with much better parameters, leading to substantially improved upper bounds on Ks . For concreteness, we prove in this paper the following upper bound. Theorem 1.1 (Upper bound, strong Kalton). Every ǫ-modular function is ∆-linear for ∆ < 12.65ǫ. Hence Ks < 12.65. We remark that our technique for upper bounding Ks adds a lot of versatility to the expander approach, which is not exploited to its limit in the current version of the paper: the upper bound that we report strikes a balance between simplicity of the proof and quality of the upper bound. Directions for further improvements are discussed in Appendix B.4. Obtaining good lower bounds on Ks is also not easy. Part of the difficulty is that even if one comes up with a function f that is a candidate for a lower bound, verifying that it is ǫ-modular involves checking roughly 22n approximate modularity equations (one equation for every pair S and T of sets), making a computer assisted search for good lower bounds impractical. For set functions over 4 items, we could verify that the worst possible constant is 1/2. Checking ǫ-modularity is much easier for symmetric functions (for which the value of a set depends only on its size), but we show that for such functions Ks = 21 (this is also the case for ǫ-modular functions that are submodular, as shown in Appendix A.2. The only lower bound on Ks that we could find in previous work is Ks ≥ 34 , 2 implicit in work of Pawlik [1987]. We consider a class of functions that enjoys many symmetries (we call such functions (k, M )-symmetric), and for some function in this class we provide the following lower bound. Theorem 1.2 (Lower bound, strong Kalton). There is an integer valued set function over 70 items that is 2-modular and tightly 2-linear. Hence Ks ≥ 1. In addition, we shall use Kw to denote the smallest constant such that every weakly ǫ-modular function is Kw ǫ-linear, and refer to Kw as the weak Kalton constant. For the weak Kalton constant we prove the following theorem. Theorem 1.3 (Upper and lower bounds, weak Kalton). Every weakly ǫ-modular function is ∆linear for ∆ < 24ǫ. Hence Kw < 24. Moreover, there is an integer valued set function over 20 items that is weakly 2-modular and 3-linear. Hence Kw ≥ 3/2. Learning algorithms Another part of our work concerns the following setting. Suppose that one is given access to a value oracle for a function f that is ∆-linear. In such a setting, it is desirable to obtain an explicit representation for some linear function h that is close to f , because using such an h one can approximately solve optimization problems on f by solving them exactly on h. The process of learning h involves two complexity parameters, namely the number of queries made to the value oracle for f , and the computation time of the learning procedure, and its quality can be measured by the distance d(h, f ) = maxS {|h(S) − f (S)|} of h from f . It was shown in Chierichetti et al. [2015] that for every learning algorithm that makes only polynomially many √ value queries, there will be cases in which d(h, f ) ≥ Ω(∆ n/ log n). This might sound discouraging √ but it need not be. One reason is that in many cases ∆ < log n/ n. For example, this may be the case when f itself is actually linear, but is modeled as ∆-linear due to noise in measurements of values of f . By investing more in the measurements, ∆ can be decreased. Another reason is that the lower bounds are for worst case f , and it is still of interest to design natural learning algorithms that might work well in practice. Indeed, Chierichetti et al. [2015] designed a randomized learning √ algorithm that makes O(n2 log n) nonadaptive queries and learns h within distance O(∆ n) from f . We improve upon this result in two respects, one being reducing the number of queries, and the other being removing the need for randomization. Theorem 1.4 (Learning algorithm). There is a deterministic polynomial time learning algorithm that given value oracle access to a ∆-linear function on n items, makes p O(n) nonadaptive value queries and outputs a linear function h, such that h(S) is O(∆(1 + min{|S|, n − |S|}))-close to f (S) for every set S. The learning algorithm is based on the Hadamard basis, i.e., an orthogonal basis of Rn consisting of vectors with ±1 entries, which can be constructed for every n that is a power of 2. The Hadamard basis has the following property: for every two linear functions that are O(∆)close on the basis vectors (where each basis vector can be interpreted as a difference between two sets, one p corresponding to its +1 indices, the other to its −1 indices), the linear functions are O(∆(1 + min{|S|, n − |S|}))-close on every set S. (This property follows from the vectors having large norms, and thus a large normalization factor by which the distance of ∆ is divided.) Given O(n) value queries to a ∆-linear function f , an algorithm can learn the values of the linear function g that is ∆-close to f for the n Hadamard basis vectors, up to an additive error of O(∆). This is p enough information to construct a linear function h that is O(∆(1 + min{|S|, n − |S|}))-close to g(S), and thus to f (S), for every set S. 3 1.2 Additional Related Work The stability of linearity and the connection between approximate modularity and approximate linearity, which we study on the discrete hypercube, have been extensively studied in mathematics on continuous domains (e.g., Banach spaces). An early example is [Hyers, 1941], and this result together with its extensions to other classes of functions are known as the Hyers-Ulam-Rassias theory [Jung, 2011]. Our work is related to the literature on data-driven optimization (see, e.g., [Bertsimas and Thiele, 2014; Singer and Vondrák, 2015; Hassidim and Singer, 2016; Balkanski et al., 2016]). This literature studies scenarios in which one wishes to optimize some objective function, whose parameters are derived from real-world data and so can be only approximately evaluated. Such scenarios arise in applications like machine learning [Krause et al., 2008], sublinear algorithms and property testing [Blum et al., 1993], and algorithmic game theory [Lehmann et al., 2006]. This motivates the study of optimization of functions that satisfy some properties only approximately (e.g., submodularity [Krause and Cevher, 2010], gross substitutes [Roughgarden et al., 2016], or convexity [Belloni et al., 2015]). Our work is related to this strand of works in that we are also interested in functions that satisfy some property (modularity in our case) approximately, but unlike the aforementioned works, we are interested in the characterization and learning of functions, not in their optimization. Learning of (exactly) submodular functions was studied by [Balcan and Harvey, 2011] and [Goemans et al., 2009], in the PMAC model and general query model, respectively. We shall discuss learning of approximately modular functions in a value query model. Organization In Section 2 we present preliminaries. Section 3 shows improved upper bounds on the weak and strong Kalton constants, and Section 4 shows improved lower bounds on the weak and strong Kalton constants. Section 5 describes how to learn an approximately linear function from an approximately modular one. 2 2.1 Preliminaries Approximate Modularity and Linearity Let U = {1, . . . , n} be a ground set of n ≥ 2 items (also called elements). For every set S ⊆ U of items, let S̄ denote its complement U \ S. A collection G is a multiset of sets, and its complement Ḡ is the collection of complements of the sets in G. Given a set function f : 2U → R, the value of set S is f (S). Throughout we focus on additive closeness, and say that two values x, y ∈ R are ∆-close (or equivalently, that x is ∆-close to y) if |x − y| ≤ ∆. A set function f is ǫ-modular if for every two sets S, T ⊆ U , |f (S) + f (T ) − f (S ∪ T ) − f (S ∩ T )| ≤ ǫ. (1) If ǫ = 0 then f is modular. A set function f is weakly ǫ-modular if Condition (1) holds for every two disjoint sets S, T ⊆ U . The following proposition (proved in Appendix A) shows the relation: Proposition 2.1. Every weakly ǫ-modular set function is a 2ǫ-modular set function. Observation 2.2 (Approximate modularity for ≥ 2 sets). Let f be a weakly ǫ-modular set function, and let S ⊆ U be a set of items with a partition (S1 , . . . , Ss ) (i.e., the disjoint union S1 ⊎ · · · ⊎ Ss is equal to S). By iterative applications of weak ǫ-modularity, f (S) + (s − 1)(f (∅) − ǫ) ≤ f (S1 ) + · · · + f (Ss ) ≤ f (S) + (s − 1)(f (∅) + ǫ). 4 AP set function f is linear if there exist constants c0 , c1 , . . . , cn such that for every set S, f (S) = c0 + i∈S ci . A linear set function is additive if c0 = 0. The zero function has ci = 0 for every 0 ≤ i ≤ n. A set function f is ∆-linear if there exists a linear set function ℓ that is ∆-close to f , i.e., f (S) and ℓ(S) are ∆-close for every set S. We say that a set function f is tightly ∆-linear if it is ∆-linear and for every ∆′ < ∆, f is not ∆′ -linear. A closest linear function to f is a linear set function ℓ that is ∆-close to f where f is tightly ∆-linear. The proofs of the following propositions appear in Appendix A. Proposition 2.3 (Modularity = linearity). A set function is modular if and only if it is linear. Proposition 2.4. Every ∆-linear set function is 4∆-modular. This result is tight, even for symmetric functions. We shall often refer to set functions whose closest linear function is the zero function. Observation 2.5 (Chierichetti et al. [2015]). For every ǫ-modular (resp., weakly ǫ-modular) set function f that is tightly ∆-linear, there is an ǫ-modular (resp., weakly ǫ-modular) set function f ′ that is tightly ∆-linear and whose closest linear function is the zero function. The function f ′ can be defined as follows: if ℓ is a closest linear function to f then f ′ (S) = f (S) − ℓ(S) for every set S. 2.2 Kalton Constants Let Kw denote the smallest constant such that every weakly ǫ-modular set function is Kw ǫ-linear. Let Ks denote the smallest constant such that every ǫ-modular set function is Ks ǫ-linear. Notice that Ks ≤ Kw . We refer to Kw as the weak Kalton constant (the possibility that there is such a constant Kw independent of n was advocated in the works of Nigel Kalton), and to Ks as the strong Kalton constant. Formally: Definition 2.6. Ks ∈ R≥0 (resp., Kw ∈ R≥0 ) is the strong (weak) Kalton constant if: • for every n ∈ N≥0 , ǫ ∈ R≥0 , every (weakly) ǫ-modular set function over [n] is Ks ǫ-linear (Kw ǫ-linear); and • for every κ < Ks (κ < Kw ) and for every ǫ ∈ R≥0 , there exists a sufficiently large n and a (weakly) ǫ-modular set function f over [n] such that f is not κǫ-linear (it is sufficient that there exist a (weakly) ǫ-modular set function that is tightly Ks ǫ-linear (Kw ǫ-linear)). The propositions in Section 2.1 imply the following corollaries on Kalton constants. Corollary 2.7 (of Proposition 2.1). Kw /2 ≤ Ks ≤ Kw . Corollary 2.8 (of Observation 2.5). If Ks is the strong Kalton constant for set functions whose closest linear function is the zero function, then Ks is the strong Kalton constant (for general set functions). Similarly, if Kw is the weak Kalton constant for set functions whose closest linear function is the zero function, then Kw is the weak Kalton constant (for general set functions). 2.2.1 Kalton Constants for Symmetric Set Functions The analysis of Kalton constants becomes much easier in special cases. Here we give tight bounds on Ks for symmetric set functions. A set function f is symmetric if for every two sets S and T , |S| = |T | =⇒ f (S) = f (T ). A symmetric set function over [n] can be represented as a function over integers f : {0, . . . , n} → R. The following example shows that Ks ≥ 1/2 for symmetric set functions, and Proposition 2.10 shows this is tight. 5 Example 2.9. For every n ∈ N≥0 , consider the symmetric set function fn over [n] where fn ([n]) = −ǫ and fn (S) = 0 for every other set S. Let gδ be a symmetric linear set function over [n] such ǫ that gδ ({j}) = − ǫj n + δ for every 0 ≤ j ≤ n. Observe that gδ is max{δ, ǫ − n − δ}-close to fn . ǫ ǫ When δ = 2 − 2n , the distance is minimized and gδ is a closest linear function to fn . Thus fn is tightly δ-linear. This shows that for every κ < 1/2, there exists n such that fn is tightly δ-linear ǫ for δ = 2ǫ − 2n > κǫ. Proposition 2.10. The strong Kalton constant for symmetric set functions is Ks = 12 . Proof. Let f be a symmetric ǫ-modular set function, we argue that f must be 12 ǫ-linear. By Observation A.1 we can assume without loss of generality that f ’s closest linear function is the zero function. Let M be the maximum absolute value of f , then there exist k1 < k < k2 such that either f (k1 ) = f (k2 ) = −M and f (k) = M , or f (k1 ) = f (k2 ) = M and f (k) = −M . Without loss of generality assume the former. Suppose that k ≥ n/2. Using ǫ-modularity we get that 2f (k) ≤ f (k2 ) + f (2k − k2 ) + ǫ ≤ −M + M + ǫ. On the other hand, 2f (k) = 2M . We get 2M ≤ −M + M + ǫ, implying that M ≤ ǫ/2, as desired. If k < n/2, an analogous argument is invoked using k1 .  2.3 2.3.1 Results from the Literature Upper and Lower Bounds Kalton and Roberts [1983] prove that Kw ≤ 89 2 . This upper bound was subsequently improved to Kw ≤ 38.8 by Bondarenko et al. [2013], who also show that Ks ≤ 35.8. Let us provide more details on how the known upper bounds on Kw are achieved. Definition 2.11 (Expander). For k ∈ N≥0 and α, r, θ ∈ R≥0 such that α, θ < 1 and r > 2, we say that a bipartite graph Gk (V, W ; E) is an (α, r, θ)-expander if |V | = 2k, |W | = 2θk, |E| = 2kr, and every set S ⊂ V of at most 2kα vertices has at least |S| neighbors in W (and hence a perfect matching into W ). We say that (α, r, θ)-expanders exist if there is some k′ ∈ N≥0 such that for every integer multiple k of k′ , there exists an (α, r, θ)-expander Gk . The following theorem (rephrased from Kalton and Roberts [1983]) is the key to the known upper bounds on Kw . Theorem 2.12 (Kalton and Roberts [1983]). Suppose that for fixed r and θ and all sufficiently large k there are ( 21 , r, θ)-expanders {Gk }. Then an upper bound on the weak Kalton constant is: Kw ≤ 7 + 4r − 2θ . 2(1 − θ) Pippenger [1977] shows that ( 21 , r, θ)-expanders exist with r = 6 and θ = 32 , if k is sufficiently large (k ≥ 3). This together with Theorem 2.12 implies that Kw ≤ 89 2 . In Bondarenko et al. [2013] it is shown that r can be reduced to 5.05, thus leading to the improved bound of Kw ≤ 38.8. As for lower bounds, Pawlik [1987] gives a high-level sketch of a construction that shows the following for the weak Kalton constant. His construction implies also a lower bound for the strong Kalton constant, as follows (a detailed proof appears for completeness in Appendix A). Theorem 2.13 (Lower bound [Pawlik, 1987]). Lower bounds on the Kalton constants are Kw ≥ 3 3 2 − Θ(1/n) and Ks ≥ 4 − Θ(1/n). 6 2.3.2 A Characterization of Chierichetti et al. [2015] For a set function f , let M = maxS {|f (S)|} be the maximum absolute value of f (also called f ’s extreme value). We say that a set S has value M if f (S) = M , and value −M if f (S) = −M . Given a distribution (p1 , . . . , pκ ) over sets S1 , . . . , Sκ , the marginal probability of item i according to this distribution P is the probability that i appears in a set randomly selected according to the distribution, i.e., j|i∈Sj pj . Lemma 2.14 (Chierichetti et al. [2015]). The closest linear function to a set function f is the zero function if and only if there exist probability distributions P + and P − with rational probabilities over sets with value M and sets with value −M , respectively, such that for every item i, the marginal probabilities of i according to P + and P − are the same. Lemma 2.14 appears as Lemma 10 in Chierichetti et al. [2015]. The rationality of the probability distributions follows since they are obtained as solutions to a linear program. Definition 2.15 (Positive and Negative Supports). For a set function f whose closest linear set function is the zero function, let P + , P − be the distributions guaranteed by Lemma 2.14. Then the positive support PS = (P1 , . . . , Pκ ) of f is the support of P + (sets assigned a positive probability by P + ), and the negative support NS = (N1 , . . . , Nν ) of f is the support of P − . We emphasize that all sets in PS have value M and all sets in NS have value −M . 3 3.1 Improved Upper Bounds Our Approach Our main goal in this section is to provide improved upper bounds for the strong Kalton constant Ks , which was previously known to be ≤ 35.8 [Bondarenko et al., 2013]. Along the way we also provide an improved upper bound for the weak Kalton constant Kw , which was previously known to be ≤ 38.8 [Bondarenko et al., 2013]. Let us first review the known upper bounds on Kw and how they are derived. The basic approach of Kalton and Roberts [1983] is outlined in Theorem 2.12. There the value of Kw is related to parameters of ( 21 , r, θ)-expanders. Rearranging the bound from Theorem 2.12, denoting the denominator by D and the numerator by Nr + N1 where Nr depends on r and N1 does not, it is shown that: Nr + N1 Kw ≤ , D where D = 1 − θ, Nr = 2r and N1 = 27 − θ. Kalton and Roberts [1983] use a previously known expander construction of Pippenger [1977] to get an upper bound of 44.5. The improved upper bound of 38.8 of Bondarenko et al. [2013] comes from constructions of expanders with a smaller value of r. The value of r cannot be substantially reduced further (without changing θ), and so the approach of constructing better expanders is unlikely to significantly further reduce Kw . In Section 3.4 we improve upon the upper bound of 38.8 on Kw by reducing N1 from 27 − θ to 1 − 2 − θ, giving an upper bound of 26.8 using the expander construction of Bondarenko et al. [2013]. The key to this improvement is extracting the main idea from the proof of Kalton and Roberts [1983], cleaning away redundancies and using instead Lemma 3.6 (which establishes the existence of complementary collections with bounded deficit and surplus). It seems that the value of N1 cannot be substantially reduced further within this framework of ideas, and hence new ideas appear to be needed if one wishes to obtain significant improvements in the upper bound on Kw . In Appendix B.3 7 we upper-bound Kw using the minimum between two expressions rather than a bound of the form (Nr + N1 )/D, and show that Kw ≤ 23.82. In Section 3.5 we consider Ks , the strong Kalton constant. This places additional restrictions on f (ǫ-modularity instead of only weak ǫ-modularity). Indeed, these additional restrictions were used in Bondarenko et al. [2013] to reduce N1 from 27 − θ to 25 − θ, achieving an upper bound of 35.8 in the case of Ks . Our approach for improving Ks will make more extensive use of ǫ-modularity. Rather than considering sets from a collection with small deficit, we shall consider intersections of these sets. Using ǫ-modularity we shall be able to show that the function values of intersections are also close to M . In fact, using some averaging arguments we shall obtain even stronger estimates on how close these values are to M (a point that is relevant to controlling the value of N1 ). Thereafter, we will no longer be restricted to using (α, r, θ)-expanders with α = 12 . We will be able to use α = 14 instead (for intersections of two sets), or even α = 18 (for intersections of three sets), and so on. The advantage of reducing α is that for smaller values of α, expanders with lower values of r and θ exist, leading to better upper bounds on Ks . However, we cannot reduce α to arbitrarily small values because each reduction of α by a factor of two is accompanied by an increase in N1 , and one needs to balance between these two factors. 3.2 Upper Bounds Preliminaries We present definitions and preliminary results used to establish our upper bounds. Throughout, let f be a weakly ǫ-modular set function whose closest linear set function is the zero function. Observation 3.1. −ǫ ≤ f (∅) + f (U ) ≤ ǫ. The proof of Observation 3.1 appears in Appendix B. The following is a direct corollary of Observation 3.1 and weak ǫ-modularity: Corollary 3.2 (Value of complement set). Let δ = f (∅) + f (U ). Then for every set S, −f (S) − ǫ + δ ≤ f (S̄) ≤ −f (S) + ǫ + δ. Let M be the maximum absolute value of f . We say that a set S has deficit d ≥ 0 if f (S) = M −d, and has surplus s ≥ 0 if f (S) = −M +s. A collection has average deficit d (surplus s) if the expected deficit (surplus) of its sets with respect to the uniform distribution is d (s). The next observation follows directly from Corollary 3.2. Observation 3.3 (Average deficit/surplus of complement collection). Let δ = f (∅) + f (U ). Let G be a collection with average deficit d and surplus s. Then the average surplus of its complement Ḡ is at most d + ǫ + δ, and the average deficit of Ḡ is at most s + ǫ − δ. Definition 3.4. An item is α-frequent in a collection if it appears in exactly an α-fraction of the sets. A collection has α-frequent items if every item is α-frequent in it. Observation 3.5. The complement collection of a collection with α-frequent items has (1 − α)frequent items. Lemma 3.6 (Complementary collections with bounded deficit/surplus). There exists k′ ∈ N≥0 such that for every k which is an integer multiple of k′ , f has a collection PS∗ of 2k sets (the same set might appear multiple times in the collection and we treat these appearances as distinct) with 1/2-frequent items and average deficit d, whose complement collection NS∗ has 1/2-frequent items and average surplus s, and d + s ≤ ǫ. 8 Proof. Consider the positive and negative supports PS = {P1 , . . . , Pκ } and NS = {N1 , . . . , Nν } + of f , as defined in Definition 2.15. By Lemma 2.14, there exist distributions P + = (p+ 1 , . . . , pκ ) − − − and P = (p1 , . . . , pν ) with rational probabilities over PS and NS, whose marginals are equal for all items. Consider the complement collections PS and NS; let d′ be the average deficit of NS and let s′ be the average surplus of PS. Since the average deficit of PS and the average surplus of NS are 0, then by Corollary 3.3, d′ ≤ ǫ − δ and s′ ≤ ǫ + δ and so d′ + s′ ≤ 2ǫ. Towards constructing the collections PS∗ and NS∗ , consider the collections PS∪ NS and PS∪ NS of κ + ν sets each. We define a distribution Q over κ + ν sets, which can be associated with both 1 + 1 − 1 − PS ∪ NS and PS ∪ NS, to be Q = ( 12 p+ 1 , . . . , 2 pκ , 2 p1 , . . . , 2 pν ). This distribution has the following properties: • First, if sets are randomly drawn from PS ∪ NS according to this distribution, the probability of selecting a set with value M is at least 1/2, since the total weight on sets in PS is exactly 1/2. Similarly, the probability of selecting a set from PS ∪ NS with value −M when sampling according to Q is at least 1/2. • Second, for PS ∪ NS and for every item i, the probability of a set i P with 1item P selecting − 1 + + = p p (i.e., the marginal of i) is exactly 1/2, since it is equal to j|i∈N̄j 2 j j|i∈Pj 2 j P P 1 + 1 − 1 + , P − we have p + − p , and from the equality of the marginals of P j|i∈Pj 2 j 2 P Pj|i∈/ N̄j 2−j P − that j|i∈Pj p+ = j j|i∈Nj pj = j|i∈ / N̄j pj . The same holds for item marginals when the distribution is taken over PS ∪ NS. • Third, the probabilities of the distribution Q are all rational and strictly positive. By the third property, we can duplicate sets in PS ∪ NS and in PS ∪ NS to construct the collections PS∗ and NS∗ , such that sampling a set uniformly at random from PS∗ is equivalent to sampling a set according to Q from PS ∪ NS, and similarly for NS∗ and PS ∪ NS. By the first property, the average deficit of PS∗ is d ≤ d′ /2 and the average surplus of NS∗ is s ≤ s′ /2, and d + s ≤ ǫ. By the second property, every item must appear in exactly half the sets in PS∗ and half the sets in NS∗ , meaning that the number of sets in PS∗ and NS∗ is even, and we can denote it by 2k′ for some integer k′ > 0. We have thus shown the existence of a collection PS∗ and its complement NS∗ with k′ sets each whose average surplus and deficit guarantee d + s ≤ ǫ. Observe that existence of such collections of size k holds for every integer multiple k = ck ′ , since taking c copies of PS∗ and c copies of NS∗ satisfies all the conditions of the lemma.  3.3 Main Lemmas for Upper Bounds We present the two key lemmas used to establish our upper bounds. We begin with Lemma 3.7, which is a simplified version of Lemma 3.1 of Kalton and Roberts [1983]. Lemma 3.7 (Using expanders for set recombination). Let k ∈ N≥0 and α, r, θ ∈ R≥0 be such that there exists an (α, r, θ)-expander Gk . Consider a collection G of 2k sets with α-frequent items (referred to as the source sets). Then G has a refined partition into a total of 2kr subsets (referred to as the intermediate subsets), which can be recombined by disjoint unions into a collection of 2kθ sets with α/θ-frequent items (referred to as the target sets). Proof. Let Gk = Gk (V, W ; E). Align the 2k source sets with the 2k vertices of V in the (α, r, θ)expander Gk . Because every item appears in 2kα sets, then for every item i there are 2kα vertices in V corresponding to i (i.e., aligned with the source sets that contain i). By the expansion property 9 of Gk , for every item i there exists a perfect matching Mi between the vertices in V that correspond to i, and some 2kα vertices in W . We now use these matchings to label the edges: For every item i, add i to the labels of the matched edges in Mi . Every edge in E is now labeled by a subset of items (some labels may be the empty set). Let these labels be the intermediate subsets. Their total number is |E| = 2kr, as desired. For every vertex v ∈ V , the items of the source set Sv corresponding to v are partitioned among the edges leaving v, and hence the intermediate subsets indeed reflect a refined partitioning of the target sets. Observe that the edges entering a vertex w ∈ W are labeled by disjoint intermediate subsets (since for every item i, the edges labeled by subsets containing i form a matching). Let the set Sw corresponding to w be the disjoint union of the subsets labeling the edges adjacent to w. The sets corresponding to the vertices in W can thus be the target sets. Notice that by construction, every item i appears in the same number of source and target sets, so if the source sets have α-frequent items, the target sets have α/θ-frequent items, completing the proof.  Let f be a weakly ǫ-modular set function whose closest linear set function is the zero function. Let M be the absolute highest value of f . The following lemma upper-bounds M ; a more nuanced version appears as Lemma B.8 in Appendix B. Lemma 3.8. Let k ∈ N≥0 and α, r, θ ∈ R≥0 be such that there exists an (α, r, θ)-expander Gk . Let G and G ′ be collections of 2k sets each, both with α-frequent items, such that the average deficit of G is at most d and the average surplus of G ′ is at most s. Then M≤ 1 2 (d + s) + 2ǫ(r − 1) + ǫ. 1−θ Proof. We first apply Lemma 3.7 to partition and disjointly recombine the sets of collection G using the expander Gk = Gk (V, W ; E). We use the following notation: For a vertex v ∈ V (resp., w ∈ W ) let Sv (resp., Sw ) be the source (resp., target) set corresponding to v (resp., w). Denote the neighboring vertices of a vertex v by N (v) and its degree by deg(v). Let Sv,w be the intermediate subset that labels (corresponds to) edge (v, w) ∈ E. By Lemma 3.7, for every v ∈ V , the intermediate subsets labeling the edges adjacent to v are disjoint, and the same holds for every w ∈ W . We can thus apply Observation 2.2 to get P f (Sv,w ) ≥ f (Sv ) + (deg(v) − 1)(f (∅) − ǫ) for every v ∈ V. P w∈N (v) for every w ∈ W. v∈N (w) f (Sv,w ) ≤ f (Sw ) + (deg(w) − 1)(f (∅) + ǫ) Denote the maximum absolute value of f by M . Since collection P G has average deficit of at most d, by summing over vertices v ∈ V (where |V | = 2k) we get v∈V f (Sv ) ≥ 2k(M − d). Since the target sets of G have value at most M , by summing over vertices P P w ∈ W (where P |W | = 2θk) we get f (S ) ≤ 2θkM . Clearly in the bipartite graph G , deg(v) = w k w∈W v∈V w∈W deg(w), and by the parameters of Gk both are equal to 2kr. Therefore, summing over v ∈ V and w ∈ W we get X 2kM − 2kd + (2kr − 2k)(f (∅) − ǫ) ≤ f (Sv,w ) ≤ 2θkM + (2kr − 2θk)(f (∅) + ǫ). (v,w)∈E Dividing the resulting inequality by 2k and rearranging gives (1 − θ)M ≤ d + (r − 1)(ǫ − f (∅)) + (r − θ)(ǫ + f (∅)) = d + 2ǫ(r − 1) + (1 − θ)(ǫ + f (∅)). 10 (2) ′ Similarly, usingP that the average deficit of collection P G is at most s and the value of its target sets is at most M , v∈V f (Sv ) ≤ 2k(−M + s), and w∈W f (Sw ) ≥ −2θkM . Therefore X −2kM + 2ks + (2kr − 2k)(f (∅) + ǫ) ≥ f (Sv,w ) ≥ −2θkM + (2kr − 2θk)(f (∅) − ǫ). (v,w)∈E Dividing the resulting inequality by 2k and rearranging gives (1 − θ)M ≤ s + (r − 1)(ǫ + f (∅)) + (r − θ)(ǫ − f (∅)) = s + 2ǫ(r − 1) + (1 − θ)(ǫ − f (∅)). (3) Rearranging Inequalities (2) and (3) as well as averaging the resulting inequalities implies the theorem.  3.4 Upper-Bounding the Weak Kalton Constant Kw To upper bound Kw in this section and in Appendix B.3, we may focus without loss of generality on a weakly 1-modular set function f , whose closest linear set function is the zero function (Corollary 2.8). We show the following upper bound: Lemma 3.9 (Upper bound on Kw ). Suppose that for fixed r, θ ∈ R≥0 there exist ( 12 , r, θ)-expanders. Then the weak Kalton constant satisfies: Kw ≤ 2r− 12 −θ 1−θ . Proof. By Lemma 3.6, there exists k′ such that for every k that is a member of the arithmetic progression k′ , 2k′ , 3k′ , . . ., the function f has collections PS∗ and NS∗ of 2k sets with 21 -frequent items, and whose average deficit d and average surplus s, respectively, satisfy d + s ≤ 1. The assumption that ( 12 , r, θ)-expanders exist implies that there is another arithmetic progression k”, 2k”, 3k”, . . . such that for every k in this sequence an expander Gk with the above parameters exist. As the two arithmetic progressions must meet at k′ k”, there is a common k in both progressions. The upper bound follows from applying Lemma 3.8 to collections PS∗ , NS∗ to get Kw ≤ 1 +2r−2 2 1−θ + 1.  Theorem 3.10. The weak Kalton constant satisfies Kw ≤ 26.8. Proof. In Lemma 3.9, if we substitute r = 6 and θ = 23 (using the expanders from Pippenger [1977]), we get Kw ≤ 32.5. If we change to r = 5.05 by using the expanders from Bondarenko et al. [2013] we get Kw ≤ 26.8.  Using additional ideas, we further improve our upper bound on the weak Kalton constant by providing a stronger version of Lemma 3.8. Using the new ideas we show that the weak Kalton constant satisfies Kw ≤ 23.811, thus proving the upper bound of Theorem 1.3. The full proof is deferred to Appendix B.3. 3.5 Upper-Bounding the Strong Kalton Constant Ks As in the previous section, we focus here without loss of generality on a 1-modular set function f whose closest linear set function is the zero function, and on its collections PS∗ and NS∗ as defined in Lemma 3.6. Recall that d and s are the average deficit and surplus of PS∗ and NS∗ , respectively, and d + s ≤ 1. Denote the average deficit of an intersection of ℓ sets in PS∗ by dℓ and the average surplus of an intersection of ℓ sets in NS∗ by sℓ . 11 Lemma 3.11. For even ℓ, dℓ + sℓ ≤ 5ℓ 2 − 2. For odd ℓ, dℓ + sℓ ≤ 5(ℓ−1) 2 + 1. Proof. We first prove the following claim: d2 + s2 ≤ 3. To prove the claim, we begin with a simple observation: Recall that PS∗ and NS∗ are complements. For every P1 , P2 ∈ PS∗ whose complements are N1 , N2 ∈ NS∗ it holds that f (P1 ∪ P2 ) = f (P1 ∩ P2 ) = f (N1 ∩ N2 ) ≤ −f (N1 ∩ N2 ) + ǫ + δ (Corollary 3.2). Similarly, f (N1 ∪ N2 ) = f (N1 ∩ N2 ) = f (P1 ∩ P2 ) ≥ −f (P1 ∩ P2 ) − ǫ + δ. By 1-modularity we thus have f (P1 ∩ P2 ) ≥ f (P1 ) + f (P2 ) − f (P1 ∪ P2 ) − 1 ≥ f (P1 ) + f (P2 ) + f (N1 ∩ N2 ) − δ − 2, and f (N1 ∩ N2 ) ≤ f (N1 ) + f (N2 ) − f (N1 ∪ N2 ) + 1 ≤ f (N1 ) + f (N2 ) + f (P1 ∩ P2 ) − δ + 2. We now take the average over P1 , P2 . This gives M − d2 ≥ 2M − 2d + (−M + s2 ) − δ − 2. Similarly, the average over N1 , N2 gives −M + s2 ≤ −2M + 2s + (M − d2 ) − δ + 2, where M is the maximum absolute value of f . Subtracting the second inequality from the first we get 2M − d2 − s2 ≥ 4M − 2d − 2s − 2M + d2 + s2 − 4, so d2 + s2 ≤ d + s + 2 ≤ 3, completing the proof of the claim. We can now prove Lemma 3.11 by induction: It holds for ℓ = 1 and ℓ = 2 using the above claim. For every ℓ sets P1 , . . . , Pℓ ∈ PS∗ , by 1-modularity the value of their intersection satisfies f ((P1 ∩ . . . ∩ Pℓ1 ) ∩ (Pℓ1 +1 ∩ . . .∩ Pℓ )) ≥ f (P1 ∩ . . . ∩ Pℓ1 ) + f (Pℓ1 +1 ∩ . . .∩ Pℓ ) − M − 1, where M is the maximum absolute value of f . Taking the average over the ℓ sets we get M −dℓ ≥ M −dℓ1 −dℓ−ℓ1 −1. Similarly, −M + sℓ ≤ −M + sℓ1 + sℓ−ℓ1 + 1. So dℓ + sℓ ≤ +dℓ1 + sℓ−ℓ1 + dℓ1 + sℓ−ℓ1 + 2. − If ℓ is even we can take ℓ1 = 2 and using the induction hypothesis get dℓ + sℓ ≤ 3 + 5(ℓ−2) 2 5ℓ 2 + 2 = 2 − 2. If ℓ is odd we can take ℓ1 = 1 and using the induction hypothesis get dℓ + sℓ ≤ − 2 + 2 = 5(ℓ−1) + 1. This completes the proof.  1 + 5(ℓ−1) 2 2 Observation 3.12. Every item is contained in 1/2ℓ of the intersections of ℓ sets in PS∗ or NS∗ . Observation 3.12 allows us to use the main lemma for upper-bounding the Kalton constants (Lemma 3.7) with α = 1/2ℓ . Together with Lemma 3.11 that establishes the average deficit and surplus, this enables us to obtain the following result. Theorem 3.13. Suppose that for fixed r, θ ∈ R≥0 there exist (α, r, θ)-expanders. Then the strong 2 −θ Kalton constant satisfies Ks ≤ 2r+N , where if α = 21 then N2 = − 21 ; if α = 41 then N2 = 12 ; if 1−θ 1 1 1 α = 8 then N2 = 2; if α = 16 then N2 = 3; and if α = 32 then N2 = 4.5. Proof. For every ℓ, by taking the intersections of ℓ sets in PS∗ and NS∗ we get collections G and G ′ , both with 21ℓ -frequent items (Observation 3.12), whose average deficit and surplus are dℓ and sℓ , respectively. Moreover, there exists some k such that G and G ′ have 2k sets each, and an expander Gk with the above parameters exists. We now apply Lemma 3.8, which gives an upper bound of 1 (d +s )+2r−2 ℓ + 1. By Lemma 3.11, dℓ + sℓ is at most 3, 6, 8, 11 for ℓ = 2, 3, 4, 5, respectively. Ks ≤ 2 ℓ 1−θ This implies the theorem.  To use Theorem 3.13 one needs to substitute in parameters of expanders. Theorem 3.13 com4 1 , 4, 15 )-expanders from Lemma B.3 implies that the value of the strong Kalton bined with the ( 16 = 14.637. constant satisfies Ks ≤ 2·4+3−0.26 1−0.26 3.6 Further Improvements on the Strong Kalton Constant Ks Using our techniques, the upper bound on Ks can be improved even further. The sources of these improvements are twofold. First, all of our results are derived using bi-regular expanders; better 12 bounds can be obtained using more sophisticated expanders. Second, improvements can be obtained by using additional properties of ǫ-modular functions to improve the bounds in Lemma 3.11. Improvements of the second type are demonstrated in Appendix B.4, where it is shown that Ks < 12.65 (establishing Theorem 1.1). 4 Improved Lower Bounds In this section we prove the lower bound stated in Theorem 1.2 on the strong Kalton constant; i.e., we prove that Ks ≥ 1. The lower bound stated in Theorem 1.3 on Kw is proved in Appendix C.3. Proof. [Theorem 1.2] The following set function with n = 70 is 2-modular and tightly 2-linear, thus showing Ks ≥ 1. Let M = 2. The positive support PS and the negative support NS of f (Definition 2.15) are as follows: There are 8 sets in PS, each with 35 out of the 70 items, such that every item  appears in exactly 4 of the 8 sets (notice that 84 = 70). (We can fix any such collection of sets as PS without loss of generality.) The negative support NS is the complement collection of PS. Notice that PS, NS support uniform distributions P + , P − with equal item marginals, as required. The values of sets under f are determined by the following rules, where the first applicable rule applies (and hence f is well defined): 1. Each positive support set S ∈ PS has value f (S) = M = 2. 2. For every two sets S1 and S2 in PS and every set R, we have f (S1 ∪(S2 ∩R)) = 1, and likewise f (S1 ∩(S2 ∪R)) = 1. (In particular, for every two sets S1 , S2 ∈ PS, f (S1 ∪S2 ) = f (S1 ∩S2 ) = 1.) 3. We impose −f (S) = f (S̄) and derive from this sets with negative value. 4. All other sets have value 0. Claim 4.1. f is tightly 2-linear. Claim 4.2. f is 2-modular. The proofs of Claims 4.1 and 4.2 appear in Appendix C. The proof of the latter claim is based on an analysis of selected cases, which are proven to be sufficient to establish ǫ-modularity for f due to its symmetry properties. This completes the proof.  5 Learning ∆-Linear and ǫ-Modular Functions Consider the following natural question: We have value-query access to a ∆-linear set function f . Our goal is to learn in polynomial-time a “hypothesis” linear set function h that is δ-close to f . How small can δ be as a function of ∆ and n? We say that an algorithm δ-learns a set function f if given value-query access to f it returns in polynomial-time a linear set function that is δ-close to f . √ Chierichetti et al. [2015] (Theorem 4) present an algorithm that O(ǫ n)-learns ǫ-modular set functions. Since every ∆-linear set function is 4∆-modular (Proposition 2.4), their algorithm also √ O(∆ n)-learns ∆-linear set functions. The algorithm of Chierichetti et al. [2015] is randomized, and after making O(n2 log n) non-adaptive queries to the function it is learning, returns a δ-close linear set function with probability 1 − o(1). 13 √ In this section we present an alternative algorithm for O(∆ n)-learning ∆-linear set functions √ (and since every ǫ-modular set function is Ks ǫ-linear for a constant Ks , also for O(ǫ n)-learning ǫ-modular set functions). Our algorithm (Algorithm 1) is simple, deterministic, and makes a linear number of non-adaptive queries to the function it is learning. 5.1 Learning with the Hadamard Basis A Hadamard basis is an orthogonal basis {v1 , . . . , vn } of Rn which consists of vectors in {±1}n . √ √ Let {y1 , . . . , yn } = {v1 / n, . . . , vn / n}, then {y1 , . . . , yn } is an orthonormal basis of Rn . Easy recursive constructions of a Hadamard basis are known whenever n is a power of 2 (and also for some other values of n). For all values of n for which a Hadamard basis exists, and for every choice of one particular vector v ∈ {±1}n , we may assume that v is a member of the Hadamard basis. This can be enforced by taking the first vector v1 in an arbitrary Hadamard basis of Rn , and flipping – in all vectors of the basis – those coordinates in which v and v1 do not agree. n For every set of items S ⊆ [n], let PnvS ∈ {0, 1} be the indicator vector of S. Vector vS can be written as a linear combination {y1 , . . . , yn }. We shall make i=1 λi yi of the basis vectorsP use of the following property of orthonormal bases: Express vS as ni=1 λi yi ; since {y1 , . . . , yn } is orthonormal, then by the Pythagorean theorem generalized to Euclidean spaces, n X i=1 (λi )2 = |S|. (4) Given a basis vector vi we denote by Si the set of indices in which vi has entries +1, and by S̄i the set of indices in which vi has entries −1. Throughout this section, i ∈ [n] specifies the index of a basis vector (as in vi or yi ), whereas to index other objects (such as coordinates of vectors, or items) we shall use j rather than i. When a vector is indexed by a set (such as vS , or v{j} ) then the vector is the indicator vector (in {0, 1}n ) for the set. Claim P 5.1 (Expressing a linear set function using Si , S̄i ). Consider a linear set function g where 1 Pn √ λ g(S) = j∈S gj +g(∅) for every set S ⊆ [n]. Then for every vS it holds that g(S) = n i=1 i (g(Si )− P In particg(S̄i )) + g(∅), where here λ1 , . . . , λn are the unique coefficients for which vS = ni=1 λi yi . P ular gj = g({j}) can be obtained by substituting in the unique λ1 , . . . , λn for which v{j} = ni=1 λi yi . Proof. Let g′ be the additive function defined as g′ (S) = g(S) − g(∅). Extend theP domain of g ′ n n n from {0, 1} to R , giving the additive function g̃ over R defined as follows: g̃(x) = j∈S gj xj for every x ∈ Rn . Observe that for every Hadamard basis vector vi , g̃(vi ) = g(Si ) − g(S̄i ) (by definition of the Pfor every set S whose P sets Si , S̄i ). By additivity of g̃, P indicator vector P vS can be expressed as ni=1 λi yi , we have that g̃(vS ) = ni=1 λi g̃(yi ) = √1n ni=1 λi g̃(vi ) = √1n ni=1 λi (g(Si ) − g(S̄i )). Finally, g(S) − g(∅) = g(S) − g0 = g̃(vS ) for every set S.  Lemma 5.2. Let h and g be two linear set functions such that for every i ∈ [n], h(Si ) − h(S̄i ) is ′ ′ ′ O(∆)-close to g(Si ) − g(S̄i ), and for p every S ∈ {∅, U }, h(S ) is O(∆)-close to g(S ). Then for every set S ⊆ [n], h(S) is O(∆(1 + min{|S|, n − |S|}))-close to g(S). p Proof. The lemma clearly holds for S ∈ {∅, U }, since in this case O(∆(1+ min{|S|, n − |S|})) = O(∆ · 1). For < n. By Claim 5.1 applied to h and g, P the remainder of the proof assume 0 < |S| P h(S) = √1n ni=1 λi (h(Si ) − h(S̄i )) + h(∅), and g(S) = √1n ni=1 λi (g(Si ) − g(S̄i )) + g(∅). For every 14 i ∈ [n], h(Si ) − h(S̄i ) estimates g(Si ) − g(S̄i ) up to an additive error of O(∆), and h(∅) estimates g(∅) up to an additive error of O(∆). Thus we get that h(S) estimates g(S) up to an additive error Pn 2 √ of O(∆) i=1 |λi | + O(∆). Invoking (4), this error is maximized when (λi ) = |S|/n for every i. We n conclude that an upper bound on the additive estimation error is r p p |S| O(∆) √ n + O(∆) = O(∆) |S| + O(∆) = O(∆ |S|). (5) n n Since h(S) = h(∅) + h(U ) − h(S̄) and g(S) = g(∅) + g(U p ) − g(S̄), and p since we know from (5) that h(S̄) estimates g(S̄) up to an additive error of O(∆ |S̄|) = O(∆ n − |S|), we also get that the maximum additive estimation error is p p (6) O(∆) + O(∆ n − |S|) = O(∆ n − |S|). Taking the minimum among (5) and (6) completes the proof. 5.2  The Algorithm ALGORITHM 1: Using the Hadamard basis to learn a linear set function. Input: Value-query access to a set function f . P Output: A linear set function h where h(S) = h0 + j∈S hj . % Query linearly many values of f query f (∅) for every i ∈ [n] do % Consider the ith Hadamard basis vector vi query f (Si ) and f (S̄i ) % Si , S̄i are sets (possibly empty) of the +1, −1 entries of vi end for % Compute h set h0 = f (∅) for every j ∈ [n] P do n express v{j} as i=1 λi yi % yi is the Hadamard basis vector vi after normalization P n set hj = √1n i=1 λi (f (Si ) − f (S̄i )) end for For simplicity, we state the following theorem for values of n that are a power of 2. In Remark 5.5 we explain how to extend it beyond powers of 2. In the following Theorem, when referring to Algorithm 1, we mean Algorithm 1 run with the first Hadamard basis vector v1 being the all-ones vector. Theorem 5.3. Let n be a power of 2. Given value-query access to a ∆-linear set function f over n items, Algorithm 1 returns p in polynomial time a linear set function h such that for√every set S ⊆ [n], h(S) is O(∆(1 + min{|S|, n − |S|}))-close to f (S). Algorithm 1 thus O(∆ n)-learns ∆-linear set functions over n items. Proof. First note that Algorithm 1 clearly runs in polynomial time. By the construction of h in P Algorithm 1Pand by Claim 5.1, h is the function that assigns to every set S = ni=1 λi yi the value h(S) = √1n ni=1 λi (f (Si ) − f (S̄i )) + f (∅). So for every i ∈ [n], h(Si ) − h(S̄i ) = f (Si ) − f (S̄i ), and h(∅) = f (∅). Let g be a linear set function ∆-close to f , then for every i ∈ [n], h(Si ) − h(S̄i ) is 2∆-close to g(Si ) − g(S̄i ), and h(∅) is ∆-close to g(∅). Recall that v1 is the all-ones vector, which 15 is the indicator vector of U . So h(U p ) is also 2∆-close to g(U ). Invoking Lemma 5.2, we get that for every set S, h(S) is O(∆(1 + min{|S|, n − |S|}))-close to g(S). Since g is ∆-close to f , this completes the proof.  Theorem 5.3 is essentially the best possible, in the following strong sense: Corollary 23 of Chierichetti et al. [2015] shows that no algorithm p (deterministic or randomized) that performs polynomially-many value queries can find a o(∆ n/ log n)-close linear set function, even if the queries are allowed to be adaptive. We include a proof sketch of this tightness result in Appendix D for completeness. Our tightness proof holds even for learning monotone ∆-linear set functions. Remark 5.4 (LP-based approach). We describe an alternative way to derive the linear function h: After querying f (S) for S = ∅ and for S = Si , S̄i ∀i ∈ [n], one solves a linear program (LP). The n + 1 variables P xj of the LP are intended to have the value gj for every j. The constraints are f (S) − ∆ ≤ j∈S xj ≤ f (S) + ∆ for every set S that was queried. Let h be the linear set function defined by cj = x∗j for every j where x∗ is a feasible solution of the LP. We claim that h p is O(∆(1 + min{|S|, n − |S|}))-close to f : On each of the queried sets S, the values of h and g differ by at most 2∆. Since we may assume that v1 is the all-ones vector, the set S = U is one of the queried sets. Invoking Lemma 5.2 and using that g is ∆-close to f shows the claim. The advantage of this LP-based approach is that additional constraints can easily be incorporated once more data of f is collected, potentially leading to better accuracy. Likewise, one can easily enforce desirable properties such as non-negativity on h (if g is nonnegative). Remark 5.5 (Beyond powers of 2). Using either Algorithm 1 or the LP-based algorithm described √ in Remark 5.4, we can O(∆ n)-learn ∆-linear set functions over n items even when n is not a power of 2, as follows. Extend f to f ′ over n′ ≥ n items U ′ , where n′ is a power of 2 and U ⊆ U ′ , by setting f ′ (S) = f (S ∩ U ) for every set S ⊆ U ′ . Extend g to g′ over U ′ in the same way. Notice that the extended versions f ′ , g′ are still ∆-close. Given h′ over U returned by Algorithm 1, we define h over U by setting h(S) = h′ (S) for every set S ⊆ U . The proof of Theorem 5.3 holds verbatim with the single following modification: the ′ Hadamard basis vector v1 ∈ Rn is no longer the all-ones vector, but rather the vector that is +1 on the first n coordinates and −1 on the n′ − n auxiliary variables. This ensures that we can apply Lemma 5.2 to h instead of h′ . For the LP-based algorithm, we can formulate the LP with n′ + 1 variables, but since we know there is a feasible solution in which xj = 0 for every j > n (namely x = g), we can add these constraints so that the resulting linear function h is over n items. Acknowledgements We thank Assaf Naor for helpful discussions and for directing us to the paper of Kalton and Roberts [1983]. Part of this work was done at Microsoft Research, Herzliya. Part of the work of U. Feige was done while visiting Princeton University. The work of U. Feige was supported in part by the Israel Science Foundation (grant No. 1388/16) and by the I-CORE Program of the Planning and Budgeting Committee and the Israel Science Foundation (grant No. 4/11). The work of M. Feldman was supported in part by the European Research Council under the European Union’s Seventh Framework Programme (FP7/2007-2013) / ERC grant agreement number 337122. The work of I. Talgam-Cohen has received funding from the European Union’s Horizon 2020 research and innovation programme under the Marie Sklodowska-Curie grant agreement No 708935. 16 A A.1 Appendix to Section 2 (Preliminaries) Missing Proofs Proof. [Proposition 2.1] Let f be a weakly ǫ-modular set function, we show it must be 2ǫ-modular. For every two sets S and T , since f is weakly ǫ-modular we have that f (T ) = f (S ∩ T ) + f (T \ S) − f (∅) ± ǫ, and that f (S ∪ T ) ± ǫ = f (S) + f (T \ S) − f (∅). Therefore, f (S) + f (T ) = f (S) + f (S ∩ T ) + f (T \ S) − f (∅) ± ǫ = f (S ∪ T ) + f (S ∩ T ) ± 2ǫ, completing the proof.  Proof. [Proposition 2.3] Let f be a modular function, we show it must be linear: Let c0 = f (∅), and let ci = f ({i}) − c0 . For every set S, by modularity, f (S) = f (S1 ) + f P (S2 ) − c0 for any S1 , S2 whose disjoint union is S. Applying this equality recursively gives f (S) = i∈S ci + |S|c0 − |S − 1|c0 = P i∈S ci + c0 , as required. P For the other direction, let f be a linear P function such P that f (S) = c0 + i∈S ci . For any two sets S, T , it P holds that f (S) + f (T ) = 2c0 + i∈S ci + P i∈T ci , and ) = 2c0 + P P f (S ∪ T P) + f (S ∩ TP c + c . The desired equality follows by c + c = c + i∈S∪T i i∈S∩T i i∈S i i∈T i i∈S∪T i i∈S∩T ci .  Proof. [Proposition 2.4] Let f be a ∆-linear function, and let ℓ be a linear function such that P ℓ(S) = c0 + i∈S ci and |f (S) − ℓ(S)| S and T , f (S) + P ≤ ∆ for every set S. P For every two sets P f (T ) − f (S ∪ T ) − f (S ∩ T ) ≤ (c + c + ∆) + (c + c + ∆) − (c + 0 i 0 i 0 i∈S i∈T i∈S∪T P P ci − ∆) − (c0 + P i∈S∩T ci − ∆) = 4∆.PSimilarly, f (S) + f (T )P− f (S ∪ T ) − f (S ∩ T ) ≥ (c0 + i∈S ci − ∆) + (c0 + i∈T ci − ∆) − (c0 + i∈S∪T ci + ∆) − (c0 + i∈S∩T ci + ∆) = −4∆. This establishes that f is 4∆-modular. The proposition is tight, even for symmetric functions: Consider the 1-linear function on 4 items in which sets of size 0 and 4 are worth 0, sets of size 1 and 3 are worth −1, and sets of size 2 are worth +1. If S and T are two different sets of size 2 that intersect, the modularity equation is violated by 4.  Proof. [Theorem 2.13] Let ǫ = 1, and let f be the function given in Pawlik’s paper “Approximately Additive Set Functions” [Pawlik, 1987] over the items X ⊎ Y . We present the function f and the proof for completeness (and due to typos and brevity in Pawlik [1987]). Let f (S ∪ T ) denote the value of the union of a set S ⊆ X and a set T ⊆ Y . Let X ′ (resp., Y ′ ) denote a non-empty proper subset of X (resp., Y ). The function f is defined as follows: f (∅ ∪ ∅) = 0, f (X ′ ∪ ∅) = 1, f (X ∪ ∅) = 3, f (∅ ∪ Y ′ ) = −1, f (X ′ ∪ Y ′ ) = 0, f (X ∪ Y ′ ) = 1, f (∅ ∪ Y ) = −3, f (X ′ ∪ Y ) = −1, f (X ∪ Y ) = 0. As claimed in Pawlik [1987], f is weakly 1-modular. We observe that f is 2-modular, but no better than 2 modular (consider two non-disjoint proper subsets of X whose union is X). Let µ be the closest linear function to f . Consider a set C = X − x + y (x ∈ X, y ∈ Y will be specified below). By definition f (X) = 3 and f (C) = 0. We argue that f is no closer than 3/2-close to µ. Assume for contradiction that f is (3/2 − δ)-close to µ for δ > 0. We show there is large enough k for which this leads to contradiction (k is the number of items in X, which equals the number of items in Y ). First notice that µ(X) ≥ 3/2 + δ (otherwise f and µ are more than 3/2 − δ apart on X). If it were to hold that µ(x) ≤ µ(y), we’d get that µ(C) = µ(X) − µ(x) + µ(y) ≥ 3/2 + δ (i.e., f and µ are more than 3/2 − δ apart on C). So µ(x) > µ(y) for every x, y. We know that µ(X) can’t be too big (since it can’t exceed f (X) = 3 by too much). For the same reason and since f (Y ) = −3 by definition, µ(Y ) is negative but can’t be too small. By letting 17 k grow large, it becomes apparent that µ(x) cannot be bounded away from 0 from above, similarly µ(y) cannot be bounded away from 0 from below. Using µ(x) > µ(y) we conclude that µ(x) ≥ 0 for every x and µ(y) ≤ 0 for every y, and that for most items µ(x) → 0 and µ(y) → 0. Now choose x and y that minimize |µ(x)|+|µ(y)|. For large enough k we get that µ(x)−µ(y) < δ, so µ(C) = µ(X) − µ(x) + µ(y) > 3/2 + δ − δ > f (C) + 3/2 − δ, contradiction. The bounds asserted in the theorem follow.  A.2 Special Cases Observation A.1. For every symmetric ǫ-modular set function f that is tightly ∆-linear, there is a symmetric ǫ-modular set function f ′ that is tightly ∆-linear and whose closest linear function is the zero function. Proof. Let g be a linear set function ∆-close to f . We show a symmetric set function g′ that is ∆-close to f : for every k ∈ [n], let g′ (k) be the average value of k items according to g. The proof follows as in Observation 2.5.  We now give tight bounds on Ks for submodular set functions. A set function f is submodular if for every two sets S, T it holds that f (S) + f (T ) ≥ f (S ∪ T ) + f (S ∩ T ). Example 2.9 shows that Ks ≥ 1/2 not only for symmetric set functions but also for submodular ones. Proposition A.2. The strong Kalton constant for submodular set functions is Ks = 21 . Proof. Without loss of generality we normalize f such that f (∅) = 0. Since f is submodular and normalized, it belongs to the class of XOS functions, and so there exists an additive set function ℓ such that for every set S, f (S) ≥ ℓ(S), and for the set S = U , f (U ) = ℓ(U ) [see, e.g., Feige, 2009]. It remains to show that for every S, f (S) ≤ ℓ(S)+ǫ. Assume for contradiction that f (S) > ℓ(S)+ǫ. Then f (S) + f (S) > ℓ(S) + ǫ + ℓ(S) = ℓ(U ) + ǫ = f (U ) + ǫ, where we use that ℓ(S) + ℓ(S) = ℓ(U ) by additivity. We have shown a contradiction to ǫ-modularity, completing the proof.  B B.1 Appendix to Section 3 (Upper Bounds) Missing Proofs Proof. [Observation 3.1] Denote δ = f (∅) + f (U ). Let M denote the maximum absolute value of f . If M = 0 the claim follows trivially, otherwise by Lemma 2.14 there exist sets P, N with values M, −M , respectively. Consider the values of P̄ , N̄ . By weak ǫ-modularity and the definition of M , we have −M ≤ f (P̄ ) ≤ −f (P ) + δ + ǫ = −M + δ + ǫ, and M + δ − ǫ = −f (N ) + δ − ǫ ≤ f (N̄ ) ≤ M . We conclude that 0 ≤ δ + ǫ and δ − ǫ ≤ 0, completing the proof.  B.2 Expanders In this appendix we show the existence of expanders with a range of parameters. The existence arguments use the probabilistic method as in Pippenger [1977], and so result in expanders that are biregular (all vertices on the same side of the bipartite graph have the same degree). More complicated expander constructions that are not biregular may achieve even better parameters, as in Bondarenko et al. [2013]. We begin with a claim following from Stirling’s approximation: 18 Claim B.1 (Stirling). For every c, d ∈ R where c > d > 0, for every sufficiently large integer m such that cm and dm are integers, m      1 cm cc Θ √ . = dd (c − d)c−d dm m Proof. By a non-asymptotic version of Stirling’s formula, for every positive integer n it holds that √ 2πnn+1/2 e−n ≤ n! ≤ enn+1/2 e−n . Therefore, for every positive integers cm > dm,   cm e(cm)cm+1/2 e−cm ≤ dm 2π(dm)dm+1/2 e−dm ((c − d)m)(c−d)m+1/2 e−(c−d)m m  r e c cc · . = d c−d d (c − d) 2π d(c − d)m On the other hand,  cm dm  √ 2π(cm)cm+1/2 e−cm ≥ 2 e (dm)dm+1/2 e−dm ((c − d)m)(c−d)m+1/2 e−(c−d)m s m  1 cc 2πc · 2 . = d c−d d (c − d) e d(c − d)m This completes the proof of the claim.  Lemma B.2. There exist ( 14 , 5, 12 )-expanders. Proof. [Sketch] Let k = 2m. Suppose that there are 4m left-hand side vertices and consequently 2m right-hand side vertices (because θ = 21 ). The edges are determined by making r = 5 copies of each left-hand side vertex, taking a random permutation over all 2kr = 20m copies, and connecting to the right-hand side in a round-robin fashion. The probability that there is a set of 2kα = m left-hand side vertices with fewer than m neighbors is at most:    10m    2kr α  4m 2m 2k 2kθ 2krαθ 5m = 20m 2kr  m m 2kα 2kα 5m 2krα m    4 1 22 1010 55 · 1515 4 Θ · 1 1· 5 5· = 3 1 20 3 ·1 1 ·1 5 ·5 20 m  4m   27 1 = Θ 32 m < 1, where the second equality follows from Claim B.1, and the inequality holds by taking sufficiently large m to overcome the constants in Θ(1/m). Hence such expanders exist for every integer multiple k of sufficiently large k′ .  The next lemmas follow from the same arguments as Lemma B.2. Lemma B.3. There exist ( 21 , 5, 57 )-expanders. 19 3 , 4, 47 )-expanders. Lemma B.4. There exist ( 10 1 4 Lemma B.5. There exist ( 16 , 4, 15 )-expanders. 3 1 , 3, 11 )-expanders. Lemma B.6. There exist ( 64 3 1 , 3, 19 )-expanders. Lemma B.7. There exist ( 256 B.3 Strengthening the Upper Bound on the Weak Kalton Constant Kw In this appendix we use the notation of Section 3.4, and in addition denote the average deficit and surplus of the target sets of PS∗ and NS∗ by d′ and s′ , respectively. We first state and prove a stronger version of Lemma 3.8: Lemma B.8 (Strong version of Lemma 3.8). Let k ∈ N≥0 and α, r, θ ∈ R≥0 be such that there exists an (α, r, θ)-expander Gk . Let G and G ′ (possibly G = G ′ ) be collections of 2k sets each, both with α-frequent items, such that the average deficit of G is ≤ d, the average surplus of G ′ is ≤ s, and their target sets have average deficit ≥ d′ and average surplus ≥ s′ , respectively. Then M≤ 1 2 (d + s − θ(d′ + s′ )) + 2ǫ(r − 1) + ǫ. 1−θ Proof. We first apply Lemma 3.7 to partition and disjointly recombine the sets of collection G using the expander Gk = Gk (V, W ; E). We use the following notation: For a vertex v ∈ V (resp., w ∈ W ) let Sv (resp., Sw ) be the source (resp., target) set corresponding to v (resp., w). Denote the neighboring vertices of a vertex v by N (v) and its degree by deg(v). Let Sv,w be the intermediate subset that labels (corresponds to) edge (v, w) ∈ E. By Lemma 3.7, for every v ∈ V , the intermediate subsets labeling the edges adjacent to v are disjoint, and the same holds for every w ∈ W . We can thus apply Observation 2.2 to get P f (Sv,w ) ≥ f (Sv ) + (deg(v) − 1)(f (∅) − ǫ) for every v ∈ V. P w∈N (v) for every w ∈ W. v∈N (w) f (Sv,w ) ≤ f (Sw ) + (deg(w) − 1)(f (∅) + ǫ) Denote the maximum absolute value of f by M . Since P collection G has average deficit ≤ d, by summing over vertices v ∈ V (where |V | = 2k) we get v∈V f (Sv ) ≥ 2k(M − d). Since the target sets ≥ d′ , by summing over vertices w ∈P W (where |W | P = 2θk) we get P of G have average deficit ′ f (S ) ≤ 2θk(M − d ). Clearly in the bipartite graph G , deg(v) = w k w∈W v∈V w∈W deg(w), and by the parameters of Gk both are equal to 2kr. Therefore, summing over v ∈ V and w ∈ W we get X 2kM − 2kd + (2kr − 2k)(f (∅) − ǫ) ≤ f (Sv,w ) ≤ 2θkM − 2θkd′ + (2kr − 2θk)(f (∅) + ǫ). (v,w)∈E Dividing the resulting inequality by 2k and rearranging gives (1 − θ)M ≤ d − θd′ + (r − 1)(ǫ − f (∅)) + (r − θ)(ǫ + f (∅)) = d − θd′ + 2ǫ(r − 1) + (1 − θ)(ǫ + f (∅)). (7) Similarly, usingP that the average deficit of collection G ′ is ≤ s and the average deficit of its P ′ target sets is ≥ s , v∈V f (Sv ) ≤ 2k(−M + s), and w∈W f (Sw ) ≥ −2θk(M − s′ ). Therefore X −2kM + 2ks + (2kr − 2k)(f (∅) + ǫ) ≥ f (Sv,w ) ≥ −2θkM + 2θks′ + (2kr − 2θk)(f (∅) − ǫ). (v,w)∈E 20 Dividing the resulting inequality by 2k and rearranging gives (1 − θ)M ≤ s − θs′ + (r − 1)(ǫ + f (∅)) + (r − θ)(ǫ − f (∅)) = s − θs′ + 2ǫ(r − 1) + (1 − θ)(ǫ − f (∅)). (8) Rearranging Inequalities (7) and (8) as well as averaging the resulting inequalities implies the theorem.  We use Lemma B.8 to show the following upper bound: Lemma B.9 (Upper bound on Kw ). Suppose that for fixed r, r ′ , θ, θ ′ ∈ R≥0 there exist ( 12 , r, θ)1 expanders and (1 − 2θ , r ′ , θ ′ )-expanders. Then the weak Kalton constant satisfies: ) ( ′ ′ ′ − θ ′ + d′ +s′ 2r 2r − 12 − θ − θ d +s 2 2 , . Kw ≤ min 1−θ 1 − θ′ Proof. Observe that there exists k such that f has collections PS∗ and NS∗ of 2k sets as described above, and expanders Gk and G′k with the above parameters, respectively, exist. The first upper bound is found in Lemma 3.9. Now consider the collection G that is the complement of the target 1 sets of PS∗ . Since PS∗ has 21 -frequent items, then the target sets have 2θ -frequent items (Lemma 1 3.7), and G has (1 − 2θ )-frequent items (Observation 3.5). By Corollary 3.3 with ǫ = 1, the average surplus of G is ≤ d′ + 1 + δ, and clearly the average surplus of its target sets is ≥ 0. Similarly, let G ′ 1 be the complement of the target sets of NS∗ , which has (1 − 2θ )-frequent items and average deficit ′ ′ ≤ s + 1 − δ. Clearly the average deficit of the target sets of G is ≥ 0. Applying Lemma B.8 thus gives an upper bound of Kw ≤ 1 ′ 2 (d ′ ′ 2r ′ − 1 + d +s + s′ + 2) + 2r ′ − 2 2 + 1 = + 1. 1 − θ′ 1 − θ′ Taking the minimum of the bound in Lemma 3.9 and in (9) completes the proof. (9)  We can now prove the upper bound in Theorem 1.3, by which the weak Kalton constant satisfies Kw ≤ 23.811. Proof. [First part of Theorem 1.3] By using the expanders with α = 21 from Lemma B.3 we can 1 3 = 10 , we can complement these parameters by using substitute r = 5 and θ = 75 . Since 1 − 2θ 3 ′ the expanders with α = 10 from Lemma B.4 for which r ′ = 4 and θ ′ = 47 . This implies that 7 ′ ′  Kw ≤ min{30.75 − 1.25(d′ + s′ ), 52 3 + 6 (d + s )} = 23.811. B.4 Strengthening the Upper Bound on the Strong Kalton Constant Ks Definition B.10. Given 0 ≤ α ≤ 12 and µ ≥ 0, an (α, µ)-collection-pair is a pair of collections D, S, such that in both collections items are α-frequent, the average value of sets in D is at least M − d, the average value of sets in S is at most −M + s, and 21 (d + s) = µ. For a given µ ≥ 0, let α[µ] denote the smallest 0 ≤ α ≤ 12 such that there is some µ′ ≤ µ for which an (α, µ′ )-collection-pair exists. By Lemma 3.11, we may assume for our given 1-modular function f that: • α[ 21 ] ≤ 21 ; 21 • α[ 32 ] ≤ 41 ; • α[4] ≤ 1 16 . Fix some 32 < δ < 4 whose value will be optimized later. (Intuitively, we are aiming at δ satisfying α[δ] ≃ 18 .) Now we consider two cases, each addressed in its own lemma. Lemma B.11. Suppose that α[δ] ≤ α[ 32 ] 2 . Then α[2δ − 12 ] ≤ 1 64 . Proof. Consider the µ′ ≤ δ for which an (α[δ], µ′ )-collection-pair (D, S) with deficit d′ and surplus s′ exists, and let m denote the number of sets in D and in S (sets appearing more than once are counted more than once). Consider now the two collection-pairs (D∩ , S∩ ) and (D∪ , S∪ ) obtained by taking all m2 pairwise intersections or unions (respectively) of sets from D, S. (A pair is generated by picking one set and then another set, with repetitions.) Let α∩ and α∪ be the item frequencies associated with these two collection-pairs, respectively. Let d∪ , d∩ be the deficits of D∪ , D∩ , respectively, and let s∪ , s∩ be the surpluses of S∪ , S∩ , respectively. Let µ∪ (resp., µ∩ ) be the average of d∪ , s∪ (resp., d∩ , s∩ ). Then:  3 2 α[ 2 ] 1 • α∩ = (α[δ])2 ≤ ≤ 64 ; 2 • α∪ < 2α[δ] ≤ α[ 32 ]. It follows from the second bullet that µ∪ ≥ 32 . The 1-modularity condition implies that 2d′ −d∪ +1 ≥ d∩ and 2s′ − s∪ + 1 ≥ s∩ , and so by averaging 2µ′ − µ∪ + 1 ≥ µ∩ . Substitute µ∪ ≥ 3/2 and µ′ ≤ δ 1 to get 2δ − 12 ≥ µ∩ . By the first bullet, it follows that α[2δ − 12 ] ≤ 64 , as required.  Lemma B.12. Suppose that α[δ] > α[ 32 ] 2 . Then α[9 − δ] ≤ 1 256 . Proof. Consider the µ′ ≤ 23 for which an (α[ 23 ], µ′ )-collection-pair (D, S) with deficit d′ and surplus s′ exists. For the collection-pair (D∩ , S∩ ) (that we shall denote by (D̃, S̃)) the item frequencies are 2 α[ 32 ] , and the average of the deficit and surplus µ̃ is at most 2µ′ + 1 ≤ 4 (using 1-modularity). Consider now (D̃∩ , S̃∩ ) and (D̃∪ , S̃∪ ). Let α̃∩ and α̃∪ be the item frequencies associated with these two collections respectively. Then 4 1 ; • α̃∩ = α[ 23 ] ≤ 256 2 • α̃∪ < 2 α[ 32 ] < α[δ], where the last inequality uses the fact that α[ 32 ] ≤ 14 and the premise of the lemma. Similarly to the proof of Lemma B.11, it follows from the second bullet that µ̃∪ ≥ δ. The 1modularity condition then implies that 9 − δ ≥ 2 · 4 − δ + 1 ≥ 2µ̃ − µ̃∪ + 1 ≥ µ̃∩ . This completes the proof of the lemma.  Corollary B.13. For every 23 < δ < 4, every 1-modular function f as above has an (α, µ)1 1 collection-pair with either α ≤ 64 and µ ≤ 2δ − 12 , or α ≤ 256 and µ ≤ 9 − δ. 22 Improved upper bound 1: Ks < 13.25. We now apply Lemma 3.8, which gives an upper bound of Ks ≤ µ+2r−2 1−θ + 1 when there are (α, r, θ)-expanders. By Corollary B.13 we get Ks ≤ max  2δ + 2r1 − 2.5 −δ + 2r2 + 7 , 1 − θ1 1 − θ2  + 1, 1 where r1 , θ1 are the best expander parameters for α = 64 , and r2 , θ2 are the best expander parame1 . Plugging in δ = 43/16, and using Lemmas B.6 and B.7 we get that Ks ≤ 13.2461. ters for α = 256 Improved upper bound 2: Ks < 12.65. The 13.25 bound can be further improved by using Lemma B.8 (which is an improved version of Lemma 3.8). To make use of Lemma B.8 we need d′ + s′ (the lower bounds on the average deficit and surplus of the target sets) to be sufficiently large. We therefore distinguish between two cases as shown next. 1 and µ ≤ 2δ − 1/2 (the first case in Corollary Suppose f has an (α, µ)-collection-pair with α ≤ 64 3 B.13), and consider an (α, 3, 11 )-expander (which exists by Lemma B.6). Consider the target sets of α ′ ′ ≤ 1/64 the collection pair guaranteed by Lemma 3.7; their frequency is 3/11 3/11 < 1/16. If d +s ≤ 5.08, then we apply Lemma 3.8 with the target sets above serving as the source sets, and using the 4 1 , 4, 15 )-expanders (Lemma B.5), to get Ks < 12.65 (by substituting d′ + s′ ≤ 5.08, existence of ( 16 1 and µ ≤ 9 − δ (the r = 4, θ = 4/15). Similarly, if f has an (α, µ)-collection-pair with α ≤ 256 3 second case in Corollary B.13), repeat an analogous analysis using an (α, 3, 19 )-expander (which exists by Lemma B.7) to get Ks < 12.65, as above (this is valid since the frequency of the target α sets is 3/19 ≤ 1/256 3/19 < 1/16). So now we apply Lemma B.8 in the case where d′ + s′ > 5.08. By Corollary B.13, we get that for every 23 < δ < 4, ( ) 5.08θ2 1 2δ − 21 − 5.08θ + 2(r − 1) + 2(r − 1) 9 − δ − 1 2 2 2 Ks ≤ max , + 1, 1 − θ1 1 − θ2 1 , and r2 , θ2 are the best expander paramwhere r1 , θ1 are the best expander parameters for α = 64 1 eters for α = 256 . Plugging in δ = 43/16, and using Lemmas B.6 and B.7 we get that Ks ≤ 12.622. Together, we get that Ks < 12.65. Remark: The bounds shown in this section illustrate the techniques we use. Clearly, these techniques can be extended to give even better bounds by, e.g., establishing better expanders and applying our ideas recursively. We save these extensions for future work. C C.1 Appendix to Section 4 (Lower Bounds) (k, M)-Symmetric Set Functions In this section we introduce the class of (k, M )-symmetric set functions, which enjoy many symmetries. In general, checking whether a set function over n items is approximately modular involves verifying that roughly 22n modular equations (one equation for every pair of sets) approximately hold. Verifying approximate modularity for (k, M )-symmetric set functions becomes an easier task thanks to their symmetries. We begin by introducing some terminology. Definition C.1. A collection G = {S1 , S2 , . . . , Sg } of g subsets of U is generating if: 23 1. It is covering, i.e., S Sj = U (every item is contained in at least one set). T 2. It is item-differentiating, i.e., Sj ∈G|i∈Sj Sj = {i} for every item i (equivalently, for every pair of items, there is a set containing one but not the other). Note that this implies in T particular that Sj ∈G Sj = ∅ (no item is contained in all sets). Sj ∈G Observe that if a collection G is generating, then every subset of U can be generated from sets in G by a sequence of intersections and unions (possibly, in more than one way). Also observe that given a generating collection G = {S1 , S2 , . . . , Sg }, the complement collection Ḡ = {S¯1 , S¯2 , . . . , S¯g } (obtained by complementing each of the generating sets) is also generating. This can be shown by applying De Morgan’s laws. Definition C.2. A generating collection G is canonical if the number g of generating sets is even (we denote g = 2k for some positive integer k), every item is contained in exactly k sets from G, every set in G contains exactly n/2 items, and n = 2k k . Observe that given a canonical generating collection G = {S1 , S2 , . . . , S2k }, items can be thought of as balanced vectors in {±1}2k , where coordinate j of item i is +1 if i ∈ Sj , and −1 if i ∈ S¯j . Observe also that if G is a canonical generating collection, then so is its complement Ḡ. A generating circuit C is a directed acyclic graph (namely, with no directed cycles) with g nodes referred to as input nodes (these nodes have no incoming edges), one node referred to as the output node (this node has no outgoing edges), and in which each non-source node has at most two incoming edges. Nodes with two incoming edges are labeled by either a ∩ (intersection) or ∪ (union) operation, whereas nodes with one incoming edge are labeled by ¯· (complementation). Associating the input nodes with the g sets of a generating collection G, the set at each node is computed by applying the respective operation on the incoming sets (either intersection, union, or complementation), and the output of the circuit is the set at the output node. Given a circuit C, the dual circuit Ĉ is obtained by replacing ∩ by ∪ and vice versa. For a given generating collection G and a permutation that maps G to the input nodes of circuit C, if S is the set output by C, we refer to the set output by the dual circuit Ĉ as the dual of S, and denote in by Ŝ. It can be shown that given G and S, the dual set Ŝ is well defined, in the sense that for all circuits C that generate S, their duals generate the same Ŝ. (In a canonical generating collection G, every item appears in exactly k generating sets. This induces a perfect matching over items, where two items are matched if there is no generating set in which they both appear, or equivalently, if the vectors in {±1}2k representing them are negations of each other. Given a set S, its dual can be seen to be the set Ŝ that contains all items that are not matched to items in S. In particular, every set in G is the dual of itself.) From now on we restrict attention to set functions f whose closest linear set function is the zero function. Recall from Definition 2.15 that the positive and negative supports PS and NS of f are the collections of sets that f assigns maximum or minimum values to and are in the supports of distributions P + or P − , respectively (see Lemma 2.14 above). Definition C.3. For integers k ≥ 2 and M ≥ 1, we say that a set function f over a set U of  n = 2k items is (k, M )-symmetric if it has the following properties: k 1. Integrality: f attains only integer values. 2. Antisymmetry: for every set S and its complement S̄ it holds that f (S) = −f (S̄). 3. Canonical generating sets: the positive support PS contains 2k sets P1 , . . . , P2k (of value M ), the negative support NS contains 2k sets N1 = P̄1 , . . . , N2k = P̄2k (of value −M , these are the complements of the sets in PS), and PS (and likewise NS) is a canonical generating collection. 24 4. Generator anonymity: let C be an arbitrary generating circuit. Then the value (under f ) of the set output by the circuit is independent of the permutation that determines which of the generating sets from PS is mapped to which source node. 5. Dual symmetry: for every set S and its dual Ŝ it holds that f (S) = f (Ŝ). Proposition C.4. Every (k, M )-symmetric function f is tightly M -linear, and the 0 function is a linear function closest to f . Proof. Consider item 3 (canonical generating sets) in Definition C.3. By the virtue of PS being a canonical generating set, the uniform distribution over PS has marginal 1/2 for every item in U , and likewise for NS. Hence Lemma 2.14 implies that the 0 function is a linear function closest to f . As the maximum value of f is M , it then follows that f is tightly M -linear.  The following proposition is not explicitly used in our lower bounds, but may be of interest nevertheless. Proposition C.5. For every (k, M )-symmetric function it holds that f (∅) = f (U ) = 0, and moreover, f ({i}) = 0 for every item i. Proof. The intersection of all sets in PS gives the empty set, whereas their union gives U . Dual symmetry then implies f (∅) = f (U ). Furthermore, antisymmetry implies that f (∅) = −f (U ). Combining these two facts we have that f (∅) = f (U ) = 0. T S. By the item differentiating property of generating collections we have that {i} = S∈PS;i∈S S T T S) = f ( S∈PS;i∈S S). Hence f ({i}) = f ( S∈PS;i∈S S). By dual symmetry we then have that S f ( S∈PS;i∈S T By the fact that PS is canonical, it follows that the complement of S is S∈PS;i∈S S∈PS;i6∈S S, and T then by antisymmetry we deduce that f ( S∈PS;i6∈S S) = −f ({i}). But the factTthat i is contained T in exactly k sets of PS combined with generator anonymity implies that f ( S∈PS;i6∈S S) =  f ( S∈PS;i∈S S), and consequently f ({i}) = 0. We shall design certain (k, M )-symmetric functions and would like to prove that they are ǫmodular, typically for ǫ = 2. The case analysis involved in checking ǫ-modularity can be reduced to the cases outlined in the following lemma. Lemma C.6. To verify that a (k, M )-symmetric function f is ǫ-modular it suffices to verify the approximate modularity equation |f (S) + f (T ) − f (S ∩ T ) − f (S ∪ T )| ≤ ǫ in the cases where S and T satisfy all of the following conditions: (a) |f (T )| ≤ |f (S)|; (b) 0 ≤ f (S) ≤ M ; and (c) f (S ∩ T ) ≤ f (S ∪ T ). Proof. Suppose that we wish to verify the approximate modularity condition |f (S)+ f (T )− f (S ∩ T ) − f (S ∩ T )| ≤ ǫ for two sets S and T . If S and T satisfy the three conditions in the lemma, then indeed the approximate modularity condition will be checked directly. Hence it remains to show that even if S and T do not satisfy some of the conditions of the lemma, there will be two other sets, say S ′ and T ′ , that do satisfy the conditions, and such that the approximate modularity condition holds for S ′ and T ′ if and only if it holds for S and T . Suppose that condition (a) is violated, namely, |f (T )| ≤ |f (S)|. Then simply interchange S and T and then condition (a) holds. Suppose that condition (a) holds and condition (b) is violated, namely, f (S) < f (T ). Then consider the complement sets S̄ and T̄ , for which both conditions (a) and (b) hold. By anti symmetry they satisfy f (S) = −f (S̄), f (T ) = −f (T̄ ), f (S ∩ T ) = −f (S̄ ∪ T̄ ), and f (S ∪ T ) = −f (S̄ ∩ T̄ ). Hence the approximate modularity condition for S̄ and T̄ implies it for S and T . 25 Suppose that conditions (a) and (b) hold, and condition (c) is violated, namely, f (S ∩ T ) > f (S ∪T ). In this case, consider the dual sets Ŝ and T̂ . By dual symmetry we have that f (S) = f (Ŝ), f (T ) = f (T̂ ), f (S ∩ T ) = f (Ŝ ∪ T̂ ), and f (S ∪ T ) = f (Ŝ ∩ T̂ ). Hence the approximate modularity condition for Ŝ and T̂ implies it for S and T . Moreover, for Ŝ and T̂ conditions (a), (b) are inherited from S and T , and condition (c) does hold.  C.2 Missing Proofs for Lower-Bounding the Strong Kalton Constant Ks Proof. [Claim 4.1] One can verify that the function f defined above is (k, M )-symmetric according to Definition C.3 for k = 4 and M = 2. The proof of this fact is omitted, but we remark that the main thing to check is that there are no two positive sets that are compliments of each other (and consequently antisymmetry is enforced by rule 3), and this (among other things) is implied by the proof of Claim C.7 below. Proposition C.4 implies that f is tightly 2-linear.  We say that S is a positive set if f (S) > 0, a negative set if f (S) < 0, and a zero set if f (S) = 0. Claim C.7. There is no pair of sets S and T such that one of them is positive and the other is negative and S ⊂ T . Proof. We show that no positive set is contained in a negative set. The opposite direction can be shown analogously. It is sufficient to show that no minimal positive set is contained in a maximal negative set. View each item as a balanced vector in {±1}8 . Let S be a minimal positive set. S is the intersection of two sets in PS, thus has two coordinates (out of eight), say 1 and 2, fixed to +1 and contains all items that agree with both. Let T be a maximal negative set. T is the union of two sets in NS, thus has two coordinates, say 3 and 4, fixed to −1 and contains all vectors that agree with at least one of the coordinates. The item corresponding to the vector that has +1 on all these four coordinates (here is where we used the fact that k ≥ 4) is in S but not in T .  Proof. [Claim 4.2] We show that f is 2-modular. Consider two sets S and T . By Lemma C.6, the cases in the following case analysis suffices in order to establish 2-modularity. 1. f (S) = 2 (namely, S ∈ PS). In this case both f (S ∪ T ) ≥ 0 and f (S ∩ T ) ≥ 0, by Claim C.7, a fact that will be implicitly used in the subcases below. (a) f (T ) = 2 (namely, T ∈ PS). In this case f (S ∪ T ) = f (S ∩ T ) = 1, by definition of f (rule 2). Thus, f (S) + f (T ) − f (S ∪ T ) − f (S ∩ T ) = 2. (b) f (T ) = 1. In this case f (S) + f (T ) = 3. So it suffices to show that either f (S ∪ T ) ≥ 1 or f (S ∩ T ) ≥ 1. By the definition of f , there are two possibilities: i. T is contained in some PS set S2 , and then f (S ∪ T ) ≥ 1 by the condition f (S1 ∪ (S2 ∩ R)) = 1 (with S1 serving as S). ii. T contains some PS set S2 , and then f (S ∩T ) ≥ 1 by the condition f (S1 ∩(S2 ∪R)) = 1. (c) f (T ) = 0. In this case f (S) + f (T ) = 2 and 0 ≤ f (S ∪ T ) + f (S ∩ T ) ≤ 4, satisfying the 2-modularity condition. (d) f (T ) < 0. Given that f (S) > 0 and f (T ) < 0 we have that f (S ∪ T ) = f (S ∩ T ) ≥ 0, by Claim C.7. Hence the stronger 1-modularity condition holds. 2. f (S) = 1. Both f (S ∪ T ) ≥ 0 and f (S ∩ T ) ≥ 0, by Claim C.7. 26 (a) f (T ) = 1. The 2-modularity condition then holds since f (S) + f (T ) = 2 and 0 ≤ f (S ∪ T ) + f (S ∩ T ) ≤ 4. (b) f (T ) = 0. Observe that it cannot be that both f (S ∪ T ) = 2 and f (S ∩ T ) = 2. Hence f (S) + f (T ) = 1 and 0 ≤ f (S ∪ T ) + f (S ∩ T ) ≤ 3, satisfying the 2-modularity condition. (c) f (T ) = −1. Given that f (S) > 0 and f (T ) < 0 we have that f (S ∪ T ) = f (S ∩ T ) ≥ 0, by Claim C.7. Hence f (S) + f (T ) = f (S ∪ T ) + f (S ∩ T ) in this case. 3. f (S) = f (T ) = 0. We need to show that −2 ≤ f (S ∪ T ) + f (S ∪ T ) ≤ 2. This might be violated only if max[|f (S ∪ T )|, |f (S ∪ T )|] = 2. Lemma C.6 implies that it suffices to consider the case that the set f (S ∪ T ) = 2. Namely, S ∪ T ∈ PS. Then necessarily |S ∩ T | < k and 0 ≤ f (S ∩ T ) < 2. We show that f (S ∩ T ) 6= 1, and then indeed −2 ≤ f (S ∪ T )+ f (S ∪ T ) ≤ 2. Given that |S∩T | < k, the only rule that might cause f (S∩T ) = 1 is that S∩T = S1 ∩(S2 ∪R), where S1 , S2 ∈ PS. But given that k ≥ 4 and that S ∪T (which we shall call P ) is also in PS, it follows that either S1 or S2 are equal to P . (No set in PS contains the intersection of two other sets from PS.) If S1 = P then S (and also T ) is sandwiched between S1 ∩ (S2 ∪ R) ⊂ S ⊂ S1 , and hence is itself of the form S = S1 ∩ (S2 ∪ R′ ), contradicting the assumption that f (S) = 0. If S2 = P then S (and also T ) is sandwiched between S1 ∩ (S2 ∪ R) ⊂ S ⊂ S2 , and this implies that without loss of generality R = ∅. Hence S is of the form S = (S1 ∪ R′ ) ∩ S2 , contradicting the assumption that f (S) = 0. Hence we established that f is 2-modular. C.3  Lower-Bounding the Weak Kalton Constant Kw We prove the lower bound stated in Theorem 1.3 on Kw . Proof. [Second part of Theorem 1.3] We show there exists a weakly 2-modular set function with n = 20 that is tightly 3-linear. Thus, Kw ≥ 23 . Consider the following (k, M )-symmetric function  f with k = 3 (hence with n = 63 = 20 items) and M = 3. The positive support sets (PS) form a canonical generating collection. The values of sets under f is determined by the first applicable rule (and hence f is well defined): 1. Each positive support set S ∈ PS has value f (S) = M = 3. 2. If there is some set P ∈ PS such that S ⊂ P and for every set N ∈ NS it holds that S 6⊂ N , then f (S) = 1. Likewise (enforcing the dual symmetry property of (k, M )-symmetric functions), if there is some set P ∈ PS such that P ⊂ S and for every set N ∈ NS it holds that N 6⊂ S, then f (S) = 1. 3. Enforcinging the antisymmetry property of (k, M )-symmetric functions, we impose −f (S) = f (S̄) and derive from this sets with negative value. 4. All other sets have value 0. One can verify (proof omitted) that the function f defined above is indeed (k, M )-symmetric according to Definition C.3. The reason why we choose k = 3 (and not smaller) is because we shall use the following claim. Claim C.8. For every two sets P1 , P2 ∈ PS and two sets N3 , N4 ∈ NS all the following hold: 27 1. P1 ∩ P2 6⊂ N3 . 2. N3 ∩ N4 6⊂ P1 . 3. P1 6⊂ N3 ∪ N4 . 4. N3 6⊂ P1 ∪ P2 . Proof. We prove only item 1, as the proofs of the remaining items are similar. Suppose without loss of generality that Pi (for i ∈ {1, 2}) contains those items whose vector representation in {±1}2k has bit i set to 1, and that N3 contains those items whose vector representation in {±1}2k has bit 3 set to −1. (If in N3 it was bit 1 that was set to −1, the proof would be immediate.) Then because k ≥ 3 the set P1 ∩ P2 contains a vector for which all three bits 1, 2 and 3 are set to 1, and hence is not in N3 .  Proposition C.4 implies that f is tightly 3-linear. In remains to show that f is weakly 2-modular. Consider two disjoint nonempty sets S and T . As S ∩ T = ∅, we have that f (S ∩ T ) = 0. Hence to prove weak 2-modularity, one needs to show that |f (S) + f (T ) − f (S ∪ T )| ≤ 2. Similar to the proof of Lemma C.6 it can be shown that one can assume without loss of generality that f (S) ≥ 0 and f (S) ≥ |f (T )|. We proceed by a case analysis. 1. f (S) = 3 (namely, S ∈ PS). In this case, because T is disjoint from S, we have that T ⊂ S̄ where S̄ ∈ NS. The definition of f then implies that f (T ) ≤ 0. We consider three cases. (a) f (T ) = 0. Given that T ⊂ S̄ and S̄ ∈ NS, for f (T ) = 0 to hold there must be some set P ∈ PS such that T ⊂ P . We claim that f (S ∪ T ) = 1 (which establishes weak 2-modularity, because f (S) + f (T ) = 3). Suppose for the sake of contradiction that f (S ∪ T ) 6= 1. As S ⊂ S ∪ T and S ∈ PS, this can happen only if there is a set N ∈ NS such that N ⊂ S ∪ T . But then N ∩ S̄ ⊂ T ⊂ P . Hence we found two sets in NS whose intersection lies in a set in PS, contradicting item 2 of Claim C.8. (b) f (T ) = −1. In this case f (S) + f (T ) = 2. We also have that f (S ∪ T ) ≥ 0 because S ⊂ S ∪ T and S ∈ PS. Hence regardless of the value of f (S ∪ T ), weak 2-modularity holds. (c) f (T ) = −3. In this case T = S̄ and S ∪T = U , implying that f (S ∪T ) = 0 = f (S)+f (T ). 2. f (S) = 1. Observe that the only way by which it may happen that f (S ∪ T ) < 0 is if there is some P ∈ PS such that S ⊂ P (leading to f (S) = 1, and there is some N ∈ NS such that N ⊂ S ∪ T , and f (S ∪ T ) = −1. (If S ∪ T ⊂ N then also S ⊂ N and it cannot be that f (S) = 1.) (a) f (T ) = 1. We claim that f (S ∪ T ) ≥ 0 (which implies that weak 2-modularity holds). Assume for the sake of contradiction that f (S ∪ T ) = −1. As noted above this implies that there is P ∈ PS with S ⊂ P , another P ′ ∈ PS with T ⊂ P ′ (because we can interchange S and T ), and N ∈ N S such that N ⊂ S ∪ T . But then N ⊂ P ∪ P ′ , contradicting item 4 of Claim C.8. (b) f (T ) = 0. In this case f (S) + f (T ) = 1, and regardless of the value of f (S ∪ T ) (which lies in the range [−1, 3]), weak 2-modularity holds. (c) f (T ) = −1. We need to show that |f (S ∪ T )| = 6 3. This follows from the fact that S in not contained in any set in NS, and T is not contained in any set in PS. 28 3. f (S) = f (T ) = 0. We need to show that |f (S ∪ T )| = 6 3. We show that S ∪ T 6∈ PS (and the proof that S ∪ T 6∈ NS is similar). Suppose for the sake of contradiction that S ∪ T = P with P ∈ PS. Then S ⊂ P , and the fact that f (S) = 0 implies that there is a set N1 ∈ NS such that S ⊂ N1 . Likewise, T ⊂ N2 for some N2 ∈ NS. Hence P ⊂ N1 ∪ N2 , contradicting item 3 of Claim C.8. Hence we established that f is weakly 2-modular, completing the proof. D D.1  Appendix to Section 5 (Learning) Tightness of Learning Algorithm Theorems similar to Theorem D.1 appear in the literature (see for example Singer and Vondrák [2015]). See also [Chierichetti et al., 2015, Corollary 23]. q q Theorem D.1. For ∆ ≤ logn n , no δ-learning algorithm exists for δ = o( logn n ), even for monotone ∆-linear set functions f , and even if one allows for unbounded computation time (but only polynomially-many value queries). Proof. (Sketch) Consider a random linear function g which contains a random set T of cardinality √ ∆ n n √ ∆ √ , in which each item has value q = , and the other items have value 0. Then g(T ) = 2 n log n 2 log n (which is at most 1), whereas g(T̄ ) = 0. Consider now a function f constructed as follows. Call √ √ n log n, positively unbalanced if |S ∩ T | − |S| n log n, a set S balanced if ||S ∩ T | − |S| 2 | ≤ 2 ≥ √ |S| |S| and negatively unbalanced if 2 − |S ∩ T | ≥ n log n. Then f (S) √ √ = 2 q for balanced sets, f (S) = g(S)− n log n for positively unbalanced sets, and f (S) = g(S)+ n log n for negatively unbalanced √ sets. Observe that g approximates f because q n log n = ∆. If there are only polynomially many queries then w.h.p., for every query S, the underlying set√is balanced. Hence these queries are not ∆ n − ∆.  informative in exposing T , and δ ≥ 12 (f (T ) − f (T̄ )) = 4√ log n References M.-F. Balcan and N. J. A. Harvey. Learning submodular functions. In Proceedings of the 43rd Annual ACM Symposium on Theory of Computing, pages 793–802, 2011. E. Balkanski, A. Rubinstein, and Y. Singer. The limitations of optimization from samples. Working paper, 2016. A. Belloni, T. Liang, H. Narayanan, and A. Rakhlin. Escaping the local minima via simulated annealing: Optimization of approximately convex functions. In Proceedings of the 28th Conference on Learning Theory, pages 240–265, 2015. D. Bertsimas and A. Thiele. Robust and Data-Driven Optimization: Modern Decision Making Under Uncertainty, chapter 5, pages 95–122. INFORMS PubsOnline, 2014. TutORials in Operations Research. M. Blum, M. Luby, and R. Rubinfeld. Self-testing/correcting with applications to numerical problems. J. Comput. Syst. Sci., 47(3):549–595, 1993. 29 A. V. Bondarenko, A. Prymak, and D. Radchenko. On concentrators and related approximation constants. J. Math. Anal. Appl., 402(1):234–241, 2013. F. Chierichetti, A. Das, A. Dasgupta, and R. Kumar. Approximate modularity. In Proceedings of the 56th Symposium on Foundations of Computer Science, pages 1143–1162, 2015. U. Feige. On maximizing welfare when utility functions are subadditive. SIAM J. Comput., 39(1): 122–142, 2009. U. Feige and R. Izsak. Welfare maximization and the supermodular degree. In Proceedings of the 4th Innovations in Theoretical Computer Science, pages 247–256, 2013. M. X. Goemans, N. J. A. Harvey, S. Iwata, and V. S. Mirrokni. Approximating submodular functions everywhere. In Proceedings of the 20th Annual ACM-SIAM Symposium on Discrete Algorithms, pages 535–544, 2009. A. Hassidim and Y. Singer. Submodular optimization under noise. Working paper available from https://arxiv.org/abs/1601.03095, 2016. D. H. Hyers. On the stability of the linear functional equation. PNAS, 27:222–224, 1941. S. Iwata, L. Fleischer, and S. Fujishige. A combinatorial strongly polynomial algorithm for minimizing submodular functions. J. ACM, 48(4):761–777, 2001. doi: 10.1145/502090.502096. URL http://doi.acm.org/10.1145/502090.502096. S. M. Jung. Functional Equations in Nonlinear Analysis. Springer, 2011. N. Kalton and J. W. Roberts. Uniformly exhaustive submeasures and nearly additive set functions. Transactions of the American Mathematical Society, 278(2):803–816, 1983. A. Krause and V. Cevher. Submodular dictionary selection for sparse representation. In Proceedings of the 27th International Conference on Machine Learning, pages 567–574, 2010. A. Krause, A. P. Singh, and C. Guestrin. Near-optimal sensor placements in gaussian processes: Theory, efficient algorithms and empirical studies. Journal of Machine Learning Research, 9: 235–284, 2008. B. Lehmann, D. Lehmann, and N. Nisan. Combinatorial auctions with decreasing marginal utilities. Games and Economic Behavior, 55:270–296, 2006. R. Paes Leme. Gross substitutability: An algorithmic survey. Working paper, 2014. B. Pawlik. Approximately additive set functions. Colloquium Mathematicae, 54(1):163–164, 1987. N. Pippenger. Superconcentrators. SIAM J. Comput., 6(2):298–304, 1977. T. Roughgarden, I. Talgam-Cohen, and J. Vondrák. When are welfare guarantees robust? Working paper available from https://arxiv.org/abs/1608.02402, 2016. A. Schrijver. A combinatorial algorithm minimizing submodular functions in strongly polynomial time. Journal of Combinatorial Theory, 80(2):346–355, 2000. Y. Singer and J. Vondrák. Information-theoretic lower bounds for convex optimization with erroneous oracles. In Proceedings of the 28th Annual Conference on Neural Information Processing Systems, 2015. 30
8cs.DS
arXiv:1507.01671v2 [math.GT] 21 Feb 2017 THE ASYMPTOTIC BEHAVIOR OF THE MINIMAL PSEUDO-ANOSOV DILATATIONS IN THE HYPERELLIPTIC HANDLEBODY GROUPS SUSUMU HIROSE AND EIKO KIN Dedicated to Professors Taizo Kanenobu, Yasutaka Nakanishi and Makoto Sakuma for their sixtieth birthdays Abstract. We consider the hyperelliptic handlebody group on a closed surface of genus g. This is the subgroup of the mapping class group on a closed surface of genus g consisting of isotopy classes of homeomorphisms on the surface that commute with some fixed hyperelliptic involution and that extend to homeomorphisms on the handlebody. We prove that the logarithm of the minimal dilatation (i.e, the minimal entropy) of all pseudo-Anosov elements in the hyperelliptic handlebody group of genus g is comparable to 1/g. This means that the asymptotic behavior of the minimal pseudo-Anosov dilatation of the subgroup of genus g in question is the same as that of the ambient mapping class group of genus g. We also determine finite presentations of the hyperelliptic handlebody groups. 1. Introduction Let Σg be a closed, orientable surface of genus g, and let Mod(Σg ) be the mapping class group on Σg . The hyperelliptic mapping class group H(Σg ) is the subgroup of Mod(Σg ) consisting of isotopy classes of orientation preserving homeomorphisms on Σg that commute with some fixed hyperelliptic involution S : Σg → Σg . If g ≥ 3, then H(Σg ) is of infinite index in Mod(Σg ), and it is a particular subgroup in some sense. Despite such a property, H(Σg ) plays a significant role to study the mapping class group Mod(Σg ). Especially, elements of H(Σg ) have a handy description via the spherical braid group SB2g+2 with 2g + 2 strings, which is proved by Birman-Hilden: H(Σg )/hιi ≃ SB2g+2 /h∆2 i, where ι = [S] ∈ H(Σg ) is the mapping class of S, and ∆ ∈ SB2g+2 is a half twist braid. Here hιi and h∆2 i are the subgroups generated by ι and ∆2 respectively. There exists a natural surjective homomorphism from SB2g+2 to the mapping class group Mod(Σ0,2g+2 ) on a sphere with 2g + 2 punctures: Γ : SB2g+2 → Mod(Σ0,2g+2 ) 2 with the kernel generated by ∆ . Let G be a subgroup of Mod(Σg ). Whenever G ∩ H(Σg ) contains a non-trivial element, it is worthwhile to consider the subgroup G ∩ H(Σg ) of Mod(Σg ). The group G ∩ H(Σg ) would be an intriguing one in its own right. Also we may have a chance to find new examples or phenomena on G by using a handy braid description of G ∩ H(Σg ). In the case G is the Torelli group I(Σg ) Date: February 22, 2017. 2000 Mathematics Subject Classification. Primary 57M27, 37E30, Secondary 37B40 . Key words and phrases. pseudo-Anosov, dilatation, handlebody group, hyperelliptic mapping class group, Hilden group, wicket group. The first author is supported by Grant-in-Aid for Scientific Research (C) (No. 16K05156), Japan Society for the Promotion of Science. The second author is supported by Grant-in-Aid for Scientific Research (C) (No. 15K04875), Japan Society for the Promotion of Science. 1 2 S. HIROSE AND E. KIN consisting of elements of Mod(Σg ) which act trivially on H1 (Σg ; Z), the hyperelliptic Torelli group I(Σg ) ∩ H(Σg ) is studied by Brendle-Margalit, see [6] and references therein. In this paper, we consider the handlebody group Mod(Hg ) as G. This is the subgroup of Mod(Σg ) consisting of isotopy classes of orientation preserving homeomorphisms on Σg that extend to homeomorphisms on the handlebody Hg of genus g. The main subgroup of Mod(Σg ) in this paper is the hyperelliptic handlebody group H(Hg ) = Mod(Hg ) ∩ H(Σg ). We prove a version of Birman-Hilden’s theorem about H(Hg ), and identify the subgroup of SB2g+2 corresponding to H(Hg ). More precisely, we prove in Theorem 2.11 that H(Hg )/hιi ≃ SW2g+2 /h∆2 i, where SW2g+2 is so called the wicket group. (See Section 2.5.1.) Hilden introduced a subgroup SH2g+2 of Mod(Σ0,2g+2 ) in [15], which is now called the (spherical) Hilden group. The group SH2g+2 is isomorphic to the image Γ(SW2g+2 ) under Γ : SB2g+2 → Mod(Σ0,2g+2 ) (Theorem 2.6). As an application of the above relation between H(Hg ) and SW2g+2 , we determine a finite presentation of H(Hg ) in Appendix A, see Theorem A.8 We are interested in the asymptotic behavior of the minimal dilatations of all pseudo-Anosov elements in H(Hg ) varying g. To state our results, we need some setup. Let Σ be an orientable, connected surface possibly with punctures. A homeomorphism Φ : Σ → Σ is pseudo-Anosov if there exist a pair of transverse measured foliations (F u , µu ) and (F s , µs ) and a constant λ = λ(Φ) > 1 such that Φ(F u , µu ) = (F u , λµu ) and Φ(F s , µs ) = (F s , λ−1 µs ). Then F u and F s are called the unstable and stable foliations, and λ is called the dilatation or stretch factor of Φ. The topological entropy ent(Φ) is precisely equal to log λ(Φ). A significant property of pseudo-Anosov homeomorphisms is that ent(Φ) attains the minimal entropy among all homeomorphisms on Σ which are isotopic to Φ, see [11, Exposé 10]. An element φ of the mapping class group Mod(Σ) of Σ is called pseudo-Anosov if φ contains a pseudo-Anosov homeomorphism Φ : Σ → Σ as a representative. In this case, we let λ(φ) = λ(Φ) and ent(φ) = ent(Φ), and we call them the dilatation and entropy of φ respectively. We call Ent(φ) = |χ(Σ)|ent(φ) the normalized entropy of φ, where χ(Σ) is the Euler characteristic of Σ. Let f : Σ → Σ be a representative of a given mapping class φ ∈ Mod(Σ). The mapping torus Tφ = T[f ] is defined by Tφ = Σ × R/ ∼, where ∼ identifies (x, t + 1) with (f (x), t) for x ∈ Σ and t ∈ R. We call φ the monodromy of Tφ . We sometimes call the representative f ∈ φ the monodromy of Tφ . The suspension flow f t on Tφ ∂ . The hyperbolization theorem by Thurston [33] states that is a flow induced by the vector field ∂t when a 3-manifold M is a surface bundle over the circle, that is M ≃ Tφ for some mapping class φ, M admits a hyperbolic structure if and only if φ is pseudo-Anosov. We fix a surface Σ, and consider the set of dilatations of all pseudo-Anosov elements on Σ: dil(Σ) = {λ(φ) | φ ∈ Mod(Σ) is pseudo-Anosov}. This is a closed, discrete subset of R, see [20] for example. In particular, given a subgroup G of Mod(Σ) which contains pseudo-Anosov elements, there exists a minimum δ(G) > 1 among dilatations of all pseudo-Anosov elements in G. Clearly we have δ(G) ≥ δ(Mod(Σ)). Let Σg,n be a 3 closed, orientable surface of genus g removed n punctures. We denote by δg and δg,n , the minimal dilatations δ(Mod(Σg )) and δ(Mod(Σg,n )) respectively. By pioneering work of Penner [27], the asymptotic equality log δg ≍ 1 g holds. Here A ≍ B means that there exists a universal constant c > 0 so that Ac < B < cA. In this case, we say that A is comparable to B. Penner proves this claim by using his lower bound log 2 log δg,n ≥ 12g+4n−12 ([27]). After work of Penner, one can ask the following. Question 1.1. Which sequence of subgroups G(g) ’s of Mod(Σg ) satisfies log δ(G(g) ) ≍ g1 ? Hironaka also studied Question 1.1 in [16]. To prove log δ(G(g) ) ≍ 1g , thanks to the Penner’s lower log 2 , it suffices to construct a sequence of pseudo-Anosov elements φ(g) ∈ G(g) bound log δg ≥ 12g−12 for g ≥ 2 whose normalized entropies Ent(φ(g) ) = (2g − 2)ent(φ(g) ) are uniformly bounded from above. It is a result by Farb-Leininger-Margalit that the dilatation of any pseudo-Anosov element in the Torelli group I(Σg ) has a uniform lower bound ([9, Theorem 1.1]). See also Agol-LeiningerMargalit [1]. On the other hand, the two subgroups H(Σg ) and Mod(Hg ) are examples of answers to Question 1.1. In fact, Hironaka-Kin prove in [18, Theorem 1.1], √ g log δ(H(Σg )) < log(2 + 3) ≈ 1.3169 for g ≥ 2. Hironaka proves in [16, Section 3.1], √ lim sup g log δ(Mod(Hg )) ≤ log(33 + 8 17) ≈ 4.1894. (1.1) g→∞ The main result of this paper is to prove that log δ(H(Hg )) is still comparable to 1/g. Theorem 1.2. We have log δ(H(Hg )) ≍ 1 g and log δ(SH2n ) ≍ n1 . Proposition 1.3. There exists a sequence of pseudo-Anosov braids w2n ∈ SW2n (n ≥ 3) such that lim n log(λ(w2n )) = 2 log κ, where κ = √ 1+ 5 2 √ n→∞ √ 2+2 5 2 3 ≈ 2.89005 equals the largest root of √ √ t4 − 2t − 2t2 − 2t + 1 = (t2 − (1 + 5)t + 1)(t2 − (1 − 5)t + 1). + The braids w2n ’s are written by the standard generators of the spherical braid groups concretely (Section 3). Theorem 1.2 follows from Proposition 1.3 as we explain now. We say that a braid b ∈ SB2g+2 is pseudo-Anosov if Γ(b) ∈ Mod(Σ0,2g+2 ) is a pseudo-Anosov mapping class. In this case, the dilatation λ(b) is defined by the dilatation λ(Γ(b)) of the pseudo-Anosov element Γ(b). On the other hand, there exists a surjective homomorphism Q : H(Hg ) → SH2g+2 with the kernel hιi (Theorem 2.11). If φ ∈ H(Hg ) is pseudo-Anosov, then Q(φ) ∈ SH2g+2 is also pseudo-Anosov. If Φ : Σ0,2g+2 → Σ0,2g+2 is a pseudo-Anosov homeomorphism which represents Q(φ), then one can take a pseudo-Anosov homeomoprhism Φ̃ : Σg → Σg which is a lift of Φ such that φ = [Φ̃]. Two pseudo-Anosov homeomorphisms Φ and Φ̃ have the same dilatation, since their local dynamics are the same. Hence we have λ(φ) = λ(Q(φ)). In particular we have δ(H(Hg )) = δ(SH2g+2 ) for g ≥ 2 (Lemma 2.12). Proposition 1.3 says that there exists a sequence of pseudo-Anosov elements Γ(w2n ) ∈ SH2n whose normalized entropies Ent(Γ(w2n )) are uniformly bounded from above. Thus the same thing occurs in H(Hg ). See Section 2.6. By Proposition 1.3 together with δ(H(Hg )) = δ(SH2g+2 ), the following holds. 4 S. HIROSE AND E. KIN Figure 1. Link L0 which gets the name L10n95 in the Thistlethwaite link table, see the Knot Atlas [22]. Theorem 1.4. We have lim sup g log δ(H(Hg )) ≤ 2 log κ ≈ 2.12255. g→∞ Since H(Hg ) is the subgroup of Mod(Hg ), we have δ(Mod(Hg )) ≤ δ(H(Hg )). Comparing Theorem 1.4 with (1.1), we find that Theorem 1.4 improves the previous upper bound of δ(Mod(Hg )) by Hironaka. In this sense, the sequence of pseudo-Anosov elements of H(Hg ) used for the proof of Theorem 1.4 is a new example for Mod(Hg ) whose normalized entropies are uniformly bounded from above. Let us mention a property of the sequence of pseudo-Anosov braids w2n ’s in Proposition 1.3 and give an outline of its proof. (See Section 3 for more details.) Let L0 be a link with 3 components as in Figure 1. The mapping torus of Γ(w6 ) ∈ Mod(Σ0,6 ) is homeomorphic to S 3 \ L0 , that is the complement of L0 in a 3-sphere S 3 . Thus once we prove that w6 is a pseudo-Anosov braid, it follows that S 3 \ L0 is a hyperbolic fibered 3-manifold. The sequence w8 , w10 , w12 , · · · has a property such that if k = 4n + 8, then the mapping torus of Γ(wk ) is homeomorphic to S 3 \ L0 , and if k = 4n + 6, then the fibration of the mapping torus of Γ(wk ) comes from a fibration of S 3 \ L0 by Dehn filling cusps along the boundary slopes of a fiber (which depends on k). A technique about disk twists (see Section 2.7) provides a method of constructing sequences of mapping classes on punctured spheres whose mapping tori are homeomorphic to each other. We use this technique for the construction of the sequence w8 , w12 , · · · , w4n+8 , · · · from the mapping torus of Γ(w6 ). We conclude that the braids w8 , w12 , · · · , w4n+8 , · · · are pseudo-Anosov from the fact that S 3 \ L0 is hyperbolic. We point out that our method by using disk twists quite suit to construct elements in the Hilden groups whose mapping tori are homeomorphic to each other. Now let Φ = Φ6 : Σ0,6 → Σ0,6 be the pseudo-Anosov homeomorphism which represents Γ(w6 ), and let τ6 and p6 : τ6 → τ6 be the invariant train track and the train track representative for Γ(w6 ) respectively. We find that λ(w6 ) is equal to the constant κ in Proposition 1.3. An analysis by using the suspension flow Φt on S 3 \ L0 and the train track representative p6 : τ6 → τ6 tells us the dynamics of the pseudo-Anosov homeomorphism which represents Γ(w4n+8 ) for each n ≥ 0. In particular one can construct the train track representative p4n+8 : τ4n+8 → τ4n+8 for Γ(w4n+8 ) concretely. From the ‘shape’ of the invariant train track τ4n+8 , we see that w4n+6 is a pseudo-Anosov braid with the same dilatation as w4n+8 . By a study of a particular fibered face for the exterior of the link L0 , we see that the normalized entropy of Γ(w4n+8 ) converges to the one of Γ(w6 ), which implies that Proposition 1.3 holds. From view point of fibered faces of fibered 3-manifolds, the sequence of mapping classes Γ(w4n+8 )’s are obtained from a certain deformation of the monodromy Γ(w6 ) on the Σ0,6 -fiber of the fibration on S 3 \ L0 . See also Hironaka [17] and Valdivia [34] for other constructions in which fibered faces on hyperbolic 3-manifolds are used crucially. 5 log 2 , Hironaka-Kin prove that log δ0,n ≍ n1 ([18]). In By using Penner’s lower bound log δ0,n ≥ 4n−12 fact, it is shown in [18] that the subgroup Γ(SB(n−1) ) of Mod(Σ0,n ) which consists of all mapping classes on an (n − 1)-punctured disk Dn−1 satisfies log δ(Γ(SB(n−1) )) ≍ n1 . (See Section 2.3 for the definition of SB(n−1) .) By Theorem 1.2, we have another example, namely the Hilden group SH2n , with the same property, that is the asymptotic behavior of the minimal dilatation of SH2n is the same as that of the ambient group Mod(Σ0,2n ). On the other hand, it is proved by Song that the dilatation of any pseudo-Anosov element of the pure braid groups has a uniform lower bound ([28]). We ask the following. Question 1.5. Which sequence of subgroups G(n) ’s of Mod(Σ0,n ) satisfies log δ(G(n) ) ≍ n1 ? The organization of this paper is as follows. In Section 2, we review basic facts on the Thurston norm and fibered faces on hyperbolic fibered 3-manifolds. We recall the connection between the spherical braid groups and the mapping class groups on punctured spheres. Then we recall the definitions of the Hilden groups and the wicket groups, and we describe a connection between them. We also introduce the hyperelliptic handlebody groups and give a relation between the hyperelliptic handlebody groups and the wicket groups. Lastly, we introduce the disk twists. In Section 3, we prove Proposition 1.3. In Apppendix A, we prove some claims given in Sections 2.5 and 2.6, and we determine a finite presentation of H(Hg ). Acknowledgements: The authors thank Tara E. Brendle and Masatoshi Sato for useful comments. 2. Preliminaries 2.1. Mapping class groups. Let Σ be a compact, connected, orientable surface removed the set of finitely many points P in its interior. The mapping class group Mod(Σ) is the group of isotopy classes of homeomorphisms on Σ which fix both P and the boundary ∂Σ as sets. We apply elements of Mod(Σ) from right to left. 2.2. Thurston norm, fibered faces and entropy functions. Let M be an oriented hyperbolic 3-manifold possibly with boundary. We recall some properties of the Thurston norm k · k : H2 (M, ∂M ; R) → R. For more details, see [31] by Thurston. See also [7, Sections 5.2, 5.3] by Calegari. Let F be a finite union of oriented, connected surfaces. We define χ− (F ) to be X χ− (F ) = max{0, −χ(Fi )}, Fi ⊂F where Fi ’s are the connected components of F . The Thurston norm k · k is defined for an integral class a ∈ H2 (M, ∂M ; Z) by kak = min{χ− (F ) | a = [F ]}, F where the minimum ranges over all oriented surfaces F embedded in M . A surface F which realizes the minimum is called a minimal representative or norm-minimizing of a. Then k · k defined on all integral classes admits a unique continuous extension k · k : H2 (M, ∂M ; R) → R which is linear on rays through the origin. A significant property of k · k is that the unit ball UM with respect to k · k is a finite-sided polyhedron. We take a top dimensional face Ω on the boundary ∂UM . Let CΩ be the cone over Ω with the origin, and let int(CΩ ) be its open cone, that is the interior of CΩ . When M is a hyperbolic fibered 3-manifold, the Thurston norm provides deep information about fibrations on M . 6 S. HIROSE AND E. KIN Theorem 2.1 (Thurston [31]). Suppose that M fibers over the circle S 1 with fiber F . Then there exists a top dimensional face Ω on ∂UM so that [F ] ∈ int(CΩ ). Moreover given any integral class a ∈ int(CΩ ), its minimal representative Fa becomes a fiber of a fibration on M . Such a face Ω and such an open cone int(CΩ ) are called a fibered face and fibered cone respectively, and an integral class a ∈ int(CΩ ) is called a fibered class. Now we take any primitive fibered class a ∈ int(CΩ ). The minimal representative Fa is a connected fiber of the fibration associated to a. If we let Φa : Fa → Fa be the monodromy of this fibration, then the mapping class φa = [Φa ] is necessarily pseudo-Anosov, since M is hyperbolic. One can define the dilatation λ(a) and entropy ent(a) to be the dilatation and entropy of pseudoAnosov φa . The entropy function defined on primitive fibered classes a’s can be extended to the entropy function on rational classes by homogeneity. An important property of such entropies, studied by Fried, Matsumoto and McMullen is that the function a 7→ ent(a) defined for rational classes a ∈ int(CΩ ) extends to a real analytic convex function on the fibered cone int(CΩ ), see [24] for example. Moreover the normalized entropy function Ent = k · kent : int(CΩ ) → R is constant on each ray in int(CΩ ) through the origin. Since M fibers over S 1 with fiber F , M is homeomorphic to a mapping torus T[Φ] , where Φ : F → F is the monodromy of the fibration associated to [F ] ∈ int(CΩ ). We may assume that Φ : F → F is a pseudo-Anosov homeomorphism with the stable and unstable foliations F s and F u . A surface F ′ is called a cross-section to the suspension flow Φt on M if F ′ is transverse to Φt and F ′ intersects every flow line. Let J1 and J2 be embedded arcs in M which are transverse to Φt . We say that J1 is connected to J2 if there exists a positive continuous function g : J1 → R which satisfies the following. For any x ∈ J1 , we have Φg(x) ∈ J2 and Φt (x) ∈ / J2 for 0 < t < g(x). Moreover the map : J1 → J2 given by g(x) x 7→ Φ (x) is a homeomorphism. In this case, we let [J1 , J2 ] = {Φt (x) | x ∈ J1 , 0 ≤ t ≤ g(x)}, and we call [J1 , J2 ] a flowband. We use flowbands in the proof of Proposition 1.3. Theorem 2.2 (Fried [13] for (1)(2), Thurston [31] for (3)). Let Φ : F → F , M ≃ T[Φ] and Ω be as cs and F cu denote the suspensions of F s and F u by Φ in M ≃ T[Φ] . For any minimal above. Let F representative Fa of any fibered class a ∈ int(CΩ ), we can modify Fa by an isotopy which satisfies the following. (1) Fa is transverse to Φt , and the first return map : Fa → Fa is precisely the pseudo-Anosov monodromy Φa : Fa → Fa of the fibration on M associated to a. Moreover Fa is unique up to isotopy along flow lines. (2) The stable and unstable foliations of the pseudo-Anosov homeomorphism Φa are given by cs ∩ Fa and F cu ∩ Fa respectively. F ′ (3) If a ∈ H2 (M, ∂M ; R) is represented by some cross-section to Φt , then a′ ∈ int(CΩ ). 2.3. Spherical braid groups. Let SBm be the spherical braid group with m strings. We depict braids vertically in this paper. We define the product of braids as follows. Given b, b′ ∈ SBm , we stuck b on b′ , and concatenate the bottom ith endpoint of b with the top ith endpoint of b′ for each 1 ≤ i ≤ m. Then we get m strings, and the product bb′ ∈ SBm is the resulting braid (after rescaling such m strings), see Figure 2. We often label the numbers 1, · · · , m (from left to right) at the bottom of a given braid. Let σi denote a braid of SBm obtained by crossing the ith string under the (i + 1)st string, see Figure 3(1). (Here the ith string means the string labeled i at the 7 b b b' b' Figure 2. Braids b, b′ and bb′ . bottom.) It is well-known that SBm is a group generated by σ1 , σ2 , · · · , σm−1 , and its relations are given by (1) σi σj = σj σi if |i − j| ≥ 2, (2) σi σi+1 σi = σi+1 σi σi+1 for i = 1, · · · , m − 2, 2 (3) σ1 σ2 · · · · · · σm−2 σm−1 σm−2 · · · σ2 σ1 = 1. We recall a connection between SBm and Mod(Σ0,m ). Let c1 , · · · , cm be the punctures of Σ0,m . Let hi be the left-handed half twist about the arc between the ith and (i + 1)st punctures ci and ci+1 , see Figure 3(2). We define a homomorphism Γ : SBm → Mod(Σ0,m ) which sends σi to hi for i ∈ {1, · · · , m − 1}. Since Mod(Σ0,m ) is generated by h1 , · · · , hm−1 , Γ is surjective. If we let ∆ = ∆m = (σ1 σ2 · · · σm−1 )(σ1 σ2 · · · σm−2 ) · · · (σ1 σ2 )σ1 which is a half twist braid, then the kernel of Γ is isomorphic to Z/2Z which is generated by a full twist braid ∆2 . Thus SBm /h∆2 i ≃ Mod(Σ0,m ). Given a braid b ∈ SBm , the mapping torus TΓ(b) of Γ(b) is denoted by Tb for simplicity. Remark 2.3. Each m-braid as in Figure 3(1) with the orientation from the bottom of strings to the top induces the motion of m points on the sphere. This gives rise to the above homomorphism Γ, which maps σi to hi . In this paper, we denote the braid in Figure 3(1) by σi . We say that a braid b ∈ SBm is pseudo-Anosov if Γ(b) is a pseudo-Anosov mapping class. In this case, we define the dilatation λ(b) of b to be the dilatation λ(Γ(b)). Also, we let Φb : Σ0,m → Σ0,m be the pseudo-Anosov homeomorphism which represents Γ(b), and let Fb be the unstable foliation for Φb . Let SB(m−1) be the subgroup of SBm which is generated by σ1 , · · · , σm−2 . (Hence a braid ±1 b ∈ SB(m−1) is represented by a word without σm−1 .) As we will see in Section 2.4, SB(m−1) is closely related to the (m − 1)-braid group Bm−1 . 2.4. Braid groups. We recall a connection between the two groups (m − 1)-braid group Bm−1 on a disk and the mapping class group Mod(Dm−1 ), where Dm−1 is a disk with m − 1 punctures c1 , · · · , cm−1 . By abusing notations, we denote by σi , the braid of Bm−1 obtained by crossing the 8 S. HIROSE AND E. KIN H i (l i ) i+2 i-1 Hi li i i+1 i-1 i+2 (2) (1) Figure 3. (1) σi . (2) Action of a representative Hi ∈ hi on ℓi , where ℓi is a vertical arc which passes through the horizontal arc between the punctures ci and ci+1 , see Remark 2.4. b b b braid axis Figure 4. Braid β, closure cl(β), and braided link br(β) from left to right. ith string under the (i+1)st string. The braid group Bm−1 with m−1 strings is the group generated by σ1 , · · · , σm−2 having the following relations. (1) σi σj = σj σi if |i − j| ≥ 2, (2) σi σi+1 σi = σi+1 σi σi+1 for i = 1, · · · , m − 3. Abusing notations again, we denote by hi , the left-handed half twist about the arc between the ith and (i + 1)st punctures of Dm−1 . We also use Γ for the surjective homomorphism Γ : Bm−1 → Mod(Dm−1 ) which sends σi to hi for i ∈ {1, · · · , m − 2}. In this case, the kernel of Γ is an infinite cyclic group generated by the full twist braid ∆2 = ∆2m−1 . We have a homomorphism c : Mod(Dm−1 ) → Mod(Σ0,m ) hi 7→ hi which is induced by the map that sends the boundary of the disk to the mth puncture of Σ0,m . Observe that c(Γ(Bm−1 )) = c(Mod(Dm−1 )) = Γ(SB(m−1) ). 9 Given β ∈ Bm−1 , we denote the mapping torus Tc(Γ(β)) of c(Γ(β)) by Tβ for simplicity. Let cl(β) be the closure of β (or the closed braid of β). We have Tβ ≃ S 3 \ br(β), (that is Tβ is homeomorphic to S 3 \ br(β)) where br(β) is the braided link of β which is a union of cl(β) and its braid axis, see Figure 4. Remark 2.4. Recall that we apply elements of the mapping class groups from right to left. This convention together with the homomorphism Γ from Bm−1 to Mod(Dm−1 ) gives rise to an orientation of strings of β from the bottom to the top, which is compatible with the direction of the suspension flow on Tβ = S 3 \ br(β). We say that β ∈ Bm−1 is pseudo-Anosov if c(Γ(β)) is pseudo-Anosov. In this case, we define the dilatation λ(β) of β to be the dilatation λ(c(Γ(β))). ±1 By definition, an m-braid b ∈ SB(m−1) is represented by a word without σm−1 . Removing the last string of b, we get an (m − 1)-braid on a sphere. If we regard such a braid as the one on a disk, we have an (m − 1)-braid b with the same word as b. By definition of b, we have c(Γ(b)) = Γ(b). Since Tb = Tc(Γ(b)) = TΓ(b) = Tb , we have Tb = Tb . We get the following lemma immediately. Lemma 2.5. A braid b ∈ SB(m−1) is pseudo-Anosov if and only if b ∈ Bm−1 is pseudo-Anosov. In this case, the equality λ(b) = λ(b) holds, and Tb (= Tb ) is a hyperbolic fibered 3-manifold. 2.5. Hilden groups and wicket groups. 2.5.1. Relations between Hilden groups and wicket groups. First of all, we define a subgroup of Mod(Σ0,2n ) which was introduced by Hilden [15]. Let A1 , · · · , An be n disjoint trivial arcs properly embedded in a unit ball D 3 as in Figure 5(1). More precisely, each Ai is unknotted and the union A = An = A1 ∪ · · · ∪ An is unlinked. Such Ai ’s are called wickets. Let Homeo+ (D 3 , A) be the set of orientation preserving homeomorphisms on D 3 preserving A setwise. For each Ψ ∈ Homeo+ (D 3 , A), we have the restriction Ψ|∂D3 : (∂D 3 , ∂A) → (∂D 3 , ∂A) which is an orientation preserving homeomorphism on a 2-sphere S 2 = ∂D 3 preserving 2n points of ∂A setwise. Its isotopy class [Ψ|∂D3 ] gives rise to an element of Mod(Σ0,2n ). We define a homomorphism Mod(D 3 , A) → Mod(Σ0,2n ) which sends a mapping class [Ψ] of Ψ ∈ Homeo+ (D 3 , A) to the mapping class [Ψ|∂D3 ]. This homomorphism is injective, see for example [5, p.484] or [15, p.157]. We prove this claim in Appendix A for the convenience of readers, see Proposition A.4. The group Mod(D 3 , A) or its homomorphic image into Mod(Σ0,2n ) is called the (spherical) Hilden group SH2n . Let us describe SH2n by using certain subgroup of the spherical braid group SB2n of 2n strings. Given a braid b ∈ SB2n , we stuck b on A = A1 ∪ · · · ∪ An , and concatenate the bottom endpoints of b with the endpoints of A, see Figure 5(2). Then we obtain n disjoint smooth arcs b A properly embedded in D 3 . We may suppose that the arcs b A have the same endpoints as A. The (spherical) wicket group SW2n is the subgroup of SB2n generated by braids b’s such that b A is isotopic to A relative to ∂A. For example, the following braids are elements of SW . 2n −1 −1 σ2i ri = σ2i σ2i+1 σ2i−1 (i ∈ {1, · · · , n − 1}), −1 −1 −1 −1 si = σ2i σ2i+1 σ2i−1 σ2i (i ∈ {1, · · · , n − 1}), −1 tj = σ2j−1 (j ∈ {1, · · · , n}), 10 S. HIROSE AND E. KIN A1 A2 An 6D (1) 3 b b (2) (3) Figure 5. (1) A = A1 ∪ · · · ∪ An . (2) b A. (3) pl(b). see Figure 6(1)(2)(3). Now we recall the homomorphism Γ : SB2n → Mod(Σ0,2n ). We claim that Γ(ri ), Γ(si ) and Γ(tj ) are elements of SH2n . Indeed, Γ(ri ) (resp. Γ(si )) interchanges the ith and (i + 1)st wickets Ai , Ai+1 by passing Ai through (resp. around) Ai+1 . Γ(tj ) rotates the jth wicket Aj 180 degrees around its vertical axis of the symmetry, see Figure 6(4)(5)(6). Theorem 2.6. The Hilden group SH2n is the image of the homomorphism Γ|SW2n : SW2n → Mod(Σ0,2n ) whose kernel is equal to h∆2 i. In particular, SW2n /h∆2 i ≃ SH2n . We shall prove Theorem 2.6 in Appendix A by using a finite generating set of SW2n (resp. SH2n ) given by Brendle-Hatcher [5] (resp. Hilden [15]). We note that the definition of the spherical wicket groups in [5] is different from the one in this paper. We shall claim in Appendix A that these two definitions give rise to the same group, see Proposition A.1. The wicket groups are closely related to the loop braid groups which arise naturally in the different fields of mathematics. For more details of loop braid groups, see Damiani [8]. For a finite presentation of the Hilden group on a plane, see Tawn [30]. 2.5.2. Plat closures of braids. In this section, we prove that SW2n is of infinite index in SB2n for n ≥ 2. (We do not use this claim in the rest of the paper.) To do this, we turn to the plat closures of braids which were introduced by Birman. Given b ∈ SB2n , the plat closure of b, denoted by pl(b), is a link in S 3 obtained from b putting trivial n arcs on n pairs of consecutive, bottom (resp. top) 2n endpoints of b, see Figure 5(3). Observe that given two braids w, w′ ∈ SW2n , the plat closures pl(b) and pl(wbw′ ) represent the same link. Moreover the plat closure of any element w ∈ SW2n , pl(w), is a disjoint union of n unknots. Every link in S 3 can be represented by the plat closure of some braid with even strings [2, Theorem 5.1]. Birman characterizes two braids with the same strings whose plat closures yield the same link [2, Theorem 5.3]. Fore more discussion on plat closures of braids, see [2, Chapter 5]. Lemma 2.7. SW2n is of infinite index in SB2n for n ≥ 2. Proof. We take a braid b = σ2 σ2 6∈ SW2n . Given w, w′ ∈ SW2n , we have pl(bk ) = pl(bk w′ ) = pl(wbk ) for each integer k, and the link pl(bk ) contains the (2, 2k) torus link (as components) which is not a disjoint union of unknots for each k 6= 0. In particular both bk w′ , wbk ∈ / SW2n . This implies that SW2n is of infinite index in SB2n for n ≥ 2.  By Lemma 2.7, the Hilden group SH2n is of infinite index in Mod(Σ0,2n ) for n ≥ 2, since SW2n /h∆2 i ≃ SH2n and SB2n /h∆2 i ≃ Mod(Σ0,2n ). 11 Ai+1 Ai 1 2i 2i+1 2n (1) (4) A i+1 Ai 1 2i 2n 2i+1 (2) (5) Aj 1 2j-1 2j 2n (3) (6) Figure 6. (1) ri , (2) si and (3) tj ∈ SW2n . (4) Γ(ri ), (5) Γ(si ) and (6) Γ(tj ) ∈ SH2n . See also Remark 2.3. (cf. [5, Figure 2].) 2.6. Hyperelliptic handlebody groups. Let Hg be a handlebody of genus g, i.e, Hg is an oriented 3-manifold obtained from a 3-ball attaching g copies of a 1-handle. We take an involution S : Hg → Hg whose quotient space Hg /S is a 3-ball D 3 with a union of wickets A = A1 ∪ · · · ∪ Ag+1 as the image of the fixed point sets of S under the quotient, see Figure 7. We call S the hyperelliptic involution on Hg . The restriction S|∂Hg : ∂Hg → ∂Hg defines an involution on ∂Hg ≃ Σg . For simplicity, we denote such an involution S|∂Hg by the same notation S, and also call it the hyperelliptic involution on ∂Hg . The quotient space ∂Hg /S is a 2-sphere with 2g + 2 marked points that are the image of the fixed points set of S : ∂Hg → ∂Hg under the quotient. Let H(Σg ) be the subgroup of Mod(Σg ) consisting of isotopy classes of orientation preserving homeomorphisms on Σg that commute with S : ∂Hg → ∂Hg . Such a group H(Σg ) is called the hyperelliptic mapping class group or symmetric mapping class group. Note that Mod(Σ2 ) = H(Σ2 ). If g ≥ 3, then H(Σg ) is of infinite index in Mod(Σg ). By the fundamental result by BirmanHilden [3], one has a handy description of H(Σg ) via braids, as we explain now. Note that any homeomorphism on ∂Hg that commute with S fixes the fixed points set of S : ∂Hg → ∂Hg as a set. Hence via the quotient of ∂Hg by S, such a homeomoprhism on ∂Hg descends to a homeomorphism on a sphere ∂Hg /S which preserves the 2g + 2 marked points of ∂Hg /S. Thus we have a map q : H(Σg ) → Mod(Σ0,2g+2 ) by using a representative of each mapping class of H(Σg ) which commutes with S. Let ι ∈ H(Σg ) denote a mapping class of S : ∂Hg → ∂Hg which is of order 2. 12 S. HIROSE AND E. KIN Theorem 2.8 (Birman-Hilden). For g ≥ 2, the map q : H(Σg ) → Mod(Σ0,2g+2 ) is well-defined, and it is a surjective homomorphism with the kernel hιi. In particular, H(Σg )/hιi ≃ Mod(Σ0,2g+2 ) ≃ SB2g+2 /h∆2 i. Thurston’s classification theorem of surface homeomorphisms states that every mapping class φ ∈ Mod(Σ) is one of the three types: periodic, reducible, pseudo-Anosov ([32]). The following well-known lemma says that q preserves these types. Lemma 2.9. If φ ∈ H(Σg ) is pseudo-Anosov (resp. periodic, reducible), then so is q(φ) ∈ Mod(Σ0,2g+2 ), i.e, q(φ) is pseudo-Anosov (resp. periodic, reducible). When φ ∈ H(Σg ) is pseudoAnosov, the equality λ(φ) = λ(q(φ)) holds. Proof. It is not hard to see that if φ is periodic (resp. reducible), then q(φ) is periodic (resp. reducible). Suppose that φ ∈ H(Σg ) is pseudo-Anosov. Then we see that q(φ) is pseudo-Anosov. If not, then it is periodic or reducible. Assume that q(φ) is periodic. (The proof in the reducible case is similar.) We take a periodic homeomorphism f : Σ0,2g+2 → Σ0,2g+2 which represents q(φ). Consider a lift f˜ : Σg → Σg of f . Then f˜ is a periodic homeomorphism which represents φ. Thus φ = [f˜] is a periodic mapping class, which contradicts the assumption that φ is pseudo-Anosov. We consider a pseudo-Anosov homeomorphism Φ : Σ0,2g+2 → Σ0,2g+2 which represents the pseudo-Anosov mapping class q(φ). Take a lift Φ̃ of Φ which represents φ ∈ H(Σg ). Then Φ̃ is a pseudo-Anosov homeomorphism whose stable/unstable foliations are lifts of the stable/unstable foliations of Φ. In particular, we have λ(Φ̃) = λ(Φ), since Φ and Φ̃ have the same dynamics locally.  By Theorem 2.8 and Lemma 2.9, we have the following. Corollary 2.10. We have δ(H(Σg )) = δ0,2g+2 for g ≥ 2. Let Mod(Hg ) be the group of isotopy classes of orientation preserving homeomorphisms on Hg . We call Mod(Hg ) the handlebody group. We denote by SHomeo+ (Hg ), the group of orientation preserving homeomorphisms on Hg which commute with S : Hg → Hg . Let H(Hg ) be the subgroup of Mod(Hg ) consisting of isotopy classes of elements in SHomeo+ (Hg ). We call H(Hg ) the hyperelliptic handlebody group. Abusing the notation, we also denote by ι ∈ H(Hg ), the mapping class of S : Hg → Hg . One can define a homomorphism Mod(Hg ) → Mod(Σg ) which sends a mapping class [Ψ] of an orientation preserving homeomorphism Ψ : Hg → Hg to the mapping class [Ψ|∂Hg ] of Ψ|∂Hg : ∂Hg → ∂Hg . This homomorphism is injective ([12, Theorem 3.7]), and not surjective ([29, Section 3.12]). We also call the homomorphic image of Mod(Hg ) in Mod(Σg ) the handlebody group, and also call the homomorphic image of H(Hg ) in Mod(Σg ), the hyperelliptic handlebody group. As subgroups of Mod(Σg ), we have H(Hg ) = Mod(Hg ) ∩ H(Σg ). We have Mod(H2 ) = H(H2 ) since Mod(Σ2 ) = H(Σ2 ) holds. If g ≥ 2, then Mod(Hg ) is of infinite index in Mod(Σg ); If g ≥ 3, then H(Hg ) is of infinite index in Mod(Hg ), see Remark A.7 in Appendix A. In the end of this section, we give a description of H(Hg ) via SW2g+2 . Any element of SHomeo+ (Hg ) fixes the fixed points set of S : Hg → Hg as a set, and hence such an element descends to a homeomorphism on Hg /S ≃ D 3 which preserves A as a set. Thus a map Q : H(Hg ) → SH2g+2 13 A1 A2 (1) A g+1 (2) Figure 7. (1) Hyperelliptic involution S : Hg → Hg (on a handlebody Hg ) which is a rotation by 180 degrees about the indicated axis. The fix points set of S is illustrated by dotted segments. The restriction S = S|∂Hg : ∂Hg → ∂Hg defines an involution on ∂Hg ≃ Σg . (2) Hg /S ≃ D 3 with A = A1 ∪ A2 ∪ · · · ∪ Ag+1 . is obtained. When we think H(Hg ) as the subgroup of Mod(Σg ) (resp. SH2g+2 as the subgroup of Mod(Σ0,2g+2 )), we have the restriction of the homomorphism q in Theorem 2.8 (2.1) Q = q|H(Hg ) : H(Hg ) → SH2g+2 . The following theorem, which is a version of Birman-Hilden’s theorem 2.8, is useful. Theorem 2.11. For g ≥ 2, the map Q : H(Hg ) → SH2g+2 is well-defined, and it is a surjective homomorphism with the kernel hιi. In particular, H(Hg )/hιi ≃ SH2g+2 . For a proof of Theorem 2.11, see Appendix A. By Theorems 2.6 and 2.11, we have H(Hg )/hιi ≃ SW2g+2 /h∆2 i ≃ SH2g+2 . Lemma 2.9 and Theorem 2.11 imply the following. Lemma 2.12. We have δ(H(Hg )) = δ(SH2g+2 ) for g ≥ 2. 2.7. Disk twists. We will discuss a method of constructing links in S 3 whose complements are the same. Let L be a link in S 3 . We denote a tubular neighborhood of L by N (L), and the exterior of L, that is S 3 \ int(N (L)) by E(L). Suppose that L contains an unknot K ⊂ L. Then E(K) (resp. ∂E(K)) is homeomorphic to a solid torus (resp. torus). We denote the link L \ K by LK . We take a disk D bounded by the longitude of N (K). By using D, we define two homeomorphisms T = TD : E(K) → E(K) called the (left-handed) disk twist about D and H = HD : E(L)(= E(K ∪ LK )) → E(K ∪ TD (LK )) as follows. We cut E(K) along D. We have resulting two sides obtained from D. Then we reglue the two sides by rotating either of the sides 360 degrees so that the mapping class of the restriction T |∂E(K) : ∂E(K) → ∂E(K) defines the left-handed Dehn twist about ∂D, see Figure 8(1). Such an operation defines the former homeomorphism TD : E(K) → E(K). If m segments of LK pass through D, then T (LK ) is obtained from LK by adding a full twist braid ∆2m near D. In the case m = 2, see Figure 8(2). Notice that TD : E(K) → E(K) determines the latter homeomorphism H = HD : E(L)(= E(K ∪ LK )) → E(K ∪ T (LK )). 14 S. HIROSE AND E. KIN l D TD TD (l) LK D D TD (L K ) TD D (2) (1) Figure 8. (1) Action of TD on ℓ, where ℓ is an arc on ∂E(K) which passes through ∂D. (2) Local picture of LK and its image TD (LK ). K parallel m segments K D TD D D K’ K K’ TD (LK) TD (K’) K’ (1) D LK (2) (3) Figure 9. Small circles in (1), (2) (resp. (3)) indicate the intersection between LK and D (resp. between TD (LK ) and D). For any integer ℓ 6= 0, we have a homeomorphism of the ℓth power T ℓ = TDℓ : E(K) → E(K) so that T ℓ |∂E(K) : ∂E(K) → ∂E(K) is the ℓth power of the left-handed Dehn twist about ∂D. Observe that T ℓ = TDℓ converts L = K ∪ LK into a link K ∪ T ℓ (LK ) in S 3 such that S 3 \ L is homeomorphic ℓ , a homeomorphism: E(L)(= E(K ∪L )) → E(K ∪T ℓ (L )). to S 3 \(K ∪T ℓ (LK )). We denote by HD K K The following remark is used in the proof of Proposition 1.3. Remark 2.13. Let L be a link in S 3 . Suppose that L contains two unknotted components K and K ′ such that K ∪ K ′ is the Hopf link. Let D be a disk bounded by the longitude of N (K). We assume that parallel m ≥ 1 segments of LK \ K ′ pass through D, see Figure 9(1) in the case m = 2. (LK \ K ′ may intersect with the disk bounded by the longitude of N (K ′ ).) Pushing D along the meridian of N (K), one can put the resulting disk D as in Figure 9(2). The small circles in Figure 9(2) indicate the intersection between LK and D. Now we consider the disk twist T about D, that is, we cut E(K) along D and we reglue the two sides obtained from D by rotating one of the sides by 360 degrees. In this case, one can choose the intersection point D ∩ K ′ as an origin of the rotation of D. As a result, we get a local diagram of the link T (LK ) shown in Figure 9(3) so that T = TD fixes K ′ . (See K ′ and TD (K ′ ) in Figure 9(2)(3).) 3. Proof of Proposition 1.3 We introduce a sequence of braids w2n ∈ SW2n . Let w6 = σ2−1 σ1−1 σ3 σ2 σ4 σ32 σ4 σ3 = σ2−1 σ1−1 σ3 σ2 σ4 σ3 σ4 σ3 σ4 ∈ SB(5) , 15 (1) (2) Figure 10. (1) w6 ∈ SB(5) ∩ SW6 . (2) w8 ∈ SB(7) ∩ SW8 . see Figure 10(1). (For the definition of the subgroup SB(m−1) of SBm , see Section 2.3.) Since is isotopic to A relative to ∂A, we have w6 ∈ SW6 . In order to define a sequence of braids w8 , w10 , · · · , we introduce x4n+8 , y4n+8 ∈ SB(4n+7) for each n ≥ 0 as follows. w6 A x4n+8 = σ5 σ2−1 σ1−1 (σ3 σ4 · · · σ4n+5 )(σ2 σ3 · · · σ4n+4 )σ4n+6 (σ4n+5 )2 σ4n+6 , y4n+8 = (σ1 σ2 · · · σ4n+5 )4 σ4n+6 σ4n+5 σ4n+4 (σ4n+3 )2 σ4n+4 σ4n+5 σ4n+6 , see Figure 11(1)(2). It is straightforward to check that b A is isotopic to A relative to ∂A when b = x4n+8 , y4n+8 . Thus x4n+8 , y4n+8 ∈ SW4n+8 . We let w4n+8 = x4n+8 (y4n+8 )n ∈ SB(4n+7) ∩ SW4n+8 , where (y8 )0 = 1 ∈ SB(7) . For example, in the case of n = 0, w8 = x8 (y8 )0 = σ5 σ2−1 σ1−1 σ3 σ4 σ5 σ2 σ3 σ4 σ6 σ52 σ6 , see Figure 10(2). Notice that the last two strings ((4n + 7)th and (4n + 8)th strings) of both x4n+8 and y4n+8 define the identity 1 ∈ SB2 , see Figure 11(1)(2). Thus we obtain the (4n + 6)-spherical braid by removing the last two strings from w4n+8 . In the case n ≥ 1, we denote by w4n+6 , the resulting (4n + 6)-braid. Said differently if we let x4n+6 (resp. y4n+6 ) be the (4n + 6)-spherical braid obtained from x4n+8 (resp. y4n+8 ) by removing the last two strings from x4n+8 (resp. y4n+8 ), then w4n+6 is given by w4n+6 = x4n+6 (y4n+6 )n , see Figure 11(3)(4). Clearly w4n+6 ∈ SW4n+6 , since w4n+8 ∈ SW4n+8 . Remark 3.1. The braid w6 ∈ SW6 is not the same as the braid which is obtained from w8 as above. The latter braid is not used in the rest of the paper. In the proof of the next lemma, we use some basic facts on train tracks of pseudo-Anosov homeomorphisms. See [4, 26] for more details. For a quick review about train tracks, see [21, Section 2.1] which contains terms and basic facts needed in this paper. Lemma 3.2. The braid w6 ∈ B5 is pseudo-Anosov, and λ(w6 ) equals κ, where κ is the constant given in Proposition 1.3. Proof. We choose a train track τ ⊂ D5 with non-loop edges p1 , · · · , p6 as in Figure 12(1), where c1 , · · · , c5 are punctures of D5 . Each component of D5 \ τ is either a 1-gon with one puncture, a 3-gon (without punctures), or a 1-gon containing the boundary of the disk (see the illustration of 16 S. HIROSE AND E. KIN 1 2 4n+6 (1) 1 2 x4n+8 1 2 4n+6 (3) 4n+6 (2) 4n+8 4n+8 x4n+6 1 2 y4n+8 4n+6 (4) y4n+6 Figure 11. (1) x4n+8 and (2) y4n+8 ∈ SB(4n+7) ∩ SW4n+8 . (3) x4n+6 and (4) y4n+6 ∈ SW4n+6 . (In (1)–(4), dots indicate parallel strings.) τ ⊂ D5 × {0} on the bottom of Figure 12(3)). We consider the braid w6 with base points c1 , · · · , c5 . We push τ on D5 along the suspension flow on S 3 \ br(w6 ), then we get the train track τ ′ on D5 × {1} illustrated in Figure 12(2). This implies that there exists a representative f ∈ Γ(w6 ) such that τ ′ = f (τ ). Here, the edge (pi ) of τ ′ in Figure 12(2) denotes the image of pi under f . We see that f (τ ) is carried by τ , and hence τ is an invariant train track1 for Γ(w6 ). Let N (τ ) be a fibered (tie) neighborhood of τ whose fibers (ties) are segment given by a retraction R : N (τ ) → τ . Then we get a train track representative p = R ◦ f |τ : τ → τ for Γ(w6 ). It turns out that p1 , · · · , p6 are 2real edges for p, and other loop edges of τ are periodic under p, and hence they are infinitesimal edges. The incident matrix Mp with respect to real edges is given by   2 0 0 0 0 1  2 0 0 2 1 0     1 0 1 1 1 0   . Mp =   0 0 2 1 2 0    1 0 0 0 0 0  0 1 0 0 0 0 1One can use the software Trains [14] to find invariant train tracks for pseudo-Anosov braids. 2We recall the terminology in Bestvina-Handel [4]. An edge e of τ for a train track representative p : τ → τ is called infinitesimal if e is eventually periodic under p. Otherwise e is called real. 17 (p2 ) (p1 ) (p6 ) (p5 ) (p4 ) (p3 ) (2) c2 c4 p p 2 p 3 c1 p 1 p 5 6 p 4 c3 c5 (3) (1) Figure 12. (1) τ ⊂ D5 . (2) τ ′ ⊂ D5 . (3) We get τ ′ ⊂ D5 × {1} by pushing τ ⊂ D5 × {0} along the suspension flow on S 3 \ br(w6 ).   For example, we get t 0 0 1 2 0 0 for the 3rd column of Mp , since f (p3 ) passes through p3 once and p4 twice in either direction. (See the edge path (p3 ) in Figure 12(2).) Since the 5th power Mp5 is positive, Mp is Perron-Frobenius and we conclude that w6 is pseudo-Anosov. The characteristic polynomial of Mp equals (t − 1)2 (t4 − 2t3 − 2t2 − 2t + 1), and the largest root κ of the second factor gives us λ(w6 ).  The type of singularities of the (un)stable foliation for the pseudo-Anosov homeomorphism Φ = Φw6 : Σ0,6 → Σ0,6 can be read from the topological types of components of Σ0,6 \ τ . See [4, Section 3.4] which describes a construction of invariant measured foliations. Notice that two component of Σ0,6 \ τ are non punctured 3-gons. The other components are once punctured 1-gons. Thus exactly two points in the interior of Σ0,6 have 3 prongs and each puncture of Σ0,6 has a 1 prong. Observe that br(w6 ) is the link with 3 components. The following lemma says that complements of both links br(w6 ) and L0 (Figure 1) are the same. Lemma 3.3. Tw6 is homeomorphic to S 3 \ L0 . In particular S 3 \ L0 is a hyperbolic fibered 3manifold. Proof. We use another diagram of L0 illustrated in Figure 13(1). The link L0 contains two unknots K and K 0 so that K ∪ K 0 is the Hopf link. We take the disk D bounded by the longitude of N (K). We may assume that L0 \ K(= (L0 )K ) intersect with D at the three points indicated by small circles in the same figure. We apply the argument (in the case m = 2) of Remark 2.13, and consider the disk twist about D, see Figure 13(2). It turns out that K ∪ TD (L0 \ K) is of the form br(w6 ), see Figure 13(3). Thus S 3 \ L0 is homeomorphic to S 3 \ br(w6 )(= S 3 \ (K ∪ TD (L0 \ K))). 18 S. HIROSE AND E. KIN K K K0 K' (1) (2) (3) Figure 13. (1) A diagram of L0 . (K ∪ K 0 is the Hopf link.) (2) K ∪ TD (L0 \ K). (3) br(w6 ). Since Tw6 is homeomorphic to S 3 \ br(w6 ) and w6 is pseudo-Anosov by Lemma 3.2, we complete the proof.  Let Fg,n be a compact, connected, orientable surface of genus g with n boundary components. Let M0 be the exterior of the link L0 . By Lemma 3.3, we let a6 ∈ H2 (M0 , ∂M0 ; Z) be the homology class of the F0,6 -fiber of the fibration on M0 whose monodromy is described by w6 ∈ SB6 . Lemma 3.4. Tw4n+8 is homeomorphic to Tw6 for each n ≥ 0. In particular w4n+8 ∈ B4n+7 is pseudo-Anosov for each n ≥ 0. Proof. We prove that S 3 \br(w4n+8 ) is homeomorphic to S 3 \br(w6 ). To do this, we use Remark 2.13 twice. The braided link br(w6 ) contains two unknotted components, the braid axis K ′ and the closure of the last string of w6 , say K so that K ∪ K ′ is the Hopf link. Let D ′ be the disk bounded by the longitude of N (K ′ ). Consider the nth power of the disk twist TDn ′ for n ≥ 0. Following Remark 2.13, we take the point D ′ ∩ K as an origin of the rotation of D ′ for the disk twists TDn ′ . Then we have the diagram of K ′ ∪ TDn ′ (br(w6 ) \ K ′ ) = K ′ ∪ TDn ′ (cl(w6 )) shown in Figure 14(2). Note that TDn ′ (cl(w6 )) is isotopic to cl(w6 ∆2n ), that is the closure of w6 ∆2n = w6 (σ1 σ2 σ3 σ4 )5n . Thus K ′ ∪ TDn ′ (br(w6 ) \ K ′ ) = br(w6 ∆2n ), n is a homeomorphism from E(br(w )) to E(K ′ ∪ T n (br(w ) \ K ′ )) ≃ E(br(w ∆2n )). (See and HD ′ 6 6 6 D′ n Section 2.7 for HD′ .) The closure of the last string of w6 ∆2n ∈ B5 is an unknot, say K ′′ which n equals the identity bounds a disk D ′′ . (In the case n = 0, we have K = K ′′ , D = D ′′ and HD ′ map.) We apply the argument of Remark 2.13, and consider the disk twist TD′′ taking the point of D ′′ ∩ K ′ as an origin of the rotation of the disk D ′′ for TD′′ . It turns out that K ′′ ∪ TD′′ (br(w6 ∆2n ) \ K ′′ ) = br(x4n+8 (y4n+8 )n )(= br(w4n+8 )). To see the equality, we first note that br(w6 ∆2n ) \ (K ′ ∪ K ′′ ) intersects with D ′′ at 2 + 4n points, see Figure 14(2). We arrange, by an isotopy, 2 + 4n intersection points in a line which is parallel to K ′′ . Then view the image TD′′ (br(w6 ∆2n ) \ K ′′ ) following the local move under the disk twist TD′′ , see Figure 9(2)(3). (Here m in Figure 9(1) is equal to 2 + 4n.) Figure 15 explains this procedure in the case n = 2. The above equality implies that HD′′ is a homeomorphism from E(br(w6 ∆2n )) to E(K ′′ ∪ n sends E(br(w )) TD′′ (br(w6 ∆2n ) \ K ′′ )) ≃ E(br(w4n+8 )). The composition of the maps HD′′ ◦ HD ′ 6 19 K'' K ∆4 K' K' K' (1) (2) Figure 14. Identifying the top and bottom of strings, we get (1) br(w6 ) and (2) br(w6 ∆2n ), where n = 2 in this figure. Figure (1) indicates orientations of K and K ′ . Figure (2) explains br(w6 ∆2n ) \ K ′′ intersects with D ′′ at 3 + 4n points (indicated by small circles). Hence br(w6 ∆2n ) \ (K ′ ∪ K ′′ ) intersects with D ′′ at 2 + 4n points. to E(br(w4n+8 )). Thus S 3 \ br(w6 ) is homeomorphic to S 3 \ br(w4n+8 ). Since Tw6 = S 3 \ br(w6 ) is hyperbolic, we conclude that by Lemma 2.5, the braid w4n+8 is pseudo-Anosov.  By Lemma 3.4, we let a4n+8 ∈ H2 (M0 , ∂M0 ; Z) be the homology class of the F0,4n+8 -fiber of the fibration on M0 whose monodromy is described by w4n+8 . To study properties of such a fibered class, we take a 3-punctured disk F ≃ Σ0,4 embedded in S 3 \ br(w6 ) so that F is bounded by the unknotted component K ⊂ br(w6 ), i.e, F is an interior of the disk D removed the set of 3 points (br(w6 ) \ K) ∩ D. To choose an orientation of F , we consider an orientation of the last string of w6 from the top to the bottom. This determines an orientation of K (see Figure 14(1)), and we have an orientation of F induced by K. Let F̄ be the oriented disk with 3 holes (i.e, sphere with 4 boundary components) embedded in E(br(w6 )), which is obtained from D removed the interiors of the 3 disks whose centers are the above 3 points. The fibered class a4n+8 can be expressed by using a6 and [F̄ ] ∈ H2 (M0 , ∂M0 ; Z) as follows. Lemma 3.5. We have a4n+8 = (n + 1)a6 + [F̄ ] ∈ H2 (M0 , ∂M0 ; Z) for each n ≥ 0. In particular, the ray of a4n+8 through the origin goes to the ray of a6 as n goes to ∞. Proof. Recall that Fa6 is a minimal representative of a6 . In other words, Fa6 is a F0,6 -fiber of the fibration on M0 associated to a6 . We consider the oriented sum nFa6 + F̄ which is an oriented surface embedded in M0 . This surface is obtained by the cut and paste construction of parallel n copies of Fa6 and a copy of F̄ . (For the construction of the oriented sum, see [31, p104] or [7, Section 5.1.1].) We take a surface F ′′ embedded in M0 , which is a disk with (3+4n) holes as follows. Consider the disk D ′′ bounded by the longitude of N (K ′′ ). Then remove the interiors of small (3 + 4n) disks from D ′′ whose centers are the (3 + 4n) intersection points (br(w6 ∆2n ) \ K ′′ ) ∩ D ′′ , 20 S. HIROSE AND E. KIN K'' ∆4 K' K' (2) (1) Figure 15. Illustrations of two braided links (1) br(w6 ∆4 ) and (2) br(x16 (y16 )2 )(= br(w16 )). To get actual two braided links, we duplicate each of the braid strings except the last one. Each small rectangle  in (1) represents some two small circles given in Figure 14(2). The ‘virtual’ crossings • in both figures (1)(2) mean σ2−1 σ1−1 σ3 σ2 . see Figure 14(2). We denote by F ′′ , the resulting disk with (3 + 4n) holes. We see that the n : E(br(w )) → E(br(w ∆2n )) in the proof of Lemma 3.4 sends nF + F̄ to homeomorphism HD ′ 6 a6 6 ′′ F . Hence [F ′′ ] = [nFa6 + F̄ ] = na6 + [F̄ ] ∈ H2 (M0 , ∂M0 ; Z). n (F )] = [F ](= a ). We now consider the oriented sum H n (F ) + F ′′ . Then Obviously [HD ′ a6 a6 a6 6 D′ n (F ) + F ′′ to the HD′′ : E(br(w6 ∆2n )) → E(br(w4n+8 )) in the proof of Lemma 3.4 sends HD ′ a6 F0,4n+8 -fiber of the fibration on M0 associated to a4n+8 . Putting all things together, we have ′′ ′′ n n a4n+8 = [HD ′ (Fa6 ) + F ] = [HD ′ (Fa6 )] + [F ] = a6 + na6 + [F̄ ] = (n + 1)a6 + [F̄ ]. Thus lim a4n+8 n→∞ n+1 = lim (a6 + n→∞ [F̄ ] n+1 ) = a6 . This completes the proof.  Since the normalized entropy function Ent is constant on each ray through the origin in the fibered cone, Lemmas 3.2, 3.3, 3.4 and 3.5 tell us that (3.1) lim |χ(F0,4n+8 )| log(λ(w4n+8 )) = |χ(F0,6 )| log(λ(w6 )) = 4 log κ. n→∞ Since |χ(F0,4n+8 )| = 4n + 6 goes to ∞ as n does, and the right-hand side is constant, we conclude that (3.2) lim log λ(w4n+8 ) = 0. n→∞ Let Ω be a fibered face of M0 such that a6 ∈ int(CΩ ). Lemma 3.5 implies that a4n+8 ∈ int(CΩ ) for n large. We shall prove in Lemma 3.6 that the fibered class a4n+8 lies in int(CΩ ) for each n ≥ 0. Recall that K and K ′ are the unknotted components of br(w6 ). We choose an orientation 21 of K ′ as in Figure 14(1). For an embedded surface Ŝ in M0 = E(br(w6 )), we denote by ∂K (Ŝ) and ∂K ′ (Ŝ), the components of the boundary ∂ Ŝ of Ŝ which lie on ∂N (K) and ∂N (K ′ ) respectively. Let Φ̂ : F0,6 → F0,6 be a pseudo-Anosov homeomorphism whose mapping class [Φ̂] is described by w6 . (Thus T[Φ̂] is homeomorpphic to E(br(w6 )) ≃ M0 .) Lemma 3.6. We have a4n+8 ∈ int(CΩ ) for each n ≥ 0. Proof. The minimal representative Fa6 is transverse to the suspension flow Φ̂t obviously, but F̄ is not, since both ∂K F̄ and ∂K ′ F̄ are parallel to flow lines of Φ̂t . (See also Figure 16(3) and its caption.) We prove that the oriented sum (n + 1)Fa6 + F̄ for n ≥ 0 is transverse to Φ̂t (up to isotopy) and it intersects every flow line. This means that (n + 1)Fa6 + F̄ is a cross-section to Φ̂t for E(br(w6 )). By Theorem 2.2(3), we have a4n+8 = [(n + 1)Fa6 + F̄ ] ∈ int(CΩ ). By the proof of Lemma 3.5, (n + 1)Fa6 + F̄ becomes a fiber of the fibration on M0 associated to a4n+8 . Hence we may assume that (3.3) Fa4n+8 = (n + 1)Fa6 + F̄ . We have the meridian and longitude basis {mK , ℓK } for ∂N (K) and {mK ′ , ℓK ′ } for ∂N (K ′ ). It follows that [∂K Fa4n+8 ] = (n + 1)mK + ℓK 6= ±ℓK ∈ H1 (∂N (K)) and [∂K ′ Fa4n+8 ] = (n + 1)ℓK ′ + mK ′ 6= ±mK ′ ∈ H1 (∂N (K ′ )). This implies that both ∂K Fa4n+8 and ∂K ′ Fa4n+8 are transverse to every flow line of Φ̂t , since [∂K F̄ ] = ′ F̄ ] = m ′ . By (3.3), F ℓK and [∂K a4n+8 is an oriented sum obtained from the (n + 1) copies of Fa6 K and the surface F̄ . Hence the shape of the embedded surface Fa4n+8 in M0 is of a ‘spiral staircase’ which turns round (n + 1) times along ℓK . Therefore Fa4n+8 is transverse to Φ̂t . Moreover Fa4n+8 intersects every flow line of Φ̂t (by construction of (n + 1)Fa6 + F̄ (= Fa4n+8 )), since so does Fa6 . This completes the proof.  Lemma 3.7. If n ≥ 1, then w4n+6 is pseudo-Anosov and the equality λ(w4n+6 ) = λ(w4n+8 ) holds. In particular Tw4n+6 is a hyperbolic fibered 3-manifold obtained from Tw4n+8 by Dehn fillings about the two cusps along the boundary slopes of the fiber associated to aw4n+8 . We work on the cusped 3-manifold Tw6 = Tw6 ≃ S 3 \ L0 instead of M0 with boundary. To prove Lemma 3.7, we shall construct an invariant train track for Γ(w4n+8 ) concretely, and study types of singularities of the unstable foliation Fw4n+8 of the pseudo-Anosov homeomorphism Φw4n+8 : Σ0,4n+8 → Σ0,4n+8 which represents Γ(w4n+8 ). The same idea in [21, Section 3] for the construction of train tracks can be used. We repeat a similar argument modifying some claims of [21] in a suitable way for the present paper. Hereafter we use basic properties on branched surfaces. See [25] for more details on the theory of branched surfaces. By using the pseudo-Anosov homeomorphism Φ = Φw6 : Σ0,6 → Σ0,6 , we build the mapping torus Tw6 = Σ0,6 × R/(x,t+1)=(Φ(x),t) for x ∈ Σ0,6 and t ∈ R. Given a subset U ⊂ Σ0,6 , we define U t ⊂ Tw6 to be the image U × {t} under the projection p : Σ × R → Tw6 . We have an orientation preserving homeomorphism h : S 3 \ br(w6 ) → Tw6 . v = Recall that F is an oriented 4-punctured sphere in S 3 \ br(w6 ). Choose an orientation of Σ0,6 Σ0,6 × {v} for each v ∈ R so that its normal direction coincides with the flow Φt direction. We 22 S. HIROSE AND E. KIN shall capture the image h(F ) in Tw6 . To do this, let s be a segment between the punctures c5 and c6 . Since Φ fixes c5 and c6 pointwise (see the last two strings of w6 in Figure 10(1)), s ∪ Φ(s) bounds a 2-gon. Viewing the image Φ(s), we see that the 2-gon contains the punctures c1 and c2 , see Figure 16. Such a 2-gon removed c1 and c2 is denoted by S ⊂ Σ0,6 . The segment s0 = s × {0} is connected to s1 = s × {1}, and these segments make a flowband J = [s0 , s1 ] which is illustrated in Figure 16(3). Since s1 = (Φ(s))0 in Tw6 , the union S 0 ∪ J(= (S × {0}) ∪ J) ⊂ Tw6 defines a 4-punctured sphere, see Figure 16(3). The set of punctures of F maps to the set of punctures of S 0 ∪ J under h. This tells us that h(F ) = S 0 ∪ J up to isotopy. For simplicity, S 0 ∪ J in Tw6 is denoted by F . We choose 0 < ǫ < 2ǫ < 1. We push F (= S 0 ∪ J) ⊂ Tw6 along the flow lines for ǫ times so that the resulting 4-punctured sphere, denoted by F ǫ , satisfies ǫ F ǫ ∩ Σ0,6 = S ǫ (= S × {ǫ}), 2ǫ = Σ see Figure 18(2) for S ǫ . By using F ǫ and Σ0,6 0,6 × {2ǫ} which corresponds to a fiber Fa6 of the fibration on M0 , we set Bb = F ǫ ∪ Σ 2ǫ . 0,6 2ǫ ) after we We get the branched surface B from Bb (which agrees with the orientations of F ǫ and Σ0,6 modify the flowband [sǫ , (Φ(s))ǫ ] = [sǫ , s1 ] ∪ [(Φ(s))0 , (Φ(s))ǫ ] 2ǫ ∈ [sǫ , s1 ]. (cf. For the illustration of this modification, see of F ǫ near the segment s2ǫ = F ǫ ∩ Σ0,6 [21, Figure 14].) By Lemmas 3.4 and 3.5, there exists a Σ0,4n+8 -fiber of the fibration on Tw6 with the monodromy Γ(w4n+8 ). We denote such a fiber by Σw4n+8 . By (3.3), we have (3.4) Σw4n+8 = F + (n + 1)Σ0,6 . By the construction of B, we see that Σw4n+8 is carried by B. Let Fb ⊂ Tw6 be the suspension of the unstable foliation F for Φ. We may assume that the train track τ ⊂ D5 in the proof of Lemma 3.2 lies on Σ0,6 . Then τ is an invariant train track for Γ(w6 ) = [Φ]. Theorem 2.2(1)(2) and Lemma 3.6 imply the following. Lemma 3.8. The pseudo-Anosov homeomorphism Φw4n+8 : Σw4n+8 → Σw4n+8 is precisely the first return map: Σw4n+8 → Σw4n+8 of Φt . Moreover Fw4n+8 = Fb ∩ Σw4n+8 . We turn to the construction of the branched surface BΩ which carries Fb. First of all, we note that τ is obtained from Φ(τ ) by folding edges (or zipping edges), see Figure 17. We choose a family of train tracks {τt }0≤t≤1 on Σ0,6 as follows. (1) (2) (3) (4) τ0 = Φ(τ ). τt at t = ǫ is a train track illustrated in Figure 17(middle in the left column). τt = τ for 2ǫ ≤ t ≤ 1. If 0 ≤ s < t ≤ 2ǫ, then τt = τs or τt is obtained from τs by folding edges between a cusp of τs . We let BΩ = [ 0≤t≤1 τt × {t} ⊂ Tw6 . 23 Since τ1 × {1} = τ0 × {0} in Tw6 (see the above conditions (1)(3)), it follows that BΩ is a branched surface. Since the invariant train track τ carries the unstable foliation F, we see that BΩ carries Fb. It is not hard to see that BΩ is transverse to the previous branched surface B (up to isotopy). Let τ4n+8 = Σw4n+8 ∩ BΩ , (3.5) which is a branched 1-manifold, see Figure 19(1). Since Σw4n+8 is carried by B, we may put (n + 1) copies of Σ0,6 which is a part of Σw4n+8 (see (3.4)) into Σ0,6 × (2ǫ, 1). We may also assume that a ǫ . Then intersections Σ 2ǫ ∩ B copy of F which is another part of Σw4n+8 satisfies that S ǫ = F ∩ Σ0,6 Ω 0,6 2ǫ determine τ and S ǫ ∩ BΩ (see Figure 18) together with s2ǫ = F ǫ ∩ Σ0,6 4n+8 . More concretely, τ4n+8 2ǫ ∩ B , see (3.4), (3.5). We label is constructed from a copy of S ǫ ∩ BΩ and (n + 1) copies of Σ0,6 Ω (j) (j) (j) q1 , q2 , q3 , p1 , p2 , · · · , p6 (1 ≤ j ≤ n + 1) for non-loop edges of τ4n+8 . Notice that edges of q1 , q2 , q3 come from the edges of S ǫ ∩ BΩ and the rest of non-loop edges come from the edges of 2ǫ ∩ B . The n + 1 edges p(1) , · · · , p(n+1) for each 1 ≤ i ≤ 6 originate in the edges of Σ 2ǫ ∩ B . Σ0,6 Ω Ω 0,6 i i (j) If we fix i, then the number of the labeling (j) in pi increases along the flow direction. We call (1) (1) (n+1) (n+1) , · · · , p6 the top edges, q1 , q2 , q3 the bottom edges, and p1 , · · · , p6 the second bottom p1 edges etc. See Figure 19(1). Lemma 3.9. The branched 1-manifold τ4n+8 is a train track, and the unstable foliation Fw4n+8 of Φw4n+8 is carried by τ4n+8 . Proof. Since a4n+8 lies in the same fibered cone as a6 (Lemma 3.6), Fw4n+8 is given by Fb ∩ Σw4n+8 (Lemma 3.8) and the suspension Fbw4n+8 of Fw4n+8 by Φw4n+8 is isotopic to Fb, see [24, Corollary 3.2]. Since Fb is carried by BΩ , so is Fbw4n+8 . Thus Fw4n+8 is carried by Σw4n+8 ∩ BΩ (= τ4n+8 ). Observe that each component of Σw4n+8 \ τ4n+8 is either a 1-gon with one of the punctures c1 , · · · , c4n+6 , an (n + 2)-gon with the puncture c4n+7 , an (n + 1)-gon with the puncture c4n+8 or a 3-gon without punctures. (“Vertical” (n + 2) edges of τ in Figure 19(left) bound an (n + 2)-gon containing c4n+7 .) Since no bigon component is contained in Σw4n+8 \ τ4n+8 , we conclude that τ4n+8 is a train track which carries Fw4n+8 .  Since Φw4n+8 : Σw4n+8 → Σw4n+8 is the first return map for Φt , conditions (1)–(4) in the family {τt }0≤t≤1 ensure that the image of τ4n+8 under the first return map Φw4n+8 is carried by τ4n+8 , that is τ4n+8 is invariant under Γ(w4n+8 ) = [Φw4n+8 ]. Figure 19(2) shows the image of edges of (n+1) (n+1) τ4n+8 under Φw4n+8 . The top edges p1 , · · · , p6 map to the edge paths of the bottom and (n+1) second bottom edges under the first return map. This is because these edges pi ’s arrive at (n+1) (n+1) (n+1) 1 × {1} = Φw6 (pi ) × {0} holds in pi × {1} ⊂ Σ0,6 first along the flow lines. The identity pi (n+1) (n+1) Tw6 . We get the image of pi under the first return map when we push Φw6 (pi ) × {0} along the flow Φt until it hits the fiber Σw4n+8 . The rest of non-loop edges except q3 map to the above (n) (n+1) , and edge in Tw6 along the suspension flow (cf. Figure 12(1)(2)). For example, p1 maps to p1 (1) (1) (1) q1 maps to p1 . The edge q3 maps to p3 and p4 . Let p4n+8 : τ4n+8 → τ4n+8 be the train track representative under [Φw4n+8 ]. One can check that all non-loop edges of τ4n+8 are real edges for p4n+8 . The incident matrix Mp4n+8 with respect to real edges must be Perron-Frobenius, since τ4n+8 carries the unstable foliation of the pseudo-Anosov homeomorphism Φw4n+8 . Thus the largest eigenvalue of Mp4n+8 gives us λ(w4n+8 ). Lemma 3.10. For each n ≥ 0, λ(w4n+8 ) equals the largest root of the polynomial t6n+9 − 2t5n+8 − 2t5n+7 + 3t4n+6 + 3t2n+3 − 2tn+2 − 2tn+1 + 1. 24 S. HIROSE AND E. KIN The proof of Lemma 3.10 can be done by the computation of the characteristic polynomial of Mp4n+8 . Alternatively one can compute λ(w4n+8 ) from the clique polynomial of the curve complex G4n+8 associated to the directed graph Γ4n+8 for p4n+8 : τ4n+8 → τ4n+8 . In general, the curve complex G associated to a directed graph Γ is an undirected graph together with the weight on 1 the set of vertices V (G) of G. A consequence of results of McMullen in [23] tells us that λ(w4n+8 ) equals the smallest positive root of the clique polynomial of G4n+8 . In this case, the topological types of the undirected graph G4n+8 (ignoring its weight on the set of vertices) do not depend on n. This makes the computation of the clique polynomial of G4n+8 straightforward. One can also prove Lemma 3.10 from the computation of the Teichmüler polynomial associated to the fibered face Ω by using the invariant train track for Γ(w6 ). For Teichmüler polynomials, see [24]. Lemmas 3.2, 3.7, 3.10 allow us to compute λ(w2k ) for k ≥ 3. See Table 1. Table 1. Computation of λ(w2k ) for small k. λ(w6 ) ≈ 2.89005 λ(w8 ) ≈ 2.26844 n ≥ 1 λ(w4n+8 ) = λ(w4n+6 ) 1 ≈ 1.56362 2 ≈ 1.36516 3 ≈ 1.27074 4 ≈ 1.21532 5 ≈ 1.17882 6 ≈ 1.15293 7 ≈ 1.13361 8 ≈ 1.11863 9 ≈ 1.10668 10 ≈ 1.09692 11 ≈ 1.08879 12 ≈ 1.08193 13 ≈ 1.07605 14 ≈ 1.07096 15 ≈ 1.06651 Remember that types of singularities of Fw2n+8 can be read from the shapes of the components of Σw4n+8 \ τ4n+8 . From the proof of Lemma 3.9, we have the following. Lemma 3.11. The unstable foliation Fw4n+8 of Φw4n+8 has properties such that the last puncture c4n+8 has (n + 1) prongs and the second last puncture c4n+7 has (n + 2) prongs. Proof of Lemma 3.7. If n ≥ 1, then Fw4n+8 has the property such that last two punctures of Σ0,4n+8 have more than 1 prong (Lemma 3.11). Thus Fw4n+8 extends to the unstable foliation on Σ0,4n+6 by filling last two punctures. This means that the pseudo-Anosov homeomorphism Φw4n+8 : Σ0,4n+8 → Σ0,4n+8 extends to the pseudo-Anosov homeomorphism on Σ0,4n+6 which represents Γ(w4n+6 ) with the same dilatation as Φw4n+8 . The latter statement on Tw4n+6 in Lemma 3.7 is clear from the definition of the braid w4n+6 .  25 c2 c1 c4 c3 c6 c5 s (1) J S0 (s) (3) (2) Figure 16. (1) Segment s, (2) (s) := Φ(s) up to isotopy relative to endpoints of Φ(s). See also Figure 12(2). (3) Surface F = S 0 ∪ J (shaded region) in Tw6 . To get Tw6 , we glue Σ0,6 × {1} and Σ0,6 × {0} by Φ ∈ Γ(w6 ). Two “vertical” dotted lines are the orbits of c5 and c6 for Φt . Dotted two circles (boundaries of the disks) correspond with the last punctures of Σ0,6 × {1} and Σ0,6 × {0}. Proof of Proposition 1.3. By Lemma 3.7 together with (3.1), (3.2), we have lim 2(2n + 4) log(λ(w4n+8 )) = lim 2(2n + 3) log(λ(w4n+6 )) = 4 log κ. n→∞ n→∞ Both sides divided by 2 give us the desired claim.  Finally we ask the following question. Question 3.12 (cf. Question√4.2 in [16]). We know from the proof of Proposition 1.3 and from √ √ 5 ) = 2(2 log λ(w6 )) is an accumulation point of the following Lemma 3.2 that 4 log( 1+2 5 + 2+2 2 set of normalized entropies of pseudo-Anosov elements in H(Hg ): {Ent(φ) = (2g − 2) log λ(φ) | φ ∈ H(Hg ) is pseudo-Anosov, g ≥ 2}. √ √ √ 5 Is the accumulation point 4 log( 1+2 5 + 2+2 ) the smallest one? 2 Appendix A. A finite presentation of H(Hg ) In this appendix, we will prove some claims referred in Sections 2.5 and 2.6 and determine a finite presentation for H(Hg ) (Theorem A.8). Here we make some remarks on the spherical wicket group SW2n . Let SAn be the space of configurations of n disjoint smooth unknotted and unlinked arcs in D 3 with endpoints on ∂D 3 . 26 S. HIROSE AND E. KIN fo l ding τ2e fo l ding τe τ0 Figure 17. Left column shows train tracks τ0 = Φ(τ ) (bottom), τǫ (middle), τ2ǫ = τ (top). τ is obtained from Φ(τ ) by folding edges between a cusp. Right column explains how to fold edges from τ0 to τǫ (bottom) and from τǫ to τ2ǫ (top). t=1 s 2e t=2 e (1) t= e se t=0 Se (3) (2) 2ǫ ∩ B (see also Figure 17(top of left Figure 18. (1) s2ǫ (broken line) and Σ0,6 Ω ǫ ǫ column)). (2) s (broken line)[and S ∩ BΩ ⊂ S ǫ (see also Figure 17(middle of left column). (3) Σ0,6 × [0, 1](⊃ τt × {t}). 0≤t≤1 27 p(n+1) 2 p(n+1) p(n+1) (n) (n) (p 2 ) 6 3 p(n+1) 1 n+1 copies p(n+1) p(n+1) (n) (n) (p 4 ) (n) (p 1 ) 4 5 (p 6 ) (n) (p 3 ) (p 5 ) p(n) p(n) 2 6 p(n) 3 p(n) p(n) p(n) 1 4 5 (n+1) p(1) 2 p(1) (q2 ) (q1 ) p(1) 6 (p 3 (n+1) (p 2 ) ) 3 p(1) p(1) p(1) 1 4 5 (n+1) (p 1 (q3 ) ) (n+1) (p 5 ) (n+1) (p 4 q 2 q q 1 (n+1) 3 (p 6 (1) ) (n+1) (p 5 (n+1) (p 3 ) ) ) (2) Figure 19. (1) τ4n+8 and (2) its image Φw4n+8 (τ4n+8 ) up to isotopy, where n = 2 in this figure. Small circles indicate all punctures of Σ0,4n+8 but the last one. The last puncture corresponds to ∂D of a disk D such that τ4n+8 ⊂ D. 1 s Ps / 2 0 (1) (2) Figure 20. (1) b ∈ SW2n . (2) A path in SAn corresponding to b. Brendle-Hatcher [5] defined the spherical wicket group to be π1 (SAn ). We shall see in Proposition A.1 that π1 (SAn ) ≃ SW2n . In [5, p.156–157], it is shown that the natural homomorphism from π1 (SAn ) to SB2n induced by the map sending a configuration of n arcs to the configuration of its endpoints is injective. By this injection, we regard π1 (SAn ) as the subgroup of SB2n . The wicket group W2n is defined as a subgroup of the braid group B2n in the same way as the definition of SW2n given in Section 2.5. Let An be the space of configurations of n disjoint smooth unknotted and unlinked arcs in R3+ = {(x, y, z) ∈ R3 | z ≥ 0} with endpoints on ∂R3+ . In the same way as π1 (SAn ), we regard π1 (An ) as a subgroup of B2n . Brendle-Hatcher [5, Propositions 3.2, 28 S. HIROSE AND E. KIN 3.6] showed that π1 (An ) is generared by ri , si (i ∈ {1, · · · , n − 1}), tj (j ∈ {1, · · · , n}) shown in Figure 5. In the beginning of Section 6 in [5], it is observed that π1 (SAn ) is the quotient of π1 (An ) −1 by the normal closure hhϑii of {ϑ}, where ϑ = t1 s1 s2 · · · sn−1 rn−1 · · · r2−1 r1−1 t1 . Especially we see that π1 (SAn ) is generated by ri , si and tj as above. Proposition A.1. SW2n = π1 (SAn ). Proof. Recall that ri , si (i ∈ {1, · · · , n − 1}), tj (j ∈ {1, · · · , n}) are elements of SW2n . Hence π1 (SAn ) ⊂ SW2n . On the other hand, for b ∈ SW2n , we define a closed path Pt (0 ≤ t ≤ 1) in SAn with a base point corresponding to n trivial arcs in D 3 as follows: P0 and P1 are n trivial arcs in D 3 , Ps/2 (0 ≤ s ≤ 1) is n arcs indicated by the thick arcs in Figure 20(2) and the path from P1/2 = b A to P1 is an isotopy between b A and A fixing end points. Then the sequence of endpoints of the path Pt is a closed path in the configuration space of 2n points in S 2 whose homotopy class is the braid b. This shows b ∈ π1 (SAn ). Hence SW2n ⊂ π1 (SAn ).  In the same way as the proof of Proposition A.1, we see that W2n = π1 (An ). Under the equivalences W2n = π1 (An ) and SW2n = π1 (SAn ), we have the following. Lemma A.2. SW2n ∼ = W2n /hhϑii. Remark A.3. (1) Brendle-Hatcher used notations Wn and SWn for π1 (An ) and π1 (SAn ) respectively [5]. In this paper, we use notations W2n and SW2n rather than Wn and SWn for the same groups, because we defined W2n and SW2n as subgroups of B2n and SB2n respectively. (2) In [5], elements of π1 (SAn ) are applied from left to right and our convention is opposed to this. Hence in our paper, we need to take the inverse of their generators and reverse the order of letters in their relations. As promised in Section 2.5.1, we now prove the following. Proposition A.4. Let ψ1 and ψ2 be homeomorphisms of (D 3 , A). If the restrictions of ψ1 and ψ2 over S 2 = ∂D 3 are isotopic as homeomorphisms of (S 2 , ∂A) then ψ1 and ψ2 are isotopic as homeomorphisms of (D 3 , A). F1 F2 A1 A2 Si Fn F'i Ni An A'i (1) (2) Figure 21. (1) Fi is a disk whose boundary is the union of the wicket Ai and an arc on ∂D 3 . (2) Ni is a regular neighborhood of Ai , and Fi′ is a meridian disk of a handlebody D 3 \ (N1 ∪ · · · ∪ Nn ). 29 Proof. At first, we assume that ψ1 = id, ψ2 |∂D3 = id∂D3 . Since ψ2 (Ai ) = Ai and ψ2 |∂D3 = id∂D3 , especially, ψ2 |∂Ai = id∂Ai , we can isotope ψ2 so that ψ2 |Ai = idAi with an isotopy preserving A setwise. Furthermore, we isotope ψ2 so that ψ2 (Ni ) = Ni for a regular neighborhood Ni of Ai in D 3 . We remark that D 3 \ (N1 ∪ · · · ∪ Nn ) is homeomorphic to a handlebody Hn . The set ∂D 3 ∩ ∂Ni consists of two disks d2i−1 and d2i , which are neighborhoods of two points ∂Ai . The boundary ∂(D 3 \ (N1 ∪ · · · ∪ Nn )) is a union of P = ∂D 3 \ (d1 ∪ · · · ∪ d2n ) and Ui = ∂Ni \ (d2i−1 ∪ d2i ). We consider the restriction of ψ2 on ∂(D 3 \ (N1 ∪ · · · ∪ Nn )). Then ψ2 |P = id and ψ2 |Ui is isotopic to the identity or a product of the Dehn twist about the core of Ui . We will show that ψ2 |Ui is isotopic to the identity. Let Fi be a disk in D 3 whose boundary is a union of Ai and an arc on ∂D 3 (see Figure 21 (1)). Let Fi′ = Fi \ Ni , then this is a meridian disk of D 3 \ (N1 ∪ · · · ∪ Nn ) and its boundary is a union of two arcs Si = Fi′ ∩ P , A′i = Fi′ ∩ Ui (see Figure 21 (2)). If we assume that ψ2 |Ui is not isotopic to the identity, then ψ2 (∂Fi′ ) = ψ2 (Si ) ∪ ψ2 (A′i ) = Si ∪ ψ2 (A′i ) is not null-homotopic in D 3 \ (N1 ∪ · · · ∪ Nn ), which contradicts the fact that ψ2 (∂Fi′ ) bounds a disk ψ2 (Fi′ ) in D 3 \ (N1 ∪ · · · ∪ Nn ). Therefore, ψ2 |Ui is isotopic to the identity. Furthermore, we can isotope ψ2 so that ψ2 |Ni = idNi . Since the extension of a homeomorphism of ∂(D 3 \ (N1 ∪ · · · ∪ Nn )) to the 3-dimensional handlebody D 3 \ (N1 ∪ · · · ∪ Nn ) is unique up to isotopy, we have an isotopy between ψ2 |D3 \(N1 ∪···∪Nn ) and idD3 \(N1 ∪···∪Nn ) . Hence ψ2 is isotopic to idD3 preserving A as a set. Next, we assume that ψ1 |∂D3 = ψ2 |∂D3 . Then ψ1′ = ψ1−1 ◦ ψ1 , ψ2′ = ψ1−1 ◦ ψ2 satisfy ψ1′ = id, ′ ψ2 |∂D3 = id∂D3 . By applying the argument of the previous paragraph to ψ1′ and ψ2′ , we have an isotopy G′t : D 3 → D 3 (0 ≤ t ≤ 1) between ψ1′ and ψ2′ in Homeo+ (D 3 , A). Then Gt = ψ1 ◦ G′t is an isotopy between ψ1 and ψ2 in Homeo+ (D 3 , A). Finally, we assume that ψ1 |∂D3 and ψ2 |∂D3 are isotopic in Homeo+ (∂D 3 , ∂A), that is to say, there is an isotopy Ft : ∂D 3 → ∂D 3 (0 ≤ t ≤ 1) fixing ∂A such that F0 = ψ1 |∂D3 , F1 = ψ2 |∂D3 . We set the parametrization of the regular neighborhood N (∂D 3 ) of ∂D 3 by ∂D 3 × [0, 1] so that ∂D 3 × {0} = ∂D 3 , ∂D 3 × {1} ⊂ int(D 3 ). We define an isotopy It : D 3 → D 3 (0 ≤ t ≤ 1) by ( (Ft(1−s) ◦ (ψ1 |∂D3 )−1 (p), s) It (x) = x if x = (p, s) ∈ ∂D 3 × [0, 1] = N (∂D 3 ), if x ∈ 6 N (∂D 3 ). Then Jt = It ◦ ψ1 is an isotopy in Homeo+ (D 3 , A) so that J0 = ψ1 , J1 |∂D3 = ψ2 |∂D3 . By the argument of the previous paragraph, there is an isotopy Gt between J1 and ψ2 in Homeo+ (D 3 , A). The concatenation of Jt and Gt is an isotopy between ψ1 and ψ2 in Homeo+ (D 3 , A).  We are now ready to prove Theorem 2.6 as promised in Section 2.5.1. Proof of Theorem 2.6. By Proposition A.4, we regard π0 (Homeo+ (D 3 , A)) as a subgroup SH2n of Mod(Σ0,2n ). The following sequence is exact (see [10, p.245] for example). Γ 0 → h∆2 i → SB2n → Mod(Σ0,2n ) → 1. As an immediate consequence of Theorem 5 in [15], we see that SH2n is generated by Γ(σ2i−1 ) (i = 1, . . . , n), Γ(ηi ) (i = 1, . . . , n − 1), Γ(ρij ) (i, j = 1, . . . , n, j 6= i), and Γ(ωij ) (i, j = 1, . . . , n, j 6= i − 1, i), where ηi , ρij , ωij are as shown in Figure 22. We remark that in the case of the braid ρij , the (2i − 1)st and 2ith strings pass between the (2j − 1)st and 2jth strings. On the other hand, in the case of the braid ωij , the (2i − 1)st and 2ith strings pass between the 2jth and (2j + 1)st 30 S. HIROSE AND E. KIN 2j 2i ρi j 2i (i<j) 2j 2i ωi j ( i < j ) 2 i +2 ηi 2i 2j ρi j (i>j) 2 j+2 ωi j 2i ( i -1 > j ) Figure 22. ηi , ρi,j , ωi,j from left to right. If i < j, then ρi,j and ωi,j are the braids on the top. If i > j (resp. If i − 1 > j), then ρi,j (resp. ωi,j ) are the braids on the bottom. strings. As products of ri , si , tj , these braids are expressed as follows, ηi = si ti ti+1 , ( si si+1 · · · sj−2 sj−1 rj−1 sj−2 · · · si+1 si t2i if i < j, ρij = −1 2 si−1 si−2 · · · sj+1 sj rj sj+1 · · · si−2 si−1 ti if i > j, ( si si+1 · · · sj−2 s2j−1 sj−2 · · · si+1 si t2i if i < j, ωij = 2 2 si−1 si−2 · · · sj+2 sj+1 sj+2 · · · si−2 si−1 ti if i − 1 > j. On the other hand, Brendle-Hatcher [5] showed that π1 (SAn )(= SW2n ) is generated by ri , si (i ∈ {1, · · · , n−1}), tj (1 ∈ {1, · · · , n}). The images of these generators by Γ are in SH2n , and Γ(ηi ), Γ(ρij ), Γ(ωij ) are written by products of these images. Therefore we see that Γ(SW2n ) = SH2n . On the other hand, ∆2 = (sn−1 · · · s2 s1 t21 )n is in SW2n , and hence SW2n = Γ−1 (SH2n ). As a result, Theorem 2.6 holds.  Let SHomeo+ (Σg ) be the subgroup of Homeo+ (Σg ) which consists of the orientation preserving homeomorphisms on Σg ≃ ∂Hg that commute with S : ∂Hg → ∂Hg . In order to prove Theorem 2.8, Birman-Hilden showed the following. Proposition A.5 (Theorem 7 in [3]). Let φ1 and φ2 ∈ SHomeo+ (Σg ) be isotopic in Homeo+ (Σg ). Then φ1 and φ2 are isotopic in SHomeo+ (Σg ). By Proposition A.5, the natural surjection from π0 (SHomeo+ (Σg )) to H(Σg ) is an isomorphism. Therefore, one can define a homomorphism q : H(Σg ) → SB2g+2 , see Theorem 2.8. Recall that SHomeo+ (Hg ) is the subgroup of Homeo+ (Hg ) which consists of orientation preserving homeomorphisms on Hg that commute with S : Hg → Hg . We have the following which is a version of Proposition A.5. 31 Proposition A.6. Let φ1 and φ2 ∈ SHomeo+ (Hg ) be isotopic in Homeo+ (Hg ). Then φ1 and φ2 are isotopic in SHomeo+ (Hg ). Proof. For φ ∈ SHomeo+ (Hg ), we define a homeomorphism φ of D 3 = Hg /ι by φ([x]) = [φ(x)], where [x] is an element of D 3 = Hg /ι represented by x ∈ Hg . By Proposition A.5, there is an isotopy in SHomeo+ (Σg ) between φ1 |∂Hg and φ2 |∂Hg . This isotopy induces an isotopy between φ1 |∂D3 and φ2 |∂D3 in Homeo+ (∂D 3 , ∂A). By Proposition A.4, there is an isotopy between φ1 and φ2 in Homeo+ (D 3 , A). Then the lift of this isotopy is an isotopy in SHomeo+ (Hg ) between φ1 and φ2 .  We are now ready to prove Theorem 2.11. Proof of Theorem 2.11. By Proposition A.6, the natural surjection from π0 (SHomeo+ (Hg )) to H(Hg ) is an isomorphism. Therefore, we can define a homomorphism Q : H(Hg ) → SH2g+2 so that Q = q|H(Hg ) , see (2.1) in Section 2.6. As a consequence of Theorem 2.8 and the fact that ι ∈ H(Hg ), we see that Theorem 2.11 holds.  b6 b4 c1 c2 c3 c4 c5 c6 b 2 g -2 c 2 g -2 c 2 g -1 c2g c2 g +1 Figure 23. Circles on ∂Hg . As an application of Theorem 2.11, we determine a finite presentation for H(Hg ) (Theorem A.8). To do this, we set some circles on ∂Hg as in Figure 23. The circle c2j−1 (j ∈ {1, · · · , g + 1}) bounds a disk properly embedded in Hg , and c2j−1 is preserved by the hyperelliptic involution S. The circle b2j (j ∈ {2, · · · , g − 1}) also bounds a disk properly embedded in Hg , but b2j is not preserved by S. Let tci and tb2j be the left-handed Dehn twist about ci and b2j respectively. Remark A.7. The group Mod(Hg ) is a subgroup of the mapping class group of ∂Hg of infinite index whenever g ≥ 2. This is because tc2 is not an element of Mod(Hg ) and has an infinite order. The group H(Hg ) is a subgroup of Mod(Hg ) of infinite index whenever g ≥ 3. In fact, tb4 is not an element of H(Hg ) but an element of Mod(Hg ), and tb4 has an infinite order. −1 −1 −1 −1 −1 Theorem A.8. H(Hg ) is generated by ri = tc2i tc2i+1 t−1 c2i−1 tc2i , si = tc2i tc2i+1 tc2i−1 tc2i (i = 1, . . . , g), tj = t−1 c2j−1 (j = 1, . . . , g, g + 1) and the relations are as follows. (1) (2) (3) (4) (5) (6) (7) (8) ri rj = rj ri for |i − j| > 1, ri ri+1 ri = ri+1 ri ri+1 , si sj = sj si for |i − j| > 1, si si+1 si = si+1 si si+1 , ri sj = sj ri for |i − j| > 1, ri si+1 si = si+1 si ri+1 , ri ri+1 si = si+1 ri ri+1 , si si+1 ri = ri+1 si si+1 , ri si ti ri = ti si , ti tj = tj ti , ri tj = tj ri for j 6= i, i + 1, ti+1 ri = ri ti , si tj = tj si for j 6= i, i + 1, tj si = si tk , for {i, i + 1} = {j, k}, 32 S. HIROSE AND E. KIN (9) (sg · · · s2 s1 t21 )g+1 = 1, −1 −1 −1 −1 2 −1 (10) (t1 s1 s2 · · · sg r−1 g · · · r2 r1 t1 ) = 1 and t1 s1 s2 · · · sg rg · · · r2 r1 t1 commutes with ri , si , ti . Proof. We use Theorems 2.6 and 2.11. Brendle-Hatcher expressed a finite presentation for π1 (Ag+1 )(= W2g+2 ) in [5, Propositions 3.2, 3.6]. The relations (1)–(4) come from [5, Proposition 3.2] and (5)– (8) come from [5, Proposition 3.6]. The relation (9) means that ∆2 is trivial in SH2g+2 . In the −1 −1 2 relation (10), t1 s1 s2 · · · sg r−1 g · · · r2 r1 t1 equals ι, and the relation means ι = 1 and any element of H(Hg ) commutes with ι.  By a straightforward computation together with Theorem A.8, we have the following. Corollary A.9. The abelianization H(Hg )ab = H(Hg )/[H(Hg ), H(Hg )] is isomorphic to Z⊕Z2 ⊕Z2 for any g ≥ 2. Corollary A.9 is in contrast with the abelianizations of other groups which contain H(Hg ) as a subgroup. In fact, Mod(Σ1 )ab = Z/12Z, Mod(Σ2 )ab = Z/10Z, and Mod(Σg )ab is trivial when g ≥ 3 (see [10, §5.1] for example). In the case of the hyperelliptic mapping class groups, H(Σg )ab = Z/2(2g + 1)Z when g is even and H(Σg )ab = Z/4(2g + 1)Z when g is odd. They are proved straightforwardly from the presentation of H(Σg ) by Birman-Hilden [3, Theorem 8]. For the handlebody groups, Mod(Hg )ab is a finite abelian group when g ≥ 3, see [35, 19]. References [1] I. Agol, C. J. Leininger and D. Margalit, Pseudo-Anosov stretch factors and homology of mapping tori, J. London Math. Soc. 93 Number 3 (2016), 664-682. [2] J. Birman, Braids, Links and Mapping Class Groups, Annals of Math Studies 82, Princeton University Press (1975). [3] J. Birman and H. Hilden, On mapping class groups of closed surfaces as covering spaces, Advances in the theory of Riemann surfaces, Annals of Math Studies 66, Princeton University Press (1971), 81-115. [4] M Bestvina, M Handel, Train–tracks for surface homeomorphisms, Topology 34 (1994) 1909-140. [5] T. E. Brendle and A. Hatcher, Configuration spaces of rings and wickets, Commentarii Mathematici Helvetici 88, 1 (2013), 131-162. [6] T. Brendle, D. Margalit, Factoring in the hyperelliptic Torelli group, To appear in Mathematical Proceedings of the Cambridge Philosophical Society, 159, 2 (2015) 207-217. [7] D. Calegari, Foliations and the geometry of 3-manifolds (Oxford Mathematical Monographs), Oxford University Press (2007). [8] C. Damiani, A journey through loop braid groups, To appear in Expositiones Mathematicae. [9] B. Farb, C. J. Leininger and D. Margalit, The lower central series and pseudo-Anosov dilatations, American Journal of Mathematics 130, Number 3 (2008), 799-827. [10] B. Farb and D. Margalit, A primer on mapping class groups, Princeton Mathematical Series 49, Princeton University Press, Princeton, NJ (2012). [11] A. Fathi, F. Laudenbach and V. Poenaru, Travaux de Thurston sur les surfaces, Astérisque, 66-67, Société Mathématique de France, Paris (1979). [12] A. T. Fomenko and S. V. Matveev, Algorithmic and Computer Methods for Three-Manifolds, Kluwer Academic Publishers, Dordrecht (1997). [13] D. Fried, Fibrations over S 1 with pseudo-Anosov monodromy, Exposé 14 in ‘Travaux de Thurston sur les surfaces’ by A. Fathi, F. Laudenbach and V. Poenaru, Astérisque, 66-67, Société Mathématique de France, Paris (1979), 251-266. [14] T. Hall, The software “Trains” is available at http://www.liv.ac.uk/~tobyhall/T_Hall.html [15] H. M. Hilden, Generators for two groups related to the braid group, Pacific Journal of Mathematics 59, Number 2 (1975), 475-486. [16] E. Hironaka, Penner sequences and asymptotics of minimum dilatations for subfamilies of the mapping class group, Topology Proceedings 44 (2014), 315-324. [17] E. Hironaka, Quotient families of mapping classes, preprint (2012), arXiv:1212.3197(math.GT) 33 [18] E. Hironaka and E. Kin, A family of pseudo-Anosov braids with small dilatation, Algebraic and Geometric Topology 6 (2006), 699-738. [19] S. Hirose, Abelianization and Nielsen realization problem of the mapping class group of handlebody, Geometriae Dedicata 157 (2012), 217-225. [20] N. V. Ivanov, Stretching factors of pseudo-Anosov homeomorphisms, Journal of Soviet Mathematics, 52 (1990), 2819–2822, which is translated from Zap. Nauchu. Sem. Leningrad. Otdel. Mat. Inst. Steklov. (LOMI), 167 (1988), 111-116. [21] E. Kin, Dynamics of the monodromies of the fibrations on the magic 3-manifold, New York Journal of Mathematics 21 (2015) 547-599. [22] The Knot Atlas, http://katlas.org/wiki/The_Thistlethwaite_Link_Table [23] C. McMullen, Entropy and the clique polynomial, Journal of Topology, Number 8 (1) (2015), 184-212. [24] C. McMullen, Polynomial invariants for fibered 3-manifolds and Teichmüler geodesic for foliations, Annales Scientifiques de l’École Normale Supérieure. Quatrième Série 33 (2000), 519-560. [25] U. Oertel, Homology branched surfaces: Thurston’s norm on H2 (M 3 ), LMS Lecture Note Series 112, Lowdimensional Topology and Kleinian Groups, Editor D. B. A. Epstein (1986), 253-272. [26] A. Papadopoulos and R. Penner, A characterization of pseudo-Anosov foliations, Pacific Journal of Mathematics 130 (2) (1987), 359-377. [27] R. C. Penner, Bounds on least dilatations, Proceedings of the American Mathematical Society 113 (1991), 443450. [28] W. T. Song, Upper and lower bounds for the minimal positive entropy of pure braids, The Bulletin of the London Mathematical Society 37, Number 2 (2005), 224-229. [29] S. Suzuki, On homeomorphisms of a 3-dimensional handlebody, Canadian Journal of Mathematics 29, Number 1 (1977), 111-124. [30] S. Tawn, A presentation for Hilden’s subgroup of the braid group. Mathematical Research Letters 15, Number 6, (2008), 1277-1293. Erratum: A presentation for Hilden’s subgroup of the braid group. Mathematical Research Letters 18, Number 1 (2011), 175-180. [31] W. Thurston, A norm of the homology of 3-manifolds, Memoirs of the American Mathematical Society 339 (1986), 99-130. [32] W. Thurston, On the geometry and dynamics of diffeomorphisms of surfaces, Bulletin of the American Mathematical Society 19 (1988), 417-431. [33] W. Thurston, Hyperbolic structures on 3-manifolds II: Surface groups and 3-manifolds which fiber over the circle, preprint, arXiv:math/9801045 [34] A. D. Valdivia, Sequences of pseudo-Anosov mapping classes and their asymptotic behavior, New York Journal of Mathematics 18 (2012), 609-620. [35] B. Wajnryb, Mapping class group of a handlebody, Fundamenta Mathematicae 158 (1998), 195-228. Department of Mathematics, Faculty of Science and Technology, Tokyo University of Science, Noda, Chiba, 278-8510, Japan E-mail address: hirose [email protected] Department of Mathematics, Graduate School of Science, Osaka University Toyonaka, Osaka 560-0043, JAPAN E-mail address: [email protected]
4math.GR
A Scheme-Driven Approach to Learning Programs from Input/Output Equations Jochen Burghardt jochen.burghardt alumni.tu-berlin.de Feb 2018 arXiv:1802.01177v1 [cs.LO] 4 Feb 2018 Abstract We describe an approach to learn, in a term-rewriting setting, function definitions from input/output equations. By confining ourselves to structurally recursive definitions we obtain a fairly fast learning algorithm that often yields definitions close to intuitive expectations. We provide a Prolog prototype implementation of our approach, and indicate open issues of further investigation. Key words: inductive functional programming Contents 1 Introduction 2 2 The task of learning functions 3 3 Learning functions by anti-unification 4 4 Learning functions by structural recursion 5 5 Possible extensions 10 A Example runs of our prototype implementation 15 References 19 1 1 Introduction This paper describes an approach to learn function definitions from input/output equations. 1 In trivial cases, a definition is obtained by syntactical anti-unification of the given i/o equations. In non-trivial cases, we assume a structurally recursive function definition, and transform the given i/o equations into equations for the employed auxiliary functions. The latter are learned from their i/o equations in turn, until a trivial case is reached. We came up with this approach in 1994 but didn’t publish it until today. In this paper, we explain it mainly along some learning examples, leaving a theoretical elaboration to be done. Also, we indicate several issues of improvement that should be investigated further. However, we provide at least a Prolog prototype implementation of our approach. In the rest of this section, we introduce the term-rewriting setting our approach works in. In Sect. 2, we define the task of function learning. In Sect. 3 and 4, we explain the base case and the inductive case of our approach, that is, how to learn trivial functions, and how to reduce learning sophisticated functions to learning easier functions, respectively. Section 5 sketches some ideas for possible extensions to our approach; it also shows its limitations. Some runs of our Prolog prototype are shown in Appendix A. nat list tree blist 1: 2: 3: 4: ::= ::= ::= ::= 0 nil null nl | s(nat) | nat::list | nd(tree, nat, tree) | o(blist) | i(blist) natural numbers lists of natural numbers binary trees of natural numbers list of binary digits Figure 1. Employed sort definitions We use a term-rewriting setting that is well-known from functional programming: A sort can be defined recursively by giving its constructors. For example, sort definition 1, shown in Fig. 1, defines the sort nat of all natural numbers in 0-s notation. In this example, we use 0 as a nullary, and s as a unary constructor. 5: 6: 7: 8: 9: 10: 11: + ∗ lgth app size dup add : : : : : : : nat × nat nat × nat list list × list tree nat blist × blist −→ −→ −→ −→ −→ −→ −→ nat nat nat list nat nat blist addition of natural numbers multiplication of natural numbers number of elements of a list concatenation of lists number of elements of a binary tree duplicating a natural number addition of binary numbers (lists) Figure 2. Employed function signatures A sort is understood as representing a possibly infinite set of ground constructor terms, 2 e.g. the 1 We will use henceforth “i/o equations” for brevity. We avoid calling them “examples” as this could cause confusion when we explain our approach along example sort definitions, example signatures, and example functions. 2 i.e. terms without variables, built only from constructor symbols 2 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: x+0 x+s(y) x∗0 x∗s(y) lgth(nil) lgth(x::y) app(nil, z) app(x::y, z) size(null) size(nd(x, y, z)) = = = = = = = = = = x s(x+y) 0 x+x∗y 0 s(lgth(y)) z x::app(y, z) 0 s(size(x)+size(z)) Figure 3. Example function definitions sort nat represents the set {0, s(0), s(s(0)), s(s(s(0))), . . .}. A function has a fixed signature; Fig. 2 gives some examples. The signature of a constructor can be inferred from the sort definition it occurs in, e.g. 0 :−→ nat and s : nat −→ nat. We don’t allow non-trivial equations between constructor terms, therefore, we have T1 = T2 iff T1 syntactically equals T2 , for all ground constructor terms T1 , T2 . A non-constructor function can be defined by giving a terminating ([DJ90, Sect.5.1, p.270]) term rewriting system for it such that its left-hand sides are sufficiently complete ([Gut77], [Com86], [DJ90, Sect.3.2, p.264]). Examples for function definitions are shown in Fig. 3. Given some functions f1 , . . . , fm defined by such a term rewriting system, for each i and each ground constructor terms T1 , . . . , Tn we can find a unique ground constructor term T such that fi (T1 , . . . , Tn ) = T . We then say that fi (T1 , . . . , Tn ) evaluates to T . Given a term T , we denote by vars(T ) the set of variables occurring in T . 2 The task of learning functions The problem our approach shall solve is the following. Given a set of sort definitions, a non-constructor function symbol f , its signature, and a set of input/output equations for f , construct a term rewriting system defining f such that it behaves as prescribed by the i/o equations. We say that we want to learn a definition for f , or sloppily, that we want to learn f , from the given i/o equations. For example, given sort definition 1, signature 10, and the following input/output ground equations 22: dup(0) = 0 23: dup(s(0)) = s(s(0)) 24: dup(s(s(0))) = s(s(s(s(0)))) 25: dup(s(s(s(0)))) = s(s(s(s(s(s(0)))))) we are looking for a definition of dup such that equations 3 22, 23, 24, and 25 hold. One such definition is dup(0) = 0 dup(s(x)) = s(s(dup(x))) 26: 27: We say that this definition covers the i/o equations 28: 29: 22, 23, 24, and 25. In contrast, a definition dup(0) = 0 dup(s(x)) = s(s(x)) would cover i/o equations 22 and 23, but neither 24 nor 25. We wouldn’t accept this definition, since we are interested only in function definitions that cover all given i/o equations. It is well-known that there isn’t a unique solution to our problem. In fact, given i/o equations f (L1 ) = R1 , . . . , f (Ln ) = Rn and an arbitrary function g of appropriate domain and range, e.g. the function defined by 3 f (x) = ( if x = L1 then R1 elif . . . elif x = Ln then Rn else g(x) fi ) trivially covers all i/o equations. Usually, the “simplest” function definitions are preferred, with “simplicity” being some user-defined measure loosely corresponding to term size and/or case-distinction count, like e.g. in [Bur05, p.8] and [Kit10, p.77]. However, the notion of simplicity depends on the language of available basic operations. 4 In the end, the notion of a “good” definition can hardly be defined more precisely than being one that meets common human prejudice. From our prototype runs we got the feeling that our approach often yields “good” definition in that sense. 3 Learning functions by anti-unification One of the simplest ways to obtain a function definition is to syntactically anti-unify the given i/o equations. Given i/o equations f (L11 , . . . ,Lm1 ) = R1 .. .. .. . . . f (L1n , . . . ,Lmn ) = Rn , let f ( L1 , . . . , Lm ) = R be their least general generalization (lgg for short, see [Plo70,Plo71,Rey70]). If the variable condition vars(R) ⊆ vars(L1 ) ∪ . . . ∪ vars(Lm ) holds, then the lgg will cover all n given i/o equations. 3 We use common imperative notation here for sake of readability. The “invariance theorem” in Kolmogorov complexity theory (e.g. [LV08, p.105, Thm.2.1.1]) implies that ∀L1 , L2 ∃c ∀x : |CL1 (x) − CL2 (x)| 6 c, where the Li range over Turing-complete algorithm description languages, c is a natural number, x ranges over i/o equation sets, and CL (x) denotes the length of the shortest function definition, written in L, that covers x. This theorem is sometimes misunderstood to enable a language-independent notion of simplicity; however, it does not, at least for small i/o example sets. 4 4 For example, assume we are to generate a definition for a unary function called g2 from the i/o equations 32: g2 ( 0 ) = s(s( 0 )) g2 ( s(s(0)) ) = s(s( s(s(0)) )) g2 (s(s(s(s(0))))) = s(s(s(s(s(s(0)))))) . 33: g2 ( 30: 31: We obtain the lgg x024 ) = s(s( x024 )) As another example, we can generate a definition for a binary function called g4 from the i/o equations 36: g4 (a, 0 ) = s( 0 ) g4 (a, s(0) ) = s( s(0) ) g4 (a,s(s(0))) = s(s(s(0))) . 37: g4 (a, y012 ) = s( y012 ) 34: 35: We obtain the lgg which satisfies the variable condition. 5 equations 36, 35, and 34. Hence when g4 is defined by equation 37, it covers i/o As a counter-example, the lgg of the above dup i/o equations 25 dup( 0 ) dup( s(0) ) dup( s(s(0)) ) dup(s(s(s(0)))) 38: dup( x0123 22 23 24 is computed as = 0 = s(s(0)) = s(s(s(s(0)))) = s(s(s(s(s(s(0)))))) )= x0246 which violates the variable condition, and thus cannot be used to reduce a term dup(T ) to a ground constructor term, i.e. to evaluate dup(T ). The above anti-unification approach can be extended in several ways, they are sketched in Sect. 5.1. However, in all but trivial cases, an lgg will violate the variable condition, and we need another approach to learn a function definition. 4 Learning functions by structural recursion For a function f that can’t be learned by Sect. 3, we assume a defining term rewriting system that follows a structural recursion scheme obtained from f ’s signature and a guessed argument position. For example, for the function dup with the signature given in 10 and the only possible argument position, 1, we obtain the schematic equations 39: 40: dup(0) = g1 dup(s(x)) = g2 (dup(x)) 5 Whenever applied to terms T1 , . . . , Tm that don’t start all with the same function symbol, Plotkin’s lgg algorithm returns a variable that uniquely depends on T1 , . . . , Tm . We indicate the originating terms by an index sequence; e.g. y012 was obtained as lgg(0, s(0), s(s(0))). 5 where g1 and g2 are fresh names of non-constructor functions. If we could learn appropriate definitions for g1 and g2 , we could obtain a definition for dup just by adding equations 39 and 40. The choice of g1 is obvious: 41: 22 39 0 = dup(0) = g1 In order to learn a definition for g2 , we need to obtain appropriate i/o examples for g2 from those for dup. Joining equation 40 with dup’s relevant i/o equations yields three i/o equations for g2 : 23 40 22 s(s(0)) = dup(s(0)) = g2 (dup(0)) = g2 (0) 24 40 23 s(s(s(s(0)))) = dup(s(s(0))) = g2 (dup(s(0))) = g2 (s(s(0))) 25 40 24 s(s(s(s(s(s(0)))))) = dup(s(s(s(0)))) = g2 (dup(s(s(0)))) = g2 (s(s(s(s(0)))) 30 31 32 A definition for g2 covering its i/o examples 30, 31, and 32 has already been derived by antiunification in Sect. 3 as 33 g2 (x024 ) = s(s(x024 )) . Altogether, we obtain the rewriting system dup(0) dup(s(x)) g1 g2 (x024 ) 39 40 41 33 = g1 = g2 (dup(x)) = 0 = s(s(x024 )) as a definition for dup that covers its i/o equations 22, 23, 24, and 25. Subsequently, this system may be simplified, by inlining, to dup(0) = 0 dup(s(x)) = s(s(dup(x))) 39 40 which is the usual definition of the dup function. Returning to the computation of i/o equations for g2 from those for dup, note that g2 ’s derived i/o equations 30, 31, and 32 were necessary in the sense that they must be satisfied by each possible definition of g2 that leads to dup covering its i/o equations (23, 24, and 25). Conversely, g2 ’s i/o equations were also sufficient in the sense that each possible definition of g2 covering them ensures that dup covers 23, 24, and 25, provided it covers 22: Proof of Proof of Proof of 23: 24: 25: 40 22 30 dup(s(0)) = g2 (dup(0)) = g2 (0) = s(s(0)) 40 23 31 dup(s(s(0))) = g2 (dup(s(0))) = g2 (s(s(0))) = s(s(s(s(0)))) 40 24 32 dup(s(s(s(0)))) = g2 (dup(s(s(0)))) = g2 (s(s(s(s(0))))) = s(s(s(s(s(s(0)))))) Observe that the above proofs are based just on permutations of the equation chains from 30, 31, and 32. Moreover, note that the coverage proof for dup(s(T )) relies on the coverage for dup(T ) already being proven. That is, the coverage proofs follow the employed structural recursion scheme. As for the base case, g1 ’s coverage of 41 is of course necessary and sufficient for dup’s coverage of 22. 6 4.1 Non-ground i/o equations As an example that uses i/o equations containing variables, consider the function lgth, with the signature given in 7. Usually, i/o equations for this functions are given in a way that indicates that the particular values of the list elements don’t matter. For example, an i/o equation like lgth(a::b::nil) = s(s(0)) is seen much more often than lgth(s(0)::0::nil) = s(s(0)). Our approach allows for variables in i/o equations, and treats them as universally quantified. That is, a non-ground i/o equation is covered by a function definition iff all its ground instances are. Assume for example we are given the i/o equations lgth(nil) lgth(a::nil) lgth(a::b::nil) lgth(a::b::c::nil) 42: 43: 44: 45: = = = = 0 . s(0) s(s(0)) s(s(s(0))) Given the signature of lgth (see 7) and argument position 1, we obtain a structural recursion scheme 46: lgth(nil) = g3 47: lgth(x::y) = g4 (x, lgth(y)) . Similar to the dup example, we get 48: 42 46 0 = lgth(nil) = g3 , and we can obtain i/o equations for g4 from those for lgth: 6 34 35 36 43 47 42 s(0) = lgth(a::nil) = g4 (a, lgth(nil)) = g4 (a, 0) 44 47 43 s(s(0)) = lgth(a::b::nil) = g4 (a, lgth(b::nil)) = g4 (a, s(0)) 45 47 44 s(s(s(0))) = lgth(a::b::c::nil) = g4 (a, lgth(b::c::nil)) = g4 (a, s(s(0))) Again, a function definition covering these i/o equation happens to have been derived by antiunification in Sect. 3: 37 g4 (a, y012 ) = s(y012 ) Altogether, equations 46, 47, 48, and 37 build a rewriting system for lgth that covers all its given i/o equations. By subsequently inlining g3 ’s and g4 ’s definition, we obtain a simplified definition for lgth: 49: lgth(nil) = 0 50: lgth(x::y) = s(lgth(y)) which agrees with the usual one found in textbooks. Similar to the ground case, g4 ’s derived i/o equations 6 34, 35, and 36 were necessary for lgth In the rightmost equation of each line, we employ a renaming substitution. For example, we apply {a 7→ b, b 7→ c} to i/o equation 44 in line 36. For this reason, our approach wouldn’t work if a, b, c were considered non-constructor constants rather than universally quantified variables. 7 covering its i/o equations. And as in the ground case, they are also sufficient: Proof of Proof of Proof of 43: 44: 45: 47 42 Again, renaming substitutions were used in the application of 4.2 34 lgth(a::nil) = g4 (a, lgth(nil)) = g4 (a, 0) = s(0) 47 43 35 lgth(a::b::nil) = g4 (a, lgth(b::nil)) = g4 (a, s(0)) = s(s(0)) 47 44 36 lgth(a::b::c::nil) = g4 (a, lgth(b::c::nil)) = g4 (a, s(s(0)))) = s(s(s(0))) 43 and 44. Functions of higher arity For functions with more than one argument, we have several choices of the argument on which to do the recursion. In these cases, we currently systematically try all argument positions 7 in succession. This is feasible since • our approach is quite simple, and hence fast to compute, and • we have a sharp and easy to compute criterion (viz. coverage 8 of all i/o examples) to decide whether recursion on a given argument was successful. For the function +, with the signature given in 5, and argument position 2, we obtain the structural recursion scheme 51: 52: x+0 = g5 (x) x+s(y) = g6 (x, x+y) . Appendix A.1 shows a run of our Prolog prototype implementation that obtains a definition for +. In Sect. 5.2, we discuss possible extensions of the structural recursion scheme, like simultaneous recursion. 4.3 Constructors with more than one recursion argument When computing a structural recursion scheme, we may encounter a sort s with a constructor that takes more than one argument of sort s. A common example is the sort of all binary trees (of natural numbers), as given in 3. The function size, with the signature given in 9, computes the size of such a tree, i.e. the total number of nd nodes. A recursion scheme for the size and argument position 1 looks like: 53: 54: size(null) = g9 size(nd(x, y, z)) = g10 (y, size(x), size(z)) 7 In particular, the recursive argument’s sort and the function’s result sort needn’t be related in any way, as the lgth example above demonstrates. 8 Checking if an i/o equation is covered by a definition requires executing the latter on the lhs arguments of the former. Our structural recursion approach ensures the termination of such computations, and establishes an upper bound for the number of rewrite steps. For example, g2 and g4 , defined in 33 and 37, respectively, need one such step, while their callers dup and lgth, defined in 39,40 and 46,47, respectively, need a linear amount of steps. An upper-bound expression for learned functions’ time complexity remains to be defined and proven. 8 In App. A.2, we show a prototype run to obtain a definition for size. 4.4 General approach In the previous sections, we have introduced our approach using particular examples. In this section, we sketch a more abstract and algorithmic description. Given a function and its signature f : s1 × . . . × sn −→ s, and given one of its argument positions 1 6 i 6 n, we can easily obtain a term rewriting system to define f by structural recursion on its ith argument. Assume in the definition of f ’s ith domain sort si we have an alternative si ::= . . . | c(s01 , . . . , s0l ) | . . . , assume {s0ν(1) , . . . , s0ν(m) } 63 si is the set of non-recursive arguments of the constructor c, and s0ρ(1) = . . . = s0ρ(k) = si are the recursive arguments of c. Let g be a new function symbol. We build an equation f (x1 , . . . , xi−1 , c(y1 , . . . , yl ), xi+1 , . . . , xn ) = g(x1 , . . . , xi−1 , xi+1 , . . . , xn , yν(1) , . . . , yν(m) , f (x1 , . . . , xi−1 , yρ(1) , xi+1 , . . . , xn ) ... f (x1 , . . . , xi−1 , yρ(k) , xi+1 , . . . , xn ) ) In a somewhat simplified presentation, we build the equation f (. . . , c(y1 , . . . , yl ), . . .) = g(. . . , f (..., yρ(1) , ...), . . . , f (..., yρ(k) , ...)). From the i/o equations for f , we often 9 can construct i/o equations for g: If we have an i/o equation that matches the above equation’s left-hand side, and we have all i/o equations needed to evaluate the recursive calls to f on its right-hand side, we can build an i/o equation equation for g. This way, we can reduce the problem of synthesizing a definition for f that reproduces the given i/o equations to the problem of synthesizing a definition for g from its i/o equations. As a base case for this process, we may synthesize non-recursive function definitions by anti-unification of the i/o equations. It should be possible to prove that f covers all its i/o equations iff g covers its, under some appropriate conditions. We expect that a sufficient condition is that all recursive calls to f could be evaluated. At least, we could demonstrate this in the above dup and lgth example. 9 Our construction isn’t successful in all cases. We give a counter-example in Sect. 5.3 9 Fct Eqn Lf Rg Fct Eqn Lf Rg 22 23 dup 24 25 2 3 4 5 1 g1 3 5 g2 7 41 30 31 32 1 2 4 6 1 3 5 7 Figure 4. Left- and right-hand term sizes of i/o equations for dup and g2 4.5 Termination In order to establish the termination of our approach, it is necessary to define a criterion by which g is easier to learn from it i/o equations than f is from its. Term size or height cannot be used in a termination ordering; when proceeding from f to g they may remain equal, or may even increase, as shown in Fig. 4 for the dup vs. g2 example. However, the number of i/o equations decreases in this example, and in all other ones we dealt with. A sufficient criterion for this is that f ’s i/o equations don’t all have the same left-hand side top-most constructor. However, the same criterion would have to be ensured in turn for g, and it is not obvious how to achieve this. In any case, by construction of g’s i/o example from f ’s, no new terms can arise. 10 Even more, each term appearing in an i/o example for g originates from a right-hand side of an i/o example for f . Therefore, our approach can’t continue generating new auxiliary functions forever, without eventually repeating the set of i/o equations. Our prototype implementation doesn’t check for such repetitions, however. 5 Possible extensions In this section, we briefly sketch some possible extensions of our approach. Their investigation in detail still remains to be done. 5.1 Extension of anti-unification In Sect. 3 we used syntactical anti-unification to obtain a function definition, as a base case of our approach. Several way to extend this technique can be thought of. Set anti-unification It can be tried to split the set of i/o equations into disjoint subsets such that from each one an lgg satisfying the variable condition is obtained. This results in several defining equations. An additional constraint might be that each subset corresponds to another constructor symbol, observed at some given fixed position in the left-hand side terms. 10 except for the fresh left-hand side top function symbols 10 sq( 0 ) sq( s(0) ) sq( s(s(0)) ) sq(s(s(s(0)))) sq( x0123 ) 56: 57: 58: 59: 60: = 0 = s(0) = s(s(s(s(0)))) = s9 (0) = x0123 ∗x0123 Figure 5. Application of E-anti-unification to learn squaring Anti-unification modulo equational theory Another extension consists in considering an equational background theory E in anti-unification; it wasn’t readily investigated in 1994. See [Hei94b,Hei94a,Hei95] for the earliest publications, and [Bur05,Bur17] for the latest. As of today, the main application of E-anti-unification turned out to be the synthesis of nonrecursive function definitions from input/ output equations [Bur17, p.3]. To sketch an example, let E consist just of definitions 12, 13, 14, and 15. Assume the signature 55: sq : nat −→ nat and the i/o equations 56, 57, 58, and 59 of the squaring function. Applying syntactical antiunification to the left-hand sides yields a variable x0123 , and four corresponding substitutions. Applying constrained E-generalization [Bur05, p.5, Def.2] to the right-hand sides yields a term set that contains x0123 ∗x0123 as a minimal-size member, see Fig. 5. Depth-bounded anti-unification In many cases, defining equations obtained by syntactical anti-unification appear to be too particular. For example, s4 (0) and s9 (0) are generalized to s4 (x05 ), while being by 4 greater than something wouldn’t be the first choice for a common property of both numbers for most humans. As a possible remedy, a maximal depth d may be introduced for the anti-unification algorithm. Beyond this depth, terms are generalized by a variable even if all their root function symbols agree. Denoting by lgg d (t1 , t2 ) the result of an appropriately modified algorithm, it should be easy to prove that lgg d (t1 , t2 ) can be instantiated to both t1 and t2 , and is the most special term with that property among all terms of depth up to d. If d is chosen as ∞, lgg d and lgg coincide. In our prototype implementation, we meanwhile built in such a depth boundary. Figure 6 compares the learned function definitions for size for d = 2, 3, 4 (top to bottom). For example, for d = 2, the —nonsensical— equation size(x) = 0 is learned, while for d > 3 the respective equation reads size(null) = 0. Not surprisingly, for d = 2 only one of the given 9 i/o equations is covered. For d 6 1, the attempt to learn defining equations for size fails. For d = 4, the learned equations agree with those for d = ∞, and hence also with those for all intermediate depths. The prototype run for d = ∞ is shown in App. A.2. Note that the prototype simplifies equations by removing irrelevant function arguments. For this reason, f12 there has only two arguments, while the corresponding function f1 in Fig. 6 has three. 11 x )=0 null null size( nd(x, y, z) ) = f1 ( y, size(x), size(z)) size( y f1 (x, 0 , 0 f1 (x, s(y) , z ) = s( z ) z ) = f2 ( x, z, f1 (x, y, z)) y z z f2 (x, 0 , s(z) ) = s( s(z) ) 0 s(0) s(0) y z z f2 (x, s(y) , s(z) ) = s( s(z) ) s(y) s(s(z)) s(s(z)) Figure 6. Learned tree size definition for anti-unification depth 2, 3, and 4 5.2 Extension of structural recursion Some functions are best defined by simultaneous recursion on several arguments. As an example, consider the sort definition 4 with nl, o, and i denoting an empty list, a 0 digit, and a 1 digit, respectively. For technical reasons, such a list is interpreted in reversed order, e.g. o(i(i(nl))) denotes the number 6. The sum function add, its signature shown in 11, may then be defined by the following rewrite system: 61: 62: 63: 64: 65: 66: add( x , nl ) add( nl , y ) add(o(x),o(y)) add(o(x), i(y) ) add( i(x) ,o(y)) add( i(x) , i(y) ) = = = = = = x y o(add(x, y)) i(add(x, y)) i(add(x, y)) o(inc(add(x, y))) where 67: inc : blist −→ blist is a function to increment a binary digit list. mentation, with inc being used for the carry. This corresponds to the usual hardware imple- It is obvious that this definition cannot be obtained from our simple structural recursion scheme from Sect. 4, neither by recurring over argument position 1 nor over 2. Instead, we would need 12 recursion over both positions simultaneously, i.e. a scheme like 68: 69: 70: 71: 72: 73: 74: 75: 76: add( nl , nl ) add( nl ,o(y)) add( nl , i(y) ) add(o(x), nl ) add(o(x),o(y)) add(o(x), i(y) ) add( i(x) , nl ) add( i(x) ,o(y)) add( i(x) , i(y) ) = = = = = = = = = g15 g16 (y) g17 (y) g18 (x) g19 (add(x, y)) g20 (add(x, y)) g21 (x) g22 (add(x, y)) g23 (add(x, y)) An extension of our approach could provide such a scheme, additionally to the simple structural recursion scheme. If we could prove that each function definition obtainable by the simple recursion scheme can also be obtained by a simultaneous recursion scheme, we needed only to employ the latter. This way, we would no longer need to guess an appropriate argument position to recur over; instead we could always recur simultaneously over all arguments of a given sort. Unfortunately, simultaneous recursion is not stronger than simple structural recursion. For example, the function app to concatenate two given lists can be obtained by simple recursion over the first argument (see 18,19 in Fig. 3), but not by simultaneous recursion: app(w::x, y::z) = g24 (w, y, app(x, z)) doesn’t lead to a sensible definition, for any choice of g24 . One possible remedy is to try simple structural recursion first, on any appropriate argument position, and simultaneous recursion next, on any appropriate set of argument positions. Alternatively, user commands may be required about which recursion to try on which argument position(s). Another possibility might be to employ a fully general structural recursion scheme, like 77: and 78: app(w::x, y::z) = g24 (w, y, app(w::x, z) , app(x, y::z) , app(x, z) ) add(o(x), o(y)) = g25 ( add(o(x), y) , add(x, o(y)) , add(x, y) ) . In this scheme, calls for simple recursion over each position are provided, as well as for simultaneous recursion over each position set. A new symbol Ω, intended to denote an undefined term, could be added to the term language. When e.g. i/o equations are missing to compute add(o(x), y) for some particular instance, the first argument of g25 would be set to Ω in the respective i/o equation. In syntactical anti-unification and coverage test, Ω needed to be handled appropriately. This way, only one recursion scheme would be needed, and no choice of appropriate argument position(s) would be necessary. However, arities of auxiliary functions might grow exponentially. 5.3 Limitations of our approach In this section, we demonstrate an example where our approach fails. Consider again the squaring function, its signature shown in 55, and consider again its i/o equations 56, 57, 58, 13 and 59. Since syntactical anti-unification as in Sect. 3 (i.e. not considering an equational background theory E) doesn’t lead to a valid function definition, we build a structural recursion scheme as in Sect. 4: 79: sq(0) = g11 80: sq(s(x)) = g12 (sq(x)) We get g11 = 0, and the following i/o equations for g12 : 57 80 56 s(0) = sq(s(0)) = g12 (sq(0)) = g12 (0) 58 80 57 s(s(s(s(0)))) = sq(s(s(0))) = g12 (sq(s(0))) = g12 (s(0)) 59 80 58 9 s (0) = sq(s(s(s(0)))) = g12 (sq(s(s(0)))) = g12 (s(s(s(s(0))))) 81: 82: 83: Observe that we are able to obtain i/o equations for g12 only on square numbers. For example, there is no obvious way to determine the value of g12 (s(s(s(0)))). Syntactically anti-unifying g12 ’s i/o equation still doesn’t yield a valid function definition. So we set up a recursion scheme for g12 , in turn: 84: 85: g12 (0) = g13 g12 (s(x)) = g14 (g12 (x)) Again, g13 = s(0) is obvious. Trying to obtain i/o equations for g14 , we get stuck, since we don’t know how g12 should behave on non-square numbers: 86: 87: 88: 89: s(s(s(s(0)))) ?? ?? 9 s (0) 82 = g12 (s(0)) ?? = g12 (s(s(0))) ?? = g12 (s(s(s(0)))) 83 = g12 (s(s(s(s(0))))) As an alternative, by applying 90: 85 85 = g14 (g12 (0)) 85 = g14 (g12 (s(0))) 85 = g14 (g12 (s(s(0)))) 85 = g14 (g12 (s(s(s(0))))) 81 = g14 (s(0)) = g14 (s(s(s(s(0))))) ?? = g14 (??) ?? = g14 (??) 82 sufficiently often rather than just once, we can obtain: 83 s9 (0) = g12 (s(s(s(s(0))))) 85 = g14 (g12 (s(s(s(0))))) 85 = g14 (g14 (g12 (s(s(0))))) 85 82 = g14 (g14 (g14 (g12 (s(0))))) = g14 (g14 (g14 (s(s(s(s(0))))))) However, no approach is known to learn g14 from an extended i/o equation like 90, which determines g14 ◦ g14 ◦ g14 rather than g14 itself. In such cases, we resort to the excuse that the original function, sq isn’t definable by structural recursion. A precise criterion for the class that our approach can handle is still to be found. It is not even clear that such a criterion can be computable. If not, it should still be possible to give computable necessary and sufficient approximations. 14 A A.1 Example runs of our prototype implementation Addition of 0-s numbers ?- SgI = [ + signature [nat,nat] --> nat], | SD = [ nat sortdef 0 ! s(nat)], | ExI = [ 0 + 0 = 0, | s(0) + 0 = s(0), | 0 + s(0) = s(0), | 0 + s(s(0)) = s(s(0)), | s(0) + s(0) = s(s(0)), | s(0) + s(s(0)) = s(s(s(0))), | s(s(0)) + s(0) = s(s(s(0))), | s(s(0)) + 0 = s(s(0))], | run(+,SgI,SD,ExI). +++++ Examples input check: +++++ Example 1: +++++ Example 2: +++++ Example 3: +++++ Example 4: +++++ Example 5: +++++ Example 6: +++++ Example 7: +++++ Example 8: +++++ Examples input check done induce(+) . trying argument position: 1 . inducePos(+,1,0) . . matching examples: [0+0=0,0+s(0)=s(0),0+s(s(0))=s(s(0))] . . anti-unifier: 0+v3 = v3 . inducePos(+,1,0) . inducePos(+,1,s(nat)) . . matching examples: [s(0)+0=s(0),s(0)+s(0)=s(s(0)),s(0)+s(s(0))=s(s(s(0))),s(s(0))+s(0)=s(s(s(0))),s(s(0))+0=s(s(0))] . . new recursion scheme: s(v9)+v8 = f10(v8,v9+v8) . . derive new equation: s(0) = s(0)+0 = f10(0,0) . . derive new equation: s(s(0)) = s(0)+s(0) = f10(s(0),s(0)) . . derive new equation: s(s(s(0))) = s(0)+s(s(0)) = f10(s(s(0)),s(s(0))) . . derive new equation: s(s(s(0))) = s(s(0))+s(0) = f10(s(0),s(s(0))) . . derive new equation: s(s(0)) = s(s(0))+0 = f10(0,s(0)) . . induce(f10) . . . trying argument position: 1 . . . inducePos(f10,1,0) . . . . matching examples: [f10(0,0)=s(0),f10(0,s(0))=s(s(0))] . . . . anti-unifier: f10(0,v13) = s(v13) . . . inducePos(f10,1,0) . . . inducePos(f10,1,s(nat)) . . . . matching examples: [f10(s(0),s(0))=s(s(0)),f10(s(0),s(s(0)))=s(s(s(0))),f10(s(s(0)),s(s(0)))=s(s(s(0)))] . . . . anti-unifier: f10(s(v15),s(v16)) = s(s(v16)) . . . inducePos(f10,1,s(nat)) . . . all examples covered . . induce(f10) . inducePos(+,1,s(nat)) . all examples covered induce(+) +++++ Examples output check: +++++ Examples output check done FUNCTION SIGNATURES: f10 signature [nat,nat]-->nat (+)signature[nat,nat]-->nat FUNCTION EXAMPLES: 0+0=0 s(0)+0=s(0) 0+s(0)=s(0) 0+s(s(0))=s(s(0)) s(0)+s(0)=s(s(0)) s(0)+s(s(0))=s(s(s(0))) s(s(0))+s(0)=s(s(s(0))) s(s(0))+0=s(s(0)) FUNCTION DEFINITIONS: 0+v17=v17 s(v18)+v19=f10(v19,v18+v19) f10(0,v20)=s(v20) f10(s(v21),s(v22))=s(s(v22)) ?- A.2 Size of a tree ?- SgI = [ size signature [tree] --> nat], | SD = [ tree sortdef nl ! nd(tree,nat,tree), | nat sortdef 0 ! s(nat)], | ExI = [ size(nl) = 0, 15 | size(nd(nl,va,nl)) = s(0), | size(nd(nd(nl,va,nl),vb,nl)) = s(s(0)), | size(nd(nl,va,nd(nl,vb,nl))) = s(s(0)), | size(nd(nd(nl,va,nl),vb,nd(nl,vc,nl))) = s(s(s(0))), | size(nd(nl,va,nd(nd(nl,vb,nl),vc,nl))) = s(s(s(0))), | size(nd(nl,va,nd(nl,vb,nd(nl,vc,nl)))) = s(s(s(0))), | size(nd(nd(nl,va,nl),vb,nd(nd(nl,vc,nl),vd,nl))) = s(s(s(s(0)))), | size(nd(nd(nd(nl,va,nl),vb,nl),vc,nd(nl,vd,nl))) = s(s(s(s(0)))) | ], | run(size,SgI,SD,ExI). +++++ Examples input check: +++++ Example 1: +++++ Example 2: +++++ Example 3: +++++ Example 4: +++++ Example 5: +++++ Example 6: +++++ Example 7: +++++ Example 8: +++++ Example 9: Variable sorts: [vd:nat,vc:nat,vb:nat,va:nat] +++++ Examples input check done induce(size) . trying argument position: 1 . inducePos(size,1,nl) . . matching examples: [size(nl)=0] . . anti-unifier: size(nl) = 0 . inducePos(size,1,nl) . inducePos(size,1,nd(tree,nat,tree)) . . matching examples: [size(nd(nl,va,nl))=s(0),size(nd(nd(nl,va,nl),vb,nl))=s(s(0)),size(nd(nl,va,nd(nl,vb,nl)))=s(s(0)),size(nd(nd(nl,va,nl),vb,n... . . new recursion scheme: size(nd(v10,v9,v11)) = f12(v9,size(v10),size(v11)) . . derive new equation: s(0) = size(nd(nl,va,nl)) = f12(va,0,0) . . derive new equation: s(s(0)) = size(nd(nd(nl,va,nl),vb,nl)) = f12(vb,s(0),0) . . derive new equation: s(s(0)) = size(nd(nl,va,nd(nl,vb,nl))) = f12(va,0,s(0)) . . derive new equation: s(s(s(0))) = size(nd(nd(nl,va,nl),vb,nd(nl,vc,nl))) = f12(vb,s(0),s(0)) . . derive new equation: s(s(s(0))) = size(nd(nl,va,nd(nd(nl,vb,nl),vc,nl))) = f12(va,0,s(s(0))) . . derive new equation: s(s(s(0))) = size(nd(nl,va,nd(nl,vb,nd(nl,vc,nl)))) = f12(va,0,s(s(0))) . . derive new equation: s(s(s(s(0)))) = size(nd(nd(nl,va,nl),vb,nd(nd(nl,vc,nl),vd,nl))) = f12(vb,s(0),s(s(0))) . . derive new equation: s(s(s(s(0)))) = size(nd(nd(nd(nl,va,nl),vb,nl),vc,nd(nl,vd,nl))) = f12(vc,s(s(0)),s(0)) . . induce(f12) . . . trying argument position: 1 . . . inducePos(f12,1,0) . . . . matching examples: [] . . . . no examples . . . inducePos(f12,1,0) . . . inducePos(f12,1,s(nat)) . . . . matching examples: [] . . . . no examples . . . inducePos(f12,1,s(nat)) . . . uncovered examples: [f12(va,0,0)=s(0),f12(va,0,s(0))=s(s(0)),f12(va,0,s(s(0)))=s(s(s(0))),f12(vb,s(0),0)=s(s(0)),f12(vb,s(0),s(0))=s(s(s... . . . trying argument position: 2 . . . inducePos(f12,2,0) . . . . matching examples: [f12(va,0,0)=s(0),f12(va,0,s(0))=s(s(0)),f12(va,0,s(s(0)))=s(s(s(0)))] . . . . anti-unifier: f12(va,0,v37) = s(v37) . . . inducePos(f12,2,0) . . . inducePos(f12,2,s(nat)) . . . . matching examples: [f12(vb,s(0),0)=s(s(0)),f12(vb,s(0),s(0))=s(s(s(0))),f12(vb,s(0),s(s(0)))=s(s(s(s(0)))),f12(vc,s(s(0)),s(0))=s(s(s(s... . . . . new recursion scheme: f12(v43,s(v45),v44) = f46(v43,v44,f12(v43,v45,v44)) . . . . derive new equation: s(s(0)) = f12(vb,s(0),0) = f46(vb,0,s(0)) . . . . derive new equation: s(s(s(0))) = f12(vb,s(0),s(0)) = f46(vb,s(0),s(s(0))) . . . . derive new equation: s(s(s(s(0)))) = f12(vb,s(0),s(s(0))) = f46(vb,s(s(0)),s(s(s(0)))) . . . . derive new equation: s(s(s(s(0)))) = f12(vc,s(s(0)),s(0)) = f46(vc,s(0),s(s(s(0)))) . . . . induce(f46) . . . . . trying argument position: 1 . . . . . inducePos(f46,1,0) . . . . . . matching examples: [] . . . . . . no examples . . . . . inducePos(f46,1,0) . . . . . inducePos(f46,1,s(nat)) . . . . . . matching examples: [] . . . . . . no examples . . . . . inducePos(f46,1,s(nat)) . . . . . uncovered examples: [f46(vb,0,s(0))=s(s(0)),f46(vb,s(0),s(s(0)))=s(s(s(0))),f46(vb,s(s(0)),s(s(s(0))))=s(s(s(s(0)))),f46(vc,s(0),s(s(s(0... . . . . . trying argument position: 2 . . . . . inducePos(f46,2,0) . . . . . . matching examples: [f46(vb,0,s(0))=s(s(0))] . . . . . . anti-unifier: f46(vb,0,s(0)) = s(s(0)) . . . . . inducePos(f46,2,0) . . . . . inducePos(f46,2,s(nat)) . . . . . . matching examples: [f46(vb,s(0),s(s(0)))=s(s(s(0))),f46(vb,s(s(0)),s(s(s(0))))=s(s(s(s(0)))),f46(vc,s(0),s(s(s(0))))=s(s(s(s(0))))] . . . . . . anti-unifier: f46(v63,s(v64),s(s(v65))) = s(s(s(v65))) . . . . . inducePos(f46,2,s(nat)) . . . . . all examples covered . . . . induce(f46) . . . inducePos(f12,2,s(nat)) . . . all examples covered . . induce(f12) . inducePos(size,1,nd(tree,nat,tree)) . all examples covered induce(size) +++++ Examples output check: +++++ Examples output check done FUNCTION SIGNATURES: f46 signature [nat,nat,nat]-->nat f12 signature [nat,nat,nat]-->nat size signature [tree]-->nat FUNCTION EXAMPLES: size(nl)=0 size(nd(nl,va,nl))=s(0) 16 size(nd(nd(nl,va,nl),vb,nl))=s(s(0)) size(nd(nl,va,nd(nl,vb,nl)))=s(s(0)) size(nd(nd(nl,va,nl),vb,nd(nl,vc,nl)))=s(s(s(0))) size(nd(nl,va,nd(nd(nl,vb,nl),vc,nl)))=s(s(s(0))) size(nd(nl,va,nd(nl,vb,nd(nl,vc,nl))))=s(s(s(0))) size(nd(nd(nl,va,nl),vb,nd(nd(nl,vc,nl),vd,nl)))=s(s(s(s(0)))) size(nd(nd(nd(nl,va,nl),vb,nl),vc,nd(nl,vd,nl)))=s(s(s(s(0)))) FUNCTION DEFINITIONS: size(nl)=0 size(nd(v66,v67,v68))=f12(size(v66),size(v68)) f12(0,v69)=s(v69) f12(s(v70),v71)=f46(v71,f12(v70,v71)) f46(0,s(0))=s(s(0)) f46(s(v72),s(s(v73)))=s(s(s(v73))) ?- A.3 Reversing a list ?- SgI = [rev signature [list] --> list], | SD = [ list sortdef [] ! [nat|list], | nat sortdef 0 ! s(nat)], | ExI = [ rev([]) = [], | rev([va]) = [va], | rev([vb,va]) = [va,vb], | rev([vc,vb,va]) = [va,vb,vc]], | run(rev,SgI,SD,ExI). +++++ Examples input check: +++++ Example 1: +++++ Example 2: +++++ Example 3: +++++ Example 4: Variable sorts: [vc:nat,vb:nat,va:nat] +++++ Examples input check done induce(rev) . trying argument position: 1 . inducePos(rev,1,[]) . . matching examples: [rev([])=[]] . . anti-unifier: rev([]) = [] . inducePos(rev,1,[]) . inducePos(rev,1,[nat|list]) . . matching examples: [rev([va])=[va],rev([vb,va])=[va,vb],rev([vc,vb,va])=[va,vb,vc]] . . new recursion scheme: rev([v7|v8]) = f9(v7,rev(v8)) . . derive new equation: [va] = rev([va]) = f9(va,[]) . . derive new equation: [va,vb] = rev([vb,va]) = f9(vb,[va]) . . derive new equation: [va,vb,vc] = rev([vc,vb,va]) = f9(vc,[va,vb]) . . induce(f9) . . . trying argument position: 1 . . . inducePos(f9,1,0) . . . . matching examples: [] . . . . no examples . . . inducePos(f9,1,0) . . . inducePos(f9,1,s(nat)) . . . . matching examples: [] . . . . no examples . . . inducePos(f9,1,s(nat)) . . . uncovered examples: [f9(va,[])=[va],f9(vb,[va])=[va,vb],f9(vc,[va,vb])=[va,vb,vc]] . . . trying argument position: 2 . . . inducePos(f9,2,[]) . . . . matching examples: [f9(va,[])=[va]] . . . . anti-unifier: f9(va,[]) = [va] . . . inducePos(f9,2,[]) . . . inducePos(f9,2,[nat|list]) . . . . matching examples: [f9(vb,[va])=[va,vb],f9(vc,[va,vb])=[va,vb,vc]] . . . . new recursion scheme: f9(v22,[v23|v24]) = f25(v22,v23,f9(v22,v24)) . . . . derive new equation: [va,vb] = f9(vb,[va]) = f25(vb,va,[vb]) . . . . derive new equation: [va,vb,vc] = f9(vc,[va,vb]) = f25(vc,va,[vb,vc]) . . . . induce(f25) . . . . . trying argument position: 1 . . . . . inducePos(f25,1,0) . . . . . . matching examples: [] . . . . . . no examples . . . . . inducePos(f25,1,0) . . . . . inducePos(f25,1,s(nat)) . . . . . . matching examples: [] . . . . . . no examples . . . . . inducePos(f25,1,s(nat)) . . . . . uncovered examples: [f25(vb,va,[vb])=[va,vb],f25(vc,va,[vb,vc])=[va,vb,vc]] . . . . . trying argument position: 2 . . . . . inducePos(f25,2,0) . . . . . . matching examples: [] . . . . . . no examples . . . . . inducePos(f25,2,0) . . . . . inducePos(f25,2,s(nat)) . . . . . . matching examples: [] . . . . . . no examples . . . . . inducePos(f25,2,s(nat)) . . . . . uncovered examples: [f25(vb,va,[vb])=[va,vb],f25(vc,va,[vb,vc])=[va,vb,vc]] . . . . . trying argument position: 3 . . . . . inducePos(f25,3,[]) 17 . . . . . . matching examples: [] . . . . . . no examples . . . . . inducePos(f25,3,[]) . . . . . inducePos(f25,3,[nat|list]) . . . . . . matching examples: [f25(vb,va,[vb])=[va,vb],f25(vc,va,[vb,vc])=[va,vb,vc]] . . . . . . anti-unifier: f25(v37,va,[vb|v38]) = [va,vb|v38] . . . . . inducePos(f25,3,[nat|list]) . . . . . all examples covered . . . . induce(f25) . . . inducePos(f9,2,[nat|list]) . . . all examples covered . . induce(f9) . inducePos(rev,1,[nat|list]) . all examples covered induce(rev) +++++ Examples output check: +++++ Examples output check done FUNCTION SIGNATURES: f25 signature [nat,nat,list]-->list f9 signature [nat,list]-->list rev signature [list]-->list FUNCTION EXAMPLES: rev([])=[] rev([va])=[va] rev([vb,va])=[va,vb] rev([vc,vb,va])=[va,vb,vc] FUNCTION DEFINITIONS: rev([])=[] rev([v39|v40])=f9(v39,rev(v40)) f9(v41,[])=[v41] f9(v42,[v43|v44])=f25(v43,f9(v42,v44)) f25(v41,[v45|v46])=[v41,v45|v46] ?- 18 References [Bur05] Jochen Burghardt. 165(1):1–35, 2005. E-generalization using grammars. Artificial Intelligence Journal, [Bur17] Jochen Burghardt. An improved algorithm for E-generalization. Technical report, Berlin, Sep 2017. [Com86] Hubert Comon. Sufficient completeness, term rewriting systems and “anti-unification”. In Proc. 8th International Conference on Automated Deduction, volume 230 of LNCS, pages 128–140. Springer, 1986. [DJ90] N. Dershowitz and J.-P. Jouannaud. Rewrite Systems, volume B of Handbook of Theoretical Computer Science, pages 243–320. Elsevier, 1990. [Gut77] John V. Guttag. Abstract data types and the development of data structures. Communications of the ACM, 20(6):396–404, Jun 1977. [Hei94a] Birgit Heinz. Anti-unification and its application to lemma discovery, 1994. Workshop Talk given in CADE-12. [Hei94b] Birgit Heinz. Lemma discovery by anti-unification of regular sorts. Technical Report 94–21, TU Berlin, 1994. [Hei95] Birgit Heinz. Anti-Unifikation modulo Gleichungstheorie und deren Anwendung zur Lemmagenerierung. PhD thesis, TU Berlin, Dec 1995. [Kit10] Emanuel Kitzelmann. A Combined Analytical and Search-Based Approach to the Inductive Synthesis of Functional Programs. PhD thesis, Univ. Bamberg, May 2010. [LV08] Ming Li and Paul Vitányi. An Introduction to Kolmogorov Complexity and Its Applications. texts in computer science. Springer, New York, 3rd edition, 2008. [Plo70] Gordon D. Plotkin. A note on inductive generalization. Machine Intelligence, 5:153–163, 1970. [Plo71] Gordon D. Plotkin. A further note on inductive generalization. Machine Intelligence, 6:101– 124, 1971. [Rey70] John C. Reynolds. Transformational systems and the algebraic structure of atomic formulas. Machine Intelligence, 5:135–151, 1970. 19
6cs.PL
How do people explore virtual environments? arXiv:1612.04335v2 [cs.CV] 19 Sep 2017 Vincent Sitzmann∗ , Ana Serrano∗ , Amy Pavel, Maneesh Agrawala, Diego Gutierrez, Belen Masia, Gordon Wetzstein Fig. 1. A representative subset of the 22 panoramas used to analyze how people explore virtual environments from a fixed viewpoint. We recorded almost two thousand scanpaths of users exploring these scenes in different immersive and non-immersive viewing conditions. We then analyzed this data, and provide meaningful insights about viewers’ behavior. We apply these insights to VR applications, such as saliency prediction (shown in the image as overlaid heatmaps), VR movie editing, panorama thumbnail generation, panorama video synopsis, and saliency-aware compression of VR content. Abstract—Understanding how people explore immersive virtual environments is crucial for many applications, such as designing virtual reality (VR) content, developing new compression algorithms, or learning computational models of saliency or visual attention. Whereas a body of recent work has focused on modeling saliency in desktop viewing conditions, VR is very different from these conditions in that viewing behavior is governed by stereoscopic vision and by the complex interaction of head orientation, gaze, and other kinematic constraints. To further our understanding of viewing behavior and saliency in VR, we capture and analyze gaze and head orientation data of 169 users exploring stereoscopic, static omni-directional panoramas, for a total of 1980 head and gaze trajectories for three different viewing conditions. We provide a thorough analysis of our data, which leads to several important insights, such as the existence of a particular fixation bias, which we then use to adapt existing saliency predictors to immersive VR conditions. In addition, we explore other applications of our data and analysis, including automatic alignment of VR video cuts, panorama thumbnails, panorama video synopsis, and saliency-based compression. Index Terms—Immersive environments, saliency 1 I NTRODUCTION and other key aspects of VR systems. Virtual reality (VR) systems provide a new medium that has the potential to have a significant impact on our society. The experiences offered by these emerging systems are inherently different from radio, television, or theater, opening new directions in research areas such as cinematic VR capture [1], interaction [54], or content generation and editing [40, 50]. However, the behavior of users who visually explore immersive VR environments is not well understood, nor do statistical models exist to predict this behavior. Yet, with unprecedented capabilities for creating synthetic immersive environments, many important questions arise. How do we design 3D scenes or place cuts in VR videos? How do we drive user attention in virtual environments? Can we predict visual exploration patterns? How can we efficiently compress cinematic VR content? To address these and other questions from first principles, it is crucial to understand how users explore virtual environments. In this work, we take steps towards this goal. In particular, we are interested in quantifying aspects of user behavior that may be helpful in predicting exploratory user behavior in static and dynamic virtual environments observed from a fixed viewpoint. A detailed understanding of visual attention in VR would not only help answer the above questions, but also inform future designs of user interfaces, eye tracking technology, A crucial requirement for developing an understanding for viewing behavior in VR is access to behavioral data. To this end, we have performed an extensive study, recording 1980 head and gaze trajectories from 169 people in 22 static virtual environments, which are represented as stereoscopic omni-directional panoramas. Data is recorded using a head-mounted display (HMD) in both standing and seated conditions (VR condition and VR seated condition), as well as for users observing the same scenes in mono on a desktop monitor for comparison (desktop condition). We analyze the data and discuss important insights (see Sec. 4 for more details). We then leverage this to evaluate existing saliency predictors, designed for narrow field of view video, in the context of immersive VR, and show how these can be adapted to VR applications. Saliency prediction is a well-explored topic and many existing models are evaluated by the MIT Saliency Benchmark [6]. However, these models assume that users sit in front of a screen while observing the images – ground truth data is collected by eye trackers recording precisely this behavior. VR is different from traditional 2D viewing in that users naturally use both significant head movement and gaze to visually explore scenes; we show that this leads to a fixation bias that is not observed in conventional viewing conditions. Figure 1 shows panoramic views of some of our 22 scenes with superimposed saliency computed from the recorded scan paths in the VR condition. Apart from saliency, we offer several other example applications that are directly derived from our findings. Specifically, our contributions are: • ∗ These authors contributed equally. • Correspondence to: [email protected]. 1 • We record and provide an extensive dataset of visual exploration behavior in stereoscopic, static omni-directional (ODS) panoramas. The dataset contains head orientation and gaze direction, and it captures several different viewing conditions. All scenes, data, and code for analysis will be made public (Sec. 3) collected in this paper and in-depth analyses augment prior work in this field, and may allow for future data-driven models for visual behavior to be learned. Finally, gaze tracking has found many applications in VR user interfaces [55] and gaze-contingent displays [13, 42, 51]. The ability to predict viewing behavior would be helpful for all of these applications. For example, gaze-contingent techniques may become possible without dedicated gaze trackers, which are currently expensive and not widely available. Moreover, techniques for editing VR content are starting to emerge [40, 50]. The understanding of user behavior we aim to develop in this paper could also influence these and other tools for content creation. A preliminary version of this manuscript was published on arXiv [2]. • We provide low-level and high-level analysis of the recorded dataset. We derive relevant insights that can be crucial for predicting saliency in VR and other VR applications (Sec. 4) • We evaluate existing saliency predictors with respect to their performance in VR applications. We show how to tailor these predictors to ODS panoramas and we explore how useful saliency prediction from head movement alone is (Sec. 5) 3 • We demonstrate several applications of this saliency prediction, including automatic panorama thumbnails, VR video synopsis, compression, and VR video cuts (Sec. 6) R ECORDING H EAD O RIENTATION AND G AZE In this section, we summarize our efforts towards recording a dataset that contains head orientation and gaze direction for users watching stereoscopic VR panoramas in several different viewing conditions; we provide additional details in the supplemental material. These data form the basis of a statistical analysis of viewing behavior (Sec. 4), as ground truth for saliency prediction (Sec. 5), and also as reference saliency for several higher-level applications (Sec. 6). 2 R ELATED W ORK Modeling human gaze behavior and predicting visual attention has been an active area of vision research. In their seminal work, Koch and Ullman [28] introduced a model for predicting salient regions from a set of image features. Motivated by this work, many models of visual attention have been proposed throughout the last three decades. Most of these models are based on bottom-up, top-down, or hybrid approaches. Bottom-up approaches build on a combination of lowlevel image features, including color, contrast, or orientation [9, 22, 27, 37] (see Zhao and Koch [62] for a review). Top-down models take higher-level knowledge of the scene into account such as context or specific tasks [17, 23, 26, 36, 56]. Recently, advances in machine learning and particularly convolutional neuronal networks (CNNs) have fostered the convergence of top-down and bottom-up features for saliency prediction, producing more accurate models [21, 35, 43, 59, 63]. Jiang et al. [25] proposed a new methodology to collect attentional data on scales sufficient for these deep learning methods. Volotikin et al. [58] used features learned by CNNs to predict when saliency maps predicted by a model will be accurate and when fixations will be consistent among human observers. Significant prior work explored rigorous benchmarking of saliency models, the impact of the metric on the evaluation result, and shortcomings of state-of-the-art models at the time [5, 7, 46]. Recent work also attempts to extend CNN approaches beyond classical 2D images by computing saliency in more complex scenarios such as stereo images [10, 18] or video [8, 34]. A related line of research is devoted to modeling the gaze scanpath followed by subjects, i.e., the temporal evolution of the viewer’s gaze [24, 33]. Marmitt et al. [38] developed a metric to evaluate predicted scanpaths in VR and showed that predictors built for classic viewing conditions perform significantly worse in VR. Building on the rich literature in this area, we explore user behavior and visual attention in immersive virtual environments, which can help build similar models for VR. What makes VR different from desktop viewing conditions is the fact that head orientation is used as a natural interface to control perspective (and in some cases navigation as well [57]). The interactions of head and eye movements are complex and neurally coupled, for example via the vestibulo-ocular reflex [31]. Koehler et al. [29] showed that saliency maps can differ depending on the instructions given to the viewer. For more information on user behavior in VR, we refer to Ruhland et al. [47], who provide a review of eye gaze behavior, and Freedman [14], who discusses the mechanisms that characterize the coordination between eyes and head during visual orienting movements. With the data recorded in this project, we observe the vestibulo-ocular reflex and other interesting effects. In the paper and supplemental material, we provide an extensive analysis of the user data and derive statistics modeling many low-level aspects of viewing behavior. We hope that this analysis will be useful for basic vision research. Recent work of Nakashima et al. [39] is closely related to some aspects of our work. They propose a head direction prior to improve accuracy in saliency-based gaze prediction through simple multiplication of the gaze saliency map by a Gaussian head direction bias. The data 3.1 Data capture Stimuli For the experiments reported in this paper, we used 22 high-resolution omni-directional stereo panoramas (see Figure 1 and supplemental material). We opt for a fixed viewpoint because for the subsequent analyses it is crucial that subjects see the exact same content; further, in a 3D scenario the variability is likely to be much higher, requiring extremely large numbers of subjects to draw significant conclusions. The scenes include (14) indoor and (8) outdoor scenarios and do not contain landmarks that may be recognized by the users. For each scene we explore different conditions, which limits the number of scenes we can have with the experiment size remaining tractable; with the current stimuli and conditions we have collected nearly 2,000 trajectories from 169 viewers. All scenes are computer generated by artists; we received permission to use them for this study. Conditions We recorded users observing the 22 panoramas under three different conditions: in a standing position using a head-mounted display (i.e., the VR condition), seated in a non-swivel chair using a head-mounted display (i.e., the VR seated condition, making it more difficult to turn around), and seated in front of a desktop monitor (i.e., the desktop condition). In the desktop condition, the scenes are monoscopic, and users navigate with a mouse. For each scene, we tested four different starting points, spaced at 90◦ longitude, which results in a total of 264 conditions. These starting points were chosen to cover the entire longitudinal range, while keeping the number of different conditions tractable. We chose not to randomize the starting point over the whole latitude (and rather select randomly from four fixed ones) to limit the number of conditions while being able to analyze the influence of the starting point (Sec. 4.5 and supplement); complete randomization over the starting point could be of interest for future studies. Participants For the VR condition, we recorded 122 users (92 male, 30 female, age 17-59). The experiments with the VR seated condition were performed by 47 users (38 male, 9 female, age 1739). Users were asked to first perform a stereo vision (Randot) test to quantify their stereo acuity. For desktop experiments, we recruited 44 additional participants (27 male, 17 female, age 18-33). All participants reported normal or corrected-to-normal vision. Procedure All VR scenes were displayed using an Oculus DK2 head-mounted display, equipped with a pupil-labs1 stereoscopic eye tracker recording at 120 Hz. The DK2 offers a field of view of 95 × 106◦ . The Unity game engine was used to display all scenes and record head orientation while the eye tracker collected gaze data on a separate computer. Users were instructed to freely explore the scene and were 1 https://pupil-labs.com 2 Exploration time Agreement provided with a pair of earmuffs to avoid auditory interference. Scenes and starting points were randomized, while ensuring that each user would only see the same scene once from a single random starting point. Each user was shown 8 scenes; each scene in a certain condition was shown to the user during 30 seconds, while the total time per user that the experiment took, including calibration and explanation, was approximately 10 minutes. We modeled the desktop condition after typical, mouse-controlled desktop panorama viewers on the web (i.e., YouTubeVR or Facebook360). Users sat 0.45 meters away from a 17.3” monitor with a resolution of 1920 × 1080 px, covering a field of view of 23 × 13◦ . We used a Tobii EyeX eye tracker with an accuracy of 0.6◦ at a sampling frequency of 55 Hz [16]. The image viewer displayed a rectilinear projection of a 97 × 65◦ viewport of the panorama. To keep the field of view consistent, no zooming was possible. We instructed the users on how to use the image viewer, before showing the 22 scenes for 30 seconds each. In this condition, we only collected gaze data since users rarely re-orient their head. Instead, we recorded where the users interactively place the virtual camera in the panorama as a proxy for head orientation. 30 0 ch 0 an ce Percent salient VR Desktop Time first reached [s] True positive rate 1 100 0 speed 23.63 [deg/s] intercept 3.46 [s] speed 27.83 [deg/s] intercept 3.63 [s] 360 180 0 180 360 Longitudinal distance to starting point in degree Fig. 2. Left: ROC curve of human performance averaged across users (magenta) and individual ROCs for each scene (light gray). The fast convergence to the maximum is indicative of a strong agreement between users. Right: Exploration time computed as the average time until a specific longitudinal offset from the starting point is reached. of our three conditions (VR, VR seated, and desktop) shows a high similarity between the saliency maps (see supplement). For a quantitative evaluation of the similarity of saliency maps (here, and in the rest of the paper), we use the Pearson correlation (CC) score, which is a widely used metric in saliency map prediction [7]. The high similarity is confirmed by a median CC score of 0.80 when comparing the VR and the VR seated conditions, and 0.76 when comparing the VR and the desktop conditions. The latter is a significant insight: since desktop experiments are much easier to control, it may be possible to use these for collecting adequate training sets for data-driven saliency prediction in future VR systems. Given this similarity, we report only the results of the VR (standing) condition throughout the remainder of the paper, unless a significant difference is found, and refer the reader to the supplemental for the VR seated and desktop conditions. 3.2 Data processing To identify fixations, we transformed the normalized gaze tracker coordinates to latitude and longitude in the 360◦ panorama. This is necessary to detect users fixating on panorama features while turning their head. We used thresholding based on dispersion and duration of the fixations [48]. For the VR experiments, we set the minimum duration to 150 ms [48] and the maximum dispersion to 1◦ [3]. For the desktop condition, we first smoothed this data with a running average of 2 samples, and detected fixations with a dispersion of 2◦ . We counted the number of fixations at each pixel location in the panorama. Similar to Judd et al. [26], we only consider measurements from the moment where user’s gaze left the initial starting point to avoid adding trivial information. We convolved these fixation maps with a Gaussian with a standard deviation of 1◦ of visual angle to yield continuous saliency maps [32]. 4.3 Is there a fixation bias in VR? Several researchers have reported a strong bias for human fixations to be near the center, when viewing regular images [26, 41]. A natural question to ask is whether a similar bias exists in VR. Similar to Judd et al. [26], we calculate the average of all 22 saliency maps, and filter out fixations within the close vicinity (20◦ longitude) of the starting point. The resulting data indicates that users tend to fixate around the equator of the panoramas, with very few fixations in latitudes far from it. To quantify this equator bias, we marginalize out the longitudinal component of the saliency map, and fit a Laplace distribution—with location parameter µ and diversity β —to the latitudinal component (this particular distribution yielded the best match among several tested distributions). Figure 3 depicts the average saliency map, as well as our Laplacian fit to the latitudinal distribution and its parameters, for both the VR and the desktop conditions. While the mean is almost identical, the equator bias for the desktop condition has a lower diversity. As discussed in Section 5, this Laplacian equator bias is crucial for predicting saliency in VR. Note that most of the scenes in our study have a clear horizon line, which may have influenced the observed equator bias along with viewing preferences, kinematic constraints, as well as the static nature of the scenes. However, most virtual environments share this type of scene layout, so we believe our findings generalize to a significant fraction of this type of content. Further, even for scenes with content scattered along different latitudes (see, e.g., scene 16 in Fig. 12 of the supplement, displaying very few salient areas near the poles), we observed an equator bias. Nevertheless, different tasks or scenarios, such as gaming, may influence this bias. 4 U NDERSTANDING VIEWING BEHAVIOR IN VR With the recorded data, we can gather insights and investigate a number of questions about the behavior of users exploring virtual environments. In the following, we analyze both low-level characteristics, such as duration of the fixations and speed of gaze, and higher-level characteristics, such as the influence of the content or characteristics of the scene. 4.1 Is viewing behavior similar between users? We first want to assess whether viewing behavior between users is similar; this is also indicative of how robust our data is, and thus how much we can rely on it to draw conclusions. To answer this, we analyze the agreement between users. Specifically, we compute the inter-observer congruency metric by means of a receiver operating characteristic curve (ROC) [32,56]. This metric calculates the ability of the ith user to predict a ground truth saliency map, which is computed from the fixations of all the other users averaged. A single point in the ROC curve is computed by finding the top n% most salient regions of the ground truth saliency map (leaving out the ith user), and then calculating the percentage of fixations of the ith user that fall into these regions. We show the average ROC for all the 22 scenes in Figure 2 (left), compared with chance (the individual ROCs for each scene are depicted in light gray). The fast convergence of these curves to the maximum rate of 1 indicates a strong agreement, and thus similar behavior, between users for each of the scenes tested. 70% of all fixations fall within the 20% most salient regions. These values are surprisingly good, since they are comparable to previous studies viewing regular images on a display [32]. 4.4 Does scene content affect viewing behavior? A fundamental issue when analyzing viewing behavior is the potential influence of scene content. This is of particular relevance for content creators; since in a VR setup the viewer has control over the camera, this analysis can help address the key challenge of predicting user attention. To characterize scene content in a manner that enables insightful analysis, we rely on the distribution of salient regions in the scene, in 4.2 How different is viewing behavior for the 3 conditions? An important question to ask is whether viewing behavior changes when exploring a scene under different conditions. Visual inspection 3 Fig. 3. Average saliency maps computed with all the scenes for both the VR (left) and the desktop (right) conditions. These average maps demonstrate an “equator bias” that is well-described by a Laplacian fit modeling the probability of a user fixating on an object at a specific latitude. Fig. 5. Salient region computation. Left: Ground truth saliency map for a sample scene. Right: Corresponding salient regions (yellow) computed by thresholding the 5% most salient pixels of the scene. be counter-intuitive, since high entropy scenes contain a larger number of salient regions and thus it would be easier to reach one; interestingly, though, our results indicate that the viewer explores the scene faster in cases of low entropy, quickly discarding non-salient regions, and that her attention gets directed towards the few salient regions faster. This hypothesis is further supported by the behavior of the convergTime metric, which shows that scenes with low entropy do converge faster, and is consistent with the number of fixations, and fixations inside the salient region (nFix and percFixInside): both are higher for low entropy scenes, indicating that users pay more attention to salient regions when such regions are less, and more concentrated. Fig. 4. Saliency maps presenting the lowest (left) and highest (right) entropy in our dataset. Saliency maps with low entropy have very defined salient regions while in maps with high entropy fixations are scattered all over the scene. 4.5 Does the starting point affect viewing behavior? We also evaluate whether the starting viewport conditions the final saliency map for a given scene: For each scene, we compute the similarity between the final saliency map of the ith viewport and the other three, using again the CC score. We obtain a median CC score of 0.79, which indicates that the final saliency maps after 30 seconds, starting from different viewports, converge and are very similar. Additional analysis on the influence of the viewport, including also a state sequence analysis [15, 50], can be found in the supplement. particular on the entropy of the saliency maps. A high entropy results from a large number of similarly salient objects distributed throughout the scene, causing users’ fixations to be scattered all over the scene; a low entropy results from a few salient objects that capture all the viewer’s attention. Figure 4 shows the saliency maps of the scenes with lowest and highest entropy in our dataset. Our entropy is computed as the Shannon entropy of the ground truth saliency map, computed, per scene, from the average of all users [26]. 2 2 The entropy is given by: − ∑N i=1 si log(si ), with s being the ground truth saliency, and N the number of pixels. We consider two entropy levels, low and high, which we term {E0 , E1 }, respectively. Since a clear threshold for classifying each scene according to its entropy does not exist, we take a conservative approach and analyze only the four scenes with highest and the four with lowest entropy, for a total of eight scenes. 4.4.1 4.6 How are head and gaze statistics related? Many additional insights can be learned from our data, which may be useful for further vision and cognition research, or in applications that require predicting gaze or saliency in VR (see also Section 5). First, we evaluate the speed with which users explore a given scene. Figure 2 (right) shows this exploration time, which is the average time that users took to move their eyes to a certain longitude relative to their starting point. On average, users fully explored each scene after about 19 seconds. In our experiments, the mean number of fixations across scenes is 50.35 ± 14.63, while the duration of these fixations is 257 ms ± 121. This is in the range reported for traditional screen viewing conditions [48]. The mean gaze direction relative to the head orientation across scenes is 13.85◦ ± 11.73, which is consistent with the analysis performed by Kollenberg et al. [30]. We have also identified the vestibulo-ocular reflex [31] in our data. This reflexive mechanism moves the eyes contrary to the head movement, in order to stabilize the line of sight and thus improve vision quality. Figure 6 (left) shows the expected inverse linear relationship between head velocity and relative gaze velocity when fixating. Given this observation, we further analyze the interaction between eye and head movements when shifting to a new target. We offset in time head and gaze acceleration measurements relative to each other, and compute the cross-correlation for different temporal shifts. Our data reveals that head follows gaze with an average delay of 58 ms, where the largest cross-correlation is observed, consistent with previous works [12, 14]. It is well-known that gaze velocities differ when users fixate and when they do not [48]. We look at whether this is also the case for head velocities, since they could then act as a rough proxy for fixation classification. Figure 6 (middle) shows that users move their head at longitudinal velocities significantly below the average head speed when they are fixating, and above average when they are not. Further, Figure 6 (right) shows that the longitudinal rotation angle of the eyes relative to the head orientation (eye eccentricity) is significantly smaller when users are fixating. According to this data, users appear to behave Viewer’s behavior metrics Measuring viewer’s behavior in an objective manner is not a simple task. First, we define salient regions as the 5% most salient pixels of a scene. Figure 5 shows a saliency map and the resulting salient regions computed with this criterion. We then rely on three metrics recently proposed by Serrano et al. [50] in the context of gaze analysis for VR movie editing (time to reach a salient region (timeToSR), percentage of fixations inside the salient regions (percFixInside), and number of fixations (nFix), which are summarized in the supplemental material), and propose a fourth, novel one, tailored for static 360◦ panoramas: Convergence time (convergTime) For every scene, we obtain the per-user saliency maps at different time steps, and compute the similarity (CC score) with the fully-converged saliency map. We plot the temporal evolution of this CC score, and compute the area under this curve. This metric represents the temporal convergence of saliency maps; it is inversely proportional to how long it takes for the fixation map during exploration to converge to the ground truth saliency map. 4.4.2 Analysis We first test for independence of observations performing a Wald’s test (please refer to the supplement). Based on its results, we employ ANOVA when analyzing percFixInside, since the samples are considered to be independent, and report significance values obtained from multilevel modeling for the other three metrics. We find that the entropy of the scene has a significant effect on nFix (p < 0.001), timeToSR (p < 0.001), percFixInside (p = 0.022), and convergTime (p < 0.001). Specifically, on scenes with low entropy (E0 ), the time to reach a salient region (timeToSR) is lower. This may 4 Equirectangular Cube Map Patch Based Without Equator Bias µ =0.48 µ = 0.37 µ =0.43 With Equator Bias µ =0.50 µ =0.44 µ =0.49 Table 1. Quantitative evaluation of three different projection methods with and without equator bias. We list the mean CC score for all 22 VR scenes used in this study. Applying the equator bias significantly improves the quality of all approaches. Distortions of the equirectangular projection near the poles do not affect saliency prediction as much as the shortcomings of other types of projection after the equator bias is applied. Fig. 6. Left: the vestibulo-ocular reflex demonstrated by an inverse linear relationship of gaze and head velocities. Middle and right: distributions of longitudinal head velocity and longitudinal eye eccentricity, respectively, while fixating and while not fixating. EB ML-Net + EB SalNet + EB VR µ = 0.34 ± 0.13 µ = 0.49 ± 0.11 µ = 0.47 ± 0.13 Desktop µ = 0.37 ± 0.11 µ = 0.57 ± 0.11 µ = 0.52 ± 0.12 Table 2. Quantitative comparison of predicted saliency maps using a simple equator bias (EB), and two state-of-the-art models together with the EB. Numbers show average mean and standard deviation of CC scores, for each scene, between prediction and ground truth recorded from users exploring 22 scenes in the VR and desktop conditions. The proposed patch-based method was used to predict the saliency maps for both predictors. in two different modes: attention and re-orientation. Eye fixations happen in the attention mode, when users have “locked in” on a salient part of the scene, while movements to new salient regions happen in the re-orientation mode. Being able to identify such modes in real time, from either head or gaze movement, can be very useful for interactive applications. Further results for the different conditions, and for the latitudinal direction, can be found in the supplement. Finally, this data and findings can be leveraged for time-dependent and head-based saliency prediction, as we will show in Sections 5.2 and 5.3. saliency map predicted on the three different sphere projections after applying the equator bias. We also compare the average CC score for all three projection methods and all 22 scenes in Table 1. Quantitatively, saliency computed directly on the equirectangular projection with the equator bias applied not only performs best but it is also the fastest of the three approaches. The benefit of applying the equator bias may be smaller for the equirectangular projection than for the other two projections, since the distortions at the poles may naturally lead to less saliency predicted at the poles than in the cube map and patch-based approaches. 5 P REDICTING SALIENCY IN VR In this section, we show how existing saliency prediction models can be adapted to VR using insights of our data analysis, such as the equator bias. Then, we ask whether the problem of time-dependent saliency prediction is a well-defined one that can be answered with sufficient confidence. Finally, we analyze how well head movement alone, for example captured with inertial sensors, can predict saliency without knowing the exact gaze direction. Which predictor is best? 5.1 Predicting saliency maps Instead of learning VR saliency models from scratch, we ask whether existing models could be adopted to immersive applications. This would be ideal, because many saliency predictors for desktop viewing conditions already exist, and advances in that domain could be directly transferred to VR conditions. The fact that gaze statistics are closely related in VR and in traditional viewing (Section 4.6) is indicative of the fact that existing saliency models may be adequate, at least to some extend, to VR. In this context, two primary challenges arise: (i) mapping a 360◦ panorama to a 2D image (the required input for existing models) distorts the content due to the projective mapping from sphere to plane; and (ii) head-gaze interaction may require special attention for saliency prediction in VR. We address both of these issues in the following. The fact that existing saliency predictors seem to apply to VR scenarios is important, because rapid progress is being made for saliency prediction with images and videos. Advances in those domains could directly improve saliency prediction in VR. Here, we further evaluate several different existing predictors both quantitatively and qualitatively. Table 2 lists mean and standard deviation of the CC score for all 22 scenes in the VR condition, and for users exploring the same scenes in the desktop condition. These numbers allow us to analyze how good and how consistent across scenes a particular predictor is. We test the equator bias by itself as a baseline, as well as two of the highest-ranked models in the MIT benchmark where source code is available: MLNet [11] and SalNet [43], together with the equator bias. We see that the two advanced models perform very similar and do much better than the equator bias alone. We also see that both of these models predict viewing behavior in the desktop condition better than for the VR condition. This makes sense, because the desktop condition is what these models were trained for originally. In Figure 7 we also compare qualitatively the saliency maps of three scenes recorded under the VR condition (all scenes in the supplement). Which projection is best? Before running a conventional saliency predictor on a spherical panorama or parts of it, the image has to be projected into a plane. Different projections would naturally result in different types of distortions that may affect the saliency predictor. For an equirectangular projection, for example, we expect large distortions near the poles. A cube map projection may result in discontinuities between some of the cube’s faces. Alternatively, smaller patches can be extracted from the panorama, saliency prediction applied to each of them projected onto a plane, and the result stitched together and blended into a saliency panorama. The latter, patch-based approach would result in the least amount of geometrical distortions, but it is also the most computationally expensive approach and it gives up global context for the saliency prediction. In Figure 8 and Table 1 we compare saliency prediction using all three projection methods qualitatively and quantitatively. For each projection, we compute a saliency map using the state-of-the-art ML-Net saliency predictor [11], and then optionally multiply it by the latitudinal equator bias we derived in Section 4.3. Figure 8 shows an example 5.2 Can time-dependent saliency be predicted with sufficient confidence? Virtual environments impose viewing conditions much different from those of conventional saliency prediction. Specifically, the question of temporal evolution arises: For users starting to explore the scene at a given starting point, is it possible to predict the probability that they fixate at specific coordinates at a time instant t? This problem is also closely related to scanpath prediction. We use data from Section 4 to build a simple baseline model for this problem: Figure 2 (right) shows an estimate for when users reach a certain longitude on average. We can thus model the time-dependent saliency map of a scene with an initially small window that grows larger over time to progressively uncover more of a converged (predicted or ground truth) saliency map. The part of the saliency map within this window is the currently active 5 Fig. 7. Saliency prediction for omni-directional stereo panoramas. Existing saliency predictors can be applied to spherical panoramas after they are projected onto a plane, here performed with the patch-based method described in the text. These methods tend to over-predict saliency near the poles. By multiplying the predicted saliency map by the longitudinal equator bias (EB) derived in the previous section, we achieve a good match between ground truth (center left) and predicted saliency (right). Note that this procedure could be applied to any saliency predictor; we chose two top-scoring predictors as an example. Fig. 9. Time-dependent saliency prediction by uncovering the converged saliency map with the average exploration speed determined in Section 4. Fig. 8. Comparison of saliency prediction using different projections from sphere to plane. After applying the equator bias, all three projection methods result in comparable saliency maps for this example. inertial measurement unit (IMU) to predict where a specific user will look next could be more useful than trying to predict time-dependent saliency without any knowledge of a specific user. part, while the parts outside this window are set to zero. The left and right boundaries of the window are widened with the speed predicted in Figure 2 (right). Figure 9 visualizes this approach. We generate the time-dependent saliency maps for all 22 scenes and compare them with ground truth. We use the fully-converged saliency map as a baseline. The predicted, time-dependent saliency maps model the recorded data better than the converged saliency map within the first 6 seconds. Subsequently, they perform slightly worse until the converged map is fully uncovered after about 10 seconds, and the model is thus identical to the baseline. Our simple time-dependent model achieves an average CC score of 0.57 over all scenes, viewports, and the first 10 seconds (uncovering the ground truth saliency map), while using the converged saliency map as a predictor yields a CC of just 0.47. Although this is useful as a first-order approximation for timedependent saliency, there is still work ahead to adequately model timedependent saliency over prolonged periods. In fact, due to the high inter-user variance of recorded scanpaths2 , the problem of predicting time-dependent saliency maps may not be a well-defined one. Perhaps a real-time approach that would use head orientation measured by an 5.3 Can head orientation be used for saliency prediction? The analysis in Section 4 indicates a strong correlation between head movement and gaze behavior in VR. In particular, Figure 6 (middle) shows that fixations usually occur with low head velocities (except for the vestibulo-ocular reflex). This insight suggests that an approximation of a saliency map may be obtained from the longitudinal head velocity alone, e.g. measured by an IMU, without the need for gaze tracking. We validate this hypothesis by counting the number of measurements at pixel locations where the head speed falls below a threshold of 19.6 ◦ /s for all experiments in the VR condition. We then blur this information with a Gaussian kernel of size 11.7◦ of visual angle, to take into account the mean eye offset while fixating (Figure 6, right). Qualitative results are shown in the supplemental material. For a quantitative analysis, we compute the CC score between these head saliency maps and the ground truth and compared it with the results obtained from the predictors examined in Table 2. Our CC score of 0.50 places our approximation on par with the performance of both saliency predictors tested; this is a positive and interesting result, given the fact that no gaze information is used at all. Head saliency maps could therefore become a valuable tool to analyze the approximate regions that users attend to from IMU data alone, without the need for additional eye-tracking hardware. 2 While converged saliency maps show a high inter-user agreement (Section 4.1), this is not necessarily the case for scanpaths, and thus for timedependent saliency. 6 Fig. 10. Automatic alignment of cuts in VR video. To align two video segments, we can maximize the correlation between the saliency maps of the last frame in the first segment and the first frame of the second one. The cross-correlation accounting for all horizontal shifts is shown on top of this example, which has been automatically aligned with the proposed algorithm. 6 Fig. 11. Automatic panorama thumbnail generation. The most salient regions of a panorama can be extracted to serve as a representative preview of the entire scene. A PPLICATIONS In this section, we outline several applications for VR saliency prediction. Rather than evaluating each of the applications in detail and comparing extensively to potentially related techniques, the goal of this section is to highlight the importance and utility of saliency prediction in VR for a range of applications with the purpose of stimulating future work in this domain. 6.1 Automatic alignment of cuts in VR video How to place cuts in VR video is a question that was recently addressed by Serrano et al. [50]. In a number of situations, alignment of the objects of interest before and after the cut is desirable. The proposed saliency prediction facilitates automatic alignment of such cuts. We show in Figure 10 and in the supplemental video that predicted saliency maps can be used to align VR video before and after a cut by shifting the cuts in the longitudinal direction such that the Pearson CC of the predicted saliency maps is maximized. We use the 72 scenes provided by Serrano et al. [50], which were manually aligned to overlapping regions of interest (ROI) before and after a cut - however, for many of these scenes, several meaningful alignments are possible. Further, in some there are multiple ROIs, and thus multiple meaningful alignments possible. We predict saliency maps before and after the cut using the predictor described as performing best in Section 5.1 (i.e., ML-Net with equator bias on equirectangular projection), and then shift the saliency map after the cut with respect to the saliency map before the cut such as to maximize the Pearson correlation. For the scenes with one ROI visible before and after the cut, the median error of our method with respect to the manually aligned results is 2.11◦ , which mildly increases to 9.14◦ if we include the scenes with two ROIs in the same field of view. Qualitative analysis shows that the alignments are meaningful and succeed to align salient regions, however, performance is strongly dependent on the quality of the saliency predictor used. This indicates that saliency-based automatic alignment of video cuts is a useful way to guide users when editing VR videos, suggesting good initial alternatives, but it may not be able to completely replace user interaction. Full alignment results can be found in the supplemental. 6.2 Fig. 12. Automatic panorama video synopsis. Saliency prediction in VR videos can be used to create a short, stop-motion-like animation that summarizes the video. For this application, we predict saliency of each frame, extract a panorama thumbnail from one of the first video frames, and then search every N th frame for the window with highest saliency within a certain neighborhood of the last window. weighting function is applied to the saliency values within each patch before integration to favor patches that center the most salient objects. While this is an intuitive approach, it is also an effective one. Results are shown in Figure 11 and, for all 22 scenes, in the supplemental material. Note that this approach to thumbnail generation is also closely related to techniques for gaze-based photo cropping [49]. 6.3 Panorama video synopsis Automatically generating video synopses is an important and active area of research (e.g., [45]). Most recently, Su et al. [52, 53] introduced the problem of automatically extracting paths of a camera with a smaller field-of-view through 360◦ panorama videos, dubbed pano2vid. Good saliency prediction for monoscopic and stereoscopic VR videos can help improve these and many other applications. Figure 12, for example, shows an approach to combining video synopsis and pano2vid. Here, we compute the saliency for each frame in a video and extracted the panorama thumbnail from the first frame as discussed in the last subsection. In subsequent frames, we search for the window in the panorama with the highest saliency that is close to the center of the last window. Neither the saliency prediction step nor this simple search procedure enforce strict temporal consistency, but the resulting panorama video synopsis works quite well (see supplemental video). Panorama thumbnails Extracting a small viewport that is representative of a panorama may be helpful as a preview or thumbnail. However, VR panoramas cover the full sphere and most of the content may not be salient at all. To extract a thumbnail that remains representative of a scene in more commonly used image formats and at lower resolutions, we propose to extract the gnomonic patch of the panorama that maximizes saliency within. To this end, we compute the saliency map of the entire panorama as discussed in Section 5.1. Then, we use an exhaustive search for the subregion with a fixed, user-defined field of view, that maximizes the integrated saliency within its gnomonic projection. A 2D Gaussian 6.4 Saliency-aware VR image compression Emerging VR image and video formats require substantially more bandwidth than conventional images and videos. Yet, low latency is even more critical in immersive environments than for desktop viewing scenarios. Thus, optimizing the bandwidth for VR video with advanced compression schemes is important and has become an active 7 behavior only within the first few seconds after being exposed to a new scene but not for longer periods of time due to the high interuser variance; (4) the distribution of salient regions in the scene has a significant impact on how viewers explore a scene: the fewer salient regions, the faster user attention gets directed towards any of them and the more concentrated their attention is; (5) we observe two distinct viewing modes: attention and re-orientation, potentially distinguishable via head or gaze movement in real time and thus useful for interactive applications. These insights could have a direct impact on a range of common tasks in VR. We outline a number of applications, such as panorama thumbnail generation, panorama video synopsis, automatically placing cuts in VR video, and saliency-aware compression. These applications show the potential that saliency has for emerging VR systems and we hope to inspire further research in this domain. Future Work Many potential avenues of future work exist. We did not use a 3D display or mobile device since we wanted to closely resemble the most standard viewing condition (regular monitor or laptop). Alternative viewing devices could be interesting for future work. Nevertheless, one of our goals is to analyze whether viewing behavior using regular desktop screens is similar to using a HMD, and our analysis seems to support this hypothesis. We believe this is an important insight, since it could enable future work to collect large saliency datasets for ODS maps without the need for HMDs equipped with eye trackers. Predicting gaze scanpaths of observers when freely exploring a VR panorama would be very interesting in many fields, including vision, cognition, and of course, any VR-related application. Since the seminal work of Koch and Ulman [28], many researchers have proposed models of human gaze when viewing regular 2D images on conventional displays (e.g., [4, 19, 33, 60]). An important element to derive such models is gaze statistics, and whether those found in our VR setup are comparable to the ones reported for traditional viewing conditions; this would inform to what extent we can use existing gaze predictors in VR applications, or be useful as priors in the development of new predictors. Our data can be of particular interest to build gaze predictors using just head movement as input, since head position is much cheaper to obtain than actual gaze data. Our data may still be insufficient to train robust data-driven behavioral models; we hope that making our scenes and code available will help gather more data for this purpose. We also hope it will be a basis for people to further explore other scenarios, such as dynamic or interactive scenes, the influence of the task, or the presence of motion parallax, etc.; these future studies could leverage our methodology and metrics, and build upon them for the specific particularities of their scenarios. It would be interesting to explore how behavioral models could improve low-cost but imprecise gaze sensors, such as electrooculograms. Future work could also incorporate temporal consistency for saliency prediction in videos, or extend it to multimodal experiences that include audio. Fig. 13. Saliency-aware panorama compression. Top left: original, highresolution region of the input panorama. Inset shows the compression map based on saliency information, where green indicates more salient regions. Right: Close-ups showing the differences between saliencyaware compression and conventional downsampling. Note that salient regions retain a better quality in our compression, while non-salient regions get more degraded. Bottom left: Preference counts for the ten scenes displayed during the user study. area of research [61]. Inspired by saliency-aware video compression schemes [20], we test an intuitive approach to saliency-aware compression for omni-directional stereo panoramas. Specifically, we propose to maintain a higher resolution in more salient regions of the panorama. To evaluate potential benefits of saliency-aware panorama compression, we downsample a cube map representation of the omni-directional stereo panoramas with a bicubic filter by a factor of 6. We then upsample the low-resolution cube map and blend it with the 10% most salient regions of the high-resolution panoramas. Overall, the compression ratio of the raw pixel count is thus 25%. Figure 13 shows this saliency-aware compression for an example image. To evaluate the proposed saliency-aware VR image compression, we carried out a pilot study to asses the perceived quality of saliencyaware compression when compared to regular downsampling for a comparable compression ratio. To this end, users were presented with ten randomized pairs of stereo panoramas, and they were asked to pick the one that had better quality in a two-alternative forced choice (2AFC) test. For each pair, we sequentially displayed the two panoramas in randomized order, with a blank frame of 0.75 seconds between the two alternatives [44]. A total of eight users participated in the study, all reported normal or corrected-to-normal vision. The results of the study are shown in Figure 13 (bottom left). Saliency-aware compression was preferred for most scenes, and performed worse in only one scene. These preliminary results encourage future investigations of saliencyaware image and video compression for VR. 7 8 D ISCUSSION In summary, we collect a dataset that includes gaze and head orientation for users observing omni-directional stereo panoramas in VR, both in a standing and in a seated condition. We also capture users observing the same scenes in a desktop scenario, exploring monoscopic panoramas with mouse-based interaction. The data encompasses 169 users in three different conditions, totaling 1980 head and gaze trajectories. All data will be publicly available. The primary insights of our data analysis are: (1) gaze statistics and saliency in VR seem to be in good agreement with those of conventional displays; as a consequence, existing saliency predictors can be applied to VR using a few simple modifications described in this paper; (2) head and gaze interaction are coupled in VR viewing conditions – we show that head orientation recorded by inertial sensors may be sufficient to predict saliency with reasonable accuracy without the need for costly eye trackers; (3) we can accurately predict time-dependent viewing ACKNOWLEDGEMENTS The authors would like to thank Jaime Ruiz-Borau for support with experiments. This research has been partially funded by an ERC Consolidator Grant (project CHAMELEON), the Spanish Ministry of Economy and Competitiveness (projects TIN2016-78753- P, TIN201679710-P, and TIN2014-61696-EXP), and the NSF/Intel Partnership on Visual and Experiential Computing (NSF IIS 1539120). Ana Serrano was supported by an FPI grant from the Spanish Ministry of Economy and Competitiveness. Gordon Wetzstein was supported by a Terman Faculty Fellowship and an Okawa Research Grant. We thank the following artists, photographers, and studios who generously contributed their omni-directional stereo panoramas for this study: Dabarti CGI Studio, Attu Studio, Estudio Eter, White Crow Studios, Steelblue, Blackhaus Studio, immortal-arts, Chaos Group, Felix Dodd, Kevin Margo, Aldo Garcia, Bertrand Benoit, Jason Buchheim, Prof. Robert Kooima, Tom Isaksen (Charakter Ink.), Victor Abramovskiy (RSTR.tv). 8 R EFERENCES models predict? Journal of vision, 14(3):14–14, 2014. [30] T. Kollenberg, A. Neumann, D. Schneider, T. Tews, T. Hermann, H. Ritter, A. Dierker, and H. Koesling. Visual search in the (un) real world: how head-mounted displays affect eye movements, head movements and target detection. In Proc. ACM ETRA, pp. 121–24. ACM, 2010. [31] V. Laurutis and D. Robinson. The vestibulo-ocular reflex during human saccadic eye movements. The Journal of Physiology, 373(1):209–33, 1986. [32] O. Le Meur and T. Baccino. Methods for comparing scanpaths and saliency maps: strengths and weaknesses. Behav. Res. Methods, 45(1):251–66, 2013. [33] O. Le Meur and Z. Liu. Saccadic model of eye movements for free-viewing condition. Vision Res., 116:152–64, 2015. [34] G. Leifman, D. Rudoy, T. Swedish, E. Bayro-Corrochano, and R. Raskar. Learning gaze transitions from depth to improve video saliency estimation. arXiv preprint arXiv:1603.03669, 2016. [35] G. Li and Y. Yu. Visual saliency based on multiscale deep features. In Proc. IEEE CVPR, pp. 5455–63, 2015. [36] R. Liu, J. Cao, Z. Lin, and S. Shan. Adaptive partial differential equation learning for visual saliency detection. In Proc. CVPR, pp. 3866–73, 2014. [37] T. Liu, Z. Yuan, J. Sun, J. Wang, N. Zheng, X. Tang, and H. Shum. Learning to detect a salient object. IEEE Trans. PAMI, 33(2):353–367, 2011. [38] G. Marmitt and A. T. Duchowski. Modeling visual attention in VR: Measuring the accuracy of predicted scanpaths. PhD thesis, Clemson University, 2002. [39] R. Nakashima, Y. Fang, Y. Hatori, et al. Saliency-based gaze prediction based on head direction. Vision Res., 117:59–66, 2015. [40] C. Nguyen, S. DiVerdi, A. Hertzmann, and F. Liu. Vremiere: In-headset virtual reality video editing. In Proc. SIGCHI, pp. 1–11, 2017. [41] A. Nuthmann and J. Henderson. Object-based attentional selection in scene viewing. J. of Vision, 10(8):20, 2010. [42] N. Padmanaban, R. Konrad, T. Stramer, E. Cooper, and G. Wetzstein. Optimizing virtual reality for all users through gaze-contingent and adaptive focus displays. PNAS, 14:2183–88, 2017. [43] J. Pan, E. Sayrol, X. Giro-i Nieto, K. McGuinness, and N. O’Connor. Shallow and deep convolutional networks for saliency prediction. In Proc. IEEE CVPR, June 2016. [44] A. Patney, M. Salvi, J. Kim, A. Kaplanyan, C. Wyman, N. Benty, D. Luebke, and A. Lefohn. Towards foveated rendering for gaze-tracked virtual reality. ACM Trans. Graph., 35(6):179:1–179:12, Nov. 2016. [45] A. Rav-Acha, Y. Pritch, and S. Peleg. Making a long video short: Dynamic video synopsis. In Proc. CVPR, vol. 1, pp. 435–41, 2006. [46] N. Riche, M. Duvinage, M. Mancas, B. Gosselin, and T. Dutoit. Saliency and human fixations: State-of-the-art and study of comparison metrics. In Proceedings of the IEEE international conference on computer vision, pp. 1153–1160, 2013. [47] K. Ruhland, C. Peters, S. Andrist, et al. A review of eye gaze in virtual agents, social robotics and hci: Behaviour generation, user interaction and perception. In Comp. Graph. Forum, vol. 34, pp. 299–326, 2015. [48] D. Salvucci and J. Goldberg. Identifying fixations and saccades in eyetracking protocols. In Proc. ACM ETRA, pp. 71–8. ACM, 2000. [49] A. Santella, M. Agrawala, D. DeCarlo, D. Salesin, and M. Cohen. Gazebased interaction for semi-automatic photo cropping. In Proc. ACM SIGCHI, pp. 771–80, 2006. [50] A. Serrano, V. Sitzmann, J. Ruiz-Borau, G. Wetzstein, D. Gutierrez, and B. Masia. Movie editing and cognitive event segmentation in virtual reality video. ACM Trans, on Graph., 36(4), 2017. [51] M. Stengel and M. Magnor. Gaze-contingent computational displays: Boosting perceptual fidelity. IEEE Signal Proc. Mag., 33(5):139–48, 2016. [52] Y. Su and K. Grauman. Making 360◦ video watchable in 2d: Learning videography for click free viewing. arXiv preprint arXiv:1703.00495, 2017. [53] Y. Su, D. Jayaraman, and K. Grauman. Pano2vid: Automatic cinematography for watching 360◦ videos. In Proc. ACCV, 2016. [54] Q. Sun, L. Wei, and A. Kaufman. Mapping virtual and physical reality. ACM Trans. Graph., 35(4):64:1–64:12, July 2016. [55] V. Tanriverdi and R. Jacob. Interacting with eye movements in virtual environments. In Proc. ACM SIGCHI, pp. 265–72, 2000. [56] A. Torralba, A. Oliva, M. Castelhano, and J. Henderson. Contextual guidance of eye movements and attention in real-world scenes: the role of global features in object search. Psych. Review, 113(4):766, 2006. [1] R. Anderson, D. Gallup, J. Barron, et al. Jump: Virtual reality video. ACM Trans. Graph., 35(6):198:1–198:13, Nov. 2016. [2] Anonymous. Saliency in VR: how do people explore virtual environments? 2017. [3] P. Blignaut. Fixation identification: The optimum threshold for a dispersion algorithm. Attention, Perception, & Psychoph., 71(4):881–895, 2009. [4] G. Boccignone and M. Ferraro. Modelling gaze shift as a constrained random walk. Physica A: Statistical Mechanics and its Applications, 331(1):207–218, 2004. [5] A. Borji and L. Itti. State-of-the-art in visual attention modeling. IEEE Trans. PAMI, 35(1):185–207, 2013. [6] Z. Bylinskii, T. Judd, A. Borji, L. Itti, F. Durand, A. Oliva, and A. Torralba. MIT Saliency Benchmark. http://saliency.mit.edu, 2017. [7] Z. Bylinskii, T. Judd, A. Oliva, A. Torralba, and F. Durand. What do different evaluation metrics tell us about saliency models? arXiv:1604.03605, 2016. [8] S. Chaabouni, J. Benois-Pineau, O. Hadar, and C. Amar. Deep learning for saliency prediction in natural video. arXiv preprint arXiv:1604.08010, 2016. [9] M. Cheng, N. Mitra, X. Huang, P. Torr, and S. Hu. Global contrast based salient region detection. IEEE Trans. PAMI, 37(3):569–582, 2015. [10] R. Cong, J. Lei, C. Zhang, Q. Huang, X. Cao, and C. Hou. Saliency detection for stereoscopic images based on depth confidence analysis and multiple cues fusion. IEEE Signal Processing Letters, 23(6):819–823, 2016. [11] M. Cornia, L. Baraldi, G. Serra, and R. Cucchiara. A deep multi-level network for saliency prediction. In Proc. ICPR, 2016. [12] A. Doshi and M. Trivedi. Head and eye gaze dynamics during visual attention shifts in complex environments. J. of Vision, 12(2):9, 2012. [13] A. Duchowski, N. Cournia, and H. Murphy. Gaze-contingent displays: a review. Cyberpsychol Behav., 7(6):621–34, 2004. [14] E. Freedman. Coordination of the eyes and head during visual orienting. Experimental brain research, 190(4):369–387, 2008. [15] A. Gabadinho, G. Ritschard, N. Müller, and M. Studer. Analyzing and visualizing state sequences in R with TraMineR. J. of Stat. Software, 40(1), 2011. [16] A. Gibaldi, M. Vanegas, P. Bex, and G. Maiello. Evaluation of the tobii eyex eye tracking controller and matlab toolkit for research. Behav. Res. Methods, 2016. [17] S. Goferman, L. Zelnik-Manor, and A. Tal. Context-aware saliency detection. IEEE Trans. PAMI, 34(10):1915–26, 2012. [18] F. Guo, J. Shen, and X. Li. Learning to detect stereo saliency. In Proc. IEEE ICME, pp. 1–6. IEEE, 2014. [19] S. Hacisalihzade, L. Stark, and J. Allen. Visual perception and sequences of eye movement fixations: A stochastic modeling approach. IEEE Trans. on systems, man, and cybernetics, 22(3):474–81, 1992. [20] H. Hadizadeh and I. Bajic. Saliency-aware video compression. IEEE Trans. on Image Proc., 23(1):19–33, 2014. [21] X. Huang, C. Shen, X. Boix, and Q. Zhao. Salicon: Reducing the semantic gap in saliency prediction by adapting deep neural networks. In Proc. IEEE CVPR, pp. 262–270, 2015. [22] L. Itti, C. Koch, E. Niebur, et al. A model of saliency-based visual attention for rapid scene analysis. IEEE Trans. PAMI, 20(11):1254–59, 1998. [23] Y. Jia and M. Han. Category-independent object-level saliency detection. In Proc. IEEE CVPR, pp. 1761–68, 2013. [24] M. Jiang, X. Boix, G. Roig, J. Xu, L. Van Gool, and Q. Zhao. Learning to predict sequences of human visual fixations. IEEE transactions on neural networks and learning systems, 27(6):1241–1252, 2016. [25] M. Jiang, S. Huang, J. Duan, and Q. Zhao. Salicon: Saliency in context. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1072–1080, 2015. [26] T. Judd, K. Ehinger, F. Durand, and A. Torralba. Learning to predict where humans look. In Proc. IEEE ICCV, 2009. [27] W. Kienzle, F. A. Wichmann, M. O. Franz, and B. Schölkopf. A nonparametric approach to bottom-up visual saliency. In Proc. NIPS, pp. 689–96, 2006. [28] C. Koch and S. Ullman. Shifts in selective visual attention: towards the underlying neural circuitry. In Matters of Intelligence, pp. 115–41. Springer, 1987. [29] K. Koehler, F. Guo, S. Zhang, and M. P. Eckstein. What do saliency 9 [57] S. Tregillus, M. Al Zayer, and E. Folmer. Handsfree omnidirectional VR navigation using head tilt. In Proceedings of the 2017 CHI Conference on Human Factors in Computing Systems, CHI ’17, pp. 4063–4068, 2017. [58] A. Volokitin, M. Gygli, and X. Boix. Predicting when saliency maps are accurate and eye fixations consistent. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 544–552, 2016. [59] L. Wang, H. Lu, X. Ruan, and M. Yang. Deep networks for saliency detection via local estimation and global search. In Proc. IEEE CVPR, pp. 3183–92, 2015. [60] W. Wang, C. Chen, Y. Wang, T. Jiang, F. Fang, and Y. Yao. Simulating human saccadic scanpaths on natural images. In Proc. IEEE CVPR, pp. 441–8, 2011. [61] M. Yu, H. Lakshman, and B. Girod. A framework to evaluate omnidirectional video coding schemes. In Proc. ISMAR, 2015. [62] Q. Zhao and C. Koch. Learning saliency-based visual attention: A review. Signal Proc., 93(6):1401–7, 2013. [63] R. Zhao, W. Ouyang, H. Li, and X. Wang. Saliency detection by multicontext deep learning. In Proc. IEEE CVPR, pp. 1265–74, 2015. 10
1cs.CV
Logical Methods in Computer Science Vol. 1 (1:4) 2005, pp. 1–22 www.lmcs-online.org Submitted Published Sep. 17, 2004 Apr. 21, 2005 CONTEXTUAL EQUIVALENCE FOR HIGHER-ORDER π-CALCULUS REVISITED ALAN JEFFREY a AND JULIAN RATHKE b a Bell Labs, Lucent Technologies, and CTI, DePaul University e-mail address: [email protected] b School of Informatics, University of Sussex e-mail address: [email protected] A BSTRACT. The higher-order π-calculus is an extension of the π-calculus to allow communication of abstractions of processes rather than names alone. It has been studied intensively by Sangiorgi in his thesis where a characterisation of a contextual equivalence for higher-order π-calculus is provided using labelled transition systems and normal bisimulations. Unfortunately the proof technique used there requires a restriction of the language to only allow finite types. We revisit this calculus and offer an alternative presentation of the labelled transition system and a novel proof technique which allows us to provide a fully abstract characterisation of contextual equivalence using labelled transitions and bisimulations for higher-order π-calculus with recursive types also. 1. I NTRODUCTION It is evident that there is growing interest in the study of mobile code in process languages [3, 1, 9, 15]. It is also clear that there is some relationship between the use of higher-order features and mobility. Indeed, code mobility can be expressed as communication of process abstractions. For this reason then it is important for us to develop a clear understanding of the use of higher-order features in process languages. Work towards this began several years ago with various proposals for higher-order versions of known calculi [14, 4], including the higher-order π-calculus or HOπ [10]. This calculus was studied intensively by Sangiorgi and one of his achievements was to provide a translation of the higherorder language which supports code mobility, to a first-order π-calculus which supports only name mobility. This translation is proved to be fully abstract with respect to barbed congruence, but with the restriction to a language of finite types. While the translation is of interest in its own right, it also turned out to be very useful for providing a powerful fully abstract characterisation of barbed congruence in terms of labelled transition systems and normal bisimulations. Providing direct proof techniques for contextual equivalences in higher-order process languages is often considered to be hard [13]. In this paper, the difficulty 2000 ACM Subject Classification: D.3.1. Key words and phrases: Higher-order languages, concurrency, full abstraction. a This material is based upon work supported by the National Science Foundation under Grant No. 0430175. b Research partially funded by the Nuffield Foundation. l LOGICAL METHODS IN COMPUTER SCIENCE c DOI:10.2168/LMCS-1 (1:4) 2005 CC A. Jeffrey and J. Rathke Creative Commons 2 A. JEFFREY AND J. RATHKE arises in establishing soundness of the proof technique, which is tantamount to establishing some sort of contextuality property. It has been seen that the use of a translation of higher- to first-order communication can alleviate this problem and such translations have been employed to this effect [11, 7]. However, due to the restriction to finite types for the correctness of these translations, the soundness of the proof technique is only guaranteed for finite types. Given that recursive types are used extensively in π-calculus, for encodings of datatypes and functions, this poses a significant restriction. Sangiorgi has shown that by studying various subcalculi, such as the asynchronous πcalculus, he is able to remove the restriction to finite types [13]. To date, there has been no proof of full abstraction for full HOπ in the presence of recursive types. In this paper we present an alternative description of labelled transition systems and normal bisimulations for HOπ, which is informed by Sangiorgi’s translation of higher-order to first-order communication. Our alternative presentation allows a direct proof of soundness for contextual equivalence which makes no use of the translation to first-order π-calculus and, more importantly, makes no restriction on types. The innovation here lies in the introduction of operators τk and hk ⇐ vi which simulate the triggers Trk and meta-notation {k := v} of Sangiorgi [11] where k is a unique identifier for the trigger and v is a process abstraction. The crucial difference is that where Sangiorgi gives definitions as HOπ terms for these devices: Trk = (x)khxi and {k := v} = ∗k(x)v · x where khxi represents an output on name k and ∗k(x)P represents a replicated input on name k, we leave the operators uninterpreted. There are no interactions between the operators τk and hk ⇐ vi. Rather, we just mimic the behaviour of triggers in the labelled transition systems. The benefit of doing this is that it allows us to obtain a direct soundness proof that (normal) bisimilarity implies contextual equivalence without recourse to any translation in its correctness proof. A challenge of approaching the problem in this way is that it is not immediately clear that bisimilarity will be complete for contextual equivalence in HOπ. That is to say, it is not obvious whether each transition has a genuine HOπ context which validates it. At this point however we can interpret the operators τk and hk ⇐ vi as HOπ terms exactly as Sangiorgi does. It is then a simple matter to demonstrate completeness following familiar techniques [3, 7, 5]. The real payoff is that not only do we obtain a direct soundness proof but the postponement of interpreting the triggers allows us to finesse any restrictions to finite types. The remainder of the paper is organised as follows: in Section 2 we recall the syntax and semantics of HOπ along with the definition of contextual equivalence which we will be using. This is followed in Section 3 by a presentation of the novel labelled transition system using the operators τk and hk ⇐ vi. We prove that bisimilarity over this labelled transition system is sound for contextual equivalence in Section 4 and conversely, that it is complete for contextual equivalence in Section 5. We conclude in Section 6 with some closing remarks. 2. H IGHER - ORDER π CALCULUS Except for small changes in notation the language is as can be found in [13] with three main differences: (1) We assume two distinct countably infinite sets of identifiers, V and N , for variables and channel names respectively. In general we will use x, y, z to range over variables and a, b, c to range over channel names. This variable/name distinction makes the algebraic properties CONTEXTUAL EQUIVALENCE FOR HIGHER-ORDER π-CALCULUS REVISITED T, U ::= · ch[T ] T →⋄ Z rec Z.T Value Types Unit type Channel type Abstraction type Type variable Recursive type v·w v(x : T )P vhwiP if v = w then P else Q ν(a : T ) . (P) PkQ ∗P 0 Terms Application Input Output Matching Name creation Concurrency Repetition Termination · a x (x : T )P Values Unit value Channel name Variable Abstractions P, Q ::= v, w ::= 3 Figure 1: The Syntax of the language a little cleaner and we are confident that the techniques proposed here would also be applicable if we identified these sets. (2) Since we have adopted a variable/name distinction, we have used Honda and Yoshida’s definition of observational equivalence [6] in Section 2.4 rather than Sangiorgi’s. See [2] for a discussion of this issue. (3) We allow communication of channel names as well as process abstractions so that there is a core π-calculus as a direct subcalculus of HOπ. 2.1. Syntax. We present the syntax of HOπ in Figure 1. The grammar of types for values includes: • (·): a singleton type just containing the value (·). • ch[T ]: the type of channels which can be used for communicating data of type T . Note that in this paper we are not considering input-only or output-only channels. • T → ⋄: the type of an abstraction (x : T )P. Such an abstraction can be applied to a value v of type T to return a well-typed process P[v/x]. • Z and rec Z.T : these allow recursive types, such as the type for monomorphic π-calculus channels rec Z.ch[Z]. We require Z to be guarded: any free occurrence of Z lies within a subexpression of T of the form ch[U ] or U → ⋄. The grammar of process terms includes: 4 A. JEFFREY AND J. RATHKE • v · w: the application of abstraction v to argument w. During execution, v will be instantiated by an abstraction of the form (x : T )P, and β-reduction will give the process P[w/x]. • v(x : T )P and vhwiP, which are the standard synchronous input and output of the π-calculus, except that since abstractions are first-class values, we can communicate higher-order data as well as first-order data. • if v = w then P else Q: an equality test on values, where the type system will ensure that v and w are channels, and so we will never compare abstractions for syntactic identity. • ν(a : T ) . (P), P k Q, ∗P and 0: the standard π-calculus processes for channel generation, concurrency, replication and termination. The grammar of values includes: • (·): the only value of type (·). • a and x: channel names and variables respectively. • (x : T )P: an abstraction, which can be applied to a value v to return a process P[v/x]. Since abstractions are considered first-class values, they can be communicated on channels, or passed as arguments to other abstractions. This feature gives HOπ its higher-order power. 2.2. Reduction semantics. The reduction semantics for the language is defined in a standard manner: we first introduce the evaluation contexts E ::= [ · ] | E k P | νa . E Structural equivalence, ≡ is defined to be the least congruence with respect to E contexts such that it makes (k, 0) into a commutative monoid and moreover satisfies νa . (P k Q) ≡ νa . P k Q ∗P ≡ ∗P k P if a 6∈ fn(P) We will now consider processes up to structural equivalence throughout the remainder. We define the reduction relation → as the least precongruence with respect to E contexts such that the following axioms hold (comm) ahviP k a(x)Q → P k (x)Q · v (β − redn) (x)P · v → P[v/x] (cond—tt) if a = a then P else Q → P (cond—ff) if a = b then P else Q → Q (a 6= b) In a standard notation we write ==⇒ to denote the reflexive, transitive closure of → . 2.3. Type system. We introduce a simple type system for the language which comprises types for channels and abstractions, together with recursive types. To allow us to infer recursive types for terms we make use of type isomorphism. We define this by letting ∼iso be the least congruence on types which includes rec Z.T ∼iso T [rec Z.T /Z] A type environment Γ is a finite set of mappings from identifiers (channel names or variables) to types with the restriction that channel names a must be mapped to channel types of the form ch[T ]. We write Γ, n : T to represent the environment made up of the disjoint union of Γ and the mapping n to T . We will call an environment closed if it contains mappings of channel names only and will CONTEXTUAL EQUIVALENCE FOR HIGHER-ORDER π-CALCULUS REVISITED Γ⊢·:· Γ(v) = T Γ⊢v:T Γ, x : T ⊢ P Γ ⊢ (x : T )P : T → ⋄ Γ ⊢ v : ch[T ], w : ch[T ] Γ⊢P Γ⊢Q Γ ⊢ if v = w then P else Q Γ⊢v:T →⋄ Γ⊢w:T Γ ⊢ v·w Γ, a : T ⊢ P Γ ⊢ ν(a : T ) . (P) Γ, x : T ⊢ P Γ ⊢ v : ch[T ] Γ ⊢ v(x : T )P 5 Γ ⊢ v : T T ∼iso U Γ⊢ v:U Γ ⊢ P, Q Γ ⊢ P k Q, ∗P, 0 Γ ⊢ P Γ ⊢ w : T Γ ⊢ v : ch[T ] Γ ⊢ vhwiP Figure 2: The Typing Rules write ∆ to indicate this. Type inference rules for the calculus are given in Figure 2. We will call a well-typed process, P, closed if it can be typed as ∆ ⊢ P for some closed ∆. It is easily shown that subject reduction holds for closed terms for the reduction relation and type inference system given. 2.4. Contextual equivalence. We will now define an appropriate notion of behavioural equivalence based on contexts and barbs. Contexts are defined by extending the syntax of processes by allowing typed holes [ ·Γ ] in terms. The type inference system is extended to contexts by using the rule Γ, Γ′ ⊢ [ ·Γ ] We write C[] to denote contexts with at most one hole and C[P] for the term which results from substituting P into the hole. For any given channel name a such that ∆ ⊢ a : ch[·] we write ∆ |= P ⇓ a if there exists some P′ , P′′ such that P ==⇒ ν∆′ . (ah·iP′′ k P′ ) with a 6∈ ∆′ . We use type-indexed families of relations {R ∆ } between closed process terms to describe equivalence. We will write R to refer to the whole family of relations and ∆ |= P R Q to indicate that P and Q are well-typed with respect to ∆ and related by R ∆ . For general process terms we define the open extension R o of a typed relation R as ∆, x1 : T1 , . . . , xn : Tn |= P R o Q holds if for every ∆′ disjoint from ∆ and every vi such that ∆, ∆′ ⊢ vi : Ti (for 1 ≤ i ≤ n) we have ∆, ∆′ |= P[v1 , . . . , vn /x1 , . . . , xn ] R Q[v1 , . . . , vn /x1 , . . . , xn ] Note that, in general, for closed terms ∆ |= P R Q is not equivalent to ∆ |= P R o Q as R o enjoys the weakening property that ∆, ∆′ |= P R o Q whenever ∆ |= P R o Q, even when R does not. However, the contextual equivalence which we study in this paper is defined as an open extension and therefore will satisfy this weakening. There are a number of properties of type-indexed relations that we must define: Symmetry:: A type-indexed relation R is symmetric whenever ∆ |= P R Q implies ∆ |= Q R P. 6 A. JEFFREY AND J. RATHKE Reduction closure:: A type-indexed relation R is reduction-closed whenever ∆ |= P R Q and P → P′ implies there exists some Q′ such that Q ==⇒ Q′ and ∆ |= P′ R Q′ . Contextuality:: A type-indexed relation R is contextual whenever Γ′ |= P R o Q and Γ ⊢ C[·Γ′ ] implies Γ |= C[P] R o C[Q]. Barb preservation:: A type-indexed relation R is barb-preserving if ∆ |= P R Q and ∆ |= P ⇓ a implies ∆ |= Q ⇓ a. Definition 2.1 (Contextual equivalence). Let ∼ = be the open extension of the largest type-indexed relation which is symmetric, reduction-closed, contextual and barb-preserving. 2 For technical convenience it will be useful to work with a lighter definition of contextuality. We say that a relation R is k-contextual if it is preserved by all contexts of the form [ ·Γ ] k R and we let ∼ = p denote the open extension of the largest typed relation over processes which is symmetric, k-contextual, reduction-closed and barb-preserving. The following lemma demonstrates that this lighter definition is sufficient. Lemma 2.2 (Context lemma). Γ |= P ∼ =Q if and only if Γ |= P ∼ =p Q Proof. In Appendix A. 3. F ULL ABSTRACTION In this section, we will present a bisimulation equivalence for HOπ, and show that this equivalence is fully abstract for contextual equivalence. 3.1. Labelled transitions. We will use a labelled transition system to characterize ∼ = over higherorder π-calculus terms. The style of the labelled transition system differs a little from previous transition systems offered for HOπ. Most notably, the nodes of the transition system are described using an augmented syntax rather than process terms alone. Specifically, for each k drawn from a countable set of names disjoint from N and V , we introduce two new operators: τk hk ⇐ vi and with the intuitive reading that τk is an indirect reference to an abstraction and hk ⇐ vi stores the abstraction to which k refers so that access to v is provided through interaction with k. The augmented syntax for nodes is given the grammar of configurations C obtained by extending Figure 1 with: v ::= . . . (as Figure 1) . . . | τk C ::= P | hk ⇐ vi | νa : T . (C) | C k C We impose a syntactic restriction on the augmented syntax so that in any configuration C for any given k then hk ⇐ vi appears at most once in C. Structural equivalence and reduction lift to C in the obvious manner — note that there are no reduction rules given for τk and hk ⇐ vi though. We augment the type rules by considering judgements of the form Γ; Θ⊢v:T and Γ ; Θ ⊢C where Θ represents a set of mappings from reference names to types T . The rules in Figure 2 are easily decorated with the extra Θ environment. The further rules required are given by Θ(k) = T Γ ; Θ ⊢ τk : T → ⋄ Θ(k) = T Γ ; Θ ⊢ v : T → ⋄ Γ ; Θ ⊢ hk ⇐ vi CONTEXTUAL EQUIVALENCE FOR HIGHER-ORDER π-CALCULUS REVISITED 7 Nodes of our labelled transition system then are well-typed closed terms of the augmented language of the form (∆ ; Θ ⊢ C) α τ The transitions are of the form (∆ ; Θ ⊢ C) → (∆ ; Θ ⊢ C) or (∆ ; Θ ⊢ C) → (∆ ; Θ ⊢ C) where visible labels α are given by the grammar: α ::= νa . α | νk . dhτk i! | νk . dhτk i? | dhvi? | dhvi! where write d to mean either a channel name a or an indirect reference name k. The transitions are presented in Figures 3,4,5. The intuition for these transitions is (eliding types for readability): ahvi? • P → P′ : indicates that P is prepared to input a value v on channel a and then perform as P′ . The type system enforces that v is a first-order value, and not an abstraction. Moreover, in this case both a and v are pre-existing values, and were not generated fresh for this transition. khvi? • P → P′ : indicates that P has provided a named abstraction reference k to the environment, and that the environment is calling the abstraction with pre-existing argument v. νb.ahbi? • P → P′ : indicates that P is prepared to input a fresh channel b on channel a and then ahbi? perform as P′ . This is the same as P → P′ , except that b is now a fresh channel generated by the environment, and has not been seen before by the process. νb.khbi? • P → P′ : indicates that P has provided a named abstraction reference k to the environment, and that the environment is calling the abstraction with fresh argument b. νl.ahτl i? → P′ : indicates that P is prepared to input an abstraction l on channel a and then • P perform as P′ . In this case, we do not record the abstraction itself in the label, but instead we just generate a fresh reference l to the abstraction. νl.khτl i? → P′ : indicates that P has provided a named abstraction reference k to the environ• P ment, and that the environment is calling that abstraction with argument l. In this case, k must be a higher-order abstraction, so is expecting an abstraction as an argument. Rather than recording the abstraction itself in the label, we instead generate a fresh reference l to the abstraction. • Each of the above input transitions has a dual output transition, where the role of the process and environment are exchanged. We write ᾱ to denote the complement of an action α, which is defined to be the action α with the input/output annotation inversed. We will often write ==⇒ to mean the reflexive transitive closure τ α α of → and ==⇒ to mean ==⇒ → ==⇒ . The following proposition states that the labelled transition system is well-defined in the sense that the transition relation only relates well-typed terms. α Proposition 3.1. If ∆ ; Θ ⊢ C and (∆ ; Θ ⊢ C) → (∆, ∆′ ; Θ, Θ′ ⊢ C′ ) then ∆, ∆′ ; Θ, Θ′ ⊢ C′ is a valid typing judgement. Proof. Straightforward induction. 8 A. JEFFREY AND J. RATHKE α (∆ ; Θ ⊢ C) → (∆′ ; Θ′ ⊢ C′ ) C → C′ τ α (∆ ; Θ ⊢ C) → (∆ ; Θ ⊢ C′ ) (∆ ; Θ ⊢ C k D) → (∆′ ; Θ′ ⊢ C′ k D) α (∆, a : T ; Θ ⊢ C) → (∆, a : T, ∆′ ; Θ, Θ′ ⊢ C′ ) (a 6∈ fn(α)) α (∆ ; Θ ⊢ νa : T .C) → (∆, ∆′ ; Θ, Θ′ ⊢ νa : T .C′ ) (∆, b : T ; Θ ⊢ C) dhbi! → (∆, b : T ; Θ ⊢ C′ ) (d 6= b) (∆ ; Θ ⊢ νb : T .C) (∆, b : T ; Θ ⊢ C) (∆ ; Θ ⊢ C) νb.dhbi! → (∆, b : T ; Θ ⊢ C′ ) dhbi? → (∆, b : T ; Θ ⊢ C′ ) (d 6= b) νb.dhbi? → (∆, b : T ; Θ ⊢ C′ ) Figure 3: Structural labelled transition rules 3.2. Bisimilarity. We use a standard definition of (weak) bisimilarity to provide our characterisation of ∼ = for HOπ: Definition 3.2. We call a symmetric relation, R , between nodes of the labelled transition system a bisimulation if whenever (n, m) ∈R we have τ • n → n′ implies there exists some m′ such that m ==⇒ m′ and (n′ , m′ ) ∈R α α • n → n′ implies there exists some m′ such that m ==⇒ m′ and (n′ , m′ ) ∈R Let bisimulation equivalence, or bisimilarity, ≈ be the largest bisimulation relation. 2 We will write ∆ ; Θ |= C ≈ D to mean that ∆ ; Θ ⊢ C and ∆ ; Θ ⊢ D are valid typing judgements and moreover, they are related by ≈ as nodes of the lts. In order to provide a bisimulation characterisation of ∼ = over HOπ we will consider a subrelation of ≈ by restricting our attention to nodes of the form (∆ ; ⊢ P) whose terms are clearly definable in HOπ. We will simply write (when Θ is empty) ∆ |= P ≈ Q to indicate bisimilarity between such terms of HOπ considered as nodes of the labelled transition system. 3.3. Soundness of bisimilarity for contextual equivalence. We need to demonstrate that bisimilarity implies contextual equivalence for all HOπ processes. In particular, because of Lemma 2.2, we need only show that bisimilarity is contained in some symmetric, reduction-closed, barb preserving and k-contextual relation. The key to achieving this is to study the k-context closure of bisimilarity. If we can demonstrate that this is reduction-closed then we have our result. To do this we must establish a decomposition theorem for interactions. For instance, if P and Q are bisimilar and we compose each of them with a process R then suppose PkR →S CONTEXTUAL EQUIVALENCE FOR HIGHER-ORDER π-CALCULUS REVISITED T ∼iso U νk.ahτk i? (∆ ; Θ ⊢ a(x : T )P) 9 →⋄ → (∆ ; Θ, k : U ⊢ (x : T )P · τk ) Θ(k) ∼iso T → ⋄ (∆ ; Θ ⊢ hk ⇐ vi) νl.khτl i? → (∆ ; Θ, l : T ⊢ v · τl k hk ⇐ vi) ∆; Θ⊢v:T →⋄ (∆ ; Θ ⊢ ahviP) νk.ahτk i! → (∆ ; Θ, k : T ⊢ hk ⇐ vi k P) Θ(k) ∼iso T → ⋄ (∆ ; Θ ⊢ τk · v) νl.khτl i! → (∆ ; Θ, l : T ⊢ hl ⇐ vi) Figure 4: Basic higher-order labelled transition rules represents an interaction between P and R. We decompose this into complementary actions α P → P′ and ᾱ R → R′ respectively. Note however that S is not necessarily obtained by a parallel composition of the targets of the transitions: P′ k R′ . Instead, P′ and R′ may contain indirect references and their corresponding resources. These need to be matched up correctly to obtain S. We achieve this by introducing the merge (partial) operator hh·ii which will match up these terms and replace every indirect reference to an abstraction with the abstraction itself. We write C[v/τk ] to denote the substitution of the value v for every instance of the indirect reference τk . We define hhCii then as the operator on terms of the augmented syntax (up to ≡) such that hhCii = C if C doesn’t contain hk ⇐ vi for any k, v hhν(~a : ~T ) . (hk ⇐ vi k C)ii = hhν(~a : ~T ) . (C[v/τk ])ii if τk 6∈ v Intuitively, this says that we substitute any values stored at a hk ⇐ vi through for the corresponding τk . Note that this need not substitute for all the indirect reference identifiers in C. It is clear that the above definitions are only partial. For example, if C contains an occurrence of hk ⇐ vi for which τk occurs in v, then hhCii is undefined. In order to identify for which terms the merge is defined we make use of the notion of reference graph: For a term C we define the graph rg(C) to be the graph which has nodes as the indirect reference identifiers k in C and edges k 7→ l if τl ∈ v for hk ⇐ vi in C Proposition 3.3. hh·ii is a well-defined partial function such that hhCii is defined if and only if rg(C) is acyclic. Proof. Given in Appendix B. 10 A. JEFFREY AND J. RATHKE ∆ ⊢ v : T a base type (∆ ; Θ ⊢ a(x : T )P) Θ(k) = T (∆ ; Θ ⊢ hk ⇐ vi) ahvi? → (∆ ; Θ ⊢ (x : T )P · v) ∆ ⊢ w : T a base type khwi? → (∆ ; Θ ⊢ v · w k hk ⇐ vi) ∆ ⊢ v : T a base type (∆ ; Θ ⊢ ahviP) Θ(k) = T ahvi! → (∆ ; Θ ⊢ P) T a base type (∆ ; Θ ⊢ τk · v) khvi! → (∆ ; Θ ⊢ 0) Figure 5: Basic first-order labelled transition rules Lemma 3.4 (Composition/Decomposition). For ∆ ; Θ ⊢ C, D (i) If hhC k Dii ≡ E and α (∆ ; Θ ⊢ C) → (∆, ∆′ ; Θ, Θ′ ⊢ C′ ) and ᾱ (∆ ; Θ ⊢ D) → (∆, ∆′ ; Θ, Θ′ ⊢ D′ ) then there exists a E ′ such that E ==⇒ E ′ and hhν∆′ . (C′ k D′ )ii = E ′ (ii) If hhCii ≡ E and C → C′ then there exists a E ′ such that E → E ′ and hhC′ ii ≡ E ′ (iii) If hhC k Dii ≡ E and E → E ′ then one of the following hold C → C′ with hhC′ k Dii ≡ E ′ or D → D′ with hhC k D′ ii ≡ E ′ α ᾱ or (∆ ; Θ ⊢ C) ==⇒ (∆, ∆′ ; Θ, Θ′ ⊢ C′ ) and (∆ ; Θ ⊢ D) ==⇒ (∆, ∆′ ; Θ, Θ′ ⊢ D′ ) with hhν∆′ . (C′ k D′ )ii ≡ E ′ . Proof. Part (ii) is straightforward as the merge operator hh ii simply removes subterm of the form hk ⇐ vi, which can’t be involved in reductions, and substitutes higher-order values through for variables of higher-order type. Reductions are based on structure alone except for the conditionals which can be affected by first-order substitutions of channel names only. To show (i) we must consider all the possible cases for α. By symmetry there are four distinct pairs of complementary actions. We only consider the cases where α is νk . ahτk i? and νl . khτl i? as the first-order actions can be treated similarly. νk.ahτk i? Case: ∆ ; Θ ⊢ C we see that – – – – → ∆ ; Θ, k : U ⊢ C′ and ∆ ; Θ ⊢ D νk.ahτk i! C ≡ ν∆′ . (a(x : T )P k C′′ ) with T ∼iso U → ⋄ C′ ≡ ν∆′ . ((x : T )P · τk k C′′ ) D ≡ ν∆′′ . (ahviQ k D′′ ) D′ ≡ ν∆′′ . (hk ⇐ vi k Q k D′′ ) → ∆ ; Θ, k : U ⊢ D′ . By inspection CONTEXTUAL EQUIVALENCE FOR HIGHER-ORDER π-CALCULUS REVISITED 11 It is easy to see that hhC k Dii → hhν∆′ , ∆′′ . ((x : T )P · v k C′′ k Q k D′′ )ii let us call the target of this reduction E ′ . We simply need to check E ′ ≡ hhν∆′ , ∆′′ . ((x : T )P · v k C′′ k Q k D′′ )ii (τk 6∈ v) ≡ hhν∆′ . ((x : T )P · τk k C′′ ) k ν∆′′ . (hk ⇐ vi k Q k D′′ )ii ≡ hhC′ k D′ ii νl.khτl i? → ∆ ; Θ, l : T ⊢ C′ and ∆ ; Θ ⊢ D Case: ∆ ; Θ ⊢ C inspection we see that – – – – νl.khτl i! → ∆ ; Θ, l : T ⊢ D′ . Again, by C ≡ ν∆′ . (hk ⇐ vi k C′′ ) C′ ≡ ν∆′ . (v · τl k hk ⇐ vi k C′′ ) D ≡ ν∆′′ . (τk · w k D′′ ) D′ ≡ ν∆′′ . (hl ⇐ wi k D′′ ) Note that the previous proposition tells us that rg(C k D) must be acyclic — in particular, τk 6∈ v. Here we see that hhC k Dii ≡ (τk 6∈ v) ≡ (τl 6∈ v, w,C′′ , D′′ ) ≡ ≡ hhν∆′ , ∆′′ . (hk ⇐ vi k C′′ k τk · w k D′′ )ii hhν∆′ , ∆′′ . (hk ⇐ vi k C′′ k v · w k D′′ )ii hhν∆′ , ∆′′ . (hk ⇐ vi k C′′ k v · τl k hl ⇐ wi k D′′ )ii hhC′ k D′ ii So by letting E ′ be hhC′ k D′ ii we note that hhC k Dii ==⇒ E ′ as required. To show (iii) we suppose hhC k Dii ≡ E and that E → E ′ . We must consider all possible ways in which this reduction can occur. If the reduction arises from a conditional then it is clear that we must have C → C′ or D → D′ for some C′ or D′ . Moreover it is easy to check that hhC′ k Dii (resp hhC k D′ ii) ≡ E ′ . There are two more possibilities to consider: Case: the reduction arises from a β-reduction. In this case either C → C′ or D → D′ as above and the result follows easily, or v is (x : U )P and – C ≡ ν∆′ . (τk · w k C′′ ) with all names in ∆′ appearing in w – D ≡ ν∆′′ . (hk ⇐ vi k D′′ ) with τk 6∈ v ′ ′ ′′ ′′ – E ≡ hhν∆ , ∆ . (P[w/x] k C k hk ⇐ vi k D′′ )ii or a symmetric version of these with the roles of C and D reversed. So we notice that if U ∼iso T → ⋄, we have ∆ ; Θ ⊢C νl.khτl i! → ∆ ; Θ, l : T ⊢ C′ and νl.khτl i? ∆ ; Θ ⊢ D ====⇒ ∆ ; Θ, l : T ⊢ D′ where C′ ≡ ν∆′ . (hl ⇐ wi k C′′ ) and D′ ≡ ν∆′′ . (P[τl /x] k hk ⇐ vi k D′′ ). We check: (τl 6∈ v, w,C′′ , D′′ ) hhC′ k D′ ii ≡ hhν∆′ . (hl ⇐ wi k C′′ ) k ν∆′′ . (P[τk /x]) k hk ⇐ vi k D′′ ii ≡ hhν∆′ , ∆′′ . (C′′ k P[w/x] k hk ⇐ vi k D′′ )ii ≡ E′ as required. Alternatively, it could be that U is a base type, in which case ∆ ; Θ⊢C ν∆′ .khwi! → ∆, ∆′ ; Θ ⊢ C′ and ν∆′ .khwi? ∆ ; Θ ⊢ D ====⇒ ∆, ∆′ ; Θ ⊢ D′ where C′ ≡ C′′ and D′ ≡ ν∆′′ .(P[w/x] k hk ⇐ vi k D′′ ). It is easy to check that hhC′ k D′ ii ≡ E ′ as required. 12 A. JEFFREY AND J. RATHKE Case: the reduction arises from communication. Again we see that either C → C′ or D → D′ , in which case we easily obtain the result, or – C ≡ ν∆′ . (ahviP k C′′ ) – D ≡ ν∆′′ . (a(x : T )Q k D′′ ) – E ′ ≡ hhν∆′ . (P k C′′ ) k ν∆′′ . ((x : T )Q · v k D′′ )ii or a symmetric version of this with the roles of C and D reversed. Again we must consider whether the type T is a base type or higher-order. We omit the details of the former case. Suppose then that ∆ ; Θ ⊢ v : T ∼iso U → ⋄ we know ∆; Θ⊢C νk.ahτk i! → ∆ ; Θ, k : U ⊢ C′ and ∆; Θ⊢D νk.ahτk i? → ∆ ; Θ, k : U ⊢ D′ where C′ ≡ ν∆′ . (hk ⇐ vi k P k C′′ ) and D′ ≡ ν∆′′ . ((x : T )Q · τk k D′′ ). We check: (τk 6 v, P,C′′ , D′′ ) ∈ hhC′ k D′ ii ≡ hhν∆′ . (hk ⇐ vi k P k C′′ ) k ν∆′′ . ((x : T )Q · τk k D′′ )ii ≡ hhν∆′ , ∆′′ . (P k C′′ k (x : T )Q · v k D′′ )ii ≡ E′ as required. Definition 3.5. Let ≈m be defined to be ∆ ; Θ |= hhC1 k Dii ≈m hhC2 k Dii if and only if ∆ ; Θ |= C1 ≈ C2 and ∆; Θ⊢D whenever hhC1 k Dii and hhC2 k Dii are defined. 2 Note that in the case where Θ is empty we have that hhCi k Dii = Ci k D, and hence ≈m and ∼ =p coincide. Lemma 3.6. ≈m is reduction-closed. Proof. Follows easily from the previous lemma. Take ∆ ; Θ |= hhC1 k Dii ≈m hhC2 k Dii and suppose hhC1 k Dii → E. We must show that hhC2 k Dii → E ′ for some E ′ such that ∆ ; Θ |= E ≈m E ′ . We know from Part (iii) of the previous lemma that one of three cases must hold. Either, C1 → C1′ , D → D′ or there are complementary actions from both C1 and D. We only deal with the last case as the others follow easily from the hypothesis that ∆ ; Θ |= C1 ≈ C2 and Part (ii) of the previous lemma. α ᾱ We have then that ∆ ; Θ ⊢ C1 =⇒ ∆, ∆′ ; Θ, Θ′ ⊢ C1′ and ∆ ; Θ ⊢ D =⇒ ∆, ∆′ ; Θ, Θ′ ⊢ D′ such that E ≡ hhC1′ k D′ ii. We know by hypothesis that there must exist some α ∆ ; Θ ⊢ C2 ==⇒ ∆, ∆′ ; Θ, Θ′ ⊢ C2′ such that ∆, ∆′ ; Θ, Θ′ |= C1′ ≈ C2′ . (†) We can now use Parts (i) and (ii) of the previous lemma to see that hhC2 k Dii ==⇒ E ′ such that E ′ ≡ hhC2′ k D′ ii. Note that (†) guarantees ∆ ; Θ |= E ≈m E ′ to finish. CONTEXTUAL EQUIVALENCE FOR HIGHER-ORDER π-CALCULUS REVISITED 13 Theorem 3.7. For all closed terms P, Q of HOπ: ∆ |= P ≈ Q implies ∆ |= P ∼ =p Q Proof. We let ≈ p denote the relation ∆, ∆′ |= (P k R) ≈ p (Q k R) iff ∆ |= P ≈ Q and ∆, ∆′ ⊢ R It is easy to see that ≈ p is a k-contextual relation over terms of HOπ. It is also easy to see that ≈ p is symmetric and barb preserving and coincides with ≈m for closed terms of HOπ, thus Lemma 3.6 can be instantiated to demonstrate that ≈ p is reduction-closed and, given that ∼ = p is defined to be the largest symmetric, k-contextual, reduction-closed, and barb-preserving relation over terms of HOπ, then we have our result. Corollary 3.8 (Soundness). For all terms P, Q of HOπ: Γ |= P ≈o Q implies Γ |= P ∼ =Q Proof. Follows from the previous theorem and Lemma 2.2. 3.4. Completeness of bisimilarity for contextual equivalence. The interactions described by the labelled transition system are not obviously derived by genuine contextual observations in HOπ because of the use of the extra syntax for indirect references. In order to show completeness of our bisimilarity for contextual equivalence we must demonstrate that the indirect references are in fact definable as terms of the language proper. Following Sangiorgi [13], we implement the implicit protocol outlined by the indirect references by using the following translation of the augmented terms into HOπ: [[k1 : T1 , . . . , kn : Tn ]] = k1 : ch[T1 ], . . . , kn : ch[Tn ] [[Γ ; Θ ⊢ C]] = Γ, [[Θ]] ⊢ [[C]]Θ [[τk ]]Θ = (x : T )khxi0 if Θ(k) = T [[hk ⇐ vi]]Θ = ∗k[[v]]Θ The translation acts homomorphically on all other terms. We abuse notation here by using identifiers k as channel names in the translation. It is evident that this translation is well-defined in the sense that the translation of well-typed augmented terms are indeed well-typed terms of HOπ. We would now like to prove a correspondence between reductions from the terms of the augmented syntax and reductions between their translations. However, we note that in translating a term containing both hk ⇐ vi and τk we provide matching input and output prefixes, which, in HOπ may create a communication which was not possible in the source term. This turns out not to be of particular concern to us though as we see that if we starting with terms of HOπ, then terms reachable by transitions are balanced in the following sense: we call a term C of the augmented language balanced if for each k then C contains at most one of τk (possible multiple times) or hk ⇐ vi. Unfortunately the translation may introduce extra reductions which aren’t present in the source term. These arise through the translation of terms of the form τk · v. Note that τ [[τk · v]] = (x : T )khxi0 · [[v]] → kh[[v]]i0 but τk · v has no corresponding reduction. We will identify these rogue reductions as housekeeping h reductions and indicate them with → defined as any reduction which can be derived using the axiom (h − redn) (x : T )khxi0 · v → khvi0 Lemma 3.9. If ∆ ; Θ ⊢ C is balanced then 14 A. JEFFREY AND J. RATHKE (1) If C ==⇒ C′ then [[C]]Θ ==⇒ [[C′ ]]Θ h (2) If [[C]]Θ ==⇒ P then [[C]]Θ ==⇒ [[D]]Θ →∗ P for some ∆ ; Θ ⊢ D such that C ==⇒ D. Proof. We will omit mention of the environment Θ in the proof as it plays no role. Part 1 is straightforward. For Part 2 we use induction on the length of the reductions. If there are no reductions then we are done. We examine the base case in which [[C]] → P. If this reduction happens to be a h housekeeping move, that is, [[C]] → P then there is nothing to prove. Suppose otherwise, then it is not too difficult to check that P ≡ [[D]] for some D such that C → D. For the inductive case suppose that [[C]] → ==⇒ P (†) By inspecting the translation [[·]] and using the fact that C is balanced we see that h [[C]] → → Q h [[C]] → → Q implies h thus we may assume that the first reduction in (†) above is not of the form → . This means that [[C]] → [[C′ ]] ==⇒ P for some C′ such that C → C′ . It is clear that C′ is also balanced so we may apply the inductive hypothesis to [[C′ ]] ==⇒ P h to obtain a D such that C′ ==⇒ D′ and [[C′ ]] ==⇒ [[D]] →∗ P. Putting these together we obtain C → C′ ==⇒ D h [[C]] → [[C′ ]] ==⇒ [[D]] →∗ P and as required. When ∆′ is of length at most one, we shall write δh∆′ i as shorthand, defined: / = δh·i δha : T i = δhai δh0i α Moreover, note that whenever (∆ ; Θ ⊢ D) ==⇒ (∆, ∆′ ; Θ, Θ′ ⊢ D′ ), we have that ∆′ has at length most one, and so δh∆′ i is well-defined. Proposition 3.10. For each α, ∆ and fresh channels δ, δ′ of appropriate type given by α and ∆, there exists a process T α∆ (defined in Figure 6) in HOπ such that if α ∆ ; Θ ⊢ C → ∆, ∆′ ; Θ, Θ′ ⊢ C′ then ∆,[[Θ]] ∆, [[Θ, Θ′ ]], δ : ch[T0 ], δ′ : ch[·] ⊢ T α and moreover, for balanced D α (∆ ; Θ ⊢ D) ==⇒ (∆, ∆′ ; Θ, Θ′ ⊢ D′ ) if and only if ∆ ; Θ ⊢ D and T α∆,[[Θ]] k [[D]]Θ ==⇒ ν∆′ . (δh∆′ i k P) with h [[D′ ]]Θ,Θ′ →∗ P. CONTEXTUAL EQUIVALENCE FOR HIGHER-ORDER π-CALCULUS REVISITED 15 Proof. It is straightforward to check that ∆, [[Θ, Θ′ ]], δ : ch[T0 ], δ′ : ch[·] ⊢ T α∆ whenever α ∆ ; Θ ⊢ C → ∆, ∆′ ; Θ, Θ′ ⊢ C′ . For the remainder, to show the ‘only if’ direction we use Lemma 3.9 Part 1 to reduce our obligation α to the case of a single transition → , and we must consider each label α. By way of example we show the case for α = νl . khτl i! (the other cases can be treated similarly). Suppose: α (∆ ; Θ ⊢ D) → (∆ ; Θ, l : U ⊢ D′ ). then we know that D ≡ ν∆′′ . (τk · v k D′′ ) and D′ ≡ ν∆′′ . (hl ⇐ vi k D′′ ). We see that for T ∼iso U → ⋄ T α∆,[[Θ]] k [[D]]Θ ≡ k(x : T )(∗l(y : U )x · y k (δhi ⊕ δ′ hi)) k ν∆′′ . (((z : T )khzi0) · [[v]]Θ k [[D′′ ]]Θ ) ==⇒ (δhi ⊕ δ′ hi) k ν∆′′ . (∗l(y : U )[[v]]Θ · y k [[D′′ ]]Θ ) ==⇒ δhi k [[D′ ]]Θ,l:U as required. For the converse direction we suppose that T α∆,[[Θ]] k [[D]]Θ ==⇒ ν∆′ . (δh∆′ i k P) Again, we must perform a case analysis on α. We show the case in which α is νl . khτl i? (the other ∆,[[Θ]] cases can be treated similarly). We know ∆′ is empty so T α k [[D]]Θ ==⇒ δhi k P. Note that ∆,[[Θ]] Tα has no reductions of its own and can only interact with [[D]]Θ so we can detail the assumed reductions as T α∆,[[Θ]] k [[D]]Θ ==⇒ T α∆,[[Θ]] k P0 → (δhi ⊕ δ′ hi) k P1 ==⇒ δhi k P where [[D]] ==⇒ P0 and P1 ==⇒ P. We assumed that D is balanced so Lemma 3.9 Part 2 applied to h [[D]] ==⇒ P0 tells us that [[D]] ==⇒ [[D0 ]]Θ →∗ P0 for some D0 such that D ==⇒ D0 . We know that P0 is obtained from [[D0 ]]Θ by housekeeping reductions and that it interacts with T α∆ . This tells us that we must have the forms P0 ≡ ν∆′′ . (∗k[[v]]Θ k P0′ ) and P1 ≡ ν∆′′ . ([[v]]Θ · [[τl ]]Θ,l:U k ∗k[[v]]Θ k P0′ ) This in turn tells us that D0 ≡ ν∆′′ . (hk ⇐ vi k D′0 ) h such that [[D′0 ]]Θ →∗ P0′ . Now it is clear that (∆ ; Θ ⊢ D0 ) νl.khτl i? → (∆ ; Θ, l : U ) ⊢ D1 ) 16 ∆ T dhvi? ∆ T dhvi! ∆ T νb.dhbi? ∆ T νb.dhbi! ∆ T νk.dhτ k i? ∆ T νk.dhτ k i! A. JEFFREY AND J. RATHKE = = = = = = dhvi(δhi ⊕ δ′ hi) d(x : T )if x = v then (δhi ⊕ δ′ hi) else 0 νb : T . (dhbi(δhbi ⊕ δ′ hi)) d(x : T )if x 6∈ ∆ then (δhxi ⊕ δ′ hi) else 0 dh(x : U )khxi0i(δhi ⊕ δ′ hi) d(x : T )(∗l(y : U )x · y k (δhi ⊕ δ′ hi)) where ∆(d) = ch[T ] where ∆(d) = ch[T ] where ∆(d) = ch[T ] where ∆(d) = ch[T ] and T ∼iso U → ⋄ where ∆(d) = ch[T ] and T ∼iso U → ⋄ ⊕ represents an encoding of internal choice in HOπ if x 6∈ 0/ then P else Q = P if x 6∈ (a : T, ∆) then P else Q = if x = a then Q else if x 6∈ ∆ then P else Q Figure 6: Testing processes for labelled transitions where D1 ≡ ν∆′′ . (v · τl k hk ⇐ vi k D′0 ). We check [[D1 ]]Θ,l:U ≡ h →∗ ≡ ==⇒ ν∆′′ . ([[v]]Θ · [[τl ]]Θ,l:U k ∗k[[v]] k [[D′0 ]]Θ ) ν∆′′ . ([[v]]Θ · [[τl ]]Θ,l:U k ∗k[[v]] k P0′ ) P1 P h Therefore [[D1 ]] =⇒ P and we can apply Lemma 3.9 Part 2 to this to see that [[D1 ]] =⇒ [[D′ ]] →∗ P for some D′ such that D1 ==⇒ D′ . By collecting the above together we obtain α (∆ ; Θ ⊢ D) ==⇒ (∆ ; Θ ⊢ D0 ) → (∆ ; Θ, l : U ⊢ D1 ) ==⇒ (∆ ; Θ, l : U ⊢ D′ ) h with [[D′ ]]Θ,l:U →∗ P as required. Lemma 3.11 (Extrusion). If ∆ |= ν∆′ . (δh∆′ i k P) ∼ = p ν∆′ . (δh∆′ i k Q) then ∆, ∆′ |= P ∼ = p Q. Proof. Follows a similar argument found in [7]: define a relation R such that ∆, ∆′ |= P R Q iff ∆ |= ν∆′ . (δh∆′ i k P) ∼ = p ν∆′ . (δh∆′ i k Q) and show that R is barb-preserving, reduction-closed and k-contextual. These properties follow from the corresponding property for ∼ = p and an extra piece of context to interact with δh∆′ i. Theorem 3.12 (Completeness). For all closed terms P, Q of HOπ: ∆ |= P ∼ implies ∆ |= P ≈ Q =p Q Proof. We define R over terms of the augmented language to be ∆ ; Θ |= C R D iff ∆, [[Θ]] |= [[C]]Θ ∼ = p [[D]]Θ and show that R is a bisimulation. Take ∆ ; Θ |= C R D and suppose that α (∆ ; Θ ⊢ C) → (∆, ∆′ ; Θ, Θ′ ⊢ C′ ). We know from Proposition 3.10 that ∆,[[Θ]] ∆, [[Θ, Θ′ ]], δ : ch[T0 ], δ′ : ch[·] ⊢ T α and that T α∆,[[Θ]] k [[C]]Θ ==⇒ ν∆′ . (δh∆′ i k P) CONTEXTUAL EQUIVALENCE FOR HIGHER-ORDER π-CALCULUS REVISITED 17 h with [[C′ ]]Θ,Θ′ →∗ P. We know that ∆, [[Θ]] |= [[C]]Θ ∼ = p [[D]]Θ by the definition of R , and hence, by contextuality we also have ∆,[[Θ]] ∆, [[Θ, Θ′ ]], δ : ch[T0 ], δ′ : ch[·] |= T α This tells us that such that ∆,[[Θ]] k [[C]]Θ ∼ k [[D]]Θ =p T α T α∆,[[Θ]] k [[D]]Θ ==⇒ Q′ ∆, [[Θ, Θ′ ]] |= ν∆′ . (δh∆′ i k P) ∼ = p Q′ . (†) ∆,[[Θ]] of T α But by the construction we notice that ν∆′ .(δh∆′ i k P) barbs on δ but not on δ′ . Therefore, by the preservation of barbs property of ∼ = p , we know that Q′ must also barb on δ but not on δ′ . This ∆,[[Θ]] constrains Q′ so that Q′ ≡ ν∆′ . (δh∆′ i k Q). We apply Lemma 3.9 Part 2 to T α ∆,[[Θ]] to see that there is some D′′ such that T α k [[D]]Θ ==⇒ Q′ h k [[D]]Θ =⇒ [[D′′ ]]Θ,Θ′ →∗ ν∆′ . (δh∆′ i k Q) from which h it clearly follows that D′′ ≡ ν∆′ . (δh∆′ i k D′ ) and [[D′ ]]Θ,Θ′ →∗ Q. We use Proposition 3.10 again to see that α (∆ ; Θ ⊢ D) ==⇒ (∆, ∆′ ; Θ, Θ′ ⊢ D′ ) and we now must show that ∆, ∆′ ; Θ, Θ′ |= C′ R D′ . To do this we use Lemma 3.11 on (†) (note that Q′ ≡ ν∆′ . (δh∆′ i k Q)) to see that ∆, ∆′ , [[Θ, Θ′ ]] |= P ∼ = p Q. It is also easy to check that hreductions are confluent with respect to all other reductions and hence preserve contextual equivah h lence, that is →∗ ⊆∼ = p , so we also have ∆, ∆′ , [[Θ, Θ′ ]] |= [[C′ ]]Θ,Θ′ ∼ = p [[D′ ]]Θ,Θ′ because [[C′ ]]Θ,Θ′ →∗ P h and [[D′ ]]Θ,Θ′ →∗ Q. This allows us to conclude ∆, ∆′ ; Θ, Θ′ |= C′ R D′ as required. We must also consider transitions of the form τ (∆ ; Θ ⊢ C) → (∆, ∆′ ; Θ, Θ′ ⊢ C′ ). These can be dealt with as above but in this case no T α∆ is needed. Corollary 3.13 (Full abstraction). For all terms P, Q of HOπ: Γ |= P ≈o Q if and only if Γ |= P ∼ =Q Proof. Follows from Corollary 3.8, Lemma 2.2, and the previous theorem. 4. C ONCLUDING REMARKS We have re-examined the use of labelled transitions to characterise contextual equivalence in the higher-order π calculus. The technique of augmenting the core syntax with extra operators to assist in the definition of the labelled transitions allows use to give a direct proof of soundness of bisimilarity for contextual equivalence. This advances Sangiorgi’s analagous result by allowing recursive types also. We believe that the technique of using extra operators to describe the points of interaction with the environment in the lts is fairly robust and should be applicable to many higher-order languages. Indeed, this was the approach that the authors developed for their work on concurrent objects [8]. We have only concerned ourselves with the characterisation of contextual equivalence in HOπ and so far have not studied Sangiorgi’s translation of higher-order to first-order mobility. Thus, the restriction to finite types for his translation is still necessary. It would be interesting to investigate whether the current work could be of use in removing this type restriction for his translation also. 18 A. JEFFREY AND J. RATHKE A PPENDIX A. P ROOF OF T HE C ONTEXT L EMMA We recall the statement of Lemma 2.2 and detail its proof here. Γ |= P ∼ = Q if and only if Γ |= P ∼ = p Q. The force of this lemma is to show that the simplified form of observational testing allowed by ∼ =p is sufficient to capture the power of full contextual testing. In order to prove this we essentially need to show that ∼ = p is preserved by the operators of HOπ. For the most part, this can be done directly and is stated in Lemma A.1 below. Lemma A.1. ∼ p (x : T )Q · v. (1) If ∆, x : T |= P ∼ = p Q and ∆ ⊢ v : T then ∆ |= (x : T )P · v = (2) If ∆, x : T |= P ∼ = p a(x : T )Q. = p Q and ∆ ⊢ a : ch[T ] then ∆ |= a(x : T )P ∼ (3) If ∆ |= P ∼ = p ahwiQ. = p Q, ∆ ⊢ w : T and ∆ ⊢ a : ch[T ] then ∆ |= ahwiP ∼ ∼ ∼ (4) If ∆ |= P1 = p Q1 and ∆ |= P2 = p Q2 then ∆ |= if v = w then P1 else P2 ∼ = p if v = w then Q1 else Q2 . (5) If ∆, a : T |= P ∼ = p ν(a : T ) . (Q). = p Q then ∆ |= ν(a : T ) . (P) ∼ (6) If ∆ |= P1 ∼ = p Q1 and ∆ |= P2 ∼ = p Q2 then ∆ |= P1 k P2 ∼ = p Q1 k Q2 . (7) If ∆ |= P ∼ = p Q then ∆ |= ∗P ∼ = p ∗Q. Proof. The majority of these are straightforward by exhibiting appropriate symmetric, reductionclosed, k-contextual, barb-preserving relations. As an example of this we show the case for input prefixing (Case 2). We define R so that ∼ = p ⊆ R and moreover ∆ |= a(x : T )P k R R a(x : T )Q k R for any ∆ ⊢ R (†) It is clear that R is symmetric, barb-preserving and k-contextual so if we can show that it is reduction-closed then we may conclude that R coincides with ∼ = p and we have our result. Suppose that (†) holds and a(x : T )P k R → P′ . We know then that either R → R′ and P′ ≡ a(x : T )P k R′ or the reduction came about by interaction, that is R ≡ ν∆′ . (ahviR′′ k R′′′ ) with a 6∈ ∆′ and by writing R′ for R′′ k R′′′ we have P′ ≡ ν∆′ . (P[v/x] k R′ ) for some ∆, ∆′ ⊢ v and ∆, ∆′ ⊢ R′ . If the former is true then we see immediately that a(x : T )Q k R → a(x : T )Q k R′ where ∆ |= a(x : T )P k R′ R a(x : T )Q k R′ . If instead the latter is true then we use the fact that ∆, x : T |= P ∼ =p Q to see that ∆, ∆′ |= P[v/x] ∼ = p Q[v/x] and note that a(x : T )Q k R → ν∆′ . (Q[v/x] k R′ ) where (using k-contextuality and Case 5) ∆ |= ν∆′ . (P[v/x] k R′ ) ∼ = p ν∆′ . (Q[v/x] k R′ ) as required. CONTEXTUAL EQUIVALENCE FOR HIGHER-ORDER π-CALCULUS REVISITED 19 Notice that there are two particular cases which are not covered by this lemma: application of a function to, and output of higher-order ∼ = p -related values (c.f. Corollary A.11). Establishing that ∼ is preserved in these cases can be done directly but is a little more involved. We notice that the =p property we require in both cases follows immediately from Substitutivity (cf. Corollary A.10) , that is (ignoring types): if P ∼ = p Q then R[(x)P/y] ∼ = p R[(x)Q/y]. The remainder of the appendix is devoted to achieving this. The proof follows a very similar scheme to the proof of Proposition 4.2.6 in [10] but simplified to avoid any use of induction on type as appeared there. Lemma A.2. If ∆ ⊢ (x : T )P · w then ∆ |= (x : T )P · w ∼ = p P[w/x]. In the following we will make use of a “bisimulation up to” argument [12]. ∼ p ) whenever ∆ |= P R Q Definition A.3. A type-indexed relation R is reduction-closed up to (=, = 2 and P → P′ implies there exists some Q′ such that Q ==⇒ Q′ and ∆ |= P′ R ∼ = p Q′ . Lemma A.4. For any type-indexed relation R which is symmetric, reduction-closed up to (=, ∼ = p ), k-contextual and barb-preserving, R ⊆ ∼ . =p Definition A.5. We say that x is (un)guarded in P whenever: (1) if x 6∈ P then x is (un)guarded in P, (2) if x 6∈ w then x is unguarded in x · w, (3) if v 6= x then x is guarded in v · w, (4) x is guarded in v(y : T )P, vhwiP, and if v = w then P else Q, and (5) if x is (un)guarded in P and Q then x is (un)guarded in ν(a : T ) . (P), P k Q and ∗P. 2 Lemma A.6. For any ∆, y : T → ⋄ ⊢ R with y guarded in R and for any ∆ ⊢ v : T → ⋄ and ∆ ⊢ w : T → ⋄, if R[v/y] → R′ then R′ = R′′ [v/y] for some R′′ and moreover, R[w/y] → R′′ [w/y]. Proof. We first observe that as ∆ ⊢ v : T → ⋄ it must be the case that v is an abstraction and not a channel name. From this it is routine to check that the required property holds for the reduction axioms. Furthermore, if y is guarded in E [P] then y is guarded in P and so the required property is preserved by reduction in evaluation contexts. Lemma A.7. For any P and x we can find Q and y such that x is guarded in Q, y is unguarded in Q and P = Q[x/y]. Proof. A routine induction on P. Lemma A.8 (Unguarded Substitutivity). If ∆, x : T |= P ∼ = p Q and ∆, y : T → ⋄ ⊢ R and y is un∼ guarded in R then ∆ |= R[(x : T )P/y] = p R[(x : T )Q/y]. Proof. We proceed by induction on the structure of R. If y 6∈ R then the result is immediate. If R is not of the form v·w, the result follows easily by induction by making use of Lemma A.1. Otherwise, since y is unguarded in R we must have that R is of the form y · w with y 6∈ w. Hence: ∆ |= R[(x : T )P/y] as required. = ∼ =p ∼ =p ∼ =p = (x : T )P · w P[w/x] Q[w/x] (x : T )Q · w R[(x : T )P/y] (as R = y · w and y 6∈ w) (by Lemma A.2) (by hypothesis) (by Lemma A.2) (as R = y · w and y 6∈ w). 20 A. JEFFREY AND J. RATHKE Lemma A.9 (Guarded Substitutivity). If ∆, x : T |= P ∼ = p Q and ∆, y : T → ⋄ ⊢ R and y is guarded in R then ∆ |= R[(x : T )P/y] ∼ = p R[(x : T )Q/y]. Proof. Let R be defined as ∆ |= R′ [(x : T )P/y] R R′ [(x : T )Q/y] whenever ∆, y : T → ⋄ ⊢ R′ and y is guarded in R′ We show that R is symmetric, reduction-closed up to (=, ∼ = p ), k-contextual, and barb-preserving and so the result follows by Lemma A.4. Symmetry, k-contextuality, and barb-preservation are direct. For reduction-closure up to (=, ∼ = p ) we suppose: R′ [(x : T )P/y] → R′′ By Lemma A.6 we have that R′′ = R′′′ [(x : T )P/y] and moreover: R′ [(x : T )Q/y] → R′′′ [(x : T )Q/y] We use Lemma A.7 to find a R′′′′ and z such that y is guarded in R′′′′ , z is unguarded in R′′′′ and R′′′ = R′′′′ [z/y]. Hence: R′′ = = R ∼ =p = R′′′ [(x : T )P/y] R′′′′ [(x : T )P/y, (x : T )P/z] R′′′′ [(x : T )Q/y, (x : T )P/z] R′′′′ [(x : T )Q/y, (x : T )Q/z] R′′′ [(x : T )Q/y] (from above) (from above) (from definition of R and y guarded in R′′′′ [(x : T )P/z]) (from Lemma A.8 and z unguarded in R′′′′ [(x : T )Q/y]) (from above) as required. Corollary A.10. If ∆, x : T |= P ∼ = p Q and ∆, y : T → ⋄ ⊢ R then ∆ |= R[(x : T )P/y] ∼ = p R[(x : T )Q/y]. Proof. Follows from Lemmas A.7, A.8 and A.9. Corollary A.11. ∼ p v · (x : T )Q. (1) If ∆, x : T |= P ∼ = p Q and ∆ ⊢ v : T → ⋄ then ∆ |= v · (x : T )P = (2) If ∆, x : T |= P ∼ = p Q, ∆ ⊢ a : ch[T → ⋄] and ∆ ⊢ R then ∆ |= ah(x : T )PiR ∼ = p ah(x : T )QiR. Proof. Follows from Corollary A.10. Proof of Lemma 2.2: The ‘only if’ direction is immediate. For the converse it is sufficient to show that ∼ = p is preserved by each process operator of HOπ as demonstrated by Lemma A.1 and Corollary A.11. A PPENDIX B. M ERGE IS A PARTIAL FUNCTION Proof of Proposition 3.3: We consider the rewriting relation ։ which we will define as the one-step rewriting used to define the merge operation: C ։ X if C doesn’t contain hk ⇐ vi for any k, v ν(~a : ~T ) . (hk ⇐ vi k C) ։ ν(~a : ~T ) . (C[v/τk ]) if τk 6∈ v It is easy to see that ։ is a terminating rewriting relation. Moreover, the rewriting will terminate with a X from C (so that hhCii is defined) exactly when rg(C) is acyclic. To see this we consider the effect of ։ on reference graphs: for hk ⇐ vi k C ։ C[v/τk ] CONTEXTUAL EQUIVALENCE FOR HIGHER-ORDER π-CALCULUS REVISITED 21 the reference graph of hk ⇐ vi k C has the node k removed and any edges such that l ′ 7→ k 7→ l for l ′ , l 6= k, are replaced with an edge l ′ 7→ l all other edges involving k are removed. So if node k is involved in a cycle before rewriting occurs, that is l 7→∗ k 7→∗ l for some l, then either it is a tight loop, that is l = k and k 7→ k, or l 6= k and the cycle still exist after rewriting as l 7→∗ l. The side-condition on the rewrite rule forbids tight loops hence we see that ։ preserves cyclicity. That is: if C ։ C′ then rg(C) is acyclic if and only if rg(C′ ) is acyclic. Now, suppose that hhCii is defined. We know that there exists a finite sequence C ։ C1 ։ · · · ։ Cn ։ X with hhCii = Cn . We know that rg(Cn ) is acyclic as it contains no edges. Thus, rg(C) is acyclic also. Conversely, suppose that rg(C) is acyclic. Then as ։ is terminating there must be a finite sequence C ։ C1 ։ · · · ։ Cn such that Cn cannot be rewritten. There are two possibilities for this: either rg(Cn ) contains a tight loop, or Cn is X. We see that rg(C) is acyclic, so Cn is acyclic too and therefore cannot contain a tight loop. Thus Cn is X and hhCii is defined. To show that hh·ii is a well-defined partial function it suffices to show that it is strongly confluent for acyclic terms. Note that if νa : T . (C) ։ C′ then either C′ is X or C′ ≡ νa : T . (C′′ ) such that C ։ C′′ . So without loss of generality suppose that C ։ C1 and C ։ C2 C ≡ C1′ k hk1 ⇐ v1 i and C ≡ C2′ k hk2 ⇐ v2 i for so that C1 ≡ C1′ [v1 /τk1 ] and C2 ≡ C2′ [v2 /τk2 ]. So either, k1 = k2 in which case C1 ≡ C2 or k1 6= l2 and C1′ ≡ C3′ k hk2 ⇐ v2 i and C2′ ≡ C3′ k hk1 ⇐ v1 i We notice that C1 (acyclicity implies τk2 6∈ v2 [v1 /τk1 ]) (acyclicity) (def) ≡ ≡ ≡ ։ ≡ ≡ ≡ C1′ [v1 /τk1 ] (C3′ k hk2 ⇐ v2 i)[v1 /τk1 ] C3′ [v1 /τk1 ] k hk2 ⇐ v2 [v1 /τk1 ]i C3′ [v1 /τk1 ][v2 [v1 /τk1 ]/τk2 ] C3′ [v1 [v2 [v1 /τk1 ]/τk2 ]/τk1 , v2 [v1 /τk1 ]/τk2 ] C3′ [v1 [v2 /τk2 ]/τk1 , v2 [v1 /τk1 ]/τk2 ] C3 By a symmetric argument we see that C2 ։ C3′ [v2 [v1 /τk1 ]/τk2 , v1 [v2 /τk2 ]/τk1 ] and, by definition, this is just C3 so we have C2 ։ C3 . Thus ։ is strongly confluent for acyclic terms and hence hh·ii is well-defined. 22 A. JEFFREY AND J. RATHKE R EFERENCES [1] L. Cardelli and A. Gordon. Mobile ambients. In Proc. Foundations of Software Science and Computation Structures (FoSSaCS), Lecture Notes in Computer Science. Springer-Verlag, 1998. [2] C. Fournet and G. Gonthier. A hierarchy of equivalences for asynchronous calculi. In Proc. Int. Conf. Automata, Languages and Programming (ICALP), volume 1443 of Lecture Notes in Computer Science. Springer-Verlag, 1998. [3] C. Fournet, G. Gonthier, J-J. Levy, L. Maranget, and D. Remy. A calculus of mobile agents. In Proc. CONCUR, volume 1119 of Lecture Notes in Computer Science. Springer-Verlag, 1996. [4] A. Giacalone, P. Mishra, and S. Prasad. Facile: A symmetric integration of concurrent and functional programming. In Proc. TAPSOFT, volume 352 of Lecture Notes in Computer Science, pages 184–209. Springer-Verlag, 1989. [5] M. Hennessy and J. Rathke. Typed behavioural equivalences for processes in the presence of subtyping. In Proc. Computing: the Australasian Theory Symposium (CATS), Electronic Notes in Theoretical Computer Science. Elsevier, 2002. [6] K. Honda and N. Yoshida. On reduction-based process semantics. Theoretical Computer Science, 152(2):437–486, 1995. [7] A.S.A Jeffrey and J. Rathke. A theory of bisimulation for a fragment of Concurrent ML with local names. In Proc. IEEE Symp. Logic in Computer Science (LICS), pages 311–321. Computer Society Press, 2000. [8] A.S.A Jeffrey and J. Rathke. A fully abstract may testing semantics for concurrent objects. In Proc. IEEE Symp. Logic in Computer Science (LICS), pages 101–112. Computer Society Press, 2002. [9] J. Riely and M. Hennessy. A typed language for distributed mobile processes. In Proc. ACM Conf. Principles of Programming Languages (POPL). ACM Press, 1998. [10] D. Sangiorgi. Expressing Mobility in Process Algebras: First-Order and Higher-Order Paradigms. PhD thesis, University of Edinburgh, 1993. [11] D. Sangiorgi. Bisimulation for higher-order process calculi. Information and Computation, 131(2):141–178, 1996. [12] D. Sangiorgi and R. Milner. On the problem of ‘weak bisimulation up to’. In Proc. CONCUR, volume 630 of Lecture Notes in Computer Science, pages 32–46. Springer-Verlag, 1992. [13] D. Sangiorgi and D. Walker. The pi-calculus: A Theory of mobile processes. Cambridge University Press, 2001. [14] B. Thomsen. Calculi for Higher-Order Communicating Systems. PhD thesis, University of London, 1990. [15] J. Vitek and G. Castagna. Seal: A framework for secure mobile computations. In Internet Programming Languages, volume 1686 of Lecture Notes in Computer Science. Springer-Verlag, 1999. This work is licensed under the Creative Commons Attribution-NoDerivs License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nd/2.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
2cs.AI